/[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.9 by dpavlin, Fri Aug 4 10:43:23 2000 UTC revision 1.10 by dpavlin, Fri Aug 4 11:23:07 2000 UTC
# Line 362  echo($fstr) ; ?></TEXTAREA> Line 362  echo($fstr) ; ?></TEXTAREA>
362    
363  <?php  <?php
364                    
365            $name=basename("$fsDir/$fn");
366          $logname=dirname("$fsDir/$fn")."/.log/".basename("$fsDir/$fn");          $logname=dirname("$fsDir/$fn")."/.log/$name";
367            $bakdir=dirname("$fsDir/$fn")."/.bak";
368          if (file_exists($logname)) {          if (file_exists($logname)) {
                 print "<hr><br><b>CHANGES TO THIS FILE</b><br><table border=0 width=100%>\n";  
369                  $log=fopen($logname,"r");                  $log=fopen($logname,"r");
370                  $cl1=" class=lst"; $cl2="";                  $cl1=" class=lst"; $cl2="";
371                    $logarr = array();
372                  while($line = fgetcsv($log,255,"\t")) {                  while($line = fgetcsv($log,255,"\t")) {
373                          $cl=$cl1; $cl1=$cl2; $cl2=$cl;                          $cl=$cl1; $cl1=$cl2; $cl2=$cl;
374                          print "<tr><td$cl>$line[0]</td><td$cl>$line[1]</td><td$cl>$line[2]</td><td$cl>$line[3]</td></tr>\n";                          array_unshift($logarr,array($cl,$line[0],$line[1],$line[2],$line[3]));
375                  }                  }
376                  fclose($log);                  fclose($log);
377                    print "<hr><br><b>CHANGES TO THIS FILE</b><br><table border=0 width=100%>\n";
378                    $bakcount = 0;  // start from 0, skip fist backup (it's current)
379                    while ($e = array_shift($logarr)) {
380                            if (strstr($e[4],"upload")) {
381                                    if (file_exists("$bakdir/$bakcount/$name")) {
382                                            $e[4]="<a href=\"".dirname($relPath)."/.bak/$bakcount/$name\">$e[4]</a>";
383                                    }
384                                    $bakcount++;
385                            }
386                            print "<tr><td$e[0]>$e[1]</td><td$e[0]>$e[2]</td><td$e[0]>$e[3]</td><td$e[0]>$e[4]</td></tr>\n";
387                    }
388                  print "</table>";                  print "</table>";
389          }          }
390    

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

  ViewVC Help
Powered by ViewVC 1.1.26