/[docman]/docman.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /docman.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by dpavlin, Fri Aug 4 11:25:05 2000 UTC revision 1.16 by dpavlin, Wed Sep 6 14:06:02 2000 UTC
# Line 66  TODO: Line 66  TODO:
66          mixed file/directory output (add type to each entry,          mixed file/directory output (add type to each entry,
67                  real support for links)                  real support for links)
68          retrieve old versions of files (overwritten)          retrieve old versions of files (overwritten)
69            show last lock date
70            
71  */  */
72    
73  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
# Line 106  TODO: Line 108  TODO:
108                          if ($user[0] == $GLOBALS["PHP_AUTH_USER"]) {                          if ($user[0] == $GLOBALS["PHP_AUTH_USER"]) {
109                                  $gblUserName=$user[1];                                  $gblUserName=$user[1];
110                                  $gblPw=$user[2];                                  $gblPw=$user[2];
111                                    $gblEmail=$user[3];
112                                  continue ;                                  continue ;
113                          }                          }
114                  }                  }
# Line 118  TODO: Line 121  TODO:
121          $gblDateFmt="Y-m-d";          $gblDateFmt="Y-m-d";
122          $gblTimeFmt="H:i:s";          $gblTimeFmt="H:i:s";
123    
124  // Number of backup files to keep          // Number of backup files to keep
125          $gblNumBackups=5;          $gblNumBackups=3;
126    
127            // show red star if newer than ... days
128            $gblModDays=1;
129    
130          // choose GifIcon below unless you have the M$          // choose GifIcon below unless you have the M$
131          // WingDings font installed on your system          // WingDings font installed on your system
# Line 293  echo($fstr) ; ?></TEXTAREA> Line 299  echo($fstr) ; ?></TEXTAREA>
299    
300  <?php  <?php
301          }          }
302          if ( !$file_lock && strstr(join(" ",$gblImages),$ext) ) {            if ( !$file_lock && $ext!="" && strstr(join(' ',$gblImages),$ext) ) {  
303                  $info  = getimagesize($fsPath) ;                  $info  = getimagesize($fsPath) ;
304                  $tstr = "<IMG SRC=\"".urlpath($relPath)."\" BORDER=0 " ;                  $tstr = "<IMG SRC=\"".urlpath($relPath)."\" BORDER=0 " ;
305                  $tstr .= $info[3] . " ALT=\"" . $fn . " - " ;                  $tstr .= $info[3] . " ALT=\"" . $fn . " - " ;
# Line 640  function GifIcon($txt) { Line 646  function GifIcon($txt) {
646    
647  function Navigate($fsRoot,$relDir) {  function Navigate($fsRoot,$relDir) {
648    
649          global $gblEditable, $gblIcon ;          global $gblEditable, $gblIcon, $gblModDays ;
650    
651          $self     = $GLOBALS["PHP_SELF"] ;          $self     = $GLOBALS["PHP_SELF"] ;
652          if (isset($GLOBALS["HTTPS"]) && $GLOBALS["HTTPS"] == "on") {          if (isset($GLOBALS["HTTPS"]) && $GLOBALS["HTTPS"] == "on") {
# Line 755  function Navigate($fsRoot,$relDir) { Line 761  function Navigate($fsRoot,$relDir) {
761    
762                  $info_url=$self."?A=E&F=".urlencode($file)."&D=".urlencode($relDir);                  $info_url=$self."?A=E&F=".urlencode($file)."&D=".urlencode($relDir);
763    
764                  if ( ($mod + 30*86400) > time() ) {                  if ( ($mod + $gblModDays*86400) > time() ) {
765                          $a  = "<SPAN CLASS=RED TITLE=\"Newer" ;                          $a  = "<SPAN CLASS=RED TITLE=\"Newer" ;
766                          $a .= " than 30 days\"> * </SPAN>" ;                          $a .= " than $gblModDays days\"> * </SPAN>" ;
767                  }                  }
768    
769                  $file_lock=CheckLock($path);                  $file_lock=CheckLock($path);
# Line 843  function Navigate($fsRoot,$relDir) { Line 849  function Navigate($fsRoot,$relDir) {
849  <TR><TD></TD><TD COLSPAN=5><HR></TD></TR>  <TR><TD></TD><TD COLSPAN=5><HR></TD></TR>
850    
851  <TR><TD></TD><TD COLSPAN=5>  <TR><TD></TD><TD COLSPAN=5>
852  To just view file without editing, select it's filename (<b>don't edit files which are opened this way!</b>)<br>  <?
853  To <b>edit</b> file select <?= $gblIcon("checkout") ?> to check-out  if (file_exists(".info.inc")) {
854  and edit it locally. After editing is over, select filename or <?= $gblIcon("checkin") ?> to check-in (update copy of file on server).<br>          include(".info.inc");
855  <by>If you select icon left from filename, you will get detailed information  }
856  about file, as well as delete, rename and annotation options.  ?>
857  </TD></TR>  </TD></TR>
858    
859  <TR><TD></TD><TD COLSPAN=5><HR></TD></TR>  <TR><TD></TD><TD COLSPAN=5><HR></TD></TR>
# Line 1098  function safe_rename($from,$to) { Line 1104  function safe_rename($from,$to) {
1104    
1105  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
1106    
1107    // recursivly delete directory
1108    
1109    function rrmdir($dir) {
1110            $handle=opendir($dir);
1111            while ($file = readdir($handle)) {
1112                    if ($file != "." && $file != "..") {
1113                            if (is_dir("$dir/$file"))
1114                                    rrmdir("$dir/$file");
1115                            else
1116                                    if (! @unlink("$dir/$file")) return(0);
1117                    }
1118            }
1119            closedir($handle);
1120            return @rmdir($dir);
1121    }
1122    
1123    //////////////////////////////////////////////////////////////////
1124    
1125  // MAIN PROGRAM  // MAIN PROGRAM
1126  // ============  // ============
1127  // query parameters: capital letters  // query parameters: capital letters
# Line 1268  function safe_rename($from,$to) { Line 1292  function safe_rename($from,$to) {
1292                          }                          }
1293                  }                  }
1294                  else {  // delete directory                  else {  // delete directory
1295                    if ( ! @rmdir($fsDir) ) {                    if ( ! @rrmdir($fsDir) ) {
1296                      Error("Rmdir failed", $tstr . $fsDir) ;                      Error("Rmdir failed", $tstr . $fsDir) ;
1297                    }                    }
1298                    else {                    else {
# Line 1356  function safe_rename($from,$to) { Line 1380  function safe_rename($from,$to) {
1380          case "Co" :          case "Co" :
1381                  // checkout                  // checkout
1382                  Lock("$gblFsRoot/$relDir/$F");                  Lock("$gblFsRoot/$relDir/$F");
1383                    header("Content-Disposition: attachment; filename=$F" );
1384                  Header("Location: ".urlpath("$relDir/$F"));                  Header("Location: ".urlpath("$relDir/$F"));
1385                  exit;                  exit;
1386          case "Ci" :          case "Ci" :
# Line 1371  function safe_rename($from,$to) { Line 1396  function safe_rename($from,$to) {
1396          case "V" :          case "V" :
1397                  // view                  // view
1398                  LogIt("$gblFsRoot/$relDir/$F","viewed");                  LogIt("$gblFsRoot/$relDir/$F","viewed");
1399                    header("Content-Disposition: attachment; filename=$F" );
1400                  Header("Location: ".urlpath("$relDir/$F"));                  Header("Location: ".urlpath("$relDir/$F"));
1401                  exit;                  exit;
1402          }          }

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.26