<?php
/**
 * Copy Right IJH.CC
 * Each engineer has a duty to keep the code elegant
 * $Id$
 */
if(!defined('__CORE_DIR')){
    exit("Access Denied");
}

class Ctl_XiChe_Mcenter extends Ctl
{
    
    public function __construct(&$system)
    {
        
        parent::__construct($system);       
        $staff = K::M('staff/staff')->check_login();

        if($staff[0] == 1){
            header('Location:login');  
        }
        $this->staff = $staff[1]; 
    
        $this->pagedata['staff'] = $staff[1];
        
        
        define('IN_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR);
        require(IN_DIR.'system/libs/weixin/jssdk.php');
        $site = K::$system->config->get('site');
        $n = new WeixinJSSDK($site['appid'],$site['appsecret']);
        $this->pagedata['js_sdk'] = $n->getSignPackage();




        
    }


    
    
}