bloguser.asp

来自「纪念伟大领袖的专题网站」· ASP 代码 · 共 610 行 · 第 1/2 页

ASP
610
字号
<!--类开始-->
				<TABLE width="90%">
				<TR>
			  	<TD>
<%
dim menuid
dim menuname
dim menucontent
dim menuview
set rs11=server.CreateObject("ADODB.RecordSet")
rs11.Source="select * from "& db_bigclass_Table &" order by bigclassorder"
rs11.Open rs11.Source,conn,1,1
i=1
Dim ArraymenuID(1000),ArraymenuName(1000)
while not rs11.EOF
	RecordCount=rs11.RecordCount
	menuid=rs11("bigclassid")
	menuname=rs11("bigclassname")
	menucontent=rs11("bigclasscontent")
	menuview=rs11("bigclassview")
	TdString="<br><font color='#000000'>·</font>&nbsp;<a href='blogResult.asp?keyword="& username1 &"&action=editor&bigclassid="&menuid&"' class=middle >"& menuName &"</a><br>" 
	Response.Write TdString
	ArraymenuID(i)=menuID
	ArraymenuName(i)=menuName
	i=i+1
	rs11.MoveNext
wend
rs11.close
set rs11=nothing
%><br>			
					</TD>
				</TR>
				</TABLE>
<!--类结束-->
				</div>	  
			</td>
		</tr>
		</table>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr> 
			<td height="25" background="IMAGES/menu-d-user.gif"><div align="center">博客介绍</div></td>
		</tr>
		<tr> 
			<td>
				<div align="center">
				<TABLE width="90%">
			  <TR>
					<TD>
