各路高手们,我现在已有的代码上添加上一篇,下一篇,还有显示浏览人数的功能,谁能帮帮我??????
以下的代码是完成新闻系统中的新闻显示,有几种不同条件的显示方法,现在我想在显示的页面添加上一篇,下一篇,还有显示浏览人数的功能,可是我不懂怎么添加,请各路高手帮帮我
<%
id=strFilter(request("id"),10)
if id="" then
call msgbox("请正确指定修改新闻!",1)
end if
if not isnumeric(id) then
call msgbox("请正确指定修改新闻!",1)
end if
id=CCur(id)
sql="select top 1 title,content,skey,author,source,csize,otime,path,categoryid from news where id="&id
rs.open sql,conn,1,1
if not rs.eof then
title =rs(0)
content =rs(1)
skey =rs(2)
author =rs(3)
source =rs(4)
csize =rs(5)
otime =rs(6)
filepath =rs(7)
category =split(rs(8),".")
else
rs.close
call msgbox("该修改新闻不存在!",1)
end if
rs.close
categoryid=category(1)
%>
<%
sql=""
if (skey="" or isNull(skey)) and ubound(cindex)=2 then
sql="select top 10 id,title,pic,otime,path from news where categoryid like '%."&categoryid&".%'"
end if
if skey><"" then
sql="select top 10 id,title,pic,otime,path from news where title like '%"&skey&"%'"
end if
if sql><"" then
sql=sql&" order by otime DESC, hits DESC"
rs.open sql,conn,1,1
if not rs.eof then
aboutlist=rs.getrows()
end if
' rs.close
end if
Set rs=nothing
Set conn=nothing
if isarray(cindex) then
if ubound(cindex)<2 then
toptitle="最新新闻"
topid="<script language=""javascript"" src=""/"&newsdir&"/list.asp?id="&categoryid&"&height=15""></script>"
abouttitle="相关新闻"
else
toptitle="本专题新闻浏览排行"
topid="<script language=""javascript"" src=""/"&newsdir&"/list.asp?id="&categoryid&"&order=hits&height=15""></script>"
abouttitle="专题新闻"
end if
end if
if isarray(aboutlist) then
for i=0 to ubound(aboutlist,2)
aboutid =aboutid&" ·<a href=""/"&newsdir&"/news.asp?id="&aboutlist(0,i)&""">"&aboutlist(1,i)&"</a>"
if aboutlist(2,i)=true then
aboutid =aboutid&"[<font color=D669A5>图</font>]"
end if
aboutid =aboutid&" <font color=888888>("&aboutlist(3,i)&")</font><br>"&vbcrlf
next
Set aboutlist=nothing
end if
%><!--#include file="../admin/inc/code.asp"--><%
content=UBBCode(content)
cmode=replace(cmode,"[HOMEPAGE]",homepage)
cmode=replace(cmode,"[URL]",url)
cmode=replace(cmode,"[NEWS]",newsdir)
cmode=replace(cmode,"[TOPTITLE]",toptitle)
cmode=replace(cmode,"[TOPHTML]",topid)
cmode=replace(cmode,"[TOPPATH]",toppath)
cmode=replace(cmode,"[CATEGORY]",categorydir)
cmode=replace(cmode,"[CATEGORYITEM]",categoryitem)
cmode=replace(cmode,"[TITLE]",title)
cmode=replace(cmode,"[TIME]","发稿:"&otime)
if author><"" then
cmode=replace(cmode,"[AUTHOR]","作者:"&author)
else
cmode=replace(cmode,"[AUTHOR]","")
end if
if source><"" then
cmode=replace(cmode,"[SOURCE]","来源:"&source)
else
cmode=replace(cmode,"[SOURCE]","")
end if
cmode=replace(cmode,"[CONTENT]",content)
cmode=replace(cmode,"[ABOUT]",abouttitle)
cmode=replace(cmode,"[ABOUTHTML]",aboutid)
response.write cmode
%>