/[docman2]/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.32 by dpavlin, Mon Jul 29 14:17:05 2002 UTC revision 1.35 by dpavlin, Wed Apr 9 16:27:06 2003 UTC
# Line 74  Line 74 
74  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
75    
76          $gblTitle = "Document Manager";          $gblTitle = "Document Manager";
77          $gblVersion = "2.0-pre1";          $gblVersion = "2.0-pre2";
78    
79          $secHash    = "";          $secHash    = "";
80    
81          // location of html files          // location of html files
82          $html = $gblIncDir."/html";          $html = $gblIncDir."/html";
83    
84          LoadLanguage($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"]);          if (isset($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"])) {
85                    LoadLanguage($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"]);
86            }
87    
88          // for security and configuration          // for security and configuration
89          $realm=$HTTP_SERVER_VARS["HTTP_HOST"];          $realm=$HTTP_SERVER_VARS["HTTP_HOST"];
# Line 147  function EndHTML() { Line 149  function EndHTML() {
149          }          }
150          include("$html/footer.html");          include("$html/footer.html");
151    
152          global $debug;  #       global $debug;
153          if ($debug) print $debug;  #       if ($debug) print $debug;
154  } // end function EndHTML  } // end function EndHTML
155    
156  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
# Line 707  function Navigate($fsRoot,$relDir) { Line 709  function Navigate($fsRoot,$relDir) {
709                                  $note_html=$dirNote[$key];                                  $note_html=$dirNote[$key];
710                          }                          }
711    
712                            $dir_html = isBlank($dir,"directory");
713    
714                          include("$html/Navigate-dirEntry.html");                          include("$html/Navigate-dirEntry.html");
715    
716                  }  // iterate over dirs                  }  // iterate over dirs
# Line 782  function Navigate($fsRoot,$relDir) { Line 786  function Navigate($fsRoot,$relDir) {
786                  $file_url_html.="\" TITLE=\"View file\">" ;                  $file_url_html.="\" TITLE=\"View file\">" ;
787    
788                  if (substr($file,0,5) != ".del/") {                  if (substr($file,0,5) != ".del/") {
789                          $file_url_html .= $file . "</A>" . $a ;                          $file_url_html .= isBlank($file) . "</A>" . $a ;
790                  } else {                  } else {
791                          $file_url_html .= substr($file,5,strlen($file)-5) . "</a> <a href=\"$info_url#undelete\"><SPAN CLASS=deleted TITLE=\"deleted\">deleted</span></a>";                          $file_url_html .= isBlank(substr($file,5,strlen($file)-5)) . "</a> <a href=\"$info_url#undelete\"><SPAN CLASS=deleted TITLE=\"deleted\">deleted</span></a>";
792                  }                  }
793    
794                  if (check_perm($relDir.$file,$gblPermNote)) {                  if (check_perm($relDir.$file,$gblPermNote)) {
# Line 1277  if (! file_exists($trustee_conf)) { Line 1281  if (! file_exists($trustee_conf)) {
1281                  $l = trim(fgets($fp_conf,4096));                  $l = trim(fgets($fp_conf,4096));
1282                  if (substr($l,0,1) == "+") {    // no comment                  if (substr($l,0,1) == "+") {    // no comment
1283                          $arr=explode(":",$l);                          $arr=explode(":",$l);
1284                          $groups_arr[$arr[0]] = $arr[1] ;                          $groups_arr[$arr[0]] = str_replace(" ","",$arr[1]) ;
1285                  } elseif (substr($l,0,1) != "#") {                  } elseif (substr($l,0,1) != "#") {
1286                          $arr=explode(":",$l);                          $arr=explode(":",$l);
1287                          $path=array_shift($arr);                          $path=array_shift($arr);
# Line 1539  function Warn($text) { Line 1543  function Warn($text) {
1543  }  }
1544    
1545  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
1546    
1547    function isBlank($file,$what = "filename") {
1548            if (trim($file) == "") return "<i>whitespace $what</i>";
1549            if ($file == "") return "<i>no $what</i>";
1550            return $file;
1551    }
1552    
1553    //////////////////////////////////////////////////////////////////
1554  // MAIN PROGRAM  // MAIN PROGRAM
1555    
1556          $gblFilePerms = 0640 ;         // default for new files          $gblFilePerms = 0640 ;         // default for new files
# Line 1701  function Warn($text) { Line 1713  function Warn($text) {
1713    
1714                  $source = $FN_name ;                  $source = $FN_name ;
1715                  if (! file_exists($source)) {                  if (! file_exists($source)) {
1716                          Error("You must select file with browse to upload it!");                          Error("You must select file with browse to upload it!","If file is too big, you might need to modify php configuration options <tt>post_max_size</tt> and <tt>upload_max_filesize</tt>",1);
1717                  }                  }
1718    
1719                  if (HTTP_POST_VAR("FILENAME")) check_filename($FILENAME);                  if (HTTP_POST_VAR("FILENAME")) check_filename($FILENAME);

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.35

  ViewVC Help
Powered by ViewVC 1.1.26