// Additions to Pandora FMS 1.2 graph code and new XML reporting template management // Copyright (c) 2005-2007 Artica Soluciones Tecnologicas, info@artica.es // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Load global vars require("include/config.php"); if (comprueba_login() == 0) if ((give_acl($id_user, 0, "PM")==1) or (dame_admin($id_user)==1)) { if (isset($_GET["update"])){ $block_size=$_POST["block_size"]; $language_code=$_POST["language_code"]; $days_compact=$_POST["days_compact"]; $days_purge=$_POST["days_purge"]; $config_graph_res=$_POST["graph_res"]; $config_step_compact=$_POST["step_compact"]; $config_bgimage=$_POST["bgimage"]; $config_show_unknown=$_POST["show_unknown"]; $config_show_lastalerts=$_POST["show_lastalerts"]; $config_style = $_POST["style"]; $result2=mysql_query("UPDATE tconfig SET VALUE='".$block_size."' WHERE TOKEN='block_size'"); $result2=mysql_query("UPDATE tconfig SET VALUE='".$language_code."' WHERE TOKEN='language_code'"); $result2=mysql_query("UPDATE tconfig SET VALUE='".$days_purge."' WHERE TOKEN='days_purge'"); $result2=mysql_query("UPDATE tconfig SET VALUE='".$days_compact." ' WHERE TOKEN='days_compact'"); $result2=mysql_query("UPDATE tconfig SET VALUE='".$config_graph_res."' WHERE TOKEN='graph_res'"); $result2=mysql_query("UPDATE tconfig SET VALUE='".$config_step_compact."' WHERE TOKEN='step_compact'"); $result2=mysql_query("UPDATE tconfig SET VALUE='".$config_bgimage."' WHERE token='bgimage'"); $result2=mysql_query("UPDATE tconfig SET VALUE='".$config_show_unknown."' WHERE token='show_unknown'"); $result2=mysql_query("UPDATE tconfig SET VALUE='".$config_show_lastalerts."' WHERE token='show_lastalerts'"); $result2=mysql_query("UPDATE tconfig SET VALUE='".$config_style."' WHERE token='style'"); } echo "

".$lang_label["setup_screen"]." > "; echo $lang_label["general_config"]." ".$lang_label["help"]."

"; echo "
"; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'.$lang_label["language_code"].'
'.$lang_label["block_size"]; echo '
'.$lang_label["days_compact"]; echo '
'.$lang_label["days_purge"]; echo '
'.$lang_label["graph_res"]; echo '
'.$lang_label["step_compact"].'
'.$lang_label["show_unknown"].'
'.$lang_label["show_lastalerts"]; echo '
'.$lang_label["background_image"].''; echo ''; echo '
'.$lang_label["style_template"].''; echo ''; echo "
"; echo ""; echo ""; echo "
"; echo ''; echo "
"; } else { audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Database Management"); require ("general/noaccess.php"); }