/[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.6 by dpavlin, Fri Aug 4 10:07:04 2000 UTC revision 1.9 by dpavlin, Fri Aug 4 10:43:23 2000 UTC
# Line 65  IMPORTANT INSTALLATION NOTE: Line 65  IMPORTANT INSTALLATION NOTE:
65  TODO:  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          add more content-management (like cms.sourceforge.net):          retrieve old versions of files (overwritten)
                 check-out/check-in/reserve  
                 comments to files  
69  */  */
70    
71  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
# Line 194  function EndHTML() { Line 192  function EndHTML() {
192  </small>  </small>
193  </P>  </P>
194  <BR>  <BR>
195  <? include(".debug.inc") ?>  <? //include(".debug.inc") ?>
196  <BR><BR></BODY></HTML>  <BR><BR></BODY></HTML>
197    
198  <?php  <?php
# Line 294  echo($fstr) ; ?></TEXTAREA> Line 292  echo($fstr) ; ?></TEXTAREA>
292  </FORM>  </FORM>
293    
294  <?php  <?php
295          } else if ( strstr( join(" ",$gblImages), $ext ) ) {            }
296            if ( !$file_lock && strstr(join(" ",$gblImages),$ext) ) {  
297                  $info  = getimagesize($fsPath) ;                  $info  = getimagesize($fsPath) ;
298                  $tstr  = "<IMG SRC=\"". $relPath . "\" BORDER=0 " ;                  $tstr = "<IMG SRC=\"".urlpath($relPath)."\" BORDER=0 " ;
299                  $tstr .= $info[3] . " ALT=\"" . $fn . " - " ;                  $tstr .= $info[3] . " ALT=\"" . $fn . " - " ;
300                  $tstr .= (int)(($fsize+1023)/1024) . "Kb\">" ;                  $tstr .= (int)(($fsize+1023)/1024) . "Kb\">" ;
301                  echo htmlentities($tstr) . "<BR><BR>" . $tstr ;  //              echo htmlentities($tstr) . "<BR><BR>" . $tstr ;
302                    echo $tstr ;
303          }          }
304    
305  ?>  ?>
# Line 848  about file, as well as delete, rename an Line 848  about file, as well as delete, rename an
848   <INPUT TYPE="HIDDEN" NAME="POSTACTION" VALUE="CREATE">   <INPUT TYPE="HIDDEN" NAME="POSTACTION" VALUE="CREATE">
849   <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?= $relDir ?>">   <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?= $relDir ?>">
850   <INPUT TYPE="SUBMIT" VALUE="CREATE"></NOBR>   <INPUT TYPE="SUBMIT" VALUE="CREATE"></NOBR>
851   <NOBR>OR <A HREF="<?= $self   <NOBR>OR <A HREF="<?= $self ?>?A=U&D=<?= urlencode($relDir) ?>">UPLOAD</A> A FILE
         ?>?A=U&D=<?= urlencode($relDir) ?>">UPLOAD</A> A FILE  
852   </NOBR>   </NOBR>
853  </TD></TR>  </TD></TR>
854  </FORM>  </FORM>
# Line 1070  function Unlock($target) { Line 1069  function Unlock($target) {
1069    
1070  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
1071    
1072    function urlpath($url) {
1073            $url=urlencode(StripSlashes("$url"));
1074            $url=str_replace("%2F","/",$url);
1075            $url=str_replace("+","%20",$url);
1076            return($url);
1077    }
1078    
1079    //////////////////////////////////////////////////////////////////
1080    
1081    function safe_rename($from,$to) {
1082            if (file_exists($from) && is_writable(dirname($to))) {
1083                    rename($from,$to);
1084            }
1085    }
1086    
1087    //////////////////////////////////////////////////////////////////
1088    
1089  // MAIN PROGRAM  // MAIN PROGRAM
1090  // ============  // ============
1091  // query parameters: capital letters  // query parameters: capital letters
# Line 1267  function Unlock($target) { Line 1283  function Unlock($target) {
1283                  if ( $CONFIRM != "on" ) break ;                  if ( $CONFIRM != "on" ) break ;
1284    
1285                  Logit("$fsDir/$FN","renamed $FN to $NEWNAME");                  Logit("$fsDir/$FN","renamed $FN to $NEWNAME");
1286                  rename("$fsDir/$FN","$fsDir/$NEWNAME");                  safe_rename("$fsDir/$FN","$fsDir/$NEWNAME");
1287                  rename("$fsDir/.log/$FN","$fsDir/.log/$NEWNAME");                  safe_rename("$fsDir/.log/$FN","$fsDir/.log/$NEWNAME");
1288                  rename("$fsDir/.note/$FN","$fsDir/.note/$NEWNAME");                  safe_rename("$fsDir/.note/$FN","$fsDir/.note/$NEWNAME");
1289                  rename("$fsDir/.lock/$FN","$fsDir/.lock/$NEWNAME");                  safe_rename("$fsDir/.lock/$FN","$fsDir/.lock/$NEWNAME");
1290    
1291                  break ;                  break ;
1292    
# Line 1325  function Unlock($target) { Line 1341  function Unlock($target) {
1341          case "Co" :          case "Co" :
1342                  // checkout                  // checkout
1343                  Lock("$gblFsRoot/$relDir/$F");                  Lock("$gblFsRoot/$relDir/$F");
1344                  $url="$relDir/$F"; $url=str_replace(" ","%20",$url);                  Header("Location: ".urlpath("$relDir/$F"));
                 Header("Location: $url");  
1345                  exit;                  exit;
1346          case "Ci" :          case "Ci" :
1347                  // upload && update to $relDir                  // upload && update to $relDir
# Line 1340  function Unlock($target) { Line 1355  function Unlock($target) {
1355                  exit ;                  exit ;
1356          case "V" :          case "V" :
1357                  // view                  // view
1358                  Log("viewed");                  LogIt("$gblFsRoot/$relDir/$F","viewed");
1359                  $url="$relDir/$F"; $url=str_replace(" ","%20",$url);                  Header("Location: ".urlpath("$relDir/$F"));
                 Header("Location: $url");  
1360                  exit;                  exit;
1361          }          }
1362    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.26