?? xmm.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="pass.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>圖書館管理系統(tǒng)</title>
<link href="css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="conn.asp"-->
<%
if request("act")="edit" then
id=trim(session("id"))
if not isnumeric(id) or id="" then
response.write "<li>參數(shù)錯誤!"
response.end
end if
m1=trim(request("m1"))
m2=trim(request("m2"))
m3=trim(request("m3"))
set rs2=server.createobject("adodb.recordset")
sql2="select * from [user] where id="&id
rs2.open sql2,conn,1,3
if m1<>rs2("password") then
response.write"<script language='javascript'>alert('原始密碼輸入不正確!');window.location.href='xmm.asp?id="&id&"';</script>"
elseif m2<>m3 then
response.write"<script language='javascript'>alert('兩次密碼輸入不相同!');window.location.href='xmm.asp?id="&id&"';</script>"
else
rs2("password")=m1
rs2.update
end if
rs2.close
set rs2=nothing
response.write"<script language='javascript'>alert('修改成功!');window.location.href='xmm.asp?id="&id&"';</script>"
end if
%>
<%
set rs=conn.execute("select * from [user] where id="&session("id"))%>
<form name="form1" method="post" action="?act=edit&id=<%=id%>">
<center>
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="150"><!--#include file="top.asp"--></td>
</tr>
<tr>
<td align="center" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb">
<tr>
<td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="180" align="left" valign="top"><!--#include file="left.asp"--></td>
<td align="center" valign="top"><table width="500" border="0" cellspacing="0" cellpadding="0" height="180">
<%
dim rs,sql,id
id=trim(session("id"))
if not isnumeric(id) or id="" then
response.write "<li>參數(shù)錯誤!"
response.end
end if
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [user] where id="&cstr(id)
rs.open sql,conn,1,1
%>
<tr align="center">
<td height="30" colspan="2"><strong>修改密碼</strong></td>
</tr>
<tr>
<td height="30" width="170" align="right"> 登陸帳號:</td>
<td width="330" height="30" align="left"> <b><%=rs("username")%></b> </td>
</tr>
<tr>
<td width="170" height="30" align="right"><p align="right">原始密碼:</p></td>
<td width="330" height="30" align="left">
<input name="m1" type="text" id="m1" size="24" maxlength="12" /> </td>
</tr>
<tr>
<td width="170" height="30" align="right"><p align="right">新密碼:</p></td>
<td width="330" height="30" align="left">
<input name="m2" type="password" id="m2" size="24" maxlength="50" /> </td>
</tr>
<tr>
<td width="170" height="30" align="right"><p align="right"> 確認(rèn)新密碼:</p></td>
<td width="330" height="30" align="left">
<input name="m3" type="password" id="m3" size="24" maxlength="20" /> </td>
</tr>
<tr>
<td height="30" colspan="3" align="center" valign="middle">
<input type="submit" onclick="javascript:return CheckForm();" value=" 修 改 " name="B3" />
<input type="reset" name="button" id="button" value=" 重 置 " /></td>
<%rs.close()%>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="60"><!--#include file="bottom.asp"--></td>
</tr>
</table>
</center>
</form>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -