2008-12-19 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/footer.php: Updated print_timestamp to always print full. Removed the center tag (deprecated in HTML 4.01) * general/header.php: Fixed some CSS. * general/links_menu.php: Rewritten for new css style * general/main_menu.php: Rewritten for new css style and to avoid repetition in writing tags uses an array and functions * godmode/menu.php: Rewritten for new css style and to avoid repetition writing tags * include/functions_html.php: Added option to override prominent time * include/styles/link.css: Rewritten the whole CSS. Now all menu options are directly available through slide-outs (pure CSS, no JS) and avoids div for each single item. The pages renders quite a bit faster too. * include/styles/pandora.css: Fixed some bad tags and removed stuff that was for the rewritten menu. * index.php: Added to div. IE will in some situations not render empty divs. * operation/menu.php: Rewritten for new CSS style * include/styles/god.css, include/styles/op.css: git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1297 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ec794a1f31
commit
3034f01a5e
|
@ -1,3 +1,34 @@
|
|||
2008-12-19 Evi Vanoost <vanooste@rcbi.rochester.edu>
|
||||
|
||||
* general/footer.php: Updated print_timestamp to always print full.
|
||||
Removed the center tag (deprecated in HTML 4.01)
|
||||
|
||||
* general/header.php: Fixed some CSS.
|
||||
|
||||
* general/links_menu.php: Rewritten for new css style
|
||||
|
||||
* general/main_menu.php: Rewritten for new css style and to avoid
|
||||
repetition in writing tags uses an array and functions
|
||||
|
||||
* godmode/menu.php: Rewritten for new css style and to avoid repetition
|
||||
writing tags
|
||||
|
||||
* include/functions_html.php: Added option to override prominent time
|
||||
|
||||
* include/styles/link.css: Rewritten the whole CSS. Now all menu options
|
||||
are directly available through slide-outs (pure CSS, no JS) and avoids div
|
||||
for each single item. The pages renders quite a bit faster too.
|
||||
|
||||
* include/styles/pandora.css: Fixed some bad tags and removed stuff that
|
||||
was for the rewritten menu.
|
||||
|
||||
* index.php: Added to div. IE will in some situations not render
|
||||
empty divs.
|
||||
|
||||
* operation/menu.php: Rewritten for new CSS style
|
||||
|
||||
* include/styles/god.css, include/styles/op.css:
|
||||
|
||||
2008-12-18 Jorge Gonzalez <jorgegonz@artica.es>
|
||||
|
||||
* pandoradb_data.sql, pandoradb.sql: removed extra '-' which made the
|
||||
|
|
|
@ -23,18 +23,12 @@ if (isset($_SERVER['REQUEST_TIME'])) {
|
|||
$time = time();
|
||||
}
|
||||
|
||||
|
||||
echo "<center>";
|
||||
|
||||
|
||||
echo '<a class="white_bold" target="_new" href="general/license/pandora_info_'.$config["language"].'.html">Pandora FMS '.$pandora_version.' - Build '.$build_version.'<br>';
|
||||
echo '<a class="white">'. __('Page generated at') . ' '. print_timestamp ($time);
|
||||
echo '<a class="white">'. __('Page generated at') . ' '. print_timestamp ($time, true, array ("prominent" => "timestamp")); //Always use timestamp here
|
||||
|
||||
if ((isset($develop_bypass)) AND ($develop_bypass == 1)) {
|
||||
echo ' - Saved '.format_numeric ($sql_cache["saved"]).' Queries';
|
||||
}
|
||||
echo '</a><br>';
|
||||
echo '</a><br />';
|
||||
echo '<a href="http://www.mozilla-europe.org/en/firefox/"><img src="'.$config["homeurl"].'/images/firefox.png" align="middle" title="'.__('Pandora FMS console is best viewed with Firefox web browser').'" /></a>';
|
||||
echo "</center>";
|
||||
|
||||
?>
|
||||
|
|
|
@ -22,7 +22,7 @@ echo '<table width="100%" cellpadding="0" cellspacing="0" style="margin:0px; pad
|
|||
// Yes, put here your corporate logo instead pandora_logo_head.png
|
||||
// The style specifies width and height so that oversized images get resized.
|
||||
// Optimally your logo would be this size.
|
||||
echo '<a href="index.php"><img src="images/pandora_logo_head.png" alt="logo" style="border-width:0px width:140px; height:60px;" /></a>';
|
||||
echo '<a href="index.php"><img src="images/pandora_logo_head.png" alt="logo" style="border-width:0px; width:140px; height:60px;" /></a>';
|
||||
|
||||
// Margin to logo
|
||||
echo '</td><td width="20"> </td>';
|
||||
|
|
|
@ -15,16 +15,14 @@
|
|||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
$sql='SELECT link,name FROM tlink ORDER BY name';
|
||||
$sql = 'SELECT link, name FROM tlink ORDER BY name';
|
||||
$result = get_db_all_rows_sql ($sql);
|
||||
if ($result !== false){
|
||||
?>
|
||||
<div class="tit bg4">:: <?php echo __('Links') ?> ::</div>
|
||||
<div class="menul" id="link">
|
||||
<?php
|
||||
if ($result !== false) {
|
||||
echo '<div class="tit bg4">:: '.__('Links').' ::</div>';
|
||||
echo '<div class="menu links"><ul>';
|
||||
foreach ($result as $row){
|
||||
echo "<div class='linkli'><ul class='mn'><li><a href='".$row["link"]."' target='_new' class='mn'>".$row["name"]."</a></li></ul></div>";
|
||||
echo '<li><a href="'.$row["link"].'" target="_new">'.$row["name"].'</a></li>';
|
||||
}
|
||||
echo "</div>";
|
||||
echo '</ul></div>';
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -16,11 +16,81 @@
|
|||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require ("operation/menu.php");
|
||||
if (! isset ($_SESSION["id_usuario"])) {
|
||||
if (! isset ($config["id_user"])) {
|
||||
require ("general/login_page.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
//This is a helper function to print menu items
|
||||
function temp_print_menu ($menu, $type) {
|
||||
echo '<div class="menu '.$type.'">';
|
||||
|
||||
$sec = get_parameter ('sec');
|
||||
$sec2 = get_parameter ('sec2');
|
||||
|
||||
foreach ($menu as $mainsec => $main) {
|
||||
//Set class
|
||||
if (!isset ($main["sub"])) {
|
||||
$main["sub"] = array ();
|
||||
}
|
||||
|
||||
if ($sec == $mainsec) {
|
||||
$class = 'selected';
|
||||
$selected = 1;
|
||||
} else {
|
||||
$class = '';
|
||||
$selected = 0;
|
||||
$style = "";
|
||||
}
|
||||
|
||||
//Print out the first level
|
||||
echo '<ul class="'.$class.'"><li class="mainmenu '.$class.'" id="'.$main["id"].'"><a href="index.php?sec='.$mainsec.'&sec2='.$main["sec2"].'&refr='.$main["refr"].'">'.$main["text"].'</a></li>';
|
||||
|
||||
foreach ($main["sub"] as $subsec2 => $sub) {
|
||||
//Set class
|
||||
if (($sec2 == $subsec2) && (isset ($sub[$subsec2]["options"])) && (get_parameter_get ($sub[$subsec2]["options"]["name"]) == $sub[$subsec2]["options"]["value"])) {
|
||||
//If the subclass is selected and there are options and that options value is true
|
||||
$class = 'submenu selected';
|
||||
} elseif ($sec2 == $subsec2 && (!isset ($sub[$subsec2]["options"]))) {
|
||||
//If the subclass is selected and there are no options
|
||||
$class = 'submenu selected';
|
||||
} elseif ($selected == 1) {
|
||||
//If the mainclass is selected
|
||||
$class = 'submenu';
|
||||
} else {
|
||||
//Else it's invisible
|
||||
$class = 'submenu invisible';
|
||||
}
|
||||
|
||||
if (isset ($sub["type"]) && $sub["type"] == "direct") {
|
||||
//This is an external link
|
||||
echo '<li class="'.$class.'"><a href="'.$subsec2.'">'.$sub["text"].'</a></li>';
|
||||
} else {
|
||||
//This is an internal link
|
||||
if (isset($sub[$subsec2]["options"])) {
|
||||
$link_add = "&".$sub[$subsec2]["options"]["name"]."=".$sub[$subsec2]["options"]["value"];
|
||||
} else {
|
||||
$link_add = "";
|
||||
}
|
||||
echo '<li class="'.$class.'"><a href="index.php?sec='.$mainsec.'&sec2='.$subsec2.'&refr='.$sub["refr"].$link_add.'">'.$sub["text"].'</a></li>';
|
||||
}
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
//Invisible UL for adding border-top
|
||||
echo '<ul style="height: 0px;"> </ul></div>';
|
||||
}
|
||||
|
||||
echo '<div class="tit bg">:: '.__('Operation').' ::</div>';
|
||||
$menu = array ();
|
||||
require ("operation/menu.php");
|
||||
temp_print_menu ($menu, "int");
|
||||
|
||||
echo '<div class="tit bg3">:: '.__('Administration').' ::</div>';
|
||||
$menu = array ();
|
||||
require ("godmode/menu.php");
|
||||
temp_print_menu ($menu, "int");
|
||||
unset ($menu);
|
||||
|
||||
require ("links_menu.php");
|
||||
?>
|
||||
?>
|
|
@ -18,333 +18,203 @@
|
|||
|
||||
enterprise_include ('godmode/menu.php');
|
||||
|
||||
if (comprueba_login ()) {
|
||||
return;
|
||||
}
|
||||
check_login ();
|
||||
|
||||
if ((! give_acl ($config['id_user'], 0, "LM")) && (! give_acl ($config['id_user'], 0, "AW")) && (! give_acl ($config['id_user'], 0, "PM")) && (! give_acl ($config['id_user'], 0, "DM")) && (! give_acl ($config['id_user'], 0, "UM"))) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="tit bg3">:: <?php echo __('Administration') ?> ::</div>
|
||||
<div class="menug" id="god">
|
||||
|
||||
<?php
|
||||
if (give_acl ($config['id_user'], 0, "AW")) {
|
||||
if ($sec2 == "godmode/agentes/modificar_agente" || $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&sec2=godmode/agentes/modificar_agente" class="mn">'.__('Manage agents').'</a></li></ul></div>';
|
||||
|
||||
if ($sec == "gagente") {
|
||||
if ($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&sec2=godmode/agentes/manage_config' class='mn'>".__('Manage config.')."</a></li></ul></div>";
|
||||
$menu["gagente"]["text"] = __('Manage agents');
|
||||
$menu["gagente"]["sec2"] = "godmode/agentes/modificar_agente";
|
||||
$menu["gagente"]["refr"] = 0;
|
||||
$menu["gagente"]["id"] = "god-agents";
|
||||
|
||||
if ($sec2 == "godmode/agentes/manage_config_remote") {
|
||||
echo "<div class='arrowgs'>";
|
||||
} else {
|
||||
echo "<div class='arrowg'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gagente&sec2=godmode/agentes/manage_config_remote' class='mn'>".__('Duplicate config')."</a></li></ul></div>";
|
||||
|
||||
// Manage groups
|
||||
if (give_acl($config['id_user'], 0, "PM")) {
|
||||
if ($sec2 == "godmode/groups/group_list" || $sec2 == "godmode/groups/configure_group") {
|
||||
echo "<div class='arrowgs'>";
|
||||
} else {
|
||||
echo "<div class='arrowg'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gagente&sec2=godmode/groups/group_list' class='mn'>".__('Manage groups')."</a></li></ul></div>";
|
||||
}
|
||||
|
||||
// Planned downtimes
|
||||
if ((give_acl($config['id_user'], 0, "AW")==1)){
|
||||
if ($sec2 == "godmode/agentes/planned_downtime" || $sec2 == "godmode/agentes/planned_downtime") {
|
||||
echo "<div class='arrowgs'>";
|
||||
}
|
||||
else
|
||||
echo "<div class='arrowg'>";
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gagente&sec2=godmode/agentes/planned_downtime' class='mn'>".__('Scheduled downtime')."</a></li></ul></div>";
|
||||
}
|
||||
$sub = array ();
|
||||
$sub["godmode/agentes/manage_config"]["text"] = __('Manage config');
|
||||
$sub["godmode/agentes/manage_config"]["refr"] = 0;
|
||||
|
||||
$sub["godmode/agentes/manage_config_remote"]["text"] = __('Duplicate config');
|
||||
$sub["godmode/agentes/manage_config_remote"]["refr"] = 0;
|
||||
|
||||
if (give_acl ($config["id_user"], 0, "PM")) {
|
||||
$sub["godmode/groups/group_list"]["text"] = __('Manage groups');
|
||||
$sub["godmode/groups/group_list"]["refr"] = 0;
|
||||
}
|
||||
|
||||
$sub["godmode/agentes/planned_downtime"]["text"] = __('Scheduled downtime');
|
||||
$sub["godmode/agentes/planned_downtime"]["refr"] = 0;
|
||||
|
||||
$menu["gagente"]["sub"] = $sub;
|
||||
}
|
||||
|
||||
if ((give_acl($config['id_user'], 0, "PM")==1)){
|
||||
if ($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">'.__('Manage modules').'</a></li></ul></div>';
|
||||
|
||||
if ($sec == "gmodules") {
|
||||
if ($sec2 == "godmode/modules/manage_nc_groups" || $sec2 == "godmode/modules/manage_nc_groups_form")
|
||||
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'>".__('Component groups')."</a></li></ul></div>";
|
||||
}
|
||||
if (give_acl ($config['id_user'], 0, "PM")) {
|
||||
$menu["gmodules"]["text"] = __('Manage modules');
|
||||
$menu["gmodules"]["sec2"] = "godmode/agentes/modificar_agente";
|
||||
$menu["gmodules"]["refr"] = 0;
|
||||
$menu["gmodules"]["id"] = "god-modules";
|
||||
|
||||
if ($sec == "gmodules") {
|
||||
if ($sec2 == "godmode/modules/manage_network_components" || $sec2 == "godmode/modules/manage_network_components_form")
|
||||
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'>".__('Module components')."</a></li></ul></div>";
|
||||
}
|
||||
// Network Profiles
|
||||
if ($sec == "gmodules") {
|
||||
if ($sec2 == "godmode/modules/manage_network_templates" || $sec2 == "godmode/modules/manage_network_templates_form")
|
||||
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'>".__('Module templates')."</a></li></ul></div>";
|
||||
}
|
||||
// Inventory modules
|
||||
$sub = array ();
|
||||
$sub["godmode/modules/manage_nc_groups"]["text"] = __('Component groups');
|
||||
$sub["godmode/modules/manage_nc_groups"]["refr"] = 0;
|
||||
|
||||
$sub["godmode/modules/manage_network_components"]["text"] = __('Module components');
|
||||
$sub["godmode/modules/manage_network_components"]["refr"] = 0;
|
||||
|
||||
$sub["godmode/modules/manage_network_templates"]["text"] = __('Module templates');
|
||||
$sub["godmode/modules/manage_network_templates"]["refr"] = 0;
|
||||
|
||||
enterprise_hook ('inventory_submenu');
|
||||
|
||||
$menu["gmodules"]["sub"] = $sub;
|
||||
}
|
||||
|
||||
if (give_acl ($config['id_user'], 0, "LM")) {
|
||||
if ($sec2 == "godmode/alerts/modify_alert" || $sec2 == "godmode/alerts/configure_alert") {
|
||||
echo '<div id="god2s">';
|
||||
}
|
||||
else
|
||||
echo '<div id="god2">';
|
||||
echo '<ul class="mn"><li><a href="index.php?sec=galertas&sec2=godmode/alerts/modify_alert" class="mn">'.__('Manage alerts').'</a></li></ul></div>';
|
||||
$menu["galertas"]["text"] = __('Manage alerts');
|
||||
$menu["galertas"]["sec2"] = "godmode/alerts/modify_alert";
|
||||
$menu["galertas"]["refr"] = 0;
|
||||
$menu["galertas"]["id"] = "god-alerts";
|
||||
}
|
||||
|
||||
if (give_acl ($config['id_user'], 0, "UM")) {
|
||||
if ($sec2 == "godmode/users/user_list" || $sec2 == "godmode/users/configure_user") {
|
||||
echo '<div id="god3s">';
|
||||
}
|
||||
else echo '<div id="god3">';
|
||||
echo '<ul class="mn"><li><a href="index.php?sec=gusuarios&sec2=godmode/users/user_list" class="mn">'.__('Manage users').'</a></li></ul></div>';
|
||||
$menu["gusuarios"]["text"] = __('Manage users');
|
||||
$menu["gusuarios"]["sec2"] = "godmode/users/user_list";
|
||||
$menu["gusuarios"]["refr"] = 0;
|
||||
$menu["gusuarios"]["id"] = "god-users";
|
||||
}
|
||||
|
||||
// SNMP console
|
||||
if (give_acl($config['id_user'], 0, "AW")) {
|
||||
if ($sec == "gsnmpconsole"){
|
||||
echo "<div id='god9s'>";
|
||||
} else
|
||||
echo "<div id='god9'>";
|
||||
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_alert' class='mn'>" . __('Manage SNMP console') . "</a></li></ul></div>";
|
||||
|
||||
// SNMP Console alert (submenu)
|
||||
if ($sec == "gsnmpconsole") {
|
||||
if ($sec2 == "godmode/snmpconsole/snmp_alert") {
|
||||
echo "<div class='arrowgs'>";
|
||||
} else {
|
||||
echo "<div class='arrowg'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_alert' class='mn'>".__('SNMP alerts')."</a></li></ul></div>";
|
||||
}
|
||||
$menu["gsnmpconsole"]["text"] = __('Manage SNMP console');
|
||||
$menu["gsnmpconsole"]["sec2"] = "godmode/snmpconsole/snmp_alert";
|
||||
$menu["gsnmpconsole"]["refr"] = 0;
|
||||
$menu["gsnmpconsole"]["id"] = "god-snmpc";
|
||||
|
||||
//SNMP Console alert
|
||||
$sub = array ();
|
||||
$sub["godmode/snmpconsole/snmp_alert"]["text"] = __('Component groups');
|
||||
$sub["godmode/snmpconsole/snmp_alert"]["refr"] = 0;
|
||||
|
||||
enterprise_hook ('snmpconsole_submenu');
|
||||
}
|
||||
|
||||
$menu["gsnmpconsole"]["sub"] = $sub;
|
||||
}
|
||||
|
||||
// Reporting
|
||||
if (give_acl ($config['id_user'], 0, "PM")) {
|
||||
echo '<div id="god51">';
|
||||
|
||||
echo '<ul class="mn"><li><a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder" class="mn">'. __('Manage reports').'</a></li></ul></div>';
|
||||
$menu["greporting"]["text"] = __('Manage reports');
|
||||
$menu["greporting"]["sec2"] = "godmode/reporting/reporting_builder";
|
||||
$menu["greporting"]["refr"] = 0;
|
||||
$menu["greporting"]["id"] = "god-reporting";
|
||||
|
||||
// Custom report builder
|
||||
if ($sec == "greporting") {
|
||||
if ($sec2 == "godmode/reporting/reporting_builder") {
|
||||
echo "<div class='arrowgs'>";
|
||||
} else {
|
||||
echo "<div class='arrowg'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=greporting&sec2=godmode/reporting/reporting_builder' class='mn'>".__('Report builder')."</a></li></ul></div>";
|
||||
}
|
||||
|
||||
$sub = array ();
|
||||
$sub["godmode/reporting/reporting_builder"]["text"] = __('Report builder');
|
||||
$sub["godmode/reporting/reporting_builder"]["refr"] = 0;
|
||||
|
||||
// Custom graph builder
|
||||
if ($sec == "greporting") {
|
||||
if ($sec2 == "godmode/reporting/graph_builder"){
|
||||
echo "<div class='arrowgs'>";
|
||||
} else {
|
||||
echo "<div class='arrowg'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=greporting&sec2=godmode/reporting/graph_builder' class='mn'>".__('Graph builder')."</a></li></ul></div>";
|
||||
}
|
||||
|
||||
// Custom map builder
|
||||
if ($sec == "greporting") {
|
||||
if ($sec2 == "godmode/reporting/map_builder") {
|
||||
echo "<div class='arrowgs'>";
|
||||
} else {
|
||||
echo "<div class='arrowg'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=greporting&sec2=godmode/reporting/map_builder' class='mn'>".__('Map builder')."</a></li></ul></div>";
|
||||
}
|
||||
}
|
||||
|
||||
// Manage profiles
|
||||
|
||||
if (give_acl ($config['id_user'], 0, "PM")) {
|
||||
if ($sec2 == "godmode/profiles/profile_list") {
|
||||
echo '<div id="god4s">';
|
||||
}
|
||||
else echo '<div id="god4">';
|
||||
echo '<ul class="mn"><li><a href="index.php?sec=gperfiles&sec2=godmode/profiles/profile_list" class="mn">'.__('Manage profiles').'</a></li></ul></div>';
|
||||
|
||||
// SERVERS
|
||||
if ($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&sec2=godmode/servers/modificar_server" class="mn">'.__('Manage servers').'</a></li></ul></div>';
|
||||
$sub["godmode/reporting/graph_builder"]["text"] = __('Graph builder');
|
||||
$sub["godmode/reporting/graph_builder"]["refr"] = 0;
|
||||
|
||||
// Custom map builder
|
||||
$sub["godmode/reporting/map_builder"]["text"] = __('Map builder');
|
||||
$sub["godmode/reporting/map_builder"]["refr"] = 0;
|
||||
|
||||
$menu["greporting"]["sub"] = $sub;
|
||||
|
||||
// Manage profiles
|
||||
$menu["gperfiles"]["text"] = __('Manage profiles');
|
||||
$menu["gperfiles"]["sec2"] = "godmode/profiles/profile_list";
|
||||
$menu["gperfiles"]["refr"] = 0;
|
||||
$menu["gperfiles"]["id"] = "god-profiles";
|
||||
|
||||
// Servers
|
||||
$menu["gservers"]["text"] = __('Manage servers');
|
||||
$menu["gservers"]["sec2"] = "godmode/servers/modificar_server";
|
||||
$menu["gservers"]["refr"] = 0;
|
||||
$menu["gservers"]["id"] = "god-servers";
|
||||
|
||||
$sub = array ();
|
||||
$sub["godmode/servers/manage_recontask"]["text"] = __('Manage recontask');
|
||||
$sub["godmode/servers/manage_recontask"]["refr"] = 0;
|
||||
|
||||
$sub["godmode/servers/plugin"]["text"] = __('Manage plugins');
|
||||
$sub["godmode/servers/plugin"]["refr"] = 0;
|
||||
|
||||
$sub["godmode/servers/manage_export_form"]["text"] = __('Export targets');
|
||||
$sub["godmode/servers/manage_export_form"]["refr"] = 0;
|
||||
|
||||
$menu["gservers"]["sub"] = $sub;
|
||||
|
||||
if ($sec == "gservers") {
|
||||
if ($sec2 == "godmode/servers/manage_recontask"|| $sec2 == "godmode/servers/manage_recontask_form") {
|
||||
echo "<div class='arrowgs'>";
|
||||
} else
|
||||
echo "<div class='arrowg'>";
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gservers&sec2=godmode/servers/manage_recontask' class='mn'>".__('Manage recontask')."</a></li></ul></div>";
|
||||
}
|
||||
if ($sec == "gservers") {
|
||||
if ($sec2 == "godmode/servers/plugin") {
|
||||
echo "<div class='arrowgs'>";
|
||||
} else {
|
||||
echo "<div class='arrowg'>";
|
||||
}
|
||||
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gservers&sec2=godmode/servers/plugin' class='mn'>".__('Manage plugins')."</a></li></ul></div>";
|
||||
}
|
||||
if ($sec == "gservers") {
|
||||
if ($sec2 == "godmode/servers/manage_export"|| $sec2 == "godmode/servers/manage_export_form") {
|
||||
echo "<div class='arrowgs'>";
|
||||
} else
|
||||
echo "<div class='arrowg'>";
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gservers&sec2=godmode/servers/manage_export' class='mn'>".__('Export targets')."</a></li></ul></div>";
|
||||
}
|
||||
|
||||
// SNMP console
|
||||
enterprise_hook ('snmpconsole_menu');
|
||||
|
||||
// AUDIT
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if ($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&sec2=godmode/admin_access_logs" class="mn">'.__('System Audit Log').'</a></li></ul></div>';
|
||||
// Audit
|
||||
$menu["glog"]["text"] = __('System audit log');
|
||||
$menu["glog"]["sec2"] = "godmode/admin_access_logs";
|
||||
$menu["glog"]["refr"] = 0;
|
||||
$menu["glog"]["id"] = "god-audit";
|
||||
|
||||
// Main SETUP
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if ($sec2 == "godmode/setup/setup") {
|
||||
echo '<div id="god7s">';
|
||||
}
|
||||
else echo '<div id="god7">';
|
||||
echo '<ul class="mn"><li><a href="index.php?sec=gsetup&sec2=godmode/setup/setup" class="mn">'.__('Pandora Setup').'</a></li></ul></div>';
|
||||
// Setup
|
||||
$menu["gsetup"]["text"] = __('Pandora setup');
|
||||
$menu["gsetup"]["sec2"] = "godmode/setup/setup";
|
||||
$menu["gsetup"]["refr"] = 0;
|
||||
$menu["gsetup"]["id"] = "god-setup";
|
||||
|
||||
if ($sec == "gsetup") {
|
||||
if ($sec2 == "godmode/setup/links") {
|
||||
echo "<div class='arrowgs'>";
|
||||
}
|
||||
else echo "<div class='arrowg'>";
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gsetup&sec2=godmode/setup/links' class='mn'>".__('Links')."</a></li></ul></div>";
|
||||
}
|
||||
$sub = array ();
|
||||
$sub["godmode/setup/links"]["text"] = __('Links');
|
||||
$sub["godmode/setup/links"]["refr"] = 0;
|
||||
|
||||
if ($sec == "gsetup"){
|
||||
if ($sec2 == "godmode/setup/news") {
|
||||
echo "<div class='arrowgs'>";
|
||||
}
|
||||
else echo "<div class='arrowg'>";
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gsetup&sec2=godmode/setup/news' class='mn'>".__('Site news')."</a></li></ul></div>";
|
||||
}
|
||||
$sub["godmode/setup/news"]["text"] = __('Site news');
|
||||
$sub["godmode/setup/news"]["refr"] = 0;
|
||||
|
||||
$menu["gsetup"]["sub"] = $sub;
|
||||
}
|
||||
if (give_acl ($config['id_user'], 0, "DM")) {
|
||||
if ($sec2 == "godmode/db/db_main") {
|
||||
echo '<div id="god8s">';
|
||||
} else
|
||||
echo '<div id="god8">';
|
||||
echo '<ul class="mn"><li>';
|
||||
echo '<a href="index.php?sec=gdbman&sec2=godmode/db/db_main" class="mn">'.__('DB Maintenance').'</a></li></ul></div>';
|
||||
|
||||
if ($sec == "gdbman") {
|
||||
if ($sec2 == "godmode/db/db_info" || $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&sec2=godmode/db/db_info' class='mn'>".__('DB Information')."</a></li></ul></div>";
|
||||
|
||||
if ($sec2 == "godmode/db/db_purge") {
|
||||
echo "<div class='arrowgs'>";
|
||||
} else {
|
||||
echo "<div class='arrowg'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gdbman&sec2=godmode/db/db_purge' class='mn'>".__('Database purge')."</a></li></ul></div>";
|
||||
|
||||
if ($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&sec2=godmode/db/db_refine' class='mn'>".__('Database debug')."</a></li></ul></div>";
|
||||
|
||||
if ($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&sec2=godmode/db/db_audit' class='mn'>".__('Database audit')."</a></li></ul></div>";
|
||||
|
||||
if ($sec2 == "godmode/db/db_event") {
|
||||
echo "<div id='arrowgls'>";
|
||||
} else {
|
||||
echo "<div id='arrowgl'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gdbman&sec2=godmode/db/db_event' class='mn'>".__('Database event')."</a></li></ul></div>";
|
||||
|
||||
if ($sec2 == "godmode/db/db_sanity") {
|
||||
echo "<div id='arrowgls'>";
|
||||
} else {
|
||||
echo "<div id='arrowgl'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=gdbman&sec2=godmode/db/db_sanity' class='mn'>".__('Database sanity')."</a></li></ul></div>";
|
||||
}
|
||||
if (give_acl ($config['id_user'], 0, "DM")) {
|
||||
$menu["gdbman"]["text"] = __('DB Maintenance');
|
||||
$menu["gdbman"]["sec2"] = "godmode/db/db_main";
|
||||
$menu["gdbman"]["refr"] = 0;
|
||||
$menu["gdbman"]["id"] = "god-dbmaint";
|
||||
|
||||
$sub = array ();
|
||||
$sub["godmode/db/db_info"]["text"] = __('DB Information');
|
||||
$sub["godmode/db/db_info"]["refr"] = 0;
|
||||
|
||||
$sub["godmode/db/db_purge"]["text"] = __('Database purge');
|
||||
$sub["godmode/db/db_purge"]["refr"] = 0;
|
||||
|
||||
$sub["godmode/db/db_refine"]["text"] = __('Database debug');
|
||||
$sub["godmode/db/db_refine"]["refr"] = 0;
|
||||
|
||||
$sub["godmode/db/db_audit"]["text"] = __('Database audit');
|
||||
$sub["godmode/db/db_audit"]["refr"] = 0;
|
||||
|
||||
$sub["godmode/db/db_event"]["text"] = __('Database event');
|
||||
$sub["godmode/db/db_event"]["refr"] = 0;
|
||||
|
||||
$sub["godmode/db/db_sanity"]["text"] = __('Database sanity');
|
||||
$sub["godmode/db/db_sanity"]["refr"] = 0;
|
||||
|
||||
$menu["gdbman"]["sub"] = $sub;
|
||||
}
|
||||
|
||||
if (is_array ($config['extensions'])) {
|
||||
if ($sec == "gextensions") {
|
||||
$selected = ' menu-god-selected';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
echo '<div id="god-extensions" class="god-menu'.$selected.'">';
|
||||
echo '<ul class="mn"><li class="bb0">
|
||||
<a href="index.php?sec=gextensions&sec2=godmode/extensions" class="mn">';
|
||||
echo __('Extensions');
|
||||
echo '</a></li></ul>';
|
||||
echo "</div>";
|
||||
if ($selected != '') {
|
||||
foreach ($config['extensions'] as $extension) {
|
||||
if ($extension['godmode_menu'] == '')
|
||||
continue;
|
||||
$menu = $extension['godmode_menu'];
|
||||
if (! give_acl ($config['id_user'], 0, $menu['acl']))
|
||||
continue;
|
||||
if ($sec2 == $menu['sec2']) {
|
||||
echo '<div class="god-submenu submenu-god-selected">';
|
||||
} else {
|
||||
echo '<div class="god-submenu">';
|
||||
}
|
||||
echo '<ul class="mn"><li>';
|
||||
echo '<a href="index.php?sec=gextensions&sec2='.$menu['sec2'].'" class="mn">'.$menu['name'];
|
||||
echo '</a></li></ul></div>';
|
||||
$menu["gextensions"]["text"] = __('Extensions');
|
||||
$menu["gextensions"]["sec2"] = "godmode/extensions";
|
||||
$menu["gextensions"]["refr"] = 0;
|
||||
$menu["gextensions"]["id"] = "god-extensions";
|
||||
|
||||
$sub = array ();
|
||||
foreach ($config['extensions'] as $extension) {
|
||||
$extmenu = $extension['godmode_menu'];
|
||||
if ($extension['godmode_menu'] == '' || ! give_acl ($config['id_user'], 0, $extmenu['acl'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$sub[$extmenu["sec2"]]["text"] = $extmenu["name"];
|
||||
$sub[$extmenu["sec2"]]["refr"] = 0;
|
||||
}
|
||||
|
||||
$menu["gextensions"]["sub"] = $sub;
|
||||
}
|
||||
echo '</div>';
|
||||
?>
|
||||
|
|
|
@ -756,12 +756,15 @@ function print_error_message ($result, $good = '', $bad = '', $attributes = '',
|
|||
* @param array $option: An array with different options for this function
|
||||
* Key html_attr: which html attributes to add (defaults to none)
|
||||
* Key tag: Which html tag to use (defaults to span)
|
||||
* Key prominent: Overrides user preference and display "comparation" or "timestamp"
|
||||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
*/
|
||||
function print_timestamp ($unixtime, $return = false, $option = array ()) {
|
||||
global $config;
|
||||
|
||||
//TODO: Add/use a javascript timer for the seconds so it automatically updates as time passes by
|
||||
|
||||
if (isset ($option["html_attr"])) {
|
||||
$attributes = $option["html_attr"];
|
||||
} else {
|
||||
|
@ -773,6 +776,14 @@ function print_timestamp ($unixtime, $return = false, $option = array ()) {
|
|||
} else {
|
||||
$tag = "span";
|
||||
}
|
||||
|
||||
if (isset ($option["prominent"]) && $option["prominent"] == "timestamp") {
|
||||
$prominent = "timestamp";
|
||||
} elseif (isset ($option["prominent"]) && $option["prominent"] == "comparation") {
|
||||
$prominent = "comparation";
|
||||
} else {
|
||||
$prominent = $config["prominent_time"];
|
||||
}
|
||||
|
||||
if (!is_numeric ($unixtime)) {
|
||||
$unixtime = strtotime ($unixtime);
|
||||
|
@ -782,7 +793,7 @@ function print_timestamp ($unixtime, $return = false, $option = array ()) {
|
|||
if ($unixtime == 0) {
|
||||
$title = __('Never');
|
||||
$data = __('Never');
|
||||
} elseif ($config["prominent_time"] == "timestamp") {
|
||||
} elseif ($prominent == "timestamp") {
|
||||
$title = human_time_comparation ($unixtime);
|
||||
$data = date ($config["date_format"], $unixtime);
|
||||
} else {
|
||||
|
|
|
@ -1,87 +0,0 @@
|
|||
#god a {
|
||||
display: block;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
#god li {
|
||||
left: 1px;
|
||||
width: 99%;
|
||||
border-bottom: 1px solid #d4d4d4;
|
||||
border-top: 1px solid #ffffff;
|
||||
}
|
||||
div.menug {
|
||||
background-color: #f5f5dc;
|
||||
border: 1px solid #dadbdc;
|
||||
width: 155px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#god1 li, #god2 li, #god3 li, #god4 li, #god5 li, #god51 li, #god6 li, #god7 li, #god8 li, #god9 li, #god1s li, #god2s li, #god3s li, #god4s li, #god5s li, #god51s li, #god6s li, #god7s li, #god8s li, #god9s li, #god_module li, #god_module_sel li, #god-extensions li {
|
||||
padding: 0px 0px 0px 30px;
|
||||
}
|
||||
div#god1>ul, div#god2>ul, div#god3>ul, div#god4>ul, div#god5>ul, div#god51>ul, div#god6>ul, div#god7>ul, div#god8>ul, div#god9>ul, div#god1s>ul, div#god2s>ul, div#god3s>ul, div#god4s>ul, div#god5s>ul, div#god51s>ul, div#god6s>ul, div#god7s>ul, div#god9s>ul, div#god8s>ul, div#god_module>ul, div#god_module_sel>ul , .god-menu ul{
|
||||
width: 126px;
|
||||
}
|
||||
#god1 li, #god1 li:hover, #god1s li {
|
||||
background: url(../../images/god1.png) no-repeat 4px 2px;
|
||||
}
|
||||
#god2 li, #god2 li:hover, #god2s li{
|
||||
background: url(../../images/god2.png) no-repeat 4px 3px;
|
||||
}
|
||||
#god3 li, #god3 li:hover, #god3s li {
|
||||
background: url(../../images/god3.png) no-repeat 5px 3px;
|
||||
}
|
||||
#god4 li, #god4 li:hover, #god4s li{
|
||||
background: url(../../images/god4.png) no-repeat 5px 4px;
|
||||
}
|
||||
#god5 li, #god5 li:hover, #god5s li {
|
||||
background: url(../../images/god5.png) no-repeat 3px 3px;
|
||||
}
|
||||
#god51 li, #god51 li:hover, #god51s li {
|
||||
background: url(../../images/reporting_edit.png) no-repeat 4px 4px;
|
||||
}
|
||||
#god6 li, #god6 li:hover, #god6s li {
|
||||
background: url(../../images/god6.png) no-repeat 4px 3px;
|
||||
}
|
||||
#god7 li, #god7 li:hover, #god7s li {
|
||||
background: url(../../images/god7.png) no-repeat 4px 3px;
|
||||
}
|
||||
#god8 li, #god8 li:hover, #god8s li {
|
||||
background: url(../../images/god8.png) no-repeat 5px 4px;
|
||||
}
|
||||
#god9 li, #god9 li:hover, #god9s li {
|
||||
background: url(../../images/computer_error.png) no-repeat 5px 4px;
|
||||
}
|
||||
#god_module li, #god_module li:hover, #god_module_sel li {
|
||||
background: url(../../images/brick.png) no-repeat 6px 4px;
|
||||
}
|
||||
#god-extensions li, #god-extensions li:hover {
|
||||
background: url(../../images/extensions.png) no-repeat 5px 3px;
|
||||
}
|
||||
|
||||
div.arrowg>ul, div.arrowgs>ul, div#arrowgl>ul, div#arrowgls>ul , .god-submenu>ul {
|
||||
width: 75%;
|
||||
}
|
||||
.arrowg li, .arrowg li:hover, .arrowgs li, #arrowgl li, #arrowgl li:hover, #arrowgls li, .god-submenu li {
|
||||
background: url(../../images/arrow.png) no-repeat 2px 4px;
|
||||
margin-left: 26px;
|
||||
padding: 0px 0px 0px 14px;
|
||||
}
|
||||
.menu-god-selected, #menug li:hover, .submenu-god-selected li, .god-submenu li:hover {
|
||||
background-color: #efefbd !important;
|
||||
}
|
||||
|
||||
#god a:hover,
|
||||
#god1 li:hover, #god1s li, #god2 li:hover, #god2s li, #god3 li:hover, #god3s li,
|
||||
#god4 li:hover, #god4s li, #god5 li:hover, #god5s li, #god6 li:hover, #god6s li,
|
||||
#god7 li:hover, #god7s li, #god8 li:hover, #god8s li, #god9 li:hover, #god9s li,
|
||||
#god_module li:hover, #god_module_sel li, #god51 li:hover, #god51s li,
|
||||
.arrowg li:hover, .arrowgs li, #arrowgl li:hover, #arrowgls li
|
||||
{
|
||||
background-color: #efefbd;
|
||||
}
|
||||
#arrowgl li.bb0, #arrowgls li.bb0 , #menug li.bb0, #god {
|
||||
border-bottom: 0px;
|
||||
}
|
||||
#menug li.bb0, #god {
|
||||
border-top: 0px;
|
||||
}
|
|
@ -19,30 +19,159 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#link a {
|
||||
display: block;
|
||||
color: #000;
|
||||
}
|
||||
div.menul {
|
||||
background-color: #e9f3d2;
|
||||
border: 1px solid #dadbdc;
|
||||
.menu {
|
||||
background-color: #E9F3D2;
|
||||
border: 1px solid #DADBDC;
|
||||
width: 155px;
|
||||
}
|
||||
div.linkli>ul {
|
||||
width: 133px;
|
||||
.menu ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.linkli li {
|
||||
padding: 0px 0px 0px 22px;
|
||||
border-bottom: 1px solid #d4d4d4;
|
||||
border-top: 1px solid #f5ffff;
|
||||
width: 100%;
|
||||
|
||||
.menu li {
|
||||
background-color: #E9F3D2;
|
||||
border: 0px solid black;
|
||||
border-bottom: 1px solid #D4D4D4;
|
||||
padding: 5px 5px 5px 30px;
|
||||
margin: 0;
|
||||
}
|
||||
.linkli li, .linkli li:hover {
|
||||
background: url(../../images/link.png) no-repeat 3px 8px;
|
||||
|
||||
.menu a, .menu a:hover {
|
||||
font-family: Arial, Verdana, sans-serif, Helvetica;
|
||||
color: #000000;
|
||||
display:block; /* This makes it so that the whole li is clickable */
|
||||
text-decoration:none;
|
||||
}
|
||||
#link a:hover, .linkli li:hover {
|
||||
background-color: #cde0ad;
|
||||
|
||||
|
||||
/* This is for the dropout menu */
|
||||
.menu.int ul {
|
||||
height: 26px;
|
||||
}
|
||||
#link {
|
||||
border-bottom: 0px;
|
||||
/* a selected ul has a height set in the style tag */
|
||||
.menu.int ul.selected {
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
/* Force the hovered ul to be 28px unless the ul is selected */
|
||||
.menu.int ul:hover {
|
||||
height: 26px;
|
||||
}
|
||||
.menu.int ul:hover.selected {
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.menu.int ul.selected > .submenu {
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.submenu {
|
||||
background:transparent url(../../images/arrow.png) no-repeat scroll 28px 4px;
|
||||
}
|
||||
.submenu a {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
/* Make invisible submenus invisible and take the text in */
|
||||
.submenu.invisible {
|
||||
display:none;
|
||||
position:relative;
|
||||
top:-25px;
|
||||
left:155px;
|
||||
width:130px;
|
||||
z-index:1;
|
||||
background: #E9F3D2 url(../../images/arrow.png) no-repeat scroll 6px 4px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
/* But override on hover */
|
||||
.menu.int ul:hover > .submenu.invisible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* This is for ext links */
|
||||
.menu.links ul:hover {
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.menu.links li {
|
||||
background: #E9F3D2 url('../../images/link.png') no-repeat scroll 5px 8px;
|
||||
}
|
||||
|
||||
/* Icons specified here */
|
||||
#oper-agents {
|
||||
background:transparent url(../../images/bricks.png) no-repeat 4px 3px;
|
||||
}
|
||||
#oper-servers {
|
||||
background:transparent url(../../images/server_database.png) no-repeat 4px 3px;
|
||||
}
|
||||
#oper-incidents {
|
||||
background:transparent url(../../images/book_edit.png) no-repeat 4px 3px;
|
||||
}
|
||||
#oper-events {
|
||||
background:transparent url(../../images/lightning_go.png) no-repeat 4px 3px;
|
||||
}
|
||||
/* users */
|
||||
#oper-users {
|
||||
background:transparent url(../../images/group.png) no-repeat 4px 3px;
|
||||
}
|
||||
/* trap console */
|
||||
#oper-snmpc, #god-snmpc {
|
||||
background:transparent url(../../images/computer_error.png) no-repeat 4px 3px;
|
||||
}
|
||||
#oper-messages {
|
||||
background:transparent url(../../images/email.png) no-repeat 4px 3px;
|
||||
}
|
||||
#oper-reporting {
|
||||
background:transparent url(../../images/reporting.png) no-repeat 4px 3px;
|
||||
}
|
||||
#oper-visualc {
|
||||
background:transparent url(../../images/monitor.png) no-repeat 4px 3px;
|
||||
}
|
||||
#oper-extensions, #god-extensions {
|
||||
background:transparent url(../../images/extensions.png) no-repeat 4px 3px;
|
||||
}
|
||||
|
||||
/* Godmode images */
|
||||
#god-agents {
|
||||
background: url(../../images/god1.png) no-repeat 4px 3px;
|
||||
}
|
||||
#god-modules {
|
||||
background: url(../../images/brick.png) no-repeat 4px 3px;
|
||||
}
|
||||
#god-alerts {
|
||||
background: url(../../images/god2.png) no-repeat 4px 3px;
|
||||
}
|
||||
#god-dbmaint {
|
||||
background: url(../../images/god8.png) no-repeat 4px 3px;
|
||||
}
|
||||
#god-users {
|
||||
background: url(../../images/god3.png) no-repeat 4px 3px;
|
||||
}
|
||||
#god-reporting {
|
||||
background: url(../../images/reporting_edit.png) no-repeat 4px 3px;
|
||||
}
|
||||
#god-profiles {
|
||||
background: url(../../images/god4.png) no-repeat 4px 3px;
|
||||
}
|
||||
#god-servers {
|
||||
background: url(../../images/god5.png) no-repeat 4px 3px;
|
||||
}
|
||||
#god-audit {
|
||||
background: url(../../images/god6.png) no-repeat 4px 3px;
|
||||
}
|
||||
#god-setup {
|
||||
background: url(../../images/god7.png) no-repeat 4px 3px;
|
||||
|
||||
}
|
||||
|
||||
.mainmenu.selected, .submenu.selected, .menu li:hover,
|
||||
#oper-agents.selected, #oper-servers.selected, #oper-incidents.selected, #oper-events.selected, #oper-users.selected, #oper-snmpc.selected, #oper-messages.selected, #oper-reporting.selected, #oper-visualc.selected, #oper-extensions.selected,
|
||||
#oper-agents:hover, #oper-servers:hover, #oper-incidents:hover, #oper-events:hover, #oper-users:hover, #oper-snmpc:hover, #oper-messages:hover, #oper-reporting:hover, #oper-visualc:hover, #oper-extensions:hover,
|
||||
#god-agents:hover, #god-modules:hover, #god-alerts:hover, #god-dbmaint:hover, #god-users:hover, #god-reporting:hover, #god-profiles:hover, #god-servers:hover, #god-audit:hover, #god-setup:hover, #god-snmpc:hover, #god-extensions:hover,
|
||||
#god-agents.selected, #god-modules.selected, #god-alerts.selected, #god-dbmaint.selected, #god-users.selected, #god-reporting.selected, #god-profiles.selected, #god-servers.selected, #god-audit.selected, #god-setup.selected, #god-snmpc.selected, #god-extensions.selected
|
||||
{
|
||||
background-color: #EFEFBD;
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
#menu-operation {
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
#menu-operation a {
|
||||
display: block;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#menu-operation li {
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #d4d4d4;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.menu-operation {
|
||||
background-color: #e6e9cd;
|
||||
}
|
||||
|
||||
.operation-menu li {
|
||||
padding: 0px 0px 0px 28px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #d4d4d4;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.operation-menu ul {
|
||||
width: 128px;
|
||||
}
|
||||
#op1 li {
|
||||
background: url(../../images/bricks.png) no-repeat 4px 3px;
|
||||
}
|
||||
#op2 li {
|
||||
background: url(../../images/server_database.png) no-repeat 4px 3px;
|
||||
}
|
||||
#op3 li {
|
||||
background: url(../../images/book_edit.png) no-repeat 4px 3px;
|
||||
}
|
||||
#op4 li {
|
||||
background: url(../../images/lightning_go.png) no-repeat 4px 3px;
|
||||
}
|
||||
/* users */
|
||||
#op5 li {
|
||||
background: url(../../images/group.png) no-repeat 4px 4px;
|
||||
}
|
||||
#op6 li {
|
||||
background: url(../../images/computer_error.png) no-repeat 4px 4px;
|
||||
}
|
||||
/* trap console */
|
||||
#op7 li {
|
||||
background: url(../../images/email.png) no-repeat 4px 4px;
|
||||
}
|
||||
#op8 li {
|
||||
background: url(../../images/reporting.png) no-repeat 4px 4px;
|
||||
}
|
||||
#op9 li {
|
||||
background: url(../../images/monitor.png) no-repeat 4px 3px;
|
||||
}
|
||||
#op10 li {
|
||||
background: url(../../images/page_white_text.png) no-repeat 4px 3px;
|
||||
}
|
||||
#op-extensions li {
|
||||
background: url(../../images/extensions.png) no-repeat 4px 3px;
|
||||
}
|
||||
|
||||
.operation-submenu>ul {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.operation-submenu li {
|
||||
background: url(../../images/arrow.png) no-repeat 2px 4px;
|
||||
margin-left: 26px;
|
||||
padding: 0px 0px 0px 13px;
|
||||
}
|
||||
|
||||
.menu-selected, #menu-operation li:hover, .submenu-selected li, .operation-submenu li:hover {
|
||||
background-color: #d4ddc6 !important;
|
||||
}
|
||||
|
||||
#menu-operation li.bb0, #arrowls li.bb0, #op-extensions li.bb0 {
|
||||
border-bottom: 0px;
|
||||
}
|
|
@ -20,8 +20,6 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
@import url(op.css);
|
||||
@import url(god.css);
|
||||
@import url(link.css);
|
||||
@import url(tip.css);
|
||||
* {
|
||||
|
@ -48,7 +46,7 @@ input {
|
|||
}
|
||||
input.button {
|
||||
margin: 0;
|
||||
font: bold, Arial, Sans-serif;
|
||||
font-family: Arial,Sans-serif;
|
||||
border: 1px solid #ccc;
|
||||
background: #fff;
|
||||
padding: 2px 3px;
|
||||
|
@ -63,7 +61,9 @@ checkbox {
|
|||
border:1px solid #eee;
|
||||
}
|
||||
h1, h2, h3, h4 {
|
||||
font: bold 1em Arial, Sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
font-family: Arial, Sans-serif;
|
||||
text-transform: uppercase;
|
||||
color: #786;
|
||||
padding-bottom: 4px;
|
||||
|
@ -198,9 +198,6 @@ div#menu {
|
|||
width: 155px;
|
||||
float: left;
|
||||
}
|
||||
div#page>div#menu {
|
||||
width: 157px;
|
||||
}
|
||||
div#head {
|
||||
font-size: 8pt;
|
||||
width: 960px;
|
||||
|
@ -210,7 +207,7 @@ div#head {
|
|||
}
|
||||
div#foot {
|
||||
font-size: 7pt;
|
||||
margin-top: solid 2px #000;
|
||||
border-top: solid 2px #000;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
text-align: center;
|
||||
|
@ -334,7 +331,7 @@ td.datos_id {
|
|||
font-style: italic;
|
||||
}
|
||||
.tit {
|
||||
padding-top: 3px;
|
||||
padding: 3px 1px;
|
||||
}
|
||||
.tit, .titb {
|
||||
font-weight: bold;
|
||||
|
@ -432,7 +429,7 @@ div.title_line {
|
|||
background: #D84437;
|
||||
width: 805px;
|
||||
min-height: 22px;
|
||||
padding-left: 0x;
|
||||
padding-left: 0px;
|
||||
margin-left: -25px;
|
||||
float:left;
|
||||
border-bottom: 1px solid #778866;
|
||||
|
@ -441,7 +438,7 @@ div.title_line {
|
|||
background: #66AA44;
|
||||
width: 805px;
|
||||
min-height: 22px;
|
||||
padding-left: 0x;
|
||||
padding-left: 0px;
|
||||
margin-left: -25px;
|
||||
float:left;
|
||||
border-bottom: 1px solid #778866;
|
||||
|
@ -478,7 +475,7 @@ div.title_line {
|
|||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
#menu_tab li.nomn:hover a, li.nomn:hover_high a
|
||||
#menu_tab li.nomn:hover a,
|
||||
#menu_tab li:hover ul a:hover {
|
||||
background: #799E48;
|
||||
color: #fff;
|
||||
|
@ -710,6 +707,7 @@ div#main_pure {
|
|||
.img_help {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
#loading {
|
||||
position:fixed;
|
||||
width: 200px;
|
||||
|
|
|
@ -263,7 +263,7 @@ if ($page != "") {
|
|||
|
||||
if ($config["pure"] == 0) {
|
||||
echo '</div>'; // main
|
||||
echo '<div style="clear:both"></div>';
|
||||
echo '<div style="clear:both"> </div>';
|
||||
echo '</div>'; // page (id = page)
|
||||
} else {
|
||||
echo "</div>"; // main_pure
|
||||
|
|
|
@ -21,302 +21,195 @@ if (! isset ($config['id_user'])) {
|
|||
}
|
||||
|
||||
enterprise_include ('operation/menu.php');
|
||||
?>
|
||||
|
||||
<div class="tit bg">:: <?php echo __('Operation'); ?> ::</div>
|
||||
<div class="menu-operation" id="menu-operation">
|
||||
<?php
|
||||
$sec = get_parameter ('sec');
|
||||
$sec2 = get_parameter ('sec2');
|
||||
|
||||
// Agent read, Server read
|
||||
if (give_acl ($config['id_user'], 0, "AR")) {
|
||||
if ($sec2 == "operation/agentes/tactical") {
|
||||
$selected = ' menu-selected';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
echo '<div id="op1" class="operation-menu'.$selected.'">';
|
||||
echo '<ul class="mn"><li><a href="index.php?sec=estado&sec2=operation/agentes/tactical&refr=60" class="mn">'.__('View agents').'</a></li></ul></div>';
|
||||
|
||||
if ($sec == "estado") {
|
||||
if ($sec2 == "operation/agentes/tactical") {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=estado&sec2=operation/agentes/tactical&refr=60' class='mn'>".__('Tactical view')."</a></li></ul></div>";
|
||||
|
||||
if ($sec2 == "operation/agentes/estado_grupo") {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=estado&sec2=operation/agentes/estado_grupo&refr=60' class='mn'>".__('Group view')."</a></li></ul></div>";
|
||||
|
||||
if ($sec2 == "operation/agentes/networkmap") {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=estado&sec2=operation/agentes/networkmap' class='mn'>".__('Network Map')."</a></li></ul></div>";
|
||||
//View agents
|
||||
$menu["estado"]["text"] = __('View agents');
|
||||
$menu["estado"]["sec2"] = "operation/agentes/tactical";
|
||||
$menu["estado"]["refr"] = 60;
|
||||
$menu["estado"]["id"] = "oper-agents";
|
||||
|
||||
if (($sec2 == "operation/agentes/estado_agente" || $sec2 == "operation/agentes/ver_agente" || $sec2 == "operation/agentes/datos_agente")) {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60' class='mn'>".__('Agent detail')."</a></li></ul></div>";
|
||||
|
||||
if ($sec2 == "operation/agentes/estado_alertas"){
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=estado&sec2=operation/agentes/estado_alertas&refr=60' class='mn'>".__('Alert detail')."</a></li></ul></div>";
|
||||
|
||||
if ($sec2 == "operation/agentes/status_monitor") {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60' class='mn'>".__('Monitor detail')."</a></li></ul></div>";
|
||||
|
||||
if ($sec2 == "operation/agentes/exportdata") {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=estado&sec2=operation/agentes/exportdata' class='mn'>".__('Export data')."</a></li></ul></div>";
|
||||
$sub = array ();
|
||||
$sub["operation/agentes/tactical"]["text"] = __('Tactical view');
|
||||
$sub["operation/agentes/tactical"]["refr"] = 60;
|
||||
|
||||
$sub["operation/agentes/estado_grupo"]["text"] = __('Group view');
|
||||
$sub["operation/agentes/estado_grupo"]["refr"] = 60;
|
||||
|
||||
$sub["operation/agentes/networkmap"]["text"] = __('Network Map');
|
||||
$sub["operation/agentes/networkmap"]["refr"] = 0;
|
||||
|
||||
$sub["operation/agentes/estado_agente"]["text"] = __('Agent detail');
|
||||
$sub["operation/agentes/estado_agente"]["refr"] = 60;
|
||||
|
||||
$sub["operation/agentes/estado_alertas"]["text"] = __('Alert detail');
|
||||
$sub["operation/agentes/estado_alertas"]["refr"] = 60;
|
||||
|
||||
$sub["operation/agentes/status_monitor"]["text"] = __('Monitor detail');
|
||||
$sub["operation/agentes/status_monitor"]["refr"] = 60;
|
||||
|
||||
$sub["operation/agentes/exportdata"]["text"] = __('Export data');
|
||||
$sub["operation/agentes/exportdata"]["refr"] = 60;
|
||||
|
||||
$menu["estado"]["sub"] = $sub;
|
||||
//End of view agents
|
||||
|
||||
//Visual console
|
||||
$menu["visualc"]["text"] = __('Visual console');
|
||||
$menu["visualc"]["sec2"] = "operation/visual_console/index";
|
||||
$menu["visualc"]["refr"] = 60;
|
||||
$menu["visualc"]["id"] = "oper-visualc";
|
||||
|
||||
$sub = array ();
|
||||
|
||||
$layouts = get_db_all_rows_in_table ('tlayout', 'name');
|
||||
if ($layouts === false) {
|
||||
$layouts = array ();
|
||||
}
|
||||
|
||||
// Visual console
|
||||
if ( $sec2 == "operation/visual_console/index") {
|
||||
$selected = ' menu-selected';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
echo '<div id="op9" class="operation-menu'.$selected.'">';
|
||||
echo '<ul class="mn"><li>';
|
||||
echo '<a href="index.php?sec=visualc&sec2=operation/visual_console/index" class="mn">'.__('Visual console').'</a></li></ul></div>';
|
||||
|
||||
if ($sec == "visualc") {
|
||||
$layouts = get_db_all_rows_in_table ('tlayout', 'name');
|
||||
if ($layouts === false)
|
||||
$layouts = array ();
|
||||
$id = get_parameter ('id');
|
||||
foreach ($layouts as $layout) {
|
||||
if (! give_acl ($config["id_user"], $layout["id_group"], "AR")) {
|
||||
continue;
|
||||
}
|
||||
if ($sec2 == "operation/visual_console/render_view" && $id == $layout["id"]) {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=visualc&sec2=operation/visual_console/render_view&id=".$layout["id"]."' class='mn'>". substr ($layout["name"], 0, 15). "</a></li></ul></div>";
|
||||
$id = (int) get_parameter ('id', -1);
|
||||
|
||||
foreach ($layouts as $layout) {
|
||||
if (! give_acl ($config["id_user"], $layout["id_group"], "AR")) {
|
||||
continue;
|
||||
}
|
||||
$sub["operation/visual_console/render_view&id=".$layout["id"]]["text"] = mb_substr ($layout["name"], 0, 15);
|
||||
$sub["operation/visual_console/render_view&id=".$layout["id"]]["refr"] = 0;
|
||||
}
|
||||
|
||||
enterprise_hook ('inventory_menu');
|
||||
|
||||
|
||||
$menu["visualc"]["sub"] = $sub;
|
||||
//End of visual console
|
||||
|
||||
// Server view
|
||||
if ( $sec == "estado_server") {
|
||||
$selected = ' menu-selected';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
echo '<div id="op2" class="operation-menu'.$selected.'">';
|
||||
echo '<ul class="mn"><li>';
|
||||
echo '<a href="index.php?sec=estado_server&sec2=operation/servers/view_server&refr=60" class="mn">'.__('Pandora servers').'</a></li></ul></div>';
|
||||
$menu["estado_server"]["text"] = __('Pandora servers');
|
||||
$menu["estado_server"]["sec2"] = "operation/servers/view_server";
|
||||
$menu["estado_server"]["refr"] = 60;
|
||||
$menu["estado_server"]["id"] = "oper-servers";
|
||||
//End of server view
|
||||
}
|
||||
|
||||
enterprise_hook ('inventory_menu');
|
||||
|
||||
// Check access for incident
|
||||
//Incidents
|
||||
if (give_acl ($config['id_user'], 0, "IR") == 1) {
|
||||
if (($sec2 == "operation/incidents/incident" || $sec2 == "operation/incidents/incident_detail"|| $sec2 == "operation/incidents/incident_note")) {
|
||||
$selected = ' menu-selected';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
echo '<div id="op3" class="operation-menu'.$selected.'">';
|
||||
echo '<ul class="mn"><li><a href="index.php?sec=incidencias&sec2=operation/incidents/incident" class="mn">'.__('Manage incidents').'</a></li></ul></div>';
|
||||
|
||||
if ($sec == "incidencias"){
|
||||
if($sec2 == "operation/incidents/incident_search") {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=incidencias&sec2=operation/incidents/incident_search' class='mn'>".__('Search incident')."</a></li></ul></div>";
|
||||
|
||||
if ($sec2 == "operation/incidents/incident_statistics") {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=incidencias&sec2=operation/incidents/incident_statistics' class='mn'>".__('Statistics')."</a></li></ul></div>";
|
||||
}
|
||||
$menu["incidencias"]["text"] = __('Manage incidents');
|
||||
$menu["incidencias"]["sec2"] = "operation/incidents/incident";
|
||||
$menu["incidencias"]["refr"] = 60;
|
||||
$menu["incidencias"]["id"] = "oper-incidents";
|
||||
|
||||
$sub = array ();
|
||||
$sub["operation/incidents/incident_search"]["text"] = __('Search incidents');
|
||||
$sub["operation/incidents/incident_search"]["refr"] = 0;
|
||||
|
||||
$sub["operation/incidents/incident_statistics"]["text"] = __('Statistics');
|
||||
$sub["operation/incidents/incident_statistics"]["refr"] = 0;
|
||||
|
||||
$menu["incidencias"]["sub"] = $sub;
|
||||
}
|
||||
|
||||
|
||||
// Rest of options, all with AR privilege
|
||||
// Rest of options, all with AR privilege (or should events be with incidents?)
|
||||
if (give_acl ($config['id_user'], 0, "AR")) {
|
||||
// Events
|
||||
if($sec2 == "operation/events/events") {
|
||||
$selected = ' menu-selected';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
echo '<div id="op4" class="operation-menu'.$selected.'">';
|
||||
echo '<ul class="mn"><li><a href="index.php?sec=eventos&sec2=operation/events/events" class="mn">'.__('View events').'</a></li></ul></div>';
|
||||
// Event statistics submenu
|
||||
if ($sec == "eventos") {
|
||||
if($sec2 == "operation/events/event_statistics") {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=eventos&sec2=operation/events/event_statistics' class='mn'>".__('Statistics')."</a></li></ul></div>";
|
||||
|
||||
// Event RSS
|
||||
echo "<div class='operation-submenu'>";
|
||||
echo "<ul class='mn'><li>";
|
||||
echo "<a target='_top' href='operation/events/events_rss.php' class='mn'><img src='images/rss.png' /> ".__('RSS');
|
||||
echo "</a></li></ul></div>";
|
||||
|
||||
// Event CSV
|
||||
echo "<div class='operation-submenu'>";
|
||||
echo "<ul class='mn'><li>";
|
||||
echo "<a target='_top' href='operation/events/export_csv.php' class='mn'>".__('CSV File')."</a></li></ul></div>";
|
||||
|
||||
// Event Marquee
|
||||
echo "<div class='operation-submenu'>";
|
||||
echo "<ul class='mn'><li>";
|
||||
echo "<a target='_top' href='operation/events/events_marquee.php' class='mn'>".__('Marquee')."</a></li></ul></div>";
|
||||
}
|
||||
$menu["eventos"]["text"] = __('View events');
|
||||
$menu["eventos"]["refr"] = 60;
|
||||
$menu["eventos"]["sec2"] = "operation/events/events";
|
||||
$menu["eventos"]["id"] = "oper-events";
|
||||
|
||||
$sub = array ();
|
||||
$sub["operation/events/event_statistics"]["text"] = __('Statistics');
|
||||
$sub["operation/events/event_statistics"]["refr"] = 0;
|
||||
|
||||
//RSS
|
||||
$sub["operation/events/events_rss.php"]["text"] = __('RSS');
|
||||
$sub["operation/events/events_rss.php"]["refr"] = 0;
|
||||
$sub["operation/events/events_rss.php"]["type"] = "direct";
|
||||
|
||||
//CSV
|
||||
$sub["operation/events/export_csv.php"]["text"] = __('CSV File');
|
||||
$sub["operation/events/export_csv.php"]["refr"] = 0;
|
||||
$sub["operation/events/export_csv.php"]["type"] = "direct";
|
||||
|
||||
//Marquee
|
||||
$sub["operation/events/events_marquee.php"]["text"] = __('Marquee');
|
||||
$sub["operation/events/events_marquee.php"]["refr"] = 0;
|
||||
$sub["operation/events/events_marquee.php"]["type"] = "direct";
|
||||
|
||||
$menu["eventos"]["sub"] = $sub;
|
||||
|
||||
// Users
|
||||
if (($sec2 == "operation/users/user" || $sec2 == "operation/users/user_edit" )) {
|
||||
$selected = ' menu-selected';
|
||||
} else {
|
||||
$selected = '';
|
||||
$menu["usuarios"]["text"] = __('View users');
|
||||
$menu["usuarios"]["refr"] = 0;
|
||||
$menu["usuarios"]["sec2"] = "operation/users/user";
|
||||
$menu["usuarios"]["id"] = "oper-users";
|
||||
|
||||
$sub = array ();
|
||||
$sub["operation/users/user_edit"]["text"] = __('Edit my user');
|
||||
$sub["operation/users/user_edit"]["refr"] = 0;
|
||||
$sub["operation/users/user_edit"]["options"]["name"] = "ver";
|
||||
$sub["operation/users/user_edit"]["options"]["value"] = $config["id_user"];
|
||||
|
||||
if (give_acl ($config["id_user"], 0, "UM")) {
|
||||
$sub["operation/users/user_statistics"]["text"] = __('Statistics');
|
||||
$sub["operation/users/user_statistics"]["refr"] = 0;
|
||||
}
|
||||
echo '<div id="op5" class="operation-menu'.$selected.'">';
|
||||
echo '<ul class="mn"><li><a href="index.php?sec=usuarios&sec2=operation/users/user" class="mn">'.__('View users').'</a></li></ul></div>';
|
||||
|
||||
// User edit (submenu)
|
||||
if ($sec == "usuarios") {
|
||||
if (isset($_GET["ver"]) && $_GET["ver"] == $config['id_user']) {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=usuarios&sec2=operation/users/user_edit&ver=".$config['id_user']."' class='mn'>".__('Edit my user')."</a></li></ul></div>";
|
||||
|
||||
// User statistics require UM
|
||||
if (give_acl ($config['id_user'], 0, "UM")) {
|
||||
if($sec2 == "operation/users/user_statistics") {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=usuarios&sec2=operation/users/user_statistics' class='mn'>".__('Statistics')."</a></li></ul></div>";
|
||||
}
|
||||
}
|
||||
|
||||
// SNMP console
|
||||
if ($sec2 == "operation/snmpconsole/snmp_view") {
|
||||
$selected = ' menu-selected';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
echo '<div id="op6" class="operation-menu'.$selected.'">';
|
||||
echo '<ul class="mn"><li><a href="index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view" class="mn">'.__('SNMP console').'</a></li></ul></div>';
|
||||
|
||||
|
||||
$menu["usuarios"]["sub"] = $sub;
|
||||
//End of Users
|
||||
|
||||
//SNMP Console
|
||||
$menu["snmpconsole"]["text"] = __('SNMP console');
|
||||
$menu["snmpconsole"]["refr"] = 60;
|
||||
$menu["snmpconsole"]["sec2"] = "operation/snmpconsole/snmp_view";
|
||||
$menu["snmpconsole"]["id"] = "oper-snmpc";
|
||||
|
||||
// Messages
|
||||
if($sec2 == "operation/messages/message" && !isset ($_GET["nuevo_g"])) {
|
||||
$selected = ' menu-selected';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
echo '<div id="op7" class="operation-menu'.$selected.'">';
|
||||
echo '<ul class="mn"><li><a href="index.php?sec=messages&sec2=operation/messages/message" class="mn">'. __('Messages').'</a></li></ul></div>';
|
||||
|
||||
// New message (submenu)
|
||||
if ($sec == "messages") {
|
||||
if (isset ($_GET["nuevo_g"])) {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li><a href='index.php?sec=messages&sec2=operation/messages/message&nuevo_g' class='mn'>".__('Messages to groups')."</a></li></ul></div>";
|
||||
}
|
||||
|
||||
$menu["messages"]["text"] = __('Messages');
|
||||
$menu["messages"]["refr"] = 60;
|
||||
$menu["messages"]["sec2"] = "operation/messages/message";
|
||||
$menu["messages"]["id"] = "oper-messages";
|
||||
|
||||
$sub = array ();
|
||||
$sub["operation/messages/message"]["text"] = __('Messages to groups');
|
||||
$sub["operation/messages/message"]["refr"] = 0;
|
||||
$sub["operation/messages/message"]["options"]["name"] = "nuevo_g";
|
||||
$sub["operation/messages/message"]["options"]["value"] = 1;
|
||||
|
||||
$menu["messages"]["sub"] = $sub;
|
||||
|
||||
// Reporting
|
||||
if ($sec2 == "operation/reporting/reporting") {
|
||||
$selected = ' menu-selected';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
echo '<div id="op8" class="operation-menu'.$selected.'">';
|
||||
echo '<ul class="mn"><li>';
|
||||
echo '<a href="index.php?sec=reporting&sec2=operation/reporting/custom_reporting" class="mn">'.
|
||||
__('Reporting').'</a></li></ul></div>';
|
||||
|
||||
// Custom reporting
|
||||
if ($sec == "reporting") {
|
||||
if ($sec2 == "operation/reporting/custom_reporting"
|
||||
|| $sec2 == "operation/reporting/reporting_viewer") {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li>
|
||||
<a href='index.php?sec=reporting&sec2=operation/reporting/custom_reporting' class='mn'>".__('Custom reporting')."</a></li></ul></div>";
|
||||
}
|
||||
|
||||
// Custom graph viewer
|
||||
if ($sec == "reporting") {
|
||||
if ($sec2 == "operation/reporting/graph_viewer") {
|
||||
echo "<div class='operation-submenu submenu-selected'>";
|
||||
} else {
|
||||
echo "<div class='operation-submenu'>";
|
||||
}
|
||||
echo "<ul class='mn'><li>
|
||||
<a href='index.php?sec=reporting&sec2=operation/reporting/graph_viewer' class='mn'>".__('Custom graphs')."</a></li></ul></div>";
|
||||
}
|
||||
$menu["reporting"]["text"] = __('Reporting');
|
||||
$menu["reporting"]["refr"] = 0;
|
||||
$menu["reporting"]["sec2"] = "operation/reporting/custom_reporting";
|
||||
$menu["reporting"]["id"] = "oper-reporting";
|
||||
|
||||
$sub = array ();
|
||||
$sub["operation/reporting/custom_reporting"]["text"] = __('Custom reporting');
|
||||
$sub["operation/reporting/custom_reporting"]["refr"] = 0;
|
||||
|
||||
$sub["operation/reporting/graph_viewer"]["text"] = __('Custom graphs');
|
||||
$sub["operation/reporting/graph_viewer"]["refr"] = 0;
|
||||
|
||||
$menu["reporting"]["sub"] = $sub;
|
||||
|
||||
// Extensions menu additions
|
||||
if (is_array ($config['extensions'])) {
|
||||
if ($sec == "extensions") {
|
||||
$selected = ' menu-selected';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
echo '<div id="op-extensions" class="operation-menu'.$selected.'">';
|
||||
echo '<ul class="mn"><li class="bb0">
|
||||
<a href="index.php?sec=extensions&sec2=operation/extensions" class="mn">';
|
||||
echo __('Extensions');
|
||||
echo '</a></li></ul>';
|
||||
echo "</div>";
|
||||
if ($selected != '') {
|
||||
foreach ($config['extensions'] as $extension) {
|
||||
if ($extension['operation_menu'] == '')
|
||||
continue;
|
||||
$menu = $extension['operation_menu'];
|
||||
if ($sec2 == $menu['sec2']) {
|
||||
echo '<div class="operation-submenu submenu-selected">';
|
||||
} else {
|
||||
echo '<div class="operation-submenu">';
|
||||
}
|
||||
echo '<ul class="mn"><li>';
|
||||
echo '<a href="index.php?sec=extensions&sec2='.$menu['sec2'].'" class="mn">'.$menu['name'];
|
||||
echo '</a></li></ul></div>';
|
||||
$menu["extensions"]["text"] = __('Extensions');
|
||||
$menu["extensions"]["refr"] = 0;
|
||||
$menu["extensions"]["sec2"] = "operation/extensions";
|
||||
$menu["extensions"]["id"] = "oper-extensions";
|
||||
|
||||
$sub = array ();
|
||||
foreach ($config["extensions"] as $extension) {
|
||||
if ($extension["operation_menu"] == '') {
|
||||
continue;
|
||||
}
|
||||
$extension_menu = $extension["operation_menu"];
|
||||
$sub[$extension_menu["sec2"]]["text"] = $extension_menu["name"];
|
||||
$sub[$extension_menu["sec2"]]["refr"] = 0;
|
||||
}
|
||||
|
||||
$menu["extensions"]["sub"] = $sub;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
?>
|
Loading…
Reference in New Issue