动网首页调用

发布时间:2024-05-31 03:56 发布:上海旅游网

问题描述:

我想在我的论坛首页里的某一个表格里能显示出我论坛里的信息:

□- 主题总数 :
□- 论坛贴数 :
□- 注册人数 :
□- 论坛在线 :
□- 新进会员 :
□- 今日帖数 :
□- 昨日贴数 :
□- 高峰贴数 :
□- 最高在线 :
□- 建站时间 :

我的论坛是在动网下载的 7.1

请问具体怎样做呢,,,,麻烦能说的详细一点吗??谢谢

问题解答:

我写过。先连接数据库
<%sql="select Forum_UserNum from Dv_Setup":Set rs=Conn.Execute(sql):usernum=rs(0)%>
<table width="253" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="26" background="images/tit_bg.gif" align="left"><font color="#FFFFFF"> <strong>-=>论坛统计情况  注册会员:<%=usernum%>人</strong></font></td>
</tr>
<tr>
<td height="86" align="left" class="tableBorder1">
<%
sql="select count(id) from Dv_Online where userid>0":Set rs=Conn.Execute(sql):member=rs(0)
sql="select count(id) from Dv_Online where userid=0":Set rs=Conn.Execute(sql):guest=rs(0)
sql="select Forum_Maxonline from Dv_Setup":Set rs=Conn.Execute(sql):maxonline=rs(0)
%>
<%
If DatabaseType=1 Then
Set Rs=Conn.Execute("Select Count(*) From Dv_bbs1 Where Datediff(d,Dateandtime,GetDate())=0"):today=rs(0)
Else
Set Rs=Conn.Execute("Select Count(*) From Dv_bbs1 Where Datediff('d',Dateandtime,Now())=0"):today=rs(0)
End If
If DatabaseType=1 Then
Set Rs=Conn.Execute("Select Count(*) From Dv_bbs1 Where Datediff(d,Dateandtime,GetDate())=1"):yesterday=rs(0)
Else
Set Rs=Conn.Execute("Select Count(*) From Dv_bbs1 Where Datediff('d',Dateandtime,Now())=1"):yesterday=rs(0)
End If
sql="select Forum_PostNum from Dv_Setup":Set rs=Conn.Execute(sql):total=rs(0)
sql="select Forum_MaxPostNum from Dv_Setup":Set rs=Conn.Execute(sql):postnum=rs(0)
%>
<%Set rs=Nothing%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> 当前在线:<%=online%>人</td>
<td>今日发帖:<%=today%>篇</td>
</tr>
<tr>
<td> 最高在线:<%=maxonline%>人</td>
<td>昨日发帖:<%=yesterday%>篇</td>
</tr>
<tr>
<td> 在线会员:<%=member%>人 </td>
<td>最高发帖:<%=postnum%>篇</td>
</tr>
<tr>
<td> 在线访客:<%=guest%>人</td>
<td>帖子总数:<%=total%>篇</td>
</tr>
</table></td>
</tr>
</table>

无语…………

热点新闻