app = $app; } function index(){ echo $this->app->getConf('shopadminVcode'); } function set_title(){ if($_POST){ $this->begin(); $this->app->setConf('background.title',$_POST['background_title']); $this->end(true,app::get('desktop')->_('保存成功')); }else{ echo '

'.app::get('desktop')->_('标题设置').'

'; $html = $this->ui()->form_start(array('action'=>'index.php?ctl=system&act=set_title','method'=>'post')); $background_title = $this->app->getConf('background.title'); $html .= $this->ui()->form_input(array('title'=>app::get('desktop')->_('标题:'),'name'=>'background.title','tab'=>'后台设置','value'=>$background_title,'vtype'=>'required')); $html.=$this->ui()->form_end(); echo $html; } } function service() { echo '

'.app::get('desktop')->_('系统配置').'

'; if($_POST){ $this->app->setConf('shopadminVcode',$_POST['shopamin_vocde']); } $services = app::get('base')->model('services'); $filter = array( 'content_type'=>'service_category', 'content_path'=>'select', 'disabled'=>'true', ); $all_category = $services->getList('*', $filter); $filter = array( 'content_type'=>'service', 'disabled'=>'true', ); $all_services = $services->getList('*', $filter); foreach($all_services as $k => $row){ $vars = get_class_vars($row['content_path']); $servicelist[$row['content_name']][$row['content_path']] = $vars['name']; } $html .= $this->ui()->form_start(array('method'=>'POST')); foreach($all_category as $ik => $item){ if( $item['content_name'] == 'eccommon_regions.eccommon_mdl_regions' ){ unset( $all_category[$ik] ); continue; } $current_set = app::get('base')->getConf('service.'.$item['content_name']); if(@array_key_exists($item['content_name'],$_POST['service'])){ if($current_set!=$_POST['service'][$item['content_name']]){ $current_set = $_POST['service'][$item['content_name']]; app::get('base')->setConf('service.'.$item['content_name'], $current_set); } } $form_input = array( 'title'=>$item['content_title'], 'type'=>'select', 'required'=>true, 'name'=>"service[".$item['content_name']."]", 'tab'=>$tab, 'value'=> $current_set, 'options'=>$servicelist[$item['content_name']], ); $html.=$this->ui()->form_input($form_input); } $select = $this->app->getConf('shopadminVcode'); if($select === 'true'){ $html .="  "; } else{ $html .="