pandorafms/pandora_console/godmode/menu.php

188 lines
8.9 KiB
PHP
Raw Normal View History

<?php
// Pandora FMS - the Free monitoring system
// ========================================
// Copyright (c) 2004-2007 Sancho Lerena, slerena@gmail.com
// Main PHP/SQL code development and project architecture and management
// Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com
// CSS and some PHP additions
// Copyright (c) 2006-2007 Jonathan Barajas, jonathan.barajas[AT]gmail[DOT]com
// Javascript Active Console code.
// Copyright (c) 2006 Jose Navarro <contacto@indiseg.net>
// 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.
if (comprueba_login() == 0){
$id_user = $_SESSION["id_usuario"];
if ( (give_acl($id_user, 0, "LM")==1) OR (give_acl($id_user, 0, "AW")==1 ) OR (give_acl($id_user, 0, "PM")==1) OR (give_acl($id_user, 0, "DM")==1) OR (give_acl($id_user, 0, "UM")==1 )){
?>
2007-02-27 Sancho Lerena <slerena@openideas.info> * include/styles/god.css: Moved style block. * include/styles/link.css: Moved style block. * include/styles/op.css: Moved style block. * include/styles/pandora.css: Added some clases for new appearance. Needs to be improved, not finished yet !. * include/config.inc.php: Changed version number. * index.php: Some changes for new block disposition using data_box class and other changes. * operation/agentes/ver_agente.php: Now shows data in three tabs. Needs to be improved, but functional. * operation/agentes/estado_generalagente.php: Change in title order. This should be the way to show title and subtitle since now. * operation/messages/message.php: Changed icon, and fix problem in CSS. Deleted class: Classes with only fix weight should be avoided from now and added in code just with a style attribute, it generates too many classes in main CSS. * images/bottom-*-corner.gif: Added. * general/footer.php: Needs to be updated. * general/links_menu.php: New style in use (different color for top). * godmode/agentes/module_manager.php: New file to manage in tabs agent configuration. Almost functional, needs fix. * godmode/agentes/alert_manager.php: Content of alert management for agent manager, now in a individual file to be shown in a tab. * godmode/agentes/configurar_agente.php; * godmode/agentes/agent_manager.php: New file to manage in tabs agent configuration. Almost functional, needs fix. * godmode/menu.php: New style in use (different color for top). This is a partial commit not fully functional, need to be done due to many changes in a temporal development computer. Sorry for problems to people that are testing SVN version. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@387 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-02-27 20:03:56 +01:00
<div class="bg3">
<div class="imgl"><img src="images/upper-left-corner.gif" width="5" height="5" alt=""></div>
<div class="tit">:: <?php echo $lang_label["godmode_header"] ?> ::</div>
<div class="imgr"><img src="images/upper-right-corner.gif" width="5" height="5" alt=""></div>
</div>
<div id="menug">
<div id="god">
<?PHP
if ((give_acl($id_user, 0, "AW")==1)){
if (isset($_GET["sec2"]) && ($_GET["sec2"] == "godmode/agentes/modificar_agente" || $_GET["sec2"] == "godmode/agentes/configurar_agente")){
echo '<div id="god1s">';
}
else
echo '<div id="god1">';
echo '<ul class="mn"><li><a href="index.php?sec=gagente&amp;sec2=godmode/agentes/modificar_agente" class="mn">'.$lang_label["manage_agents"].'</a></li></ul></div>';
if (isset($_GET["sec"]) && $_GET["sec"] == "gagente"){
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/agentes/manage_config"){
echo "<div class='arrowgs'>";
}
else echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gagente&amp;sec2=godmode/agentes/manage_config' class='mn'>".$lang_label["manage_config"]."</a></li></ul></div>";
if (isset($_GET["sec2"]) && ($_GET["sec2"] == "godmode/grupos/lista_grupos" || $_GET["sec2"] == "godmode/grupos/configurar_grupo")){
echo "<div class='arrowgs'>";
}
else
echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gagente&amp;sec2=godmode/grupos/lista_grupos' class='mn'>".$lang_label["manage_groups"]."</a></li></ul></div>";
}
}
if ((give_acl($id_user, 0, "AW")==1)){
if (isset($_GET["sec"]) && ($_GET["sec"] == "gmodules"))
echo '<div id="god_module_sel">';
else
echo '<div id="god_module">';
echo '<ul class="mn"><li><a href="index.php?sec=gmodules&sec2=godmode/modules/module_list" class="mn">'.$lang_label["manage_modules"].'</a></li></ul></div>';
if (isset($_GET["sec"]) && $_GET["sec"] == "gmodules"){
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/modules/manage_nc_groups")
echo "<div class='arrowgs'>";
else
echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gmodules&sec2=godmode/modules/manage_nc_groups' class='mn'>".$lang_label["nc_groups"]."</a></li></ul></div>";
}
if (isset($_GET["sec"]) && $_GET["sec"] == "gmodules"){
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/modules/manage_network_components")
echo "<div class='arrowgs'>";
else
echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gmodules&sec2=godmode/modules/manage_network_components' class='mn'>".$lang_label["network_components"]."</a></li></ul></div>";
}
// Network Profiles
if (isset($_GET["sec"]) && $_GET["sec"] == "gmodules"){
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/modules/manage_network_templates")
echo "<div class='arrowgs'>";
else
echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates' class='mn'>".$lang_label["network_templates"]."</a></li></ul></div>";
}
}
if ((give_acl($id_user, 0, "LM")==1)){
if (isset($_GET["sec2"]) && ($_GET["sec2"] == "godmode/alertas/modificar_alerta" || $_GET["sec2"] == "godmode/alertas/configurar_alerta")){
echo '<div id="god2s">';
}
else echo '<div id="god2">';
echo '<ul class="mn"><li><a href="index.php?sec=galertas&amp;sec2=godmode/alertas/modificar_alerta" class="mn">'.$lang_label["manage_alerts"].'</a></li></ul></div>';
}
if ((give_acl($id_user, 0, "UM")==1)){
if (isset($_GET["sec2"]) && ($_GET["sec2"] == "godmode/usuarios/lista_usuarios" || $_GET["sec2"] == "godmode/usuarios/configurar_usuarios")){
echo '<div id="god3s">';
}
else echo '<div id="god3">';
echo '<ul class="mn"><li><a href="index.php?sec=gusuarios&amp;sec2=godmode/usuarios/lista_usuarios" class="mn">'.$lang_label["manage_users"].'</a></li></ul></div>';
}
if ( (give_acl($id_user, 0, "PM")==1)){
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/perfiles/lista_perfiles"){
echo '<div id="god4s">';
}
else echo '<div id="god4">';
echo '<ul class="mn"><li><a href="index.php?sec=gperfiles&amp;sec2=godmode/perfiles/lista_perfiles" class="mn">'.$lang_label["manage_profiles"].'</a></li></ul></div>';
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/servers/modificar_server"){
echo '<div id="god5s">';
}
else echo '<div id="god5">';
echo '<ul class="mn"><li><a href="index.php?sec=gservers&amp;sec2=godmode/servers/modificar_server" class="mn">'.$lang_label["manage_servers"].'</a></li></ul></div>';
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/admin_access_logs"){
echo '<div id="god6s">';
}
else echo '<div id="god6">';
echo '<ul class="mn"><li><a href="index.php?sec=glog&amp;sec2=godmode/admin_access_logs" class="mn">'.$lang_label["system_audit"].'</a></li></ul></div>';
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/setup/setup"){
echo '<div id="god7s">';
}
else echo '<div id="god7">';
echo '<ul class="mn"><li><a href="index.php?sec=gsetup&amp;sec2=godmode/setup/setup" class="mn">'.$lang_label["setup_screen"].'</a></li></ul></div>';
if (isset($_GET["sec"]) && $_GET["sec"] == "gsetup"){
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/setup/links"){
echo "<div class='arrowgs'>";
}
else echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gsetup&amp;sec2=godmode/setup/links' class='mn'>".$lang_label["setup_links"]."</a></li></ul></div>";
}
}
if ((give_acl($id_user, 0, "DM")==1)){
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/db/db_main"){
echo '<div id="god8s">';
}
else echo '<div id="god8">';
echo '<ul class="mn"><li><a href="index.php?sec=gdbman&amp;sec2=godmode/db/db_main" class="mn">'.$lang_label["db_maintenance"].'</a></li></ul></div>';
if (isset($_GET["sec"]) && $_GET["sec"] == "gdbman"){
if (isset($_GET["sec2"]) && ($_GET["sec2"] == "godmode/db/db_info" || $_GET["sec2"] == "godmode/db/db_info_data")){
echo "<div class='arrowgs'>";
}
else echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gdbman&amp;sec2=godmode/db/db_info' class='mn'>".$lang_label["db_info"]."</a></li></ul></div>";
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/db/db_purge"){
echo "<div class='arrowg'>";
}
else echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gdbman&amp;sec2=godmode/db/db_purge' class='mn'>".$lang_label["db_purge"]."</a></li></ul></div>";
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/db/db_refine"){
echo "<div class='arrowgs'>";
}
else echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gdbman&amp;sec2=godmode/db/db_refine' class='mn'>".$lang_label["db_refine"]."</a></li></ul></div>";
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/db/db_audit"){
echo "<div class='arrowgs'>";
}
else echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gdbman&amp;sec2=godmode/db/db_audit' class='mn'>".$lang_label["db_audit"]."</a></li></ul></div>";
if (isset($_GET["sec2"]) && $_GET["sec2"] == "godmode/db/db_event"){
echo "<div class='arrowgs'>";
}
else echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gdbman&amp;sec2=godmode/db/db_event' class='mn'>".$lang_label["db_event"]."</a></li></ul></div>";
}
}
?>
</div>
</div>
<?php
} // end verify access to this menu
}
?>