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

📄 logon.asp

📁 图书管理系统
💻 ASP
字号:
<%@ 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"
%>

⌨️ 快捷键说明

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