?? folder.asp
字號:
<style>
BODY{
font-family:verdana,arial,helvetica;
margin:0;
}
td {
font-family:Tahoma,Verdana, Arial;
font-size:11px;
border: 1px solid #CCCCCC;
}
A:link, A:active,A:visited
{
color: #CCCCCC;
text-decoration: none;
padding-left:6px;
padding-right:6px;
}
A:hover
{
color: #FF3300;
text-decoration: none;
padding-left:6px;
padding-right:6px;
}
.STYLE1 {color: #FFFFFF}
</style>
<!--#include file="conn.asp"-->
<!--#include file="checkuser.asp" -->
<table width="680" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="53" height="18" bgcolor="#003366"><div align="center" class="STYLE1">編號</div></td>
<td width="130" bgcolor="#003366"><div align="center" class="STYLE1">條形碼</div></td>
<td width="197" bgcolor="#003366"><div align="center" class="STYLE1">書籍名稱</div></td>
<td width="82" bgcolor="#003366"><div align="center" class="STYLE1">主編</div></td>
<td width="54" bgcolor="#003366"><div align="center" class="STYLE1">冊數</div></td>
<td width="50" bgcolor="#003366"><div align="center" class="STYLE1">借閱數</div></td>
<td width="98" bgcolor="#003366"><div align="center" class="STYLE1">操作</div></td>
</tr>
<%
folderid=cint(request.querystring("folderid"))
Set rs=Server.CreateObject("adodb.recordset")
sql="select * from ebook where folderid="&folderid&" order by id desc"
rs.open sql,conn,1,1
if not rs.eof then
const maxperpage=25 '定義每一頁顯示的數據記錄的常量
dim currentpage '定義當前頁的變量
rs.pagesize=maxperpage
currentpage=request("page")
if currentpage="" or not Isnumeric(currentpage) then
currentpage=1
elseif currentpage<1 then
c1urrentpage=1
else
currentpage=clng(currentpage)
if currentpage > rs.pagecount then
currentpage=rs.pagecount
end if
end if
'如果變量c1urrentpage的數據類型不是數值型
'就1賦給變量c1urrentpage
if not isnumeric(currentpage) then
currentpage=1
end if
dim totalput,n '定義變量
totalput=rs.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs.move(currentpage-1)*maxperpage
i=0
do while i< maxperpage and not rs.eof
i=i+1
%>
<tr>
<td align="center"> <%=rs("id")%></td>
<td align="center"> <%=rs("tiaoxingma")%></td>
<td align="center"> <a href="bookinfo.asp?bookid=<%=rs("id")%>" target="_blank"><%=rs("shuming")%></a></td>
<td align="center"> <%=rs("zhubian")%></td>
<td align="center"> <%=rs("yijie")&"/"&rs("ceshu")%></td>
<td align="center"> <%=rs("jieyueshu")%></td>
<td align="center">
<div align="center">
<%
if session("bookadmin")<>"" then
response.write "刪除 | 修改 | "
end if
response.Write "借閱"
%>
</div></td>
</tr>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
<tr>
<td colspan="7" align="right">
頁數 <font color="red"><%=currentpage%></font>/<% =n%>
<% k=currentpage
if k<>1 then%>
[<a class="link" href="folder.asp?folderid=<%=folderid%>&page=1">首頁</a>]
[<a class="link" href="folder.asp?folderid=<%=folderid%>&page=<%=k-1%>">上一頁</a>]
<%else%>
[首頁] [上一頁]
<%end if%>
<%if k<>n then%>
[<a class="link" href="folder.asp?folderid=<%=folderid%>&page=<%=k+1%>">下一頁</a>]
[<a class="link" href="folder.asp?folderid=<%=folderid%>&page=<%=n%>">尾頁</a>]
<%else%>
[下一頁] [尾頁]
<%end if%>
共有<font color="red"><%=totalput%></font>條記錄 <font color="red"><%=maxperpage%></font>個/頁
共有<font color="red"><%=n%></font>頁 </td>
</tr>
</table>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -