--- docman.php 2001/03/11 15:36:51 1.35 +++ docman.php 2001/04/03 13:35:07 1.39 @@ -236,14 +236,16 @@ $fsize = filesize($fsPath) ; $fmodified = date("$GLOBALS[gblDateFmt] $GLOBALS[gblTimeFmt]", filemtime($fsPath)) ; $faccessed = date("$GLOBALS[gblDateFmt] $GLOBALS[gblTimeFmt]", fileatime($fsPath)) ; - $userinfo = posix_getpwuid(fileowner($fsPath)); - $grpinfo = posix_getgrgid(filegroup($fsPath)); + $fuid=fileowner($fsPath); + $fgid=filegroup($fsPath); + $userinfo = posix_getpwuid($fuid); + $grpinfo = posix_getgrgid($fgid); echo "
"; - if (!is_dir($fsPath)) echo "file size: " . $fsize . " Bytes" ; @@ -1057,7 +1059,7 @@ function safe_rename($fromdir,$fromfile,$tofile) { function try_rename($from,$to) { - print "$from -> $to\n"; +# print "$from -> $to\n"; if (file_exists($from) && is_writeable(dirname($to))) { rename($from,$to); } @@ -1073,7 +1075,7 @@ $todir=dirname($to); $tofile=basename($to); - print "
" ; + if (!is_dir($fsPath)) echo " file size: " . $fsize . " Bytes
" ; echo "last modified: " . $fmodified . "
" ; echo "last accessed: " . $faccessed . "
" ; - echo " owner: " . $userinfo["name"] . "
" ; - echo " group: " . $grpinfo["name"] . "
" ; + echo " owner: " . $userinfo["name"] . " [$fuid]
" ; + echo " group: " . $grpinfo["name"] . " [$fgid]
" ; echo " permissions: " ; echo printf( "%o", fileperms($fsPath) ) . "" ; echo "
$fromdir / $fromfile -> $todir / $tofile\n\n"; +# print "$fromdir / $fromfile -> $todir / $tofile\n\n"; try_rename("$fromdir/$fromfile","$todir/$tofile"); try_dir("$todir/.log"); @@ -1212,6 +1214,8 @@ $relDir = urldecode($D) ; // then use GET } + $relDir=stripSlashes($relDir); + if ($relDir == "/") $relDir = "" ; // default : website root = "" @@ -1246,6 +1250,10 @@ $FN=stripSlashes($FN); + if (file_exists("$fsScriptDir/.docman.conf")) { + include("$fsScriptDir/.docman.conf"); + } + switch ($POSTACTION) { case "UPLOAD" : if (!is_writeable($fsDir)) Error("Write denied",$relDir) ;