'event_fields', 'value' => $event_fields ); //update 'event_fields' in tconfig table to keep the value at update. $result = db_process_sql_update('tconfig', $values, array ('token' => 'event_fields')); } $result_selected = array(); if ($fields_selected[0]!='') { foreach ($fields_selected as $field_selected) { $result_selected[$field_selected] = $field_selected; } } $event = array(); $table->width = '90%'; $table->size = array(); $table->size[0] = '20%'; $table->size[2] = '20%'; $table->data = array(); $table->data[0][0] = '

'.__('Show event fields').'

'; $fields_available = array(); $fields_available['id_evento'] = 'id_evento'; $fields_available['evento'] = 'evento'; $fields_available['id_agente'] = 'id_agente'; $fields_available['id_usuario'] = 'id_usuario'; $fields_available['id_grupo'] = 'id_grupo'; $fields_available['estado'] = 'estado'; $fields_available['timestamp'] = 'timestamp'; $fields_available['event_type'] = 'event_type'; $fields_available['id_agentmodule'] = 'id_agentmodule'; $fields_available['id_alert_am'] = 'id_alert_am'; $fields_available['criticity'] = 'criticity'; $fields_available['user_comment'] = 'user_comment'; $fields_available['tags'] = 'tags'; $fields_available['source'] = 'source'; $fields_available['id_extra'] = 'id_extra'; $fields_available['criticity_alert'] = 'criticity_alert'; //remove fields already selected foreach ($fields_available as $available) { foreach ($result_selected as $selected) { if ($selected == $available) { unset($fields_available[$selected]); } } } $table->data[1][0] = '' . __('Fields available').''; $table->data[1][1] = html_print_select ($fields_available, 'fields_available[]', true, '', __('None'), '', true, true, false); $table->data[1][2] = html_print_image('images/darrowright.png', true, array('id' => 'right', 'title' => __('Add fields to select'))); //html_print_input_image ('add', 'images/darrowright.png', 1, '', true, array ('title' => __('Add tags to module'))); $table->data[1][2] .= '



' . html_print_image('images/darrowleft.png', true, array('id' => 'left', 'title' => __('Delete fields to select'))); //html_print_input_image ('add', 'images/darrowleft.png', 1, '', true, array ('title' => __('Delete tags to module'))); $table->data[1][3] = '' . __('Fields selected') . ''; $table->data[1][4] = html_print_select($result_selected, 'fields_selected[]', true, '', __('None'), '', true, true, false); echo '
'; html_print_table($table); echo '
'; html_print_input_hidden ('update_config', 1); html_print_submit_button (__('Update'), 'upd_button', false, 'class="sub upd"'); echo ''; echo '
'; ?>