--- siteman.php 2000/07/26 11:46:19 1.2 +++ siteman.php 2000/09/13 09:59:51 1.23 @@ -65,9 +65,9 @@ TODO: mixed file/directory output (add type to each entry, real support for links) - add more content-management (like cms.sourceforge.net): - check-out/check-in/reserve - comments to files + retrieve old versions of files (overwritten) + show last lock date + */ ////////////////////////////////////////////////////////////////// @@ -96,11 +96,19 @@ $gblPw = ""; if ($gblAuth) { - $htusers=fopen(dirname($SCRIPT_FILENAME)."/.htusers","r"); + $htusers_file=dirname($SCRIPT_FILENAME)."/.htusers"; + if (! file_exists($htusers_file)) { + $htusers=fopen($htusers_file,"a+"); + fputs($htusers,"# Change owner of $htusers_file to root !!\n"); + fputs($htusers,"demo:full name:md5_hash\n"); + fclose($htusers); + } + $htusers=fopen($htusers_file,"r"); while($user = fgetcsv($htusers,255,":")) { if ($user[0] == $GLOBALS["PHP_AUTH_USER"]) { $gblUserName=$user[1]; $gblPw=$user[2]; + $gblEmail=$user[3]; continue ; } } @@ -113,8 +121,11 @@ $gblDateFmt="Y-m-d"; $gblTimeFmt="H:i:s"; -// Number of backup files to keep - $gblNumBackups=5; + // Number of backup files to keep + $gblNumBackups=3; + + // show red star if newer than ... days + $gblModDays=1; // choose GifIcon below unless you have the M$ // WingDings font installed on your system @@ -124,7 +135,7 @@ // the directory below should be /icons/ or /icons/small/ // on Apache; a set of icons is included in the distribution - $gblIconLocation = "icons/" ; + $gblIconLocation = "/icons/" ; // files you want to be able to edit in text mode // and view with (primitive) syntax highlighting @@ -150,19 +161,19 @@
-= $text ?>
= date($GLOBALS[gblDateFmt]) ?> - = date($GLOBALS[gblTimeFmt]) ?> - = $GLOBALS[gblUserName] ?> - [logout] + [?relogin== $GLOBALS[gblPw] ?>">logout]file size: " . $fsize . " Bytes" ; + $fsize = filesize($fsPath) ; + $fmodified = date("$GLOBALS[gblDateFmt] $GLOBALS[gblTimeFmt]", filemtime($fsPath)) ; + $faccessed = date("$GLOBALS[gblDateFmt] $GLOBALS[gblTimeFmt]", fileatime($fsPath)) ; + echo "
" ; - echo "last modified: " . $fmodified . "
" ; - echo "last accessed: " . $faccessed . "
" ; - echo " owner: " . fileowner($fsPath) . "
" ; - echo " group: " . filegroup($fsPath) . "
" ; - echo " permissions: " ; - echo printf( "%o", fileperms($fsPath) ) . "" ; - echo "
file size: " . $fsize . " Bytes" ; } - if ( $editable && ($writable || !$exists) ) { + if ( $editable && ($writable || !$exists) && !$file_lock ) { $fh = fopen($fsPath,"a+") ; rewind($fh) ; $fstr = fread($fh,filesize($fsPath)) ; @@ -269,17 +281,17 @@ $fstr = htmlentities( $fstr ) ; ?> - - $logname=dirname("$fsDir/$fn")."/.log/".basename("$fsDir/$fn"); +
" ; + echo "last modified: " . $fmodified . "
" ; + echo "last accessed: " . $faccessed . "
" ; + echo " owner: " . fileowner($fsPath) . "
" ; + echo " group: " . filegroup($fsPath) . "
" ; + echo " permissions: " ; + echo printf( "%o", fileperms($fsPath) ) . "" ; + echo "
$line[0] | $line[1] | $line[2] | $line[3] |
$e[1] | $e[2] | $e[3] | $e[4] |
- - | |||||||||||||||||||||||||||
= $gblIcon("up") ?> | + += $parent ?> | ||||||||||||||||||||||||||
DIRECTORY NAME | |||||||||||||||||||||||||||
DIRECTORY NAME | |||||||||||||||||||||||||||
- | |||||||||||||||||||||||||||
= $gblIcon("fldr") ?> | += $tstr ?> | ||||||||||||||||||||||||||
+ = $webRoot . $relDir ?> DOCUMENT NAME |
-
+ | = $gblIcon("blank").$gblIcon("blank") ?> |
+NOTE |
LAST UPDATE | FILE SIZE |
-
- |
-
- |
- |
- | Bytes | |
+= $file_url_html ?> | += $b ?> | += $note_html ?> | += date("$GLOBALS[gblDateFmt] $GLOBALS[gblTimeFmt]",$mod) ?> | += $sz ?>Bytes |