$field1, 'field2' => $field2, 'field3' => $field3, 'id_group' => $group)); print_result_message ($result, __('Successfully created'), __('Could not be created')); } if ($update_action) { $id = (string) get_parameter ('id'); $name = (string) get_parameter ('name'); $id_alert_command = (int) get_parameter ('id_command'); $field1 = (string) get_parameter ('field1'); $field2 = (string) get_parameter ('field2'); $field3 = (string) get_parameter ('field3'); $group = get_parameter ('group'); $values = array (); $values['name'] = $name; $values['id_alert_command'] = $id_alert_command; $values['field1'] = $field1; $values['field2'] = $field2; $values['field3'] = $field3; $values['id_group'] = $group; $result = update_alert_action ($id, $values); print_result_message ($result, __('Successfully updated'), __('Could not be updated')); } if ($delete_action) { $id = get_parameter ('id'); $result = delete_alert_action ($id); print_result_message ($result, __('Successfully deleted'), __('Could not be deleted')); } $table->width = '90%'; $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[2] = '40px'; $table->size[3] = '40px'; $table->align = array (); $table->align[2] = 'center'; $table->align[3] = 'center'; $actions = get_db_all_rows_in_table ('talert_actions'); 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] = print_group_icon ($action["id_group"], true) .' '. get_group_name ($action["id_group"], true); $data[2] = ''. ''; $data[3] = ''. ''; array_push ($table->data, $data); } if (isset($data)){ print_table ($table); } else { echo "