|
<%response.buffer=true%>
<html>
<head>
<title>Protection with Include files
</title>
</head>
<body>
<!-- Inicio de c�digo ASP -->
<%
Dim strUserID
Dim strPassword
Dim strURL
Dim bLoginOK
Dim bRemember
strURL = Request.Form("URL")
strUserID = request.Form("userID")
strPassword = Request.Form("password")
bRemember = StrComp(Request("remember"), "on") = 0
bLoginOK = (StrComp(strUserID, "CodeProject") = 0) and (StrComp(strPassword, "Password") = 0)
if (bLoginOK) then
Response.Cookies("userID") = strUserID 'you should replace this with the user ID as a number
if (bRemember) then
Response.Cookies("userID").Expires = "12/12/2001"
end if
Response.Redirect strURL
else
Response.Redirect "AcessDenied.asp"
end if
%>
</body>
</html>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
XicoLoko is a brazilian developer based in Switzerland.