mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
2010-07-01 Sergio Martin <sergio.martin@artica.es>
* godmode/reporting/reporting_builder.list_items.php: Fixed the reports items filter for bug: 3013841 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2945 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9c61b60d97
commit
4e8f0f1a1b
@ -1,3 +1,8 @@
|
|||||||
|
2010-07-01 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* godmode/reporting/reporting_builder.list_items.php: Fixed the
|
||||||
|
reports items filter for bug: 3013841
|
||||||
|
|
||||||
2010-06-30 Sergio Martin <sergio.martin@artica.es>
|
2010-06-30 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* operation/events/events.php: Changed the Server and All text
|
* operation/events/events.php: Changed the Server and All text
|
||||||
|
@ -45,7 +45,6 @@ $agents = array();
|
|||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
$agents[$row['id_agente']] = $row['nombre'];
|
$agents[$row['id_agente']] = $row['nombre'];
|
||||||
}
|
}
|
||||||
$agents[0] = __('None');
|
|
||||||
|
|
||||||
$rows = get_db_all_rows_sql('
|
$rows = get_db_all_rows_sql('
|
||||||
SELECT t1.id_agent_module, t2.nombre
|
SELECT t1.id_agent_module, t2.nombre
|
||||||
@ -61,7 +60,6 @@ $modules = array();
|
|||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
$modules[$row['id_agent_module']] = $row['nombre'];
|
$modules[$row['id_agent_module']] = $row['nombre'];
|
||||||
}
|
}
|
||||||
$modules[0] = __('None');
|
|
||||||
|
|
||||||
$rows = get_db_all_rows_sql('
|
$rows = get_db_all_rows_sql('
|
||||||
SELECT DISTINCT(type)
|
SELECT DISTINCT(type)
|
||||||
@ -75,14 +73,14 @@ $types = array();
|
|||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
$types[$row['type']] = get_report_name($row['type']);
|
$types[$row['type']] = get_report_name($row['type']);
|
||||||
}
|
}
|
||||||
$types[0] = __('None');
|
|
||||||
|
|
||||||
$agentFilter = get_parameter('agent_filter', 0);
|
$agentFilter = get_parameter('agent_filter', 0);
|
||||||
$moduleFilter = get_parameter('module_filter', 0);
|
$moduleFilter = get_parameter('module_filter', 0);
|
||||||
$typeFilter = get_parameter('type_filter', '');
|
$typeFilter = get_parameter('type_filter', 0);
|
||||||
|
|
||||||
$filterEnable = true;
|
$filterEnable = true;
|
||||||
if (($agentFilter == 0) && ($moduleFilter == 0) && ($typeFilter == '')) {
|
$urlFilter = '';
|
||||||
|
if (($agentFilter == 0) && ($moduleFilter == 0) && ($typeFilter == 0)) {
|
||||||
$filterEnable = false;
|
$filterEnable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,11 +91,11 @@ echo '<a href="javascript: toggleFormFilter();"><b>'.__('Items filter').'</b> <i
|
|||||||
$table = null;
|
$table = null;
|
||||||
$table->width = '80%';
|
$table->width = '80%';
|
||||||
$table->data[0][0] = __('Agents');
|
$table->data[0][0] = __('Agents');
|
||||||
$table->data[0][1] = print_select($agents, 'agent_filter', $agentFilter, '', 0, '', true);
|
$table->data[0][1] = print_select($agents, 'agent_filter', $agentFilter, '', __('All'), 0, true);
|
||||||
$table->data[0][2] = __('Modules');
|
$table->data[0][2] = __('Modules');
|
||||||
$table->data[0][3] = print_select($modules, 'module_filter', $moduleFilter, '', '', 0, true);
|
$table->data[0][3] = print_select($modules, 'module_filter', $moduleFilter, '', __('All'), 0, true);
|
||||||
$table->data[1][0] = __('Type');
|
$table->data[1][0] = __('Type');
|
||||||
$table->data[1][1] = print_select($types, 'type_filter', $typeFilter, '', '', 0, true);
|
$table->data[1][1] = print_select($types, 'type_filter', $typeFilter, '', __('All'), 0, true);
|
||||||
|
|
||||||
echo '<div id="form_filter" style="display: none;">';
|
echo '<div id="form_filter" style="display: none;">';
|
||||||
echo '<form method="post" action ="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=filter&&id_report=' . $idReport . '">';
|
echo '<form method="post" action ="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=filter&&id_report=' . $idReport . '">';
|
||||||
@ -112,8 +110,14 @@ echo '</form>';
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
$where = '1=1';
|
$where = '1=1';
|
||||||
if ($typeFilter != '') {
|
if ($typeFilter != '0') {
|
||||||
$where .= ' AND type LIKE "' . $typeFilter . '"';
|
$where .= ' AND type = "' . $typeFilter . '"';
|
||||||
|
}
|
||||||
|
if($agentFilter != 0) {
|
||||||
|
$where .= ' AND id_agent = ' . $agentFilter;
|
||||||
|
}
|
||||||
|
if($moduleFilter != 0) {
|
||||||
|
$where .= ' AND id_agent_module = ' . $moduleFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
$items = get_db_all_rows_sql('SELECT * FROM treport_content WHERE ' . $where . ' AND id_report = ' . $idReport . ' ORDER BY `order` LIMIT ' . $offset . ', ' . $config["block_size"]);
|
$items = get_db_all_rows_sql('SELECT * FROM treport_content WHERE ' . $where . ' AND id_report = ' . $idReport . ' ORDER BY `order` LIMIT ' . $offset . ', ' . $config["block_size"]);
|
||||||
@ -247,4 +251,4 @@ function toggleFormFilter() {
|
|||||||
$("#form_filter").css('display','none');
|
$("#form_filter").css('display','none');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user