?? list_chengji_st.asp
字號:
<!--#include file="open.asp" -->
<!--#include file="inc/md5.inc" -->
<%path_name=request.servervariables("SCRIPT_NAME")
strnum=len(path_name)-instrrev(path_name,"/")
self_name=right(path_name,strnum)%>
<%
doing=request.querystring("doing")
if doing="login" then '用戶登錄
user_id=trim(request.form("user_id"))
pass=trim(request.form("pass"))
if user_id<>"" and pass<>"" and instr(user_id,"'")=0 and instr(user_id,"&")=0 then
pass=ucase(md5(pass))
str="select * from user_teacher where teacher_user='"&user_id&"' and teacher_pass='"&pass&"'"
set rs=conn.execute(str)
if not rs.eof then
session("zzteacher")=true
session("name")=rs("teacher_name")
if rs("teacher_class")="超級管理員" then session("zzadmin")=true end if
else
str="select * from user_student where 學籍號='"&user_id&"' and 密碼='"&pass&"'"
set rs=conn.execute(str)
if not rs.eof then
session("zzstudent")=true
session("student_id")=user_id
session("name")=rs("姓名")
session("student_bj")=rs("班級")
end if
end if
end if
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><!--#include file="inc/css.css" -->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>留溪在線考試</title>
</head>
<body topmargin="1">
<!--#include file="top.asp" -->
<!--#include file="menu.asp" -->
<table width="770" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#ff99cc" bgcolor="#edebdb">
<%if session("zzteacher")=true or session("zzstudent")=true then%>
<tr>
<td height="20" class="unnamed12"><div align="center">用戶已登錄 用戶類別:
<%if session("zzstudent")=true then%>學生 學籍號:<%=session("student_id")%> 姓名:<%=session("name")%> 班級:<%=session("student_bj")%><%end if%>
<%if session("zzteacher")=true then%>教師 姓名:<%=session("name")%><%end if%>
<%if session("zzadmin")=true then%><a href=system_setup.asp>系統設置</a><%end if%>
<a href="quit.asp?back=<%=self_name%>">退出</a></div></td>
</tr>
<%else%>
<tr>
<td height="20" class="unnamed12"> <form name="form1" method="post" action="<%=self_name%>?doing=login">
<div align="center">用戶登錄 輸入學籍號或用戶名:
<input name="user_id" type="text" id="user_id" value=<%=id_disp%> size="20">
密碼:
<input name="pass" type="password" id="pass" size="16">
<input type="submit" name="Submit" class="unnamed12" value="登錄">
<input type="reset" name="Submit2" class="unnamed12" value="重填">
<a href="reg.asp?back=<%=self_name%>">注冊</a> <a href="rereg.asp">忘記密碼</a></div>
</td></form>
</tr>
<%end if%>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="unnamed4"> </td>
</tr>
</table>
<%if session("zzstudent")=true then%>
<table width="770" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#ff99cc" bgcolor="#edebdb">
<tr>
<td width="767" height="24">
<div align="center" class="unnamed14h20"> <span class="unnamed12H"><font color="#FF0000"><marquee direction="left" scrolldelay="200">
<font color="#0000FF">注意:一旦對某試卷查詢分數后,就不能再次進入該試卷繼續進行考試,請謹慎使用此功能。</font>
</marquee>
</font></span> </div></td>
</tr>
</table>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="unnamed4"> </td>
</tr>
</table>
<%if doing="list_cj" then 'abcd %>
<%
list_name=request.querystring("list_name")
list_tk=request.querystring("list_tk")
str="select 題號,正確答案,完成答案,試題數,正確數,錯誤數,得分,完成 from "&list_name&" where 學籍號='"&session("student_id")&"'"
set rs=conn.execute(str)
if rs("完成")<>"1" then
temp1=rs("正確答案") '開始計算分數
temp2=rs("完成答案")
ok=0
notok=0
for m=1 to rs("試題數")
daok=mid(temp1,m*6-5,6)
da=mid(temp2,m*6-5,6)
if daok=da then ok=ok+1 else notok=notok+1 end if
next
cj=ok*100/rs("試題數")
str="update "&list_name&" set 正確數="&ok&",錯誤數="¬ok&",得分="&cj&",完成='1' where 學籍號='"&session("student_id")&"'"
conn.execute(str) '計算分數結束
str="select 題號,正確答案,完成答案,試題數,正確數,錯誤數,得分 from "&list_name&" where 學籍號='"&session("student_id")&"'"
set rs=conn.execute(str)
end if
%>
<table width="770" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#ff99cc" bgcolor="#edebdb">
<tr>
<td width="200" valign="top">
<table width="163" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="unnamed6"> </td>
</tr>
<tr>
<td background="images/top01.gif" class="unnamed10"> </td>
</tr>
<tr>
<td height="20" background="images/mid01.gif"><table width="150" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="unnamed12">
<td width="60%"><div align="right">試題總數:</div></td>
<td width="40%"><%=rs("試題數")%></td>
</tr>
</table></td>
</tr>
<tr>
<td height="20" background="images/mid01.gif"><table width="150" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="unnamed12">
<td width="60%"><div align="right">答對數量:</div></td>
<td width="40%"><%=rs("正確數")%></td>
</tr>
</table></td>
</tr>
<tr>
<td height="20" background="images/mid01.gif"><table width="150" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="unnamed12">
<td width="60%"><div align="right">答錯數量:</div></td>
<td width="40%"><%=rs("錯誤數")%></td>
</tr>
</table></td>
</tr>
<tr>
<td height="20" background="images/mid01.gif"><table width="150" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="unnamed12">
<td width="60%"><div align="right">總 得 分:</div></td>
<td width="40%"><%=rs("得分")%></td>
</tr>
</table></td>
</tr>
<tr>
<td background="images/bottom01.gif" class="unnamed10"> </td>
</tr>
<tr>
<td class="unnamed6"> </td>
</tr>
</table></td>
<td width="570" valign="top"><table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="unnamed6"> </td>
</tr>
</table>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" bgcolor="#999999">
<div align="center" class="unnamed16"><strong>詳 細 顯 示</strong></div></td>
</tr>
</table>
<table width="500" border="1" align="center" cellpadding="0" cellspacing="0">
<tr class="unnamed12">
<%
test_no_all=rs("題號")
daok_all=rs("正確答案")
da_all=rs("完成答案")
test_all=rs("試題數")
for m=1 to rs("試題數")
daok=mid(daok_all,m*6-5,6)
da=mid(da_all,m*6-5,6)
test_no=mid(test_no_all,m*4-3,4)
%>
<td height="24"><div align="center"><a href=list_chengji_st.asp?doing=list_cj&list_tk=<%=list_tk%>&an=<%=da%>&disp=tm&tm_id=<%=m%>&tk_id=<%=test_no%>&list_name=<%=list_name%>>第<%=m%>題</a><%if da="000000" then%>
<font color="#FF00FF">未答</font>
<%else%><%if da=daok then%>
<font color="#0000FF">正確</font>
<%else%>
<font color="#FF0000">錯誤</font>
<%end if%><%end if%></div></td>
<%if m mod 5=0 and m<test_all then%></tr><tr class="unnamed12"><%end if%>
<%next%>
<%if m mod 5=0 then%><td> </td><%end if%>
<%if m mod 5=4 then%><td> </td><td> </td><%end if%>
<%if m mod 5=3 then%><td> </td><td> </td><td> </td><%end if%>
<%if m mod 5=2 then%><td> </td><td> </td><td> </td><td> </td><%end if%>
</tr>
</table>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="unnamed6"> </td>
</tr>
</table></td>
</tr>
</table>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="unnamed6"> </td>
</tr>
</table>
<% 'xyz
disp=request.querystring("disp")
if disp="tm" then
an=request.querystring("an")
tm_id=request.querystring("tm_id")
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -