源代码如下!
----------------------朴素的分割线------------------------
<%
consize = 10
if request("BoardName") <> "" then
session("BoardName") = request("BoardName")
end if
set rsarticle = server.createobject("adodb.recordset")
set rsboard = server.createobject("adodb.recordset")
set rsreplycount = server.createobject("adodb.recordset")
set rsreplylast = server.createobject("adodb.recordset")
set rsuser = server.createobject("adodb.recordset")
rsarticle.pagesize = consize
rsarticle.open "select * from spark_article where BoardName='" & _
session("BoadName")&"' order by PostTime desc",cn,3,1
rsboard.open "select * from spark_board where BoardName='" & _
session("BoardName")&"'",cn
if len(request("page")) = 0 then
ipage = 1
else
ipage = request("page")
end if
if not rsarticle.eof then
rsarticle.absolutepage = ipage
end if
%>
<table width="760" height="41" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" height="41"><a href="postnew.asp">·¢±íÐÂÌû×Ó</a></td>
<td width="33%" align="right"><% =session("BoardName") %>°æÖ÷ÁÐ±í£º</td>
<td width="34%" height="41">
<%
if isnull(rsboard("Manager1")) then
response.write "暂无版主"
else
**错误行 response.write "<a href=userinfo.asp?UserID=" & _
rsboard("Manager1")& ">" &rsboard("Manager1")&"</a>"
if not isnull(rsboard("Manager2")) then
response.write " |<a href=userinfo.asp?UserID" & _
rsboard("Manager2")& ">" &rsboard("Manager2")&"</a>"
end if
if not isnull(rsboard("Manager3")) then
response.write " |<a href=userinfo.asp?UserID" & _
rsboard("Manager3")& ">" &rsboard("Manager3")&"</a>"
end if
end if
%>
</td>
</tr>
</table>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#111111" height="46">
<tr>
<td width="177" height="19" align="center" bgcolor="#003366"><p align="left"><font color="#FFFFFF" size="2">Ö÷Ìâ</font></td>
<td width="114" height="19" align="center" bgcolor="#003366"><font color="#FFFFFF" size="2">×÷Õß</font></td>
<td width="153" height="19" align="center" bgcolor="#003366"><font color="#FFFFFF" size="2">·¢±íʱ¼ä</font></td>
<td width="31" height="19" align="center" bgcolor="#003366"><font color="#FFFFFF" size="2">ÔĶÁ</font></td>
<td width="30" height="19" align="center" bgcolor="#003366"><font color="#FFFFFF" size="2">»Ø¸´</font></td>
<td width="144" height="19" align="center" bgcolor="#003366"><font color="#FFFFFF" size="2">×îºó»Ø¸´Ê±¼ä</font></td>
<td width="66" height="19" align="center" bgcolor="#003366"><font color="#FFFFFF" size="2">×îºó»Ø¸´ÈË</font></td>
</tr>
<%
for i = 1 to rsarticle.pagesize
if not rsarticle.eof then
rsuser.open "select UserID,UserNick from spark_usres where UserID='" & _
rsarticle("UserID")&"'",cn
rsreplycount.open "select Count(ReplyID) from spark_reply where " & _
"ArticleID="&rsarticle("ArticleID"),cn
rsreplylast.open "select * from spark_reply where ArticleID=" & _
rsarticle("ArticleID")&" order by PostTime desc",cn
%>
<tr>
<td width="177" height="26"><a href="contentlist.asp?AricleID=<% =rsarticle("ArticleID") %>"><% =rsarticle("Title") %></a></td>
<td width="114" height="26" bgcolor="#e6ecf9"><a href="userinfo.asp?UserID=<% =rsuser(0) %>"><% =rsuser(0) %>(<% =rsuser(1) %>)</a></td>
<td width="153" height="26"><% =rsarticle("PostTime") %></td>
<td width="31" height="26" bgcolor="#e6ecf9"><% =rsarticle("ReadCount") %></td>
<td width="30" height="26"><% =rsreplycount(0) %></td>
<td width="144" height="26" bgcolor="#e6ecf9">
<%
if not rsreplylast.eof then
response.write rsreplylast("PostTime")
end if
%> </td>
<td width="66" height="26">
<%
if not rsreplylast.eof then
response.write "<a href=userinfo.asp?UserID=" & _
rsreplylast("UserID")&">"&rsreplylast("UserID")&"</a>"
end if
%> </td>
</tr>
<%
rsuser.close
rsreplycount.close
rsreplylast.close
rsarticle.movenext
end if
next
%>
<tr>
<td width="177" height="19" align="center" bgcolor="#003366"><p align="left"><font color="#FFFFFF" size="2">Ö÷Ìâ</font></td>
<td width="114" height="19" align="center" bgcolor="#003366"><font color="#FFFFFF" size="2">×÷Õß</font></td>
<td width="153" height="19" align="center" bgcolor="#003366"><font color="#FFFFFF" size="2">·¢±íʱ¼ä</font></td>
<td width="31" height="19" align="center" bgcolor="#003366"><font color="#FFFFFF" size="2">ÔĶÁ</font></td>
<td width="30" height="19" align="center" bgcolor="#003366"><font color="#FFFFFF" size="2">»Ø¸´</font></td>
<td width="144" height="19" align="center" bgcolor="#003366"><font color="#FFFFFF" size="2">×îºó»Ø¸´Ê±¼ä</font></td>
<td width="66" height="19" align="center" bgcolor="#003366"><font color="#FFFFFF" size="2">×îºó»Ø¸´ÈË</font></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100" height="30">µ±Ç°Ò³ÎªµÚ<% =ipage %>Ò³</td>
<td width="258" height="30"> </td>
<td width="402" height="30" align="right">
<%
if rsarticle.pagecount > 0 then
%>
<%
if cint(ipage) = 1 then
%>
µÚÒ»Ò³ | ÉÏÒ»Ò³ |
<% else %>
<a href="titlelist.asp?page=1">µÚÒ»Ò³</a>|
<a href="titlelist.asp?page=<% =ipage - 1 %>"> ÉÏÒ»Ò³ </a>|
<% end if %>
<%
if cint(ipage) = cint(rsarticle.pagecount) then
%>
ÏÂÒ»Ò³ | ×îºóÒ»Ò³
<% else %>
<a href="titlelist.asp?page=<% =ipage + 1 %>">ÏÂÒ»Ò³</a> |
<a href="titlelist.asp?page=<% rsarticle.pagecount%>">×îºóÒ»Ò³</a>
<% end if %>
<% else %>
µÚÒ»Ò³ | ÉÏÒ»Ò³ | ÏÂÒ»Ò&s