--- index.php 2001/06/06 08:55:25 1.6 +++ index.php 2001/06/06 10:54:22 1.7 @@ -11,7 +11,23 @@ if (count($row) <= 0) $auth = false; if ($auth) { $row = $row[0]; - if ($PHP_AUTH_PW != $row[0]) $auth = false; + if (substr($row[0], 0, 5) == "auth_") { + switch (strtoupper(substr($row[0], 5))) { + case "POP3": + include("auth_POP3.php"); + $pop = new POP3(); + $pop->connect("intranet.pliva.hr"); + $ret = $pop->checklogin($PHP_AUTH_USER, $PHP_AUTH_PW); + $pop->quit(); + if (!$ret) $auth = false; + break; + default: $auth = false; break; + } + } else { + $pw = md5($PHP_AUTH_USER.$PHP_AUTH_PW); + if ($pw != $row[0]) $auth = false; + } + # if ($PHP_AUTH_PW != $row[0]) $auth = false; } } if (!$auth || $relogin == $PHP_AUTH_USER) {