2011-03-02 Raul Mateos <raulofpandora@gmail.com>

* include/functions*.php: Updated year in files changed this year. Also
	changed spaces to tabs.

	* pandora_console_install, pandora_console_upgrade,
	pandora.data.postgreSQL.sql, pandoradb_data.sql

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4053 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
raulmateos 2011-03-02 21:56:48 +00:00
parent 6d71a2c284
commit 4d6dc00a86
26 changed files with 194 additions and 185 deletions

View File

@ -1,3 +1,11 @@
2011-03-02 Raul Mateos <raulofpandora@gmail.com>
* include/functions*.php: Updated year in files changed this year. Also
changed spaces to tabs.
* pandora_console_install, pandora_console_upgrade,
pandora.data.postgreSQL.sql, pandoradb_data.sql
2011-03-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.data.postgreSQL.sql: fixed the serial values.

View File

@ -1,7 +1,7 @@
<?php
//Pandora FMS- http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or

View File

@ -1,7 +1,7 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -1197,14 +1197,14 @@ function string2image($string, $width, $height, $fontsize = 3,
**/
function check_sql ($sql) {
// We remove "*" to avoid things like SELECT * FROM tusuario
// We remove "*" to avoid things like SELECT * FROM tusuario
//Check that it not delete_ as "delete_pending" (this is a common field in pandora tables).
//Check that it not delete_ as "delete_pending" (this is a common field in pandora tables).
if (preg_match("/\*|delete[^_]|drop|alter|modify|union|password|pass|insert|update/i", $sql)) {
return "";
}
return $sql;
if (preg_match("/\*|delete[^_]|drop|alter|modify|union|password|pass|insert|update/i", $sql)) {
return "";
}
return $sql;
}
?>

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or

View File

@ -1,7 +1,7 @@
<?php
// 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
// modify it under the terms of the GNU Lesser General Public License

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -46,7 +46,7 @@ function get_user_custom_graphs ($id_user = 0, $only_names = false, $returnAllGr
$id_user = $config['id_user'];
}
$groups = get_user_groups ($id_user, $privileges, $returnAllGroup);
$groups = get_user_groups ($id_user, $privileges, $returnAllGroup);
$all_graphs = get_db_all_rows_in_table ('tgraph', 'name');
if ($all_graphs === false)
@ -61,9 +61,9 @@ function get_user_custom_graphs ($id_user = 0, $only_names = false, $returnAllGr
continue;
if ($graph["id_group"] > 0)
if (!isset($groups[$graph["id_group"]])){
continue;
}
if (!isset($groups[$graph["id_group"]])){
continue;
}
if ($only_names) {
$graphs[$graph['id_graph']] = $graph['name'];

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -183,7 +183,7 @@ if ($create_text_file) {
$config['filemanager'] = array();
$config['filemanager']['correct_upload_file'] = 0;
$config['filemanager']['message'] = null;
$config['filemanager']['message'] = null;
check_login ();
@ -254,7 +254,7 @@ if ($upload_zip) {
$testHash = md5($real_directory . $directory . $config['dbpass']);
if ($hash != $testHash) {
$config['filemanager']['message'] = "<h4 class=error>".__('Security error.')."</h4>";
$config['filemanager']['message'] = "<h4 class=error>".__('Security error.')."</h4>";
}
else {
// Copy file to directory and change name
@ -265,7 +265,7 @@ if ($upload_zip) {
$nombre_archivo = $config['homedir'].'/'.$directory.'/'.$filename;
}
if (! @copy ($_FILES['file']['tmp_name'], $nombre_archivo )) {
$config['filemanager']['message'] = "<h4 class=error>".__('attach_error')."</h4s>";
$config['filemanager']['message'] = "<h4 class=error>".__('attach_error')."</h4>";
}
else {
// Delete temporal file
@ -369,8 +369,8 @@ function delete_directory($dir)
{
unlink($dir . $file);
}
}
}
}
}
closedir($handle);
rmdir($dir);
}
@ -620,7 +620,7 @@ function file_explorer($real_directory, $relative_directory, $url, $father = '',
echo "<a href='javascript: show_create_text_file();' style='margin-right: 3px;' title='" . __('Create text') . "'>";
echo print_image('images/mimetypes/text.png', true);
echo "</a>";
echo "<a href='javascript: show_upload_file();' title='" . __('Upload file/s') . "'>";
echo "<a href='javascript: show_upload_file();' title='" . __('Upload file/s') . "'>";
echo print_image('images/mimetypes/unknown.png', true);
echo "</a>";
echo "</div>";

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2010 Artica Soluciones Tecnologicas
// Copyright (c) 2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -134,36 +134,36 @@ function fs_2d_area_chart ($data, $width, $height, $step = 1, $params = '') {
function fs_module_chart ($data, $width, $height, $avg_only = 1, $step = 10, $time_format = 'G:i', $show_events = 0, $show_alerts = 0, $caption = '', $baseline = 0) {
global $config;
$graph_type = "MSArea2D"; //MSLine is possible also
$graph_type = "MSArea2D"; //MSLine is possible also
// Generate the XML
$chart = new FusionCharts($graph_type, $width, $height);
$num_vlines = 0;
$count = 0;
// NO caption needed (graph avg/max/min stats are in the legend now)
/*
// NO caption needed (graph avg/max/min stats are in the legend now)
/*
if ($caption != '') {
$chart->setChartParam("caption", $caption);
}
*/
*/
$total_max = 0;
$total_avg = 0;
$total_min = 0;
$total_max = 0;
$total_avg = 0;
$total_min = 0;
// Create categories
foreach ($data as $value) {
$total_avg +=$value["sum"];
$total_avg +=$value["sum"];
if ($avg_only != 1){
if ($value["max"] > $total_max)
$total_max =$value["max"];
if ($value["min"] < $total_min)
$total_min =$value["min"];
}
if ($avg_only != 1){
if ($value["max"] > $total_max)
$total_max =$value["max"];
if ($value["min"] < $total_min)
$total_min =$value["min"];
}
if ($count++ % $step == 0) {
$show_name = '1';
$num_vlines++;
@ -173,13 +173,13 @@ function fs_module_chart ($data, $width, $height, $avg_only = 1, $step = 10, $ti
$chart->addCategory(date($time_format, $value['timestamp_bottom']), 'hoverText=' . date (html_entity_decode ($config['date_format'], ENT_QUOTES, "UTF-8"), $value['timestamp_bottom']) . ';showName=' . $show_name);
}
if ($count > 0)
$total_avg = format_for_graph($total_avg / $count);
else
$total_avg = 0;
if ($count > 0)
$total_avg = format_for_graph($total_avg / $count);
else
$total_avg = 0;
$total_min = format_for_graph ($total_min);
$total_max = format_for_graph ($total_max);
$total_min = format_for_graph ($total_min);
$total_max = format_for_graph ($total_max);
// Event chart
if ($show_events == 1) {
@ -294,23 +294,23 @@ function fs_combined_chart ($data, $categories, $sets, $width, $height, $type =
// Stack charts
$empty = 1;
$prev = array();
$prev = array();
for ($i = 0; $i < sizeof ($data); $i++) {
$chart->addDataSet ($sets[$i]);
$chart->addDataSet ($sets[$i]);
foreach ($data[$i] as $indice => $value) {
// Custom code to do the stack lines, because library doesn't do itself
if ($type == 3){
if ($i > 0){
$prev[$indice] = $prev[$indice] + $value;
} else {
$prev[$indice] = $value;
}
$myvalue = $prev[$indice];
$chart->addChartData($myvalue);
} else {
$chart->addChartData($value);
}
}
// Custom code to do the stack lines, because library doesn't do itself
if ($type == 3){
if ($i > 0){
$prev[$indice] = $prev[$indice] + $value;
} else {
$prev[$indice] = $value;
}
$myvalue = $prev[$indice];
$chart->addChartData($myvalue);
} else {
$chart->addChartData($value);
}
}
}

View File

@ -1,7 +1,8 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -1261,22 +1261,22 @@ function print_label ($text, $id, $return = false, $options = false) {
*/
function html2rgb($htmlcolor)
{
if ($htmlcolor[0] == '#') {
$htmlcolor = substr($htmlcolor, 1);
if ($htmlcolor[0] == '#') {
$htmlcolor = substr($htmlcolor, 1);
}
if (strlen($htmlcolor) == 6) {
$r = hexdec($htmlcolor[0].$htmlcolor[1]);
$g = hexdec($htmlcolor[2].$htmlcolor[3]);
$b = hexdec($htmlcolor[4].$htmlcolor[5]);
return array($r, $g, $b);
if (strlen($htmlcolor) == 6) {
$r = hexdec($htmlcolor[0].$htmlcolor[1]);
$g = hexdec($htmlcolor[2].$htmlcolor[3]);
$b = hexdec($htmlcolor[4].$htmlcolor[5]);
return array($r, $g, $b);
} elseif (strlen($htmlcolor) == 3) {
$r = hexdec($htmlcolor[0].$htmlcolor[0]);
$g = hexdec($htmlcolor[1].$htmlcolor[1]);
$b = hexdec($htmlcolor[2].$htmlcolor[2]);
return array($r, $g, $b);
} else {
return false;
$r = hexdec($htmlcolor[0].$htmlcolor[0]);
$g = hexdec($htmlcolor[1].$htmlcolor[1]);
$b = hexdec($htmlcolor[2].$htmlcolor[2]);
return array($r, $g, $b);
} else {
return false;
}
}
@ -1350,10 +1350,10 @@ function print_autocomplete_modules($name = 'module', $default = '', $id_agents
<script type="text/javascript">
function escapeHTML (str)
{
var div = document.createElement('div');
var text = document.createTextNode(str);
div.appendChild(text);
return div.innerHTML;
var div = document.createElement('div');
var text = document.createTextNode(str);
div.appendChild(text);
return div.innerHTML;
};
$(document).ready (function () {

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -397,32 +397,32 @@ function get_agentmodule_sla ($id_agent_module, $period = 0, $min_value = 1, $ma
$days = array();
//Translate to mysql week days
if ($daysWeek)
foreach ($daysWeek as $key => $value) {
if (!$value) {
if ($key == 'monday') {
$days[] = 2;
}
if ($key == 'tuesday') {
$days[] = 3;
}
if ($key == 'wednesday') {
$days[] = 4;
}
if ($key == 'thursday') {
$days[] = 5;
}
if ($key == 'friday') {
$days[] = 6;
}
if ($key == 'saturday') {
$days[] = 7;
}
if ($key == 'sunday') {
$days[] = 1;
if ($daysWeek)
foreach ($daysWeek as $key => $value) {
if (!$value) {
if ($key == 'monday') {
$days[] = 2;
}
if ($key == 'tuesday') {
$days[] = 3;
}
if ($key == 'wednesday') {
$days[] = 4;
}
if ($key == 'thursday') {
$days[] = 5;
}
if ($key == 'friday') {
$days[] = 6;
}
if ($key == 'saturday') {
$days[] = 7;
}
if ($key == 'sunday') {
$days[] = 1;
}
}
}
}
if (count($days) > 0) {
$sql .= ' AND DAYOFWEEK(FROM_UNIXTIME(utimestamp)) NOT IN (' . implode(',', $days) . ')';
@ -2020,8 +2020,8 @@ function render_report_html_item ($content, $table, $report, $mini = false) {
$sql = safe_output_html ($content['external_source']);
}
// Do a security check on SQL coming from the user
$sql = check_sql ($sql);
// Do a security check on SQL coming from the user
$sql = check_sql ($sql);
if($sql != '') {
$result = get_db_all_rows_sql($sql);
@ -2052,8 +2052,8 @@ function render_report_html_item ($content, $table, $report, $mini = false) {
break;
case 'sql_graph_pie':
case 'sql_graph_vbar':
case 'sql_graph_hbar':
case 'sql_graph_vbar':
case 'sql_graph_hbar':
$data = array();
$data[0] = $sizh. __('User defined graph') . " (".__($content["type"]) .")". $sizhfin;
array_push ($table->data, $data);
@ -2075,7 +2075,7 @@ function render_report_html_item ($content, $table, $report, $mini = false) {
if ($content['header_definition'] != '') {
$table2->head = explode('|', $content['header_definition']);
}
$data = array ();
$data[0] = '<img src="include/fgraph.php?tipo='.$content["type"].'&report_id='.$content["id_rc"].'&width='.$sizgraph_w.'&pure=1" border="0" alt="">';

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -74,7 +74,7 @@ function get_reports ($filter = false, $fields = false, $returnAllGroup = true,
$fields[] = 'id_user';
}
$groups = get_user_groups ($config['id_user'], $privileges, $returnAllGroup);
$groups = get_user_groups ($config['id_user'], $privileges, $returnAllGroup);
$reports = array ();
$all_reports = @get_db_all_rows_filter ('treport', $filter, $fields);

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -384,7 +384,7 @@ function print_agent_name ($id_agent, $return = false, $cutoff = 0, $style = '',
*/
function format_alert_row ($alert, $compound = false, $agent = true, $url = '') {
$actionText = "";
$actionText = "";
require_once ("include/functions_alerts.php");
$isFunctionPolicies = enterprise_include_once ('include/functions_policies.php');
@ -956,7 +956,7 @@ function process_page_head ($string, $bitfield) {
* @param string Callback will fill this with the current buffer.
* @param bitfield Callback will fill this with a bitfield (see ob_start)
*
* @return string String to return to the browser
* @return string String to return to the browser
*/
function process_page_body ($string, $bitfield) {
global $config;
@ -1158,8 +1158,8 @@ function debug ($var, $backtrace = true) {
foreach ($traces as $trace) {
$trace_id++;
/* Many classes are used to allow better customization. Please, do not
remove them */
/* Many classes are used to allow better customization.
Please, do not remove them */
echo '<li>';
if (isset ($trace['class']))
echo '<span class="class">'.$trace['class'].'</span>';

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -410,7 +410,7 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
echo '<div id="layout_map"
style="z-index: 0; position:relative; width:'.$mapWidth.'px; height:'.$mapHeight.'px;">';
echo "<img src='" . $backgroundImage . "' width='100%' height='100%' />";
echo "<img src='" . $backgroundImage . "' width='100%' height='100%' />";
$layout_datas = get_db_all_rows_field_filter ('tlayout_data', 'id_layout', $id_layout);
$lines = array ();

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -213,11 +213,11 @@ class PchartGraph extends PandoraGraphAbstract {
}
// White background
$this->graph->drawFilledRoundedRectangle(1,1,$this->width,$this->height+2,0,254,254,254);
$this->graph->drawFilledRoundedRectangle(1,1,$this->width,$this->height+2,0,254,254,254);
// Graph border
// Now graph border is in the style image attribute
//$this->graph->drawRoundedRectangle(1,1,$this->width-1,$this->height+4,5,230,230,230);
//$this->graph->drawRoundedRectangle(1,1,$this->width-1,$this->height+4,5,230,230,230);
$this->add_background ();
@ -302,21 +302,21 @@ class PchartGraph extends PandoraGraphAbstract {
$this->dataset = new pData;
$this->graph = new pChart ($this->width, $this->height+5);
$graph_items = 0;
$graph_items = 0;
// $previo stores values from last series to made the stacked graph
foreach ($this->data as $i => $data) {
$graph_items++;
$max = 0;
$min = 10000000000000;
$avg = 0;
$count = 0;
$graph_items++;
$max = 0;
$min = 10000000000000;
$avg = 0;
$count = 0;
foreach ($data as $j => $value) {
$count ++;
$avg += $value;
if ($value > $max )
$max = $value;
if ($value < $min )
$min = $value;
$count ++;
$avg += $value;
if ($value > $max )
$max = $value;
if ($value < $min )
$min = $value;
// New code for stacked. Due pchart doesnt not support stacked
// area graph, we "made it", adding to a series the values of the
@ -334,21 +334,21 @@ class PchartGraph extends PandoraGraphAbstract {
$previo[$j] = $previo[$j] + $value;
}
if ($count > 0)
$avgdata[$i] = $avg / $count;
else
$avgdata[$i] = 0;
$maxdata[$i] = format_for_graph($max);
$mindata[$i] = format_for_graph($min);
$avgdata[$i] = format_for_graph($avgdata[$i]);
if ($count > 0)
$avgdata[$i] = $avg / $count;
else
$avgdata[$i] = 0;
$maxdata[$i] = format_for_graph($max);
$mindata[$i] = format_for_graph($min);
$avgdata[$i] = format_for_graph($avgdata[$i]);
}
$i = 0;
foreach ($this->legend as $name) {
$legend = $name . " (".__("Max"). ":$maxdata[$i], ".__("Min"). ":$mindata[$i], ". __("Avg"). ": $avgdata[$i])";
$legend = $name . " (".__("Max"). ":$maxdata[$i], ".__("Min"). ":$mindata[$i], ". __("Avg"). ": $avgdata[$i])";
$this->dataset->setSerieName ($legend, $name);
$this->dataset->AddSerie ($name);
$i++;
$i++;
}
// Set different colors for combined graphs because need to be
@ -369,59 +369,59 @@ class PchartGraph extends PandoraGraphAbstract {
$this->add_background ();
$legend_offset = $this->height - 21 - ($graph_items*15);
$legend_offset = $this->height - 21 - ($graph_items*15);
$this->graph->setGraphArea (35,10,$this->width-10, $legend_offset);
$this->graph->setGraphArea (35,10,$this->width-10, $legend_offset);
$this->graph->drawGraphArea (254, 254, 254, false);
// Fixed missing X-labels (6Ago09)
$this->xaxis_interval = ($this->xaxis_interval / 7 >= 1) ? ($this->xaxis_interval / 7) : 10;
$this->graph->drawScale ($this->dataset->GetData (),
$this->dataset->GetDataDescription (), SCALE_START0,
80, 80, 80, $this->show_axis, 0, 50, false,
$this->xaxis_interval);
$this->dataset->GetDataDescription (), SCALE_START0,
80, 80, 80, $this->show_axis, 0, 50, false,
$this->xaxis_interval);
$this->graph->drawGrid (1, true, 225, 225, 225, 100, false);
// Draw the graph
if ($stacked == 1) { // Stacked solid
$this->graph->drawScale ($this->dataset->GetData (),
$this->dataset->GetDataDescription (),
SCALE_START0, 80, 80, 80, $this->show_axis, 0, 0, false,
$this->xaxis_interval);
$this->dataset->GetDataDescription (),
SCALE_START0, 80, 80, 80, $this->show_axis, 0, 0, false,
$this->xaxis_interval);
$this->graph->drawFilledCubicCurve ($this->dataset->GetData(),
$this->dataset->GetDataDescription(), 1, 30, true);
$this->dataset->GetDataDescription(), 1, 30, true);
}
elseif ($stacked == 3) { // Stacked wired
$this->graph->drawScale ($this->dataset->GetData (),
$this->dataset->GetDataDescription (),
SCALE_START0, 80, 80, 80, $this->show_axis, 0, 0, false,
$this->xaxis_interval);
$this->dataset->GetDataDescription (),
SCALE_START0, 80, 80, 80, $this->show_axis, 0, 0, false,
$this->xaxis_interval);
$this->graph->drawFilledCubicCurve ($this->dataset->GetData(),
$this->dataset->GetDataDescription(), 1, 0, true);
$this->dataset->GetDataDescription(), 1, 0, true);
} else if ($stacked == 2) { // Wired mode
$this->graph->drawScale ($this->dataset->GetData (),
$this->dataset->GetDataDescription (),
SCALE_START0, 80, 80, 80, $this->show_axis, 0, 0, false,
$this->xaxis_interval);
$this->dataset->GetDataDescription (),
SCALE_START0, 80, 80, 80, $this->show_axis, 0, 0, false,
$this->xaxis_interval);
$this->graph->drawLineGraph ($this->dataset->GetData (),
$this->dataset->GetDataDescription ());
$this->dataset->GetDataDescription ());
} else { // Non-stacked, area overlapped
$this->graph->drawScale ($this->dataset->GetData (),
$this->dataset->GetDataDescription (),
SCALE_START0, 80, 80, 80, $this->show_axis, 0, 0, false,
$this->xaxis_interval);
$this->dataset->GetDataDescription (),
SCALE_START0, 80, 80, 80, $this->show_axis, 0, 0, false,
$this->xaxis_interval);
$this->graph->drawFilledCubicCurve ($this->dataset->GetData(),
$this->dataset->GetDataDescription(), 1, 30, true);
$this->dataset->GetDataDescription(), 1, 30, true);
}
$this->graph->setFontProperties($this->fontpath,7);
$this->graph->drawLegend(15,$legend_offset+29,$this->dataset->GetDataDescription(),92,92,92,50,50,50,45,45,45,0);
$this->graph->setFontProperties($this->fontpath,7);
$this->graph->drawLegend(15,$legend_offset+29,$this->dataset->GetDataDescription(),92,92,92,50,50,50,45,45,45,0);
// Legend line separator
// $this->graph->drawFilledRoundedRectangle(35, $legend_offset + 30 ,$this->width-35,$legend_offset+30,0,220,220,220);
// $this->graph->drawFilledRoundedRectangle(35, $legend_offset + 30 ,$this->width-35,$legend_offset+30,0,220,220,220);
$this->add_events ($this->legend[0]);
$this->add_alert_levels ();
@ -603,18 +603,18 @@ class PchartGraph extends PandoraGraphAbstract {
$this->graph->setFontProperties ($this->fontpath, 6);
}
/* This is a tiny watermark */
/* This is a tiny watermark */
if ($this->watermark) {
if ($this->show_title){
$this->graph->setFontProperties ($this->fontpath, 7);
$this->graph->drawTextBox ($this->width - 8, 40,
$this->width - 240, 90, 'PANDORA FMS', 90,
174, 214, 174, ALIGN_BOTTOM_LEFT, false);
$this->width - 240, 90, 'PANDORA FMS', 90,
174, 214, 174, ALIGN_BOTTOM_LEFT, false);
} else {
$this->graph->setFontProperties ($this->fontpath, 7);
$this->graph->drawTextBox ($this->width - 8, 50,
$this->width - 240, 60, 'PANDORA FMS', 90,
174, 214, 174, ALIGN_BOTTOM_LEFT, false);
$this->width - 240, 60, 'PANDORA FMS', 90,
174, 214, 174, ALIGN_BOTTOM_LEFT, false);
}
}
}

View File

@ -1,15 +1,15 @@
#!/bin/sh
# Pandora FMS Console Installer (c) 2008-2010 Artica ST
# Pandora FMS Console Installer (c) 2008-2011 Artica ST
# Linux/FreeBSD Version (generic), for SuSe, Debian/Ubuntu, RHEL/CentOS,
# Fedora and FreeBSD only
# other Linux distros could not work properly without modifications
# Please see http://www.pandorafms.org
# v3.2 Build 101125
# v4.0dev Build 110203
# This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION=3.2
PI_VERSION=4.0dev
FORCE=0
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
MODE=$1

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Pandora FMS 3.2 Console Upgrade (c) 2009-2010 Artica ST
# Pandora FMS 4.0dev Console Upgrade (c) 2009-2011 Artica ST
# Please see http://www.pandorafms.com
# This code is licensed under GPL 2.0 license.
# **********************************************************************

View File

@ -1,6 +1,6 @@
-- Pandora FMS - the Flexible Monitoring System
-- ============================================
-- Copyright (c) 2010 Artica Soluciones Tecnologicas, http://www.artica.es
-- Copyright (c) 2011 Artica Soluciones Tecnologicas, http://www.artica.es
-- Please see http://www.pandorafms.org for full contribution list
-- This program is free software; you can redistribute it and/or

View File

@ -1,6 +1,6 @@
-- Pandora FMS - the Flexible Monitoring System
-- ============================================
-- Copyright (c) 2010 Artica Soluciones Tecnologicas, http://www.artica.es
-- Copyright (c) 2011 Artica Soluciones Tecnologicas, http://www.artica.es
-- Please see http://www.pandorafms.org for full contribution list
-- This program is free software; you can redistribute it and/or
@ -14,7 +14,7 @@
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-- Database Data for Pandora FMS 3.2
-- Database Data for Pandora FMS 4.0dev
-- PLEASE NO NOT USE MULTILINE COMMENTS
-- Because Pandora Installer don't understand them