Hi,
Can someone help me with this scripts, it works on a different server but gives me error now,
This is the error I now get
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'OpenConn'
/customer/authenticate.as p, line 17
Can someone help me with this scripts, it works on a different server but gives me error now,
This is the error I now get
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'OpenConn'
/customer/authenticate.as p, line 17
Code:
<%@LANGUAGE="VBScript"%>
<%OPTION EXPLICIT%>
<%Response.Buffer = true%>
<!--#Include file="includes/utilities.asp"-->
<% ON ERROR GOTO 0
''-----------------------------------------------
'' Login page for simple ASP validation
''-----------------------------------------------
Dim UserId, Password
UserID = Trim(Request.Form("UserID"))
Password = Request.Form("Password")
VerifyUser UserID, Password ''''USER-CREATED SUB
'''==================================================
SUB VerifyUser (UserID, Password)
Dim objConn, sql, rs
Set objConn = OpenConn()
sql = "SELECT * FROM tblClients WHERE UserID = '" & UserID & "'"
Set rs = Server.CreateObject("ADODB.Recordset")
Set rs = objConn.Execute(sql,,1)
If rs.EOF and rs.BOF Then
'''Error! User Not found
CleanUp rs
CleanUp objConn
Response.Redirect "cbaLoginError.asp"
Else
If rs("Pass") <> Password Then
''''Oops!! Incorrect Password ----------
CleanUp rs
CleanUp objConn
Response.Redirect "LoginError.asp"
Else
''Checking if the account has been created.
if(rs("CreateStatus")=1 OR rs("Status")= 2) then
Response.Redirect "AccountDisabled.asp"
end if
''-----------------------------------------
Session("UserID") = UCase(rs("UserID"))
'Session("UserAccess") = CInt(rs("AccessLevel"))
Response.Redirect "custHome.asp" ''always, for all accesslevels!
''''' Logins audit code here -----------------
''IF CInt(rs("AccessLevel"))=77 THEN
' Response.Redirect "includes/msg.asp?msg=<tr><td>You do not have permission to log into the CMS System</td></tr>"
'ELSE
' Response.Redirect "Home.asp" ''always, for all accesslevels!
'END IF
'''---------------------------------------------
End If
CleanUp rs
CleanUp objConn
End If
CleanUp rs
CleanUp objConn
END SUB
'''===================================================
%>
Comment