function __construct() { parent::__construct(); $this->game_id = 6; $this->package = 'XianHun'; // $this->_utilMsg=$this->_getGlobalData('Util_Msg','object'); // $this->_createView(); // $this->_createUrl(); }
function __construct() { parent::__construct(); if (ACTION == 'Moudle') { return; //当设置权限时,放行 } $this->package = 'ActionGame'; $this->_view->set_tpl_dir('actionTheme'); //改掉模板目录(主题) $this->game_id = intval($_REQUEST['__game_id']); //从接口中获取game_id if (!$this->game_id) { $this->_returnAjaxJson(array('status' => 0, 'info' => 'game id error', 'data' => NULL)); } //这个迟点可以优化到搬到game类调用 // $this->_gameIfConf = $this->_getGlobalData('game_if_conf/'.$this->game_id); $gameObject = $this->_getGlobalData($this->game_id, 'game'); $this->_gameIfConf = $gameObject->getIfConf(); if (!$this->_gameIfConf[ACTION]['action']) { $this->_returnAjaxJson(array('status' => 0, 'info' => 'game interface not found', 'data' => NULL)); } }