📄 ph.asp
字号:
<!--#include file=pass.asp-->
<!--#include file="conn.asp"-->
<meta http-equiv="Content-Language" content="zh-cn">
<link href="inc_style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-color: #E7EEF5;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<div align="center">
<table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">
<tr bgcolor="#B6EBC4">
<td height="20" bgcolor="#E8EEF4" style="margin-top: 0; margin-bottom: 0"> </td>
</tr>
</table>
</div>
<div align="center">
<center>
<table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">
<FORM name=thisForm action="" method=POST >
<%
dim ThisPage,Pagesize,Allrecord,Allpage
if request("page")="" then
ThisPage=1
else
ThisPage=request("page")
end if
cnmai=request("cnmai")
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select book_id from jieyue group by [book_id]"
rs.open sql,conn,1,1
if rs.eof then
response.write "<li>还没有相关信息!"
response.end
end if
rs.Pagesize=10
Pagesize=rs.Pagesize
Allrecord=rs.Recordcount
Allpage=rs.Pagecount
if ThisPage<1 then
ThisPage=1
end if
On Error Resume Next
rs.move (ThisPage-1)*Pagesize
k=0
%>
<tr bgcolor="#B6EBC4">
<td width="10%" height="30" bgcolor="#C5D5E4" >
<p align="center">排行</td>
<td width="36%" height="30" bgcolor="#C5D5E4" >
<p align="center">书名</td>
<td width="20%" height="30" bgcolor="#C5D5E4" >
<p align="center"> 作者</td>
<td width="17%" align="center" valign="middle" bgcolor="#C5D5E4" > 出版社</td>
<td width="9%" align="center" valign="middle" bgcolor="#C5D5E4" > 借阅数</td>
</tr>
<%
dim id
do while not rs.eof
book_id=rs(0)
%>
<tr onMouseOver="this.style.backgroundColor='#EFE8D6';return true;" onMouseOut="this.style.backgroundColor='#FFFFFF';">
<td width="10%" height="25" bgcolor="#E3EBF2" >
<p align="center"><%=k+1%></td>
<td width="36%" height="25" bgcolor="#E3EBF2" >
<p align="center"><%=trim(conn.execute("select * from [book] where id="&book_id)("B_NAME"))%></td>
<td width="20%" height="25" align="center" bgcolor="#E3EBF2" >
<%=trim(conn.execute("select * from [book] where id="&book_id)("B_WRITER"))%></td>
<td width="17%" align="center" valign="middle" bgcolor="#E3EBF2" ><%=trim(conn.execute("select * from [book] where ID="&book_id)("B_CONCERN"))%></td>
<td width="9%" align="center" valign="middle" bgcolor="#E3EBF2" ><%response.Write conn.execute("select count(book_id) as ctt from [jieyue] where [book_id]=6")(0)%></td>
</tr>
<%
k=k+1
rs.movenext
if k>=Pagesize then exit do
loop
rs.close
set rs=nothing
%>
<tr>
<td height="30" colspan="5" bgcolor="#E3EBF2">
<table width="98%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">
<tr>
<td height="17" width="151" align="center">
共有 <font color="#CC5200"><%=Allrecord%></font> 条记录</td>
<td height="17" width="181" align="center">
共 <font color="#CC5200"><%=Allpage%></font> 页</td>
<td height="17" width="237" align="center">
现在是第
<font color="#CC5200"><%=ThisPage%></font> 页</td>
<td height="17" width="200" align="center">
<%
if ThisPage<2 then
response.write "<font color=""#808080"">首页</font> "
response.write "<font color=""#808080"">上一页</font> "
else
response.write "<a href=?page=1&t1="&trim(request("t1"))&">首页</a> "
response.write "<a href=?page="&ThisPage-1&"&t1="&trim(request("t1"))&">上一页</a> "
end if
if Allpage-ThisPage<1 then
response.write "<font color=""#808080"">下一页</font> "
response.write "<font color=""#808080"">尾页</font> "
else
response.write "<a href=?page="&(ThisPage+1)&"&t1="&trim(request("t1"))&">下一页</a> "
response.write "<a href=?page="&Allpage&"&t1="&trim(request("t1"))&">尾页</a> "
end if
%></td>
</tr>
</table> </td>
</tr>
</form>
</table>
</center>
</div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -