/[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.9 by ravilov, Tue Oct 16 13:07:03 2001 UTC
# Line 55  Line 55 
55                  if ($cat == "p") $m = "pmore";                  if ($cat == "p") $m = "pmore";
56                  $t->assign("m", $m);                  $t->assign("m", $m);
57                  $t->assign("name", $name);                  $t->assign("name", $name);
58                  $t->assign("read", $read || ($more && !strstr($more, "?")) ? $read : "");                  $pos = strpos($more, "?");
59                    $t->assign("read", $read && (!$more || ($more && ($pos === false || $pos != 0))) ? $read : "");
60                  $t->assign("more", /* $more */ strstr($more, "?") ? $more : "");                  $t->assign("more", /* $more */ strstr($more, "?") ? $more : "");
61                  $t->assign("more_new", strstr($more, "://") ? true : false);                  $t->assign("more_new", strstr($more, "://") ? true : false);
62                  $t->assign("more_title", $more_title);                  $t->assign("more_title", $more_title);
# Line 170  Line 171 
171                  return $password;                  return $password;
172          }          }
173    
174            $isEdit = stristr($ME, "/edit/") ? true : false;
175            $isMed = stristr($ME, "med") || stristr($ME, "pm") ? true : false;
176    
177          function Auth($user = "", $pwd = "") {          function Auth($user = "", $pwd = "") {
178                  global $ME,$HTTP_USER_AGENT,$REMOTE_ADDR;                  global $ME,$HTTP_USER_AGENT,$REMOTE_ADDR;
179                    global $isEdit;
180                    if ($isEdit) return 0;
181                  // DEBUG:                  // DEBUG:
182                  #if (stristr($ME, "test.plivamed.net")) return 0;                  #if (stristr($ME, "test.plivamed.net")) return 0;
183                  // 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 204 
204          }          }
205    
206          Header("Content-Type: text/html; charset=ISO-8859-2");          Header("Content-Type: text/html; charset=ISO-8859-2");
207          $isEdit = stristr($ME, "/edit/") ? true : false;  /*
         $isMed = stristr($ME, "med") || stristr($ME, "pm") ? true : false;  
208          if ($isEdit) {          if ($isEdit) {
209                  if ($PHP_AUTH_USER != "editor" && $PHP_AUTH_PW != "jokkvpr") {                  if ($PHP_AUTH_USER != "editor" && $PHP_AUTH_PW != "jokkvpr") {
210                          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 213 
213                          exit;                          exit;
214                  }                  }
215          }          }
216    */
217          $isReg = $isMed ? false : true;          $isReg = $isMed ? false : true;
218          if (!$isReg) $isReg = (Auth() == 0) ? true : false;          if (!$isReg) $isReg = (Auth() == 0) ? true : false;
219  ?>  ?>

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

  ViewVC Help
Powered by ViewVC 1.1.26