passwd_change.asp
资源名称:图书管理系统.rar [点击查看]
上传用户:llrg7406
上传日期:2007-03-02
资源大小:654k
文件大小:1k
源码类别:
教育系统应用
开发平台:
Delphi
- <%@ Language=VBScript %>
- <%
- if (isempty(session("username")) or len(session("username"))=0) then
- Response.Write "您的登录已过期,请重新登录。"
- Response.End
- end if
- set conn = server.CreateObject("adodb.connection")
- conn.Open application("dsn")
- newpass = Request.Form("newpass")
- oldpass = Request.Form("oldpass")
- oldpass = replace(oldpass,"'","''")
- sql ="select * from usertype where name='" & session("username") & "' and passwd ='" & oldpass & "'"
- set rs = server.CreateObject("adodb.recordset")
- rs.Open sql,conn
- if rs.EOF then
- rs.Close
- set rs = nothing
- conn.Close
- set conn=nothing
- Response.Write "用户名或密码不正确。"
- Response.End
- end if
- rs.Close
- set rs=nothing
- sql = "update usertype set passwd='" & newpass & "' where name='" & session("username") & "'"
- conn.Execute sql
- conn.Close
- set conn = nothing
- %>
- <HTML>
- <HEAD>
- <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
- <link rel="stylesheet" type="text/css" href="xcss.css">
- </HEAD>
- <BODY background=images/zapsmbknd.gif>
- <p>
- <TABLE border=0 cellPadding=1 cellSpacing=1 width="75%">
- <TR>
- <TD align=center><div class="zTitle">密码修改成功!</div></TD>
- <TR>
- <TR>
- <TD align=center><INPUT type="button" name=cancel value="确定" onclick="javascript:window.close();"></TD></TR>
- </TABLE></P>
- </BODY>
- </HTML>