应用ASP开发的一个简单学校考试系统
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<%
IF Request.QueryString("delid")<>"" Then
%>
<script language="VBScript">
Dim MyVar
MyVar=MsgBox("确定要清空该考生考试资料吗?",4)
if MyVar=vbYes then
<%
set rs=server.createobject("ADODB.recordset")
sql="select * from kazl where ksid="&Request.QueryString("delid")
rs.open sql,conn,3,2
do while not rs.eof
rs("ksip")=""
for i=1 to 50
rs("ti"&i)=""
rs("ksdaan"&i)=""
rs("fs"&i)=0
next
rs("kszf")=0
rs.update
rs.movenext
loop
rs.close
set rs=nothing
%>
alert "考生可以重新参加考试了!"
end if
</script>
<%
response.Write "<script LANGUAGE=javascript>window.open('admin_main.asp?delid=&temp="&now()&"&page="&request.QueryString("page")&"','mainFrame')</script>"
End IF
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link href="css/css.css" rel="stylesheet" type="text/css">
</head>
<body ><br><br>
<table width="775" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#00659C">
<%
set rs=server.createobject("adodb.recordset")
sql = "SELECT * from kazl order by ksid asc"
rs.open sql,conn,1,1
rs.pagesize=15
if len(request.QueryString("page"))=0 or cint(request.QueryString("page"))<1 then
ipage=1
elseif cint(request.QueryString("page"))>rs.pagecount then
ipage=rs.pagecount
else
ipage=request.QueryString("page")
end if
rs.absolutepage=ipage
%>
<tr align="center" bgcolor="#00659C">
<td width="94" class="111"><span class="l11"><strong >班级</strong></span></td>
<td width="114" class="l11"><span class="l11"><strong>学号</strong></span></td>
<td width="97" class="l11"><span class="l11"><strong>姓名</strong></span></td>
<td width="165" class="l11"><span class="l11"><strong>登录地址</strong></span></td>
<td width="93" class="l11"><span class="l11"><strong>分数</strong></span></td>
<td width="193" class="l11"><span class="l11"><strong>操作</strong></span></td>
</tr>
<%
for i=1 to rs.pagesize
if not rs.eof then %>
<tr align="center" bgcolor="#FFFFFF">
<td width="94" class="p11"> <%=rs("ksbj")%></td>
<td width="114" class="p11"> <a onClick="window.open('admin_ksmain.asp?ksid=<%=rs("ksid")%>',
'_blank','fullscreen=yes,scrollbars=auto,menu=0,toolbar=0,location=0,status=0')" ><%=rs("ksxszh")%></a></td>
<td width="97" class="p11"> <%=rs("ksxm")%></td>
<td width="165" class="p11"> <%=rs("ksip")%></td>
<td width="93" class="p11"> <%=rs("kszf")%></td>
<td width="193" class="p11"><a href="?page=<%=ipage%>&delid=<%=rs("ksid")%>" class="p12" >重考</a> <a onClick="window.open('admin_hefen.asp?ksid=<%=rs("ksid")%>', '_blank','height=300,width=600,top=0,left=0,scrollbars=auto,menu=0,toolbar=0,location=0,status=0')" class="p12" >合分</a></td>
</tr>
<% rs.movenext %>
<% end if
next %>
</table>
<p align="center" class="p11"> <a href=?page=1>第一页</a> <a href=?page=<%=ipage-1%>>上一页</a> <a href=?page=<%=ipage+1%>>下一页</a> <a href=?page=<%=rs.pagecount%>>最后一页</a></p>
</body>
</html>