⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 blog_showall.asp

📁 该资料包含大量网络开发的案例和源代码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="../include/datatransfer.asp"-->
<!--#include file="../include/functionjs.asp"-->
<!--#include file="../include/functionvb.asp" -->
<!--#include file="../include/dbconn.inc" -->
<!--#include file="../include/refresh.asp"-->
<!--#include file="../include/header.asp" -->
<link href="../include/main.css" rel="stylesheet" type="text/css">
<%
dim showType,ShowTypeTitle
showtype=request.QueryString("showtype")
%>
<table width="710" border="1" cellpadding="2" cellspacing="0" align="center"  class="tablestyle"  bordercolor="#FFFFFF">
  <tr>
    <td bordercolor="#4C4C4C" background="../resource/images/bbs/bg.gif" class="tablehead"><img src="../resource/images/blog/li.gif" width="12" height="12">
      <%if userid="" then response.Write("游客") else response.Write(username)%>
,您的位置:<a href="../blog/main.asp">56Blog</a> →
<%if showtype=1 or showtype=2 or showtype=3 then response.Write("日记列表") else  response.Write("留言列表")%></td>
  </tr>
  <tr>
    <td bordercolor="#4C4C4C"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="200" valign="top" style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word">		
		<%if userid=empty then %>
		<!--#include file="../include/blog_leftpub.asp"-->
		<%else%>
		<!--#include file="../include/blog_leftprv.asp"-->
		<%end if%>
		</td>
        <td width="510" valign="top">
		 <%	
		dim thePageSize,ttlPage,ttlRdCnt
		Page=request("Page")
		if request.Form("select")<>0 then page=request.Form("select")
		thePageSize=10
		if not isnumeric(page) then page=1 else page=clng(page)
		if page<1 then page=1
		
		select case showtype
		case 1
			strsql="select * from blog_topic order by pubtime desc"
			showtypetitle="时间排行"
		case 2
				strsql="select * from blog_topic order by replycount desc"
				showtypetitle="回复数排行"
		case 3
				strsql="select * from blog_topic order by commendcount desc"
				showtypetitle="推荐数排行"
		case 4
				strsql="select * from blog_msg order by msg_id desc"
				showtypetitle="网站留言"		
		end select
		
		objRS.open strSQL,objConn,1,1	
		
		if not objRS.eof then
			objRS.pagesize=thePageSize
			ttlPage=objRS.pagecount
			ttlRdCnt=objRS.Recordcount
			if Page>ttlPage then Page=ttlPage
			objRS.AbsolutePage=Page
		end if				
		%>
		<br>
		<table width="480" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#D6E7FF"style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word BORDER-LEFT: #000000 1PX DASHED; BORDER-RIGHT: #000000 1PX DASHED; BORDER-TOP: #000000 1PX DASHED; BORDER-BOTTOM: #000000 1PX DASHED">
           <tr>
             <td align="center"><%response.Write(showtypetitle&"[第"&page&"页]")%></td>
           </tr>
         </table><br>
		 
		<%
		select case showtype
		case 1,2,3
	  	for i=1 to thePageSize
	  	if objRS.eof then exit for 
		%>
         	
         <table width="480" border="0" cellspacing="2" cellpadding="2" align="center" <%if i mod 2 =0 then response.Write("bgcolor='#EFEBEF'")%> style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word BORDER-LEFT: #000000 1PX DASHED; BORDER-RIGHT: #000000 1PX DASHED; BORDER-TOP: #000000 1PX DASHED; BORDER-BOTTOM: #000000 1PX DASHED">
          <tr>
            <td><pre><font color="#FF6600"><%=objRs("title")%></font> 由<%=objrs("user_name")%> 发表于 <%=objrs("pubtime")%></pre></td>
          </tr>
          <tr>
            <td align="right">
              <table width="450"  border="0" cellspacing="0" cellpadding="0"style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word">
                <tr>
                  <td><pre><%=objrs("content")%></pre></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td align="right">[<a href="blog_reply.asp?TopicID=<%=objrs("topic_id")%>"><font color="#FF3399">评论</font></a>] [<a href="blog_cmd.asp?TopicID=<%=objrs("topic_id")%>"><font color="#FF3399">推荐</font></a>] [推荐:<%=objrs("commendcount")%>]  [<a href="blog_show.asp?ShowID=<%=showid%>&TopicID=<%=objrs("topic_id")%>" title="阅读评论">评论:<%=objrs("replycount")%><img src="../resource/images/blog/li2.gif" width="9" height="9" border="0"></a>]<a name="0"></a></td>
          </tr>
        </table>
		<br><%
	  	objRs.movenext
	  	next%>
		<table width="480"  border="0" align="center" cellpadding="2" cellspacing="2">
          <tr>
            <td width="183">分页:
          <%for i=1 to ttlpage%>
		<a href="blog_showall.asp?ShowType=<%=showtype%>&Page=<%=i%>"><b><%=i%></b></a>
		<%next %>
