<?php
namespace uhome\controller;
use source\Controller;

class uhome extends Controller {


    protected function _initialize(){
		/* 读取站点配置 */
        $config = api('Config/lists');
        C($config); //添加配置
        
		C('TMPL_PARSE_STRING.__STATIC__',C('WEB_SITE_STATIC_DOAMIN').'');
		C('TMPL_PARSE_STRING.__TPL__','/static/'.MODULE_NAME);
		C('TMPL_PARSE_STRING.__TPLPUBLIC__','/static/public');
		C('TMPL_PARSE_STRING.__VIEW__','/app/uhome/view');
		//网盘设置
		$domain=I('domain');
		$this->domain=$domain;
		$userconfig=userconfig_get_bydomain($domain);
		$this->userconfig=$userconfig;
		if(!S($domain)){
			S($domain,$userconfig['uid']);
		}
		
		if($userconfig['member_status']==-1){
		    $this->display('Msg_dongjie');
			exit;
		}
		
		//静态资源域名
		if(!S('STATIC')){
			S('STATIC','http://'.C('QINIU_STATIC.domain'));
		}
    }

	
}
