📄 cj_show_all.asp
字号:
<!--#include file="chkadmin.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<title>学生成绩管理系统</title>
</head>
<body>
<%
Dim j(8)
xid=Trim(Request("id"))
If Not IsNumeric(Trim(Request("id"))) Then
Response.Write "填写的学号必须是数字,请后退重新填写!"
Response.end
End If
set rs=server.createobject("adodb.recordset")
rs.open "select * from [stu] where xid="&xid,conn,1,1
If rs.bof or rs.Eof Then
Response.Redirect "stu_name_no.asp"
Response.End
End If
stuid=rs("id")
stuname=rs("name")
stusex=rs("sex")
classid=rs("classid")
rs.close
rs.open "select * from [class] where id="&classid,conn,1,1
classnum=rs("num")
proid=rs("proid")
rs.Close
rs.open "select * from [pro] where id="&proid,conn,1,1
xi=rs("xi")
pro=rs("pro")
rs.Close
classname=xi&pro&classnum&"班"
%>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#ffffff" width="100%">
<tr>
<td width="100%" background="../Images/admin_table_bg.gif" height="25" colspan="2">
<p align="center"><b><font color="#FFFFFF">学生成绩查询</font></b></td>
</tr>
<tr>
<td width="100%" height="15" bgcolor="#D9E6FF" colspan="2">姓名:<%=stuname%> 性别:<%=stusex%> 学号:<%=stiid%> 班级:<%=classname%></td>
</tr>
<%
set rs2=server.createobject("adodb.recordset")
set rs3=server.createobject("adodb.recordset")
rs.open "select * from [jec]",conn,1,1
If rs.RecordCount=0 Then
Else
do while not rs.eof
If rs("proid")=proid Then
j(1)=rs("j1")
j(2)=rs("j2")
j(3)=rs("j3")
j(4)=rs("j4")
j(5)=rs("j5")
j(6)=rs("j6")
j(7)=rs("j7")
j(8)=rs("j8")
jecsum=rs("jecsum")
jecid=rs("id")
%>
<tr>
<td width="11%" bgcolor="#D9E6FF"><%=rs("jec")%> </td>
<td width="89%" bgcolor="#D9E6FF">
<%
for i=1 to jecsum
rs2.open "select * from [sub] where id="&j(i),conn,1,1
Response.write rs2("sub")&":"
subid=rs2("id")
'sql="Select * from [chengji] Where stuid="&stuid&" and subid="&subid&" and jecid="&jecid
rs3.open "Select * from [chengji]",conn,1,3
If rs3.Eof Then
Response.Write "数据库[chengji]表中没有数据!"
End If
do While Not rs3.Eof
yn=0
if rs3("stuid")=Cint(stuid) and rs3("subid")=Cint(subid) and rs3("jecid")=Cint(jecid) Then
Response.Write rs3("cj") & " "
yn=1
exit do
End If
rs3.MoveNext
Loop
If yn<>1 Then
Response.Write "<font color=red>无</font>" & " "
End If
rs3.Close
rs2.Close
Next
%> </td>
</tr>
<%
End If
rs.MoveNext
Loop
End If
rs.Close
Set rs=nothing
Set rs2=nothing
Set rs3=nothing
Set fs=nothing
%>
</table>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -