=1){ $user = mysql_fetch_array($result); if ($user['admin_active'] == 1){ session_register("CAAA_INFO"); $CAAA_INFO[username] = $user['admin_username']; $CAAA_INFO[shenfen] = $user['admin_shenfen']; $CAAA_INFO[id] = $user['admin_id']; $ip = getenv("REMOTE_ADDR"); } else { $this -> Login("您的帐户已被冻结"); } } else{ $this -> Login("用户名或密码错误"); } } else if (empty($CAAA_INFO['username'])){ $this -> Login("请 先 登 陆"); } } // 登陆函数 function Login($warn){ global $PHP_SELF; echo "\n"; echo "\n"; echo "请先登陆\n"; echo "\n"; echo "\n"; echo "
\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
".$warn.""; echo "
 \n"; echo "
用户名:
密码:

\n"; echo "     \n"; echo ""; echo "
"; echo "
\n"; echo "
\n"; echo "
\n"; echo "\n"; exit(); } function diary_max($table,$id){ $sql = "select max($id) as adminidmax from $table"; $result = mysql_query($sql); $aa = mysql_fetch_array($result); return $aa[adminidmax]; } } ?>