&nbsp;</td>
            <td width="116" align="right">共有日记 <b><%=ttlRdCnt%></b> 篇 </td>
            <td width="161" align="right"><a href="blog_showall.asp?ShowType=<%=showtype%>&Page=<%=i%>"><b>&lt;&lt;</b></a> <a href="blog_showall.asp?ShowType=<%=showtype%>&Page=<%=page-1%>"><b>&lt;</b></a> <a href="blog_showall.asp?ShowType=<%=showtype%>&Page=<%=page+1%>"><b>&gt;</b></a> <a href="blog_showall.asp?ShowType=<%=showtype%>&Page=<%=ttlpage%>"><b>&gt;&gt;</b></a></td>
          </tr>
        </table>
<%case 4
	  	for i=1 to thePageSize
	  	if objRS.eof then exit for%>
         <table width="480" border="0" cellspacing="2" cellpadding="2" align="center" <%if i mod 2 =0 then response.Write("bgcolor='#EFEBEF'")%> style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word BORDER-LEFT: #000000 1PX DASHED; BORDER-RIGHT: #000000 1PX DASHED; BORDER-TOP: #000000 1PX DASHED; BORDER-BOTTOM: #000000 1PX DASHED">
          <tr>
            <td><font color="#FF6600"><%if objrs("isbloger") then response.Write("会员:"&objrs("pub_name")) else response.Write("游客:"&objrs("pub_name"))%></font> 留言于 <%=objrs("pubtime")%></pre></td>
          </tr>
          <tr>
            <td align="right">
              <table width="450"  border="0" cellspacing="0" cellpadding="0"style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word">
                <tr>
                  <td><pre><%=objrs("msg")%></pre></td>
                </tr>
              </table></td>
          </tr>
        </table>
		<br><%
	  	objRs.movenext
	  	next%>
		<table width="480"  border="0" align="center" cellpadding="2" cellspacing="2">
          <tr>
            <td width="159">分页:
                <%for i=1 to ttlpage%>
                <a href="blog_showall.asp?ShowType=<%=showtype%>&Page=<%=i%>"><b><%=i%></b></a>
                <%next %>
&nbsp;</td>
            <td width="140"  align="center">共有留言<b> <%=ttlRdCnt%></b> 篇 </td>
            <td width="161" align="right"><a href="blog_showall.asp?ShowType=<%=showtype%>&Page=<%=i%>"><b>&lt;&lt;</b></a> <a href="blog_showall.asp?ShowType=<%=showtype%>&Page=<%=page-1%>"><b>&lt;</b></a> <a href="blog_showall.asp?ShowType=<%=showtype%>&Page=<%=page+1%>"><b>&gt;</b></a> <a href="blog_showall.asp?ShowType=<%=showtype%>&Page=<%=ttlpage%>"><b>&gt;&gt;</b></a></td>
          </tr>
        </table>
		<%end select%>

<br><br>
<div align="center">
  [<a href="javascript:window.print();"><font color="#FF6600">打印本页</font></a>]</div></td>
      </tr>
    </table>
	
	</td>
  </tr>
  <tr>
    <td bordercolor="#4C4C4C" background="../resource/images/bj2.gif" align="center">&nbsp;</td>
  </tr>
</table>
<!--#include file="../include/endconn.inc" -->
<!--#include file="../include/footer.asp" -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -