?? 2_2.asp
字號:
<td><div align="center"><a href="../4/4.asp">互動聊天</a></div></td>
</tr>
<tr>
<td><div align="center"><a href="../5/5.asp">聯系方式</a></div></td>
</tr>
<tr>
<td><div align="center"><a href="../6/6.asp">七嘴八舌</a></div></td>
</tr>
</table>
<p> </p>
</td>
<td><img src="images/g_13.jpg" width="6" height="303"></td>
<td width="572" height="303" align="center" background="images/g_14.jpg" class="info"><p align="center" class="STYLE1">生活隨想</p>
<table width="300" border="1" align="center">
<tr>
<td><div align="center"><a href="2.asp">全部</a></div></td>
<td><div align="center"><a href="2_1.asp">情感</a></div></td>
<td><div align="center"><a href="2_2.asp">搞笑</a></div></td>
<td><div align="center"><a href="2_3.asp">心得</a></div></td>
<td><div align="center"><a href="2_4.asp">日記</a></div></td>
</tr>
</table>
<p><%@LANGUAGE="VBScript" codepage="936"%>
<!--#include file="conn.asp"-->
<!-- #include file="bh.asp" -->
<html>
<head>
<meta http-equiv="Page-Exit" content="revealTrans(Duration=1.0,Transition=<%response.write web_dim(12)%>)">
<link href="skin_1.css" rel="stylesheet" type="text/css">
<STYLE type="text/css">
body {
scrollbar-face-color: #EFEFEF;
scrollbar-shadow-color: #999999;
scrollbar-highlight-color: #999999;
scrollbar-3dlight-color: #FFFFFF;
scrollbar-darkshadow-color: #FFFFFF;
scrollbar-track-color: #FFFFFF;
scrollbar-arrow-color: #999999;
}
.re {
background-color: #FFFFFF;
margin: 4px;
padding: 4px;
border: 1px dotted #006699;
}
</STYLE>
<title>Alpha Xp</title>
<link href="style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%
dim rs
dim sql
msg_per_page = 10 '定義每頁顯示記錄條數
set rs = server.createobject("adodb.recordset")
sql ="select * from [wz] where fenlei='搞笑' order by id desc" 'Alpha Xp
rs.cursorlocation = 3 '使用客戶端游標,可以使效率提高
rs.pagesize = msg_per_page 'http://www.hei8.cn
rs.open sql,conn,0,1
if err.number<>0 then '錯誤處理
response.write "數據庫操作失?。?quot; & err.description
err.clear
else
if not (rs.eof and rs.bof) then '檢測記錄集是否為空
totalrec = RS.RecordCount 'totalrec:總記錄條數
if rs.recordcount mod msg_per_page = 0 then '計算總頁數,recordcount:數據的總記錄數
n = rs.recordcount\msg_per_page 'n:總頁數
else
n = rs.recordcount\msg_per_page+1
end if
currentpage = request("page") 'http://hei8.cn
If currentpage <> "" then
currentpage = cint(currentpage)
if currentpage < 1 then
currentpage = 1
end if
if err.number <> 0 then
err.clear
currentpage = 1
end if
else
currentpage = 1
End if
if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then
currentPage=1
end if
rs.absolutepage = currentpage 'absolutepage:設置指針指向某頁開頭 QQ:147840475
rowcount = rs.pagesize 'pagesize:設置每一頁的數據記錄數 許鵬
dim i
dim k
%>
<%do while not rs.eof and rowcount > 0%>
<table width="310" border="0" cellspacing="0">
<tr>
<td><table width="306" border="0" align="center" cellspacing="0" style="table-layout:fixed">
<tr>
<td width="80%" height="20"> <img src="images/003.gif" width="9" height="9" border="0"> <font color=#999999><B>[<%=rs("fenlei")%>]</B></font><a href="2_5.asp?id=<%=rs("id")%>" title="<%=rs("title")%> 整理日期:<%=rs("data")%>"><B><%=rs("title")%></B></td>
<td width="20%"><div align="center"><font color=#999999><%=rs("user")%></font></div></td>
</tr>
<tr>
<td height="1" colspan="2" background="images/bg_dian.gif"></td>
</tr>
<tr>
<td height="3" colspan="2"></td>
</tr>
<tr>
<td colspan="2"><pre style="word-break:break-all;word-wrap: break-word;width: 300px;"><%=Left(rs("text"),100)%><font color="#999999">……<br><div align=right><%=rs("data")%></div></font></pre></td>
</tr>
</table></td>
</tr>
</table>
<%
rowcount=rowcount-1
rs.MoveNext
loop
end if
end if
rs.close
set rs=nothing
%>
</table>
<table border="0" align=right>
<tr>
<td valign="middle" align=right>
<%call listPages()%>
</td>
</tr>
</table>
</body>
</html>
<%
sub listPages()
'if n <= 1 then exit sub
for i=0 to n\msg_per_page-1
for j=1 to msg_per_page
%>
<font size="2" color="#006600">
<a href="<%=request.ServerVariables("script_name")%>?page=<%=i*msg_per_page+j %>">
[<% =i*msg_per_page+j %>]</a></font>
<%
next
next
EndPage = n mod msg_per_page
for j=1 to EndPage
%>
<font size="2" color="#006600">
<a href="<%=request.ServerVariables("script_name")%>?page=<% =i*msg_per_page+j %>">
[<% =i*msg_per_page+j %>]</a></font>
<%next%>
<font color=black face="arial" >
<br>當前頁:<font color=#FF000000><%=currentpage%>/<%=n%></font> 文章總數:<font color=#FF000000><%=totalrec%></font> 條
</font>每頁顯示:<font color=#FF000000>10</font><font color=black face="arial" > </font>條
<%end sub%> </p></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="770" height="74" background="images/g_15.jpg"><table width="65%" height="25" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" valign="top"><strong><font color="#FFFFFF">加入收藏
| 設為主頁 | 聯系我們 | 關于我們
<script language="javascript" src="http://count16.51yes.com/click.aspx?id=163524146&logo=1"></script>
</font></strong></td>
</tr>
</table>
</td>
<td width="80" height="50" valign="top"><a href="#top" onFocus="if(this.blur)this.blur()"><img src="images/top.jpg" width="56" height="33" border="0"></a></td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
</table>
</body>
</html>
<span style="display:none;">這個模版來自http://BestMoban.Com,更多模版請訪問<a href="http://BestMoban.Com">http://BestMoban.Com</a> <a href="http://Moban.17Easy.Com">http://Moban.17Easy.Com</a> <a href="http://www.mb8.cn">http://www.mb8.cn</a></span>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -