<?php

	/***************************************************************\
	|																|
	| 开单大师（专业的房产ERP管理系统）								|
	|																|
	| © 2018 http://www.kaidandashi.com All rights reserved.		|
	|																|
	| 本系统由淮南市银泰软件科技有限公司提供技术支持				|
	|																|
	| QQ号：2159094518												|
	|																|
	\***************************************************************/

    namespace Admin\Controller;
    use Think\Controller;
    class CommonController extends Controller {
        Public function _initialize(){
            /* 读取数据库中的配置 */
            $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 = "#4B7BE7";
            $this->lscx = $lscx;
            $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-btn-normal {
                background-color: #009688;
            }
            .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(75,123,231,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(75,123,231,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(75,123,231,0.6);";
        }
    }
?>