From 6fd6c9042435ea4c6e24f7d2702cce2c7641174b Mon Sep 17 00:00:00 2001
From: m-lopez-f <miguel.lopez@artica.es>
Date: Thu, 22 Sep 2016 15:21:39 +0200
Subject: [PATCH 01/12] Change visual of put permissions of AD. Ticket: #4057

---
 pandora_console/include/functions_config.php | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php
index ee34733106..bba18db580 100644
--- a/pandora_console/include/functions_config.php
+++ b/pandora_console/include/functions_config.php
@@ -53,8 +53,7 @@ function config_update_value ($token, $value) {
 	}
 	
 	if ($token == 'ad_adv_perms') {
-		$value = str_replace(array("\r\n", "\r", "\n"), ";",
-			io_safe_output($value));
+		$value = io_safe_output($value);
 	}
 	
 	if ($token == 'default_assign_tags') {
@@ -1168,14 +1167,14 @@ function config_process_config () {
 		config_update_value ( 'ad_domain', '');
 	}
 	
-	if (!isset ($config["ad_adv_perms"])) {
+	if (!isset ($config['ad_adv_perms'])) {
 		config_update_value ('ad_adv_perms', '');
 	}
 	else{
 		$temp_ad_adv_perms = array();
 		if (isset($config['ad_adv_perms'])) {
 			if (!empty($config['ad_adv_perms'])) {
-				$temp_ad_adv_perms = explode(';', io_safe_output($config['ad_adv_perms']));
+				$temp_ad_adv_perms = $config['ad_adv_perms'];
 			}
 		}
 		$config['ad_adv_perms'] = $temp_ad_adv_perms;

From 9b9a25cea3efc69da46a61b93ff3e49971b2db03 Mon Sep 17 00:00:00 2001
From: m-lopez-f <miguel.lopez@artica.es>
Date: Thu, 22 Sep 2016 15:23:12 +0200
Subject: [PATCH 02/12] Fixed styles of simple value in visual console

---
 .../godmode/reporting/visual_console_builder.editor.js          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js
index 2af8b61959..f5450fccc7 100755
--- a/pandora_console/godmode/reporting/visual_console_builder.editor.js
+++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js
@@ -1608,7 +1608,7 @@ function createItem(type, values, id_data) {
 		case 'simple_value':
 			sizeStyle = '';
 			imageSize = '';
-			item = $('<div id="' + id_data + '" class="item simple_value" style="text-align: center; position: absolute; ' + sizeStyle + ' top: ' + values['top'] + 'px; left: ' + values['left'] + 'px;">' +
+			item = $('<div id="' + id_data + '" class="item simple_value" style="position: absolute; ' + sizeStyle + ' top: ' + values['top'] + 'px; left: ' + values['left'] + 'px;">' +
 					'<span id="text_' + id_data + '" class="text"> ' + values['label'] + '</span> ' + '</div>'
 			);
 			setModuleValue(id_data,values.process_simple_value,values.period);

From 192362705b8cd687d27da378ed8379f930751a35 Mon Sep 17 00:00:00 2001
From: artica <artica.devel@gmail.com>
Date: Fri, 23 Sep 2016 00:01:32 +0200
Subject: [PATCH 03/12] Auto-updated build strings.

---
 pandora_agents/unix/DEBIAN/control             | 2 +-
 pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +-
 pandora_agents/unix/pandora_agent              | 2 +-
 pandora_agents/unix/pandora_agent.redhat.spec  | 2 +-
 pandora_agents/unix/pandora_agent.spec         | 2 +-
 pandora_agents/unix/pandora_agent_installer    | 2 +-
 pandora_agents/win32/installer/pandora.mpi     | 2 +-
 pandora_agents/win32/pandora.cc                | 2 +-
 pandora_agents/win32/versioninfo.rc            | 2 +-
 pandora_console/DEBIAN/control                 | 2 +-
 pandora_console/DEBIAN/make_deb_package.sh     | 2 +-
 pandora_console/include/config_process.php     | 2 +-
 pandora_console/install.php                    | 2 +-
 pandora_console/pandora_console.redhat.spec    | 2 +-
 pandora_console/pandora_console.spec           | 2 +-
 pandora_console/pandoradb.data.oracle.sql      | 2 +-
 pandora_server/DEBIAN/control                  | 2 +-
 pandora_server/DEBIAN/make_deb_package.sh      | 2 +-
 pandora_server/lib/PandoraFMS/Config.pm        | 2 +-
 pandora_server/pandora_server.redhat.spec      | 2 +-
 pandora_server/pandora_server.spec             | 2 +-
 pandora_server/pandora_server_installer        | 2 +-
 pandora_server/util/pandora_db.pl              | 2 +-
 pandora_server/util/pandora_manage.pl          | 2 +-
 24 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index bf364b52de..6e74aa36bd 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-agent-unix
-Version: 6.0SP3-160922
+Version: 6.0SP3-160923
 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 18a03dcf3b..6508ed56ac 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="6.0SP3-160922"
+pandora_version="6.0SP3-160923"
 
 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/pandora_agent b/pandora_agents/unix/pandora_agent
index 5720e52df5..71ddadc0b8 100644
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -41,7 +41,7 @@ my $Sem = undef;
 my $ThreadSem = undef;
 
 use constant AGENT_VERSION => '6.0SP3';
-use constant AGENT_BUILD => '160922';
+use constant AGENT_BUILD => '160923';
 
 # 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 a0a423d1ee..0ff1d4c06a 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     6.0SP3
-%define release     160922
+%define release     160923
 
 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 eb44a24524..f4f70cbea1 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     6.0SP3
-%define release     160922
+%define release     160923
 
 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 09f38f4cd2..05bd40116d 100644
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
 # **********************************************************************
 
 PI_VERSION="6.0SP3"
-PI_BUILD="160922"
+PI_BUILD="160923"
 OS_NAME=`uname -s`
 
 FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 216d0e2f78..6fe0dfff4f 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
 {}
 
 Version
-{160922}
+{160923}
 
 ViewReadme
 {Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index add6060e88..9d704bb982 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 ("6.0SP3(Build 160922)")
+#define PANDORA_VERSION ("6.0SP3(Build 160923)")
 
 string pandora_path;
 string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index a9f52d6cd7..40b07f7902 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", "(6.0SP3(Build 160922))"
+      VALUE "ProductVersion", "(6.0SP3(Build 160923))"
       VALUE "FileVersion", "1.0.0.0"
     END
   END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 004ad3767c..2705f71fe8 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-console
-Version: 6.0SP3-160922
+Version: 6.0SP3-160923
 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 406d6c79f5..75e6e6ad62 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="6.0SP3-160922"
+pandora_version="6.0SP3-160923"
 
 package_pear=0
 package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 89e2d247fa..113e06df79 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -22,7 +22,7 @@
 /**
  * Pandora build version and version 
  */
-$build_version = 'PC160922';
+$build_version = 'PC160923';
 $pandora_version = 'v6.0SP3';
 
 // Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 4c43de6034..be11372fbd 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -71,7 +71,7 @@
 		<div style='height: 10px'>
 			<?php
 $version = '6.0SP3';
-$build = '160922';
+$build = '160923';
 			$banner = "v$version Build $build";
 			
 			error_reporting(0);
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index 843548bb30..38551b3dc0 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     6.0SP3
-%define release     160922
+%define release     160923
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index e56f5c00d4..f9e930f006 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     6.0SP3
-%define release     160922
+%define release     160923
 %define httpd_name      httpd
 # User and Group under which Apache is running
 %define httpd_name  apache2
diff --git a/pandora_console/pandoradb.data.oracle.sql b/pandora_console/pandoradb.data.oracle.sql
index 66ea2d56dd..be18047f20 100644
--- a/pandora_console/pandoradb.data.oracle.sql
+++ b/pandora_console/pandoradb.data.oracle.sql
@@ -65,7 +65,7 @@ INSERT INTO tconfig (token, value) VALUES ('graph_res','5');
 INSERT INTO tconfig (token, value) VALUES ('step_compact','1');
 INSERT INTO tconfig (token, value) VALUES ('db_scheme_first_version','6.0orc');
 INSERT INTO tconfig (token, value) VALUES('db_scheme_version','6.0SP3');
-INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD160922');
+INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD160923');
 INSERT INTO tconfig (token, value) VALUES ('show_unknown','0');
 INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1');
 INSERT INTO tconfig (token, value) VALUES ('style','pandora');
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index 44d0396105..eead1d8c4f 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-server
-Version: 6.0SP3-160922
+Version: 6.0SP3-160923
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index ff5afc620c..2cb6602ba5 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/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="6.0SP3-160922"
+pandora_version="6.0SP3-160923"
 
 package_cpan=0
 package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index b5d1c90290..d668b7b16f 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -43,7 +43,7 @@ our @EXPORT = qw(
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "6.0SP3";
-my $pandora_build = "160922";
+my $pandora_build = "160923";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 # Setup hash
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index abe30724fa..b85600d3f3 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     6.0SP3
-%define release     160922
+%define release     160923
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index 874c84536d..6032636c90 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     6.0SP3
-%define release     160922
+%define release     160923
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index 20e14eea10..311ed3fba1 100644
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
 # **********************************************************************
 
 PI_VERSION="6.0SP3"
-PI_BUILD="160922"
+PI_BUILD="160923"
 
 MODE=$1
 if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 075edc0272..27087d6fad 100644
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -33,7 +33,7 @@ use PandoraFMS::Tools;
 use PandoraFMS::DB;
 
 # version: define current version
-my $version = "6.0SP3 PS160922";
+my $version = "6.0SP3 PS160923";
 
 # Pandora server configuration
 my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 9c6480702e..dc9b8ec906 100644
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -35,7 +35,7 @@ use Encode::Locale;
 Encode::Locale::decode_argv;
 
 # version: define current version
-my $version = "6.0SP3 PS160922";
+my $version = "6.0SP3 PS160923";
 
 # save program name for logging
 my $progname = basename($0);

From 5f11a0670f748cd8290992acdd50cddfdaae5c59 Mon Sep 17 00:00:00 2001
From: m-lopez-f <miguel.lopez@artica.es>
Date: Fri, 23 Sep 2016 10:13:54 +0200
Subject: [PATCH 04/12] Fixed problems with ACL. Ticket: #4057

(cherry picked from commit fb56c16e19e3f289b55fbfef36d22162465e5c41)
---
 pandora_console/godmode/servers/plugin.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php
index f4d9b358a2..9bbb6ccaf2 100644
--- a/pandora_console/godmode/servers/plugin.php
+++ b/pandora_console/godmode/servers/plugin.php
@@ -93,7 +93,7 @@ require_once ($config['homedir'] . "/include/functions_filemanager.php");
 
 check_login ();
 
-if (! check_acl ($config['id_user'], 0, "LM")) {
+if (! check_acl ($config['id_user'], 0, "PM")) {
 	db_pandora_audit("ACL Violation",
 		"Trying to access Plugin Management");
 	require ("general/noaccess.php");

From 4be427bad9d753b207f7e56e75c3a97ade139a2c Mon Sep 17 00:00:00 2001
From: m-lopez-f <miguel.lopez@artica.es>
Date: Fri, 23 Sep 2016 11:57:07 +0200
Subject: [PATCH 05/12] can't use mobile version when you install metaconsole
 version, add redirect. Ticket: #4067

---
 pandora_console/mobile/index.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php
index d457d600a8..70c4e12a54 100644
--- a/pandora_console/mobile/index.php
+++ b/pandora_console/mobile/index.php
@@ -67,6 +67,12 @@ if (!empty ($config["https"]) && empty ($_SERVER['HTTPS'])) {
 
 $system = System::getInstance();
 
+//~ In this moment doesn't work the version mobile when have metaconsole version.
+//~ In the future versions of pandora maybe is added a mobile version of PandoraFMS Metaconsole version.
+if ($system->getConfig('metaconsole'))
+	header ("Location: " . $system->getConfig('homeurl') . "enterprise/meta");
+
+
 require_once($system->getConfig('homedir').'/include/constants.php');
 
 $user = User::getInstance();

From 28440e1ac33ac54647e35dc057092e3bd9c45ae0 Mon Sep 17 00:00:00 2001
From: m-lopez-f <miguel.lopez@artica.es>
Date: Fri, 23 Sep 2016 13:46:44 +0200
Subject: [PATCH 06/12] Add percert of critical agents in group view. Ticket: 
 #3344

(cherry picked from commit 50e2c14ce87ea31861a5f6418d811d142ae78019)
---
 .../include/functions_groupview.php           | 54 ++++++++++++++-----
 .../operation/agentes/group_view.php          |  4 ++
 2 files changed, 44 insertions(+), 14 deletions(-)

diff --git a/pandora_console/include/functions_groupview.php b/pandora_console/include/functions_groupview.php
index ca33c4666e..5443f0b6d1 100644
--- a/pandora_console/include/functions_groupview.php
+++ b/pandora_console/include/functions_groupview.php
@@ -115,6 +115,7 @@ function groupview_get_all_data ($id_user = false, $user_strict = false, $acltag
 		$list[$group['id_grupo']]['_monitors_ok_'] = 0;
 		$list[$group['id_grupo']]['_agents_not_init_'] = 0;
 		$list[$group['id_grupo']]['_agents_unknown_'] = 0;
+		$list[$group['id_grupo']]['_agents_critical_'] = 0;
 		$list[$group['id_grupo']]['_total_agents_'] = 0;
 		$list[$group['id_grupo']]["_monitor_checks_"] = 0;
 		$list[$group['id_grupo']]["_monitor_not_normal_"] = 0;
@@ -167,14 +168,19 @@ function groupview_get_all_data ($id_user = false, $user_strict = false, $acltag
 												FROM tmetaconsole_agent
 												WHERE id_grupo = " . $group['id_grupo'] );
 				foreach ($agents as $agent) {
-					if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0)) {
-						if ($agent['unknown_count'] > 0) {
-							$list[$group['id_grupo']]['_agents_unknown_'] += 1;
-						}
+					if ($agent['critical_count'] > 0) {
+						$list[$group['id_grupo']]['_agents_critical_'] += 1;
 					}
-					if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0) && ($agent['unknown_count'] == 0)) {
-						if ($agent['notinit_count'] > 0) {
-							$list[$group['id_grupo']]['_agents_not_init_'] += 1;
+					else {
+						if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0)) {
+							if ($agent['unknown_count'] > 0) {
+								$list[$group['id_grupo']]['_agents_unknown_'] += 1;
+							}
+						}
+						if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0) && ($agent['unknown_count'] == 0)) {
+							if ($agent['notinit_count'] > 0) {
+								$list[$group['id_grupo']]['_agents_not_init_'] += 1;
+							}
 						}
 					}
 				}
@@ -261,6 +267,12 @@ function groupview_get_all_data ($id_user = false, $user_strict = false, $acltag
 							'status' => AGENT_STATUS_UNKNOWN),
 							array ('COUNT(*) as total'), $access, false);
 			$list[$group['id_grupo']]['_agents_unknown_'] = isset ($agent_unknown[0]['total']) ? $agent_unknown[0]['total'] : 0;
+			$agent_critical = agents_get_agents(array (
+							'disabled' => 0,
+							'id_grupo' => $group['id_grupo'],
+							'status' => AGENT_STATUS_CRITICAL),
+							array ('COUNT(*) as total'), $access, false);
+			$list[$group['id_grupo']]['_agents_critical_'] = isset ($agent_critical[0]['total']) ? $agent_critical[0]['total'] : 0;
 			$agent_total = agents_get_agents(array (
 							'disabled' => 0,
 							'id_grupo' => $group['id_grupo']),
@@ -335,6 +347,7 @@ function groupview_get_all_data ($id_user = false, $user_strict = false, $acltag
 
 				$list[$i]['_total_agents_'] = (int) tags_get_total_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
 				$list[$i]['_agents_unknown_'] = (int) tags_get_unknown_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
+				$list[$i]['_agents_critical_'] = (int) tags_get_critical_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
 				$list[$i]['_agents_not_init_'] = (int) tags_get_not_init_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
 				$list[$i]['_monitors_ok_'] = (int) tags_get_normal_monitors ($id, $acltags, $agent_filter, $module_filter);
 				$list[$i]['_monitors_critical_'] = (int) tags_get_critical_monitors ($id, $acltags, $agent_filter, $module_filter);
@@ -728,6 +741,7 @@ function groupview_get_data ($id_user = false, $user_strict = false, $acltags, $
 		$list[$group['id_grupo']]['_monitors_ok_'] = 0;
 		$list[$group['id_grupo']]['_agents_not_init_'] = 0;
 		$list[$group['id_grupo']]['_agents_unknown_'] = 0;
+		$list[$group['id_grupo']]['_agents_critical_'] = 0;
 		$list[$group['id_grupo']]['_total_agents_'] = 0;
 		$list[$group['id_grupo']]["_monitor_checks_"] = 0;
 		$list[$group['id_grupo']]["_monitor_not_normal_"] = 0;
@@ -780,14 +794,19 @@ function groupview_get_data ($id_user = false, $user_strict = false, $acltags, $
 												FROM tmetaconsole_agent
 												WHERE id_grupo = " . $group['id_grupo'] );
 				foreach ($agents as $agent) {
-					if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0)) {
-						if ($agent['unknown_count'] > 0) {
-							$list[$group['id_grupo']]['_agents_unknown_'] += 1;
-						}
+					if ($agent['critical_count'] > 0) {
+						$list[$group['id_grupo']]['_agents_critical_'] += 1;
 					}
-					if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0) && ($agent['unknown_count'] == 0)) {
-						if ($agent['notinit_count'] > 0) {
-							$list[$group['id_grupo']]['_agents_not_init_'] += 1;
+					else {
+						if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0)) {
+							if ($agent['unknown_count'] > 0) {
+								$list[$group['id_grupo']]['_agents_unknown_'] += 1;
+							}
+						}
+						if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0) && ($agent['unknown_count'] == 0)) {
+							if ($agent['notinit_count'] > 0) {
+								$list[$group['id_grupo']]['_agents_not_init_'] += 1;
+							}
 						}
 					}
 				}
@@ -874,6 +893,12 @@ function groupview_get_data ($id_user = false, $user_strict = false, $acltags, $
 							'status' => AGENT_STATUS_UNKNOWN),
 							array ('COUNT(*) as total'), $access, false);
 			$list[$group['id_grupo']]['_agents_unknown_'] = isset ($agent_unknown[0]['total']) ? $agent_unknown[0]['total'] : 0;
+			$agent_critical = agents_get_agents(array (
+							'disabled' => 0,
+							'id_grupo' => $group['id_grupo'],
+							'status' => AGENT_STATUS_CRITICAL),
+							array ('COUNT(*) as total'), $access, false);
+			$list[$group['id_grupo']]['_agents_critical_'] = isset ($agent_critical[0]['total']) ? $agent_critical[0]['total'] : 0;
 			$agent_total = agents_get_agents(array (
 							'disabled' => 0,
 							'id_grupo' => $group['id_grupo']),
@@ -952,6 +977,7 @@ function groupview_get_data ($id_user = false, $user_strict = false, $acltags, $
 			$list[$i]['_total_agents_'] = (int) tags_get_total_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
 			$list[$i]['_agents_unknown_'] = (int) tags_get_unknown_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
 			$list[$i]['_agents_not_init_'] = (int) tags_get_not_init_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
+			$list[$i]['_agents_critical_'] = (int) tags_get_critical_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
 			$list[$i]['_monitors_ok_'] = (int) tags_get_normal_monitors ($id, $acltags, $agent_filter, $module_filter);
 			$list[$i]['_monitors_critical_'] = (int) tags_get_critical_monitors ($id, $acltags, $agent_filter, $module_filter);
 			$list[$i]['_monitors_warning_'] = (int) tags_get_warning_monitors ($id, $acltags, $agent_filter, $module_filter);
diff --git a/pandora_console/operation/agentes/group_view.php b/pandora_console/operation/agentes/group_view.php
index 28bb50a508..a8e04339c9 100644
--- a/pandora_console/operation/agentes/group_view.php
+++ b/pandora_console/operation/agentes/group_view.php
@@ -79,6 +79,7 @@ $monitor_critical = 0;
 $monitor_unknown = 0;
 $monitor_not_init = 0;
 $agents_unknown = 0;
+$agents_critical = 0;
 $agents_notinit = 0;
 $all_alerts_fired = 0;
 
@@ -92,6 +93,7 @@ foreach ($all_data as $group_all_data) {
 	
 	$agents_unknown += $group_all_data["_agents_unknown_"];
 	$agents_notinit += $group_all_data["_agents_not_init_"];
+	$agents_critical += $group_all_data["_agents_critical_"];
 
 	$all_alerts_fired += $group_all_data["_monitors_alerts_fired_"];
 }
@@ -106,6 +108,7 @@ $total_unknown = format_numeric (($monitor_unknown*100)/$total,2);
 $total_monitor_not_init = format_numeric (($monitor_not_init*100)/$total,2);
 //Agents
 $total_agent_unknown = format_numeric (($agents_unknown*100)/$total_agentes,2);
+$total_agent_critical = format_numeric (($agents_critical*100)/$total_agentes,2);
 $total_not_init = format_numeric (($agents_notinit*100)/$total_agentes,2);
 
 echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="databox">';
@@ -120,6 +123,7 @@ echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="data
 		echo "<td align='center'>";
 			echo "<span id='sumary' style='background-color:#B2B2B2;'>". $total_agent_unknown ."%</span>";
 			echo "<span id='sumary' style='background-color:#5bb6e5;'>". $total_not_init ."%</span>";
+			echo "<span id='sumary' style='background-color:#FC4444;'>". $total_critical ."%</span>";
 		echo "</td>";
 		echo "<td align='center'>";
 			echo "<span id='sumary' style='background-color:#FC4444;'>". $total_critical ."%</span>";

From dc1bf050abd95dc39070bfd56dd35ae87aeaa43b Mon Sep 17 00:00:00 2001
From: artica <artica.devel@gmail.com>
Date: Sat, 24 Sep 2016 00:01:33 +0200
Subject: [PATCH 07/12] Auto-updated build strings.

---
 pandora_agents/unix/DEBIAN/control             | 2 +-
 pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +-
 pandora_agents/unix/pandora_agent              | 2 +-
 pandora_agents/unix/pandora_agent.redhat.spec  | 2 +-
 pandora_agents/unix/pandora_agent.spec         | 2 +-
 pandora_agents/unix/pandora_agent_installer    | 2 +-
 pandora_agents/win32/installer/pandora.mpi     | 2 +-
 pandora_agents/win32/pandora.cc                | 2 +-
 pandora_agents/win32/versioninfo.rc            | 2 +-
 pandora_console/DEBIAN/control                 | 2 +-
 pandora_console/DEBIAN/make_deb_package.sh     | 2 +-
 pandora_console/include/config_process.php     | 2 +-
 pandora_console/install.php                    | 2 +-
 pandora_console/pandora_console.redhat.spec    | 2 +-
 pandora_console/pandora_console.spec           | 2 +-
 pandora_console/pandoradb.data.oracle.sql      | 2 +-
 pandora_server/DEBIAN/control                  | 2 +-
 pandora_server/DEBIAN/make_deb_package.sh      | 2 +-
 pandora_server/lib/PandoraFMS/Config.pm        | 2 +-
 pandora_server/pandora_server.redhat.spec      | 2 +-
 pandora_server/pandora_server.spec             | 2 +-
 pandora_server/pandora_server_installer        | 2 +-
 pandora_server/util/pandora_db.pl              | 2 +-
 pandora_server/util/pandora_manage.pl          | 2 +-
 24 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 6e74aa36bd..2d895e948e 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-agent-unix
-Version: 6.0SP3-160923
+Version: 6.0SP3-160924
 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 6508ed56ac..04a594bc62 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="6.0SP3-160923"
+pandora_version="6.0SP3-160924"
 
 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/pandora_agent b/pandora_agents/unix/pandora_agent
index 71ddadc0b8..4e674e13f1 100644
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -41,7 +41,7 @@ my $Sem = undef;
 my $ThreadSem = undef;
 
 use constant AGENT_VERSION => '6.0SP3';
-use constant AGENT_BUILD => '160923';
+use constant AGENT_BUILD => '160924';
 
 # 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 0ff1d4c06a..d94b97fd01 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     6.0SP3
-%define release     160923
+%define release     160924
 
 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 f4f70cbea1..7ecb1cf4af 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     6.0SP3
-%define release     160923
+%define release     160924
 
 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 05bd40116d..4626533e01 100644
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
 # **********************************************************************
 
 PI_VERSION="6.0SP3"
-PI_BUILD="160923"
+PI_BUILD="160924"
 OS_NAME=`uname -s`
 
 FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 6fe0dfff4f..9e9dfbfde2 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
 {}
 
 Version
-{160923}
+{160924}
 
 ViewReadme
 {Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 9d704bb982..eed99ead2a 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 ("6.0SP3(Build 160923)")
+#define PANDORA_VERSION ("6.0SP3(Build 160924)")
 
 string pandora_path;
 string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 40b07f7902..03d5cb5b19 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", "(6.0SP3(Build 160923))"
+      VALUE "ProductVersion", "(6.0SP3(Build 160924))"
       VALUE "FileVersion", "1.0.0.0"
     END
   END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 2705f71fe8..cd57a6cd21 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-console
-Version: 6.0SP3-160923
+Version: 6.0SP3-160924
 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 75e6e6ad62..d0ef0f8f59 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="6.0SP3-160923"
+pandora_version="6.0SP3-160924"
 
 package_pear=0
 package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 113e06df79..e058baa6bf 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -22,7 +22,7 @@
 /**
  * Pandora build version and version 
  */
-$build_version = 'PC160923';
+$build_version = 'PC160924';
 $pandora_version = 'v6.0SP3';
 
 // Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index be11372fbd..726dfdf2f5 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -71,7 +71,7 @@
 		<div style='height: 10px'>
 			<?php
 $version = '6.0SP3';
-$build = '160923';
+$build = '160924';
 			$banner = "v$version Build $build";
 			
 			error_reporting(0);
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index 38551b3dc0..9646e4aa34 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     6.0SP3
-%define release     160923
+%define release     160924
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index f9e930f006..dae3fae37a 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     6.0SP3
-%define release     160923
+%define release     160924
 %define httpd_name      httpd
 # User and Group under which Apache is running
 %define httpd_name  apache2
diff --git a/pandora_console/pandoradb.data.oracle.sql b/pandora_console/pandoradb.data.oracle.sql
index be18047f20..27e1b6f604 100644
--- a/pandora_console/pandoradb.data.oracle.sql
+++ b/pandora_console/pandoradb.data.oracle.sql
@@ -65,7 +65,7 @@ INSERT INTO tconfig (token, value) VALUES ('graph_res','5');
 INSERT INTO tconfig (token, value) VALUES ('step_compact','1');
 INSERT INTO tconfig (token, value) VALUES ('db_scheme_first_version','6.0orc');
 INSERT INTO tconfig (token, value) VALUES('db_scheme_version','6.0SP3');
-INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD160923');
+INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD160924');
 INSERT INTO tconfig (token, value) VALUES ('show_unknown','0');
 INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1');
 INSERT INTO tconfig (token, value) VALUES ('style','pandora');
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index eead1d8c4f..9427d184c3 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-server
-Version: 6.0SP3-160923
+Version: 6.0SP3-160924
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index 2cb6602ba5..1b164673e3 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/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="6.0SP3-160923"
+pandora_version="6.0SP3-160924"
 
 package_cpan=0
 package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index d668b7b16f..9dcf655a1a 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -43,7 +43,7 @@ our @EXPORT = qw(
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "6.0SP3";
-my $pandora_build = "160923";
+my $pandora_build = "160924";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 # Setup hash
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index b85600d3f3..0f8725910e 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     6.0SP3
-%define release     160923
+%define release     160924
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index 6032636c90..c301bcad64 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     6.0SP3
-%define release     160923
+%define release     160924
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index 311ed3fba1..d7d7a97714 100644
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
 # **********************************************************************
 
 PI_VERSION="6.0SP3"
-PI_BUILD="160923"
+PI_BUILD="160924"
 
 MODE=$1
 if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 27087d6fad..9795bf7d9a 100644
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -33,7 +33,7 @@ use PandoraFMS::Tools;
 use PandoraFMS::DB;
 
 # version: define current version
-my $version = "6.0SP3 PS160923";
+my $version = "6.0SP3 PS160924";
 
 # Pandora server configuration
 my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index dc9b8ec906..3faaccca71 100644
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -35,7 +35,7 @@ use Encode::Locale;
 Encode::Locale::decode_argv;
 
 # version: define current version
-my $version = "6.0SP3 PS160923";
+my $version = "6.0SP3 PS160924";
 
 # save program name for logging
 my $progname = basename($0);

From a07d133d0f1961d4009d7c8c8afebd019bcc8220 Mon Sep 17 00:00:00 2001
From: artica <artica.devel@gmail.com>
Date: Sun, 25 Sep 2016 00:01:28 +0200
Subject: [PATCH 08/12] Auto-updated build strings.

---
 pandora_agents/unix/DEBIAN/control             | 2 +-
 pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +-
 pandora_agents/unix/pandora_agent              | 2 +-
 pandora_agents/unix/pandora_agent.redhat.spec  | 2 +-
 pandora_agents/unix/pandora_agent.spec         | 2 +-
 pandora_agents/unix/pandora_agent_installer    | 2 +-
 pandora_agents/win32/installer/pandora.mpi     | 2 +-
 pandora_agents/win32/pandora.cc                | 2 +-
 pandora_agents/win32/versioninfo.rc            | 2 +-
 pandora_console/DEBIAN/control                 | 2 +-
 pandora_console/DEBIAN/make_deb_package.sh     | 2 +-
 pandora_console/include/config_process.php     | 2 +-
 pandora_console/install.php                    | 2 +-
 pandora_console/pandora_console.redhat.spec    | 2 +-
 pandora_console/pandora_console.spec           | 2 +-
 pandora_console/pandoradb.data.oracle.sql      | 2 +-
 pandora_server/DEBIAN/control                  | 2 +-
 pandora_server/DEBIAN/make_deb_package.sh      | 2 +-
 pandora_server/lib/PandoraFMS/Config.pm        | 2 +-
 pandora_server/pandora_server.redhat.spec      | 2 +-
 pandora_server/pandora_server.spec             | 2 +-
 pandora_server/pandora_server_installer        | 2 +-
 pandora_server/util/pandora_db.pl              | 2 +-
 pandora_server/util/pandora_manage.pl          | 2 +-
 24 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 2d895e948e..14caba0098 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-agent-unix
-Version: 6.0SP3-160924
+Version: 6.0SP3-160925
 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 04a594bc62..35aeea3fe1 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="6.0SP3-160924"
+pandora_version="6.0SP3-160925"
 
 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/pandora_agent b/pandora_agents/unix/pandora_agent
index 4e674e13f1..c9efb64e1f 100644
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -41,7 +41,7 @@ my $Sem = undef;
 my $ThreadSem = undef;
 
 use constant AGENT_VERSION => '6.0SP3';
-use constant AGENT_BUILD => '160924';
+use constant AGENT_BUILD => '160925';
 
 # 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 d94b97fd01..24d81b249d 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     6.0SP3
-%define release     160924
+%define release     160925
 
 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 7ecb1cf4af..67c8fa646b 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     6.0SP3
-%define release     160924
+%define release     160925
 
 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 4626533e01..637610cd4c 100644
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
 # **********************************************************************
 
 PI_VERSION="6.0SP3"
-PI_BUILD="160924"
+PI_BUILD="160925"
 OS_NAME=`uname -s`
 
 FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 9e9dfbfde2..30908b98a4 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
 {}
 
 Version
-{160924}
+{160925}
 
 ViewReadme
 {Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index eed99ead2a..6a03f68460 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 ("6.0SP3(Build 160924)")
+#define PANDORA_VERSION ("6.0SP3(Build 160925)")
 
 string pandora_path;
 string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 03d5cb5b19..d406b7e6c8 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", "(6.0SP3(Build 160924))"
+      VALUE "ProductVersion", "(6.0SP3(Build 160925))"
       VALUE "FileVersion", "1.0.0.0"
     END
   END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index cd57a6cd21..a123649d3e 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-console
-Version: 6.0SP3-160924
+Version: 6.0SP3-160925
 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 d0ef0f8f59..7f1696d973 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="6.0SP3-160924"
+pandora_version="6.0SP3-160925"
 
 package_pear=0
 package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index e058baa6bf..b5546c88c3 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -22,7 +22,7 @@
 /**
  * Pandora build version and version 
  */
-$build_version = 'PC160924';
+$build_version = 'PC160925';
 $pandora_version = 'v6.0SP3';
 
 // Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 726dfdf2f5..f310bd1b95 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -71,7 +71,7 @@
 		<div style='height: 10px'>
 			<?php
 $version = '6.0SP3';
-$build = '160924';
+$build = '160925';
 			$banner = "v$version Build $build";
 			
 			error_reporting(0);
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index 9646e4aa34..a703403686 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     6.0SP3
-%define release     160924
+%define release     160925
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index dae3fae37a..9429bae095 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     6.0SP3
-%define release     160924
+%define release     160925
 %define httpd_name      httpd
 # User and Group under which Apache is running
 %define httpd_name  apache2
diff --git a/pandora_console/pandoradb.data.oracle.sql b/pandora_console/pandoradb.data.oracle.sql
index 27e1b6f604..2a9e5b53ba 100644
--- a/pandora_console/pandoradb.data.oracle.sql
+++ b/pandora_console/pandoradb.data.oracle.sql
@@ -65,7 +65,7 @@ INSERT INTO tconfig (token, value) VALUES ('graph_res','5');
 INSERT INTO tconfig (token, value) VALUES ('step_compact','1');
 INSERT INTO tconfig (token, value) VALUES ('db_scheme_first_version','6.0orc');
 INSERT INTO tconfig (token, value) VALUES('db_scheme_version','6.0SP3');
-INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD160924');
+INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD160925');
 INSERT INTO tconfig (token, value) VALUES ('show_unknown','0');
 INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1');
 INSERT INTO tconfig (token, value) VALUES ('style','pandora');
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index 9427d184c3..cc5f412c1a 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-server
-Version: 6.0SP3-160924
+Version: 6.0SP3-160925
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index 1b164673e3..e5a4105415 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/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="6.0SP3-160924"
+pandora_version="6.0SP3-160925"
 
 package_cpan=0
 package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index 9dcf655a1a..fc91279c98 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -43,7 +43,7 @@ our @EXPORT = qw(
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "6.0SP3";
-my $pandora_build = "160924";
+my $pandora_build = "160925";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 # Setup hash
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index 0f8725910e..c58846c9c5 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     6.0SP3
-%define release     160924
+%define release     160925
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index c301bcad64..26c9a85fc4 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     6.0SP3
-%define release     160924
+%define release     160925
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index d7d7a97714..b906a00d65 100644
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
 # **********************************************************************
 
 PI_VERSION="6.0SP3"
-PI_BUILD="160924"
+PI_BUILD="160925"
 
 MODE=$1
 if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 9795bf7d9a..412890ace0 100644
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -33,7 +33,7 @@ use PandoraFMS::Tools;
 use PandoraFMS::DB;
 
 # version: define current version
-my $version = "6.0SP3 PS160924";
+my $version = "6.0SP3 PS160925";
 
 # Pandora server configuration
 my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 3faaccca71..24c4c252b3 100644
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -35,7 +35,7 @@ use Encode::Locale;
 Encode::Locale::decode_argv;
 
 # version: define current version
-my $version = "6.0SP3 PS160924";
+my $version = "6.0SP3 PS160925";
 
 # save program name for logging
 my $progname = basename($0);

From e1672afb534b4a9b28084a8a5ca474216353faf7 Mon Sep 17 00:00:00 2001
From: Junichi Satoh <junichi@rworks.jp>
Date: Sun, 25 Sep 2016 12:53:31 +0900
Subject: [PATCH 09/12] Fixed menu is not selectable. (Removed unnecessary
 return.)

(Cherry picked from commit cf4255bf21c30726d6868fca1e07a35a6cd5aadd)
---
 pandora_console/include/javascript/jquery.pandora.js | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/pandora_console/include/javascript/jquery.pandora.js b/pandora_console/include/javascript/jquery.pandora.js
index cc1035c1b1..011217a465 100644
--- a/pandora_console/include/javascript/jquery.pandora.js
+++ b/pandora_console/include/javascript/jquery.pandora.js
@@ -91,12 +91,6 @@ $(document).ready (function () {
 		);
 
 
-
-		return false;
-	});
-
-
-
 		return false;
 	});
 

From 6b672deb68a0bb37f6c79da37cc7ea636ee12ae4 Mon Sep 17 00:00:00 2001
From: Junichi Satoh <junichi@rworks.jp>
Date: Sun, 25 Sep 2016 13:03:02 +0900
Subject: [PATCH 10/12] Added default value (unknown) to $OS_VERSION to avoid
 undefined value when OS type is not detected. And added $OS_VERSION support
 for FreeBSD.

(Cherry picked from commit 2b5368e8b5822fb128341cab17eaac6a902961ca)
---
 pandora_server/lib/PandoraFMS/Tools.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm
index c8610ee893..23352c298b 100755
--- a/pandora_server/lib/PandoraFMS/Tools.pm
+++ b/pandora_server/lib/PandoraFMS/Tools.pm
@@ -136,7 +136,7 @@ use constant FIRED_ALERT => 1;
 
 # Set OS, OS version and /dev/null
 our $OS = $^O;
-our $OS_VERSION;
+our $OS_VERSION = "unknown";
 our $DEVNULL = '/dev/null';
 if ($OS eq 'linux') {
 	$OS_VERSION = `lsb_release -sd 2>/dev/null`;
@@ -146,6 +146,8 @@ if ($OS eq 'linux') {
 	$OS = "windows";
 	$OS_VERSION = `ver`;
 	$DEVNULL = '/Nul';
+} elsif ($OS eq 'freebsd') {
+	$OS_VERSION = `uname -r`;
 }
 chomp($OS_VERSION);
 

From 3bf3aecf9c0e38cf1384c83b5221e9997c1552a7 Mon Sep 17 00:00:00 2001
From: artica <artica.devel@gmail.com>
Date: Mon, 26 Sep 2016 00:01:32 +0200
Subject: [PATCH 11/12] Auto-updated build strings.

---
 pandora_agents/unix/DEBIAN/control             | 2 +-
 pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +-
 pandora_agents/unix/pandora_agent              | 2 +-
 pandora_agents/unix/pandora_agent.redhat.spec  | 2 +-
 pandora_agents/unix/pandora_agent.spec         | 2 +-
 pandora_agents/unix/pandora_agent_installer    | 2 +-
 pandora_agents/win32/installer/pandora.mpi     | 2 +-
 pandora_agents/win32/pandora.cc                | 2 +-
 pandora_agents/win32/versioninfo.rc            | 2 +-
 pandora_console/DEBIAN/control                 | 2 +-
 pandora_console/DEBIAN/make_deb_package.sh     | 2 +-
 pandora_console/include/config_process.php     | 2 +-
 pandora_console/install.php                    | 2 +-
 pandora_console/pandora_console.redhat.spec    | 2 +-
 pandora_console/pandora_console.spec           | 2 +-
 pandora_console/pandoradb.data.oracle.sql      | 2 +-
 pandora_server/DEBIAN/control                  | 2 +-
 pandora_server/DEBIAN/make_deb_package.sh      | 2 +-
 pandora_server/lib/PandoraFMS/Config.pm        | 2 +-
 pandora_server/pandora_server.redhat.spec      | 2 +-
 pandora_server/pandora_server.spec             | 2 +-
 pandora_server/pandora_server_installer        | 2 +-
 pandora_server/util/pandora_db.pl              | 2 +-
 pandora_server/util/pandora_manage.pl          | 2 +-
 24 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 14caba0098..099492fe58 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-agent-unix
-Version: 6.0SP3-160925
+Version: 6.0SP3-160926
 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 35aeea3fe1..5fb770f5cb 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="6.0SP3-160925"
+pandora_version="6.0SP3-160926"
 
 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/pandora_agent b/pandora_agents/unix/pandora_agent
index c9efb64e1f..538219fc97 100644
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -41,7 +41,7 @@ my $Sem = undef;
 my $ThreadSem = undef;
 
 use constant AGENT_VERSION => '6.0SP3';
-use constant AGENT_BUILD => '160925';
+use constant AGENT_BUILD => '160926';
 
 # 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 24d81b249d..cb936a174f 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     6.0SP3
-%define release     160925
+%define release     160926
 
 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 67c8fa646b..e62278e9bb 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     6.0SP3
-%define release     160925
+%define release     160926
 
 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 637610cd4c..3b83467ba7 100644
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
 # **********************************************************************
 
 PI_VERSION="6.0SP3"
-PI_BUILD="160925"
+PI_BUILD="160926"
 OS_NAME=`uname -s`
 
 FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 30908b98a4..9eb79553d4 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
 {}
 
 Version
-{160925}
+{160926}
 
 ViewReadme
 {Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 6a03f68460..b46bdbd516 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 ("6.0SP3(Build 160925)")
+#define PANDORA_VERSION ("6.0SP3(Build 160926)")
 
 string pandora_path;
 string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index d406b7e6c8..5a46383670 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", "(6.0SP3(Build 160925))"
+      VALUE "ProductVersion", "(6.0SP3(Build 160926))"
       VALUE "FileVersion", "1.0.0.0"
     END
   END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index a123649d3e..f29819feeb 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-console
-Version: 6.0SP3-160925
+Version: 6.0SP3-160926
 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 7f1696d973..8855211f71 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="6.0SP3-160925"
+pandora_version="6.0SP3-160926"
 
 package_pear=0
 package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index b5546c88c3..42cec5495e 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -22,7 +22,7 @@
 /**
  * Pandora build version and version 
  */
-$build_version = 'PC160925';
+$build_version = 'PC160926';
 $pandora_version = 'v6.0SP3';
 
 // Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index f310bd1b95..e2c84b952f 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -71,7 +71,7 @@
 		<div style='height: 10px'>
 			<?php
 $version = '6.0SP3';
-$build = '160925';
+$build = '160926';
 			$banner = "v$version Build $build";
 			
 			error_reporting(0);
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index a703403686..2147459ab5 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     6.0SP3
-%define release     160925
+%define release     160926
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index 9429bae095..bd14e457c8 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     6.0SP3
-%define release     160925
+%define release     160926
 %define httpd_name      httpd
 # User and Group under which Apache is running
 %define httpd_name  apache2
diff --git a/pandora_console/pandoradb.data.oracle.sql b/pandora_console/pandoradb.data.oracle.sql
index 2a9e5b53ba..a4c588b84a 100644
--- a/pandora_console/pandoradb.data.oracle.sql
+++ b/pandora_console/pandoradb.data.oracle.sql
@@ -65,7 +65,7 @@ INSERT INTO tconfig (token, value) VALUES ('graph_res','5');
 INSERT INTO tconfig (token, value) VALUES ('step_compact','1');
 INSERT INTO tconfig (token, value) VALUES ('db_scheme_first_version','6.0orc');
 INSERT INTO tconfig (token, value) VALUES('db_scheme_version','6.0SP3');
-INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD160925');
+INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD160926');
 INSERT INTO tconfig (token, value) VALUES ('show_unknown','0');
 INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1');
 INSERT INTO tconfig (token, value) VALUES ('style','pandora');
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index cc5f412c1a..0e6285c0c4 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-server
-Version: 6.0SP3-160925
+Version: 6.0SP3-160926
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index e5a4105415..f6598ddf0e 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/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="6.0SP3-160925"
+pandora_version="6.0SP3-160926"
 
 package_cpan=0
 package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index fc91279c98..7284da86a3 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -43,7 +43,7 @@ our @EXPORT = qw(
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "6.0SP3";
-my $pandora_build = "160925";
+my $pandora_build = "160926";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 # Setup hash
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index c58846c9c5..c2a604c9dc 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     6.0SP3
-%define release     160925
+%define release     160926
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index 26c9a85fc4..aac561a06e 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     6.0SP3
-%define release     160925
+%define release     160926
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index b906a00d65..bab240bd37 100644
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
 # **********************************************************************
 
 PI_VERSION="6.0SP3"
-PI_BUILD="160925"
+PI_BUILD="160926"
 
 MODE=$1
 if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 412890ace0..1e014a972d 100644
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -33,7 +33,7 @@ use PandoraFMS::Tools;
 use PandoraFMS::DB;
 
 # version: define current version
-my $version = "6.0SP3 PS160925";
+my $version = "6.0SP3 PS160926";
 
 # Pandora server configuration
 my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 24c4c252b3..068683b8ec 100644
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -35,7 +35,7 @@ use Encode::Locale;
 Encode::Locale::decode_argv;
 
 # version: define current version
-my $version = "6.0SP3 PS160925";
+my $version = "6.0SP3 PS160926";
 
 # save program name for logging
 my $progname = basename($0);

From 955860be29c8980bfed67fcdbe106e6427b839ea Mon Sep 17 00:00:00 2001
From: cesar991 <cesar.espinosa@artica.es>
Date: Mon, 26 Sep 2016 11:27:19 +0200
Subject: [PATCH 12/12] Add network_component_functions.py file

(cherry picked from commit 5d1c8d27fd8a86e9acd369095133fd68ff1aa6ed)
---
 .../include/network_components_functions.py   | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 tests/console/include/network_components_functions.py

diff --git a/tests/console/include/network_components_functions.py b/tests/console/include/network_components_functions.py
new file mode 100644
index 0000000000..7bf9df0e75
--- /dev/null
+++ b/tests/console/include/network_components_functions.py
@@ -0,0 +1,79 @@
+# -*- coding: utf-8 -*-
+from selenium import selenium
+from selenium.webdriver.common.by import By
+from selenium.webdriver.support.ui import WebDriverWait, Select
+from selenium.webdriver.support import expected_conditions as EC
+from agent_functions import search_agent
+from common_functions_60 import *
+
+import random, time
+import string
+
+
+def create_network_component_tcp(driver,name,type_component,group,module_group,min_warning=None,max_warning=None,description=None):
+
+
+	# type_component is for example -> Remote ICMP network agent (latency) or Remote TCP network agent, numeric data	
+
+	click_menu_element(driver,"Network components")
+
+	driver.find_element_by_id("id_component_type").click()
+	Select(driver.find_element_by_id("id_component_type")).select_by_visible_text("Create a new network component")
+
+	driver.find_element_by_id("text-name").click()
+	driver.find_element_by_id("text-name").clear()
+	driver.find_element_by_id("text-name").send_keys(name)
+
+	driver.find_element_by_id("type").click()
+	Select(driver.find_element_by_id("type")).select_by_visible_text(type_component)
+
+	driver.find_element_by_id("id_group").click()
+	Select(driver.find_element_by_id("id_group")).select_by_visible_text(group)
+	
+	driver.find_element_by_id("id_module_group").click()
+	Select(driver.find_element_by_id("id_module_group")).select_by_visible_text(module_group)
+
+	if min_warning != None:
+
+		driver.find_element_by_id("text-min_warning").click()
+		driver.find_element_by_id("text-min_warning").clear()
+		driver.find_element_by_id("text-min_warning").send_keys(min_warning)
+
+	if max_warning != None:
+		
+		driver.find_element_by_id("text-max_warning").click()
+		driver.find_element_by_id("text-max_warning").clear()
+		driver.find_element_by_id("text-max_warning").send_keys(max_warning)
+
+	if min_critical != None:
+
+		driver.find_element_by_id("text-min_critical").click()
+		driver.find_element_by_id("text-min_critical").clear()
+		driver.find_element_by_id("text-min_critical").send_keys(min_critical)
+
+	if max_critical != None:
+
+		driver.find_element_by_id("text-max_critical").click()
+		driver.find_element_by_id("text-max_critical").clear()
+		driver.find_element_by_id("text-max_critical").send_keys(max_critical)
+
+	if str_warning != None:
+		
+		driver.find_element_by_id("text-str_warning").click()
+		driver.find_element_by_id("text-str_warning").clear()
+		driver.find_element_by_id("text-str_warning").send_keys(str_warning)
+
+	if str_critical != None:
+		
+		driver.find_element_by_id("text-str_critical").click()
+		driver.find_element_by_id("text-str_critical").clear()
+		driver.find_element_by_id("text-str_critical").send_keys(str_critical)
+	
+	if description != None:
+
+		driver.find_element_by_id("textarea_description").click()
+		driver.find_element_by_id("textarea_description").clear()
+		driver.find_element_by_id("textarea_description").send_keys(description)
+
+	driver.find_element_by_id("submit-crt").click()
+