% 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 %>
Amministrazione
occasioni