$sLoginType = strtolower(@$_POST["rememberme"]); $bValidate = TRUE; } else { if ($Security->IsLoggedIn()) { if (@$_SESSION[EW_SESSION_MESSAGE] == "") { Page_Terminate($sLastUrl); } // Return to last accessed page } } if ($bValidate) { $bValidPwd = FALSE; // Call loggin in event $bValidate = User_LoggingIn($sUsername, $sPassword); if ($bValidate) { $bValidPwd = $Security->ValidateUser($sUsername, $sPassword); if (!$bValidPwd) { $_SESSION[EW_SESSION_MESSAGE] = "无效的用户名或密码"; } // Invalid User ID/password } else { if (@$_SESSION[EW_SESSION_MESSAGE] == "") { $_SESSION[EW_SESSION_MESSAGE] = "Login cancelled"; } // Login cancelled } //$_SESSION[EW_SESSION_SYS_ADMIN] = '5'; if ($bValidPwd) { // Write cookies $expirytime = time() + 24 * 60 * 60; // Change cookie expiry time here