www.pudn.com > Xiao5u_Exam_v2011627.rar > ResultSearch.asp, change:2010-12-10,size:3671b


<!--#include file="inc/right.asp"-->  
<!--#include file="inc/conn.asp"--> 
<% 
sname=Request("sname") 
%> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<title>后台管理</title> 
<link href="images/main.css" rel="stylesheet" type="text/css"> 
<script language=JavaScript> 
<!-- 
function DoEmpty(params) 
{ 
if (confirm("真的要删除这条记录吗?删除后此记录里的所有内容都将被删除并且无法恢复!")) 
window.location = params ; 
} 
//--> 
</script> 
</head> 
<body> 
<table width="100%" border="0" cellpadding="0" cellspacing="0"> 
  <tr valign="top"> 
    <td bgcolor="#FFFFFF"><br> 
      <table width="96%"  border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#aec3de"> 
		<tr align="center" bgcolor="#F2FDFF"> 
          <td class="optiontitle" colspan="8">查询结果</td>	 
        </tr> 
		<tr align='center' bgcolor="#ebf0f7"> 
          <td width="12%">班级</td> 
		  <td width="6%">学号</td> 
		  <td width="14%">姓名</td> 
          <td width="28%" colspan="3">操作</td> 
		  <td width="20%">提交地址</td> 
		  <td width="20%">提交时间</td> 
		</tr> 
<% 
if sname="" then 
%> 
        <tr align="center" bgcolor="#F2FDFF"> 
          <form name="search" method="get" action="ResultSearch.asp"> 
            <td height="30" colspan="8"> <strong>查找学生:</strong> <input name="sname" type="text" id="sname" maxlength="4">  
              <input name="Query" type="submit" id="Query" value="查 询">   请输入学生姓名。</td> 
          </form> 
        </tr> 
<%end if%>   
<% 
if sname<>"" then '通过搜索查询学生成绩 
   sql="select * from Result where sname like '%"&sname&"%' order by id asc" 
 set rs=server.createobject("adodb.recordset")  
 rs.open sql,conn,1,1 
 if not rs.eof Then 
    proCount=rs.recordcount 
    For i = 1 to proCount 
    if rs.EOF then      
    Exit For  
    end if 
%> 
 
		<tr align='center' bgcolor='#FFFFFF' onmouseover='this.style.background="#ebf0f7"' onmouseout='this.style.background="#FFFFFF"'> 
          <td> <%=rs("sclass")%></td> 
          <td align="center"> <%=rs("sno")%></td> 
          <td> <%=rs("sname")%></td> 
          <td align="center"> <%if rs("total")<>"" then%> <font color="#FF0000"><%=rs("total")%></font> 分 <%else%> 未打分 <%end if%> </td> 
          <td align="center"><a href="Result.asp?action=edit&id=<%=rs("id")%>">阅卷</a></td> 
          <td align="center"><a href="javascript:DoEmpty('Result.asp?wor=del&id=<%=rs("id")%>')">删除</a></td> 
          <td> <%=rs("addip")%></td> 
          <td> <%=rs("addtime")%></td> 
<% 
rs.MoveNext  
next 
%> 
 
		</tr> 
        <tr align="center" bgcolor="#F2FDFF">  
         <form name="search" method="get" action="ResultSearch.asp"> 
           <td height="30" colspan="8"> <strong>查找学生:</strong> <input name="sname" type="text" id="sname" maxlength="4">  
           <input name="Query" type="submit" id="Query" value="查 询">   再次输入学生姓名查找。</td> 
         </form> 
        </tr>		 
<% 
else 
%> 
        <tr align='center' bgcolor='#F2FDFF'> 
          <form name="search" method="get" action="ResultSearch.asp"> 
           <td height="30" colspan="8"> <strong>查找学生:</strong> <input name="sname" type="text" id="sname" maxlength="4">  
           <input name="Query" type="submit" id="Query" value="查 询">   请输入学生姓名。</td> 
          </form> 
        </tr> 
        <tr align="center" bgcolor="#FFFFFF"> 
          <td colspan="8">对不起!目前库中还没有学生 <font color="#FF0000"><%=sname%></font> 的成绩表!</td> 
        </tr> 
<% 
end if 
rs.close 
set rs=nothing 
end if 
%> 
      </table>  
    </td> 
  </tr> 
</table> 
</body> 
</html>