<br>
·&nbsp;blog名称:<%=CutStr(nohtml(rs2("content")),10)%><br>
·&nbsp;日志总数:<%=rs2("number")%><br>
·&nbsp;登陆次数:<%=rs2("logins")%><br>
·&nbsp;建立时间:<%=year(rs2(db_User_RegDate))%>-<%=month(rs2(db_User_RegDate))%>-<%=day(rs2(db_User_RegDate))%>
<br><br>
					</TD>
				</TR>
				</TABLE>
				</div>
			</td>
		</tr>
		</table>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr> 
			<td height="25" background="IMAGES/menu-d-user.gif"><div align="center">博客留言</div></td>
		</tr>
		<tr> 
			<td>
				<div align="center">
			  <TABLE width="90%">
			  <TR>
			  	<TD><!--#include file="ReviewIndex.asp"--></TD>
			  </TR>
			  </TABLE>
				</div>
	    </td>
		</tr>
		</table>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr> 
			<td height="25" background="IMAGES/menu-d-user.gif"><div align="center">其他博客</div></td>
		</tr>
		<tr> 
			<td>
				<div align="center">
				<TABLE width="90%">
				<TR>
					<TD><!--#include file=BlogtopUser.asp --></TD>
				</TR>
				</TABLE>
				</div>
			</td>
		</tr>
		</table>
	</TD>
	<td width="6">&nbsp;</td>
	<td width="574" background="IMAGES/menu-l.gif"> 
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr> 
			<td height="25" background="IMAGES/menu-l-m.gif" align="center" >
				<A HREF="index.asp" class="middle">[新闻首页]</A>&nbsp;&nbsp;<%=CutStr(nohtml(rs2("content")),40)%>&nbsp;&nbsp;<A HREF="Bloguser.asp?user=<%=username1%>" class="middle">[博客首页]</A>
		  </td>
		</tr>
			<%rs2.close
		set rs2=nothing%>
		<tr> 
			<td height="25" background="IMAGES/menu-l.gif">
				<div align="center"> 
				<table width="100%"  border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
				<tr> 
					<td valign=top>&nbsp;</td>
				</tr>
				<tr> 
					<td valign=top>
						<table border="0" cellpadding="3" cellspacing="0" width="100%">
			<%
			set rs=server.CreateObject("ADODB.RecordSet")
			if session("key")="" then
				rs.Source="select * from "& db_News_Table &" where editor='" & username1 & "' and checkked=1 and newslevel=0 order by NewsID DESC"
			end if
			if session("key")="super" or session("key")="typemaster" or session("key")="bigmaster" or session("key")="smallmaster" or session("key")="check" then
				rs.Source="select * from "& db_News_Table &" where editor='" & username1 & "' and checkked=1 order by NewsID DESC"
			end if
			if session("key")="selfreg" then
				if session("reglevel")=3 then
					rs.Source="select * from "& db_News_Table &" where editor='" & username1 & "' and checkked=1 order by NewsID DESC"
				end if
				if session("reglevel")=2 then
					rs.Source="select * from "& db_News_Table &" where editor='" & username1 & "' and checkked=1 order by NewsID DESC"
				end if
				if session("reglevel")=1 then
					rs.Source="select * from "& db_News_Table &" where editor='" & username1 & "' and checkked=1 order by NewsID DESC"
				end if
			end if

			rs.Open rs.Source,conn,1,1
			rs.PageSize=20
			rs.CacheSize = RS.PageSize
			for i=1 to rs.PageSize *(page-1)
				if not rs.EOF then
					rs.MoveNext
				end if
			next

			Response.Write "<tr><td width=100% height=28 align=center>&nbsp;"
			if rs.EOF then
				Response.Write "<font color=red>该会员博客还没有文章!</font>"
			else
				rs.PageSize     = MyPageSize
				MaxPages         = rs.PageCount
				rs.absolutepage = MyPage
				total            = rs.RecordCount
				Response.Write "该会员博客共有" & total & "篇文章,当前第"& myPage &"/"& MaxPages &"页,每页"& rs.PageSize &"条"
			end if
			Response.Write "</td></tr>"

			If Not rs.eof then
				i = 0
				do until rs.Eof or i = rs.PageSize
				if rs("picname")<>"" then
					img="<font color=red>[图]</font>"
				else
					img=""
				end if

				title=htmlencode4(trim(rs("title")))
				dim bigclassid
				bigclassid=rs("bigclassid")
				set rs11=server.CreateObject("ADODB.RecordSet")
				rs11.Source="select * from "& db_BigClass_Table &" where bigclassid="&bigclassid&""
				rs11.Open rs11.Source,conn,1,1
				typeid=rs11("typeid")
				BigClassName=rs11("BigClassName")
				rs11.Close
	
				fileExt=lcase(getFileExtName(rs("picname")))
				Content=htmlencode4(rs3("Content"))
				content=replace(content,"[---分页---]","")%>
						<tr> 
							<td width="100%" height="20" bgcolor="#AFAFD9">&nbsp;&nbsp;
								<img src="images/blog.gif" border="0" align="absmiddle">&nbsp;
								<a class=middle href="ReadNews.asp?NewsID=<%=rs("NewsID")%>" target=_blank title="<%=title%>"><font color="<%=rs("titlecolor")%>">[<%=BigClassName%>]<%=CutStr(title,50)%></font></a>
							</td>
						</tr>
						<tr>
							<td align="right">
							 <font class=noline><%=username1%>发表于(<%=rs("UpdateTime")%>)&nbsp;&nbsp;点击数[<font color="#ff0000"><%=rs("click")%></font>]</font>
							</td>
					  </tr>
					  <tr>
							<td width="98%" height="50">
								<p><font class=middle><br><%=CutStr(nohtml(rs("Content")),240)%></font><br></p>
				<%if rs("picname")=("") then%>
				<%else%>
					<%if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then%>
								<p align="center"><img  src="<%=FileUploadPath & rs("picname")%>" onload='javascript:if(this.width>500) this.width=500' border=0 ></p>
					<%end if%>
					<%if fileext="swf" then%>
								<p align="center"><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'  codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width="500"  border=0 >
								<param name=movie value="<%=FileUploadPath & rs("picname")%>">
								<param name=quality value=high>
								<param name='Play' value='-1'>
								<param name='Loop' value='0'>
								<param name='Menu' value='-1'>
								<embed src="<%=FileUploadPath & rs("picname")%>" width="500" border=0  pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'></embed>
								</object></p>
					<%end if%>
				<%end if%>
							</td>
						</tr>
						<tr>
							<td align="right"> | <a class=middle href="ReadNews.asp?NewsID=<%=rs("NewsID")%>" target=_blank >阅读全文</a> | <a class=middle href="Review.asp?NewsID=<%=rs("NewsID")%>" target=_blank >回复</a> | </td>
					  </tr>
			<%
			rs.MoveNext
			i = i + 1
		loop
			%>
						<tr> 
							<td width="100%" align=center>
								第 <%=Mypage%>/<%=Maxpages%>页,每页 <%=MyPageSize%> 条 
			<%
			url="Bloguser.asp?user=" & username1
			PageNextSize=int((MyPage-1)/PageShowSize)+1
			Pagetpage=int((total-1)/rs.PageSize)+1
			if PageNextSize >1 then
				PagePrev=PageShowSize*(PageNextSize-1)
				Response.write "<a class=black href='" & Url & "&page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
				Response.write "<a class=black href='" & Url & "&page=1' title='第1页'>页首</a> "
			end if
			if MyPage-1 > 0 then
				Prev_Page = MyPage - 1
				Response.write "<a class=black href='" & Url & "&page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
			end if

			if Maxpages>=PageNextSize*PageShowSize then
				PageSizeShow = PageShowSize
			Else
				PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
			End if
			
			If PageSizeShow < 1 Then PageSizeShow = 1
				for PageCounterSize=1 to PageSizeShow
				PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
				if PageLink <> MyPage Then
					Response.write "<a class=black href='" & Url & "&page=" & PageLink & "'>[" & PageLink & "]</a> "
				else
					Response.Write "<B>["& PageLink &"]</B> "
				end if
				If PageLink = MaxPages Then Exit for
				Next

				if Mypage+1 <=Pagetpage  then
					Next_Page = MyPage + 1
					Response.write "<a class=black href='" & Url & "&page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
				end if

				if MaxPages > PageShowSize*PageNextSize then
					PageNext = PageShowSize * PageNextSize + 1
					Response.write " <A class=black href='" & Url & "&page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
					Response.write " <a class=black href='" & Url & "&page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
				End if
			end if
			rs.close					
			%>
							</td>
						</tr>
						</table>
					</td>
				</tr>
				<tr> 
					<td valign=top>&nbsp;</td>
				</tr>
				</table>
				</div>
			</td>
		</tr>
		</table>
	</td>
</tr>
<tr valign="top">
	<td height="20" background="IMAGES/menu-d-t.gif">&nbsp;</td>
	<td>&nbsp;</td>
	<td height="20" background="IMAGES/menu-l-t.gif" class="daohang">&nbsp;</td>
</tr>
</table>
<table width="760" align="center" border="0" cellspacing="0" cellpadding="0"><!--最后的广告-->
		<tr>
      <td  valign="bottom">
	  <div align="center"> 
		<script language=javascript src=./zongg/ad.asp?i=13></script>
		</div>
		</td>
    </tr>
</table>
<!--#include file=bottom.asp -->
</body>
</html>
<%
else

Response.Write "<script>alert('无此用户!');history.back()</script>"
Response.End

end if
%>

⌨️ 快捷键说明

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