| version 1.5, 2001/10/01 13:50:59 |
version 1.6, 2001/10/01 14:34:00 |
| Line 36 function write_origvars_html($origvars) |
|
| Line 36 function write_origvars_html($origvars) |
|
| } |
} |
| } |
} |
| |
|
| |
/* |
| |
* append_slash() |
| |
* |
| |
* Appends slash at the end of string if string is not empty and slash |
| |
* is not already present at the end of string. |
| |
* On success returns changed string, on failure returns false; |
| |
*/ |
| |
function append_slash($string) { |
| |
|
| |
if (strlen($string) > 0 && $string[strlen($string)-1] != '/') |
| |
return $string . '/'; |
| |
|
| |
return false; |
| |
} |
| |
|
| ?> |
?> |
| |
|
| <tt> |
<tt> |
| Line 43 function write_origvars_html($origvars) |
|
| Line 58 function write_origvars_html($origvars) |
|
| |
|
| <?php |
<?php |
| |
|
| if (strlen($phpWebFileManager_ROOT_DIR) > 0 && |
$phpWebFileManager_LINKS_PREFIX = |
| $phpWebFileManager_ROOT_DIR[strlen($phpWebFileManager_ROOT_DIR)-1] != '/') |
append_slash($phpWebFileManager_LINKS_PREFIX); |
| $phpWebFileManager_ROOT_DIR .= '/'; |
|
| |
$phpWebFileManager_ROOT_DIR = |
| |
append_slash($phpWebFileManager_ROOT_DIR); |
| |
|
| if (! isset($dir) || $phpWebFileManager_DENY_DIR_ENTER) |
if (! isset($dir) || $phpWebFileManager_DENY_DIR_ENTER) |
| $dir = $phpWebFileManager_START_DIR; |
$dir = $phpWebFileManager_START_DIR; |
| Line 83 if (is_dir($dir)) { |
|
| Line 100 if (is_dir($dir)) { |
|
| * On some systems chdir() is modifying $dir variable, |
* On some systems chdir() is modifying $dir variable, |
| * so we must improve it. |
* so we must improve it. |
| */ |
*/ |
| |
$dir = append_slash($dir); |
| |
/* |
| if (strlen($dir) > 0 && |
if (strlen($dir) > 0 && |
| $dir[strlen($dir)-1] != '/') |
$dir[strlen($dir)-1] != '/') |
| $dir .= '/'; |
$dir .= '/'; |
| |
*/ |
| } |
} |
| else |
else |
| $dir = ''; |
$dir = ''; |
|
|
| |
|
| $url = parse_url("http://${HTTP_HOST}${REQUEST_URI}"); |
$url = parse_url("http://${HTTP_HOST}${REQUEST_URI}"); |
| $url['path'] = get_path_without_scriptname($url) |
$url['path'] = get_path_without_scriptname($url) |
| . $phpWebFileManager_ROOT_DIR . $dir . $entry; |
. (strlen($phpWebFileManager_LINKS_PREFIX) > 0 |
| |
? $phpWebFileManager_LINKS_PREFIX |
| |
: $phpWebFileManager_ROOT_DIR ) |
| |
. $dir . $entry; |
| unset($url['query']); |
unset($url['query']); |
| unset($url['fragment']); |
unset($url['fragment']); |
| |
|