账号通
    

账号  

密码  

2422

查看

1

回复
主题:[分享]KesionCMS X1.0 调用统计标签{$ GetSiteCountAll}出错的修复 [收藏主题]  
科汛官方 当前离线

47268

主题

145

广播

405

粉丝
添加关注
级别:管理员

用户积分:101604 分
登录次数:7935 次
注册时间:2006/12/7
最后登录:2023/12/14
科汛官方 发表于:2015/1/4 9:57:59   | 只看该作者 查看该作者主题 楼主 
科汛智能建站系统

问题如题:


修改方法


打开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 & "plus/wss/online.asp?ID=1""></script> 人</li>" & vbcrlf
     GetSiteCountAll = GetSiteCountAll & "</div>" & vbcrlf
  End Function
  


将上面红色 的改为


  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 basictype<10")

 
KesionCMS,,
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
mt56 当前离线

4985

主题

53

广播

17

粉丝
添加关注
级别:版主

用户积分:23430 分
登录次数:1621 次
注册时间:2007/2/10
最后登录:2022/9/28
mt56 发表于:2015/1/4 21:29:40   | 只看该作者 查看该作者主题 沙发 
做在线知识付费 选科汛云开店

个人感觉统计这块需要细化:

文章类、下载类、自定义模型等

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