2012-01-09 Vanessa Gil <vanessa.gil@artica.es>

* godmode/netflow/nf_item_list.php
	  godmode/netflow/nf_report_item.php
	  pandoradb.sql: Fixed editing and deleting netflow filters.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5328 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2012-01-09 10:04:31 +00:00
parent ab5c016cdc
commit c19987d5d6
4 changed files with 16 additions and 20 deletions

View File

@ -1,3 +1,8 @@
2012-01-09 Vanessa Gil <vanessa.gil@artica.es>
* godmode/netflow/nf_item_list.php
godmode/netflow/nf_report_item.php
pandoradb.sql: Fixed editing and deleting netflow filters.
2012-01-05 Ramon Novoa <rnovoa@artica.es>
* include/functions_graph.php,

View File

@ -134,8 +134,9 @@ $total_reports_item = $total_reports_item[0]['total'];
$data = array ();
$data[0] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_report_item&id='.$item['id_report'].'&id_rc='.$item['id_rc'].'">'.$item['id_rc'].'</a>';
$data[1] = $item['id_filter'];
$name_filter = db_get_value('id_name', 'tnetflow_filter', 'id_sg', $item['id_filter']);
//$data[1] = $item['id_filter'];
$data[1] = $name_filter;
$data[2] = $item['max'];
@ -153,7 +154,6 @@ $total_reports_item = $total_reports_item[0]['total'];
$data[3] = 'Table total period';
break;
}
//$data[3] = $item['show_graph'];
$data[4] = "<a onclick='if(confirm(\"" . __('Are you sure?') . "\")) return true; else return false;'
href='index.php?sec=netf&sec2=godmode/netflow/nf_item_list&delete=1&id_rc=".$item['id_rc']."&id=".$id."&offset=0'>" .

View File

@ -60,13 +60,14 @@ if ($id_rc) {
if ($update) {
$name_filter = get_parameter('id_filter');
$id_filter = db_get_value('id_sg', 'tnetflow_filter', 'id_name', $name_filter);
$max_val = get_parameter('max','2');
$show_graph = get_parameter('show_graph','');
$result = db_process_sql_update ('tnetflow_report_content',
array (
'id_report' => $id,
'id_filter' => $name_filter,
'id_filter' => $id_filter,
'max' => $max_val,
'show_graph' => $show_graph
),
@ -79,12 +80,13 @@ if ($update) {
if ($create){
$name_filter = get_parameter('id_filter');
$id_filter = db_get_value('id_sg', 'tnetflow_filter', 'id_name', $name_filter);
$max_val = get_parameter('max','2');
$show_graph = get_parameter('show_graph','');
$values = array (
'id_report' => $id,
'id_filter' => $name_filter,
'id_filter' => $id_filter,
'max' => $max_val,
'show_graph' => $show_graph
);

View File

@ -1312,19 +1312,6 @@ CREATE TABLE IF NOT EXISTS `tnetflow_report` (
PRIMARY KEY(`id_report`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- -----------------------------------------------------
-- Table `tnetflow_options`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `tnetflow_options` (
`id_option` int(10) unsigned NOT NULL auto_increment,
`id_name` varchar(60) NOT NULL default '0',
`description` TEXT NOT NULL default '',
`path` varchar(200),
`port` varchar(100),
PRIMARY KEY (`id_option`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- -----------------------------------------------------
-- Table `tnetflow_report_content`
-- -----------------------------------------------------
@ -1332,12 +1319,14 @@ PRIMARY KEY (`id_option`)
CREATE TABLE IF NOT EXISTS `tnetflow_report_content` (
`id_rc` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`id_report` INTEGER UNSIGNED NOT NULL default 0,
`id_filter` varchar(60),
`id_filter` INTEGER UNSIGNED NOT NULL default 0,
`date` bigint(20) NOT NULL default '0',
`period` int(11) NOT NULL default 0,
`max` int (11) NOT NULL default 0,
`show_graph` varchar(60),
PRIMARY KEY(`id_rc`),
FOREIGN KEY (`id_report`) REFERENCES tnetflow_report(`id_report`)
ON UPDATE CASCADE ON DELETE CASCADE
ON DELETE CASCADE,
FOREIGN KEY (`id_filter`) REFERENCES tnetflow_filter(`id_sg`)
ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET=utf8;