diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf
index bff05d8732..07054ee2e1 100644
--- a/pandora_agents/pc/AIX/pandora_agent.conf
+++ b/pandora_agents/pc/AIX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, AIX version
+# Version 7.0NG.732, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf
index 938691a2af..9d8a49bb99 100644
--- a/pandora_agents/pc/FreeBSD/pandora_agent.conf
+++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, FreeBSD Version
+# Version 7.0NG.732, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf
index d6f6d248c9..c02e4647e1 100644
--- a/pandora_agents/pc/HP-UX/pandora_agent.conf
+++ b/pandora_agents/pc/HP-UX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, HP-UX Version
+# Version 7.0NG.732, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf
index 0de221f790..153113e070 100644
--- a/pandora_agents/pc/Linux/pandora_agent.conf
+++ b/pandora_agents/pc/Linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, GNU/Linux
+# Version 7.0NG.732, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf
index cb90a522a3..6ddeba7edc 100644
--- a/pandora_agents/pc/NT4/pandora_agent.conf
+++ b/pandora_agents/pc/NT4/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, GNU/Linux
+# Version 7.0NG.732, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf
index 1758206b7b..502317f893 100644
--- a/pandora_agents/pc/SunOS/pandora_agent.conf
+++ b/pandora_agents/pc/SunOS/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, Solaris Version
+# Version 7.0NG.732, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf
index bc4a50047f..96b20ea7e3 100644
--- a/pandora_agents/pc/Win32/pandora_agent.conf
+++ b/pandora_agents/pc/Win32/pandora_agent.conf
@@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2010 Artica Soluciones Tecnologicas
-# Version 7.0NG.731
+# Version 7.0NG.732
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software
diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf
index 6ca5613d16..200ff9db97 100644
--- a/pandora_agents/shellscript/aix/pandora_agent.conf
+++ b/pandora_agents/shellscript/aix/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.731, AIX version
+# Version 7.0NG.732, AIX version
# General Parameters
# ==================
diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
index b55b3033f6..2002f4db65 100644
--- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
+++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.731
+# Version 7.0NG.732
# FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena
diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf
index 4a5a240381..f9c19dbd06 100644
--- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf
+++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.731, HPUX Version
+# Version 7.0NG.732, HPUX Version
# General Parameters
# ==================
diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf
index 8e2600567a..dc272a7a71 100644
--- a/pandora_agents/shellscript/linux/pandora_agent.conf
+++ b/pandora_agents/shellscript/linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731
+# Version 7.0NG.732
# Licensed under GPL license v2,
# (c) 2003-2010 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf
index 8dfed3e54d..5a466677d2 100644
--- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf
+++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731
+# Version 7.0NG.732
# Licensed under GPL license v2,
# (c) 2003-2009 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf
index ca04eca187..170188cc6f 100644
--- a/pandora_agents/shellscript/openWRT/pandora_agent.conf
+++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731
+# Version 7.0NG.732
# Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf
index 563805acdb..aad04ca60d 100644
--- a/pandora_agents/shellscript/solaris/pandora_agent.conf
+++ b/pandora_agents/shellscript/solaris/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.731, Solaris version
+# Version 7.0NG.732, Solaris version
# General Parameters
# ==================
diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf
index 9d787783ff..3ce7da3c7e 100644
--- a/pandora_agents/unix/AIX/pandora_agent.conf
+++ b/pandora_agents/unix/AIX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, AIX version
+# Version 7.0NG.732, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 015f306205..f90226b707 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.731-190227
+Version: 7.0NG.732-190307
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 4e132515b9..19e8634366 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.731-190227"
+pandora_version="7.0NG.732-190307"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf
index 2164faaedc..35202fcbe5 100644
--- a/pandora_agents/unix/Darwin/pandora_agent.conf
+++ b/pandora_agents/unix/Darwin/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, GNU/Linux
+# Version 7.0NG.732, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf
index 0c5a190f9b..c505d5f75e 100644
--- a/pandora_agents/unix/FreeBSD/pandora_agent.conf
+++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, FreeBSD Version
+# Version 7.0NG.732, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf
index f039431f7a..237bffb291 100644
--- a/pandora_agents/unix/HP-UX/pandora_agent.conf
+++ b/pandora_agents/unix/HP-UX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, HP-UX Version
+# Version 7.0NG.732, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf
index df03402446..5a65e0e095 100644
--- a/pandora_agents/unix/Linux/pandora_agent.conf
+++ b/pandora_agents/unix/Linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, GNU/Linux
+# Version 7.0NG.732, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf
index 12421565e8..1394067390 100644
--- a/pandora_agents/unix/NT4/pandora_agent.conf
+++ b/pandora_agents/unix/NT4/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, GNU/Linux
+# Version 7.0NG.732, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf
index 6dd394db7a..677615a47c 100644
--- a/pandora_agents/unix/NetBSD/pandora_agent.conf
+++ b/pandora_agents/unix/NetBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, NetBSD Version
+# Version 7.0NG.732, NetBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf
index 3d7294a56a..89d5b46100 100644
--- a/pandora_agents/unix/SunOS/pandora_agent.conf
+++ b/pandora_agents/unix/SunOS/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.731, Solaris Version
+# Version 7.0NG.732, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index 97b13365d3..dfc55dae4b 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -41,8 +41,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads
my $ThreadSem = undef;
-use constant AGENT_VERSION => '7.0NG.731';
-use constant AGENT_BUILD => '190227';
+use constant AGENT_VERSION => '7.0NG.732';
+use constant AGENT_BUILD => '190307';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index ce3173b9f3..3e212a7139 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
-%define version 7.0NG.731
-%define release 190227
+%define version 7.0NG.732
+%define release 190307
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index f5be518e22..8e7f60697d 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
-%define version 7.0NG.731
-%define release 190227
+%define version 7.0NG.732
+%define release 190307
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index e27ad14333..3ef65442bb 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -9,8 +9,8 @@
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
# **********************************************************************
-PI_VERSION="7.0NG.731"
-PI_BUILD="190227"
+PI_VERSION="7.0NG.732"
+PI_BUILD="190307"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf
index aab9a2f315..3d1e208de8 100644
--- a/pandora_agents/win32/bin/pandora_agent.conf
+++ b/pandora_agents/win32/bin/pandora_agent.conf
@@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2017 Artica Soluciones Tecnologicas
-# Version 7.0NG.731
+# Version 7.0NG.732
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 3d62982f64..303d32ebe3 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -3,7 +3,7 @@ AllowLanguageSelection
{Yes}
AppName
-{Pandora FMS Windows Agent v7.0NG.731}
+{Pandora FMS Windows Agent v7.0NG.732}
ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{190227}
+{190307}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 8ce589ce8a..1cf874d803 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.731(Build 190227)")
+#define PANDORA_VERSION ("7.0NG.732(Build 190307)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index f54a5ebd36..e30768134c 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
- VALUE "ProductVersion", "(7.0NG.731(Build 190227))"
+ VALUE "ProductVersion", "(7.0NG.732(Build 190307))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 8ece3fcc84..db5f4731d4 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.731-190227
+Version: 7.0NG.732-190307
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index ea4a0bd5a1..a6c6534ff2 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.731-190227"
+pandora_version="7.0NG.732-190307"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
index 2492a9913f..bb4e671cda 100644
--- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
+++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
@@ -1199,13 +1199,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
-INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 24);
+INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 25);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
-INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '731');
+INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '732');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
-- ---------------------------------------------------------------------
@@ -1900,14 +1900,16 @@ CREATE TABLE IF NOT EXISTS `tevent_extended` (
-- -----------------------------------------------------
-- Table `tgis_map_layer_groups`
-- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `tgis_map_layer_groups` (
- `layer_id` INT NOT NULL,
- `group_id` MEDIUMINT(4) UNSIGNED NOT NULL,
- `agent_id` INT(10) UNSIGNED NOT NULL COMMENT 'Used to link the position to the group',
- PRIMARY KEY (`layer_id`, `group_id`),
- FOREIGN KEY (`layer_id`) REFERENCES `tgis_map_layer` (`id_tmap_layer`) ON DELETE CASCADE,
- FOREIGN KEY (`group_id`) REFERENCES `tgrupo` (`id_grupo`) ON DELETE CASCADE,
- FOREIGN KEY (`agent_id`) REFERENCES `tagente` (`id_agente`) ON DELETE CASCADE
+CREATE TABLE `tgis_map_layer_groups` (
+ `layer_id` int(11) NOT NULL,
+ `group_id` mediumint(4) unsigned NOT NULL,
+ `agent_id` int(10) unsigned NOT NULL COMMENT 'Used to link the position to the group',
+ PRIMARY KEY (`layer_id`,`group_id`),
+ KEY `group_id` (`group_id`),
+ KEY `agent_id` (`agent_id`),
+ CONSTRAINT `tgis_map_layer_groups_ibfk_1` FOREIGN KEY (`layer_id`) REFERENCES `tgis_map_layer` (`id_tmap_layer`) ON DELETE CASCADE,
+ CONSTRAINT `tgis_map_layer_groups_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `tgrupo` (`id_grupo`) ON DELETE CASCADE,
+ CONSTRAINT `tgis_map_layer_groups_ibfk_3` FOREIGN KEY (`agent_id`) REFERENCES `tagente` (`id_agente`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- -----------------------------------------------------
diff --git a/pandora_console/general/footer.php b/pandora_console/general/footer.php
index a9a251d177..48d0613c98 100644
--- a/pandora_console/general/footer.php
+++ b/pandora_console/general/footer.php
@@ -1,16 +1,19 @@
';
+echo '';
require_once $config['homedir'].'/include/functions_update_manager.php';
@@ -40,9 +43,9 @@ if ($current_package == 0) {
echo sprintf(__('%s %s - Build %s - MR %s', get_product_name(), $pandora_version, $build_package_version, $config['MR']));
-echo '
';
-echo ''.__('Page generated at').' '.date($config['date_format']);
-echo '
® '.get_copyright_notice().'';
+echo ' ';
+echo ''.__('Page generated at').' '.date($config['date_format']);
+echo '
® '.get_copyright_notice().'';
if (isset($config['debug'])) {
$cache_info = [];
diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index e35d401502..cfbf070a6a 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -1,7 +1,7 @@
-
-
-
+
+ '.notifications_print_ball(
+ $notifications_numbers['notifications'],
+ $notifications_numbers['last_id']
+ ).' ';
+
+
+ // ======= Alerts ===============================================
+ $check_minor_release_available = false;
+ $pandora_management = check_acl($config['id_user'], 0, 'PM');
+
+ $check_minor_release_available = db_check_minor_relase_available();
+
+ if ($check_minor_release_available) {
+ if (users_is_admin($config['id_user'])) {
+ if ($config['language'] == 'es') {
+ set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. '.__('Sobre actualización de revisión menor').'', 'Revisión/es menor/es disponible/s');
} else {
- if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) {
- $custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
- }
-
- $logo_title = get_product_name().' Enterprise';
+ set_pandora_error_for_header('There are one or more minor releases waiting for update. '.__('About minor release update').'', 'minor release/s available');
}
-
- echo html_print_image(
- $custom_logo,
- true,
- [
- 'alt' => $logo_title,
- 'border' => '0',
- ]
- );
- ?>
-
- |
-
- id = 'header_table';
- $table->class = 'none';
- $table->cellpadding = 0;
- $table->cellspacing = 0;
- $table->head = [];
- $table->data = [];
- $table->style['clippy'] = $table->style[1] = $table->style[4] = $table->style[5] = $table->style[6] = $table->style[8] = $table->style[9] = $table->style['qr'] = $table->style['notifications'] = 'width: 22px; text-align:center; height: 22px; padding-right: 9px;padding-left: 9px;';
- $table->style[7] = 'width: 20px; padding-right: 9px;';
- $table->style['searchbar'] = 'width: 180px; min-width: 180px;';
- $table->style[11] = 'padding-left: 10px; padding-right: 5px;width: 16px;';
- $table->width = '100%';
- $table->styleTable = 'margin: auto; margin-top: 0px;';
- $table->rowclass[0] = '';
-
- $acl_head_search = true;
- if ($config['acl_enterprise'] == 1 && !users_is_admin()) {
- $acl_head_search = db_get_sql(
- "SELECT sec FROM tusuario
- INNER JOIN tusuario_perfil ON tusuario.id_user = tusuario_perfil.id_usuario
- INNER JOIN tprofile_view ON tprofile_view.id_profile = tusuario_perfil.id_perfil
- WHERE tusuario.id_user = '".$config['id_user']."' AND (sec = '*' OR sec = 'head_search')"
- );
}
+ }
- if ($acl_head_search) {
- $table->data[0][11] = ui_print_help_tip(__('Blank characters are used as AND conditions'), true);
- // Search bar
- $search_bar = '';
-
- $table->data[0]['searchbar'] = $search_bar;
}
- if ($config['show_qr_code_header'] == 0) {
- $show_qr_code_header = 'display: none;';
+ $search_bar .= 'data[0]['qr'] = '';
+ $search_bar .= 'onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');"
+ onkeyup="javascript: fieldKeyWordEmpty = false;"
+ style="margin-top:5px;" class="search_input" />';
- echo " ';
- ?>
-
- data[0]['clippy'] = ''.html_print_image(
- 'images/clippy_icon.png',
- true,
- [
- 'id' => 'clippy',
- 'class' => 'clippy',
- 'alt' => __('%s assistant', get_product_name()),
- 'title' => __(
- '%s assistant',
- get_product_name()
- ),
- ]
- ).'';
+ // $search_bar .= 'onClick="javascript: document.quicksearch.submit()"';
+ $search_bar .= "";
+ $search_bar .= '';
+
+ $header_searchbar = ' '.ui_print_help_tip(__('Blank characters are used as AND conditions'), true);
+ $header_searchbar .= $search_bar.' ';
+ }
+
+
+ // ======= Autorefresh code =============================
+ $autorefresh_txt = '';
+ $autorefresh_additional = '';
+
+ $ignored_params = [
+ 'agent_config' => false,
+ 'code' => false,
+ ];
+
+ if (!isset($_GET['sec2'])) {
+ $_GET['sec2'] = '';
+ }
+
+ if (!isset($_GET['refr'])) {
+ $_GET['refr'] = null;
+ }
+
+ $select = db_process_sql("SELECT autorefresh_white_list,time_autorefresh FROM tusuario WHERE id_user = '".$config['id_user']."'");
+ $autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
+
+ if ($autorefresh_list !== null && array_search($_GET['sec2'], $autorefresh_list) !== false) {
+ $do_refresh = true;
+ if ($_GET['sec2'] == 'operation/agentes/pandora_networkmap') {
+ if ((!isset($_GET['tab'])) || ($_GET['tab'] != 'view')) {
+ $do_refresh = false;
}
-
- // ======= Autorefresh code =============================
- $autorefresh_txt = '';
- $autorefresh_additional = '';
-
- $ignored_params = [
- 'agent_config' => false,
- 'code' => false,
- ];
-
- if (!isset($_GET['sec2'])) {
- $_GET['sec2'] = '';
- }
-
- if (!isset($_GET['refr'])) {
- $_GET['refr'] = null;
- }
-
- $select = db_process_sql("SELECT autorefresh_white_list,time_autorefresh FROM tusuario WHERE id_user = '".$config['id_user']."'");
- $autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
-
- if ($autorefresh_list !== null && array_search($_GET['sec2'], $autorefresh_list) !== false) {
- $do_refresh = true;
- if ($_GET['sec2'] == 'operation/agentes/pandora_networkmap') {
- if ((!isset($_GET['tab'])) || ($_GET['tab'] != 'view')) {
- $do_refresh = false;
- }
- }
-
- if ($do_refresh) {
- $autorefresh_img = html_print_image('images/header_refresh.png', true, ['class' => 'bot', 'alt' => 'lightning', 'title' => __('Configure autorefresh')]);
-
- if ($_GET['refr']) {
- $autorefresh_txt .= ' ('.date('i:s', $config['refr']).')';
- }
-
- $ignored_params['refr'] = '';
- $values = get_refresh_time_array();
- $autorefresh_additional = ' ';
- unset($values);
-
- $autorefresh_link_open_img = '';
-
- if ($_GET['refr']) {
- $autorefresh_link_open_txt = '';
- } else {
- $autorefresh_link_open_txt = '';
- }
-
- $autorefresh_link_close = '';
- } else {
- $autorefresh_img = html_print_image('images/header_refresh_disabled.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]);
-
- $ignored_params['refr'] = false;
-
- $autorefresh_link_open_img = '';
- $autorefresh_link_open_txt = '';
- $autorefresh_link_close = '';
- }
- } else {
- $autorefresh_img = html_print_image('images/header_refresh_disabled.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]);
-
- $ignored_params['refr'] = false;
-
- $autorefresh_link_open_img = '';
- $autorefresh_link_open_txt = '';
- $autorefresh_link_close = '';
- }
-
- $table->data[0][1] = $autorefresh_link_open_img.$autorefresh_img.$autorefresh_link_close;
- $table->data[0][2] = $autorefresh_link_open_txt.$autorefresh_txt.$autorefresh_link_close.$autorefresh_additional;
- // ======================================================
- $pandora_management = check_acl($config['id_user'], 0, 'PM');
-
- // Main help icon
- if (!$config['disable_help']) {
- $table->data[0][4] = ''.html_print_image(
- 'images/header_help.png',
- true,
- [
- 'title' => __('Main help'),
- 'id' => 'helpmodal',
- 'class' => 'modalpopup',
- ]
- ).'';
- }
-
- $notifications_numbers = notifications_get_counters();
- $table->data[0]['notifications'] = notifications_print_ball(
- $notifications_numbers['notifications'],
- $notifications_numbers['last_id']
- );
-
- // Logout
- $table->data[0][5] = '';
- $table->data[0][5] .= html_print_image('images/header_logout.png', true, ['alt' => __('Logout'), 'class' => 'bot', 'title' => __('Logout')]);
- $table->data[0][5] .= '';
-
- // User
- if (is_user_admin($config['id_user']) == 1) {
- $table->data[0][6] = html_print_image('images/header_user_admin.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
- } else {
- $table->data[0][6] = html_print_image('images/header_user.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
- }
-
- $table->data[0][6] = ''.$table->data[0][6].'';
-
- $table->data[0][7] = ' ('.$config['id_user'].')';
-
- // Chat messages
- $table->data[0][8] = " ';
-
- html_print_table($table);
-
- unset($table);
- ?>
- |
-
-
diff --git a/pandora_console/general/main_menu.php b/pandora_console/general/main_menu.php index 27aa2f69bd..cb5126b621 100644 --- a/pandora_console/general/main_menu.php +++ b/pandora_console/general/main_menu.php @@ -16,16 +16,80 @@ if (! isset($config['id_user'])) { exit(); } +?> + +'; +echo ' + + + + + \ No newline at end of file diff --git a/pandora_console/godmode/setup/performance.php b/pandora_console/godmode/setup/performance.php index 06e2b446f0..666dd0b21c 100644 --- a/pandora_console/godmode/setup/performance.php +++ b/pandora_console/godmode/setup/performance.php @@ -594,7 +594,7 @@ $table_other->data[3][1] = html_print_input_text( ); $table_other->data[5][0] = __('Use realtime statistics'); -$table_other->data[5][1] = html_print_checkbox_toogle_switch( +$table_other->data[5][1] = html_print_checkbox_switch( 'realtimestats', 1, $config['realtimestats'], @@ -616,7 +616,7 @@ $table_other->data[6][1] = html_print_input_text( ); $table_other->data[7][0] = __('Use agent access graph').ui_print_help_icon('agent_access', true); -$table_other->data[7][1] = html_print_checkbox_toogle_switch('agentaccess', 1, $config['agentaccess'], true); +$table_other->data[7][1] = html_print_checkbox_switch('agentaccess', 1, $config['agentaccess'], true); $table_other->data[8][0] = __('Max. recommended number of files in attachment directory'); $table_other->data[8][0] .= ui_print_help_tip( @@ -633,7 +633,7 @@ $table_other->data[8][1] = html_print_input_text( ); $table_other->data[9][0] = __('Delete not init modules'); -$table_other->data[9][1] = html_print_checkbox_toogle_switch('delete_notinit', 1, $config['delete_notinit'], true); +$table_other->data[9][1] = html_print_checkbox_switch('delete_notinit', 1, $config['delete_notinit'], true); $table_other->data[10][0] = __('Big Operation Step to purge old data'); $table_other->data[10][0] .= ui_print_help_tip( diff --git a/pandora_console/godmode/setup/setup_auth.php b/pandora_console/godmode/setup/setup_auth.php index 3ff5cb305b..e02ec79270 100644 --- a/pandora_console/godmode/setup/setup_auth.php +++ b/pandora_console/godmode/setup/setup_auth.php @@ -43,15 +43,15 @@ if (is_ajax()) { if ($type_auth != 'mysql') { // Fallback to local authentication $row = []; - $row['name'] = __('Fallback to local authentication').ui_print_help_tip(__('Enable this option if you want to fallback to local authentication when remote (ldap etc...) authentication failed.'), true); - $row['control'] = html_print_checkbox_toogle_switch('fallback_local_auth', 1, $config['fallback_local_auth'], true); + $row['name'] = __('Fallback to local authentication').ui_print_help_tip(__('Enable this option if you want to fallback to local authentication when remote (ldap etc...) authentication failed. Only available when \'Save password\' is enabled.'), true); + $row['control'] = html_print_checkbox_switch('fallback_local_auth', 1, $config['fallback_local_auth'], true); $table->data['fallback_local_auth'] = $row; if (enterprise_installed()) { // Autocreate remote users $row = []; $row['name'] = __('Autocreate remote users'); - $row['control'] = html_print_checkbox_toogle_switch_extended('autocreate_remote_users', 1, $config['autocreate_remote_users'], false, '', '', true).' '; + $row['control'] = html_print_checkbox_switch_extended('autocreate_remote_users', 1, $config['autocreate_remote_users'], false, '', '', true).' '; $table->data['autocreate_remote_users'] = $row; add_enterprise_auth_autocreate_profiles($table, $type_auth); @@ -89,7 +89,7 @@ if (is_ajax()) { // Start TLS $row = []; $row['name'] = __('Start TLS'); - $row['control'] = html_print_checkbox_toogle_switch('ldap_start_tls', 1, $config['ldap_start_tls'], true); + $row['control'] = html_print_checkbox_switch('ldap_start_tls', 1, $config['ldap_start_tls'], true); $table->data['ldap_start_tls'] = $row; // Base DN @@ -135,7 +135,7 @@ if (is_ajax()) { $row = []; $row['name'] = __('Double authentication').ui_print_help_tip(__('If this option is enabled, the users can use double authentication with their accounts'), true); $row['control'] = html_print_input_hidden('double_auth_enabled', 0); - $row['control'] .= html_print_checkbox_toogle_switch('double_auth_enabled', 1, $config['double_auth_enabled'], true); + $row['control'] .= html_print_checkbox_switch('double_auth_enabled', 1, $config['double_auth_enabled'], true); $table->data['double_auth_enabled'] = $row; // Session timeout diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index 9cac70c763..8f07d3d88d 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -82,17 +82,17 @@ $sources['sql'] = __('Database'); $table->data[9][1] = html_print_select($sources, 'timesource', $config['timesource'], '', '', '', true); $table->data[10][0] = __('Automatic check for updates'); -$table->data[10][1] = html_print_checkbox_toogle_switch('autoupdate', 1, $config['autoupdate'], true); +$table->data[10][1] = html_print_checkbox_switch('autoupdate', 1, $config['autoupdate'], true); echo " '; $table->data[11][0] = __('Enforce https'); -$table->data[11][1] = html_print_checkbox_toogle_switch_extended('https', 1, $config['https'], false, '', '', true); +$table->data[11][1] = html_print_checkbox_switch_extended('https', 1, $config['https'], false, '', '', true); $table->data[12][0] = __('Use cert of SSL'); -$table->data[12][1] = html_print_checkbox_toogle_switch_extended('use_cert', 1, $config['use_cert'], false, '', '', true); +$table->data[12][1] = html_print_checkbox_switch_extended('use_cert', 1, $config['use_cert'], false, '', '', true); $table->rowstyle[13] = 'display: none;'; $table->data[13][0] = __('Path of SSL Cert.').ui_print_help_tip(__('Path where you put your cert and name of this cert. Remember your cert only in .pem extension.'), true); @@ -114,7 +114,7 @@ $table->data[16][0] = __('API password').ui_print_help_tip(__('Please be careful $table->data[16][1] = html_print_input_password('api_password', io_output_password($config['api_password']), '', 25, 255, true); $table->data[17][0] = __('Enable GIS features'); -$table->data[17][1] = html_print_checkbox_toogle_switch('activate_gis', 1, $config['activate_gis'], true); +$table->data[17][1] = html_print_checkbox_switch('activate_gis', 1, $config['activate_gis'], true); $table->data[19][0] = __('Enable Netflow'); $rbt_disabled = false; @@ -123,7 +123,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { $table->data[19][0] .= ui_print_help_tip(__('Not supported in Windows systems'), true); } -$table->data[19][1] = html_print_checkbox_toogle_switch_extended('activate_netflow', 1, $config['activate_netflow'], $rbt_disabled, '', '', true); +$table->data[19][1] = html_print_checkbox_switch_extended('activate_netflow', 1, $config['activate_netflow'], $rbt_disabled, '', '', true); $zone_name = [ @@ -202,15 +202,15 @@ $table->data[28][1] = html_print_input_text('public_url', $config['public_url'], $table->data[29][0] = __('Referer security'); $table->data[29][0] .= ui_print_help_tip(__("If enabled, actively checks if the user comes from %s's URL", get_product_name()), true); -$table->data[29][1] = html_print_checkbox_toogle_switch('referer_security', 1, $config['referer_security'], true); +$table->data[29][1] = html_print_checkbox_switch('referer_security', 1, $config['referer_security'], true); $table->data[30][0] = __('Event storm protection'); $table->data[30][0] .= ui_print_help_tip(__('If set to yes no events or alerts will be generated, but agents will continue receiving data.'), true); -$table->data[30][1] = html_print_checkbox_toogle_switch('event_storm_protection', 1, $config['event_storm_protection'], true); +$table->data[30][1] = html_print_checkbox_switch('event_storm_protection', 1, $config['event_storm_protection'], true); $table->data[31][0] = __('Command Snapshot').ui_print_help_tip(__('The string modules with several lines show as command output'), true); -$table->data[31][1] = html_print_checkbox_toogle_switch('command_snapshot', 1, $config['command_snapshot'], true); +$table->data[31][1] = html_print_checkbox_switch('command_snapshot', 1, $config['command_snapshot'], true); $table->data[32][0] = __('Server logs directory').ui_print_help_tip(__('Directory where the server logs are stored.'), true); $table->data[32][1] = html_print_input_text( @@ -250,7 +250,7 @@ $table->data['tutorial_mode'][1] = html_print_select( $config['past_planned_downtimes'] = isset($config['past_planned_downtimes']) ? $config['past_planned_downtimes'] : 1; $table->data[34][0] = __('Allow create planned downtimes in the past').ui_print_help_tip(__('The planned downtimes created in the past will affect the SLA reports'), true); -$table->data[34][1] = html_print_checkbox_toogle_switch('past_planned_downtimes', 1, $config['past_planned_downtimes'], true); +$table->data[34][1] = html_print_checkbox_switch('past_planned_downtimes', 1, $config['past_planned_downtimes'], true); $table->data[35][0] = __('Limit for bulk operations').ui_print_help_tip(__('Your PHP environment is set to 1000 max_input_vars. This parameter should have the same value or lower.', ini_get('max_input_vars')), true); $table->data[35][1] = html_print_input_text( @@ -263,7 +263,7 @@ $table->data[35][1] = html_print_input_text( ); $table->data[36][0] = __('Include agents manually disabled'); -$table->data[36][1] = html_print_checkbox_toogle_switch('include_agents', 1, $config['include_agents'], true); +$table->data[36][1] = html_print_checkbox_switch('include_agents', 1, $config['include_agents'], true); $table->data[37][0] = __('Audit log directory').ui_print_help_tip(__('Directory where audit log is stored.'), true); $table->data[37][1] = html_print_input_text('auditdir', io_safe_output($config['auditdir']), '', 30, 100, true); diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 8d18cf40d7..f2042193fb 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -75,7 +75,7 @@ $table_behaviour->data[$row][1] = html_print_select($values, 'vc_refr', $config[ $row++; $table_behaviour->data[$row][0] = __('Paginated module view'); -$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( +$table_behaviour->data[$row][1] = html_print_checkbox_switch( 'paginate_module', 1, $config['paginate_module'], @@ -84,7 +84,7 @@ $table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( $row++; $table_behaviour->data[$row][0] = __('Display data of proc modules in other format'); -$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( +$table_behaviour->data[$row][1] = html_print_checkbox_switch( 'render_proc', 1, $config['render_proc'], @@ -102,7 +102,7 @@ $row++; // Daniel maya 02/06/2016 Display menu with click --INI $table_behaviour->data[$row][0] = __('Click to display lateral menus').ui_print_help_tip(__('When enabled, the lateral menus are shown when left clicking them, instead of hovering over them'), true); -$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( +$table_behaviour->data[$row][1] = html_print_checkbox_switch( 'click_display', 1, $config['click_display'], @@ -120,15 +120,6 @@ if (enterprise_installed()) { $row++; } -$table_behaviour->data[$row][0] = __('Classic menu mode').ui_print_help_tip(__('Text menu options always visible, don\'t hide'), true); -$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( - 'classic_menu', - 1, - $config['classic_menu'], - true -); -$row++; - echo ' | '; // menu_container ui_require_jquery_file('cookie'); -$config_fixed_menu = false; -if (isset($config['fixed_menu'])) { - $config_fixed_menu = $config['fixed_menu']; -} - $config_fixed_header = false; if (isset($config['fixed_header'])) { $config_fixed_header = $config['fixed_header']; @@ -64,25 +126,35 @@ if (isset($config['fixed_header'])) { @@ -348,182 +191,199 @@ $(document).ready( function() { handsIn = 0; handsIn2 = 0; - if(!click_display){ - $('.menu_icon').mouseenter(function() { + +/** + * Positionate the submenu elements. Add a negative top. + * + * @param int index It is the position of li.menu_icon in the ul. + * @param string id_submenu It is the id of first level submenu. + * @param string id_submenu2 It is the id of second level submenu. + * @param int item_height It is the height of a menu item (28 o 35). + * + * @return (int) The position (in px). + */ +function menu_calculate_top(index, id_submenu, id_submenu2, item_height){ + + var level1 = index; + var level2 = $('#'+id_submenu+' ul.submenu > li').length; + var level3 = $('#'+id_submenu2+' > li.sub_subMenu').length; + var item_height = item_height; + + level2--; + if (id_submenu2 !== false) { + // If level3 is set, the position is calculated like box is in the center. + // wiouth considering level2 box can be moved. + level3--; + total = (level1 + level3); + comp = level3; + } else { + total = (level1 + level2); + comp = level2; + } + + // Positionate in the middle + if (total > 12 && ((total < 18) || ((level1 - comp) <= 4))) { + return - ( Math.floor(comp / 2) * item_height); + } + + // Positionate in the bottom + if (total >= 18) { + return (- comp * item_height); + } + + // return 0 by default + return 0; +} + + +/** + * Get the menu items to be positioned. + * + * @param string item It is the selector of the current element. + * + * @return Add the top position in a inline style. + */ +function get_menu_items(item){ + var item_height = parseInt(item.css('min-height')); + var id_submenu = item.attr('id'); + var id_submenu2 = false; + var index = item.index(); + + if(item.parent().hasClass('godmode')){ + index = index+6; // This is because the menu has divided in two parts. + } + var top_submenu = menu_calculate_top(index, id_submenu, id_submenu2, item_height); + top_submenu = top_submenu+'px'; + $('#'+id_submenu+' ul.submenu').css('top', top_submenu); + + $('.has_submenu').mouseenter(function() { + id_submenu2 = item.attr('id'); + id_submenu2 = $('#'+id_submenu2+' ul.submenu2').attr('id'); + var top_submenu2 = menu_calculate_top(index, id_submenu, id_submenu2, item_height); + top_submenu2 = top_submenu2+'px'; + $('#'+id_submenu2).css('top', top_submenu2); + }); +} + +/* + * Show and hide submenus + */ +if(!click_display){ + $('.menu_icon').mouseenter(function() { + table_hover = $(this); + handsIn = 1; + openTime = new Date().getTime(); + $("ul#sub"+table_hover[0].id).show(); + get_menu_items(table_hover); + if( typeof(table_noHover) != 'undefined') + if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id ) + $("ul#sub"+table_noHover[0].id).hide(); + }).mouseleave(function() { + table_noHover = $(this); + handsIn = 0; + setTimeout(function() { + opened = new Date().getTime() - openTime; + if(opened > 3000 && handsIn == 0) { + openTime = 4000; + $("ul#sub"+table_noHover[0].id).hide(); + } + }, 2500); + }); +}else{ + $(document).ready(function() { + if (autohidden_menu) { + $('.menu_icon').on("click", function() { + if( typeof(table_hover) != 'undefined'){ + $("ul#sub"+table_hover[0].id).hide(); + } table_hover = $(this); handsIn = 1; openTime = new Date().getTime(); $("ul#sub"+table_hover[0].id).show(); - if( typeof(table_noHover) != 'undefined') - if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id ) - $("ul#sub"+table_noHover[0].id).hide(); + get_menu_items(table_hover); }).mouseleave(function() { table_noHover = $(this); handsIn = 0; setTimeout(function() { opened = new Date().getTime() - openTime; - if(opened > 3000 && handsIn == 0) { - openTime = 4000; - $("ul#sub"+table_hover[0].id).hide(); + if(opened > 5000 && handsIn == 0) { + openTime = 6000; + $("ul#sub"+table_noHover[0].id).hide(); } - }, 2500); + }, 5500); }); + } else { + $('.menu_icon').on("click", function() { + if( typeof(table_hover) != 'undefined'){ + $("ul#sub"+table_hover[0].id).hide(); + } + table_hover = $(this); + handsIn = 1; + openTime = new Date().getTime(); + $("ul#sub"+table_hover[0].id).show(); + get_menu_items(table_hover); + }); + } + }); +} + +$('.has_submenu').mouseenter(function() { + table_hover2 = $(this); + handsIn2 = 1; + openTime2 = new Date().getTime(); + $("#sub"+table_hover2[0].id).show(); + if( typeof(table_noHover2) != 'undefined') + if ( "ul#sub"+table_hover2[0].id != "ul#sub"+table_noHover2[0].id ) + $("ul#sub"+table_noHover2[0].id).hide(); +}).mouseleave(function() { + table_noHover2 = table_hover2; + handsIn2 = 0; + setTimeout(function() { + opened = new Date().getTime() - openTime2; + if(opened >= 3000 && handsIn2 == 0) { + openTime2 = 4000; + $("ul#sub"+table_hover2[0].id).hide(); + } + }, 3500); +}); + +$(document).ready(function() { + + if(!click_display){ + $('#container').click(function() { + openTime = 4000; + if( typeof(table_hover) != 'undefined') + $("ul#sub"+table_hover[0].id).hide(); + if( typeof(table_hover2) != 'undefined') + $("ul#sub"+table_hover2[0].id).hide(); + }); }else{ - $(document).ready(function() { - if (autohidden_menu) { - $('.menu_icon').on("click", function() { - if( typeof(table_hover) != 'undefined'){ - $("ul#sub"+table_hover[0].id).hide(); - } - table_hover = $(this); - handsIn = 1; - openTime = new Date().getTime(); - $("ul#sub"+table_hover[0].id).show(); - }).mouseleave(function() { - table_noHover = $(this); - handsIn = 0; - setTimeout(function() { - opened = new Date().getTime() - openTime; - if(opened > 5000 && handsIn == 0) { - openTime = 6000; - $("ul#sub"+table_hover[0].id).hide(); - } - }, 5500); - }); - } else { - $('.menu_icon').on("click", function() { - if( typeof(table_hover) != 'undefined'){ - $("ul#sub"+table_hover[0].id).hide(); - } - table_hover = $(this); - handsIn = 1; - openTime = new Date().getTime(); - $("ul#sub"+table_hover[0].id).show(); - }); - } + $('#main').click(function() { + openTime = 4000; + if( typeof(table_hover) != 'undefined') + $("ul#sub"+table_hover[0].id).hide(); + if( typeof(table_hover2) != 'undefined') + $("ul#sub"+table_hover2[0].id).hide(); }); } -- $('.has_submenu').mouseenter(function() { - table_hover2 = $(this); - handsIn2 = 1; - openTime2 = new Date().getTime(); - $("#sub"+table_hover2[0].id).show(); - if( typeof(table_noHover2) != 'undefined') - if ( "ul#sub"+table_hover2[0].id != "ul#sub"+table_noHover2[0].id ) - $("ul#sub"+table_noHover2[0].id).hide(); - }).mouseleave(function() { - table_noHover2 = table_hover2; - handsIn2 = 0; - setTimeout(function() { - opened = new Date().getTime() - openTime2; - if(opened >= 3000 && handsIn2 == 0) { - openTime2 = 4000; - $("ul#sub"+table_hover2[0].id).hide(); - } - }, 3500); - }); - - $(document).ready(function() { - if (!classic_menu) { - //Daniel maya 02/06/2016 Display menu with click --INI - if(!click_display){ - $('#container').click(function() { - openTime = 4000; - if( typeof(table_hover) != 'undefined') - $("ul#sub"+table_hover[0].id).hide(); - if( typeof(table_hover2) != 'undefined') - $("ul#sub"+table_hover2[0].id).hide(); - $('#menu').css('width', '45px'); - $('li.menu_icon').removeClass( " no_hidden_menu"); - $('ul.submenu').css('left', '44px'); - $('div#title_menu').hide(); - }); - }else{ - $('#main').click(function() { - openTime = 4000; - if( typeof(table_hover) != 'undefined') - $("ul#sub"+table_hover[0].id).hide(); - if( typeof(table_hover2) != 'undefined') - $("ul#sub"+table_hover2[0].id).hide(); - $('#menu').css('width', '45px'); - $('li.menu_icon').removeClass( " no_hidden_menu"); - $('ul.submenu').css('left', '44px'); - $('div#title_menu').hide(); - }); - } - //Daniel maya 02/06/2016 Display menu with click --END - } - else { - if(!click_display){ - $('#container').click(function() { - openTime = 4000; - if( typeof(table_hover) != 'undefined') - $("ul#sub"+table_hover[0].id).hide(); - if( typeof(table_hover2) != 'undefined') - $("ul#sub"+table_hover2[0].id).hide(); - $('#menu').css('width', '145px'); - $('ul.submenu').css('left', '144px'); - }); - }else{ - $('#main').click(function() { - openTime = 4000; - if( typeof(table_hover) != 'undefined') - $("ul#sub"+table_hover[0].id).hide(); - if( typeof(table_hover2) != 'undefined') - $("ul#sub"+table_hover2[0].id).hide(); - $('#menu').css('width', '145px'); - $('ul.submenu').css('left', '144px'); - }); - } - } + + $('div.menu>ul>li>ul>li>a').click(function() { + openTime = 4000; + if( typeof(table_hover) != 'undefined') + $("ul#sub"+table_hover[0].id).hide(); + if( typeof(table_hover2) != 'undefined') + $("ul#sub"+table_hover2[0].id).hide(); + }); - if (classic_menu) { - $('div.menu>ul>li>ul>li>a').click(function() { - openTime = 4000; - if( typeof(table_hover) != 'undefined') - $("ul#sub"+table_hover[0].id).hide(); - if( typeof(table_hover2) != 'undefined') - $("ul#sub"+table_hover2[0].id).hide(); - $('ul.submenu').css('left', '144px'); - }); - - $('div.menu>ul>li>ul>li>ul>li>a').click(function() { - openTime = 4000; - if( typeof(table_hover) != 'undefined') - $("ul#sub"+table_hover[0].id).hide(); - if( typeof(table_hover2) != 'undefined') - $("ul#sub"+table_hover2[0].id).hide(); - $('ul.submenu').css('left', '144px'); - }); - } - else { - $('div.menu>ul>li>ul>li>a').click(function() { - openTime = 4000; - if( typeof(table_hover) != 'undefined') - $("ul#sub"+table_hover[0].id).hide(); - if( typeof(table_hover2) != 'undefined') - $("ul#sub"+table_hover2[0].id).hide(); - $('#menu').css('width', '45px'); - $('li.menu_icon').removeClass( " no_hidden_menu"); - $('ul.submenu').css('left', '44px'); - $('div#title_menu').hide(); - }); - - $('div.menu>ul>li>ul>li>ul>li>a').click(function() { - openTime = 4000; - if( typeof(table_hover) != 'undefined') - $("ul#sub"+table_hover[0].id).hide(); - if( typeof(table_hover2) != 'undefined') - $("ul#sub"+table_hover2[0].id).hide(); - $('#menu').css('width', '45px'); - $('li.menu_icon').removeClass( " no_hidden_menu"); - $('ul.submenu').css('left', '44px'); - $('div#title_menu').hide(); - }); - } + $('div.menu>ul>li>ul>li>ul>li>a').click(function() { + openTime = 4000; + if( typeof(table_hover) != 'undefined') + $("ul#sub"+table_hover[0].id).hide(); + if( typeof(table_hover2) != 'undefined') + $("ul#sub"+table_hover2[0].id).hide(); }); +}); - diff --git a/pandora_console/general/mysqlerr.php b/pandora_console/general/mysqlerr.php new file mode 100644 index 0000000000..40da530386 --- /dev/null +++ b/pandora_console/general/mysqlerr.php @@ -0,0 +1,113 @@ + + + + + + + +