--- docman.php 2001/01/30 16:48:36 1.31 +++ docman.php 2001/02/15 22:14:21 1.33 @@ -222,7 +222,11 @@ Error("Creation denied",$relDir) ; $text = "Use this page to view, modify or " ; - $text .= "delete a single document on this " ; + if (is_dir($fsPath)) { + $text .="delete a directory on this " ; + } else { + $text .= "delete a single document on this " ; + }; $text .= "web site." ; $title = "(Detail Page)" ; StartHTML($title, $text) ; @@ -232,18 +236,21 @@ $fsize = filesize($fsPath) ; $fmodified = date("$GLOBALS[gblDateFmt] $GLOBALS[gblTimeFmt]", filemtime($fsPath)) ; $faccessed = date("$GLOBALS[gblDateFmt] $GLOBALS[gblTimeFmt]", fileatime($fsPath)) ; - echo "
    file size: " . $fsize . " Bytes
" ; + $userinfo = posix_getpwuid(fileowner($fsPath)); + $grpinfo = posix_getgrgid(filegroup($fsPath)); + echo "
";
+		if (!is_dir($fsPath)) echo "file size: " . $fsize . " Bytes
" ; echo "last modified: " . $fmodified . "
" ; echo "last accessed: " . $faccessed . "
" ; - echo " owner: " . fileowner($fsPath) . "
" ; - echo " group: " . filegroup($fsPath) . "
" ; + echo " owner: " . $userinfo["name"] . "
" ; + echo " group: " . $grpinfo["name"] . "
" ; echo " permissions: " ; echo printf( "%o", fileperms($fsPath) ) . "" ; echo "
" ; } - if ( $editable && ($writable || !$exists) && !$file_lock ) { + if ( !is_dir($fsPath) && $editable && ($writable || !$exists) && !$file_lock ) { $fh = fopen($fsPath,"a+") ; rewind($fh) ; $fstr = fread($fh,filesize($fsPath)) ; @@ -350,7 +357,12 @@ array_unshift($logarr,array($cl,$line[0],$line[1],$line[2],$line[3])); } fclose($log); - print "

CHANGES TO THIS FILE
\n"; + if (is_dir("$fsDir/$fn")) { + $whatis="DIRECTORY"; + } else { + $whatis="FILE"; + } + print "

CHANGES TO THIS $whatis
\n"; $bakcount = 0; // start from 0, skip fist backup (it's current) while ($e = array_shift($logarr)) { if (strstr($e[4],"upload")) { @@ -685,18 +697,23 @@ sort($dirList) ; ?> - +" . $dir . "/" ; + $note_html="".$gblIcon("note")."".ReadNote($fsDir.$dir); ?> - - + + +$htusers_file and set it correct permissions (not writable by web server as it is now!). You can add users using adduser.pl script!"); + exit; } else { Error("Can't create proto user file!","Please make directory ".dirname($htusers_file)." writable or create .htusers file by hand using adduser.pl script!"); exit; @@ -1399,7 +1418,7 @@ case "E" : $F=stripSlashes($F); // detail of $relDir/$F - if (is_file("$gblFsRoot/$relDir/$F")) DetailPage($gblFsRoot, $relDir, $F) ; + if (is_file("$gblFsRoot/$relDir/$F") || is_dir("$gblFsRoot/$relDir/$F")) DetailPage($gblFsRoot, $relDir, $F) ; exit ; case "C" : $F=stripSlashes($F);

DIRECTORY NAME
DIRECTORY NAMEDIRECTORY NOTE
+ +