📄 check.asp
字号:
<HTML>
<HEAD>
<TITLE><%=title%></TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link rel="stylesheet" type="text/css" href="css/index1.css">
<link rel="stylesheet" type="text/css" href="css/toolbar2.css">
<META content="Microsoft FrontPage 4.0" name=GENERATOR>
<base target="_self">
</HEAD>
<BODY background="image/A-bg.gif" leftMargin=0 topMargin=0>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 class=c width=760>
<tr>
<td width=100% height="197" align="center">
<table border="0" cellspacing="0" cellpadding="0" height="85" bgcolor="#eeeeee" width="100%">
<tr>
<td align="center">
<%
username=TRIM(Request.Form("username"))
pwd=TRIM(Request.Form("pwd"))
identity=Request.Form("identity")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("CSTUDY.mdb")
set rs= server.createobject("adodb.recordset")
If identity="student" then
sql1 = "SELECT * FROM user where IDname='" & username & "'"
sql2 = "UPDATE user Set amount=amount+1 where IDname='" & username & "'"
End if
If identity="teacher" then
sql1 = "SELECT * FROM teacher where IDname='" & username & "'"
sql2 = "UPDATE teacher Set amount=amount+1 where IDname='" & username & "'"
End if
set rs=conn.Execute(sql1)
if rs.Bof or rs.eof then
isun="true"
elseif pwd<>Rs("passwd") then
isun="true"
end if
If not isun="true" Then
conn.execute(sql2)
end if
%>
<%if isun="true" then%>
<font color="#FF0000" face="华文行楷" size="4"><b>用户名或密码出错,重新输入请点击<a href="index.asp">这里</a>!</b></font><br><br>
<font color="#FF0000" face="华文行楷" size="4"><b>如果您还没有成为我们的会员,请先注册!!</b></font><br><br>
<a href="newuser.asp"><font face="华文行楷" size="4"><b>注册新用户</b></font></a>
<%else
session("login")=rs("IDname")
session("identity")=identity
%>
<a href="index.asp"><font face="华文行楷" size="4"><b>登录成功!!正在提交……</b></font></a>
<%
end if
rs.close
set rs=nothing
conn.Close
set conn=nothing
%>
</td>
</tr>
</table>
</td>
<td valign="middle" align="center">
</td>
</tr>
</table>
</BODY>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -