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

📄 articlelist.asp

📁 基于asp的博客系统+论文(代码齐全)经过调试
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="Config.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%= cfgTitle %></title>
<style type="text/css">
<!--
body {
	background-color: #666688;
}
-->
</style>
<style type="text/css">
<!--
.style2 {font-weight: bold}
.style3 {
	font-size: 14px;
	font-weight: bold;
	color: #FFFFFF;
}
-->
</style>
<% 
'判断是否是查看某个分类下的所有文章
Dim TypeDesc
if request("TypeID") = "" then
	TypeDesc = "所有类别" 
else
	call creaters(rs,"select * from type where typeid=" & request("TypeID"))
		TypeDesc = rs("Description")
	call closers(rs)
end if
 %>
</head>
<body>
<!--#include file="top.asp"-->
<link href="Style.css" rel="stylesheet" type="text/css">
<table width="614" border="0" align="center" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="614" height="15"  valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <td width="614" height="15"></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="29"  valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <td width="614" height="29" valign="middle" background="images/Main_01.gif">&nbsp;&nbsp;<span class="style3">我的文章 <%= TypeDesc %></span></td>
        </tr>
                </table></td>
  </tr>
  <tr>
    <td height="80"  valign="top">
	<table width="100%" border="0" cellpadding="5" cellspacing="0" background="images/Main_02.gif">
      <!--DWLayoutTable-->
      <tr>
        <td width="614" height="41" align="left" valign="top"><table width="99%" height="23"  border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#C0E096">
          <tr>
            <td height="21" bgcolor="#F3F9EC"><div align="center">
			<a href='ArticleList.asp?user=<%= request("user") %>'>【所有文章】</a>
			<% 
			if request("user") <> "" then
				call creaters(rs,"select * from type where username='" & request("user") & "'")
					while not rs.eof
						response.Write("<a href='ArticleList.asp?TypeID=" & rs("TypeID") & "&user=" & request("user") & "'>【" & rs("Description") & "】</a>&nbsp;")
						rs.movenext
					wend
				call closers(RS)
			else
				response.Write("发现错误:" & ErrConfig)
			end if
			 %>
			</div></td>
          </tr>
        </table>
          </td>
      </tr>
    </table>
	
	<% 
	'执行Conn.asp中的creaters方法 从视图View_Article_Type取出该用户的所有文章类型和文章
	if request("typeID") = "" then
		call creaters(rs,"select * from View_Article_Type where t1.username='" & request("user") & "'") 
	else
		call creaters(rs,"select * from View_Article_Type where t1.username='" & request("user") & "' and t1.TypeID=" & request("typeID")) 
	end if
	if rs.eof then
	%>
	<table width="100%" border="0" cellpadding="5" cellspacing="0" background="images/Main_02.gif">
      <!--DWLayoutTable-->
      <tr>
        <td width="614" height="70" align="left" valign="top"><table width="99%" height="48"  border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#C0E096">
          <tr>
            <td height="21" bgcolor="#FFFFFF">无文章记录</td>
          </tr>
          <tr>
            <td height="21" bgcolor="#F3F9EC">请登录后台填写文章..</td>
          </tr>
        </table>
          </td>
      </tr>
    </table>
	<%
	'分页显示
	end if
	Page = Clng(Request("Page"))
	rs.pagesize = 5
	if Page < 1 then Page = 1
	if Page > rs.PageCount then
		Page = rs.PageCount
	end if
	if not rs.eof and not rs.bof then rs.absolutepage = Page
	for i = 1 to rs.pagesize
	if rs.eof then exit for 
	%>
	<table width="100%" border="0" cellpadding="5" cellspacing="0" background="images/Main_02.gif">
      <!--DWLayoutTable-->
      <tr>
        <td width="614" height="70" align="left" valign="top"><table width="99%" height="48"  border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#C0E096">
          <tr>
            <td height="21" bgcolor="#FFFFFF"><a href="Article.asp?ContentID=<%=  rs("ContentID") %>&user=<%= request("user") %>" class="style2"><%= rs("title") %> [<%= rs("date") %>] </a></td>
          </tr>
          <tr>
            <td height="21" bgcolor="#F3F9EC"><%= rs("t1.Description") %></td>
          </tr>
        </table>
          </td>
      </tr>
    </table>
	<% 
	rs.movenext
	next
	 %>
	 <table width="100%" border="0" cellpadding="5" cellspacing="0" background="images/Main_02.gif">
      <!--DWLayoutTable-->
      <tr>
        <td width="614" height="29" align="left" valign="top"><table width="99%" height="19"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#C0E096">
          <tr>
            <td height="19" bgcolor="#FFFFFF"><div align="right">当前第 <%= page %> 页
				  <% 
				  for i = 1 to rs.PageCount
				  	response.Write(" <a href='ArticleList.asp?Page=" & i & "&typeID=" & request("typeID") & "&user=" & request("user") & "'>[" & i & "]</a> ")
				  next
				  call closers(rs)
				   %></div></td>
          </tr>
        </table>
          </td>
      </tr>
    </table>
	
	</td>
  </tr>
  <tr>
    <td height="25"  valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <td width="614" height="25" valign="top"><img src="images/Main_03.gif" width="614" height="25"></td>
        </tr>
        </table></td>
  </tr>
</table>
<!--#include file="down.asp"-->
</body>
</html>

⌨️ 快捷键说明

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