账号通
    

账号  

密码  

2028

查看

8

回复
主题:三问频道统计!! [收藏主题] 转到:  
k52086 当前离线

1156

主题

0

广播

0

粉丝
添加关注
级别:八年级

用户积分:5486 分
登录次数:192 次
注册时间:2008/12/18
最后登录:2011/3/10
k52086 发表于:2009/8/23 10:15:00   | 显示全部帖子 查看该作者主题 楼主 
科汛在线网校系统

ks_cls/kesion.label.commoncls.asp里

  '*********************************************************************************************************
  '函数名:GetSiteCountAll
  '作  用:替换网站统计标签为内容
  '参  数:Flag-0总统计,1-文章统计 2-图片统计
  '*********************************************************************************************************
  Function GetSiteCountAll()
     Dim ChannelTotal: ChannelTotal = Conn.Execute("Select Count(*) From KS_Class Where TN='0'")(0)
     Dim MemberTotal:MemberTotal=Conn.Execute("Select Count(*) From KS_User")(0)
     Dim CommentTotal: CommentTotal = Conn.Execute("Select Count(*) From KS_Comment")(0)
     Dim GuestBookTotal:GuestBookTotal=Conn.Execute("Select Count(ID) From KS_GuestBook")(0)
     GetSiteCountAll="<div class=""sitetotal"">" & vbcrlf
     GetSiteCountAll = GetSiteCountAll & "<li>频道总数: " & ChannelTotal & " 个</li>" & vbcrlf
     dim rsc:set rsc=conn.execute("select channelid,ItemName,Itemunit,channeltable from ks_channel where channelstatus=1 and channelid<>6 And ChannelID<>9 and channelid<>10  and channelid<>11")
     dim k,sql:sql=rsc.getrows(-1)
     rsc.close:set rsc=nothing
     for k=0 to ubound(sql,2)
     GetSiteCountAll = GetSiteCountAll & "<li>" & sql(1,k) & "总数: " & Conn.Execute("Select Count(id) From " & sql(3,k))(0) & " " & sql(2,k)&"</li>" & vbcrlf
     next
     GetSiteCountAll = GetSiteCountAll & "<li>注册会员: " & MemberTotal & " 位</li>" & vbcrlf
     GetSiteCountAll = GetSiteCountAll & "<li>留言总数: " & GuestBookTotal &" 条</li>" & vbcrlf
     GetSiteCountAll = GetSiteCountAll & "<li>评论总数: " & CommentTotal & " 条</li>" & vbcrlf
     GetSiteCountAll = GetSiteCountAll & "<li>在线人数: <script language=""javascript"" src=""" & DomainStr & "KS_Inc/online.asp?ID=1""></script> 人</li>" & vbcrlf
     GetSiteCountAll = GetSiteCountAll & "</div>" & vbcrlf
  End Function

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.06445秒 powered by KesionCMS 9.0