<%@ CodePage = 65001 LCID = 1040 %> <% Response.expires = 0 Response.expiresabsolute = Now() - 1 Response.addHeader "pragma", "no-cache" Response.addHeader "cache-control", "private" Response.addHeader "cache-control", "no-cache" Response.addHeader "cache-control", "no-store" Response.CacheControl = "no-cache" %> <% If Request.Form("submit") <> "" Then bValidPwd = False bPwdUpdated = False ' Setup variables sUserID = Session("lapinsitter_status_User") sOPwd = Request.Form("opwd") sNPwd = Request.Form("npwd") sCPwd = Request.Form("cpwd") If sNPwd = sCPwd Then Set conn = Server.CreateObject("ADODB.Connection") conn.open xDb_Conn_Str sSql = "SELECT * FROM [utenti]" sSql = sSql & " WHERE [login] = '" & AdjustSql(sUserID) & "'" Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sSql, conn, 1, 2 If Not rs.Eof Then If sOPwd = rs("password") Then rs("password") = sNPwd ' Change Password sEmail = rs("email") rs.Update bValidPwd = True bPwdUpdated = True End If End If rs.Close Set rs = Nothing conn.Close Set conn = Nothing End If If bPwdUpdated Then If sEmail <> "" Then ' Load Email Content sEmailSubject = "" sEmailFrom = "" sEmailTo = "" sEmailCc = "" sEmailBcc = "" sEmailFormat = "" sEmailContent = "" Call LoadEmail("changepwd.txt") sEmailFrom = Replace(sEmailFrom, "", "protty@protty.it") ' Replace Sender sEmailTo = Replace(sEmailTo, "", sEmail) ' Replace Receiver sEmailContent = Replace(sEmailContent, "", sNPwd) ' Replace Password ' Send Email Call Send_Email(sEmailFrom, sEmailTo, sEmailCc, sEmailBcc, sEmailSubject, sEmailContent, sEmailFormat) End If Session("ewmsg") = "Password Cambiata" Response.Redirect "default.asp" End If Else bValidPwd = True End If %>

Pagina per cambiare la password

<% If Not bValidPwd Then %>

Password errata

<% End If %>
Vecchia Password
Nuova Password
Conferma Password