%@ LANGUAGE="VBSCRIPT" %> <% OPTION EXPLICIT 'Server.ScriptTimeout = 300 %> <% ' This Script allows users to change their password. ' Although Password history is not saved, email history should be saved to allow users to revert to old email addresses. DIM pageLanguage response.ContentType="text/html" Response.charset = "UTF-8" pageLanguage="ENG" DIM username,oldpass,newpass,newpass2,action username=request.form("username") oldpass=request.form("oldpass") newpass=request.form("newpass") newpass2=request.form("newpass2") action=request.form("action") responsePageHeader "Change Password" DIM err,errs err=0 errs="" if newpass<>newpass2 then err=1 errs="Password verification does not match." end if if newpass="" then err=1 errs="Please enter new password." end if if oldpass="" then err=1 errs="Please enter old password." end if if len(newpass)<6 then err=1 errs="Password must be at least 6 characters long." end if ' Check if username/password are valid DIM conntemp,rstemp,mySQL set conntemp=server.createobject("adodb.connection") conntemp.open "DSN=CDizzMain" DIM userID userID=0 mySQL="SELECT userID FROM users WHERE username='" & degeresh(username) & "' AND password='" & degeresh(oldpass) & "'" Set rstemp=conntemp.execute(mySQL) If rstemp.eof Then err=1 errs="Invalid username or password" else userID=cLng(rstemp("userID")) End If rstemp.close if username="" or err=1 then if username<>"" then prt "