width = '100%'; $table->class = 'databox data'; $table->data = array (); $table->head = array (); $table->head[0] = __('Name'); $table->head[1] = __('Group'); $table->head[2] = __('Copy'); $table->head[3] = __('Delete'); $table->style = array (); $table->style[0] = 'font-weight: bold'; $table->size = array (); $table->size[1] = '200px'; $table->size[2] = '40px'; $table->size[3] = '40px'; $table->align = array (); $table->align[1] = 'left'; $table->align[2] = 'left'; $table->align[3] = 'left'; $filter = array(); if (!is_user_admin($config['id_user'])) $filter['talert_actions.id_group'] = array_keys(users_get_groups(false, "LM")); $actions = db_get_all_rows_filter ( 'talert_actions INNER JOIN talert_commands ON talert_actions.id_alert_command = talert_commands.id', $filter, 'talert_actions.* , talert_commands.id_group AS command_group' ); if ($actions === false) $actions = array (); $rowPair = true; $iterator = 0; foreach ($actions as $action) { if ($rowPair) $table->rowclass[$iterator] = 'rowPair'; else $table->rowclass[$iterator] = 'rowOdd'; $rowPair = !$rowPair; $iterator++; $data = array (); $data[0] = ''. $action['name'].''; $data[1] = ui_print_group_icon ($action["id_group"], true) .' '; if (!alerts_validate_command_to_action($action["id_group"], $action["command_group"])) { $data[1].= html_print_image( "images/error.png", true, // FIXME: Translation. array("title" => __("The action and the command associated with it do not have the same group. Please contact an administrator to fix it.") )); } if (check_acl($config['id_user'], $action["id_group"], "LM")) { $data[2] = '' . html_print_image("images/copy.png", true) . ''; $data[3] = ''. html_print_image("images/cross.png", true) . ''; } array_push ($table->data, $data); } if (isset($data)) { html_print_table ($table); } else { ui_print_info_message ( array('no_close'=>true, 'message'=> __('No alert actions configured') ) ); } echo '
'; echo '
'; html_print_submit_button (__('Create'), 'create', false, 'class="sub next"'); html_print_input_hidden ('create_alert', 1); echo '
'; echo '
'; enterprise_hook('close_meta_frame'); ?>