📄 default.asp
字号:
<%@ Language=VBScript %>
<% option explicit %>
<!--#include file="conn.asp"-->
<% if Request.ServerVariables("http_method")="POST" then
if Request.Form("logon")="logon" then
'学生登录的处理
'name=cast(trim(request("name")))
dim rs,sql
if trim(request("name"))="" or trim(request("studentpassword"))="" or trim(request("studentname"))=""then
response.write "<center><br><font color=blue><b>请正确输入准考证号、姓名、密码,注意大小写、全角半角字符?!<p> <a href=# onclick='javascript:window.history.go(-1)'>返 回</a></font></b></center>"
response.end
end if
set rs = server.createobject("adodb.recordset")
sql="select * from student where studentname='" & Request.Form("studentname") & "' "
rs.open sql,conn,1,1
if err.number<>0 then
response.write "数据库操作失败:"&err.description
else if rs.bof and rs.eof then
response.write "<center>请输入正确的用户名、密码!</center>"
rs.close
else
if rs("studentpassword")=request.form("studentpassword") and rs("name")=request.form("name") then
session("studentname")=request.form("studentname")
session("name")=request.form("name")
session("studentpassword")=request.form("studentpassword")
session("dq")=rs("dq")
dim rsdq,sqldq
sqldq="select * from dq where dq='"&rs("dq")&"'"
set rsdq=conn.execute(sqldq)
session("dqq")=rsdq("dqq")
rs.close
set rs=nothing
call endConnection()
Response.Redirect "selectsubject.asp"
else
if rs("studentpassword")<>request.form("studentpassword") then
response.write "<center>密码或者准考证号不正确,注意大小写、全角半角字符,请重新登陆。</center>"
end if
if rs("name")<>request.form("name") then
response.write "<center>姓名或者准考证号不正确,注意大小写、全角半角字符,请重新登陆。</center>"
end if
end if
end if
end if
'管理员进行管理
else
'if Request.Form("logonsubmit")="管理" then
Response.Redirect "login.asp"
end if
end if
%>
<HTML>
<HEAD>
<META NAME="在线考试系统" >
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.style5 {
font-size: medium;
color: #990000;
font-family: "黑体";
}
.style6 {color: #990000}
.style12 { font-family: "宋体";
color: #333333;
}
.style17 {
font-family: "宋体";
font-size: 14px;
}
.style19 {font-family: "宋体"}
-->
</style>
</HEAD>
<BODY>
<table width="72%" height="574" border="0" align="center">
<tr>
<td height="273" colspan="2" background="images/backimage.gif">
<FORM action="default.asp" method=post id=form name=form>
<P align=center><br>
<FONT size=7><strong><font size="6" face="华文行楷"><span class="style6">计算机知识竞赛系统</span></font></strong></FONT><FONT color=green size=7><strong><font size="6" face="华文行楷"><br>
</font></strong></FONT> <span class="style5">(
<% if IsSqlDataBase=0 then Response.Write("版本Access-"&ver&"") else Response.Write("版本Sql-"&ver&"") end if %>
) <br>
</span></P>
<table width="358" height="111" border="0" align="center">
<tr>
<td width="171" height="33" valign="top">
<div align="right">身份证号: </div>
</td>
<td width="168" valign="top">
<input name=studentname style="ime-mode: disabled " id=1>
</td>
<td width="10" rowspan="3" class="a1"> </td>
</tr>
<tr>
<td width="171" height="42" valign="top">
<div align="right">考生姓名: </div>
</td>
<td width="168" valign="top">
<input style="ime-mode: enabled " id=name name=name>
</td>
</tr>
<tr>
<td width="171" valign="top">
<div align="right">考生密码: </div>
</td>
<td width="168" valign="top">
<input style="ime-mode: disabled " id=studentpassword name=studentpassword type="password">
</td>
</tr>
</table>
<P align=center> 考生登陆
<input name="logon" type="radio" value="logon" checked>
管理者登陆
<input type="radio" name="logon" value="radiobutton">
<input id=submit1 name=submit type=submit value=" 登录 ">
<a href="reguser.asp">注册新用户</a></P>
</FORM>
</td>
</tr>
<tr>
<td width="63%" height="271" valign="top" class="a4 style17">
<p><span class="style5"><strong>操作说明</strong></span><span class="a1 style19">:</span></p>
<p>正确的身份证号码是保证您在本系统是唯一的用户!<br>
</p>
<hr>
<p align="center" class="style12"><a href="http://www.luqiao.net" target="_blank"></a></p>
<p align="center">
</td>
<td width="37%" valign="top"><img src="images/pc.gif" width="200" height="269"></td>
</tr>
</table>
<table width="67%" height="2" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="70%" height="1" valign="top"><p><font size="3"><br>
</font></p></td>
<td width="30%" height="1" valign="top"> </td>
</tr>
<tr>
<td height="1" colspan="2" valign="top"><p align="center" class="style12"> </p>
</td>
</tr>
</table>
<div align="center"></div>
<p> </p>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -