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

📄 blog_show.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">
<%
if showid="" then
	if UserID=empty then
		response.Redirect("../common/showerr.asp?ErrType=1")
	else
 		showid=userid
	end if
else
	strSQL="select user_name from user_info where user_id="& showid
	objRS.open strSQL,objConn,1,1
	showname=objrs("user_name")
	objrs.close
end if
%>
<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">&nbsp;<img src="../resource/images/blog/li.gif" width="12" height="12">&nbsp;<%if userid="" then response.Write("游客") else response.Write(username)%>,您的位置:<a href="../blog/main.asp">56Blog</a> → <a href="blog_show.asp?ShowID=<%=showid%>">
      <%if showid=userid then response.Write("我") else response.Write(showname)%>的博客</a></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" style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word">
		<%	
		strSQL="select * from user_info where user_id="& showid
		objRS.open strSQL,objConn,1,1	
		%>          <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><marquee>
              <pre>以下为主人<b><%=objrs("user_name")%></b>发布的公告:<font color="#FF6600"><%=objrs("blog_announce")%></font></pre></marquee></td>
            </tr>
			<tr>
              <td><%if objrs("user_isonline") then%>主人在家,品茶一则
			  <%else%>                
                主人不在,客可稍坐
                <%end if%> :
				[<a href="../common/userinfo.asp?UserID=<%=showid%>">查看信息</a>]
				[<a href="../common/addfriend.asp?FriendID=<%=showid%>&AddType=BLOG">加为好友</a>] [<a href="mailto:<%=objrs("user_email")%>">发送邮件</a>] [<a href="http://bbs.qq.com/cgi-bin/bbs/friend/user_info_show?ln=<%=objrs("user_qq")%>" target="_blank">QQ信息</a>] [<a href="blog_cmd.asp?ShowID=<%=showid%>">推荐Bloger</a>]<a name="0" id="0"></a></td>
            </tr>
          </table>
		  <br><br>
<%
objrs.close
if Topicid=empty then
		 dim MouseOverTitle
		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
	
		strSQL="select  * from blog_topic where user_id="& showid&" order by pubtime desc"
		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
				
	  	for i=1 to thePageSize
	  	if objRS.eof then exit for 
		MouseOverTitle=objRs("title")
		%>
		<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"><%=objRs("title")%></font> 由 <%=objrs("user_name")%> 发表于 <%=objrs("pubtime")%>
			</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="158">分页:
          <%for i=1 to ttlpage%>
		<a href="blog_show.asp?ShowID=<%=Showid%>&page=<%=i%>"><b><%=i%></b></a>
		<%next %>
&nbsp;</td>
            <td width="141" align="center">共有日记 <b><%=ttlRdCnt%></b> 篇 </td>
            <td width="161" align="right"><a href="blog_show.asp?ShowID=<%=Showid%>&page=<%=i%>"><b>&lt;&lt;</b></a> <a href="blog_show.asp?ShowID=<%=Showid%>&page=<%=page-1%>"><b>&lt;</b></a> <a href="blog_show.asp?ShowID=<%=Showid%>&page=<%=page+1%>"><b>&gt;</b></a> <a href="blog_show.asp?ShowID=<%=Showid%>&page=<%=ttlpage%>"><b>&gt;&gt;</b></a></td>
          </tr>
        </table>
<%else%>
<%	
		strSQL="select * from blog_topic where user_id="& showid&" and topic_id="&topicid
		objRS.open strSQL,objConn,1,1	
		%>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#C6CFE7" 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" <%if i mod 2 =0 then response.Write("bgcolor='#EFEBEF'")%>>
  <tr>
    <td><pre>日记:<font color="#FF6600"><%=objRs("title")%></font>  由 <%=objrs("user_name")%> 发表于 <%=objrs("pubtime")%> 共有<%=objrs("replycount")%>篇评论</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 style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word"><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%>">返回</a>]</td>
  </tr>
</table>
<br><br>
<%	
		objrs.close
		strSQL="select blog_reply.*,blog_topic.user_id,blog_topic.user_name,blog_topic.title,blog_topic.pubtime from blog_reply,blog_topic where blog_topic.topic_id=blog_reply.topic_id and blog_topic.topic_id="&topicid &" order by blog_reply.pubtime desc"
		objRS.open strSQL,objConn,1,1
		
		if objrs.bof and objrs.eof then response.Write("<br><div align=center>此日记尚无评论</div>")
		do while not objrs.eof 
		%>

<table width="480" border="0" cellspacing="2" cellpadding="2" align="center" <%if objrs.AbsolutePosition 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"><%=(objrs.recordcount-objrs.AbsolutePosition+1)%></font>评论:<font  color="#FF6600"><%=objrs("blog_reply.title")%></font> 由<%=objrs("blog_reply.user_name")%>发表于 <%=objrs("blog_reply.pubtime")%></td>
  </tr>
  <tr>
    <td align="right">
      <table width="90%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><pre><%=objrs("content")%></pre></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td align="right"><b><a href="main.asp" title="回首页">&lt;&lt;</a> <a href="blog_show.asp?ShowID=<%=showid%>" title="回前一页">&lt;</a></b> <a href="#0" title="回页首">^</a></td>
  </tr>
</table><br>
  <%
  	objrs.movenext
  	loop
end if
%><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 + -