--- docman.php 2000/08/04 11:25:05 1.11
+++ docman.php 2000/09/06 14:25:15 1.17
@@ -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 @@
time() ) {
+ if ( ($mod + $gblModDays*86400) > time() ) {
$a = " * " ;
+ $a .= " than $gblModDays days\"> * " ;
}
$file_lock=CheckLock($path);
@@ -843,11 +849,11 @@
|
|
|
-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).
-If you select icon left from filename, you will get detailed information
-about file, as well as delete, rename and annotation options.
+
+if (file_exists(".info.inc")) {
+ include(".info.inc");
+}
+?>
|
|
|
@@ -1098,6 +1104,24 @@
//////////////////////////////////////////////////////////////////
+// recursivly delete directory
+
+function rrmdir($dir) {
+ $handle=opendir($dir);
+ while ($file = readdir($handle)) {
+ if ($file != "." && $file != "..") {
+ if (is_dir("$dir/$file"))
+ rrmdir("$dir/$file");
+ else
+ if (! @unlink("$dir/$file")) return(0);
+ }
+ }
+ closedir($handle);
+ return @rmdir($dir);
+}
+
+//////////////////////////////////////////////////////////////////
+
// MAIN PROGRAM
// ============
// query parameters: capital letters
@@ -1194,7 +1218,7 @@
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 ;
@@ -1268,7 +1292,7 @@
}
}
else { // delete directory
- if ( ! @rmdir($fsDir) ) {
+ if ( ! @rrmdir($fsDir) ) {
Error("Rmdir failed", $tstr . $fsDir) ;
}
else {
@@ -1356,6 +1380,7 @@
case "Co" :
// checkout
Lock("$gblFsRoot/$relDir/$F");
+ header("Content-Disposition: attachment; filename=$F" );
Header("Location: ".urlpath("$relDir/$F"));
exit;
case "Ci" :
@@ -1371,6 +1396,7 @@
case "V" :
// view
LogIt("$gblFsRoot/$relDir/$F","viewed");
+ header("Content-Disposition: attachment; filename=$F" );
Header("Location: ".urlpath("$relDir/$F"));
exit;
}