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 |
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")."\""); |
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 |
?> |
?> |