diff --git a/lib/properties.php b/lib/properties.php index 25406f0..a98c4e5 100644 --- a/lib/properties.php +++ b/lib/properties.php @@ -1,22 +1,23 @@ alert('Sorry - problem with file/folder requested');window.history.back();"); +if (!file_exists($fileName) || 0 !== strpos(str_replace("\\", "/", $fileName),$docRoot)) { + die(""); } ?> - + ICEcoder <?php echo $ICEcoder["versionNo"];?> file/folder properties + @@ -29,19 +30,19 @@ if (!file_exists($fileName) || strpos(str_replace("\\","/",$fileName),$docRoot) $bytes = filesize($fileName); // If it's a dir, get the dir size if (is_dir($fileName)) { - $io = popen('/usr/bin/du -sb '.$fileName, 'r'); - $bytes = intval(fgets($io,80)); + $io = popen('/usr/bin/du -sb ' . $fileName, 'r'); + $bytes = intval(fgets($io, 80)); pclose($io); } // Change into kilobytes -$outputSize = ($bytes/1024); +$outputSize = ($bytes / 1024); $outputUnit = "kb"; // Maybe we should show in megabytes? if ($outputSize >= 1024) { - $outputSize = ($outputSize/1024); + $outputSize = ($outputSize / 1024); $outputUnit = "mb"; } -echo number_format($outputSize, 2, '.', '').$outputUnit." (".number_format($bytes)." bytes)"; +echo number_format($outputSize, 2, '.', '') . $outputUnit . " (" . number_format($bytes) . " bytes)"; ?> : : @@ -50,7 +51,7 @@ echo number_format($outputSize, 2, '.', '').$outputUnit." (".number_format($byte : / -: +:

:
@@ -58,9 +59,9 @@ echo number_format($outputSize, 2, '.', '').$outputUnit." (".number_format($byte $dirList = scandir($fileName); $dirCount = 0; $fileCount = 0; -for ($i=0; $i @@ -83,34 +84,34 @@ echo $chmodInfo; - - - + + + - - - + + + - - - + + +
onClick="changePerms();showButton()"> onClick="changePerms();showButton()"> onClick="changePerms();showButton()"> onClick="changePerms(); showButton()"> onClick="changePerms(); showButton()"> onClick="changePerms(); showButton()">
onClick="changePerms();showButton()"> onClick="changePerms();showButton()"> onClick="changePerms();showButton()"> onClick="changePerms(); showButton()"> onClick="changePerms(); showButton()"> onClick="changePerms(); showButton()">
onClick="changePerms();showButton()"> onClick="changePerms();showButton()"> onClick="changePerms();showButton()"> onClick="changePerms(); showButton()"> onClick="changePerms(); showButton()"> onClick="changePerms(); showButton()">
:
- + ">
@@ -118,58 +119,60 @@ $execVars = array(1,3,5,7);
- \ No newline at end of file +