--- docman.php 2000/09/06 11:04:32 1.15
+++ docman.php 2000/09/13 08:08:22 1.20
@@ -695,6 +695,7 @@
$text .= ", 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 "
\n";
+ while ($e = array_shift($logarr)) {
+ $cl=$cl1; $cl1=$cl2; $cl2=$cl;
+ $date = date("$GLOBALS[gblDateFmt]", $e[0]);
+ $time = date("$GLOBALS[gblTimeFmt]", $e[0]);
+ $dir = dirname($e[1]);
+ $file = basename($e[1]);
+ print "$date | $time | $dir/$file | $e[2] | $e[3] |
\n";
+ }
+ print "
";
+}
+
+//////////////////////////////////////////////////////////////////
+
// MAIN PROGRAM
// ============
// query parameters: capital letters
@@ -1197,10 +1254,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 ;
@@ -1212,6 +1270,7 @@
fclose($fh) ;
clearstatcache() ;
Logit($path,"saved changes");
+ ChangeLog($path,"saved changes");
break ;
case "CREATE" :
@@ -1242,6 +1301,7 @@
}
$tstr = "$PHP_SELF?A=E&D=".urlencode($relDir)."&F=".urlencode($FN) ;
header("Location: " . $tstr) ;
+ ChangeLog($target,"created");
exit ;
}
break ;
@@ -1274,7 +1334,7 @@
}
}
else { // delete directory
- if ( ! @rmdir($fsDir) ) {
+ if ( ! @rrmdir($fsDir) ) {
Error("Rmdir failed", $tstr . $fsDir) ;
}
else {
@@ -1381,6 +1441,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