<% '------------------------------------------------------------------------------------ 'Copyright (C) 2004 Demetrio G. Milea ' 'This program is free software; you can redistribute it and/or 'modify it under the terms of the GNU General Public License 'as published by the Free Software Foundation; either version 2 'of the License, or (at your option) any later version. ' 'This program is distributed in the hope that it will be useful, 'but WITHOUT ANY WARRANTY; without even the implied warranty of 'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 'GNU General Public License for more details. ' 'A copy of the license may be found at www.fsf.org (Free Software Foundation) 'or inside the folder registrazione_e_gestione_utenti '------------------------------------------------------------------------------------ %> <% Server.Execute("header.asp") %> <% If Request.QueryString("step") = "2" THEN 'Rimuovo l'username e la password da caratteri illegali come per esempio '. str_username = Replace(Request.Form("username"), "'", "''") str_password = Replace(Request.Form("password"), "'", "''") Set rs_login = Server.CreateObject ("ADODB.RecordSet") strSQL = "SELECT * FROM tbl_authors WHERE name='" & str_username & "' AND pass='" & str_password & "'" rs_login.open strSQL,adoCon 'Se la combinazione username e password non esiste, reindirizzo l'utente ad un altra pagina If rs_login.EOF _ Or rs_login.BOF Then Response.Redirect("login_errato.asp") Else 'Scrivo l'user code nel cookie Response.Cookies("Login")("userCode") = rs_login("code") 'Reindirizzo alla pagina appropriata If adminEmail = "d.milea@libero.it" AND str_password = "admin" Then Response.Redirect("setup.asp?setup=firstTime") Else Response.redirect("visualizza_profilo.asp") End If End If End if %> <%=pageTitle%> .::. Login .::.
<% If Request.QueryString("disp") = "login" Then %>

Grazie per esserti registrato, <%=Session("tmpUN")%>!  Per loggarti inserisci la password

<% Else %>

Se non sei registrato, registrati!

<% End If %>

Username ">
Password

  

Recupera password

<% Server.Execute("footer.asp") %>