|
FJC Extranet
  
<%
If Request.Form("action") <> "validate_login" Then
%>
<%
Else
ON ERROR RESUME NEXT
Dim strUsername, strPassword, strEncryptedPassword
' Assign form data to variables
strUsername = Request.Form("Username")
strPassword = Request.Form("Password")
' Encrypt the Password
strEncryptedPassword = EncryptText(strUsername, strPassword)
strSQL = "SELECT * FROM adminLog " _
& "WHERE strUsernameID='" & Replace(strUsername, "'", "''") & "'" _
& "AND strPasswordID='" & Replace(strEncryptedPassword, "'", "''") & "';"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, dcnDB
If Not objRS.EOF Then
%>
<% Session("strUsernameID") = objRS("strUsernameID").Value
Session("strPage") = objRS("userPage").Value
'Redirect Users to pages based on their Rights
if objRS("Right").value = "8" Then
'Session("strRight") = "8"
'Admin Rights
Response.Redirect("zAdminP.asp")
Else
Response.redirect objRS("userPage").Value
End if
%>
<%
Else
%>
Please review our Terms & Condition of Service before Proceeding.
Click Here to Enter Logon Details
<%
'Response.End
End If
' Clean Up
objRS.Close
dcnDB.Close
End If
%>
|