/[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.50 by dpavlin, Sat Dec 15 20:33:37 2001 UTC revision 1.55 by dpavlin, Wed Jan 16 08:26:23 2002 UTC
# Line 133  TODO: Line 133  TODO:
133    
134  //////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////
135    
136          $gblVersion = "1.8-dev";          $gblVersion = "1.8";
137    
138  function StartHTML($title,$text="") {  function StartHTML($title,$text="") {
139    
# Line 184  global $gblDateFmt, $gblTimeFmt, $gblUse Line 184  global $gblDateFmt, $gblTimeFmt, $gblUse
184          }          }
185          if (isset($PHP_AUTH_USER) && $PHP_AUTH_USER != "" && ($PHP_AUTH_PW == "" || !isset($PHP_AUTH_PW))) {          if (isset($PHP_AUTH_USER) && $PHP_AUTH_USER != "" && ($PHP_AUTH_PW == "" || !isset($PHP_AUTH_PW))) {
186                  $url_title="login";                  $url_title="login";
187                    $url .= "&force_login=1";
188          } else {          } else {
189                  $url_title="relogin";                  $url_title="relogin";
190          }          }
         $url.="&AU=${PHP_AUTH_USER}|AP=${PHP_AUTH_PW}|";  
191  ?>  ?>
192  <small> [<a href="<?= $url ?>"><?= $url_title ?></a>]</small>  <small> [<a href="<?= $url ?>"><?= $url_title ?></a>]</small>
193  </B>  </B>
# Line 196  Document Manager <?= $gblVersion ?>, bas Line 196  Document Manager <?= $gblVersion ?>, bas
196  <br>  <br>
197  &copy; 1999 by <A HREF="http://www.anyportal.com">ANYPORTAL</A>,  &copy; 1999 by <A HREF="http://www.anyportal.com">ANYPORTAL</A>,
198  &copy; 2000 by <A HREF="http://da.nger.org">d@nger.org</A>,  &copy; 2000 by <A HREF="http://da.nger.org">d@nger.org</A>,
199  &copy; 2000 by <A HREF="http://www.rot13.org/~dpavlin/">DbP</A>  &copy; 2000-2002 by <A HREF="http://www.rot13.org/~dpavlin/">DbP</A>
200  </small>  </small>
201  </P>  </P>
202  <BR>  <BR>
# Line 1175  function DisplayChangeLog($day) { Line 1175  function DisplayChangeLog($day) {
1175          $log=fopen("$gblFsRoot/.changelog","r");          $log=fopen("$gblFsRoot/.changelog","r");
1176          $logarr = array();          $logarr = array();
1177          while($line = fgetcsv($log,512,"\t")) {          while($line = fgetcsv($log,512,"\t")) {
                 $line[0] .= sizeof($line);  
1178                  while (sizeof($line) > 4) {                  while (sizeof($line) > 4) {
1179                          $tmp = array_pop($line);                          $tmp = array_pop($line);
1180                          $line.=" $tmp";                          $line.=" $tmp";
# Line 1243  function chopsl($path) { Line 1242  function chopsl($path) {
1242    
1243          // forks before authentication: style sheet and hash          // forks before authentication: style sheet and hash
1244          // creation if password not yet set.          // creation if password not yet set.
1245          if ($STYLE == "get") { CSS() ; exit ; }          if (isset($STYLE) && $STYLE == "get") { CSS() ; exit ; }
1246    
1247          $fsScriptDir  = dirname($SCRIPT_FILENAME) ;              $fsScriptDir  = dirname($SCRIPT_FILENAME) ;    
1248          // i.e. /home/httpd/html/docman          // i.e. /home/httpd/html/docman
# Line 1268  function chopsl($path) { Line 1267  function chopsl($path) {
1267                          )                          )
1268                  ) && (                  ) && (
1269                          $PHP_AUTH_PW == "" || !isset($PHP_AUTH_PW)                          $PHP_AUTH_PW == "" || !isset($PHP_AUTH_PW)
1270                  )                  ) && !isset($force_login)
1271             ) {             ) {
1272                  StartHTML("Logout completed","Your login credentials has been erased") ;                  StartHTML("Logout completed","Your login credentials has been erased") ;
1273                  EndHTML() ;                  EndHTML() ;
# Line 1278  function chopsl($path) { Line 1277  function chopsl($path) {
1277          // authentication failure          // authentication failure
1278          if ( md5($PHP_AUTH_USER.$PHP_AUTH_PW) != $gblPw ||          if ( md5($PHP_AUTH_USER.$PHP_AUTH_PW) != $gblPw ||
1279                  isset($relogin) && $gblPw == $relogin) {                  isset($relogin) && $gblPw == $relogin) {
1280                  header("WWW-authenticate: basic realm=\"$HTTP_HOST\"") ;                  $realm="$HTTP_HOST";
1281                    header("WWW-authenticate: basic realm=\"$realm\"") ;
1282                  header("HTTP/1.0 401 Unauthorized") ;                  header("HTTP/1.0 401 Unauthorized") ;
1283                  NoEntry() ;                  NoEntry() ;
1284                  exit ;                  exit ;

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.55

  ViewVC Help
Powered by ViewVC 1.1.26