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]); }
<?php use app\modules\adminshop\models\Language; use app\widgets\AjaxFileUploadWidget; use yii\helpers\Html; use yii\helpers\Url; use yii\web\UrlManager; $url = Url::to('adminshop/shop_config/upload', true); $language = new Language(); $lang_list = $language->get_lang_list(); foreach ($group['vars'] as $_k => $var) { ?> <div class="form-body " > <div class="form-group"> <div class="col-md-3 control-label"> <?php if ($var['desc']) { ?> <a href="javascript:showNotice('notice<?php echo $var['code']; ?> ');" class="tooltips" data-placement="top" data-original-title="<?php echo $var['desc']; ?> ">