⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changpw.asp

📁 校园二手交易系统,具有完备的后台操作以及应用功能!
💻 ASP
字号:
<!--#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">&nbsp;<font color=red>*最多16位</font></td>
        </tr>
        <tr>
          <td width="71" class="tablebody1"><div align="right">
			重复密码:<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">
			密码问题:<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">&nbsp;<font color=red>*请牢记,是找回密码的关键</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">&nbsp;<font color=red>*请牢记,是找回密码的关键</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
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -