% Option Explicit if Request.Cookies("PWB")("UID") <> "" AND Request.Cookies("PWB")("PWD") <> "" AND Request.Cookies("PWB")("LVL") <> "" then Response.Redirect("Conference.asp") %> <% dim strUID, strPWD, bError, bSubmit, strError strUID = Trim(Request.Form("UserID")) strPWD = Trim(Request.Form("UserPWD")) bError = FALSE if Request.Form("SUBMIT") = "login" then bSubmit = TRUE if bSubmit then if strUID = "" or strPWD = "" then bError = TRUE strError = "User ID or Password cannot be blank." else 'DB Opperations strSQL = "SELECT * FROM tblSecurity WHERE User_ID = '" & SqlParam(strUID) & "' AND password = '" & SqlParam(strPWD) & "'" set objCN = Server.CreateObject("ADODB.Connection") objCN.Open(strCN) set objRS = objCN.Execute(strSQL) if objRS.EOF then 'User ID/Password DID NOT match. Show Error bError = TRUE strError = "User ID and Password are not valid." objRS.Close set objRS = nothing objCN.Close set objCN = nothing else 'User ID/Password are valid. Login in user Response.Cookies("PWB")("UID") = objRS("User_ID") Response.Cookies("PWB")("PWD") = objRS("Password") Response.Cookies("PWB")("LVL") = objRS("Group") Response.Redirect("Conference.asp") end if end if end if %>
![]() |
![]() |
<% if bError then call WriteError(strError) %> If you do not have a login ID and password, please contact your account manager. |
|
|
|||
![]() |
![]() |