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

📄 xmm.asp

📁 自己做的毕业设计
💻 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>图书馆管理系统</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>参数错误!"
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>参数错误!"
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">&nbsp;<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">&nbsp; 确认新密码:</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" />
&nbsp;&nbsp;&nbsp;
      <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>

⌨️ 快捷键说明

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