/[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.1.1.1 by dpavlin, Fri May 12 12:01:08 2000 UTC revision 1.5 by dpavlin, Thu Aug 3 22:02:03 2000 UTC
# Line 34  Line 34 
34  /*             PHP3. Fixed bug which would send you to a non-   */  /*             PHP3. Fixed bug which would send you to a non-   */
35  /*             existent address after file modifications.       */  /*             existent address after file modifications.       */
36    
37    /*
38            2000-07-25 Dobrica Pavlinusic <dpavlin@rot13.org>
39    
40            nuked exec calls (unsecure)
41            nuked writeable function (replaced by php is_writeable)
42            added support for https (tested with apache+mod_ssl)
43            added users file
44            date format user-selectable
45            cycle backup files in bak directory
46            support links as directoryes (for now)
47            support of file history logging
48            undelete capabilities (delete moves to .del directory)
49    
50            2000-07-26 DbP
51    
52            added more checking on entered filename (when creating file/dir)
53            added rename option
54    
55    
56    IMPORTANT INSTALLATION NOTE:
57            deny serving of .* (dot-something) files in web server!
58            Otherwise, uses can access your log files, users and/or
59            deleted files!
60    
61            .htusers is in form:
62            login:Real Name:md5(loginpassword)
63    
64    
65    TODO:
66            mixed file/directory output (add type to each entry,
67                    real support for links)
68            add more content-management (like cms.sourceforge.net):
69                    check-out/check-in/reserve
70                    comments to files
71    */
72    
73  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
74    
75  // TODO : Don't let the file be modified itself. Create a hash of  // TODO : Don't let the file be modified itself. Create a hash of
# Line 51  Line 87 
87          // username/password should not be system          // username/password should not be system
88          // usernames/passwords !!          // usernames/passwords !!
89    
90          // your (hashed) username/password here  //      $gblPw    = "hash_of_your_username_and_password" ;
91          $gblPw    = "hash_of_your_username_and_password" ;                
92            //      $gblAuth  = false ;             // use builtin authentication
93          $gblAuth  = false ;             // use builtin authentication          $gblAuth  = true ;             // use builtin authentication
94          $gblHash  = "md5" ;             // hash function to use          $gblHash  = "md5" ;             // hash function to use
95    
96            $gblPw    = "";
97    
98            if ($gblAuth) {
99                    $htusers_file=dirname($SCRIPT_FILENAME)."/.htusers";
100                    if (! file_exists($htusers_file)) {
101                            $htusers=fopen($htusers_file,"a+");
102                            fputs($htusers,"# Change owner of $htusers_file to root !!\n");
103                            fputs($htusers,"demo:full name:md5_hash\n");
104                            fclose($htusers);
105                    }
106                    $htusers=fopen($htusers_file,"r");
107                    while($user = fgetcsv($htusers,255,":")) {
108                            if ($user[0] == $GLOBALS["PHP_AUTH_USER"]) {
109                                    $gblUserName=$user[1];
110                                    $gblPw=$user[2];
111                                    continue ;
112                            }
113                    }
114                    fclose($htusers);
115            }
116    
117    //      $gblDateFmt="D, F d, Y";
118    //      $gblTimeFmt="g:i:sA";
119    
120            $gblDateFmt="Y-m-d";
121            $gblTimeFmt="H:i:s";
122    
123    // Number of backup files to keep
124            $gblNumBackups=5;
125    
126          // choose GifIcon below unless you have the M$          // choose GifIcon below unless you have the M$
127          // WingDings font installed on your system          // WingDings font installed on your system
128    
# Line 65  Line 131 
131          // the directory below should be /icons/ or /icons/small/          // the directory below should be /icons/ or /icons/small/
132          // on Apache; a set of icons is included in the distribution          // on Apache; a set of icons is included in the distribution
133    
134          $gblIconLocation = "icons/" ;          $gblIconLocation = "/icons/" ;
135    
136          // files you want to be able to edit in text mode          // files you want to be able to edit in text mode
137          // and view with (primitive) syntax highlighting          // and view with (primitive) syntax highlighting
# Line 91  function StartHTML($title,$text="") { Line 157  function StartHTML($title,$text="") {
157    
158  <HTML>  <HTML>
159  <HEAD>  <HEAD>
160   <TITLE><?php echo $host . " " . $title ?></TITLE>   <TITLE><?= $host . " " . $title ?></TITLE>
161   <META NAME="description" CONTENT="PHP port of AnyPortal Site Manager">   <META NAME="description" CONTENT="PHP port of AnyPortal Site Manager">
162   <META NAME="keywords" CONTENT="site manager, web site maintenance">   <META NAME="keywords" CONTENT="site manager, web site maintenance">
163   <META NAME="robots" CONTENT="noindex">   <META NAME="robots" CONTENT="noindex">
164   <META HTTP-EQUIV="expires" CONTENT="0">   <META HTTP-EQUIV="expires" CONTENT="0">
165   <LINK REL="stylesheet" TYPE="text/css"   <LINK REL="stylesheet" TYPE="text/css"
166          HREF="<?php echo $self ?>?STYLE=get">          HREF="<?= $self ?>?STYLE=get">
167  </HEAD>  </HEAD>
168  <BODY BGCOLOR="#FFFFFF">  <BODY BGCOLOR="#FFFFFF">
169   <H3 ALIGN="RIGHT"><?php echo $host ?></H3>   <H3 ALIGN="RIGHT"><?= $host ?></H3>
170  <TABLE BORDER=0 WIDTH="100%"><TR>  <TABLE BORDER=0 WIDTH="100%"><TR>
171   <TD CLASS=INV><?php echo $title ?></TD></TR></TABLE>   <TD CLASS=INV><?= $title ?></TD></TR></TABLE>
172   <P><?php echo $text ?></P>   <P><?= $text ?></P>
173    
174  <?php  <?php
175  } // end function StartHTML  } // end function StartHTML
# Line 115  function EndHTML() { Line 181  function EndHTML() {
181    
182  <HR>  <HR>
183  <P CLASS=FTR>  <P CLASS=FTR>
184  <B><?php echo date("D, F d, Y") ?> -  <B><?= date($GLOBALS[gblDateFmt]) ?> -
185  <?php echo date("g:i:sA") ?></B><BR>ANYPORTAL(php) Site Manager  <?= date($GLOBALS[gblTimeFmt]) ?> -
186  - &copy; 1999 by <A HREF="http://www.anyportal.com">ANYPORTAL</A>  <?= $GLOBALS[gblUserName] ?>
187  - &copy; 2000 by <A HREF="http://da.nger.org">d@nger.org</A>  <small> [<a href="<?= $PHP_SELF ?>?relogin=<?= $GLOBALS[gblPw] ?>">logout</a>]</small>
188    </B>
189    <BR>ANYPORTAL(php) Site Manager
190    <br><small>
191    &copy; 1999 by <A HREF="http://www.anyportal.com">ANYPORTAL</A>,
192    &copy; 2000 by <A HREF="http://da.nger.org">d@nger.org</A>,
193    &copy; 2000 by <A HREF="http://www.rot13.org/~dpavlin/">DbP</A>
194    </small>
195  </P>  </P>
196  <BR><BR><BR></BODY></HTML>  <BR>
197    <? include(".debug.inc") ?>
198    <BR><BR></BODY></HTML>
199    
200  <?php  <?php
201  } // end function EndHTML  } // end function EndHTML
# Line 130  function EndHTML() { Line 205  function EndHTML() {
205  function CSS() {  function CSS() {
206  ?>  ?>
207    
208  BODY,TD,P,H1,H2,H3 { font-family:Helvetica,Arial,sans-serif; }  BODY,TD,P,H1,H2,H3 { font-family:Verdana,Helvetica,Arial,sans-serif; }
209  .BLK { color:black; }  .BLK { color:black; }
210  .RED { color:red; }  .RED { color:red; }
211  .TOP { color:red; font-size:70%; } /* table headings */  .TOP { color:red; font-size:70%; } /* table headings */
# Line 164  function DetailPage($fsRoot,$relDir,$fn) Line 239  function DetailPage($fsRoot,$relDir,$fn)
239          $exists   = file_exists($fsPath) ;          $exists   = file_exists($fsPath) ;
240          $ext      = strtolower(strrchr($relPath,".")) ;          $ext      = strtolower(strrchr($relPath,".")) ;
241          $editable = ( $ext=="" || strstr(join(" ",$gblEditable),$ext)) ;          $editable = ( $ext=="" || strstr(join(" ",$gblEditable),$ext)) ;
242          $writable = Writeable($fsPath) ;          $writable = is_writeable($fsPath) ;
243    
244          if (!$editable && !$exists)          if (!$editable && !$exists)
245                  Error("Creation unsupported for type",$relPath) ;                  Error("Creation unsupported for type",$relPath) ;
246          if (!exists && !Writeable($fsDir) )          if (!exists && !is_writeable($fsDir) )
247                  Error("Creation denied",$relDir) ;                  Error("Creation denied",$relDir) ;
248    
249          $text  = "Use this page to view, modify or " ;          $text  = "Use this page to view, modify or " ;
# Line 179  function DetailPage($fsRoot,$relDir,$fn) Line 254  function DetailPage($fsRoot,$relDir,$fn)
254    
255          echo "<H3>" . $relDir . "/" . $fn . "</H3>" ;          echo "<H3>" . $relDir . "/" . $fn . "</H3>" ;
256          if ($exists) {  // get file info          if ($exists) {  // get file info
257            $fsize = filesize($fsPath) ;                  $fsize = filesize($fsPath) ;
258            $fmodified = date("d/M/y G:i:s", filemtime($fsPath)) ;                  $fmodified = date("$GLOBALS[gblDateFmt] $GLOBALS[gblTimeFmt]", filemtime($fsPath)) ;
259            $faccessed = date("d/M/y G:i:s", fileatime($fsPath)) ;                  $faccessed = date("$GLOBALS[gblDateFmt] $GLOBALS[gblTimeFmt]", fileatime($fsPath)) ;
260            echo "<PRE>    file size: " . $fsize . " Bytes<BR>" ;                  echo "<PRE>    file size: " . $fsize . " Bytes<BR>" ;
261            echo "last modified: <B>" . $fmodified . "</B><BR>" ;                  echo "last modified: <B>" . $fmodified . "</B><BR>" ;
262            echo "last accessed: <B>" . $faccessed . "</B><BR>" ;                  echo "last accessed: <B>" . $faccessed . "</B><BR>" ;
263            echo "        owner: <B>" . fileowner($fsPath) . "</B><BR>" ;                  echo "        owner: <B>" . fileowner($fsPath) . "</B><BR>" ;
264            echo "        group: <B>" . filegroup($fsPath) . "</B><BR>" ;                  echo "        group: <B>" . filegroup($fsPath) . "</B><BR>" ;
265            echo "  permissions: <B>" ;                  echo "  permissions: <B>" ;
266            echo printf( "%o", fileperms($fsPath) ) . "</B>" ;                  echo printf( "%o", fileperms($fsPath) ) . "</B>" ;
267            echo "</PRE>" ;                  echo "</PRE>" ;
268    
269          }          }
270    
271          if ( $editable && ($writable || !$exists) ) {          if ( $editable && ($writable || !$exists) ) {
# Line 200  function DetailPage($fsRoot,$relDir,$fn) Line 276  function DetailPage($fsRoot,$relDir,$fn)
276                  $fstr = htmlentities( $fstr ) ;                  $fstr = htmlentities( $fstr ) ;
277  ?>  ?>
278    
279  <FORM ACTION="<?php echo $self ; ?>" METHOD="POST">  <FORM ACTION="<?= $self ; ?>" METHOD="POST">
280  <SPAN TITLE="Click [SAVE] to store updated contents.">  <SPAN TITLE="Click [SAVE] to store updated contents.">
281          <B>DOCUMENT CONTENTS</B>          <B>DOCUMENT CONTENTS</B>
282  </SPAN><BR>  </SPAN><BR>
283  <TEXTAREA NAME="FILEDATA" ROWS=18 COLS=70 WRAP="OFF"><?php  <TEXTAREA NAME="FILEDATA" ROWS=18 COLS=70 WRAP="OFF"><?php
284  echo($fstr) ; ?></TEXTAREA>  echo($fstr) ; ?></TEXTAREA>
285  <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?php echo $relDir ; ?>">  <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?= $relDir ; ?>">
286  <INPUT TYPE="HIDDEN" NAME="FN" VALUE="<?php echo $fn ; ?>">  <INPUT TYPE="HIDDEN" NAME="FN" VALUE="<?= $fn ; ?>">
287  <INPUT TYPE="HIDDEN" NAME="POSTACTION" VALUE="SAVE">  <INPUT TYPE="HIDDEN" NAME="POSTACTION" VALUE="SAVE">
288  <INPUT TYPE="TEXT" SIZE=48 MAXLENGTH=255 NAME="RELPATH"  <INPUT TYPE="HIDDEN" SIZE=48 MAXLENGTH=255 NAME="RELPATH"
289          VALUE="<?php echo $relPath ; ?>">          VALUE="<?= $relPath ; ?>">
290  <INPUT TYPE="RESET" VALUE="RESET">  <br>
291    <INPUT TYPE="RESET" VALUE="UNDO ALL CHANGES">
292  <INPUT TYPE="SUBMIT" VALUE="SAVE">  <INPUT TYPE="SUBMIT" VALUE="SAVE">
293  </FORM>  </FORM>
294    
# Line 226  echo($fstr) ; ?></TEXTAREA> Line 303  echo($fstr) ; ?></TEXTAREA>
303          }          }
304  ?>  ?>
305    
306  <FORM ACTION="<?php echo $self ; ?>" METHOD="POST">  <FORM ACTION="<?= $self ; ?>" METHOD="POST">
307  <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?php echo $relDir ; ?>">  <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?= $relDir ; ?>">
308  <INPUT TYPE="HIDDEN" NAME="FN" VALUE="<?php echo $fn ; ?>">  <INPUT TYPE="HIDDEN" NAME="FN" VALUE="<?= $fn ; ?>">
309  <INPUT TYPE="SUBMIT" NAME="POSTACTION" VALUE="CANCEL"><BR>  <INPUT TYPE="SUBMIT" NAME="POSTACTION" VALUE="CANCEL"><BR>
310    
311  <?php  <?php
312            if (substr($fn,0,4) == ".del") {
313                    $action="UNDELETE";
314                    $desc="undelete previously deleted file";
315            } else {
316                    $action="DELETE";
317                    $desc="delete";
318            }
319    
320          if ($exists && $writable) {          if ($exists && $writable) {
321  ?>  ?>
322    
323  <HR><SPAN TITLE="Check OK and click [DELETE] to delete.">  <HR>
324  <B>OK TO DELETE "<?php echo $fn ; ?>"? </B></SPAN>  <a name="undelete">
325    <SPAN TITLE="Check OK and click [<?= $action ?>] to <?= $desc ?>.">
326    <B>OK TO <?= $action ?> "<?= $fn ; ?>"? </B></SPAN>
327  <INPUT TYPE="CHECKBOX" NAME="CONFIRM">  <INPUT TYPE="CHECKBOX" NAME="CONFIRM">
328  <INPUT TYPE="SUBMIT" NAME="POSTACTION" VALUE="DELETE">  <INPUT TYPE="SUBMIT" NAME="POSTACTION" VALUE="<?= $action ?>">
329    
330    <HR>
331    <a name="rename">
332    <SPAN TITLE="Check OK and click [RENAME] to rename.">
333    <B>OK TO RENAME "<?= $fn ; ?>" TO
334    <INPUT TYPE="TEXT" SIZE=24 MAXLENGTH=255 NAME="NEWNAME" VALUE="<?= $fn ?>">
335    ? </B></SPAN>
336    <INPUT TYPE="CHECKBOX" NAME="CONFIRM">
337    <INPUT TYPE="SUBMIT" NAME="POSTACTION" VALUE="RENAME">
338    
339  <?php  <?php
340            }       // exists && writable
341    ?>
342    <HR>
343    <a name="note">
344    <B>NOTE FOR "<?= $fn ; ?>":
345    <INPUT TYPE="TEXT" SIZE=50 MAXLENGTH=255 NAME="NOTE" VALUE="<?= ReadNote($fsPath) ?>">
346    </B></SPAN>
347    <INPUT TYPE="SUBMIT" NAME="POSTACTION" VALUE="NOTE">
348    
349    </FORM>
350    
351    <?php
352            
353    
354            $logname=dirname("$fsDir/$fn")."/.log/".basename("$fsDir/$fn");
355            if (file_exists($logname)) {
356                    print "<hr><br><b>CHANGES TO THIS FILE</b><br><table border=0 width=100%>\n";
357                    $log=fopen($logname,"r");
358                    $cl1=" class=lst"; $cl2="";
359                    while($line = fgetcsv($log,255,"\t")) {
360                            $cl=$cl1; $cl1=$cl2; $cl2=$cl;
361                            print "<tr><td$cl>$line[0]</td><td$cl>$line[1]</td><td$cl>$line[2]</td><td$cl>$line[3]</td></tr>\n";
362                    }
363                    fclose($log);
364                    print "</table>";
365          }          }
366          echo "</FORM>" ;  
367          EndHTML() ;          EndHTML() ;
368    
369  } // end function DetailPage  } // end function DetailPage
# Line 472  function GifIcon($txt) { Line 593  function GifIcon($txt) {
593          case "blank" :          case "blank" :
594                  $d = "blank.gif" ;                  $d = "blank.gif" ;
595                  break ;                  break ;
596            case "checkout":
597                    $d = "down.gif";
598                    break;
599            case "checkin":
600                    $d = "up.gif";
601                    break;
602            case "note":
603                    $d = "quill.gif";
604                    break;
605          default :          default :
606                  $d = "generic.gif" ;                  $d = "generic.gif" ;
607          }          }
# Line 486  function Navigate($fsRoot,$relDir) { Line 616  function Navigate($fsRoot,$relDir) {
616          global $gblEditable, $gblIcon ;          global $gblEditable, $gblIcon ;
617    
618          $self     = $GLOBALS["PHP_SELF"] ;          $self     = $GLOBALS["PHP_SELF"] ;
619          $webRoot  = "http://" . $GLOBALS["SERVER_NAME"] ;          if (isset($GLOBALS["HTTPS"]) && $GLOBALS["HTTPS"] == "on") {
620                    $webRoot  = "https://" . $GLOBALS["SERVER_NAME"] ;
621            } else {
622                    $webRoot  = "http://" . $GLOBALS["SERVER_NAME"] ;
623            }
624          $fsDir    = $fsRoot . $relDir . "/" ; // current directory          $fsDir    = $fsRoot . $relDir . "/" ; // current directory
625    
626          if (!is_dir($fsDir)) Error("Dir not found",$relDir) ;          if (!is_dir($fsDir)) Error("Dir not found",$relDir) ;
# Line 495  function Navigate($fsRoot,$relDir) { Line 629  function Navigate($fsRoot,$relDir) {
629          if ( !($dir = @opendir($fsDir)) )          if ( !($dir = @opendir($fsDir)) )
630                  Error("Read Access denied",$relDir) ;                  Error("Read Access denied",$relDir) ;
631          while ($item = readdir($dir)) {          while ($item = readdir($dir)) {
632                  if ( $item == ".." || $item == "." ) continue ;                  if ( $item == ".." || $item == "." || substr($item,0,1) == "." ) continue ;
633                  if ( is_dir($fsDir . $item) ) {                  if ( is_dir($fsDir . $item) ) {
634                          $dirList[] = $item ;                          $dirList[] = $item ;
635                  }                  } else if ( is_file($fsDir . $item) ) {
                 else if ( is_file($fsDir . $item) ) {  
636                          $fileList[] = $item ;                                    $fileList[] = $item ;          
637                  }                  } else if ( is_link($fsDir . $item) ) {
638                  else {                          $dirList[] = $item ;
639                    } else {
640                    // unknown file type                    // unknown file type
641                    // $text = "Could not determine file type of " ;                    // $text = "Could not determine file type of " ;
642                    // Error("File Error", $text.$relDir."/".$item) ;                    // Error("File Error", $text.$relDir."/".$item) ;
# Line 510  function Navigate($fsRoot,$relDir) { Line 644  function Navigate($fsRoot,$relDir) {
644                  }                  }
645          }          }
646          closedir($dir) ;          closedir($dir) ;
647    
648            // scan deleted files
649            if ( $GLOBALS[show_deleted] == 1 && ($dir = @opendir("$fsDir/.del")) ) {
650                    while ($item = readdir($dir)) {
651                            if ( substr($item,0,1) == "." ) continue ;
652                            $fileList[] = ".del/$item" ;            
653                    }
654                    closedir($dir) ;
655            }
656    
657          $emptyDir = ! (sizeof($dirList) || sizeof($fileList)) ;          $emptyDir = ! (sizeof($dirList) || sizeof($fileList)) ;
658    
659          // start navigation page          // start navigation page
660          $text  = "Use this page to add, delete or " ;          $text  = "Use this page to add, delete";
661          $text .= "revise files on this web site." ;          if (! isset($show_deleted)) {
662                    $text .= ", <a href=".$GLOBALS[PHP_SELF]."?D=".urlencode($relDir)."&show_deleted=1>undelete</a>";
663            }
664            $text .= " or revise files on this web site." ;
665          StartHTML("(Navigate)",$text) ;          StartHTML("(Navigate)",$text) ;
666    
667          echo "<TABLE BORDER=0 CELLPADDING=2          echo "<TABLE BORDER=0 CELLPADDING=2
# Line 527  function Navigate($fsRoot,$relDir) { Line 673  function Navigate($fsRoot,$relDir) {
673                  if ($parent == "") $parent = "/" ;                  if ($parent == "") $parent = "/" ;
674  ?>  ?>
675    
676  <TR><TD><?php echo $gblIcon("up") ?></TD><TD COLSPAN=4 CLASS=LST>  <TR><TD><?= $gblIcon("up") ?></TD><TD COLSPAN=5 CLASS=LST>
677  <A HREF="<?php echo $self ?>?D=<?php echo urlencode($parent) ?>">  <A HREF="<?= $self ?>?D=<?= urlencode($parent) ?>">
678  <B><?php echo $parent ?></B></A></TD></TR>  <B><?= $parent ?></B></A></TD></TR>
679    
680  <?php  <?php
681          }          }
# Line 539  function Navigate($fsRoot,$relDir) { Line 685  function Navigate($fsRoot,$relDir) {
685                  sort($dirList) ;                  sort($dirList) ;
686  ?>  ?>
687    
688  <TR><TD></TD><TD COLSPAN=4 CLASS=TOP><HR>DIRECTORY NAME</TD></TR>  <TR><TD></TD><TD COLSPAN=5 CLASS=TOP><HR>DIRECTORY NAME</TD></TR>
689    
690  <?php  <?php
691                  while (list($key,$dir) = each($dirList)) {                  while (list($key,$dir) = each($dirList)) {
# Line 549  function Navigate($fsRoot,$relDir) { Line 695  function Navigate($fsRoot,$relDir) {
695                          $tstr .= "\">" . $dir . "/</A>" ;                          $tstr .= "\">" . $dir . "/</A>" ;
696  ?>  ?>
697    
698  <TR><TD><?php echo $gblIcon("fldr") ?></TD>  <TR><TD><?= $gblIcon("fldr") ?></TD>
699  <TD COLSPAN=4 CLASS=LST><?php echo $tstr ?></TD></TR>  <TD COLSPAN=5 CLASS=LST><?= $tstr ?></TD></TR>
700    
701  <?php  <?php
702                  }  // iterate over dirs                  }  // iterate over dirs
703          }  // end if no dirs          }  // end if no dirs
704  ?>  ?>
705    
706  <TR><TD></TD><TD COLSPAN=4><HR><B><?php echo $webRoot . $relDir ?>  <TR><TD></TD><TD COLSPAN=5><HR><B><?= $webRoot . $relDir ?>
707  </B></TD></TR>  </B></TD></TR>
708  <TR><TD></TD><TD CLASS=TOP>DOCUMENT NAME</TD>  <TR><TD></TD><TD CLASS=TOP>DOCUMENT NAME</TD>
709  <TD><?php echo $gblIcon("blank") ?></TD>  <TD><?= $gblIcon("blank") ?></TD>
710    <TD CLASS=TOP>NOTE</TD>
711  <TD CLASS=TOP>LAST UPDATE</TD><TD CLASS=TOP>FILE SIZE</TD></TR>  <TD CLASS=TOP>LAST UPDATE</TD><TD CLASS=TOP>FILE SIZE</TD></TR>
712    
713  <?php  <?php
714          if (sizeof($fileList) > 0) {          if (sizeof($fileList) > 0) {
715            sort($fileList) ;            sort($fileList) ;
716            while (list($key,$file) = each($fileList)) {              while (list($key,$file) = each($fileList)) {  
717              $path = $fsDir."/".$file ;                  $path = $fsDir."/".$file ;
718              $mod  = filemtime($path) ;                  $mod  = filemtime($path) ;
719              $sz   = filesize($path) ;                  $sz   = filesize($path) ;
720    
721              if ($sz >= 10240) {                  if ($sz >= 10240) {
722                $sz = (int)(($sz+1023)/1024) . " k" ;                          $sz = (int)(($sz+1023)/1024) . " k" ;
723              }                  } else {
724              else {                          $sz .= " " ;
725                $sz .= " " ;                  } // end size
726              } // end size  
727                    $a = $b = "" ;
728              $a = $b = "" ;  
729                    $info_url=$self."?A=E&F=".urlencode($file)."&D=".urlencode($relDir);
730              if ( ($mod + 30*86400) > time() ) {  
731                $a  = "<SPAN CLASS=RED TITLE=\"Newer" ;                  if ( ($mod + 30*86400) > time() ) {
732                $a .= " than 30 days\"> * </SPAN>" ;                          $a  = "<SPAN CLASS=RED TITLE=\"Newer" ;
733              }                          $a .= " than 30 days\"> * </SPAN>" ;
734                    }
735              $tstr = $webRoot . $relDir . "/" . $file ;  
736              $tstr  = "<A HREF=\"" . $tstr . "\">" ;                  $tstr = $webRoot . $relDir . "/" . $file ;
737              $tstr .= $file . "</A>" . $a ;                  $tstr  = "<A HREF=\"" . $tstr . "\">" ;
738    
739              $ext = strtolower(strrchr($file,".")) ;                  if (substr($file,0,5) != ".del/") {
740              if ( $ext=="" ||                          $tstr .= $file . "</A>" . $a ;
741                   strstr(join(" ",$gblEditable),$ext) )                  } else {
742              {                            $tstr .= substr($file,5,strlen($file)-5) . "</a> <SPAN CLASS=RED TITLE=\"deleted\"> <a href=\"$info_url#undelete\">deleted</a> </span>";
743                $b  = "<A HREF=\"" . $self . "?A=C&F=" ;                  }
744                $b .= urlencode($file) . "&D=" . urlencode($relDir) ;  
745                $b .= "\" TITLE=\"List contents\">" ;  //              $b = $gblIcon("checkout");
746                $b .= $gblIcon("view") . "</A>" ;  //              $b .= $gblIcon("checkin");
747              }  
748                    $ext = strtolower(strrchr($file,".")) ;
749                    if ( $ext=="" || strstr(join(" ",$gblEditable),$ext) ) {  
750                            $b .= "<A HREF=\"" . $self . "?A=C&F=" ;
751                            $b .= urlencode($file) . "&D=" . urlencode($relDir) ;
752                            $b .= "\" TITLE=\"List contents\">" ;
753                            $b .= $gblIcon("view") . "</A>" ;
754                    } else {
755                            $b .= $gblIcon("blank");
756                    }
757    
758    
759  ?>  ?>
760    
761  <TR><TD>  <TR><TD>
762  <A HREF="<?php echo $self ?>?A=E&F=<?php echo urlencode($file)  <A HREF="<?= $info_url ?>" TITLE="View/Edit">
763  ?>&D=<?php echo urlencode($relDir) ?>" TITLE="View/Edit">  <?= $gblIcon($ext) ?></A></TD>
764  <?php echo $gblIcon($ext) ?></A></TD>  <TD CLASS=LST><?= $tstr ?></TD>
765  <TD CLASS=LST><?php echo $tstr ?></TD>  <TD CLASS=LST ALIGN=center><?= $b ?></TD>
766  <TD CLASS=LST ALIGN=center><?php echo $b ?></TD>  <TD CLASS=LST ALIGN=left><a href="<?= $info_url ?>#note"><?= $gblIcon("note") ?></a><?= ReadNote($path) ?></TD>
767  <TD CLASS=LST><?php echo date("d/M/y G:i:s",$mod) ?></TD>  <TD CLASS=LST><?= date("$GLOBALS[gblDateFmt] $GLOBALS[gblTimeFmt]",$mod) ?></TD>
768  <TD CLASS=LST><?php echo $sz ?>Bytes</TD></TR>  <TD CLASS=LST><?= $sz ?>Bytes</TD></TR>
769    
770  <?php  <?php
771            }  // iterate over files            }  // iterate over files
# Line 617  function Navigate($fsRoot,$relDir) { Line 774  function Navigate($fsRoot,$relDir) {
774          if ($emptyDir) {          if ($emptyDir) {
775  ?>  ?>
776    
777  <FORM METHOD="POST" ACTION="<?php echo $self ?>">  <FORM METHOD="POST" ACTION="<?= $self ?>">
778   <TR><TD></TD><TD COLSPAN=4 CLASS=BAR>   <TR><TD></TD><TD COLSPAN=5 CLASS=BAR>
779    <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?php echo $relDir ?>">    <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?= $relDir ?>">
780    OK TO DELETE THIS EMPTY FOLDER?    OK TO DELETE THIS EMPTY FOLDER?
781    <INPUT TYPE="CHECKBOX" NAME="CONFIRM">    <INPUT TYPE="CHECKBOX" NAME="CONFIRM">
782    <INPUT TYPE="SUBMIT" NAME="POSTACTION" VALUE="DELETE">    <INPUT TYPE="SUBMIT" NAME="POSTACTION" VALUE="DELETE">
# Line 630  function Navigate($fsRoot,$relDir) { Line 787  function Navigate($fsRoot,$relDir) {
787          } // end if emptyDir          } // end if emptyDir
788  ?>  ?>
789    
790  <TR><TD></TD><TD COLSPAN=4><HR></TD></TR>  <TR><TD></TD><TD COLSPAN=5><HR></TD></TR>
791    
792  <FORM METHOD="POST" ACTION="<?php echo $self ?>">  <FORM METHOD="POST" ACTION="<?= $self ?>">
793  <TR><TD></TD><TD COLSPAN=4 CLASS=BAR>CREATE NEW  <TR><TD></TD><TD COLSPAN=5 CLASS=BAR>CREATE NEW
794   <INPUT TYPE="RADIO" NAME="T" VALUE="D" CHECKED>DIRECTORY -OR-   <INPUT TYPE="RADIO" NAME="T" VALUE="D" CHECKED>DIRECTORY -OR-
795   <INPUT TYPE="RADIO" NAME="T" VALUE="F">FILE : &nbsp;&nbsp;   <INPUT TYPE="RADIO" NAME="T" VALUE="F">FILE : &nbsp;&nbsp;
796   <NOBR>NAME <INPUT TYPE="TEXT" NAME="FN" SIZE=14>   <NOBR>NAME <INPUT TYPE="TEXT" NAME="FN" SIZE=14>
797   <INPUT TYPE="HIDDEN" NAME="POSTACTION" VALUE="CREATE">   <INPUT TYPE="HIDDEN" NAME="POSTACTION" VALUE="CREATE">
798   <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?php echo $relDir ?>">   <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?= $relDir ?>">
799   <INPUT TYPE="SUBMIT" VALUE="CREATE"></NOBR>   <INPUT TYPE="SUBMIT" VALUE="CREATE"></NOBR>
800   <NOBR>OR <A HREF="<?php echo $self   <NOBR>OR <A HREF="<?= $self
801          ?>?A=U&D=<?php echo urlencode($relDir) ?>">UPLOAD</A> A FILE          ?>?A=U&D=<?= urlencode($relDir) ?>">UPLOAD</A> A FILE
802   </NOBR>   </NOBR>
803  </TD></TR>  </TD></TR>
804  </FORM>  </FORM>
# Line 661  function UploadPage($fsRoot, $relDir) { Line 818  function UploadPage($fsRoot, $relDir) {
818    
819  <P><TABLE BORDER=0 CELLPADDING=5><TR><TD WIDTH=5></TD><TD CLASS=BAR>  <P><TABLE BORDER=0 CELLPADDING=5><TR><TD WIDTH=5></TD><TD CLASS=BAR>
820  <FORM ENCTYPE="multipart/form-data" METHOD="POST"  <FORM ENCTYPE="multipart/form-data" METHOD="POST"
821   ACTION="<?php echo $self ?>">   ACTION="<?= $self ?>">
822  DESTINATION DIRECTORY:<B><?php echo " " . $relDir ?></B>  DESTINATION DIRECTORY:<B><?= " " . $relDir ?></B>
823  <P>PATHNAME OF LOCAL FILE<BR>  <P>PATHNAME OF LOCAL FILE<BR>
824  <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?php echo $relDir ?>">  <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?= $relDir ?>">
825  <INPUT TYPE="HIDDEN" NAME="POSTACTION" VALUE="UPLOAD">  <INPUT TYPE="HIDDEN" NAME="POSTACTION" VALUE="UPLOAD">
826  <INPUT SIZE=30 TYPE="FILE" NAME="FN"></P>  <INPUT SIZE=30 TYPE="FILE" NAME="FN"></P>
827  <P><INPUT TYPE="SUBMIT" VALUE="UPLOAD"></P>  <P><INPUT TYPE="SUBMIT" VALUE="UPLOAD"></P>
828  <P>If the <B>[BROWSE...]</B> button is not displayed,<BR>  <P>If the <B>[BROWSE...]</B> button is not displayed,<BR>
829  you must upgrade to an RFC1867-compliant browser.</P>  you must upgrade to an RFC1867-compliant browser.</P>
830  <P>Your browser:<BR><?php echo $GLOBALS["HTTP_USER_AGENT"] ?></P>  <P>Your browser:<BR><?= $GLOBALS["HTTP_USER_AGENT"] ?></P>
831  </FORM>  </FORM>
832  </TD></TR>  </TD></TR>
833  <TR><TD></TD><TD>  <TR><TD></TD><TD>
834  <FORM METHOD="POST" ACTION="<?php echo $self ?>">  <FORM METHOD="POST" ACTION="<?= $self ?>">
835  <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?php echo $relDir ?>"><BR>  <INPUT TYPE="HIDDEN" NAME="DIR" VALUE="<?= $relDir ?>"><BR>
836  <INPUT TYPE="SUBMIT" NAME="POSTACTION" VALUE="CANCEL">  <INPUT TYPE="SUBMIT" NAME="POSTACTION" VALUE="CANCEL">
837  </FORM>  </FORM>
838  </TD></TR></TABLE></P>  </TD></TR></TABLE></P>
# Line 694  function Error($title,$text="") { Line 851  function Error($title,$text="") {
851    
852  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
853    
 function Writeable($path) {  
         // fix by -mat- filid brandy, brandy@ecrc.de, 07/JUL/99  
   
         clearstatcache ;  
         $perms = @fileperms($path) ;  
         $owner = @fileowner($path) ;  
         exec("id",$id) ;  
         eregi( "^uid=([0-9]*)",$id[0], $regs) ;  
         $apacheuid = $regs[1] ;  
         $perms = 0777 & $perms ;  
         if ( $apacheuid != $owner ) {  
                 return (06 == (06 & $perms)) ?  1 : 0 ;  
         }  
         else {  
                 return (0600 == (0600 & $perms)) ? 1 : 0 ;  
         }  
   
 } // end function Writable  
   
 //////////////////////////////////////////////////////////////////  
   
854  function CreateHash($user, $pw) {  function CreateHash($user, $pw) {
855    
856          global $gblHash ;  // hash function to use          global $gblHash ;  // hash function to use
# Line 749  function NoEntry() { Line 885  function NoEntry() {
885          StartHTML($title,$text) ;          StartHTML($title,$text) ;
886  ?>  ?>
887    
888  <FORM ACTION="<?php echo $self ?>?HASH=create" METHOD="POST">  <FORM ACTION="<?= $self ?>?HASH=create" METHOD="POST">
889  <INPUT TYPE="HIDDEN" NAME="USER" VALUE="<?php echo $user ?>">  <INPUT TYPE="HIDDEN" NAME="USER" VALUE="<?= $user ?>">
890  <INPUT TYPE="HIDDEN" NAME="PW" VALUE="<?php echo $pw ?>">  <INPUT TYPE="HIDDEN" NAME="PW" VALUE="<?= $pw ?>">
891    
892  <BLOCKQUOTE><B>If you are a site administrator:</B><BR><BR>  <BLOCKQUOTE><B>If you are a site administrator:</B><BR><BR>
893  Click below to <B>generate a password hash</B><BR>from  Click below to <B>generate a password hash</B><BR>from
# Line 767  the source<BR>of this file.<BR><BR> Line 903  the source<BR>of this file.<BR><BR>
903    
904  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
905    
906    function Logit($target,$msg) {
907    
908            $dir=dirname($target);
909            if (! file_exists($dir."/.log")) {
910                    mkdir($dir."/.log",0700);
911            }
912            $file=basename($target);
913    
914            $log=fopen("$dir/.log/$file","a+");
915            fputs($log,date("$GLOBALS[gblDateFmt]\t$GLOBALS[gblTimeFmt]").
916                    "\t$GLOBALS[gblUserName]\t$msg\n");
917            fclose($log);
918    
919    }
920    
921    
922    //////////////////////////////////////////////////////////////////
923    
924    function WriteNote($target,$msg) {
925    
926            $dir=dirname($target);
927            if (! file_exists($dir."/.note")) {
928                    mkdir($dir."/.note",0700);
929            }
930            $file=basename($target);
931    
932            $note=fopen("$dir/.note/$file","w");
933            fputs($note,"$msg\n");
934            fclose($note);
935    
936            Logit($target,"added note $msg");
937    
938    }
939    
940    function ReadNote($target) {
941    
942            $dir=dirname($target);
943            $file=basename($target);
944            $msg="";
945            if (file_exists($dir."/.note/$file")) {
946                    $note=fopen("$dir/.note/$file","r");
947                    $msg=fgets($note,4096);
948                    fclose($note);
949            }
950            return $msg;
951    
952    }
953    
954    //////////////////////////////////////////////////////////////////
955    
956    function MoveTo($source,$folder) {
957    
958            $file=basename($source);
959            if (! file_exists($folder)) {
960                    mkdir($folder,0700);
961            }
962            if (file_exists($source)) {
963                    rename($source,"$folder/$file");
964            }
965    }
966    
967    //////////////////////////////////////////////////////////////////
968    
969  // MAIN PROGRAM  // MAIN PROGRAM
970  // ============  // ============
971  // query parameters: capital letters  // query parameters: capital letters
972  // local functions : begin with capital letters  // local functions : begin with capital letters
973  // global constants: begin with gbl  // global constants: begin with gbl
974    
975          $gblFilePerms = "644" ;         // default for new files          $gblFilePerms = 0640 ;         // default for new files
976          $gblDirPerms  = 0755 ;          // default for new dirs          $gblDirPerms  = 0750 ;          // default for new dirs
977    
978          // phpinfo() ;          // phpinfo() ;
979          // exit ;          // exit ;
# Line 788  the source<BR>of this file.<BR><BR> Line 987  the source<BR>of this file.<BR><BR>
987          }          }
988    
989          // authentication if $gblAuth == true          // authentication if $gblAuth == true
990          if ( $gblAuth &&          if ( $gblAuth && $gblHash($PHP_AUTH_USER.$PHP_AUTH_PW) != $gblPw ||
991               $gblHash($PHP_AUTH_USER.$PHP_AUTH_PW) != $gblPw ) {                  isset($relogin) && $gblPw == $relogin ) {
992                  header("WWW-authenticate: basic realm=\"$SERVER_NAME\"") ;                  header("WWW-authenticate: basic realm=\"$SERVER_NAME\"") ;
993                  header("HTTP/1.0 401 Unauthorized") ;                  header("HTTP/1.0 401 Unauthorized") ;
994                  NoEntry() ;                  NoEntry() ;
# Line 827  the source<BR>of this file.<BR><BR> Line 1026  the source<BR>of this file.<BR><BR>
1026                    
1027          switch ($POSTACTION) {          switch ($POSTACTION) {
1028          case "UPLOAD" :          case "UPLOAD" :
1029                  if (!Writeable($fsDir)) Error("Write denied",$relDir) ;                  if (!is_writeable($fsDir)) Error("Write denied",$relDir) ;
1030                  if (strstr($FN_name,"/"))                  if (strstr($FN_name,"/"))
1031                          Error("Non-conforming filename") ;                          Error("Non-conforming filename") ;
1032                  // TODO : should rather check for escapeshellcmds                  // TODO : should rather check for escapeshellcmds
1033                  // but maybe RFC 18xx asserts safe filenames ....                  // but maybe RFC 18xx asserts safe filenames ....
1034                  $source = $FN ;                  $source = $FN ;
1035                  $target = $fsDir . "/" . $FN_name ;                  $target = $fsDir . "/" . $FN_name ;
1036                  exec("cp $source $target") ;  
1037                  exec("chmod $gblFilePerms $target") ;                  // backup old files first
1038                    $dir=dirname($target);
1039                    if (! file_exists($dir."/.bak")) {
1040                            mkdir($dir."/.bak",0700);
1041                    }
1042                    if (! file_exists($dir."/.bak/$GLOBALS[gblNumBackups]")) {
1043                            mkdir($dir."/.bak/$GLOBALS[gblNumBackups]",0700);
1044                    }
1045                    $file=basename($target);
1046                    for($i=$GLOBALS[gblNumBackups]-1;$i>0;$i--) {
1047                            MoveTo("$dir/.bak/$i/$file","$dir/.bak/".($i+1)."/");
1048                    }
1049                    MoveTo($target,$dir."/.bak/1/".$file);
1050    
1051                    copy($source,$target) ;
1052                    chmod($target,$gblFilePerms) ;
1053                  clearstatcache() ;                  clearstatcache() ;
1054                    Logit($target,"uploaded");
1055                  break ;                  break ;
1056    
1057          case "SAVE" :          case "SAVE" :
1058                  $path = $gblFsRoot . escapeshellcmd($RELPATH) ;                  $path = $gblFsRoot . escapeshellcmd($RELPATH) ;
1059                  $writable = Writeable($path) ;                  $writable = is_writeable($path) ;
1060                  $legaldir = Writeable(dirname($path)) ;                  $legaldir = is_writeable(dirname($path)) ;
1061                  $exists   = (file_exists($path)) ? 1 : 0 ;                  $exists   = (file_exists($path)) ? 1 : 0 ;
1062  // check for legal extension here as well  // check for legal extension here as well
1063                  if (!($writable || (!$exists && $legaldir)))                  if (!($writable || (!$exists && $legaldir)))
# Line 851  the source<BR>of this file.<BR><BR> Line 1066  the source<BR>of this file.<BR><BR>
1066                  fwrite($fh,$FILEDATA) ;                  fwrite($fh,$FILEDATA) ;
1067                  fclose($fh) ;                  fclose($fh) ;
1068                  clearstatcache() ;                  clearstatcache() ;
1069                    Logit($path,"saved changes");
1070                  break ;                  break ;
1071    
1072          case "CREATE" :          case "CREATE" :
1073                  // we know $fsDir exists                  // we know $fsDir exists
1074                  if (!Writeable($fsDir)) Error("Write denied",$relDir) ;                  if ($FN == "") break;           // no filename!
1075                    if (!is_writeable($fsDir)) Error("Write denied",$relDir) ;
1076                  $path = $fsDir . "/" . $FN ;  // file or dir to create                  $path = $fsDir . "/" . $FN ;  // file or dir to create
1077                  $relPath = $relDir . "/" . $FN ;                  $relPath = $relDir . "/" . $FN ;
1078                  switch ( $T ) {                  switch ( $T ) {
# Line 868  the source<BR>of this file.<BR><BR> Line 1085  the source<BR>of this file.<BR><BR>
1085  // this functionality is doubled in DetailView().  // this functionality is doubled in DetailView().
1086  // better keep it here altogether  // better keep it here altogether
1087  // chmod perms to $gblFilePerms  // chmod perms to $gblFilePerms
1088                    if ( file_exists($path) && !Writable($path) )                    if ( file_exists($path) && !is_writable($path) )
1089                      Error("File not writable", $relPath) ;                      Error("File not writable", $relPath) ;
1090                    $tstr = $PHP_SELF . "?A=E&D=" . $relDir . "&F=" . $FN ;                    $tstr = $PHP_SELF . "?A=E&D=" . $relDir . "&F=" . $FN ;
1091                    header("Location: " . $tstr) ;                    header("Location: " . $tstr) ;
# Line 883  the source<BR>of this file.<BR><BR> Line 1100  the source<BR>of this file.<BR><BR>
1100                  $tstr .= "insufficient privileges: " ;                  $tstr .= "insufficient privileges: " ;
1101    
1102                  if ( $FN != "") {  // delete file                  if ( $FN != "") {  // delete file
1103                    $path =  $fsDir . "/" . $FN ;                          $path =  $fsDir . "/" . $FN ;
1104                    if ( ! @unlink($path) ) {                  
1105                      Error("File delete failed", $tstr . $path) ;                          $dir=dirname($path);
1106                      exit ;                          $file=basename($path);
1107                    }                                              if (! file_exists("$dir/.del")) {
1108                                    mkdir("$dir/.del",0700);
1109                            }
1110    
1111    //                      if ( ! @unlink($path) ) {
1112                            if ( ! rename($path,"$dir/.del/$file") ) {
1113                                    Error("File delete failed", $tstr . $path) ;
1114                                    Logit($path,"file delete failed");
1115                                    exit ;
1116                            } else {
1117                                    Logit($path,"file deleted");
1118                                    if (! file_exists("$dir/.del/.log")) {
1119                                            mkdir("$dir/.del/.log",0700);
1120                                    }
1121                                    MoveTo("$dir/.log/$file","$dir/.del/.log/");
1122                                    MoveTo("$dir/.note/$file","$dir/.del/.note/");
1123                            }
1124                  }                  }
1125                  else {  // delete directory                  else {  // delete directory
1126                    if ( ! @rmdir($fsDir) ) {                    if ( ! @rmdir($fsDir) ) {
# Line 899  the source<BR>of this file.<BR><BR> Line 1132  the source<BR>of this file.<BR><BR>
1132                  }                  }
1133                  break ;                  break ;
1134    
1135            case "UNDELETE" :  
1136                    if ( $CONFIRM != "on" ) break ;
1137    
1138                    if (substr($FN,0,4) != ".del") break ;
1139                    $file=substr($FN,4,strlen($FN)-4);
1140    
1141                    Logit("$fsDir/.del/$file","undeleted");
1142                    MoveTo("$fsDir/.del/$file","$fsDir/");
1143                    MoveTo("$fsDir/.del/.log/$file","$fsDir/.log/");
1144                    MoveTo("$fsDir/.del/.note/$file","$fsDir/.note/");
1145    
1146                    break ;
1147    
1148            case "RENAME" :  
1149                    if ( $CONFIRM != "on" ) break ;
1150    
1151                    Logit("$fsDir/$FN","renamed $FN to $NEWNAME");
1152                    rename("$fsDir/$FN","$fsDir/$NEWNAME");
1153                    rename("$fsDir/.log/$FN","$fsDir/.log/$NEWNAME");
1154    
1155                    break ;
1156    
1157            case "NOTE" :  
1158                    WriteNote("$fsDir/$FN","$NOTE");
1159                    break ;
1160    
1161          default :          default :
1162                  // user hit "CANCEL" or undefined action                  // user hit "CANCEL" or undefined action
1163          }          }
# Line 919  the source<BR>of this file.<BR><BR> Line 1178  the source<BR>of this file.<BR><BR>
1178          switch ($A) {          switch ($A) {
1179          case "U" :          case "U" :
1180                  // upload to $relDir                  // upload to $relDir
1181                  if (!Writeable($gblFsRoot . $relDir))                  if (!is_writeable($gblFsRoot . $relDir))
1182                          Error("Write access denied",$relDir) ;                          Error("Write access denied",$relDir) ;
1183                  $text  = "Use this page to upload a single " ;                  $text  = "Use this page to upload a single " ;
1184                  $text .= "file to <B>$SERVER_NAME</B>." ;                  $text .= "file to <B>$SERVER_NAME</B>." ;
# Line 929  the source<BR>of this file.<BR><BR> Line 1188  the source<BR>of this file.<BR><BR>
1188                  exit ;                  exit ;
1189          case "E" :          case "E" :
1190                  // detail of $relDir/$F                  // detail of $relDir/$F
1191                  DetailPage($gblFsRoot, $relDir, $F) ;                  if (is_file("$gblFsRoot/$relDir/$F")) DetailPage($gblFsRoot, $relDir, $F) ;
1192                  exit ;                  exit ;
1193          case "C" :          case "C" :
1194                  // listing of $relDir/$F                  // listing of $relDir/$F

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.26