publicfunctionparatem($listid='',$module='',$class1='',$class2='',$class3=''){global$_M;$paralist=$this->get_para_list($module,$class1,$class2,$class3);foreach($paralistas$key=>$para){$list=$this->parameter_database->get_parameters($module,$para['id']);$paralist[$key]['list']=$list;if($para['type']==4||$para['type']==2||$para['type']==6){$values=array();foreach($listas$val){$query="SELECT * FROM {$_M['table']['plist']} WHERE listid = {$listid} AND paraid={$para['id']} AND module={$module} AND info = '{$val['id']}' AND lang = '{$_M['lang']}'";$para_value=DB::get_one($query);if($para_value){$values[]=$para_value['info'];}}$query="SELECT * FROM {$_M['table']['plist']} WHERE listid = {$listid} AND paraid={$para['id']} AND module={$module} AND lang = '{$_M['lang']}'";$para_value=DB::get_one($query);$values=$para_value['info'];}else{$query="SELECT * FROM {$_M['table']['plist']} WHERE listid = {$listid} AND paraid={$para['id']} AND module={$module} AND lang = '{$_M['lang']}'";$para_value=DB::get_one($query);$values=$para_value['info'];}if(is_array($values)){$paralist[$key]['value']=implode('|',$values);}else{$paralist[$key]['value']=$values;}}return$paralist;##require PATH_WEB.'app/system/include/public/ui/admin/paratype.php';
}
publicfunctiondoget_admin_pack($appno,$site,$editor){global$_M;$sql=$appno?"AND app = {$appno}":'';$language_data=array();if($site=='admin'){$query="SELECT name,value FROM {$_M['table']['language']} WHERE lang='{$editor}' AND site ='1' {$sql}";$language_data=DB::get_all($query);$lang_pack_url=PATH_WEB.'cache/language_admin_'.$editor.'.ini';}elseif($site=='web'){$query="SELECT name,value FROM {$_M['table']['language']} WHERE lang='{$editor}' AND site ='0' {$sql}";$language_data=DB::get_all($query);$lang_pack_url=PATH_WEB.'cache/language_web_'.$editor.'.ini';}foreach($language_dataas$key=>$val){file_put_contents($lang_pack_url,$val['name'].'='.$val['value'].PHP_EOL,FILE_APPEND);}}