--- docman.php 2000/08/04 11:53:47 1.12
+++ docman.php 2000/09/13 08:27:43 1.21
@@ -66,6 +66,8 @@
mixed file/directory output (add type to each entry,
real support for links)
retrieve old versions of files (overwritten)
+ show last lock date
+
*/
//////////////////////////////////////////////////////////////////
@@ -106,6 +108,7 @@
if ($user[0] == $GLOBALS["PHP_AUTH_USER"]) {
$gblUserName=$user[1];
$gblPw=$user[2];
+ $gblEmail=$user[3];
continue ;
}
}
@@ -118,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
@@ -293,7 +299,7 @@
undelete";
}
$text .= " or revise files on this web site." ;
+ $text .= "
Examine list of files changed in last day or all changes.";
StartHTML("(Navigate)",$text) ;
echo "
-To just view file without editing, select it's filename (don't edit files which are opened this way!) -To edit file select = $gblIcon("checkout") ?> to check-out -and edit it locally. After editing is over, select filename or = $gblIcon("checkin") ?> to check-in (update copy of file on server). - | |||||
$date | $time | $dir/$file | $e[2] | $e[3] |
".GifIcon(up)." Back to front page.
"; +} + +////////////////////////////////////////////////////////////////// + // MAIN PROGRAM // ============ // query parameters: capital letters @@ -1191,10 +1262,11 @@ if (isset($FILENAME)) { Unlock($target); } + ChangeLog($target,"updated"); break ; case "SAVE" : - $path = $gblFsRoot . escapeshellcmd($RELPATH) ; + $path = $gblFsRoot . $RELPATH ; $writable = is_writeable($path) ; $legaldir = is_writeable(dirname($path)) ; $exists = (file_exists($path)) ? 1 : 0 ; @@ -1206,6 +1278,7 @@ fclose($fh) ; clearstatcache() ; Logit($path,"saved changes"); + ChangeLog($path,"saved changes"); break ; case "CREATE" : @@ -1236,6 +1309,7 @@ } $tstr = "$PHP_SELF?A=E&D=".urlencode($relDir)."&F=".urlencode($FN) ; header("Location: " . $tstr) ; + ChangeLog($target,"created"); exit ; } break ; @@ -1268,7 +1342,7 @@ } } else { // delete directory - if ( ! @rmdir($fsDir) ) { + if ( ! @rrmdir($fsDir) ) { Error("Rmdir failed", $tstr . $fsDir) ; } else { @@ -1333,7 +1407,9 @@ // $A=Ci : checkin file $D/$F // $A=V : view file (do nothing except log) // default : display directory $D - + + $F=stripSlashes($F); + switch ($A) { case "U" : // upload to $relDir @@ -1375,6 +1451,16 @@ header("Content-Disposition: attachment; filename=$F" ); Header("Location: ".urlpath("$relDir/$F")); exit; + case "Ch" : + StartHTML("(File changes)","All changes chronologicaly..."); + DisplayChangeLog(0); // all + EndHTML() ; + exit; + case "Ch1" : + StartHTML("(File changes)","Changes to files in last day..."); + DisplayChangeLog(1); + EndHTML() ; + exit; } // default: display directory $relDir