Modificare il file:
\Offerte\admin\login.asp
<!--#include file="cn.asp"--> <% dim username dim pass dim msg dim checked ' username = Request.Form("username") ' pass = Request.Form("password") username = "carmart" pass = "martcar" 'if request.Form("Submit")="Entra" then dim rs dim cn set cn = server.CreateObject("Adodb.Connection") set rs = server.CreateObject("Adodb.Recordset") cn.Open conn rs.open "Select * From Admin Where User_ID='" & username & "'",cn if not rs.eof then if pass = rs.fields("Password") then session("AdminOk") = "true" session("Username") = username response.Redirect("admin.asp") else msg = ("Password non corretta") end if else msg = ("Username non corretto") end if rs.Close cn.Close set rs = nothing set cn = nothing 'End if if request.QueryString("cmd") = "logout" then '#################################### ' Modifica per ritornare al menu ' di amministrazione 'session.Abandon() '################################### response.Redirect("../../index.asp") End if %> <html> <head> <title>Accesso area riservata</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#6699FF"> <div align="center"> <p><font face="Georgia, Times New Roman, Times, serif">Amministrazione occasioni<br> <img src="../../img/Logo04-100x99.png" width="100" height="99"> <br> </font></p> </div> <p> </p> <form name="form1" method="post" action=""> <p align="center"><font color="#FF0000"><%=msg%></font></p> <table width="48%" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#CCCCCC"> <tr bgcolor="#CCCCCC"> <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Accesso area riservata</strong></font></td> </tr> <tr> <td width="31%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">User Name</font></td> <td width="69%"><input name="username" type="text" id="username"></td> </tr> <tr> <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password</font></td> <td><input name="password" type="password" id="password"></td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Entra"></td> </tr> </table> <p> </p> </form> <p></p> </body> </html>
[
Íàçàä
]