11 |
if (count($row) <= 0) $auth = false; |
if (count($row) <= 0) $auth = false; |
12 |
if ($auth) { |
if ($auth) { |
13 |
$row = $row[0]; |
$row = $row[0]; |
14 |
if ($PHP_AUTH_PW != $row[0]) $auth = false; |
if (substr($row[0], 0, 5) == "auth_") { |
15 |
|
switch (strtoupper(substr($row[0], 5))) { |
16 |
|
case "POP3": |
17 |
|
include("auth_POP3.php"); |
18 |
|
$pop = new POP3(); |
19 |
|
$pop->connect("intranet.pliva.hr"); |
20 |
|
$ret = $pop->checklogin($PHP_AUTH_USER, $PHP_AUTH_PW); |
21 |
|
$pop->quit(); |
22 |
|
if (!$ret) $auth = false; |
23 |
|
break; |
24 |
|
default: $auth = false; break; |
25 |
|
} |
26 |
|
} else { |
27 |
|
$pw = md5($PHP_AUTH_USER.$PHP_AUTH_PW); |
28 |
|
if ($pw != $row[0]) $auth = false; |
29 |
|
} |
30 |
|
# if ($PHP_AUTH_PW != $row[0]) $auth = false; |
31 |
} |
} |
32 |
} |
} |
33 |
if (!$auth || $relogin == $PHP_AUTH_USER) { |
if (!$auth || $relogin == $PHP_AUTH_USER) { |