Modificare il file:
\DBList-Buoni-Spesa\login.asp
<% '---------------------------------------------------------------------------------------- '- ASP Security Login - Version 2.0 - 01 June 2005 '- Copyright © 2005 - Livio Siri (http://www.livio.net) - All Rights Reserved. '---------------------------------------------------------------------------------------- Option Explicit '--- If bLogin = true then edit your username and password here-------------- UserName = "admin" Password = "pass" '--------------------------------------------------------------------------------------- '--- Prevent caching Response.Buffer = True Response.ExpiresAbsolute = Now() - 1 Response.AddHeader "cache-control", "must-revalidate" Response.AddHeader "cache-control", "private" Response.AddHeader "pragma", "no-cache" Session.Timeout = 20 '--- Define variables Dim sReferer, sGoBackTo, sUserName, sPassword, bLoginSuccessful, Error Dim UserName, Password if request.querystring("comebackto") <> "" then sReferer = request.querystring("comebackto") sGoBackTo = "?" & request.querystring end if '--- If Login Form has been submitted if request.form("Status") = "FormSubmitted" then sUserName = replace(request.form("txtUserName"),"'","") sPassword = replace(request.form("txtPassword"),"'","") '--- Check for username and password match If (sUserName = UserName) AND (sPassword = Password) then bLoginSuccessful = True Else bLoginSuccessful = False Error = "Wrong User name or Password" '--- Send user to the default page after 3 unsuccessful try Session("count") = Session("count") + 1 if Session("count") > 3 then Session.abandon response.redirect sGoBackTo End if End if Session("bLoginSuccessful") = bLoginSuccessful End if '--- After a successful login, let's send the user back to see the protected page '--- The variable sReferer holds the page to go back, '--- if it is empty, the user is redirected to the default page if bLoginSuccessful Then if sReferer = "" then response.redirect "../" else response.redirect sReferer end if else '--- If no login performed then display the Login Form %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><title>Login into protected pages - by www.lasp.net</title> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META name="description" content="This page requires login"> <style> BODY, TD {color: NAVY;font-family: Verdana,tahoma,Arial;font-size: 10px;} A:link {text-decoration: none} A:visited {text-decoration: none} A:active {text-decoration: none} A:hover {text-decoration: none;color: #000000} .text {color: NAVY;font-family: Verdana,tahoma,Arial;font-size: 9px;} .coltext {color: tomato;font-family: Verdana,tahoma,Arial;font-size: 10px;font-weight: bold;} .inputSubmit { color: NAVY; background-color: #EEEEEE; border-color : NAVY; border-top : 1px solid; border-bottom : 1px solid; border-left : 1px solid; border-right : 1px solid; font-family : Verdana,tahoma,Arial; font-size : 10px; font-weight: bold; cursor: hand; width : 100px } .inputBox { color : NAVY; background : #EEEEEE; border-color : NAVY; border-top : 1px solid; border-bottom : 1px solid; border-left : 1px solid; border-right : 1px solid; font-family : Verdana,tahoma,Arial; font-size : 10px; } </style> </HEAD> <body language="JavaScript" onLoad="document.Login.txtUserName.focus()"> <br><br><br><br><br> <table border="0" cellpadding="5" cellspacing="0" align="center" style="border: 1px solid navy;" bgcolor=#F3F3CC> <form action="login.asp<%=sGoBackTo%>" method="post" name="Login"> <tr> <% '--- Show error when credentials are incorrect if Error <> "" then response.write "<td colspan=2 align=center class=coltext bgcolor=#F0FFF0 style=""border-bottom: 1px solid navy;"">" & Error response.write "</td></tr><tr>" End if %> <td align=center height=80> <table border="0" cellpadding="2" cellspacing="0"><tr> <td align="right"><b>User name:</b></td> <td><input type="Text" name="txtUserName" size="18" class="inputBox"></td> </tr><tr> <td align="right"><b>Password:</b></td> <td><input type="Password" name="txtPassword" size="18" class="inputBox"></td> </tr><tr> <td class=text align=center height=30> </td> <td class=text align=center> <input type="submit" name="cmdLogin" value="ENTRA" class="inputSubmit"> <input type="hidden" name="Status" value="FormSubmitted"> </td></tr></table> </td></tr></form></table> </BODY></HTML> <% End if %>
[
Íàçàä
]