<?php

    /***************************************************************\
    |                                                               |
    |   开单大师（专业的房产ERP管理系统）                           |
    |                                                               |
    |   © 2017-2023 淮南市银泰软件科技有限公司 All rights reserved  |
    |                                                               |
    |   http://www.kaidandashi.com                                  |
    |                                                               |
    |   QQ号：984784483                                             |
    |                                                               |
    \***************************************************************/

    namespace Admin\Controller;
    use Think\Controller;
    class CommonController extends Controller {
        Public function _initialize(){
            if (session('gongsiid')=="") {
                $this->redirect('Login/index');
            }
            if (session('uid')=="") {
                $this->redirect('Login/index');
            }
            /* 读取数据库中的配置 */
            $config =   S('DB_CONFIG_DATA');
            if(!$config){
                $config = lists();
                S('DB_CONFIG_DATA',$config);
            }
            C($config); //添加配置
            $browsertype=getBrowser();
            if (!isset($_SESSION[C('USER_AUTH_KEY')])) {
                $this->redirect('Login/index');
            }
            $access = \Org\Util\Rbac::AccessDecision();
            if(!$access){
               $this->error('你没有权限',1,'index/index');
            }
            $this->jcpz = M('jcpz')->where(array('id'=>1))->find();
            $lscx = "#009688";
            $ysrba = "0,150,136";
            $this->lscx = $lscx;
            $this->ysrba = $ysrba;
            $this->lscxb = ".layui-btn-tijiao,.layui-progress-bar,.layui-form-select dl dd.layui-this,.layui-nav .layui-this:after,.layui-nav-bar,.layui-nav-tree .layui-nav-itemed:after,.layui-nav-child dd.layui-this,.layui-form-checked[lay-skin=primary] i,.layui-form-onswitch {
                background-color: ".$lscx." !important;
            }
            .layui-form-checked,.layui-form-checked:hover,.layui-form-checkbox[lay-skin=primary]:hover i,.layui-form-checked[lay-skin=primary] i,.layui-form-onswitch {
                border-color: ".$lscx." !important;
            }
            .layui-form-radio i:hover,.layui-form-radioed i,.layui-upload-icon i,.layui-tab-card>.layui-tab-more .layui-this {
                color: ".$lscx." !important;
            }
            .layui-tab-brief>.layui-tab-more li.layui-this:after,.layui-tab-brief>.layui-tab-title .layui-this:after {
                border-bottom:3px solid  ".$lscx." !important;
            }";
            $this->lscxfxk = ".layui-form-checked span,.layui-form-checked:hover span {
                background-color: ".$lscx." !important;
            }
            .layui-form-checked i,.layui-form-checked:hover i {
                color: ".$lscx." !important;
            }";
            $this->lscxdiv = ".lscxdiv .layui-form-checked span,.lscxdiv .layui-form-checked:hover span {
                background-color: ".$lscx." !important;
            }
            .lscxdiv .layui-form-checked i,.lscxdiv .layui-form-checked:hover i {
                color: ".$lscx." !important;
            }";
            $this->lscxdate = ".layui-laydate tr .layui-this,.layui-laydate ul .layui-this {
                background-color: ".$lscx." !important;
            }
            .layui-laydate tr .laydate-selected {
                background-color: rgba(0,150,136,0.3) !important;
            }
            .layui-laydate .layui-laydate-header .laydate-icon:hover,.layui-laydate .layui-laydate-header span:hover,.layui-laydate .laydate-footer-btns span:hover {
                color: ".$lscx." !important;
            }";
            $this->lscxlist = ".layui-elem-quote {
                border-left: 5px solid ".$lscx." !important;
            }
            .layui-laypage .layui-laypage-curr .layui-laypage-em {
                background-color: ".$lscx." !important;
            }
            .layui-btn-primary:hover,.layui-laypage button:hover {
                border-color: ".$lscx." !important;
                box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 8px rgba(0,150,136,0.6);
            }
            .layui-laypage a:hover {
                color: ".$lscx." !important;
            }";
            $this->lscxanbk = "border: 1px solid ".$lscx." !important;
            border-radius: 0;
            box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 8px rgba(0,150,136,0.6);";
        }
    }
?>