<?php
require 'inc.php';
$obj_tab_config=new cls_tab_sys_config();

$tab_config=DB_PRE."sys_config";

if(!isset($get_act)) $get_act="";
(!isset($get_id))?$get_id=0:$get_id=intval($get_id);

$arr_model=array();
$obj_result = $obj_db->query("SELECT * FROM ".DB_PRE."sys_model order by model_sort");
while($obj_rs = $obj_db->fetch_array($obj_result))
{
	$arr_model[]=$obj_rs;
	$arr_modelkey["id_".$obj_rs["model_id"]]=$obj_rs["model_regkey"];
}
if(!isset($get_model_id)){
	if(count($arr_model)>0){
		$get_model_id=$arr_model[0]["model_id"];
		$model_key=$arr_model[0]["model_regkey"];
	}else{
		$get_model_id=0;
		$model_key="";
	}
}else{
	$model_key=$arr_modelkey["id_".$get_model_id];
}
$page_footer_info=<<<HTML
<input type='hidden' name='model_id' value='$get_model_id'>
HTML;

$arr_config = array();
$str_where=" where config_model_id='".$get_model_id."'";
$obj_result = $obj_db->query("SELECT * FROM ".$tab_config.$str_where);
while($obj_rs = $obj_db->fetch_array($obj_result))
{
	if($obj_rs["config_list"]!="")	$obj_rs["config_list"]=$obj_tab_config->get_config_list($obj_rs["config_list"]);
	$arr_config[] = $obj_rs;
}
include 'tpl/getconfig.tpl.php';

?>
