chengji.asp

来自「吻宇考试管理系统源码 吻宇考试管理系统源码」· ASP 代码 · 共 133 行

ASP
133
字号
<!--#include file=conn.asp-->
<!--#include file=checkuser.asp-->
<%
dim rs,sql
dim id,kemu,username,score,ksdate
set rs=server.CreateObject("adodb.recordset")
sql="select * from score order by id DESC"
rs.open sql,conn,1,1
pagesize=20 '每一页的信息条数
Page=clng(Request.QueryString ("Page")) 
if page<1 then page=1
if page>rs.PageCount then page=rs.PageCount
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
	background-color: #EFF8FE;
}
body,td,th {
	font-size: 12px;
}
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
	color: #000000;
}
-->
</style>
<script language="VBScript">
sub del(id)
if confirm("你真的要删除着条考试记录吗~!") then
window.location.href"chengji_del.asp?id="&id
end if
end sub

</script>
</head>

<body>
<table width="522" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#67B0ED">
  <tr bgcolor="#EFF8FE">
    <td colspan="6"><div align="center">考试成绩管理系统</div></td>
  </tr>
  <tr bgcolor="#EFF8FE">
    <td colspan="6"><table width="522" cellpadding="0" cellspacing="0">
      <tr>
        <form name="cnwy" method="get" action="chengji_query.asp" onsubmit="return checkform()">
          <td width="90">考生条件查询: </td>
          <td width="233"><select name="lx" id="lx">
              <option value="0">查询类型</option>
              <option value="1">真实姓名</option>
              <option value="2">准考证号</option>
              <option value="3">所在班级</option>
            </select>
              <input name="tj" type="text" id="tj" value="输入你要查询的条件" size="18"></td>
          <td width="76">
            <input type="submit" name="Submit" value="查找">
          </td>
        </form>
        <td width="120"><div align="right"><a href="chengji.asp">返回考生管理首页</a></div></td>
      </tr>
    </table></td>
  </tr>
<tr bgcolor="#EFF8FE">
    <td width="87" height="16"><div align="center">考试的科目</div></td>
    <td width="97"><div align="center">考生的姓名</div></td>
    <td width="84"><div align="center">考试的分数</div></td>
    <td width="101"><div align="center">参加考试的日期</div></td>
    <td width="101"><div align="center">成绩类型</div></td>
	<td width="33"><div align="center">删除</div></td>
  </tr>

<%

if not rs.eof then
rs.movefirst
rs.AbsolutePage=Page
for i=1 to pagesize
id=rs("id")
kemu=rs("kemu")
username=rs("username")
score=rs("score")
ksdate=rs("ksdate")
wytype=rs("type")
%>
  <tr bgcolor="#EFF8FE">
    <td><div align="center"><%=kemu%></div></td>
    <td><div align="center"><%=username%></div></td>
    <td><div align="center"><%=score%></div></td>
    <td><div align="center"><%=ksdate%></div></td>
    <td><div align="center"><%=wytype%></div></td>
	<td><div align="center"><a href="#" onClick="call del(<%=id%>)">删除</a></div></td>
  </tr>
<%
rs.movenext
if rs.eof then exit for
next
else 
response.write"暂时没有任何数据"
end if
%>
<tr bgcolor="#EFF8FE"><td height="26" colspan="6"><div align="center">
  <table border=0 width='100%'>
    <tr>
      <td width="325" height="20" align=left>
        <div align="center">考试成绩信息共:<font color=#ff3333><%=rs.recordcount%></font>条 总页数:<font color=#ff3333><%=rs.PageCount%></font>页 当前第<font color=#ff3333><%=Page%>/<%=rs.pagecount%></font>页</div></td>
      <td width="190" align="right">
        <div align="center"></div>
        <div align="center"> |<a href="chengji.asp?Page=1">第一页</a>|<a href="chengji.asp?Page=<%=Page-1%>">上一页</a>|<a href="chengji.asp?Page=<%=Page+1%>">下一页</a>|<a href="chengji.asp?Page=<%=rs.PageCount%>">最后一页</a>|</div></td>
    </tr>
  </table>
</div></td>
</tr>
</table>
</body>
</html>
<%rs.close
set rs=nothing
set conn=nothing%>

⌨️ 快捷键说明

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