2006-03-27 05:37:27 +02:00
|
|
|
<?php
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2009-06-08 20:26:14 +02:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
2011-03-17 Raul Mateos <raulofpandora@gmail.com>
* extensions/dbmanager.php, extensions/pandora_logs.php, general/*.php,
index.php, ajax.php, operation/search_*.php, operation/menu.php,
operation/extensions.php, godmode/menu.php, godmode/extensions.php,
admin_access_logs.php: Cleaned code and updated page disclaimers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4108 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-17 23:01:01 +01:00
|
|
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2007-03-02 18:56:07 +01:00
|
|
|
// This program is free software; you can redistribute it and/or
|
2011-03-23 Raul Mateos <raulofpandora@gmail.com>
* extensions/ssh_console.php, extensions/vnc_view.php,
extensions/update_manager.php, extensions/users_connected.php,
extensions/extension_uploader.php, extensions/insert_data.php,
extensions/module_groups.php, extensions/plugin_registration.php,
extensions/agent_modules.php, extensions/resource_registration.php,
extensions/resource_exportation.php, extensions/dbmanager.php,
extensions/pandora_logs.php, general/*.php, ajax.php,
operation/search_*.php, operation/menu.php, operation/extensions.php,
godmode/menu.php, godmode/extensions.php, godmode/admin_access_logs.php:
CReverted unwanted license changes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4126 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-23 17:13:28 +01:00
|
|
|
// modify it under the terms of the GNU General Public License
|
2011-03-17 Raul Mateos <raulofpandora@gmail.com>
* extensions/dbmanager.php, extensions/pandora_logs.php, general/*.php,
index.php, ajax.php, operation/search_*.php, operation/menu.php,
operation/extensions.php, godmode/menu.php, godmode/extensions.php,
admin_access_logs.php: Cleaned code and updated page disclaimers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4108 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-17 23:01:01 +01:00
|
|
|
// as published by the Free Software Foundation; version 2
|
|
|
|
|
2007-03-02 18:56:07 +01:00
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2011-03-17 Raul Mateos <raulofpandora@gmail.com>
* extensions/dbmanager.php, extensions/pandora_logs.php, general/*.php,
index.php, ajax.php, operation/search_*.php, operation/menu.php,
operation/extensions.php, godmode/menu.php, godmode/extensions.php,
admin_access_logs.php: Cleaned code and updated page disclaimers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4108 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-17 23:01:01 +01:00
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2007-03-02 18:56:07 +01:00
|
|
|
// GNU General Public License for more details.
|
2009-06-08 20:26:14 +02:00
|
|
|
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2008-12-19 22:45:20 +01:00
|
|
|
if (! isset ($config["id_user"])) {
|
2008-08-21 23:07:20 +02:00
|
|
|
require ("general/login_page.php");
|
2009-02-04 17:07:43 +01:00
|
|
|
exit ();
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
2008-12-19 22:45:20 +01:00
|
|
|
|
2014-05-21 12:44:36 +02:00
|
|
|
$autohidden_menu = 0;
|
|
|
|
|
|
|
|
if (isset ($config["autohidden_menu"]) && $config["autohidden_menu"]) {
|
|
|
|
$autohidden_menu = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($autohidden_menu) {
|
|
|
|
$menu_container_id = 'menu_container';
|
|
|
|
}
|
|
|
|
|
2013-02-20 14:48:46 +01:00
|
|
|
// Menu container prepared to autohide menu
|
2014-05-21 12:44:36 +02:00
|
|
|
echo '<div id="' . $menu_container_id . '">';
|
2013-02-20 14:48:46 +01:00
|
|
|
|
2013-04-10 09:57:54 +02:00
|
|
|
echo '<div class="tit bg titop">:: '.__('Operation').' ::</div>';
|
2008-12-19 22:45:20 +01:00
|
|
|
require ("operation/menu.php");
|
|
|
|
|
2012-02-03 12:01:12 +01:00
|
|
|
//Check all enterprise ACL used in godmenu items to print menu headers
|
|
|
|
if (check_acl ($config['id_user'], 0, "AW") ||
|
2012-07-10 11:21:19 +02:00
|
|
|
check_acl ($config['id_user'], 0, "PM") ||
|
|
|
|
check_acl ($config['id_user'], 0, "LM") ||
|
|
|
|
check_acl ($config['id_user'], 0, "UM") ||
|
|
|
|
check_acl ($config['id_user'], 0, "LW") ||
|
|
|
|
check_acl ($config['id_user'], 0, "IW") ||
|
2012-12-28 18:06:17 +01:00
|
|
|
check_acl ($config['id_user'], 0, "EW") ||
|
2012-07-10 11:21:19 +02:00
|
|
|
check_acl ($config['id_user'], 0, "DW")) {
|
|
|
|
|
|
|
|
echo '<div class="tit bg3">:: '.__('Administration').' ::</div>';
|
2012-02-03 12:01:12 +01:00
|
|
|
}
|
|
|
|
|
2008-08-21 23:07:20 +02:00
|
|
|
require ("godmode/menu.php");
|
2008-12-19 22:45:20 +01:00
|
|
|
|
2008-08-21 23:07:20 +02:00
|
|
|
require ("links_menu.php");
|
2009-02-10 21:29:45 +01:00
|
|
|
|
2013-02-20 14:48:46 +01:00
|
|
|
echo '</div>'; //menu_container
|
|
|
|
|
2011-04-13 18:11:02 +02:00
|
|
|
ui_require_jquery_file ('cookie');
|
2009-01-07 11:42:38 +01:00
|
|
|
?>
|
2009-02-09 22:00:13 +01:00
|
|
|
<script type="text/javascript" language="javascript">
|
2009-02-13 21:23:44 +01:00
|
|
|
/* <![CDATA[ */
|
2014-05-21 12:44:36 +02:00
|
|
|
|
|
|
|
var autohidden_menu = <?php echo $autohidden_menu; ?>;
|
|
|
|
|
2009-02-09 22:00:13 +01:00
|
|
|
$(document).ready( function() {
|
2009-02-11 17:55:04 +01:00
|
|
|
$("img.toggle").click (function () {
|
|
|
|
$(this).siblings ("ul").toggle ();
|
|
|
|
//In case the links gets activated, we don't want to follow link
|
|
|
|
return false;
|
2009-02-09 22:00:13 +01:00
|
|
|
});
|
2013-02-20 14:48:46 +01:00
|
|
|
|
|
|
|
$('#menu_container').hover (handlerIn, handlerOut);
|
|
|
|
var openTime = 0;
|
|
|
|
var handsIn = 0;
|
|
|
|
|
|
|
|
function handlerIn() {
|
|
|
|
handsIn = 1;
|
|
|
|
if(openTime == 0) {
|
2014-05-21 12:44:36 +02:00
|
|
|
show_menu();
|
2013-02-20 14:48:46 +01:00
|
|
|
openTime = new Date().getTime();
|
|
|
|
|
|
|
|
// Close in 1 second if is not closed manually
|
2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
* general/shortcut_bar.php, general/main_menu.php,
extensions/update_manager/update_pandora.php,
extensions/plugin_registration.php, godmode/setup/gis_step_2.php,
godmode/massive/massive_delete_alerts.php,
godmode/alerts/alert_actions.php, godmode/tag/edit_tag.php,
godmode/category/edit_category.php,
godmode/agentes/configurar_agente.php,
operation/snmpconsole/snmp_view.php,
operation/search_graphs.getdata.php,
operation/agentes/status_monitor.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8053 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-04-25 11:01:28 +02:00
|
|
|
setTimeout(function() {
|
2013-02-20 14:48:46 +01:00
|
|
|
if(openTime > 0 && handsIn == 0) {
|
2014-05-21 12:44:36 +02:00
|
|
|
hide_menu();
|
2013-02-20 14:48:46 +01:00
|
|
|
openTime = 0;
|
|
|
|
}
|
|
|
|
}, 1000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function handlerOut() {
|
|
|
|
handsIn = 0;
|
|
|
|
var openedTime = new Date().getTime() - openTime;
|
|
|
|
|
|
|
|
if(openedTime > 1000) {
|
2014-05-21 12:44:36 +02:00
|
|
|
hide_menu();
|
2013-02-20 14:48:46 +01:00
|
|
|
openTime = 0;
|
|
|
|
}
|
|
|
|
}
|
2014-05-21 12:44:36 +02:00
|
|
|
|
|
|
|
function show_menu () {
|
|
|
|
$('#menu_container').animate({"left": "+=140px"}, 200);
|
|
|
|
show_menu_pretty();
|
|
|
|
}
|
|
|
|
|
|
|
|
function show_menu_pretty() {
|
|
|
|
$('div.menu ul li').css('background-position', '');
|
|
|
|
$('ul.submenu li a, li.menu_icon a, li.links a').css('visibility', '');
|
|
|
|
$('.titop').css('color', 'white');
|
|
|
|
$('.bg3').css('color', 'white');
|
|
|
|
$('.bg4').css('color', 'white');
|
|
|
|
}
|
|
|
|
|
|
|
|
function hide_menu () {
|
|
|
|
$('#menu_container').animate({"left": "-=140px"}, 100);
|
|
|
|
hide_menu_pretty();
|
|
|
|
}
|
|
|
|
|
|
|
|
function hide_menu_pretty() {
|
|
|
|
$('div.menu li').css('background-position', '140px 3px');
|
|
|
|
$('ul.submenu li a, li.menu_icon a, li.links a').css('visibility', 'hidden');
|
|
|
|
$('.titop').css('color', $('.titop').css('background-color'));
|
|
|
|
$('.bg3').css('color', $('.bg3').css('background-color'));
|
|
|
|
$('.bg4').css('color', $('.bg4').css('background-color'));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (autohidden_menu) {
|
|
|
|
$('#main').css('margin-left', '40px');
|
|
|
|
hide_menu_pretty();
|
|
|
|
}
|
2009-02-09 22:00:13 +01:00
|
|
|
});
|
2009-02-13 21:23:44 +01:00
|
|
|
/* ]]> */
|
2013-04-10 09:57:54 +02:00
|
|
|
</script>
|