{template "header.html"}



<div class="row">

    <div class="col-md-6 col-sm-6">


        <div class="portlet light bordered myportlet ">
            <div class="portlet-title tabbable-line">
                <div class="caption">
                    <i class="fa fa-cog"></i>
                    <span class="caption-subject"> <a style="color:#666" href="{dr_url('cloud/index')}">{dr_lang('程序信息')}</a> </span>
                </div>
            </div>
            <div class="portlet-body">
                <ul class="use-info">
                    <li>
                        <span>系统版本：</span>
                        <a href="{dr_url('cloud/index')}">v{$cmf_version}</a>
                        <a id="dr_cmf_update" href="{dr_url('cloud/update')}" style="margin-left: 10px;display: none" class="badge badge-danger badge-roundless">  </a>
                    </li>
                    <li>
                        <span>授权域名：</span>
                        <a target="_blank" href="http://www.diyuncms.com/license/domain/{$domain}/">{$domain}</a>
                    </li>

                </ul>
            </div>
        </div>


        <div class="portlet light bordered myportlet">
            <div class="portlet-title tabbable-line">
                <div class="caption">
                    <i class="fa fa-bar-chart"></i>
                    <span class="caption-subject"> {dr_lang('数据统计')} </span>
                </div>
            </div>
            <div class="portlet-body">
                <?php


		$mtotal = [];
		$module = $ci->get_cache('module-'.SITE_ID.'-content');
                if ($module) {
                foreach ($module as $dir => $t) {
                // 判断权限
                $mtotal[$dir] = [
                'name' => dr_lang($t['name']),
                'today' => \Phpcmf\Service::M('auth')->_menu_link_url($dir.'/home/index', $dir.'/home/index'),
                'all' => \Phpcmf\Service::M('auth')->_menu_link_url($dir.'/home/index', $dir.'/home/index'),
                'verify' => \Phpcmf\Service::M('auth')->_menu_link_url($dir.'/verify/index', $dir.'/verify/index'),
                'recycle' => \Phpcmf\Service::M('auth')->_menu_link_url($dir.'/home/index', $dir.'/recycle/index'),
                'timing' => \Phpcmf\Service::M('auth')->_menu_link_url($dir.'/home/index', $dir.'/time/index'),
                ];
                }
                }
                ?>
                <div class="table-scrollable">
                    <table class="table table-mtotal table-nomargin table-bordered table-striped table-bordered table-advance">
                        <thead>
                        <tr>
                            <th>{dr_lang('模块')}</th>
                            <th>{dr_lang('总数据')}</th>
                            <th>{dr_lang('今日')}</th>
                            <th>{dr_lang('待审核')}</th>
                            <th>{dr_lang('待发布')}</th>
                            <th>{dr_lang('回收站')}</th>
                        </tr>
                        </thead>
                        <tbody>
                        {loop $mtotal $dir $t}
                        <tr>
                            <td>{$t.name}</td>
                            <td><a class="drlabel drlabel-success" href="{$t.all}" id="{$dir}_all"><img src="{THEME_PATH}assets/images/mloading.gif"></a></td>
                            <td><a class="drlabel drlabel-success" href="{$t.today}" id="{$dir}_today"><img src="{THEME_PATH}assets/images/mloading.gif"></a></td>
                            <td><a class="drlabel drlabel-important" href="{$t.verify}" id="{$dir}_verify"><img src="{THEME_PATH}assets/images/mloading.gif"></a></td>
                            <td><a class="drlabel drlabel-important" href="{$t.timing}" id="{$dir}_timing"><img src="{THEME_PATH}assets/images/mloading.gif"></a></td>
                            <td><a class="drlabel drlabel-important" href="{$t.recycle}" id="{$dir}_recycle"><img src="{THEME_PATH}assets/images/mloading.gif"></a></td>
                        </tr>
                        <script type="text/javascript">
                            $(function(){
                                $.getScript("{dr_url('api/mtotal')}&dir={$dir}");
                            });
                        </script>
                        {/loop}
                        </tbody>
                    </table>

                </div>
            </div>
        </div>



    </div>

    <div class="col-md-6 col-sm-6">



        <div class="portlet light bordered myportlet">
            <div class="portlet-title tabbable-line">
                <div class="caption">
                    <i class="fa fa-bell"></i>
                    <span class="caption-subject"> <a style="color:#666" href="{dr_url('notice/my_index')}">{dr_lang('系统提醒')}</a> </span>
                </div>
            </div>
            <div class="portlet-body">

                <div class="scroller">
                <?php $notice = \Phpcmf\Service::M('auth')->admin_notice(12);?>
                {if !$notice}
                <div style="padding-top: 30px;padding-bottom: 30px;text-align: center;color: #d7d8da;"> {dr_lang('无任何提醒')} </div>
                {else}
                <ul class="feeds" style="padding-bottom: 20px">
                    {loop $notice $t}
                    <li>
                        <div class="col1" style="padding-top: 2px;padding-left: 3px;">
                            <div class="cont">
                                <div class="cont-col1 user-avatar">
                                    <a href="{dr_url('api/notice', array('id' => $t.id))}"><img style="height: 25px!important;" src="{dr_avatar($t.uid)}" /></a>
                                </div>
                                <div class="cont-col2">
                                    <div class="desc"><a href="{dr_url('api/notice', array('id' => $t.id))}">{$t.msg}</a></div>
                                </div>
                            </div>
                        </div>
                        <div class="col2">
                            <div class="date"> {dr_fdate($t.inputtime)} </div>
                        </div>
                    </li>
                    {/loop}
                </ul>
                {/if}

            </div>
        </div>


    </div>

</div>



</div>

<script>
    $(function () {
        $.ajax({type: "GET",dataType:"json", url: "{dr_url('api/version_cmf')}",
            success: function(json) {
                if (json.code) {
                    $('#dr_cmf_update').show();
                    $('#dr_cmf_update').html(json.msg);
                }
            }
        });
    });
</script>

{template "footer.html"}