Questa è la pagina di log in
codice:<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' *** Validate request to log in to this site. MM_LoginAction = Request.ServerVariables("URL") If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString) MM_valUsername=CStr(Request.Form("user")) If MM_valUsername <> "" Then MM_fldUserAuthorization="Permesso" MM_redirectLoginSuccess="index.asp" MM_redirectLoginFailed="login.asp" MM_flag="ADODB.Recordset" set MM_rsUser = Server.CreateObject(MM_flag) MM_rsUser.ActiveConnection = MM_conn_teammeccanica_STRING MM_rsUser.Source = "SELECT Nome_completo, PWD" If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization MM_rsUser.Source = MM_rsUser.Source & " FROM q_user WHERE Nome_completo='" & Replace(MM_valUsername,"'","''") &"' AND PWD='" & Replace(Request.Form("textfield2"),"'","''") & "'" MM_rsUser.CursorType = 0 MM_rsUser.CursorLocation = 2 MM_rsUser.LockType = 3 MM_rsUser.Open If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then ' username and password match - this is a valid user Session("MM_Username") = MM_valUsername If (MM_fldUserAuthorization <> "") Then Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value) Else Session("MM_UserAuthorization") = "" End If if CStr(Request.QueryString("accessdenied")) <> "" And true Then MM_redirectLoginSuccess = Request.QueryString("accessdenied") End If MM_rsUser.Close Response.Redirect(MM_redirectLoginSuccess) End If MM_rsUser.Close Response.Redirect(MM_redirectLoginFailed) End If %> <% Session("User") = CStr(Request.Form("user")) %> <% Session.Timeout=60 %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Team Meccanica - Tecnico</title> <link href="Css/gestione.css" rel="stylesheet" type="text/css" /></head> <body> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="20%" valign="top" class="altosx"><h1>[img]Img/logo%20team.jpg[/img]</h1></td> <td width="80%" valign="top" class="altodx"><table width="600" border="0" cellspacing="0" cellpadding="00"> <tr> <td width="100" class="bigmenu">Commerciale</td> <td width="100" class="bigmenu">Tecnico</td> <td width="100" class="bigmenu">Acquisti</td> <td width="100" class="bigmenu">Magazzino</td> <td width="100" class="bigmenu">Amministrazione</td> <td width="100" class="bigmenu">Utilità</td> </tr> </table> <hr /> <table width="400" border="0" cellspacing="0" cellpadding="00"> <tr> <td width="50%"></td> <td width="50%"></td> </tr> </table></td> </tr> <tr> <td width="20%" valign="top" class="bassosx"> <table width="100%" border="0" cellspacing="0" cellpadding="00"> <tr> <td>Utente: - IN FASE DI REGISTRAZIONE - </td> </tr> <tr> <td></td> </tr> <tr> <td>Team Meccanica > LOGIN </td> </tr> <tr> <td></td> </tr> <tr> <td></td> </tr> <tr> <td></td> </tr> </table> _</td> <td width="80%" valign="top" class="bassodx"> <table width="100%" height="454" border="0" cellpadding="00" cellspacing="0"> <tr> <td valign="top"><form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>"> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td width="30%">Username:</td> <td><label> <input name="user" type="text" id="user" /> </label></td> </tr> <tr> <td>Password:</td> <td><label> <input type="password" name="textfield2" /> </label></td> </tr> <tr> <td colspan="2"><label> <div align="center"> <input type="submit" name="Submit" value="Invia" /> </div> </label></td> </tr> </table> </form> </p> </p> </p></td> </tr> </table> </td> </tr> <tr> <td width="20%"></td> <td width="80%"></td> </tr> </table> </body> </html>

Rispondi quotando