<?php
/**
 * 当用户没有权限访问的时候，显示该页面
 */

/* @var $this \yii\web\View */
/* @var $content string */
use yii\helpers\Html;
use yii\web\YiiAsset;

YiiAsset::register($this);
?>

<?php $this->beginPage() ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="IE=edge">
    <?= Html::csrfMetaTags() ?>
    <title>Dashboard</title>
    <link href="<?= STATIC_URL ?>/ui/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?= STATIC_URL ?>/ui/font-awesome/css/font-awesome.css" rel="stylesheet">
    <!-- Morris -->
    <link href="<?= STATIC_URL ?>/ui/css/plugins/morris/morris-0.4.3.min.css" rel="stylesheet">
    <link href="<?= STATIC_URL ?>/ui/css/animate.css" rel="stylesheet">
    <link href="<?= STATIC_URL ?>/ui/css/style.css" rel="stylesheet">
    <link href="<?= STATIC_URL ?>/ui/css/plugins/dataTables/datatables.min.css" rel="stylesheet">
    <link href="<?= STATIC_URL ?>/ui/css/plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="<?= STATIC_URL ?>/ui/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <link href="<?= STATIC_URL ?>/ui/css/plugins/datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet">
    <link href="<?= STATIC_URL ?>/ui/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="<?= STATIC_URL ?>/ui/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="<?= STATIC_URL ?>/ui/css/plugins/select2/select2.min.css" rel="stylesheet">
    <style>
        #datatables tr.selected{
            background:#1ab394;
            color:#FFF;
        }
    </style>
    <?= isset($this->blocks['header_script']) ? trim($this->blocks['header_script']) : '' ?>
</head>

<body>
<?php $this->beginBody() ?>
<div id="wrapper">

    <?= $this->render('/common/_left.php') ?>

    <div id="page-wrapper" class="gray-bg">

        <?= $this->render('/common/_top.php') ?>

        <div class="middle-box text-center animated fadeInDown">
            <h1>NO</h1>
            <h3 class="font-bold">抱歉,您没有管理该页面内容的权限</h3>
            <div class="error-desc">
                有任何问题,请联系网站管理员
            </div>
        </div>

        <?= $this->render('/common/_footer.php') ?>

    </div>
</div>
<?php $this->endBody() ?>

<!-- Mainly scripts -->
<!--<script src="--><?//= STATIC_URL ?><!--/ui/js/jquery.1.9.1.min.js"></script>-->
<script src="<?= STATIC_URL ?>/ui/js/bootstrap.min.js"></script>
<script src="<?= STATIC_URL ?>/ui/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="<?= STATIC_URL ?>/ui/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!-- Custom and plugin javascript -->
<script src="<?= STATIC_URL ?>/ui/js/inspinia.js"></script>
<script src="<?= STATIC_URL ?>/ui/js/plugins/pace/pace.min.js"></script>
<!-- jQuery UI -->
<script src="<?= STATIC_URL ?>/ui/js/plugins/jquery-ui/jquery-ui.min.js"></script>
<script src="<?= STATIC_URL ?>/ui/js/plugins/toastr/toastr.min.js"></script>
<script src="<?= STATIC_URL ?>/ui/js/plugins/dataTables/datatables.min.js"></script>
<script src="<?= STATIC_URL ?>/ui/js/plugins/dataTables/input.js"></script>
<script charset="utf-8" src="<?= STATIC_URL ?>/ui/kindeditor/kindeditor-all-min.js"></script>
<script charset="utf-8" src="<?= STATIC_URL ?>/ui/kindeditor/lang/zh-CN.js"></script>
<script src="<?= STATIC_URL ?>/ui/js/plugins/datapicker/bootstrap-datepicker.js"></script>

<script src="<?= STATIC_URL ?>/ui/js/plugins/datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="<?= STATIC_URL ?>/ui/js/plugins/datetimepicker/bootstrap-datetimepicker.zh-CN.js"></script>

<script src="<?= STATIC_URL ?>/ui/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="<?= STATIC_URL ?>/ui/js/plugins/iCheck/icheck.min.js"></script>
<script src="<?= STATIC_URL ?>/ui/js/plugins/select2/select2.full.min.js"></script>

<script>
$(document).ready(function () {
    $('.i-checks').iCheck({
        checkboxClass: 'icheckbox_square-green',
        radioClass: 'iradio_square-green',
    });
    $(".select2").select2();
    $("#kefu").click(function(){
        window.open('http://crm2.qq.com/page/portalpage/wpa.php?uin=800800642&aty=1&a=0&curl=&ty=1','_blank','width=760,height=430,top=0px,left=0px');
    });
    $(".datetime").datetimepicker({
        language:  'zh-CN',
        format: 'yyyy-mm-dd hh:ii',
        autoclose: true,
        minView: 0,
        minuteStep:1
    });
});

</script>

<script>
var pathName = location.pathname;
var links = $('#side-menu a');
for (var i = 0; i < links.length; i++) {
    var $item = $(links[i]);
    if (~$item.attr('href').indexOf(pathName)){
        $item.parents('li:last').addClass('active').children('ul').addClass('in');
        break
    }
}
</script>

<script>
// 对Date的扩展，将 Date 转化为指定格式的String
// 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符，
// 年(y)可以用 1-4 个占位符，毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
// 例子：
// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
// (new Date()).Format("yyyy-M-d h:m:s.S")      ==> 2006-7-2 8:9:4.18
Date.prototype.Format = function(fmt) { //author: meizz
    var o = {
        "M+": this.getMonth() + 1, //月份
        "d+": this.getDate(), //日
        "h+": this.getHours(), //小时
        "m+": this.getMinutes(), //分
        "s+": this.getSeconds(), //秒
        "q+": Math.floor((this.getMonth() + 3) / 3), //季度
        "S": this.getMilliseconds() //毫秒
    };
    if(/(y+)/.test(fmt))
        fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    for(var k in o)
        if(new RegExp("(" + k + ")").test(fmt))
            fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
    return fmt;
}

function timeStamp2String(time) {
    var datetime = new Date();
    datetime.setTime(time);
    var year = datetime.getFullYear();
    var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
    var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
    var hour = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
    var minute = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
    var second = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
    return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
}

function timeStamp2StringForEcharts(time) {
    var datetime = new Date();
    datetime.setTime(time);
    var year = datetime.getFullYear();
    var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
    var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
    var hour = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
    var minute = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
    var second = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
    //return year + "/" + month + "/" + date + " " + hour + ":" + minute + ":" + second;
    return month + "/" + date + " " + hour + ":" + minute;
}

function timeStamp2StringMin(time) {
    var datetime = new Date();
    datetime.setTime(time);
    var year = datetime.getFullYear();
    var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
    var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
    var hour = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
    var minute = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
    var second = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
    //return hour + ":" + minute + ":" + second;
    return hour + ":" + minute;
}
</script>
<?= isset($this->blocks['left_script']) ? trim($this->blocks['left_script']) : '' ?>
<?= isset($this->blocks['footer_script']) ? trim($this->blocks['footer_script']) : '' ?>
</body>
</html>
<?php $this->endPage() ?>