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

📄 result.asp

📁 学生成长管理系统V2008
💻 ASP
字号:
<!-- #include file="Include/conn.asp" -->
<%
if Session("jj")<>"" then
	Response.Write("<script>alert('您已经交卷了,不能再次提交!');history.back();</script>")
	Response.End()
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="Images/main.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	margin-left: 30px;
}
-->
</style></head>
<body>
<div id="dr"><font size=12pt color=blue><b>您的成绩正在计算中,请稍后!</b></font></div>
<%
Dim sum
sum=0
On error Resume Next

for i=1 to 100 
ti="t"&i
ai="a"&i
sql="Select * from Papers where id="&Request.Form(ti)
rs=conn.execute(sql)
%>
<div id="div<%=i%>" name="div<%=i%>" style=" display:
<%
if Request.Form(ai)=rs("ans") then
	Response.Write ("none")
end if
%>" align="left">
<b>第<%=i%>题:</b><br />
<%=rs("que")%><br  />
<%
if Request.Form(ai)<>rs("ans") then
	Response.Write ("<font color=red>X  您的回答是:"&Request.Form(ai)&",正确答案是:"&rs("ans")&"</font>")
else
	Response.Write ("<font color=red>√  "&rs("ans")&",回答正确!</font>")
	sum=sum+1
end if
%>
<hr size="1px" width="80%">
</div>
<%
Next
Response.Write("<script>dr.innerHTML='<font color=red size=15px><b>您的得分为:"&sum&"分</b></font>';</script>")

if Session("jj")<>"" then
	Response.Write("<script>alert('您已经交卷了,不能重复交卷!');location='Stu_Main.asp';</script>")
	Response.End()
end if

sql="Select * from stu where username='"&Session("username")&"'"
Set ts=Server.CreateObject("ADODB.Recordset")
ts.Open sql,conn,1,3
if ts.eof then
	Response.Write("<script>alert('您的用户名不存在,请联系管理员!');history.back();</script>")
	Response.End()
end if
if ts("cj")<>0 then
	Response.Write("<script>alert('系统中存在您的成绩记录不能再次提交试卷,请联系管理员!');history.back();</script>")
	Response.End()
end if
ts("cj")=sum
ts.Update
ts.Close
Set ts=Nothing
Session("jj")="ok"

%>
<input name="sm" type="submit" id="sm"  value=" 返 回 首 页 " onclick="location.href='Stu_Main.asp';"  style="height:50px; width:150px" />
</body>
</html>

⌨️ 快捷键说明

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