2010-03-03 Sancho Lerena <slerena@artica.es>
* (A lot of files): Updated include("config.php") and replaced by global $config. * functions_db.php, functions_html.php: Fixed way to get data from the hash instead from the array. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2459 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
8f3d8f9185
commit
ab2dd5a5be
|
@ -1,3 +1,11 @@
|
|||
2010-03-03 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* (A lot of files): Updated include("config.php") and replaced by
|
||||
global $config.
|
||||
|
||||
* functions_db.php, functions_html.php: Fixed way to get data from the hash
|
||||
instead from the array.
|
||||
|
||||
2010-03-03 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_gis.php: add in the last time a function "printMap2"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
if ($config['flash_charts']) {
|
||||
require_once ("include/fgraph.php");
|
||||
}
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
enterprise_include ('godmode/agentes/configurar_agente.php');
|
||||
|
||||
check_login ();
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
if ($config['flash_charts']) {
|
||||
require('include/fgraph.php');
|
||||
}
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
if ($config['flash_charts']) {
|
||||
require_once ("include/fgraph.php");
|
||||
}
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
|
||||
|
||||
// Load global vars
|
||||
require("include/config.php");
|
||||
global $config;
|
||||
|
||||
if ($config['flash_charts']) {
|
||||
require('include/fgraph.php');
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
|
||||
// Load global vars
|
||||
require("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
|
||||
if (! give_acl ($config["id_user"], 0, "DM")) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
@ -888,4 +888,4 @@ function downLayer(idLayer) {
|
|||
updateArrowLayers();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
@ -135,4 +135,4 @@ function setDefault(id_tgis_map) {
|
|||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
|
||||
require_once ('include/config.php');
|
||||
global $config;
|
||||
|
||||
if (! give_acl ($config['id_user'], 0, "PM")) {
|
||||
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation",
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global variables
|
||||
require_once ('include/config.php');
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
|
||||
// Load global variables
|
||||
require ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Global variables
|
||||
require ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
global $config;
|
||||
|
||||
if (is_ajax ()) {
|
||||
$search_agents = (bool) get_parameter ('search_agents');
|
||||
|
||||
|
@ -42,8 +44,6 @@ if (is_ajax ()) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Login check
|
||||
require_once ("include/config.php");
|
||||
if ($config['flash_charts']) {
|
||||
require_once ('include/fgraph.php');
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global variables
|
||||
require ("include/config.php");
|
||||
global $config;
|
||||
|
||||
require_once ('include/functions_custom_graphs.php');
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
global $config;
|
||||
|
||||
if (is_ajax ()) {
|
||||
$search_agents = (bool) get_parameter ('search_agents');
|
||||
|
||||
|
@ -38,8 +40,6 @@ if (is_ajax ()) {
|
|||
}
|
||||
}
|
||||
|
||||
require_once ("include/config.php");
|
||||
|
||||
check_login ();
|
||||
|
||||
if (! give_acl ($config['id_user'], 0, "IW")) {
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
// GNU General Public License for more details.
|
||||
// Load global vars
|
||||
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
if (! give_acl ($config['id_user'], 0, "AW")) {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
|
||||
// Login check
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
|
||||
// Load global vars
|
||||
require ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
|
||||
// Load global vars
|
||||
require ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
|
||||
// Load global vars
|
||||
require ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require("include/config.php");
|
||||
global $config;
|
||||
|
||||
require_once ("include/functions_servers.php");
|
||||
|
||||
check_login();
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
|
||||
// Load global vars
|
||||
require ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
@ -72,4 +72,4 @@ print_input_hidden ('action','create_connection_map');
|
|||
print_submit_button (__('Create'), '', false, 'class="sub next"');
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ('include/config.php');
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
$id = get_parameter ('id', $config['id_user']); // ID given as parameter
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load globar vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
|
|
@ -1688,8 +1688,9 @@ function get_db_value_sql ($sql) {
|
|||
|
||||
if($result === false)
|
||||
return false;
|
||||
|
||||
return $result[0][0];
|
||||
|
||||
foreach ($result[0] as $f)
|
||||
return $f;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1804,12 +1805,17 @@ function get_db_row_filter ($table, $filter, $fields = false, $where_join = 'AND
|
|||
*
|
||||
* @return mixed The selected field of the first row in a select statement.
|
||||
*/
|
||||
function get_db_sql ($sql, $field = 0, $search_history_db = false) {
|
||||
$result = get_db_all_rows_sql ($sql, $search_history_db);
|
||||
if($result === false)
|
||||
return false;
|
||||
|
||||
return $result[0][$field];
|
||||
function get_db_sql ($sql, $field = 0, $search_history_db = false) {
|
||||
$result = get_db_all_rows_sql ($sql, $search_history_db);
|
||||
if($result === false)
|
||||
return false;
|
||||
$ax = 0;
|
||||
foreach ($result[0] as $f){
|
||||
if ($field == $ax)
|
||||
return $f;
|
||||
$ax++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -261,7 +261,9 @@ function print_select_from_sql ($sql, $name, $selected = '', $script = '', $noth
|
|||
$result = array ();
|
||||
|
||||
foreach ($result as $row) {
|
||||
$fields[$row[0]] = $row[1];
|
||||
$id = array_shift($row);
|
||||
$value = array_shift($row);
|
||||
$fields[$id] = $value;
|
||||
}
|
||||
|
||||
return print_select ($fields, $name, $selected, $script, $nothing, $nothing_value, $return, $multiple, $sort,'',$disabled);
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
require_once ("include/functions_events.php");
|
||||
require_once ("include/functions_servers.php");
|
||||
require_once ("include/functions_reporting.php");
|
||||
|
@ -44,8 +45,13 @@ function print_cells_temp ($cells) {
|
|||
if ($row[1] === 0) {
|
||||
$row[1] = "-";
|
||||
}
|
||||
echo '<td class="'.$class.'" style="text-align:right;"><a class="big_data" href="'.safe_input ($row["href"]).'" style="color: '.$row["color"].';">'.$row[1].'</a></td></tr>';
|
||||
}
|
||||
|
||||
if (isset($row["href"]))
|
||||
echo '<td class="'.$class.'" style="text-align:right;"><a class="big_data" href="'.safe_input ($row["href"]).'" style="color: '.$row["color"].';">'.$row[1].'</a></td></tr>';
|
||||
else
|
||||
echo '<td class="'.$class.'" style="text-align:right;"><a class="big_data" s
|
||||
tyle="color: '.$row["color"].';">'.$row[1].'</a></td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($config["realtimestats"] == 0){
|
||||
|
@ -198,6 +204,12 @@ $cells[1][1] = $data["server_sanity"] . "%";
|
|||
$cells[1]["color"] = "#000";
|
||||
$cells[1]["href"] = "index.php?sec=estado_server&sec2=operation/servers/view_server&refr=60";
|
||||
|
||||
$cells[2][0] = __('Agents unknown');
|
||||
$cells[2][1] = $data["agents_unknown"];
|
||||
$cells[2]["color"] = "#000";
|
||||
$cells[2]["url"] = "";
|
||||
|
||||
|
||||
print_cells_temp ($cells);
|
||||
|
||||
echo "</table>";
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
@ -171,4 +171,4 @@ if ($layers != false) {
|
|||
activateSelectControl();
|
||||
activateAjaxRefresh($layers, $timestampLastOperation);
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue