📄 my_psw.asp
字号:
<!--#include file="conn.asp"-->
<HEAD><TITLE>修改密码</TITLE>
<META http-equiv=Content-Language content=zh-cn>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="images/style.css" type=text/css rel=stylesheet>
</HEAD>
<BODY bgColor=#2f66bf >
<DIV align=center>
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111 cellSpacing=0
cellPadding=0 width=763 border=0>
<TBODY>
<TR>
<TD width="100%"><!--#include file="head.asp"--></TD></TR></TBODY></TABLE>
<TABLE dir=ltr cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV align=center>
<TABLE height=830 cellSpacing=0 cellPadding=0 width=763 border=0>
<TBODY>
<TR>
<TD width=763 background=images/head_13.jpg height=15></TD></TR>
<TR>
<TD vAlign=top align=middle width=763
background=images/head_14.jpg height=49>
<TABLE id=AutoNumber3 style="BORDER-COLLAPSE: collapse"
borderColor=#111111 cellSpacing=0 cellPadding=0 width=763
border=0><TBODY>
<TR>
<TD width=11 rowSpan=4> </TD>
<TD width=741></TD>
<TD width=11 rowSpan=4> </TD></TR>
<TR>
<TD width=741></TD></TR>
<TR>
<TD width=741> </TD></TR>
<TR>
<TD width=741></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD width=763 background=images/head_16.jpg height=11></TD></TR>
<TR>
<TD width=763 background=images/head_11.jpg height=726>
<DIV align=center>
<TABLE id=table8 height="101%" cellSpacing=0 cellPadding=0
width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top align=middle width=187>
<!-- #include file="left.asp" -->
</TD>
<TD vAlign=top>
<TABLE id=table9 height=30 cellSpacing=0 cellPadding=0
width=571 border=0>
<TBODY>
<TR>
<TD width=12 background=images/sousuo_1.jpg> </TD>
<TD width=115 background=images/sousuo_2.jpg>
<TABLE id=table12 height=18 cellSpacing=0 cellPadding=0
width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top><FONT color=#ffffff><SPAN
style="FONT-SIZE: 12px"> 学 生 搜
索</SPAN></FONT></TD></TR></TBODY></TABLE></TD>
<TD background=images/sousuo_2.jpg> </TD>
<TD vAlign=top width=133
background=images/sousuo_2.jpg>
<FORM style="MARGIN: 0px" name="form1" action="search.asp" method="post">
<TABLE cellSpacing=0 cellPadding=0 width=390 border=0>
<TBODY>
<TR>
<TD width=56></TD>
<TD vAlign=top width=144><SPAN lang=zh-cn>
<SELECT class=smallSel size=1 name="searchid">
<OPTION value="Userid" selected name="typeid">=按登陆学号=</OPTION>
<OPTION value="UserName" name="typeid">=按学生姓名=</OPTION>
<OPTION value="Sex" name="typeid">=按学生性别=</OPTION>
<OPTION value="Birthday" name="typeid">=按出生年月=</OPTION>
<OPTION value="Banji" name="typeid">=按学生班级=</OPTION>
</SELECT></SPAN>
</TD>
<TD vAlign=top width=113>
<input name="searchkey" type="text" onfocus="this.value=''" size="10" maxlength="10" value=关键字>
</TD>
<TD width=77><DIV align=center>
<INPUT type=image src="images/sousuo_4.jpg" border=0 name=Submit value="开始查找" onclick="return checkk();"></DIV></TD></TR></TBODY></TABLE></FORM></TD></TD>
<TD width=15
background=images/sousuo_5.jpg> </TD></TR></TBODY></TABLE>
<TABLE id=table15 height=131 cellSpacing=0 cellPadding=0
width=568 border=0>
<TBODY>
<TR>
<TD width=146 background=images/bjbg_1.jpg height=35>
<!--#include file="md5.asp"-->
<%if request("edit")="ok" then call edit()%>
<% set rs=conn.execute("select * from [user] where UserId='"&request.cookies ("userid")&"'") %>
<TABLE id=table16 height=20 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=middle><FONT style="FONT-SIZE: 12px"
color=#ff0000>修改密码</FONT></TD></TR></TBODY>
</TABLE></TD>
<TD width=422 height=35><IMG height=35 src="images/bjbg_2.jpg" width=422 border=0></TD></TR>
<TR> <TD align=middle width=568 background=images/bjbg_3.jpg colSpan=2>
<form name="myinfo" action="my_psw.asp" method="post">
<table width="80%" border="1" cellpadding="4" cellspacing="0" bordercolor="#C0C0C0" align=center bordercolordark="#FFFFFF">
<tr>
<td width="28%" align="right">登陆帐号</td>
<td width="72%"><%=rs("UserID")%><input type=hidden name="userid" value="<%=rs("UserID")%>"></td>
</tr>
<tr>
<td width="28%" align="right">原 密 码</td>
<td width="72%"><input type="password" name="oldpassword" maxlength=16 style="height=20; BORDER: darkgray 1px solid; FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: verdana ; overflow:auto;"> <a style="color:BLUE;" href=my_psw_set.asp>设置取回密码问答</a> </td>
</tr>
<tr>
<td width="28%" align="right">新 密 码</td>
<td width="72%"><input type="password" name="pw1" maxlength=16 style="height=20; BORDER: darkgray 1px solid; FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: verdana ; overflow:auto;"></td>
</tr>
<tr>
<td width="28%" align="right">密码确认</td>
<td width="72%"><input type="password" name="pw2" maxlength=16 style="height=20; BORDER: darkgray 1px solid; FONT-SIZE: 8pt; COLOR: #666666; FONT-FAMILY: verdana ; overflow:auto;"></td>
</tr>
<tr><td colspan=2 align=center>
<input type="submit" name="Submit" value="确认修改">
<input name="Submit2" type="reset" value="不做修改"><input type=hidden name=edit value="ok">
</td></tr>
</table>
</form>
</TD>
<TR><TD width=568 colSpan=2 height=16><IMG height=16 src="images/bjbg_6.jpg" width=568 border=0></TD>
</TR>
</TABLE>
<%
rs.close
set rs=nothing
%>
</TABLE></TD></TABLE>
<DIV align=center>
<CENTER>
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111 height=76
cellSpacing=0 cellPadding=0 width=763 border=0>
<TBODY>
<TR>
<TD width=763 background=images/xiabg_3.jpg height=76>
<DIV align=center>
<TABLE id=table34 cellSpacing=0 cellPadding=0 width="98%" border=0>
<TBODY>
<TR>
<TD align=middle><FONT color=#051547><SPAN
style="FONT-SIZE: 12px">CopyRingt 2006
清水河源工作室</SPAN></FONT></TD>
</TR></TBODY></TABLE></DIV></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV></DIV></BODY>
<%
sub edit()
'call buyok_check_path()
oldpassword=trim(request("oldpassword"))
Pw1=trim(request("pw1"))
Pw2=trim(request("pw2"))
if oldpassword="" or Pw1="" or pw2="" then
response.write "<script language='javascript'>"
response.write "alert('出错了,填写不完整,请输入原密码及新密码。');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if Pw1<>pw2 then
response.write "<script language='javascript'>"
response.write "alert('出错了,两次输入的新密码不符。');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if len(pw1)<6 then
response.write "<script language='javascript'>"
response.write "alert('出错了,您输入的新密码的长度不够,要求最低6位。');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
set rs=conn.execute("select * from [user] where UserId='"&request.cookies("userid")&"'")
if rs("userpassword")<>md5(oldpassword) then
response.write "<script language='javascript'>"
response.write "alert('出错了,您输入的原密码不正确。');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if ucase(request.cookies("userid"))<>ucase(request.form("userid")) then
response.write "<script language='javascript'>"
response.write "alert('出错了,您无权进行此操作。');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
sql = "select * from [user] where UserId='"&request.cookies("userid")&"'"
set rs=Server.Createobject("ADODB.RecordSet")
rs.Open sql,conn,1,3
rs("userpassword")=md5(pw1)
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>"
response.write "alert('操作成功,您已经成功修改登陆密码。\n\n请牢记新的密码!');"
response.write "location.href='my_psw.asp';"
response.write "</script>"
response.end
end sub
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -