$UserAccount), $userData)) { \Logging\LogError("查找db异常"); $msg = \Lang\gettext("服务器错误"); return; } if (!isset($userData)) { \Logging\LogError("账号不存在!"); $msg = \Lang\gettext("账号不存在"); return; } $db_pw = $userData["Psw"]; $Psw = \Commfunc\GetEncodePsw($Psw); if (!$Psw || $Psw != $db_pw) { \Logging\LogError("账号密码错误!"); $msg = \Lang\gettext("账号密码错误"); return; } if (!\DBOper\Update( "GMTUser", array("UserAccount" => $UserAccount), array( "LoginTime" => date("Y-m-d H:i:s"), "IP" => \CommFunc\GetIP() ), true )) { \Logging\LogError("更新db异常"); $msg = \Lang\gettext("服务器错误"); return; } \CommFunc\SessionSave(array('UserAccount' => $UserAccount)); \Logging\LogInfo("登录成功:" . $UserAccount); // header("Location:/index.php"); header("location:/Account/Server/SelectServer.php"); } \Logging\CreateLogging("account.login.php"); \Logging\LogInfo("_POST: " . print_r($_POST, true)); $msg = ""; $UserAccount = ""; // 重置已登录的账号 \CommFunc\SessionSave(array('UserAccount' => "", 'spid' => "", 'server_id' => "", 'tool_page' => "")); if (array_key_exists('UserAccount', $_POST)) { DoLogin(); } else { if (\DBOper\FindOne("GMTUser", array("UserLV" => \User\UserLV::ADMIN_SUPER), $userData) && !isset($userData)) { header("location:/Account/super.php"); exit; } if ($_GET["superok"] == "1") { $msg = "超级管理员创建成功,请登录!"; } else if ($_GET["superok"] == "2") { $msg = "超级管理员已经存在,请登录!"; } } if ($msg) { echo ""; } ?>