我下载了一个梦琰的论坛源码,改了一下,可是现在出现了两个问题。我看代码看了好久了。不知道什么问题啊。毕竟我刚学,能力有限。希望大虾们帮我找找问题~
问题1:论坛不是都有今日发帖么?可是不知道为什么现在这个老是13!!不管今天你发了几个帖子,都是13,我通过代码找到数据库里面的这个数据,想改成0试试看,改完了就蹦出一个对话框,“所有记录中均未找到搜索关键字”,改不了!不知道为什么啊?到底是什么原因呢?
问题2:是关于在线人数的问题。不知道为什么在线人数有问题。明明已经关闭网页了。可是还是显示在线。比如一个人在线的时候显示他在线,可是他走了还是显示他在线!所以人数从来不会减少,狂增,几天就达到400多人!实际上每天在线的平均也就几十人。这个问题是怎么回事啊?!代码我都是用的梦琰论坛的啊。没改过啊。
谁能帮帮我啊!!谢谢了!!!这个问题都郁闷我好久了!!!
关于以上问题的相关代码:
有一个indexhead.asp文件。
<!--#include file="skintop.asp"--><!--增加头部皮肤 --> <table cellspacing=1 cellpadding=2 align=center class=tableBorder1 border=0> <tr height=24> <th colspan="4" id="TableTitleLink" width="100%"> <SCRIPT LANGUAGE='JavaScript' SRC='js/fader.js' TYPE='text/javascript'></script> <SCRIPT LANGUAGE='JavaScript' TYPE='text/javascript'></script> <marquee scrollamount=3 onmouseover=this.stop(); onmouseout=this.start();> <% sql="select top 10 title,addtime from bbsnews where boardid="&boardid&" order by id desc" set rs=conn.execute(sql) if rs.bof and rs.eof then response.write "<b><a href='announcements.asp?boardid="& boardid &"' target=_blank><ACRONYM TITLE='当前没有公告'>当前没有公
告</ACRONYM></a></b> ("& now() &")" else do while (not rs.eof) response.write "◆ <b><a href='announcements.asp?boardid="& boardid &"' target=_blank>"& rs("title") &"</a></b>("& rs
("addtime") &") " %> <% rs.movenext loop%><%
end if set rs=nothing %> </th> </tr> <tr> <% if not founduser then response.Write "<td class=tableBody1 align=center valign=middle><img src=""images/noface.gif"" width=""80""
border=0></td>"&_ "<td class=tableBody1 align=center valign=middle>欢迎您来参观,<a href=reg.asp
class=cblue>注册</a>或<a href=login.asp class=cblue>登陆</a>后才能查看您的信息!</td>" else response.Write "<td class=tableBody1 align=center valign=middle>" call ShowMyselfVisual(63,"tablebody1") response.write "</td>"&_ "<td class=tableBody1 align=center valign=top>" %> <TABLE border=0 width="98%" align=center> <td width=65% > 欢迎您<font color="#FF0000"><B> <%=membername%> </B></font><% dim username username=membername set rs=server.createobject("adodb.recordset") sql="select * from [user] where username='"&UserName&"'" rs.open sql,conn,1,1 %> 这是你第 <%=rs("logins")%> 次光临 <% rs.close set rs=nothing %> </td> <tr><td height="1" bgcolor="<%=Forum_body(27)%>"></td></tr> <TR><td><a href="javascript:openScript('messanger.asp?action=new',500,400)">发短信</a> <FONT COLOR=#0000FF>※</font>
<% if Cint(newincept())>Cint(0) then if Cint(forum_setting(10))=1 then%> <script language=JavaScript>openScript('messanger.asp?action=read&id=<%=inceptid(1)%>&sender=<%
=inceptid(2)%>',500,400)</script> <% end if %> <bgsound src="<%=Forum_info(7)&Forum_statePic(8)%>" border=0> <img src=<%=Forum_info(7)&Forum_boardpic(9)%>><a href="usersms.asp?action=inbox">我的收件箱</a> (<a
href="javascript:openScript('messanger.asp?action=read&id=<%=inceptid(1)%>&sender=<%=inceptid(2)%>',500,400)"><font
color="<%=Forum_body(8)%>"><%=newincept()%> 新</font></a>) <% else %> <a href="usersms.asp?action=inbox">我的收件箱</a> (<font color=gray>0 新</font>) <% end if 'call getRe() %> <font face=Wingdings color=blue>v</font> <font color="red"><%=myClass%></font></td> </TR> <tr><td height="1" bgcolor="<%=Forum_body(27)%>"></td></tr> <TR><td><a href="topicwithme.asp?s=2">发表的主题</a> ※ <a href="topicwithme.asp?s=3">被回复的主题
</a> ※ <a href="topicwithme.asp?s=1">参与的主题</a></td></TR> <TR><td>文章数:<%=myArticle%> ※ 现金:<%=mymoney%> ※ 威望:<font color="red"><%=mypower%
></font></td></TR> <!-- <TR><td width="100%" align="center"> <table border="0" cellpadding="0" cellspacing="0" width="98%"> <tr height="10"> <td width="40">能量:</td><td><img src="pic/bar2.gif" height="10" width=""></td> <td width="40">体力:</td><td><img src="pic/bar7.gif" height="10" width=""></td> </tr> </table> </td></TR>--> <TR><td><font color="gray">您最后一次访问是在:<%=Now()%></font></td></TR> </TABLE> <% end if sql="select top 1 TopicNum,BbsNum,TodayNum,UserNum,lastUser,yesterdaynum,maxpostnum,maxpostdate,LastPost from
[config] where active=1" set rs=conn.execute(sql) LastPostInfo=split(rs("LastPost"),"$") if not isdate(LastPostInfo(2)) then LastPostInfo(2)=Now() LastPostTime=LastPostInfo(2) if datediff("d",LastPostTime,Now())>0 and ubound(LastPostInfo)=7 then conn.execute("update config set yesterdaynum=todaynum,LastPost='"&checkStr(LastPostInfo(0))&"$"&checkStr
(LastPostInfo(1))&"$"&Now()&"$"&checkStr(LastPostInfo(3))&"$"&checkStr(LastPostInfo(4))&"$"&checkStr(LastPostInfo(5))
&"$"&checkStr(LastPostInfo(6))&"$"&checkStr(LastPostInfo(7))&"'") conn.execute("update [config] set todaynum=0") end if if rs(2)>rs(6) then conn.execute("update config set maxpostnum=todaynum,maxpostdate=Now()") %> </td> <td class=tableBody1 valign="top"> <TABLE border=0 width="98%" align=center> <TR> <TD>共有<B><%= rs(3)%></B>位会员</td> <TD><a href="toplist.asp?orders=2">新进来宾</a> <a href=dispuser.asp?name=<%= htmlencode(rs
(4)) %> target=_blank class="cblue"><b><%= htmlencode(rs(4)) %></b></a></td> </TR> <tr><td height="1" bgcolor="<%=Forum_body(27)%>" colspan="2"></td></tr> <TR> <TD>今日发贴:<FONT COLOR="<%=Forum_body(8)%>"><B><%=rs(2)%></B></FONT></td> <TD>主题总数:<b><%= rs(0) %></b></td> </TR> <TR> <TD>昨日发贴:<B><%=rs(5)%></B></td> <TD>帖子总数:<b><%=rs(1)%></B></td> </TR> <TR> <TD>建站天数:<FONT COLOR="<%=Forum_body(8)%>"><B><%=datediff("d","2003-8-3",date())%
></B></FONT></td> <TD>最高日发贴:<B><%=rs(6)%></B></td> </TR> <TR> <td><script language="JavaScript" src="mm.asp"></script></td> <TD><script language="JavaScript" src="gg.asp"></script></td> </TR> </TABLE> </td> <td class=tableBody1 nowrap align="center" > <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="100"> <param name=movie value="PIC/ELYG/Clock.swf"> <param name=quality value=high> <param name="wmode" value="transparent"> <embed src="PIC/ELYG/Clock.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?
P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="100" wmode="transparent"> </embed> </object></td> </tr> <tr> <td class=tableBody2 align="center" colspan="4" height="25" width="100%"><a href=queryresult.asp?stype=3>查看新贴</a> <font face=Wingdings color=blue>v</font> <a href=hotlist.asp?stype=1>热门话题</a> <font face=Wingdings color=blue>v</font> <a href=toplist.asp?orders=1>发贴排行</a> <font face=Wingdings color=blue>v</font> <a href=toplist.asp?orders=7>用户列表</a> <font face=Wingdings color=blue>v</font> <a href=JavaScript:openScript('messanger.asp?action=new',500,400)>发送消息
</a></td> </tr> </table> <!--#include file="skinbottom.asp"--> <!-- 增加脚部皮肤 --> <br>