logon.asp
资源名称:图书管理系统.rar [点击查看]
上传用户:llrg7406
上传日期:2007-03-02
资源大小:654k
文件大小:1k
源码类别:
教育系统应用
开发平台:
Delphi
- <%@ Language=VBScript %>
- <%
- name = Request.Form("name")
- passwd = Request.Form("passwd")
- sql = "select name,passwd,type from usertype where name ='" & name & "'"
- set conn = server.CreateObject("adodb.connection")
- conn.Open application("dsn")
- set rs = server.CreateObject("adodb.recordset")
- rs.Open sql,conn
- if rs.EOF then
- response.write "错误的用户名或密码!"
- rs.Close
- set rs = nothing
- conn.Close
- set conn = nothing
- Response.End
- end if
- if not (rs("passwd") = passwd) then
- response.write "错误的用户名或密码!"
- rs.Close
- set rs = nothing
- conn.Close
- set conn = nothing
- Response.End
- end if
- session("username") = rs("name")
- session("usertype") = rs("type")
- rs.Close
- set rs = nothing
- sql = "update visit set visitnum = visitnum +1"
- conn.Execute sql
- conn.Close
- set conn = nothing
- Response.Redirect "frame.asp"
- %>