public function _initialize() { parent::_initialize(); //RBAC 验证接口初始化 $this->assign('pid', $_REQUEST['pid']); $this->assign('level', $_REQUEST['level']); }
public function _initialize() { parent::_initialize(); $this->server_url=trim(C('server_url')); if (!$this->server_url){ $this->server_url='http://up.Saivi.cn/'; } $this->key=trim(C('server_key')); $this->topdomain=trim(C('server_topdomain')); if (!$this->topdomain){ $this->topdomain=$this->getTopDomain(); } if (file_exists($_SERVER['DOCUMENT_ROOT'].'/Lib')&&is_dir($_SERVER['DOCUMENT_ROOT'].'/Lib')){ $this->dirtype=2; }else { $this->dirtype=1; } $Model = new Model(); //检查system表是否存在 $Model->query("CREATE TABLE IF NOT EXISTS `".C('DB_PREFIX')."system_info` (`lastsqlupdate` INT( 10 ) NOT NULL ,`version` VARCHAR( 10 ) NOT NULL) ENGINE = MYISAM CHARACTER SET utf8"); $Model->query("CREATE TABLE IF NOT EXISTS `".C('DB_PREFIX')."update_record` ( `id` int(11) NOT NULL AUTO_INCREMENT, `msg` varchar(600) NOT NULL DEFAULT '', `type` varchar(20) NOT NULL DEFAULT '', `time` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MYISAM DEFAULT CHARSET=utf8"); }
public function _initialize() { parent::_initialize(); //RBAC 验证接口初始化 $this->pid = $this->_get('pid', 'intval'); $this->level = $this->_get('level', 'intval'); $this->assign('pid', $this->pid); $this->assign('level', $this->level); }
public function _initialize() { parent::_initialize(); $this->server_url = trim(C('server_url')); if (!$this->server_url) { $this->server_url = 'http://up.pigcms.cn/'; } $this->key = trim(C('server_key')); }
public function _initialize() { parent::_initialize(); //RBAC 验证接口初始化 $is_admin = M('user')->where(array('is_admin'=>1))->find(); if($is_admin == ''){ if($_SESSION['username'] == 'admin'){ $is_admin_save = M('user')->where(array('username'=>$_SESSION['username']))->save(array('is_admin'=>1)); } } }
protected function _initialize() { parent::_initialize(); $this->pid = $this->_get('pid', 'intval'); $this->level = $this->_get('level', 'intval'); $this->assign('pid', $this->pid); $this->assign('level', $this->level); $this->db = D('essay'); $this->cate_db = D('essay_cate'); }
public function _initialize() { parent::_initialize(); $this->server_url = trim(C('server_url')); if (!$this->server_url) { $this->server_url = 'http://update.29w.com/'; } $this->key = trim(C('server_key')); $this->topdomain=trim(C('server_topdomain')); }
public function _initialize() { parent::_initialize(); $this->server_url = trim(C('server_url')); //if (!$this->server_url) { // $this->server_url = 'http://update.114.215.105.187/'; //} $this->key = trim(C('server_key')); /* $this->topdomain=trim(C('server_topdomain'));*/ /* if (!$this -> topdomain){ $this -> topdomain = $this -> getTopDomain(); }*/ }
public function _initialize() { parent::_initialize(); //RBAC 验证接口初始化. $config_file_list = array('alipay.php','email.php','info.php','platform.php','safe.php','sms.php'); foreach($config_file_list as $vo){ $fh = fopen(CONF_PATH.$vo,"rb"); $fs = fread($fh,filesize(CONF_PATH.$vo)); fclose($fh); $fs = str_replace('\'up_exts\'','\'up_exts_error\'',$fs); file_put_contents(CONF_PATH.$vo, $fs, LOCK_EX); @unlink(RUNTIME_FILE); } $_POST = filterPost($_POST, array('up_password')); }
public function _initialize() { parent::_initialize(); $this->token = $this->_session('token'); if (!$this->token) { $this->token = 'admin'; } $this->bucket = UNYUN_BUCKET; $this->form_api_secret = UNYUN_FORM_API_SECRET; $this->upyun_domain = UNYUN_DOMAIN; $this->assign('upyun_domain', 'http://' . $this->upyun_domain); // $this->upload_type = C('upload_type') ? C('upload_type') : 'local'; }
public function _initialize() { parent::_initialize(); $this->server_url = trim(C('server_url')); if (!$this->server_url) { $this->server_url = 'http://up.pigcms.cn/'; } $this->key = trim(C('server_key')); $this->topdomain = trim(C('server_topdomain')); if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/Lib') && is_dir($_SERVER['DOCUMENT_ROOT'] . '/Lib')) { $this->dirtype = 2; } else { $this->dirtype = 1; } }
public function _initialize() { parent::_initialize(); $this->server_url = trim(C('server_url')); /* if (!$this->server_url){ $this->server_url='http://up.pigcms.cn/'; } */ $this->server_url = 'http://jyupdate.sinaapp.com/'; $this->server_url2 = 'http://up.pigcms.cn/'; $this->key = trim(C('server_key')); $this->topdomain = trim(C('server_topdomain')); if (!$this->topdomain) { $this->topdomain = $this->getTopDomain(); } if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/Lib') && is_dir($_SERVER['DOCUMENT_ROOT'] . '/Lib')) { $this->dirtype = 2; } else { $this->dirtype = 1; } $Model = new Model(); //检查system表是否存在 $Model->query("CREATE TABLE IF NOT EXISTS `" . C('DB_PREFIX') . "system_info` (`lastsqlupdate` INT( 10 ) NOT NULL ,`version` VARCHAR( 10 ) NOT NULL) ENGINE = MYISAM CHARACTER SET utf8"); $Model->query("CREATE TABLE IF NOT EXISTS `" . C('DB_PREFIX') . "update_record` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `msg` varchar(600) NOT NULL DEFAULT '',\n `type` varchar(20) NOT NULL DEFAULT '',\n `time` int(10) NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`)\n) ENGINE=MYISAM DEFAULT CHARSET=utf8"); $firstNode = M('Node')->where(array('name' => 'Function', 'title' => '功能模块'))->find(); $nodeExist = M('Node')->where(array('name' => 'aboutus'))->find(); if (!$nodeExist) { $row2 = array('name' => 'Aboutus', 'title' => '关于我们', 'status' => 1, 'remark' => '0', 'pid' => $firstNode['id'], 'level' => 2, 'sort' => 0, 'display' => 2); M('Node')->add($row2); } // $siteConfigNode = M('Node')->where(array('title' => '站点设置'))->find(); $platformConfigNode = M('Node')->where(array('title' => '平台支付配置'))->find(); if (!$platformConfigNode) { $row = array('name' => 'platform', 'title' => '平台支付配置', 'status' => 1, 'remark' => '', 'pid' => $siteConfigNode['id'], 'level' => 3, 'sort' => 0, 'display' => 2); M('Node')->add($row); } $extNode = M('Node')->where(array('title' => '扩展管理'))->find(); $platformPayNode = M('Node')->where(array('title' => '平台支付'))->find(); if (!$platformPayNode) { $row = array('name' => 'Platform', 'title' => '平台支付', 'status' => 1, 'remark' => '', 'pid' => $extNode['id'], 'level' => 2, 'sort' => 0, 'display' => 2); $platFormID = M('Node')->add($row); // $row = array('name' => 'index', 'title' => '平台对账', 'status' => 1, 'remark' => '', 'pid' => $platFormID, 'level' => 3, 'sort' => 0, 'display' => 2); M('Node')->add($row); } }
public function _initialize() { parent::_initialize(); $this->upload_path = '/data/Uploads/'; $this->savePath = $_SERVER['DOCUMENT_ROOT'] . __ROOT__ . '/data/Uploads/'; }
public function _initialize() { parent::_initialize(); $this->_mod = D('item_cate'); }
public function _initialize() { parent::_initialize(); }
public function _initialize() { parent::_initialize(); //RBAC 验证接口初始化 }
public function _initialize() { parent::_initialize(); $this->agent_db = M('Agent_price'); }
protected function _initialize() { parent::_initialize(); $this->db = D('essay'); }