require_once("../function.user.php"); if(!isset($PHP_AUTH_USER)) { authenticate(); } else{ include "../config.php"; $result01=mysql_query("select password('$PHP_AUTH_PW')") ; $user_pw=mysql_result($result01,0,0); mysql_free_result($result01); $query="select adminpw from admin where adminid='$PHP_AUTH_USER'"; $result=mysql_query($query); $rows=mysql_num_rows($result); if($rows) { $admin_pw=mysql_result($result,0,0); if(strcmp($user_pw,$admin_pw)) { authenticate(); }} else { authenticate(); } } echo ""; ?>