联系官方销售客服

1835022288

028-61286886

POSCMS 版主:POSCMS负责人
统计一下每个模块的 阅读量总和 不知道 咋写
类型:POSCMS 更新时间:2020-05-06 23:23:50

模板标签里面

image

想统计一下每个模块的 阅读量总和  不知道 咋写 谢谢


模板文件:
URL地址:

回帖
  • 二开/定制/使用解答专家
    #1楼    二开/定制/使用解答专家
    2020-05-06 14:21:58
    Chrome 0
    hits字段
  • 奇艺界
    #2楼    奇艺界
    2020-05-06 14:58:57
    Chrome 0
    二开/定制/使用解答专家 谢谢 可以具体 写一下吗?
  • 九天网络(JiuDay)
    #3楼    九天网络(JiuDay)
    2020-05-06 18:09:51
    Chrome 0

    image
    写出来了 晚上给你写教程
  • 九天网络(JiuDay)
    #4楼    九天网络(JiuDay)
    2020-05-06 23:09:53
    Chrome 0
    新建 /diy/dayrui/templates/my/main.html 将以下代码复制进去 自行比对我增加了哪些代码
    {template "nheader.html"}
    <script type="text/javascript">
        $(function(){
            $.getScript("{dr_url('home/mtotal')}");
            // 检查是否更新
            {if $member.adminid == 1}
            $.ajax({type: "GET", url:'{dr_url('api/version')}', dataType:'jsonp',jsonp:"callback",
                success: function (data) {
                    $("#finecms_version").html(data.html);
                }
            });
            {/if}
        });
    </script>
    
    <!-- BEGIN PAGE BAR -->
    <div class="page-bar">
        <ul class="page-breadcrumb">
            <li>
                <a href="{dr_url('home/main')}">{fc_lang('网站后台')}</a>
                <i class="fa fa-circle"></i>
            </li>
            <li>
                <a class="blue">{fc_lang('总览')}</a>
            </li>
        </ul>
        <div class="page-toolbar">
        </div>
    </div>
    <!-- END PAGE BAR -->
    
    <!-- BEGIN PAGE TITLE-->
    <h3 class="page-title">
        <small></small>
    </h3>
    
    {if $ip}
    <div class="alert alert-block alert-danger fade in">
        <button type="button" class="close" data-dismiss="alert"></button>
        <p> {$ip} </p>
    </div>
    {/if}
    
    {template "main2.html"}
    
    {if $admin.usermenu}
    <div class="row margin-bottom-20">
        <div class="col-md-12">
            <div class="admin-usermenu">
                {loop $admin.usermenu $t}
                <a class="btn btn-default" href="{$t.url}"> {$t.name} </a>
                {/loop}
            </div>
        </div>
    </div>
    {/if}
    
    <div class="row">
        <div class="col-md-6 col-sm-6">
            <div class="portlet light ">
                <div class="portlet-title">
                    <div class="caption">
                        <i class="fa fa-bar-chart font-green-sharp" style="font-size: 20px;"></i>
                        <span class="caption-subject font-green-sharp  ">{fc_lang('数据统计')}</span>
                    </div>
                </div>
                <div class="portlet-body">
                    <div>
                        <table class="table mtable table-nomargin table-bordered table-striped table-bordered">
                            <thead>
                            <tr>
                                <th style="text-align:center">{fc_lang('模块')}</th>
                                <th style="text-align:center">{fc_lang('总数据')}</th>
                                <th style="text-align:center">{fc_lang('今日')}</th>
                                <th style="text-align:center">{fc_lang('审核')}</th>
                                <th style="text-align:center">{fc_lang('回收站')}</th>
                                <th style="text-align:center">{fc_lang('浏览数')}</th>
                            </tr>
                            </thead>
                            <tbody>
                            {loop $mtotal $dir $t}
    {php $ci->db->select_sum('hits'); $query = $ci->db->get(SITE_ID.'_'.$dir.'_hits'); is_object($query)?$row = $query->row_array():exit();} 
    {php !$row['hits']?$row['hits']=0:$row['hits'];}
                            <tr>
                                <td style="text-align:center">{$t.name}</td>
                                <td style="text-align:center"><a class="drlabel drlabel-success" href="{$t.content}" id="{$dir}_content"><img src="{THEME_PATH}admin/images/mloading.gif"></a></td>
                                <td style="text-align:center"><a class="drlabel drlabel-success" href="{$t.today}" id="{$dir}_today"><img src="{THEME_PATH}admin/images/mloading.gif"></a></td>
                                <td style="text-align:center"><a class="drlabel drlabel-important" href="{$t.content_verify}" id="{$dir}_content_verify"><img src="{THEME_PATH}admin/images/mloading.gif"></a></td>
                                <td style="text-align:center"><a class="drlabel drlabel-important" href="{$t.recycle}" id="{$dir}_recycle"><img src="{THEME_PATH}admin/images/mloading.gif"></a></td>
                                
                                <td style="text-align:center"><a class="drlabel drlabel-important" href="javascript:;" id="{$dir}_hits">{$row['hits']}</a></td>
                                
                            </tr>
                            {/loop}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-6 col-sm-6">
            <div class="portlet light ">
                <div class="portlet-title">
                    <div class="caption">
                        <i class="fa fa-cog font-red-sunglo" style="font-size: 20px;"></i>
                        <span class="caption-subject font-red-sunglo">系统信息</span>
                    </div>
                </div>
                <div class="portlet-body">
                    <div>
                        <table class="table table-light mtable">
                            <tr>
                                <td class="mleft" align="right">{fc_lang('授权域名')}:</td>
                                <td>&nbsp;
                                    <a href="{dr_url('upgrade/info')}">{$sqdomain}</a>
                                    &nbsp;&nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td class="mleft" align="right">{fc_lang('程序版本')}:</td>
                                <td>&nbsp;<a href="{dr_url('upgrade/index')}"> POSCMS&nbsp;v{DR_VERSION}&nbsp;Bulid{dr_rp(DR_UPDATE,'.','')}&nbsp; <b style="color:red" id="finecms_version"></b> </a></td>
                            </tr>
                            <tr>
                                <td class="mleft" align="right">{fc_lang('服务器环境')}:</td>
                                <td>&nbsp;{$server} 、PHP{PHP_VERSION} 、MySql{$sqlversion}</td>
                            </tr>
                            <tr>
                                <td class="mleft" align="right">{fc_lang('上传最大值')}:</td>
                                <td>&nbsp;{php echo @ini_get("upload_max_filesize");} </td>
                            </tr>
                            <tr>
                                <td class="mleft" align="right">{fc_lang('POST最大值')}:</td>
                                <td>&nbsp;{php echo @ini_get("post_max_size");}</td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
            <div class="portlet light ">
                <div class="portlet-title">
                    <div class="caption">
                        <i class="fa fa-volume-down font-blue-hoki" style="font-size: 20px;"></i>
                        <span class="caption-subject font-blue-hoki">{fc_lang('通知提醒')}</span>
                    </div>
                    <ul class="nav nav-tabs">
                        <li class="">
                            <a href="{$notice_url}" class="active"> {fc_lang('全部')} </a>
                        </li>
                    </ul>
                </div>
                <div class="portlet-body">
                    <div >
                        {if !$notice}
                        <div style="text-align: center"> {fc_lang('无任何提醒')} </div>
                        {else}
    
                        <ul class="feeds">
                            {loop $notice $t}
                            <li>
                                <a href="{dr_url('notice/go', array('id' => $t.id))}">
                                    <div class="col1">
                                        <div class="cont">
                                            <div class="cont-col1">
                                                {if $t.type =='system'}
                                                <div class="label label-sm label-danger">
                                                    <i class="fa fa-bell-o"></i>
                                                </div>
                                                {else if $t.type =='content'}
                                                <div class="label label-sm label-warning">
                                                    <i class="fa fa-th-large"></i>
                                                </div>
                                                {else if $t.type =='app'}
                                                <div class="label label-sm label-info">
                                                    <i class="fa fa-cloud"></i>
                                                </div>
                                                {else if $t.type =='member'}
                                                <div class="label label-sm label-success">
                                                    <i class="fa fa-user"></i>
                                                </div>
                                                {/if}
                                            </div>
                                            <div class="cont-col2">
                                                <div class="desc mdesc"> {$t.msg} </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col2">
                                        <div class="date"> {dr_date($t.inputtime,'m-d')} </div>
                                    </div>
                                </a>
                            </li>
                            {/loop}
                        </ul>
                        {/if}
                    </div>
                </div>
            </div>
        </div>
    
    </div>
    
    
    {template "nfooter.html"}
    满意答案
  • 九天网络(JiuDay)
    #5楼    九天网络(JiuDay)
    2020-05-06 23:13:05
    Chrome 0

    image
  • 奇艺界
    #6楼    奇艺界
    2020-05-06 23:23:50
    iPhone手机 0
    @九天网络(JiuDay):谢谢感谢