⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 search2.asp

📁 学校成绩查询系统是一个非常好的软件请大家试试
💻 ASP
字号:
<!--#include file="dataconn.asp"-->
<%
xh=trim(request.querystring("xh"))
stuname=trim(request.querystring("stuname"))
team=trim(request.querystring("team"))
set rs=conn.execute("select cxsetup from cominfo")
cxsetup=rs("cxsetup").value
rs.close
set rs=nothing   
if team="all" then 
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"'"
team="当前时段所有考试"
else
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"' and ksname='"&team&"'"
end if
on error resume next
set rs=conn.execute(sql)
if err then
response.write "对不起,还没有该次考试成绩!"
response.end
end if
totalput=rs.RecordCount
if rs.eOF then
	Response.Write escape("<font color=#ff0000>对不起,没有查询到该记录,请检查你输入的号码和姓名是否对应!</font>")
response.end
end if

if team="当前时段所有考试" then
response.write escape("<TABLE height=20 cellSpacing=0 cellPadding=0 width=90% align=center border=0><TBODY><TR><TD width=117>&nbsp;&nbsp;单位: <FONT color=green>"&rs("nj")&rs("bj")&"</FONT></TD>")
response.write escape("<TD width=174>姓名:<FONT color=green>"&xh&"</FONT</TD>")
response.write escape("<TD width=278>&nbsp;</TD></TR></TBODY></TABLE>")
response.write escape("<TABLE height=20 cellSpacing=0 cellPadding=0 width=95% align=center border=0>")
response.write escape("<TBODY><TR><TD vAlign=center>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"&team&"成绩列表</TD>")
response.write escape("<TD width=60>&nbsp;</TD></TR></TBODY></TABLE>")

set rssubject=conn.execute("select testname from testmdb,term,studentpmb where studentpmb.ksname=testmdb.testname and studentpmb.stuidh='"&xh&"' and term.tname=testmdb.term and term.tnow=1")
do while not rssubject.eof
testname=rssubject("testname").value
response.write escape("<TABLE height=20 cellSpacing=0 cellPadding=0 width=90% align=center border=0><TBODY><TR><TD>&nbsp;&nbsp;<font color=green><strong>考试名称:"&testname&"</strong></font></TD></TR></TBODY></TABLE>")
response.write escape("<TABLE style=""BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #cccccc 1px solid; COLOR: #444444; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eff4ff"" ")
response.write escape("cellSpacing=1 borderColorDark=#ffffff cellPadding=0 width=90% align=center borderColorLight=#ffffff border=0>")
response.write escape("  <TBODY><TR>")
set rs1=conn.execute("select subjectname from subjectks where testname='"&testname&"'")
strsubject=""
do while not rs1.eof
subject=rs1("subjectname") 
strsubject=strsubject&subject&","
rs1.movenext
loop
set rs1=nothing
strsubject=left(strsubject,len(strsubject)-1)
Dimstrsubject=split(strsubject,",")
kms=ubound(dimstrsubject)
subjectt=""
for i=0 to kms
strsubject=Dimstrsubject(i)
subjectt=subjectt&"<TD><div align=""center""><strong><font color=#000000>"&strsubject&"</font></strong></div></TD>"
next
response.write escape(subjectt)

set rs=conn.execute("select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"' and ksname='"&testname&"'")
do while not rs.eof
subjectname=""
for i=0 to kms
strsubject=dimstrsubject(i)
subjectname=subjectname&"<TD height=22><div align=""center""><strong><font color=#000000>"&rs(strsubject)&"</font></strong></div></TD>"
if cxsetup="1" then
subjectname=subjectname&"<TD><div align=""center""><strong><font color=#cccccc>"&rs(strsubject&"bm")&"</font></strong></div></TD><TD><div align=""center""><strong><font color=#cccccc>"&rs(strsubject&"nm")&"</font></strong></div></TD>"
end if
next
response.write escape("<TR bgColor=#ffffff>")
response.write escape(subjectname)
if cxsetup="1" or cxsetup="2" then
response.write escape("<TD height=22><div align=center><strong><font color=#cc0000>"&rs("bjpm")&"</font></strong></div></TD>")
response.write escape("<TD height=22><div align=center><strong><font color=#cc0000>"&rs("njpm")&"</font></strong></div></TD>")
end if
rs.movenext
loop
response.write escape("</TD></TR></TBODY></TABLE>")
rssubject.movenext
loop
set rssubject=nothing
else
response.write escape("<TABLE height=20 cellSpacing=0 cellPadding=0 width=90% align=center border=0><TBODY><TR><TD width=117>&nbsp;&nbsp;单位: <FONT color=green>"&rs("nj")&rs("bj")&"</FONT></TD>")
response.write escape("<TD width=174>姓名:<FONT color=green>"&xh&"</FONT</TD>")
response.write escape("<TD width=278>&nbsp;</TD></TR></TBODY></TABLE>")

response.write escape("<TABLE height=20 cellSpacing=0 cellPadding=0 width=90% align=center border=0><TBODY><TR><TD>&nbsp;&nbsp;<font color=green><strong>考试名称:"&team&"</strong></font></TD></TR></TBODY></TABLE>")
response.write escape("<TABLE style=""BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #cccccc 1px solid; COLOR: #444444; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eff4ff"" ")
response.write escape("cellSpacing=1 borderColorDark=#ffffff cellPadding=0 width=90% align=center borderColorLight=#ffffff border=0>")
response.write escape("  <TBODY><TR>")
set rs1=conn.execute("select subjectname from subjectks where testname='"&team&"'")
strsubject=""
do while not rs1.eof
subject=rs1("subjectname") 
strsubject=strsubject&subject&","
rs1.movenext
loop
set rs1=nothing
strsubject=left(strsubject,len(strsubject)-1)
Dimstrsubject=split(strsubject,",")
kms=ubound(dimstrsubject)
for i=0 to kms
strsubject=Dimstrsubject(i)
subjectt=subjectt&"<TD><div align=""center""><strong><font color=#000000>"&strsubject&"</font></strong></div></TD>"
next
response.write escape(subjectt)

do while not rs.eof
subjectname=""
 
for i=0 to kms
strsubject=dimstrsubject(i)
subjectname=subjectname&"<TD height=22><div align=""center""><strong><font color=#000000>"&rs(strsubject)&"</font></strong></div></TD>"
if cxsetup="1" then
subjectname=subjectname&"<TD><div align=""center""><strong><font color=#cccccc>"&rs(strsubject&"bm")&"</font></strong></div></TD><TD><div align=""center""><strong><font color=#cccccc>"&rs(strsubject&"nm")&"</font></strong></div></TD>"
end if
next
response.write escape("<TR bgColor=#ffffff>")
response.write escape(subjectname)
	 rs.movenext
	 loop
response.write escape("</TD></TR></TBODY></TABLE>")
end if
rs.close
set rs=nothing
set rs1=nothing
conn.close
set conn=nothing
%>


⌨️ 快捷键说明

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