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

📄 all_article.asp

📁 if you want it,call me.
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="UBBencode.ini"-->
<!--#include file="textencode.ini"-->
<!--#include file="function.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>MSMAX---BLOG程序--所有文章</title>
	<script language="JavaScript">
        <!--
        function popreg()
        {
          document.form2.username.value==""
        }
        //-->
        </script>
		<style type="text/css">
a.index:hover{
color:#333333;
text-decoration:none;
}
a.index:link{
color:#666666;
text-decoration:underline;
}
a.index:visited{
color:#333333;
text-decoration:none;
}		
</style>
<link href="blog.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%
	dim page_no
	'page_no=request.QueryString("page_no"))
	if request.QueryString("page_no")="" then
		page_no=1
	else	
		page_no=cint(request.QueryString("page_no"))
	end if
%>
	<div id="all">
	<table border="1" bgcolor="#999999" width="100%" height="100%">
	<tr>
		<td bgcolor="#E7E7E7">
		<!--#include file="top.asp"-->
		<div id="left-bg">
			<div id="body-top"><a href="index.asp" class="index">首页</a>-->把有文章</div>
			<div id="left-title"></div>
			<div id="left-body-content">
				<%
					set rs=server.createobject("adodb.recordset")
					strsql="select * from article order by subdate desc"
					rs.open strsql,db,1				
				%>
					<ul style="line-height:35px;">
						<%
						if not rs.eof and not rs.bof then
						rs.pagesize=40
						dim page_total
						page_total=rs.pagecount
						rs.absolutepage=page_no
						dim i
						i=40
						do while not rs.eof and i>0
						i=i-1												
						%>
						<li>
						<a href="show_article.asp?articleid=<%=rs("articleid")%>" target="_blank" class="index"><%=rs("title")%></a>
						<%
						rs.movenext
						loop
						end if
						%>
					</ul>				
			</div>				
		<div id="page">
		<%
		dim numpre,numnext
			numpre=page_no-1
			numnext=page_no+1
			response.write "&nbsp;&nbsp;&nbsp;<a href='all_article.asp?page_no=1' class='page'>首页</a>"
			if numpre=0 then
				response.write "&nbsp;&nbsp;&nbsp;上一页"
			else
				response.write "&nbsp;&nbsp;&nbsp;<a href='all_article.asp?page_no="&numpre&"' class='page'>上一页</a>"
			end if
			if numnext>page_total then
				response.write "&nbsp;&nbsp;&nbsp;下一页"	
			else
				response.write "&nbsp;&nbsp;&nbsp;<a href='all_article.asp?page_no="&numnext&"' class='page'>下一页</a>"
			end if
			response.write "&nbsp;&nbsp;&nbsp;<a href='all_article.asp?page_no="&page_total&"' class='page'>尾页</a>"	
	%>
	  <%
	  response.write "&nbsp;&nbsp;&nbsp;现在是第&nbsp;<font color='red'>"&page_no&"</font>&nbsp;页,"
	 response.write "&nbsp;&nbsp;&nbsp;共有&nbsp;"&page_total&"&nbsp;页,"
	
	  %>

		<%
	'--------------------------------------------------------------------------------------
	'这一段输出页数信息。Page_total由上面分页显示决定。
	Response.Write "<p align='center'><b><font color='#CC0066'>" & page_no & "/" & page_total & "</b></font>页&nbsp;"
	'显示往前10页的链接,为当前最小值减1
	Dim numTemp
	numTemp=minPage(page_no,page_total)-1
	If numTemp>=1 Then
		Response.Write "<a href='all_article.asp?page_no=" & numTemp & "'>前10页</a>&nbsp"
	End If
	'显示当前10页的链接
	For I=minPage(page_no,page_total) To maxPage(page_no,page_total)
		If I=page_no Then                        
			Response.Write "<b><font color='#CC0066'>" & I & "</font></b>&nbsp;"
		Else
			Response.Write "<a href='all_article.asp?page_no=" & I & "'>" & I & "</a>&nbsp"
		End If
	Next
	'显示往后10页的链接,为当前最大值加1
	numTemp=maxPage(page_no,page_total)+1
	If numTemp<page_total Then
		Response.Write "<a href='all_article.asp?page_no=" & numTemp & "'>后10页</a>&nbsp"
	End If
	%>	
		</div>
		</div>			
			<!--#include file="right.asp"-->
			<!--#include file="foot.asp"-->
			</td>
			</tr>
			</table>
	</div>
</body>
</html>

⌨️ 快捷键说明

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