?? search_ach_3.asp
字號(hào):
<!--#include file="conn.asp"-->
<%
if session("admin")="" then
response.write "<script>alert('您無(wú)此權(quán)限');document.location.href='index.asp';</script>"
response.end
end if
%>
<%
dim user_name,testno
user_name=trim(request("user_name"))
'subject=trim(request("subject"))
testno=trim(request("testno"))
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from ach where user_name='"&user_name&"' and testno='"&testno&"'"
rs.open sql,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>查詢結(jié)果</title>
<link rel="stylesheet" href="style.css">
</head>
<body topmargin="0">
<!--#include file="top.asp"-->
<div align="center">
<table border="1" width="650" cellspacing="0" cellpadding="4" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td width="388" colspan="8" align="center">
<p align="left">查詢結(jié)果</p>
</td>
</tr>
<center>
<%
if Not(rs.bof and rs.eof) then'判別數(shù)據(jù)表中是否為空記錄
NumRecord=rs.recordcount
rs.pagesize=100
NumPage=rs.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
%>
<tr>
<td width="80" align="center">準(zhǔn)考證號(hào)</td>
<td width="60" align="center">姓名</td>
<td width="65" align="center">班級(jí)</td>
<td width="110" align="center">考次</td>
<td width="110" align="center">科目</td>
<td width="70" align="center">科目類型</td>
<td width="70" align="center">任課教師</td>
<td width="45" align="center">成績(jī)</td>
</tr>
<%if Not(rs.bof and rs.eof) then
rs.move (Cint(NoncePage)-1)*100,1
for i=1 to rs.pagesize
%>
<tr>
<td width="80" align="center"><%=rs("user_testnumber")%></td>
<td width="60" align="center"><%=rs("user_name")%></td>
<td width="65" align="center"><%=rs("user_class")%></td>
<td width="110" align="center"><%=rs("testno")%></td>
<td width="110" align="center"><%=rs("subject")%></td>
<td width="70" align="center"><%=rs("subject_type")%></td>
<td width="70" align="center"><%=rs("teacher_name")%></td>
<%if rs("ach")>=60 then%>
<td width="45" align="center"><%=rs("ach")%></td>
<%else%>
<td width="45" align="center"><font color=red><%=rs("ach")%></font></td>
<%end if%>
</tr>
<% rs.movenext
if rs.eof then exit for
next
else
response.write "<tr><td colspan=8><marquee scrolldelay=120 behavior=alternate>沒(méi)有找到任何記錄!!!</marquee></td></tr>"
end if
rs.close
set rs=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=search_ach_3.asp?page=1>首 頁(yè)</a>| |<a href=search_ach_3.asp?page="&NoncePage-1&">上一頁(yè)</a>| "
else
response.write "|首 頁(yè)| |上一頁(yè)| "
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
response.write "|<a href=search_ach_3.asp?page="&NoncePage+1&">下一頁(yè)</a>| |<a href=search_ach_3.asp?page="&NumPage&">尾 頁(yè)</a>|"
else
response.write "|下一頁(yè)| |尾 頁(yè)|"
end if
%>
頁(yè)次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font>
共<font color="#0033CC"><%=NumRecord%></font>條記錄 </div>
</td>
</table>
</center>
</div>
<p></p>
<!--#include file="down.asp"-->
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -