mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-23 13:55:43 +02:00
2011-02-18 Sancho Lerena <slerena@artica.es>
* operation/agentes/gis_view.php: Fixed ACL Problems in operation view (Was looking for PM instead AR!). Fixed search by date in data view for GIS data. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3914 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
1ef03ea5b1
commit
1760658573
@ -1,3 +1,12 @@
|
|||||||
|
2011-02-18 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
|
Merged bugfix from trunk.
|
||||||
|
|
||||||
|
* operation/agentes/gis_view.php: Fixed ACL Problems in operation
|
||||||
|
view (Was looking for PM instead AR!). Fixed search by date in data
|
||||||
|
view for GIS data.
|
||||||
|
|
||||||
|
|
||||||
2011-02-17 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2011-02-17 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/functions_reports.php
|
* include/functions_reports.php
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora FMS- http://pandorafms.com
|
* Pandora FMS- http://pandorafms.com
|
||||||
* ==================================================
|
* ==================================================
|
||||||
* Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
* Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@ -18,10 +18,10 @@ global $config;
|
|||||||
|
|
||||||
check_login ();
|
check_login ();
|
||||||
|
|
||||||
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
|
if (! give_acl ($config['id_user'], 0, "AR") && ! is_user_admin ($config['id_user'])) {
|
||||||
pandora_audit("ACL Violation", "Trying to access Visual Setup Management");
|
pandora_audit("ACL Violation", "Trying to access GIS Agent view");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once ('include/functions_gis.php');
|
require_once ('include/functions_gis.php');
|
||||||
@ -87,12 +87,12 @@ echo "</form>";
|
|||||||
|
|
||||||
echo "<h3>" . __("Positional data from the last") . " " . human_time_description ($period) ."</h3>";
|
echo "<h3>" . __("Positional data from the last") . " " . human_time_description ($period) ."</h3>";
|
||||||
/* Get the total number of Elements for the pagination */
|
/* Get the total number of Elements for the pagination */
|
||||||
$sqlCount = sprintf ("SELECT COUNT(*) FROM tgis_data_history WHERE tagente_id_agente = %d AND end_timestamp > %d ORDER BY end_timestamp DESC", $agentId, get_system_time () - $period);
|
$sqlCount = sprintf ("SELECT COUNT(*) FROM tgis_data_history WHERE tagente_id_agente = %d AND end_timestamp > FROM_UNIXTIME(%d) ORDER BY end_timestamp DESC", $agentId, get_system_time () - $period);
|
||||||
$countData = get_db_value_sql($sqlCount);
|
$countData = get_db_value_sql($sqlCount);
|
||||||
/* Get the elements to present in this page */
|
/* Get the elements to present in this page */
|
||||||
$sql = sprintf ("SELECT longitude, latitude, altitude, start_timestamp, end_timestamp, description, number_of_packages, manual_placement
|
$sql = sprintf ("SELECT longitude, latitude, altitude, start_timestamp, end_timestamp, description, number_of_packages, manual_placement
|
||||||
FROM tgis_data_history
|
FROM tgis_data_history
|
||||||
WHERE tagente_id_agente = %d AND end_timestamp > %d
|
WHERE tagente_id_agente = %d AND end_timestamp > FROM_UNIXTIME(%d)
|
||||||
ORDER BY end_timestamp DESC
|
ORDER BY end_timestamp DESC
|
||||||
LIMIT %d OFFSET %d", $agentId, get_system_time () - $period, $config['block_size'], get_parameter ('offset'));
|
LIMIT %d OFFSET %d", $agentId, get_system_time () - $period, $config['block_size'], get_parameter ('offset'));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user