?? changpw.asp
字號(hào):
<!--#include file="top.asp"-->
<!--#include file="Inc/md5.asp"-->
<!--#include file="Inc/MsgBox.asp"-->
<!--#include file="Inc/FormChk.asp"-->
<!--#include file="inc/UserChk.asp"-->
<%
if trim(request("submit"))<>empty then
dim password1,password2,user_question,user_answer,strsq,rs1
set rs1=server.CreateObject("adodb.recordset")
strsq="select * from [dduser] where user_ID="& cint(Session("user_ID"))
rs1.open strsq,conn,1,3
if request.Form("password1")<>empty and request.Form("password2")<>empty then
if request.Form("password1")<>request.Form("password2") then
call msgbox("兩次輸入密碼不一樣","Back","")
response.End()
else
rs1("user_password")=md5(encodestr(request.Form("password1")),16)
end if
end if
if request.Form("user_question")<>empty and request.Form("user_answer")<>empty and request.Form("answer1")<>request.Form("user_answer") then
rs1("user_question")=encodestr(request.Form("user_question"))
rs1("user_answer")=encodestr(request.Form("user_answer"))
end if
rs1.update
rs1.close
set rs1=nothing
conn.close
set conn=nothing
call msgbox("修改成功","GoUrl","changpw.asp")
response.End()
end if
dim strsql,rs
set rs=server.CreateObject("adodb.recordset")
strsql="select * from [dduser] where user_ID="& cint(session("user_ID"))
rs.open strsql,conn,1,3
%>
<TABLE width=760 border=0 align=center cellSpacing=0 cellPadding=0>
<TBODY>
<TR> <td width=176 vAlign=top>
<!--#include file="center.asp"--></td>
<td class=line></td>
<TD align="center" vAlign=top>
<form name="form1" method="post" action="">
<div align="center">
<TABLE cellpadding="3" cellspacing="1" align="center" class="tableborder1">
<tr>
<td width="71" class="tablebody1" ><div align="right">
新的密碼:</div></td>
<td class="tablebody1" ><input name="password1" type="password" class="input2" id="password1" maxlength="16"> <font color=red>*最多16位</font></td>
</tr>
<tr>
<td width="71" class="tablebody1"><div align="right">
重復(fù)密碼:<strong><br>
</strong></div></td>
<td class="tablebody1"><input name="password2" type="password" class="input2" id="password2" maxlength="16"></td>
</tr>
<tr>
<td width="71" class="tablebody1"><div align="right">
密碼問(wèn)題:<strong> <br>
</strong></div></td>
<td class="tablebody1"><input name="user_question" type="text" class="input2" id="user_question" value="<%=rs("user_question")%>" maxlength="20"> <font color=red>*請(qǐng)牢記,是找回密碼的關(guān)鍵</font></td>
</tr>
<tr>
<td width="71" class="tablebody1">
<p align="right">密碼答案:<strong><br>
</strong></p></td>
<td class="tablebody1"><input name="user_answer" type="text" class="input2" id="user_answer" value="<%=rs("user_answer")%>" maxlength="20"> <font color=red>*請(qǐng)牢記,是找回密碼的關(guān)鍵</font>
</td>
<input name="answer1" type="hidden" value="<%=rs("user_answer")%>">
</tr>
<tr>
<td width="71" class="tablebody1"> </td>
<td class="tablebody1"><input class=input type="submit" name="Submit" value="提交">
<input class=input type="reset" name="Submit2" value="重置"></td>
</tr>
</table>
</div>
</form>
</TD>
</TR>
</TBODY>
</table>
<!--#include file="bottom.asp"-->
<%
conn.Close
Set conn=Nothing
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -