randomize (这个是不是给出一个随机?) set rss=conn.execute("select top 1 * from report where 学生id="&session("id")&" and (是否补考=False or 补考成绩<>0) order by id desc ")
if rss.eof then qi=1 (这里为什么qi=1?)
else qi=rss("id")+1 (这里的qi=rss("id")+1,是为什么?)
end if set rss=conn.execute("select top 1 * from report where 学生id="&session("id")&" and (是否补考=True and 补考成绩=0) order by id desc ") if not rss.eof then qi=rss("id") (这里qi=rss("id")是为什么?)
end if
set rss=conn.execute("select top 1 * from test order by id desc") if rss.eof then %> <script language=javascript> alert("请先出题!再进行考试!"); history.back(); (history.back()是什么函数?)
</script> <% else pd=rss("判断题数") pds=rss("判断题每题分数") xz=rss("选择题数") xzs=rss("选择题每题分数") tk=rss("填空题数") tks=rss("填空题每题分数") session("ttime")=rss("考试时间") zf=pd*pds+xz*xzs+tk*tks testid=rss("id")
set rs=conn.execute("select top 1 * from type1 order by id desc")
maxtype1=rs("id") set rs=conn.execute("select top 1 * from type2 order by id desc")
maxtype2=rs("id") set rs=conn.execute("select top 1 * from type3 order by id desc")
maxtype3=rs("id") (红色的这几行是什么意思?)
sqlfind="select * from report where 试卷id="&testid&" and 学生id="&session("id")&" and (是否补考=False or 补考成绩<>0)" set rsfind=conn.execute (sqlfind) if not rsfind.eof then
%> <script language=javascript> alert("你已经参加过这次考试了,请等待下一次考试!"); window.navigate("index.asp"); </script> <%else set rsfinds=conn.execute("select * from report where 试卷id="&testid&" and 学生id="&session("id")&" and (是否补考=True and 补考成绩=0)") if not rsfinds.eof then else sqlin="insert into report (id,试卷id,学生id,分数) values("&qi&","&testid&","&session("id")&",0)" 'response.write sqlin 'response.end set rsin=conn.execute(sqlin) end if end if