% Dim sCurrentPage, sPCMID sCurrentPage = "intranet" sCurrentPage2 = "Intranet" sPCMID = "PCM_INTRANET" %> <% Dim sErrorText ' Clear currently logged user Response.Cookies("IntranetUser") = "" ' Validate user if data was submitted. If user is valid, I write a cookie so the other page can check security. If Len(Request("User")) > 0 Then Set rs = conDB.Execute("SELECT UserName, Password FROM IntranetUsers WHERE UserName = '" & Request("User") & "'") If IsRSEmpty(rs) Then sErrorText = smInvalidUser Else If rs("Password") = Request("Password") Then Response.Cookies("IntranetUser") = Request("User") Response.Redirect "intranetuser.asp" Else sErrorText = smInvalidUser End If End If End If%> <%If Len(sErrorText) > 0 Then%>
<%=sErrorText%>
<%End If%><%=sPageContent%>