这是浏览帖子的代码,我已经手动向数据库中添加数据了,可是运行之后,确没有浏览到,请问是哪里的问题啊? <!--#include file="../includes/ADOVBS.inc"--> <!--#include file="../includes/conn_SQLServer.asp"--> <!--#include file="../includes/generalTools.asp"--> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>BBS-浏览</title> </head>
<body> <center> <table border="0" width="100%" height="50" cellspacing="0" cellpadding="0"> <tr> <td width="100%"></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%" bgcolor="#766DE4" height="35" align=center> <b><font color="#FFFFFF">浏览留言</font></b></td> </tr> </table> <table border="1" width="100%" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0" bgcolor="#EFEFEF"> <tr align=center> <td width="5%" bgcolor="#EFEFEF">编号</td> <td width="5%" bgcolor="#FCFCFC">人气</td> <td width="5%" bgcolor= "#EFEFEF">回复</td> <td width="35%" bgcolor="#FCFCFC">主题</td> <td width="15%" bgcolor="#EFEFEF">撰写日期</td> <td width="10%" bgcolor= "#FCFCFC">作者</td> <td width="15%" bgcolor="#EFEFEF">最新回复</td> <td width="10%" bgcolor="#FCFCFC" >回复人</td> </tr> <% sql="SELECT BBSItems.ITEM_ID, BBSItems.ITEM_TITLE, "_ &"BBSItems.COMPOSE_DATE, "_ &"BBSItems.IS_ORIGIONAL, BBSItems.AUTHOR, BBSItems.REPLYD_TIMES, "_ &"BBSItems.BROWSED_TIMES, BBSItems.LATEST_REPLICATION_ID, "_ &"BBSItems_1.COMPOSE_DATE AS LATEST_REPLICATION_DATE, "_ &"BBSItems_1.AUTHOR AS LATEST_REPLYER "_ &"FROM BBSItems INNER JOIN BBSItems BBSItems_1 "_ &"ON BBSItems.ITEM_ID = BBSItems_1.FATHERS_ID AND "_ &"BBSItems.LATEST_REPLICATION_ID = BBSItems_1.ITEM_ID "_ &"WHERE BBSItems.IS_ORIGIONAL = 1" openDB rs.open sql,conn,adOpenStatic,adLockReadOnly if rs.eof then showMsg("还没有任何留言! "_ &"[<a href='Compose.asp'>撰写留言</a>]") end if
rs.PageSize=18 dim absolutePage absolutePage=request.QueryString("absolutePage") if absolutePage="" then absolutePage=1 elseif absolutePage<0 or absolutePage>rs.PageCount then trigErr end if rs.AbsolutePage=absolutePage
dim ITEM_TITLE dim i for i=1 to rs.PageSize if rs.Eof then exit for end if ITEM_TITLE=rs("ITEM_TITLE") ITEM_TITLE=replaceBack(ITEM_TITLE) response.write"<tr align=center>" response.write"<td width='5%' bgcolor='#EFEFEF'>"_ &rs("ITEM_ID")&"</td>" response.write"<td width='5%' bgcolor='#FCFCFC'>"_ &rs("BROWSED_TIMES")&"</td>" response.write"<td width='5%' bgcolor='#EFEFEF'>"_ &rs("REPLYD_TIMES")&"</td>" response.write"<td width='35%' bgcolor='#FCFCFC'>" response.write"<a href='Read.asp?ITEM_ID="&rs("ITEM_ID")&"'>"&ITEM_TITLE&"</a></td>" response.write"<td width='15%' bgcolor='#EFEFEF''>"_ &rs("COMPOSE_DATE")&"</td>" response.write"<td width='10%' bgcolor='#FCFCFC'>"_ &rs("AUTHOR")&"</td>" if rs("ITEM_ID")=rs("LATEST_REPLICATION_ID") then response.write"<td width='15%' bgcolor='#EFEFEF'>无</td>" response.write"<td width='10%' bgcolor='#FCFCFC'>无</td>" else response.write"<td width='15%' bgcolor='#EFEFEF'>"_ &rs("LATEST_REPLICATION_DATE")&"</td>" response.write"<td width='10%' bgcolor='#FCFCFC'>"_ &rs("LATEST_REPLYER")&"</td>" end if response.write"</tr>" rs.movenext next %> <tr> <td width="100%" colspan=9 align=center height="50" bgcolor="#EFEFEF"> <% dim color for i=1 to rs.PageCount if i=absolutePage then color="#000000" response.write "<font color="&color&">"&i&"</font> " else ScriptName=request.ServerVariables("script_name") response.write "<a href="&ScriptName _ &"?absolutePage="&i&">"&i&"</font> " end if next closeDB response.write "<br>" if Err<>0 then trigErr end if if session("USER_NAME")<>"" then response.write"[<a href='Compose.asp'>撰写留言</a>] " end if %> [<a href="../link.asp">返回</a>] </tr> </table> </center> </body> </html>