' . html_print_image ("images/lupa.png", true, array ("title" => __('View'))) . ''; $buttons['edit'] = '' . html_print_image ("images/edit.png", true, array ("title" => __('Filter list'))) . ''; $buttons['add'] = '' . html_print_image ("images/add.png", true, array ("title" => __('Add filter'))) . ''; */ //Header ui_print_page_header (__('Netflow Manager'), "images/networkmap/so_cisco_new.png", false, "", true, $buttons); $delete = (bool) get_parameter ('delete'); $multiple_delete = (bool)get_parameter('multiple_delete', 0); $id = (int) get_parameter ('id'); if ($delete) { $result = db_process_sql_delete ('tnetflow_options', array ('id_option' => $id)); if ($result !== false) $result = true; else $result = false; ui_print_result_message ($result, __('Successfully deleted'), __('Not deleted. Error deleting data')); } if ($multiple_delete) { $ids = (array)get_parameter('delete_multiple', array()); db_process_sql_begin(); foreach ($ids as $id) { $result = db_process_sql_delete ('tnetflow_options', array ('id_option' => $id)); if ($result === false) { db_process_sql_rollback(); break; } } if ($result !== false) { db_process_sql_commit(); } if ($result !== false) $result = true; else $result = false; ui_print_result_message ($result, __('Successfully deleted'), __('Not deleted. Error deleting data')); } $filter = array (); $filter['offset'] = (int) get_parameter ('offset'); $filter['limit'] = (int) $config['block_size']; $options = db_get_all_rows_filter ('tnetflow_options', $filter); if ($options === false) $filter = array (); $table->width = '80%'; $table->head = array (); $table->head[0] = __('Options name'); $table->head[1] = __('Description'); $table->head[2] = __('Action') . html_print_checkbox('all_delete', 0, false, true, false, 'check_all_checkboxes();'); $table->style = array (); $table->style[0] = 'font-weight: bold'; $table->align = array (); $table->align[2] = 'center'; $table->size = array (); $table->size[0] = '50%'; $table->size[1] = '40%'; $table->size[2] = '50px'; $table->data = array (); $total_options = db_get_all_rows_filter ('tnetflow_options', false, 'COUNT(*) AS total'); $total_options = $total_options[0]['total']; ui_pagination ($total_options, $url); foreach ($options as $option) { $data = array (); $data[0] = ''.$option['id_name'].''; $data[1] = $option['description']; $data[2] = "" . html_print_image('images/cross.png', true, array('title' => __('Delete'))) . "" . html_print_checkbox_extended ('delete_multiple[]', $option['id_option'], false, false, '', 'class="check_delete"', true); array_push ($table->data, $data); } if(isset($data)) { echo "
"; }else { echo "