/[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.18 by dpavlin, Thu Sep 7 10:17:35 2000 UTC revision 1.21 by dpavlin, Wed Sep 13 08:27:43 2000 UTC
# Line 976  the source<BR>of this file.<BR><BR> Line 976  the source<BR>of this file.<BR><BR>
976    
977  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
978    
979  function Logit($target,$msg) {  function LogIt($target,$msg) {
980    
981            $target=stripSlashes($target);
982          $dir=dirname($target);          $dir=dirname($target);
983          if (! file_exists($dir."/.log")) {          if (! file_exists($dir."/.log")) {
984                  mkdir($dir."/.log",0700);                  mkdir($dir."/.log",0700);
# Line 996  function Logit($target,$msg) { Line 997  function Logit($target,$msg) {
997    
998  function WriteNote($target,$msg) {  function WriteNote($target,$msg) {
999    
1000            $target=stripSlashes($target);
1001          $dir=dirname($target);          $dir=dirname($target);
1002          if (! file_exists($dir."/.note")) {          if (! file_exists($dir."/.note")) {
1003                  mkdir($dir."/.note",0700);                  mkdir($dir."/.note",0700);
# Line 1012  function WriteNote($target,$msg) { Line 1014  function WriteNote($target,$msg) {
1014    
1015  function ReadNote($target) {  function ReadNote($target) {
1016    
1017            $target=stripSlashes($target);
1018          $dir=dirname($target);          $dir=dirname($target);
1019          $file=basename($target);          $file=basename($target);
1020          $msg="";          $msg="";
# Line 1028  function ReadNote($target) { Line 1031  function ReadNote($target) {
1031    
1032  function MoveTo($source,$folder) {  function MoveTo($source,$folder) {
1033    
1034            $source=stripSlashes($source);
1035          $file=basename($source);          $file=basename($source);
1036          if (! file_exists($folder)) {          if (! file_exists($folder)) {
1037                  mkdir($folder,0700);                  mkdir($folder,0700);
# Line 1041  function MoveTo($source,$folder) { Line 1045  function MoveTo($source,$folder) {
1045    
1046  function Lock($target) {  function Lock($target) {
1047    
1048            $target=stripSlashes($target);
1049          $dir=dirname($target);          $dir=dirname($target);
1050          if (! file_exists($dir."/.lock")) {          if (! file_exists($dir."/.lock")) {
1051                  mkdir($dir."/.lock",0700);                  mkdir($dir."/.lock",0700);
# Line 1061  function Lock($target) { Line 1066  function Lock($target) {
1066    
1067  function CheckLock($target) {  function CheckLock($target) {
1068    
1069            $target=stripSlashes($target);
1070          $dir=dirname($target);          $dir=dirname($target);
1071          $file=basename($target);          $file=basename($target);
1072          $msg=0;          $msg=0;
# Line 1075  function CheckLock($target) { Line 1081  function CheckLock($target) {
1081    
1082  function Unlock($target) {  function Unlock($target) {
1083    
1084            $target=stripSlashes($target);
1085          $dir=dirname($target);          $dir=dirname($target);
1086          $file=basename($target);          $file=basename($target);
1087          if (file_exists($dir."/.lock/$file")) {          if (file_exists($dir."/.lock/$file")) {
# Line 1137  function ChangeLog($target,$msg) { Line 1144  function ChangeLog($target,$msg) {
1144  function DisplayChangeLog($day) {  function DisplayChangeLog($day) {
1145    
1146          global $gblFsRoot;          global $gblFsRoot;
1147            if (!file_exists("$gblFsRoot/.changelog")) return;
1148          $log=fopen("$gblFsRoot/.changelog","r");          $log=fopen("$gblFsRoot/.changelog","r");
1149          $logarr = array();          $logarr = array();
1150          while($line = fgetcsv($log,255,"\t")) {          while($line = fgetcsv($log,255,"\t")) {
1151                  if ($day!=1 || $day==1 && $line[0]-time() < 24*60) {                  if ($day!=1 || ($day==1 && (time()-$line[0] < 24*60))) {
1152                          array_unshift($logarr,array($line[0],$line[1],$line[2],$line[3]));                          array_unshift($logarr,array($line[0],$line[1],$line[2],$line[3]));
1153                  }                  }
1154          }          }
# Line 1156  function DisplayChangeLog($day) { Line 1164  function DisplayChangeLog($day) {
1164                  print "<tr><td$cl>$date</td><td$cl>$time</td><td$cl><a href=\"$GLOBALS[PHP_SELF]?D=".urlencode($dir)."\">$dir</a>/$file</td><td$cl>$e[2]</td><td$cl>$e[3]</td></tr>\n";                  print "<tr><td$cl>$date</td><td$cl>$time</td><td$cl><a href=\"$GLOBALS[PHP_SELF]?D=".urlencode($dir)."\">$dir</a>/$file</td><td$cl>$e[2]</td><td$cl>$e[3]</td></tr>\n";
1165          }          }
1166          print "</table>";          print "</table>";
1167            print "<p>".GifIcon(up)." Back to <a href=$GLOBALS[PHP_SELF]>front page</a>.</p>";
1168  }  }
1169    
1170  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
# Line 1398  function DisplayChangeLog($day) { Line 1407  function DisplayChangeLog($day) {
1407          // $A=Ci : checkin file $D/$F          // $A=Ci : checkin file $D/$F
1408          // $A=V : view file (do nothing except log)          // $A=V : view file (do nothing except log)
1409          // default : display directory $D          // default : display directory $D
1410            
1411            $F=stripSlashes($F);
1412    
1413          switch ($A) {          switch ($A) {
1414          case "U" :          case "U" :
1415                  // upload to $relDir                  // upload to $relDir

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.26