public function actionList_edit() { //配置列表 $model = new Shop_config(); //处理表单提交 if (\Yii::$app->request->isPost) { $model->postDataHandle(\Yii::$app->request->post()); } $settingList = $model->get_settings(null, [5]); //可选语言 $language = new Language(); $lang_list = $language->get_lang_list(); //rewrite_confirm if (strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'iis') !== false) { $rewrite_confirm = $this->_lang['rewrite_confirm_iis']; } else { $rewrite_confirm = $this->_lang['rewrite_confirm_apache']; } // if ($this->_cfg['shop_country'] > 0) { $this->viewBag['provinces'] = get_regions(1, $this->_cfg['shop_country']); if ($this->_cfg['shop_province']) { $this->viewBag['cities'] = get_regions(2, $this->_cfg['shop_province']); } } $this->viewBag['cfg'] = $this->_cfg; $this->viewBag['lang_list'] = $lang_list; $this->viewBag['ur_here'] = $this->_lang['01_shop_config']; $this->viewBag['group_list'] = $settingList; $this->viewBag['rewrite_confirm'] = $rewrite_confirm; $this->viewBag['countries'] = get_regions(); assign_query_info(); return $this->render('list_edit', ['viewBag' => $this->viewBag]); }
/** * 载入ecshop init */ public function ec_init() { /* 载入系统参数 */ $Shop_configModel = new Shop_config(); global $_CFG; global $_LANG; $_CFG = $Shop_configModel->load_config(); $this->ec_language(); $this->_aliase(); }