?? index.asp
字號:
<%@ Language=VBScript %>
<!--#include file="conn.asp"-->
<html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.12 {
font-size: 12px;
}
-->
</style>
</head>
<body bgcolor="CAD7F7" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" scroll=yes>
<%
Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from img order by id desc"
rs.Open sql,conn,1,3
%>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" class="12">
<tr>
<%
rs.pagesize=16
epage=CLng(Request("page"))
If epage<1 Then epage=1
rs.absolutepage=epage
for i=1 to rs.pagesize
do while not rs.eof%>
<td bgcolor="#f1f3f5"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="12">
<tr>
<td><div align="center"><A href="detail.asp?id=<%=rs("id")%>" width="300" height="400" class="STYLE1"><img src="show.asp?id=<%=rs("id")%>&tbName=img" width="150" height="150" border="0",height="133">
</a></div></td>
</tr>
</table></td><%if i mod 4=0 then%>
</tr>
<%end if
i=i+1
rs.movenext
loop
If rs.Eof Then exit For
Next
%>
</table>
<p align="center">
<% if page<>1 then %>
<a href= page=1 class="white"><font color="#666666">首頁</font></a>
<a href="">前一頁</a>
<%end if
if page<>rs.pagecount then%>
<a href="">后一頁</a>
<a href="">末頁</a>
<%end if%>
</p>
<p align="center">現在是第<%=epage%>頁一共有<%=rs.pagecount%>頁 [<%=page%>/<%=rs.pagecount%>];每頁<%=rs.pagesize%>條;共<%=rs.pagecount%>條記錄</p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -