📄 exam_login.asp
字号:
<%
'option explicit
if request.form("logout")="Logout" then
session.Abandon
'Response.Write "<hr>"
end if
dim UserID ,Pass, message
message="请输入用户名和密码"
if Request.Form ("submit")="登录" then
UserID =Request.Form("UserID")
Pass =Request.Form("Pass")
%><!-- #INCLUDE FILE = "connect_login.asp" --><%
dim myrs
set myrs = server.createobject("ADODB.recordset")
myrs.open "select * from UserLogin where UserID ='" & UserID & "' and Password ='"& Pass &"'" ,myconn,3
'3=adOpenStatic,then only myrs.recordcount will work
''''''''''''''''''''''''''''''''''''''''''''''''''
if myrs.EOF then
message="用户名和密码错误,请重新输入!"
else
Session.Contents ("UserID")= UserID
Response.Redirect("exam_instructions.asp")
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>User Login</title>
</head>
<body>
<table width="80%" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr><td style="WIDTH: 500px" width=500 bgColor=gold><P align=right><strong>
<span lang="zh-cn"><font size="4">学生登录</font></span></strong> </P></td>
</tr>
</table>
<div align="left">
<table border="1" cellpadding="4" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" width="80%">
<tr bgcolor=LightGoldenrodYellow>
<td width="50%"> <STRONG><FONT
color=red><%=message%></FONT></STRONG></td>
<td width="50%" >
<form method="post" name="form_login" action="exam_login.asp">
<p> </p>
<p><b><span lang="zh-cn">用户名:</span> </b>
<input name="userid" size="20" ></p>
<p><span lang="zh-cn"><b>密码: </b></span> <input type="password" name="pass" size="21" ></p>
<p><input type="submit" value="登录" name="submit"><input type="reset" value="清空" name="B2"><span lang="zh-cn">
<a href="exam_signup.htm">新用户注册</a></span></p>
</form>
<p> </p></td>
</tr>
</table>
</div>
<table width="80%" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr><td style="WIDTH: 500px" width=500 bgColor=gold><P align=right>
<strong><span lang="zh-cn"><font size="4">在线考试系统</font></span></strong></P></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -