很多網(wǎng)站都用會(huì)員注冊(cè)功能,注冊(cè)成功后需要郵箱激活效果,今天我們就來做這種效果吧. <% Dim username,password Dim repassword,answer Dim Rs, SQL If Trim(Request("username")) = "" Or Trim(Request("pass")) = "" Or Trim(Request("repass")) = "" Or Trim(Request("answer")) = "" Then Response.Write "<script>alert('非法參數(shù)!');history.go(-1)</script>" Else username = Newasp.CheckBadstr(Request("username")) password = Newasp.CheckBadstr(Request("pass")) repassword = MD5(Newasp.Checkstr(Request("repass"))) answer = MD5(Request("answer")) SQL = "SELECT password,UserGrade FROM [NC_User] WHERE username='" & username & "' And password='" & password & "' And answer='" & answer & "'" Set Rs = Server.CreateObject("adodb.recordset") Rs.open SQL, Conn, 1, 3 If Rs.EOF And Rs.bof Then Response.Write "<script>alert('您返回的用戶資料不正確,非法操作!');history.go(-1)</script>" Else If Rs("UserGrade") = 999 Then Response.Write "<script>alert('非法操作!必須和管理員聯(lián)系取回密碼!');history.go(-1)</script>" Else Rs("password") = repassword Rs.Update '----------------------------------------------------------------- '系統(tǒng)整合 '----------------------------------------------------------------- Dim API_Newasp,API_SaveCookie,SysKey If API_Enable Then Set API_Newasp = New API_Conformity API_Newasp.NodeValue "action","reguser",0,False API_Newasp.NodeValue "username",UserName,1,False Md5OLD = 1 SysKey = Md5(API_Newasp.XmlNode("username") & API_ConformKey) Md5OLD = 0 API_Newasp.NodeValue "syskey",SysKey,0,False API_Newasp.NodeValue "password",Request("repass"),0,False API_Newasp.SendHttpData Set API_Newasp = Nothing End If '----------------------------------------------------------------- Response.Write "<script>alert('您的密碼成功激活,請(qǐng)登陸!');location.replace('./')</script>" End If End If Rs.Close Set Rs = Nothing End If CloseConn %> 更多詳細(xì)內(nèi)容請(qǐng)查看:http://www.111cn.net/asp/2/5a47f68ce2ec7bded91f43afc9fdf6a8.htm |