* @author yuji TAKAHASHI */ if (!$PHP_AUTH_USER) { header("WWW-authenticate: basic realm=\"WIZ\""); header("HTTP/1.0 401 Unauthorized"); echo "\n"; exit; } else { $strSql = $dbSqlObj->selectEmployeeOneRecord($PHP_AUTH_USER); $result = $dbExecObj->exeSql($conn,$strSql); if ($dbExecObj->getNumRows($result) == 0) { header("WWW-authenticate: basic realm=\"WIZ\""); header("HTTP/1.0 401 Unauthorized"); echo "\n"; exit; } $password = (string)crypt($PHP_AUTH_PW, $dbExecObj->getResult($result, 0, "emp_password")); if ($dbExecObj->getResult($result, 0, "emp_password") != $password) { header("WWW-authenticate: basic realm=\"WIZ\""); header("HTTP/1.0 401 Unauthorized"); echo "\n"; exit; } } ?>