Ejemplo n.º 1
0
function add_agi_confx($handle = null)
{
    if (empty($handle)) {
        $handle = DbConnect();
    }
    $instance_table = new Table();
    $config_group = array();
    $config_group = agi_confx_title();
    // calling function  to generate agi-conf(title_number)
    $group_title = $config_group[0];
    $config_group_id = $config_group[1];
    $description = $config_group[2];
    $value = "'{$group_title}','{$description}'";
    $func_fields = "group_title,group_description";
    $func_table = 'cc_config_group';
    $id_name = "id";
    $inserted_id = $instance_table->Add_table($handle, $value, $func_fields, $func_table, $id_name);
    $value = "SELECT config_title,config_key,config_value,config_description,config_valuetype,{$inserted_id},config_listvalues FROM cc_config WHERE config_group_id = {$config_group_id}";
    $func_fields = "config_title,config_key,config_value,config_description,config_valuetype,config_group_id,config_listvalues";
    $func_table = 'cc_config';
    $id_name = "";
    $subquery = true;
    $result = $instance_table->Add_table($handle, $value, $func_fields, $func_table, $id_name, $subquery);
    return $inserted_id;
}
}
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
// #### HEADER SECTION
$smarty->display('main.tpl');
// #### HELP SECTION
if ($form_action == 'list') {
    echo $CC_help_add_agi_confx;
} else {
    echo $CC_help_add_agi_confx;
}
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
$link = "A2B_entity_config.php?form_action=list&atmenu=config&stitle=Configuration&section=8&agi_conf=true";
$config_group = array();
$config_group = agi_confx_title();
// calling function  to generate agi-conf(title_number)
$group_title = $config_group[0];
$group_description = $config_group[2];
?>
<table width="92%" align="center" class="bar-status">
    <tr>
        <td>
            <table width="100%" style="border:1px solid">
            <thead>
                <tr>
                    <td colspan="2"  class="bgcolor_005"><font style="color:#FFFFFF;padding-left:3px"><strong><?php 
echo gettext("Group Configurations");
?>
</strong></font></td>
                </tr>
// #### HEADER SECTION
$smarty->display('main.tpl');

// #### HELP SECTION
if ($form_action=='list') echo $CC_help_add_agi_confx;
else echo $CC_help_add_agi_confx;


// #### TOP SECTION PAGE
$HD_Form -> create_toppage ($form_action);


$link = "A2B_entity_config.php?form_action=list&atmenu=config&stitle=Configuration&section=8&agi_conf=true";

$config_group = array();
$config_group  = agi_confx_title(); // calling function  to generate agi-conf(title_number)
$group_title = $config_group[0];
$group_description = $config_group[2];

?>
<table width="92%" align="center" class="bar-status">
	<tr>
		<td>
			<table width="100%" style="border:1px solid">
			<thead>
				<tr>
					<td colspan="2"  class="bgcolor_005"><font style="color:#FFFFFF;padding-left:3px"><strong><?php echo gettext("Group Configurations");?></strong></font></td>
				</tr>
			</thead>
			<tbody>
				<tr class="form_head">