/[health_html]/inc/util.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 /inc/util.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by ravilov, Wed Oct 10 12:40:58 2001 UTC revision 1.8 by ravilov, Fri Oct 12 09:22:02 2001 UTC
# Line 170  Line 170 
170                  return $password;                  return $password;
171          }          }
172    
173            $isEdit = stristr($ME, "/edit/") ? true : false;
174            $isMed = stristr($ME, "med") || stristr($ME, "pm") ? true : false;
175    
176          function Auth($user = "", $pwd = "") {          function Auth($user = "", $pwd = "") {
177                  global $ME,$HTTP_USER_AGENT,$REMOTE_ADDR;                  global $ME,$HTTP_USER_AGENT,$REMOTE_ADDR;
178                    global $isEdit;
179                    if ($isEdit) return 0;
180                  // DEBUG:                  // DEBUG:
181                  #if (stristr($ME, "test.plivamed.net")) return 0;                  #if (stristr($ME, "test.plivamed.net")) return 0;
182                  // User-Agent: should be mnoGoSearch, but in version 3.1.19                  // User-Agent: should be mnoGoSearch, but in version 3.1.19
# Line 198  Line 203 
203          }          }
204    
205          Header("Content-Type: text/html; charset=ISO-8859-2");          Header("Content-Type: text/html; charset=ISO-8859-2");
206          $isEdit = stristr($ME, "/edit/") ? true : false;  /*
         $isMed = stristr($ME, "med") || stristr($ME, "pm") ? true : false;  
207          if ($isEdit) {          if ($isEdit) {
208                  if ($PHP_AUTH_USER != "editor" && $PHP_AUTH_PW != "jokkvpr") {                  if ($PHP_AUTH_USER != "editor" && $PHP_AUTH_PW != "jokkvpr") {
209                          Header("WWW-Authenticate: Basic realm=\"PLIVA".($isMed?"med.net":"zdravlje.hr")."\"");                          Header("WWW-Authenticate: Basic realm=\"PLIVA".($isMed?"med.net":"zdravlje.hr")."\"");
# Line 208  Line 212 
212                          exit;                          exit;
213                  }                  }
214          }          }
215    */
216          $isReg = $isMed ? false : true;          $isReg = $isMed ? false : true;
217          if (!$isReg) $isReg = (Auth() == 0) ? true : false;          if (!$isReg) $isReg = (Auth() == 0) ? true : false;
218  ?>  ?>

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.26