<% var email = SQLVariableFromRequest("email"); var password = SQLString(MyEncrypt(Request("password")())); var loginResult = AssignProperties(ExecuteSQL("sp_GetUserLogin",email,password),'errorCode','userID'); if (loginResult.errorCode != loginError.noError){ AddLog(loginResult.errorCode,loginResult.userID?loginResult.userID:null,(loginResult.errorCode==loginError.failedEmail)?email:Request("password")()); Response.Redirect("login.asp?errorCode="+loginResult.errorCode); } Session("userID")=loginResult.userID; Session("loginTime")=new Date().valueOf(); Response.Cookies("ISOflex") = loginResult.userID; var after90 = new Date(); after90.setDate(after90.getDate()+90); Response.Cookies("ISOflex").Expires = after90.standardFormat(); AddLog(kEvent.login,loginResult.userID); CloseConnection(); var bouncePage = Request("returnto")()?Request("returnto")():'default.asp'; Response.Redirect(bouncePage); Response.End(); %>