论文首页哲学论文经济论文法学论文教育论文文学论文历史论文理学论文工学论文医学论文管理论文艺术论文 |
<tr>
<td width="71" align="center"><%=rst("user_number")%></td>
<td width="78" align="center"><a href=xsxx.asp?id=<%=rst("id")%>><%=rst("user_name")%></a></td>
<td width="65" align="center"><%=rst("user_sex")%></td>
<td width="78" align="center"><%=rst("user_class")%></td>
<td width="110" align="center"><%=rst("user_time")%></td>
<td width="110" align="center"><%=rst("user_tel")%></td>
<td width="71" align="center"><a href=updataxx.asp?id=<%=rst("id")%>>修改</a></td>
<td width="71" align="center"><a href=deleta.asp?id=<%=rst("id")%>>删除</a></td>
</tr>
<% rst.movenext
if rst.eof then exit for
next
else
response.write "<tr><td colspan=13><marquee scrolldelay=120 behavior=alternate>没有找到任何记录!!!</marquee></td></tr>"
end if
rst.close
set rst=nothing
%>
</table>
</table>
</div>
<table width="748" border="0" align="center">
<tr>
<td height="17">
<div align="right">
<input type="hidden" name="page" value="<%=NoncePage%>">
<%
if NoncePage>1 then
response.write "|<a href=info-manager.asp?page=1>首 页</a>| |<a href=info-manager?page="&NoncePage-1&">上一页</a>| " 中国大学排名
else
response.write "|首 页| |上一页| "
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
response.write "|<a href=info-manager?page="&NoncePage+1&">下一页</a>| |<a href=info-manager?page="&NumPage&">尾 页</a>|"
else
response.write "|下一页| |尾 页|"
end if
%>
页次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font>
共<font color="#0033CC"><%=NumRecord%></font>条记录 </div> </td>
</table>
</center>
</body>
</html>
代码中最后一部分是实现分页显示记录集。删除功能是由文件deleta.asp来实现的。其实现代码比较简单,通过查找相应的记录,然后删除数据库中的该数据记录即可。实现代码如下:
<!-- #include file = "data.asp" -->
<!--#include file="user.asp"-->
<%
dim id
dim strSQL
id = Request.QueryString("id")
strSQL = "DELETE FROM st_info WHERE ID =" & id & ""
'Response.Write strSQL
'Response.End
conn.execute (strSQL)
%>
<script language = java script>
<!--
alert("删除成功!");
window.location = "info-manager.asp"
//-->
</script>
修改学生信息的功能是通过文件updataxx.asp和updataxx1.asp来实现的.它的原理是通过连接数据库,找到该记录,然后通过更新记录中的数据就可以完成信息个修改功能。代码如下:
把修改后的数据保存到数据库updataxx1.asp
<!-- #include file = "data.asp" -->
<!--#include file="user.asp"-->
<%
dim strSQL, cmdObj, rsObj
Set cmdObj = Server.CreateObject("ADODB.Command")
(科教范文网 lw.nSeAc.com编辑发布)
<!--#include file="data.asp"-->
<!--#include file="user.asp"-->
<%
set rsobj=server.createobject("adodb.recordset")
sql="select * from cj order by id desc"
rsobj.open sql,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>学生成绩管理</title>
<link rel="stylesheet" href="style.css">
</head>
<body topmargin="0">
<!--#include file="top-1.asp"-->
<div align="center">
<center>
<table width="738" height="35">
<td background="images/top_1.jpg"> <a href="cjgl.asp">统考成绩列表</a>
| <a href="search2.asp">添加统考成绩
| <a href="dkcjcx.asp">单科成绩排行榜</a> | <a href="zcjcx.asp">总分成绩排行榜</a>
|
</center>
</div>
<div align="center">
<center>
<table border="0" width="700" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><% 您可以访问中国科教评价网(www.NsEac.com)查看更多相关的文章。
if Not(rsobj.bof and rsobj.eof) then'判别数据表中是否为空记录
NumRecord=rsobj.recordcount
rsobj.pagesize=10
NumPage=rsobj.Pagecount
if request("page")=empty then
NoncePage=1
else
if Cint(request("page"))<1 then
NoncePage=1
else
NoncePage=request("page")
end if
if Cint(Trim(request("page")))>Cint(NumPage) then NoncePage=NumPage
end if
else
NumRecord=0
NumPage=0
NoncePage=0
end if
%>
<table border="1" width="700" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
<tr>
<td width="93" bgcolor="#EBE9FE" align="center">准考证号</td>
<td width="94" bgcolor="#EBE9FE" align="center">姓名</td>
<td width="94" bgcolor="#EBE9FE" align="center">班级</td>
<td width="94" bgcolor="#EBE9FE" align="center">考试场次</td>
<td width="94" bgcolor="#EBE9FE" align="center">考试科目</td>
<td width="69" bgcolor="#EBE9FE" align="center">成绩</td>
<td width="71" bgcolor="#EBE9FE" align="center">修改</td>
<td width="71" bgcolor="#EBE9FE" align="center">删除</td>
</tr>
<%if Not(rsobj.bof and rsobj.eof) then
rsobj.move (Cint(NoncePage)-1)*10,1
for i=1 to rsobj.pagesize
%>
<tr>
<td width="93" align="center"><%=rsobj("user_zkzh")%></td>
<td width="94" align="center"><%=rsobj("user_name")%></td>
<td width="94" align="center"><%=rsobj("user_class")%></td>
<td width="94" align="center"><%=rsobj("testno")%></td>
<td width="94" align="center"><%=rsobj("subject")%></td>
<%if rsobj("cj")>=60 then%>
<td width="69" align="center"><%=rsobj("cj")%></td>
<div align="right">
<input type="hidden" name="page" value="<%=NoncePage%>">
<%
if NoncePage>1 then
response.write "|<a href=ach_manager.asp?page=1>首 页</a>| |<a href=ach_manager?page="&NoncePage-1&">上一页</a>| "
else
response.write "|首 页| |上一页| "
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
response.write "|<a href=ach_manager?page="&NoncePage+1&">下一页</a>| |<a href=ach_manager?page="&NumPage&">尾 页</a>|"
else
response.write "|下一页| |尾 页|"
end if
%>
页次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font>
共<font color="#0033CC"><%=NumRecord%></font>条记录 </div>
</td>
</tr>
</table>
</center>
</body>
</html>
成绩信息的修改和删除功能同学生信息管理模块中的修改和删除功能基本相似,所需要修改的部分就是关于数据库部分的表名和字段。 (科教范文网 Lw.nsEAc.com编辑整理)
⑵单课成绩排名
单课成绩排名是由dkcjcx.asp和dkcjpm.asp实现的.其实现过程代码如下
选择排名条件dkcjcx.asp
<!--#include file="data.asp"-->
<!--#include file="user.asp"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>查询单科成绩排行榜</title>
<link rel="stylesheet" href="style.css">
</head>
<body topmargin="0">
<!--#include file="top.asp"-->
<div align="center">
<center>
<table width="738" height="35">
<td background="images/top_1.jpg"> <a href="cjgl.asp">统考成绩列表</a>
| <a href="search2.asp">添加统考成绩
| <a href="dkcjcx.asp">单科成绩排行榜</a> | <a href="zcjcx.asp">总分成绩排行榜</a>
</center>
</div>
<div align="center">
<center>
<table border="1" width="400" cellspacing="0" cellpadding="5" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td width="100%">请选择相关类目查询</td>
</tr>
<tr>
<td width="100%">
<form method="POST" action="dkpmb.asp">
<table border="0" width="100%" cellpadding="5" cellspacing="0">
<tr>
<td width="33%" align="center" bgcolor="#FFFFEC">班级</td>
<td width="33%" align="center" bgcolor="#FFFFEC">统考场次</td>
<td width="34%" align="center" bgcolor="#FFFFEC">科目</td>
</tr>
<tr>
<%set rs=createobject("adodb.recordset")
<td width="34%" align="center"><select size="1" name="subject"><%do while not rs2.eof%>
<option value="<%=rs2("kc")%>"><%=rs2("kc")%></option><%rs2.movenext%>
<%loop%>
<%rs2.close%>
</select>
</td>
</tr>
</table>
</center>
<p align="right"><input type="submit" value="提交" name="B1"></p>
</form>
<center>
</td>
</tr>
</table>
</div>
</body>
</html>
排名功能实现代码dkpm b.asp
<!--#include file="data.asp"-->
<!--#include file="user.asp"-->
<%
dim user_class,subject,testno
user_class=trim(request("user_class"))
subject=trim(request("subject"))
testno=trim(request("testno")) (科教作文网http://zw.nseAc.com)
%>
<%
set rs=server.createobject("adodb.recordset")
if user_class="all" then
sql="select * from cj where subject='"&subject&"' and testno='"&testno&"' order by cj desc"
else
sql="select * from cj where user_class='"&user_class&"' and subject='"&subject&"' and testno='"&testno&"' order by cj desc"
end if
rs.open sql,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>查询结果</title>
<link rel="stylesheet" href="style.css">
</head>
<body topmargin="0">
<!--#include file="top.asp"-->
<div align="center">
<center>
<table width="738" height="35">
<td background="images/top_1.jpg"> <a href="cjgl.asp">统考成绩列表</a>
| <a href="search_st.asp">添加统考成绩
| <a href="dkcjcx.asp">单科成绩排行榜</a> | <a href="zcjcx.asp">总分成绩排行榜</a>
</center>
</div>
<div align="center">
<table border="1" width="600" cellspacing="0" cellpadding="4" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td width="388" colspan="6" align="center">
<p align="left">查询结果</p>
</td>
</tr>
<center>
<%
if Not(rs.bof and rs.eof) then'判别数据表中是否为空记录
NumRecord=rs.recordcount
rs.pagesize=10
NumPage=rs.Pagecount
if request("page")=empty then
NoncePage=1
else
if Cint(request("page"))<1 then
NoncePage=1
else
NoncePage=request("page")
(科教范文网http://fw.nseac.com)
<tr>
<td width="107" align="center">准考证号</td>
<td width="108" align="center">姓名</td>
<td width="108" align="center">班级</td>
<td width="108" align="center">考次</td>
<td width="108" align="center">科目</td>
<td width="46" align="center">成绩</td>
</tr>
<%if Not(rs.bof and rs.eof) then
rs.move (Cint(NoncePage)-1)*10,1
for i=1 to rs.pagesize
%>
<tr>