<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="copyright" content="kgcms" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<!-- <meta http-equiv="cache-control" content="no-siteapp" /> -->
<link rel="stylesheet" type="text/css" href="{{kg['tpl_url']}}style/index.css">
<script src="{{kg['tpl_url']}}script/jquery.min.js"></script>
<script src="{{kg['server']['HTTP_HOST']}}/tools/amazeui/js/amazeui.js"></script>
<script src="{{kg['tpl_url']}}script/msclass.js"></script>
<script src="{{kg['tpl_url']}}script/iscroll.js"></script>
<script src="{{kg['tpl_url']}}script/lunar_calendar.js"></script>
<script src="{{kg['tpl_url']}}script/common.js"></script>
<script src="{{kg['tpl_url']}}script/index.js"></script>
</head>
<body data-type="index" class="Nginx-Hfu-body">
    {% include 'component_header.tpl' %}
    <div class="tpl-page-container tpl-page-header-fixed ngin-Ofu-div">
		<div class="scrollbar-wrap">
        {% include 'component_left.tpl' %}
        <div class="tpl-content-wrapper ngin-Ojs-click">
            <ol class="am-breadcrumb am-hide">
                <li>
                    <a href="#" class="am-icon-home">首页</a>
                </li>
                <li>
                    <a href="#">分类</a>
                </li>
                <li class="am-active">内容</li>
            </ol>
            <div class="tpl-content-scope">
                <div class="note note-info">
                    <h3 id="lunar-calendar">
                        今日，七月廿七，处暑
                    </h3>
                    <p>
                        <span id="date">
                            <!-- 2019年7月24日，星期三 -->
                        </span>，
                        {{ kg['lang'][1] % (kg['session']['KGCMS_ADMIN_LOGIN_ID'], '<span class="label label-danger">'~kg['session']['KGCMS_ADMIM_FREQUECY']~'</span>') }}
                    </p>
                    <div class="am-relative am-padding-vertical-sm">
                        <span class="label label-danger">提示 :</span>
                        <div class="am-notice h-px-20 pt-px-2" id="notice">
                            {%- for value in kgcms_notice %}
                            <div style="height: 22px;line-height: 22px;">
                                <a href="{{ value['url'] }}" target="_blank" style="vertical-align: middle;">{{ value['title'] }}</a>
                                <span class="am-padding-left text-gray-500" style="vertical-align: middle;">{{ value['date'] }}</span>
                            </div>
                            {%- endfor %}
                        </div>
                    </div>
                </div>
            </div>
            <div class="row row-mb">
                <div class="col-xs-12 col-sm-6">
                    <div class="tpl-portlet">
                        <div class="tpl-portlet-title">
                            <div class="tpl-caption font-green">
                                <span>{{ kg['lang'][5] }}</span>
                            </div>
                            <div class="tpl-portlet-input">
                                <div class="portlet-input input-small input-inline">
                                    <div class="input-icon right">
                                        <div class="menus actions">
                                            <ul class="actions-btn">
                                                <li class="minus green" data-am-modal="{target: '#my-alert2'}">
                                                    <a class="am-icon-list"></a>
                                                </li>
                                            </ul>
                                                <div class="am-modal am-modal-alert" tabindex="-1" id="my-alert2">
                                                <div class="am-modal-dialog">
                                                    <form method="post" id="myForm">
                                                        <div class="am-panel am-panel-primary">
                                                            <div class="am-panel-hd">菜单管理</div>
                                                            <div class="am-panel-bd" id="menu-box">
                                                                <ul class="menu-list">
                                                                    {%- for row in index_page %}
                                                                    <li>
                                                                        <a class="btn-menu am-btn am-btn-default">{{row['name']}}
                                                                            <span class="am-icon-close hd"></span>
                                                                        </a>
                                                                        <input type="hidden" name="name" value="{{row['name']}}">
                                                                        <input type="hidden" name="page" value="{{row['page']}}">
                                                                    </li>
                                                                    {%- endfor %}
                                                                    <li class="ngco-none-display">
                                                                        <input type="hidden" name="action" value="submit" />
                                                                    </li>
                                                                </ul>
                                                                <hr class="hr_margin" />
                                                                <div class="am-u-sm-push-3 am-u-sm-6 mt8">
                                                                    <div class="input-group ">
                                                                        <select data-am-selected="{searchBox: 1}" class="am-hide gourp-btn" id="indexpage">
                                                                        </select>
                                                                        <span class="am-input-group-btn">
                                                                            <button class="add-tihuan am-btn am-btn-default gourp-btn ngin-add-tihuan" type="button">添加</button>
                                                                        </span>
                                                                    </div>
                                                                </div>
                                                                <div class="am-modal-footer">
                                                                    <span class="am-modal-btn" data-am-modal-cancel>取消</span>
                                                                    <a class="am-modal-btn" id="sub">确定</a>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </form>
                                                </div>
                                                </div>


                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="wrapper" class="">
                           
								<div class="row">
									  {%- for row in index_page %}
									   <div class="col-xs-6 col-lg-4">
									      <div class="am-btn am-btn-default ngin-tihuan-use">
									          <a href="{{row['page']}}" class="">
									              <span class="mr8 {% for var in kg['admin_page']['left_menu'] %}{%- for var1 in var['submenu'] -%}{%- if row['page'] == var1['page'] -%}{%- if var1['icon'] -%}{{var1['icon']}}{%- else -%}am-icon-location-arrow{%- endif -%}{%- endif -%} {%- endfor -%}{% endfor %}">
									              </span>{{row['name']}}
									          </a>
									          {%- if row['page'] in admin_page %}
									          <a href="{{row['page']|replace('manage','update')}}" class="">
									              <span class="am-icon-plus"></span>
									          </a>
									          {%- endif %}
									      </div>
									  </div>
									  {%- endfor %}						
								</div>
                            
                        </div>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-6">
                    <div class="tpl-portlet">
                        <div class="tpl-portlet-title">
                            <div class="tpl-caption font-green">
                                <span>最近使用</span>
                            </div>
                            <div class="tpl-portlet-input">
                                <div class="portlet-input input-small input-inline">
                                    <div class="input-icon right">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="wrapper2" class="">
							<div class="row">
								  {%- for row in recent %}
								   <div class="col-xs-6 col-lg-4">
								      <div class="am-btn am-btn-default ngin-tihuan-use">
								          <a href="{{row['page']}}" >
								             <span class="{% if row['icon'] %}{{row['icon']}}{% else %}am-icon-location-arrow{% endif %} mr8"></span>{{row['name']}}
								          </a>
								          {%- if row['page'] in admin_page %}
								          <a href="{{row['page']|replace('manage','update')}}" class="">
								              <span class="am-icon-plus"></span>
								          </a>
								          {%- endif %}
								      </div>
								  </div>
								  {%- endfor %}						
							</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-3">
                    <a href="article_manage">
                        <div class="dashboard-stat blue">
                            <div class="visual">
                                <i class="am-icon-comments-o"></i>
                            </div>
                            <div class="details">
                                <div class="number"> {{data_count['article_count']}} </div>
                                <div class="desc">文章</div>
                            </div>
                            <span class="more"> 查看更多
                                <i class="m-icon-swapright m-icon-white"></i>
                            </span>
                        </div>
                    </a>
                </div>
                <div class="col-xs-12 col-sm-6 col-md-3">
                    <a href="product_manage">
                        <div class="dashboard-stat red">
                            <div class="visual">
                                <i class="am-icon-bar-chart-o"></i>
                            </div>
                            <div class="details">
                                <div class="number"> {{data_count['product_count']}} </div>
                                <div class="desc"> 商品 </div>
                            </div>
                            <span class="more"> 查看更多
                                <i class="m-icon-swapright m-icon-white"></i>
                            </span>
                        </div>
                    </a>
                </div>
                <div class="col-xs-12 col-sm-6 col-md-3">
                    <a href="shop_order_manage">
                        <div class="dashboard-stat green">
                            <div class="visual">
                                <i class="am-icon-apple"></i>
                            </div>
                            <div class="details">
                                <div class="number"> {{data_count['order_count']}} </div>
                                <div class="desc"> 订单 </div>
                            </div>
                            <span class="more"> 查看更多
                                <i class="m-icon-swapright m-icon-white"></i>
                            </span>
                        </div>
                    </a>
                </div>
                <div class="col-xs-12 col-sm-6 col-md-3">
                    <a href="picture_manage">
                        <div class="dashboard-stat purple">
                            <div class="visual">
                                <i class="am-icon-android"></i>
                            </div>
                            <div class="details">
                                <div class="number"> {{data_count['picture_count']}} </div>
                                <div class="desc"> 图片 </div>
                            </div>
                            <span class="more"> 查看更多
                                <i class="m-icon-swapright m-icon-white"></i>
                            </span>
                        </div>
                    </a>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 col-sm-6 ngco-row-mb-lin">
                    <div class="tpl-portlet">
                        <div class="tpl-portlet-title">
                            <div class="tpl-caption font-green ">
                                <span>系统信息</span>
                                <span class="caption-helper">10 条</span>
                            </div>
                            <div class="am-padding-vertical-sm am-fr">
                                <span class="tpl-label-info ">
                                    <a href="./environ" class="text-white" target="_blank">全局变量&nbsp;
                                        <i class="am-icon-share"></i>
                                    </a>
                                </span>
                            </div>
                        </div>
                        <div id="wrapper3" class="wrapper">
                            <div id="scroller3" class="scroller">
                                <ul class="tpl-task-list">
                                    <li class="h-px-42">
                                        <div class="task-checkbox">
                                        </div>
                                        <div class="task-title">
                                            <span class="task-title-sp">
                                                当前版本：KGCMS v{{ kgcms_version[1] }}
                                                <span class="label label-sm label-success">{{ kgcms_version[0] }}</span>&nbsp;&nbsp;/&nbsp;&nbsp;发布日期：{{ kgcms_version[2] }}
                                            </span>
                                        </div>
                                    </li>
                                    <li class="h-px-42">
                                        <div class="task-checkbox">
                                        </div>
                                        <div class="task-title">
                                            <span class="task-title-sp">
                                                最新版：{{ kgcms_new_version[0] }}&nbsp;&nbsp;/&nbsp;&nbsp;发布日期：{{ kgcms_new_version[1] }}
                                            </span>
                                            <span class="tpl-label-info jg">
                                                <a href="http://www.kgcms.com" target="_blank" class="text-white">立即升级&nbsp;
                                                    <i class="am-icon-cloud-download"></i>
                                                </a>
                                            </span>
                                        </div>
                                    </li>
                                    <li class="h-px-42">
                                        <div class="task-checkbox">
                                        </div>
                                        <div class="task-title">
                                            <span class="task-title-sp">
                                                Python 启动时间：{{ kg['run_start_time'][0]|date('%Y-%m-%d&nbsp;&nbsp;%H:%M:%S') }}&nbsp;&nbsp;/&nbsp;&nbsp;
                                                已运行：{{ kg['run_start_time']|run_time(1) }}&nbsp;&nbsp;
                                                <span class="tpl-label-info jg">
                                                    <a href="/api/admin_process?action=app_restart" target="_blank" class="text-white">重启项目&nbsp;
                                                        <i class="am-icon-refresh"></i>
                                                    </a>
                                                </span>
                                            </span>
                                        </div>
                                    </li>
                                    <li class="h-px-42">
                                        <div class="task-checkbox">
                                        </div>
                                        <div class="task-title">
                                            <span class="task-title-sp"> 服务器环境：{{ kg['server']['SERVER_SOFTWARE'] }}&nbsp;&nbsp;/&nbsp;&nbsp;OS：{{ kg['server']['SERVER_OS'][0] }}-{{ kg['server']['SERVER_OS'][1] }}-{{ kg['server']['SERVER_OS'][2] }}&nbsp;&nbsp;/&nbsp;&nbsp;PORT：{{ kg['server']['SERVER_PORT'] }}</span>
                                        </div>
                                    </li>
                                    <li class="h-px-42">
                                        <div class="task-checkbox">
                                        </div>
                                        <div class="task-title">
                                            <span class="task-title-sp">
                                                Python Version：
                                                <span class="label label-sm label-default">{{ python_version[0] }}</span>&nbsp;&nbsp;/ 发布日期：{{ python_version[1] }}&nbsp;&nbsp;/&nbsp;&nbsp;{{ python_version[2] }}</span>
                                        </div>
                                    </li>
                                    <li class="h-px-42">
                                        <div class="task-checkbox">
                                        </div>
                                        <div class="task-title">
                                            <span class="task-title-sp">
                                                MySQL Version：
                                                <span class="label label-sm label-default">{{ mysql_version }}</span>&nbsp;&nbsp;/&nbsp;&nbsp;<span class="label label-danger">{{ db_table_count }}</span> 个数据表
                                            </span>
                                        </div>
                                    </li>
                                    <li class="h-px-42">
                                        <div class="task-checkbox">
                                        </div>
                                        <div class="task-title">
                                            <span class="task-title-sp"> 单文件上传限制：
                                                图片 <span class="label label-danger">{{ kg['globals']['upload_imag_size'] }}</span>&nbsp;M&nbsp;&nbsp;/&nbsp;&nbsp;
                                                附件 <span class="label label-danger">{{ kg['globals']['upload_file_size'] }}</span>&nbsp;M
                                            </span>
                                        </div>
                                    </li>
                                    <li class="h-px-42">
                                        <div class="task-checkbox">
                                        </div>
                                        <div class="task-title">
                                            <span class="task-title-sp"> 允许上传的文件类型：{{ kg['globals']['upload_type'] }} </span>
                                        </div>
                                    </li>
                                    <li class="h-px-42">
                                        <div class="task-checkbox">
                                        </div>
                                        <div class="task-title">
                                            <span class="task-title-sp"> 项目物理路径：{{ kg['server']['ROOT_PATH'] }} </span>
                                        </div>
                                    </li>
                                    <li class="h-px-42">
                                        <div class="task-checkbox">
                                        </div>
                                        <div class="task-title">
                                            <span class="task-title-sp"> 其它工具：Jinja2/AmazeUI/Ueditor/jQuery</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-6 ngco-row-mb-lin">
                    <div class="tpl-portlet">
                        <div class="tpl-portlet-title">
                            <div class="tpl-caption font-green ">
                                <span>系统日志</span>
                            </div>
                        </div>
                        <div class="am-tabs tpl-index-tabs" data-am-tabs>
                            <ul class="am-tabs-nav am-nav am-nav-tabs">
                                <li class="am-active"><a href="#tab11">全部</a></li>
                                <li><a href="#tab22">登录</a></li>
                                <li><a href="#tab33">操作</a></li>
                                <li><a href="#tab44">上传</a></li>
                            </ul>
                            <div class="am-tabs-bd">
                                <div class="am-tab-panel am-fade am-in am-active" id="tab11">
                                    <div id="wrapperAA" class="wrapper">
                                        <div id="scroller4" class="scroller">
                                            <ul class="tpl-task-list tpl-task-remind">
                                                {%- for row in log['all'] %}
                                                <li class="h-px-42">
                                                    <div class="cosB">
                                                        {{ row['interval'] }}
                                                    </div>
                                                    <div class="cosA">
                                                        {%- if row['state']=='SUCCESS' %}
                                                        <span class="cosIco absolute" title="操作成功">
                                                            <i class="am-icon-check-circle"></i>
                                                        </span>
                                                        {%- else %}
                                                        <span class="cosIco label-danger absolute" title="操作失败">
                                                            <i class="am-icon-exclamation-circle"></i>
                                                        </span>
                                                        {%- endif %}
                                                        <span class="am-text-truncate inline-block width-percentage-90 am-margin-left-lg">
                                                            &nbsp;
                                                            {%- if row['loginid']['admin'] or row['loginid']['user'] %}
                                                            {%- if row['loginid']['admin'] %}
                                                            <a href="log?aid={{ row['loginid']['admin'] }}">
                                                                {{ row['loginid']['admin'] }}
                                                            </a>
                                                            {%- else %}
                                                            <a href="log?aid={{ row['loginid']['user'] }}">
                                                                {{ row['loginid']['user'] }}</a>
                                                            {%- endif %}
                                                            {%- else %}
                                                            <em>None</em>
                                                            {%- endif %}
                                                            &nbsp;&nbsp;/&nbsp;&nbsp;{{ row['msg'] }}&nbsp;&nbsp;/&nbsp;&nbsp;
                                                            <i class="am-icon-map-marker"></i>&nbsp;&nbsp;
                                                            <a href="{{ip_find}}{{ row['ip'] }}" title="{{ row['ip'] }}" target="_blank">
                                                                {%- if row['address'] == '-' or row['address'] == '' %}
                                                                {{row['ip']}}
                                                                {%- else %}
                                                                {{ row['address'] }}
                                                                {%- endif %}
                                                            </a>
                                                        </span>
                                                    </div>
                                                </li>
                                                {%- endfor %}
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="am-tab-panel am-fade" id="tab22">
                                    <div id="wrapperBB" class="wrapper">
                                        <div id="scroller5" class="scroller">
                                            <ul class="tpl-task-list tpl-task-remind">
                                                {%- for row in log['login'] %}
                                                <li class="h-px-42">
                                                    <div class="cosB">
                                                        {{ row['interval'] }}
                                                    </div>
                                                    <div class="cosA">
                                                        {%- if row['state']=='SUCCESS' %}
                                                        <span class="cosIco absolute" title="操作成功">
                                                            <i class="am-icon-check-circle"></i>
                                                        </span>
                                                        {%- else %}
                                                        <span class="cosIco label-danger absolute" title="操作失败">
                                                            <i class="am-icon-exclamation-circle"></i>
                                                        </span>
                                                        {%- endif %}
                                                        <span class="am-text-truncate inline-block width-percentage-90 am-margin-left-lg">
                                                            &nbsp;
                                                            {%- if row['loginid']['admin'] or row['loginid']['user'] %}
                                                            {%- if row['loginid']['admin'] %}
                                                            <a href="log?aid={{ row['loginid']['admin'] }}">
                                                                {{ row['loginid']['admin'] }}</a>
                                                            {%- else %}
                                                            <a href="log?aid={{ row['loginid']['user'] }}">
                                                                {{ row['loginid']['user'] }}</a>
                                                            {%- endif %}
                                                            {%- else %}
                                                            <em>None</em>
                                                            {%- endif %}&nbsp;&nbsp;/&nbsp;&nbsp;{{ row['msg'] }}&nbsp;&nbsp;/&nbsp;&nbsp;
                                                            <i class="am-icon-map-marker"></i>&nbsp;&nbsp;
                                                            <a href="http://www.ip138.com/ips138.asp?ip={{ row['ip'] }}" target="_blank">{{ row['ip'] }}</a>
                                                        </span>
                                                    </div>
                                                </li>
                                                {%- endfor %}
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="am-tab-panel am-fade" id="tab33">
                                    <div id="wrapperCC" class="wrapper">
                                        <div id="scroller6" class="scroller">
                                            <ul class="tpl-task-list tpl-task-remind">
                                                {%- for row in log['mysql'] %}
                                                <li class="h-px-42">
                                                    <div class="cosB">
                                                        {{ row['interval'] }}
                                                    </div>
                                                    <div class="cosA">
                                                        {%- if row['state']=='SUCCESS' %}
                                                        <span class="cosIco absolute" title="操作成功">
                                                            <i class="am-icon-check-circle"></i>
                                                        </span>
                                                        {%- else %}
                                                        <span class="cosIco label-danger absolute" title="操作失败">
                                                            <i class="am-icon-exclamation-circle"></i>
                                                        </span>
                                                        {%- endif %}
                                                        <span class="am-text-truncate inline-block width-percentage-90 am-margin-left-lg">
                                                            &nbsp;
                                                            {%- if row['loginid']['admin'] or row['loginid']['user'] %}
                                                            {%- if row['loginid']['admin'] %}
                                                            <a href="log?aid={{ row['loginid']['admin'] }}">
                                                                {{ row['loginid']['admin'] }}</a>
                                                            {%- else %}
                                                            <a href="log?aid={{ row['loginid']['user'] }}">
                                                                {{ row['loginid']['user'] }}</a>
                                                            {%- endif %}
                                                            {%- else %}
                                                            <em>None</em>
                                                            {%- endif %}&nbsp;&nbsp;/&nbsp;&nbsp;{{ row['msg'] }}&nbsp;&nbsp;/&nbsp;&nbsp;
                                                            <i class="am-icon-map-marker"></i>&nbsp;&nbsp;
                                                            <a href="http://www.ip138.com/ips138.asp?ip={{ row['ip'] }}" target="_blank">{{ row['ip'] }}</a>
                                                        </span>
                                                    </div>
                                                </li>
                                                {%- endfor %}
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="am-tab-panel am-fade" id="tab44">
                                    <div id="wrapperDD" class="wrapper">
                                        <div id="scroller7" class="scroller">
                                            <ul class="tpl-task-list tpl-task-remind">
                                                {%- for row in log['upload'] %}
                                                <li class="h-px-42">
                                                    <div class="cosB">
                                                        {{ row['interval'] }}
                                                    </div>
                                                    <div class="cosA">
                                                        {%- if row['state']=='SUCCESS' %}
                                                        <span class="cosIco absolute" title="操作成功">
                                                            <i class="am-icon-check-circle"></i>
                                                        </span>
                                                        {%- else %}
                                                        <span class="cosIco label-danger absolute" title="操作失败">
                                                            <i class="am-icon-exclamation-circle"></i>
                                                        </span>
                                                        {%- endif %}
                                                        <span class="am-text-truncate inline-block width-percentage-90 am-margin-left-lg">
                                                            &nbsp;
                                                            {%- if row['loginid']['admin'] or row['loginid']['user'] %}
                                                            {%- if row['loginid']['admin'] %}
                                                            <a href="log?aid={{ row['loginid']['admin'] }}">
                                                                {{ row['loginid']['admin'] }}</a>
                                                            {%- else %}
                                                            <a href="log?aid={{ row['loginid']['user'] }}">
                                                                {{ row['loginid']['user'] }}</a>
                                                            {%- endif %}
                                                            {%- else %}
                                                            <em>None</em>
                                                            {%- endif %}
                                                            &nbsp;&nbsp;/&nbsp;&nbsp;{{ row['msg'] }}&nbsp;&nbsp;/&nbsp;&nbsp;
                                                            <i class="am-icon-map-marker"></i>&nbsp;&nbsp;
                                                            <a href="http://www.ip138.com/ips138.asp?ip={{ row['ip'] }}" target="_blank">{{ row['ip'] }}</a>
                                                        </span>
                                                    </div>
                                                </li>
                                                {%- endfor %}
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
{% include 'component_footer.tpl' %}
        </div>
		</div><!-- /.scrollbar-wrap -->
    </div>
    <script>
    $(function() {
        //定义下拉列表初始化值
        var menuLists = [
            {% for row in kg["admin_page"]["left_menu"] %}
            {% for var in row['submenu'] %}
            {
                name:'{{var["name"]}}',
                href:'{{var["page"]}}',
            },
            {% endfor %}
            {% endfor %}
        ];
        //获取下拉列表
        var select = $('.mt8 select');
        $.each(menuLists, function(key, value) {
            select.append("<option value='" + value.href + "'>" + value.name + "</option>");
        });
    })
    </script>
</body>
</html>