<%
Dim nome_ut Dim pass Dim autenticato nome_ut = Replace(Request.Form("nome_utente"), "'", "''") pass = Replace(Request.Form("password"), "'", "''") if lcase(nome_ut) = "vb6access@hotmail.com" and pass = "Yorkshire" or lcase(nome_ut) = "vb6access@hotmail.com" and pass = "Autentica" or lcase(nome_ut) = "ilvoberna" and pass = "bernailvo" then autenticato = TRUE else autenticato = FALSE end if if autenticato = true then 'Session("autenticato") = "OK" ' se non c'è lo0 crea filePath = Server.Mappath("file_testo.txt") Set objFileSystem = Server.CreateObject("Scripting.FileSystemObject") Set objFile = objFileSystem.OpenTextFile(filePath, 2) 'scrivo una riga sul file 'objFileSystem.OpenTextFile(filePath, 2) '-> sovrascrivo file 'objFileSystem.OpenTextFile(filePath, 8) '-> aggiungo il testo al fondo del file objFile.WriteLine("0") objFile.Close Response.Redirect("index.html") else ' Response.Redirect("http://www.lavarosso.com/LUCA/Mac/Login.asp") Response.Redirect("Login.asp") Response.Write("Password " & pass & "User " & nome_ut & " errati riprova") Session("autenticato") = "" end if if len(nome_ut) = 0 or len(pass) = 0 then Response.Redirect("index.Asp") end if %> |