646 |
|
|
647 |
function Navigate($fsRoot,$relDir) { |
function Navigate($fsRoot,$relDir) { |
648 |
|
|
649 |
global $gblEditable, $gblIcon ; |
global $gblEditable, $gblIcon, $gblModDays ; |
650 |
|
|
651 |
$self = $GLOBALS["PHP_SELF"] ; |
$self = $GLOBALS["PHP_SELF"] ; |
652 |
if (isset($GLOBALS["HTTPS"]) && $GLOBALS["HTTPS"] == "on") { |
if (isset($GLOBALS["HTTPS"]) && $GLOBALS["HTTPS"] == "on") { |
1104 |
|
|
1105 |
////////////////////////////////////////////////////////////////// |
////////////////////////////////////////////////////////////////// |
1106 |
|
|
1107 |
|
// recursivly delete directory |
1108 |
|
|
1109 |
|
function rrmdir($dir) { |
1110 |
|
$handle=opendir($dir); |
1111 |
|
while ($file = readdir($handle)) { |
1112 |
|
if ($file != "." && $file != "..") { |
1113 |
|
if (is_dir("$dir/$file")) |
1114 |
|
rrmdir("$dir/$file"); |
1115 |
|
else |
1116 |
|
if (! @unlink("$dir/$file")) return(0); |
1117 |
|
} |
1118 |
|
} |
1119 |
|
closedir($handle); |
1120 |
|
return @rmdir($dir); |
1121 |
|
} |
1122 |
|
|
1123 |
|
////////////////////////////////////////////////////////////////// |
1124 |
|
|
1125 |
// MAIN PROGRAM |
// MAIN PROGRAM |
1126 |
// ============ |
// ============ |
1127 |
// query parameters: capital letters |
// query parameters: capital letters |
1218 |
break ; |
break ; |
1219 |
|
|
1220 |
case "SAVE" : |
case "SAVE" : |
1221 |
$path = $gblFsRoot . escapeshellcmd($RELPATH) ; |
$path = $gblFsRoot . $RELPATH ; |
1222 |
$writable = is_writeable($path) ; |
$writable = is_writeable($path) ; |
1223 |
$legaldir = is_writeable(dirname($path)) ; |
$legaldir = is_writeable(dirname($path)) ; |
1224 |
$exists = (file_exists($path)) ? 1 : 0 ; |
$exists = (file_exists($path)) ? 1 : 0 ; |
1292 |
} |
} |
1293 |
} |
} |
1294 |
else { // delete directory |
else { // delete directory |
1295 |
if ( ! @rmdir($fsDir) ) { |
if ( ! @rrmdir($fsDir) ) { |
1296 |
Error("Rmdir failed", $tstr . $fsDir) ; |
Error("Rmdir failed", $tstr . $fsDir) ; |
1297 |
} |
} |
1298 |
else { |
else { |