"; echo ''; echo '
 
'; echo ''; echo ''; echo ''; exit; } } // Header if (defined('METACONSOLE')) { agents_meta_print_header(); $sec = 'advanced'; } else { if ($id_group) $title_in_header = __("Update group"); else $title_in_header = __("Create group"); ui_print_page_header ($title_in_header, "images/group.png", false, "", true, ""); $sec = 'gagente'; } enterprise_hook('open_meta_frame'); $table->width = '98%'; $table->data = array (); $table->data[0][0] = __('Name'); $table->data[0][1] = html_print_input_text ('name', $name, '', 35, 100, true); $table->data[1][0] = __('Icon'); $files = list_files ('images/groups_small/', "png", 1, 0); foreach ($files as $key => $f) {//Remove from the list the non-desired .png files if (strpos ($f, '.bad.png') !== false || strpos ($f, '.default.png') !== false || strpos ($f, '.ok.png') !== false || strpos ($f, '.warning.png') !== false) { unset ($files[$key]); } } $table->data[1][1] = html_print_select ($files, 'icon', $icon, '', 'None', '', true); $table->data[1][1] .= ' '; if ($icon) { $table->data[1][1] .= html_print_image("images/groups_small/".$icon, true); } $table->data[1][1] .= ''; $table->data[2][0] = __('Parent'); if ($id_group) { $table->data[2][1] = html_print_select_groups(false, "AR", true, 'id_parent', $id_parent, '', '', '', true, false, true, '', false, false, false, $id_group); } else { $table->data[2][1] = html_print_select_groups(false, "AR", true, 'id_parent', $id_parent, '', '', '', true); } $table->data[2][1] .= ' '; $table->data[2][1] .= html_print_image("images/groups_small/".groups_get_icon ($id_parent).".png", true); $table->data[2][1] .= ''; $table->data[3][0] = __('Alerts'); $table->data[3][1] = html_print_checkbox ('alerts_enabled', 1, ! $alerts_disabled, true); $table->data[4][0] = __('Propagate ACL') . ui_print_help_tip (__("Propagate the same ACL security into the child subgroups."), true); $table->data[4][1] = html_print_checkbox('propagate', 1, $propagate, true); $table->data[5][0] = __('Custom ID'); $table->data[5][1] = html_print_input_text ('custom_id', $custom_id, '', 16, 255, true); $table->data[6][0] = __('Description'); $table->data[6][1] = html_print_input_text ('description', $description, '', 60, 255, true); $table->data[7][0] = __('Contact') . ui_print_help_tip (__("Contact information accessible through the _groupcontact_ macro"), true); $table->data[7][1] = html_print_textarea ('contact', 4, 40, $contact, "style='min-height: 0px;'", true); $table->data[8][0] = __('Other') . ui_print_help_tip (__("Information accessible through the _group_other_ macro"), true); $table->data[8][1] = html_print_textarea ('other', 4, 40, $other, "style='min-height: 0px;'", true); $isFunctionSkins = enterprise_include_once ('include/functions_skins.php'); if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) { $table->data[9][0] = __('Skin'); $table->data[9][1] = skins_print_select($config["id_user"], 'skin', $skin, '', __('None'), 0, true); } echo '
'; html_print_table ($table); echo '
'; if ($id_group) { html_print_input_hidden ('update_group', 1); html_print_input_hidden ('id_group', $id_group); html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"'); } else { html_print_input_hidden ('create_group', 1); html_print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"'); } echo '
'; echo '
'; enterprise_hook('close_meta_frame'); ?>