Merge remote-tracking branch 'origin/develop' into ent-4457-bug-visual-style-font

This commit is contained in:
marcos.alconada 2019-09-05 12:03:37 +02:00
commit 9e4b5ca5c8
151 changed files with 1913 additions and 1296 deletions

View File

@ -9,7 +9,7 @@ $(document).ready(function(){
// Display the information // Display the information
if (bg.fetchEvents().length == 0) { if (bg.fetchEvents().length == 0) {
showError("Error in fetching data!! Check your internet connection"); showError("No events");
} else { } else {
showEvents(); showEvents();
} }
@ -34,7 +34,9 @@ $(document).ready(function(){
break; break;
case "FETCH_EVENTS_URL_ERROR": case "FETCH_EVENTS_URL_ERROR":
unsetSpinner(); unsetSpinner();
showError("Configure ip address,API password, user name and password with correct values"); showError(
"Configure ip address,API password, user name and password with correct values"
);
break; break;
default: default:
console.log("Unrecognized message: ", message.text); console.log("Unrecognized message: ", message.text);
@ -44,94 +46,100 @@ $(document).ready(function(){
}); });
function setSpinner() { function setSpinner() {
$('#refr_img_id').attr("src", "images/spinny.gif"); $("#refr_img_id").attr("src", "images/spinny.gif");
} }
function unsetSpinner() { function unsetSpinner() {
$('#refr_img_id').attr("src", "images/refresh.png"); $("#refr_img_id").attr("src", "images/refresh.png");
} }
function clearError() { function clearError() {
$('.error').hide(); $(".error").hide();
$('.error a').text(""); $(".error a").text("");
$('.result').css('height', null); $(".result").css("height", null);
} }
function showError(text) { function showError(text) {
$('.error a').text(text); $(".error a").text(text);
$('.error').show(); $(".error").show();
$('.result').height(420); $(".result").height(420);
} }
function showEvents() { function showEvents() {
clearError(); clearError();
$('#events').empty(); $("#events").empty();
var e_refr = document.getElementById('event_temp'); var e_refr = document.getElementById("event_temp");
if (e_refr) { if (e_refr) {
wrapper.removeChild(e_refr); wrapper.removeChild(e_refr);
} }
var allEvents = bg.fetchEvents(); var allEvents = bg.fetchEvents();
var notVisitedEvents = bg.fetchNotVisited(); var notVisitedEvents = bg.fetchNotVisited();
var eve=document.createElement('div'); var eve = document.createElement("div");
eve.id = "event_temp"; eve.id = "event_temp";
eve.setAttribute("class", "b"); eve.setAttribute("class", "b");
var i = 0; var i = 0;
if (allEvents.length > 0) { if (allEvents.length > 0) {
while (i < max_events && i < allEvents.length) { while (i < max_events && i < allEvents.length) {
var eve_title=document.createElement('div'); var eve_title = document.createElement("div");
eve_title.id = 'e_' + i + '_' + allEvents[i]['id']; eve_title.id = "e_" + i + "_" + allEvents[i]["id"];
var img = document.createElement('img'); var img = document.createElement("img");
img.src = 'images/plus.png'; img.src = "images/plus.png";
img.className ='pm'; img.className = "pm";
img.id='i_' + i + '_' + allEvents[i]['id']; img.id = "i_" + i + "_" + allEvents[i]["id"];
eve_title.appendChild(img); eve_title.appendChild(img);
var div_empty = document.createElement('img'); var div_empty = document.createElement("img");
var a = document.createElement('a'); var a = document.createElement("a");
var temp_style; var temp_style;
var agent_url = (allEvents[i]["agent"] == 0) var agent_url =
? localStorage["ip_address"] allEvents[i]["agent"] == 0
+ "/index.php?sec=eventos&sec2=operation/events/events" ? localStorage["ip_address"] +
: localStorage["ip_address"] "/index.php?sec=eventos&sec2=operation/events/events"
+ "/index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=" : localStorage["ip_address"] +
+ allEvents[i]['agent']; "/index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=" +
allEvents[i]["agent"];
a.setAttribute("href", agent_url); a.setAttribute("href", agent_url);
a.target = "_blank"; a.target = "_blank";
a.className = 'a_2_mo'; a.className = "a_2_mo";
a.innerText = allEvents[i]["title"];
eve_title.setAttribute("class", "event sev-" + allEvents[i]["severity"]);
a.innerText = allEvents[i]['title']; if (notVisitedEvents[allEvents[i]["id"]] === true) {
eve_title.setAttribute("class","event sev-" + allEvents[i]['severity']);
if (notVisitedEvents[allEvents[i]['id']] === true) {
eve_title.style.fontWeight = 600; eve_title.style.fontWeight = 600;
} }
eve_title.appendChild(a); eve_title.appendChild(a);
eve.appendChild(eve_title); eve.appendChild(eve_title);
var time=allEvents[i]['date'].split(" "); var time = allEvents[i]["date"].split(" ");
var time_text = time[0] + " " + time[1]; var time_text = time[0] + " " + time[1];
var p = document.createElement('p'); var p = document.createElement("p");
var id = (allEvents[i]['module']==0) var id =
allEvents[i]["module"] == 0
? "." ? "."
: " in the module with Id "+ allEvents[i]['module'] + "."; : " in the module with Id " + allEvents[i]["module"] + ".";
p.innerText = allEvents[i]['type']+" : "+allEvents[i]['source']+". Event occured at "+ time_text+id; p.innerText =
p.id = 'p_' + i; allEvents[i]["type"] +
" : " +
allEvents[i]["source"] +
". Event occured at " +
time_text +
id;
p.id = "p_" + i;
eve_title.appendChild(p); eve_title.appendChild(p);
i++; i++;
} }
$('#events').append(eve); $("#events").append(eve);
$('img.pm').click(showHide); $("img.pm").click(showHide);
$('div.b').show(); $("div.b").show();
} else { } else {
showError("Error in fetching data!! Check your internet connection"); showError("No events");
} }
localStorage["new_events"] = 0; localStorage["new_events"] = 0;
@ -139,25 +147,30 @@ function showEvents(){
} }
function showHide() { function showHide() {
var id = $(this).attr('id'); var id = $(this).attr("id");
// Image id has the form i_<position>_<eventId> // Image id has the form i_<position>_<eventId>
var nums = id.split('_'); var nums = id.split("_");
var pid = "p_" + nums[1]; var pid = "p_" + nums[1];
// Mark as visited if visited // Mark as visited if visited
if($(this).parent().css('font-weight') == '600') { if (
$(this)
.parent()
.css("font-weight") == "600"
) {
bg.removeNotVisited(nums[2]); bg.removeNotVisited(nums[2]);
$(this).parent().css('font-weight', ''); $(this)
.parent()
.css("font-weight", "");
} }
// Toggle information // Toggle information
if($('#' + pid).css('display') == 'none') { if ($("#" + pid).css("display") == "none") {
$('#' + pid).slideDown(); $("#" + pid).slideDown();
$(this).attr({src: 'images/minus.png'}); $(this).attr({ src: "images/minus.png" });
} } else {
else { $("#" + pid).slideUp();
$('#' + pid).slideUp(); $(this).attr({ src: "images/plus.png" });
$(this).attr({src: 'images/plus.png'});
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "__MSG_name__", "name": "__MSG_name__",
"version": "2.1", "version": "2.2",
"manifest_version": 2, "manifest_version": 2,
"description": "Pandora FMS Event viewer Chrome extension", "description": "Pandora FMS Event viewer Chrome extension",
"homepage_url": "http://pandorafms.com", "homepage_url": "http://pandorafms.com",

View File

@ -14,6 +14,7 @@ RUN yum -y install \
# Install Pandora FMS agent # Install Pandora FMS agent
RUN cd /tmp/pandora_agent/unix \ RUN cd /tmp/pandora_agent/unix \
&& chmod +x pandora_agent_installer \
&& ./pandora_agent_installer --install && ./pandora_agent_installer --install
# Set default variables # Set default variables
@ -40,7 +41,7 @@ if [ $TIMEZONE != "" ]; then\n \
fi\n \ fi\n \
/etc/init.d/pandora_agent_daemon start\n \ /etc/init.d/pandora_agent_daemon start\n \
rm -f $0\n \ rm -f $0\n \
bash' \ tail -f /var/log/pandora/pandora_agent.log' \
>> /entrypoint.sh && \ >> /entrypoint.sh && \
chmod +x /entrypoint.sh chmod +x /entrypoint.sh

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, AIX version # Version 7.0NG.738, AIX version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, FreeBSD Version # Version 7.0NG.738, FreeBSD Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, HP-UX Version # Version 7.0NG.738, HP-UX Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, GNU/Linux # Version 7.0NG.738, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, GNU/Linux # Version 7.0NG.738, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, Solaris Version # Version 7.0NG.738, Solaris Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent # Base config file for Pandora FMS Windows Agent
# (c) 2006-2010 Artica Soluciones Tecnologicas # (c) 2006-2010 Artica Soluciones Tecnologicas
# Version 7.0NG.737 # Version 7.0NG.738
# This program is Free Software, you can redistribute it and/or modify it # 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 # under the terms of the GNU General Public Licence as published by the Free Software

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.737, AIX version # Version 7.0NG.738, AIX version
# General Parameters # General Parameters
# ================== # ==================

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.737 # Version 7.0NG.738
# FreeBSD/IPSO version # FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena # Licenced under GPL licence, 2003-2007 Sancho Lerena

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.737, HPUX Version # Version 7.0NG.738, HPUX Version
# General Parameters # General Parameters
# ================== # ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737 # Version 7.0NG.738
# Licensed under GPL license v2, # Licensed under GPL license v2,
# (c) 2003-2010 Artica Soluciones Tecnologicas # (c) 2003-2010 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net # please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737 # Version 7.0NG.738
# Licensed under GPL license v2, # Licensed under GPL license v2,
# (c) 2003-2009 Artica Soluciones Tecnologicas # (c) 2003-2009 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net # please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737 # Version 7.0NG.738
# Licensed under GPL license v2, # Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net # please visit http://pandora.sourceforge.net

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.737, Solaris version # Version 7.0NG.738, Solaris version
# General Parameters # General Parameters
# ================== # ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, AIX version # Version 7.0NG.738, AIX version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.737-190806 Version: 7.0NG.738-190905
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.737-190806" pandora_version="7.0NG.738-190905"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, GNU/Linux # Version 7.0NG.738, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas # Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, FreeBSD Version # Version 7.0NG.738, FreeBSD Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas # Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, HP-UX Version # Version 7.0NG.738, HP-UX Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, GNU/Linux # Version 7.0NG.738, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas # Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, GNU/Linux # Version 7.0NG.738, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, NetBSD Version # Version 7.0NG.738, NetBSD Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.737, Solaris Version # Version 7.0NG.738, Solaris Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -41,8 +41,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads # Semaphore used to control the number of threads
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.737'; use constant AGENT_VERSION => '7.0NG.738';
use constant AGENT_BUILD => '190806'; use constant AGENT_BUILD => '190905';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent #Pandora FMS Linux Agent
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.737 %define version 7.0NG.738
%define release 190806 %define release 190905
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent #Pandora FMS Linux Agent
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.737 %define version 7.0NG.738
%define release 190806 %define release 190905
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -9,8 +9,8 @@
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.737" PI_VERSION="7.0NG.738"
PI_BUILD="190806" PI_BUILD="190905"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent # Base config file for Pandora FMS Windows Agent
# (c) 2006-2017 Artica Soluciones Tecnologicas # (c) 2006-2017 Artica Soluciones Tecnologicas
# Version 7.0NG.737 # Version 7.0NG.738
# This program is Free Software, you can redistribute it and/or modify it # 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 # under the terms of the GNU General Public Licence as published by the Free Software

View File

@ -3,7 +3,7 @@ AllowLanguageSelection
{Yes} {Yes}
AppName AppName
{Pandora FMS Windows Agent v7.0NG.737} {Pandora FMS Windows Agent v7.0NG.738}
ApplicationID ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F} {17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{190806} {190905}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -1214,7 +1214,8 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
module_source, module_source,
module_eventtype, module_eventtype,
module_eventcode, module_eventcode,
module_pattern); module_pattern,
module_application);
} else if (module_wmiquery != "") { } else if (module_wmiquery != "") {
module = new Pandora_Module_WMIQuery (module_name, module = new Pandora_Module_WMIQuery (module_name,
module_wmiquery, module_wmicolumn); module_wmiquery, module_wmicolumn);

View File

@ -53,7 +53,7 @@ static EvtUpdateBookmarkT EvtUpdateBookmarkF = NULL;
* @param name Module name. * @param name Module name.
* @param service_name Service internal name to check. * @param service_name Service internal name to check.
*/ */
Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern) Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern, string application)
: Pandora_Module (name) { : Pandora_Module (name) {
int i; int i;
vector<wstring> query; vector<wstring> query;
@ -93,6 +93,13 @@ Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source
query.push_back(ss.str()); query.push_back(ss.str());
} }
// Set the application
if (application != "") {
wstringstream ss;
ss << L"*[System/Provider[@Name='" << application.c_str() << L"']]";
query.push_back(ss.str());
}
// Fill the filter // Fill the filter
if (query.size() == 0) { if (query.size() == 0) {
this->filter = L"*"; this->filter = L"*";

View File

@ -75,7 +75,7 @@ namespace Pandora_Modules {
LPWSTR GetMessageString(EVT_HANDLE hMetadata, EVT_HANDLE hEvent, EVT_FORMAT_MESSAGE_FLAGS FormatId); LPWSTR GetMessageString(EVT_HANDLE hMetadata, EVT_HANDLE hEvent, EVT_FORMAT_MESSAGE_FLAGS FormatId);
public: public:
Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern); Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern, string application);
void run (); void run ();
}; };
} }

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.737(Build 190806)") #define PANDORA_VERSION ("7.0NG.738(Build 190905)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.737(Build 190806))" VALUE "ProductVersion", "(7.0NG.738(Build 190905))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.737-190806 Version: 7.0NG.738-190905
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.737-190806" pandora_version="7.0NG.738-190905"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -1,5 +1,7 @@
START TRANSACTION; START TRANSACTION;
UPDATE `tconfig` SET `value` = 'mini_severity,evento,id_agente,estado,timestamp' WHERE `token` LIKE 'event_fields';
DELETE FROM `talert_commands` WHERE `id` = 11; DELETE FROM `talert_commands` WHERE `id` = 11;
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_enabled'; DELETE FROM `tconfig` WHERE `token` LIKE 'integria_enabled';

View File

@ -1243,7 +1243,7 @@ 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 ('big_operation_step_datos_purge', '100');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); 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 ('days_autodisable_deletion', '30');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 30); INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 31);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png'); 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_support_logo', 'default_support.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
@ -1251,6 +1251,7 @@ UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.ph
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise'; DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '737'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '737');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
UPDATE `tconfig` SET `value` = 'mini_severity,evento,id_agente,estado,timestamp' WHERE `token` LIKE 'event_fields';
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_enabled'; DELETE FROM `tconfig` WHERE `token` LIKE 'integria_enabled';
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password'; DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password';
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_inventory'; DELETE FROM `tconfig` WHERE `token` LIKE 'integria_inventory';

View File

@ -389,9 +389,12 @@ if (isset($login_failed)) {
echo '<h1>'.__('ERROR').'</h1>'; echo '<h1>'.__('ERROR').'</h1>';
echo '<p>'.$config['auth_error'].'</p>'; echo '<p>'.$config['auth_error'].'</p>';
echo '</div>'; echo '</div>';
if ($config['enable_pass_policy']) {
echo '<div class="text_message_alert">'; echo '<div class="text_message_alert">';
echo '<p><strong>Remaining attempts: '.$attemps.'</strong></p>'; echo '<p><strong>Remaining attempts: '.$attemps.'</strong></p>';
echo '</div>'; echo '</div>';
}
echo '<div class="button_message_alert">'; echo '<div class="button_message_alert">';
html_print_submit_button('Ok', 'hide-login-error', false); html_print_submit_button('Ok', 'hide-login-error', false);
echo '</div>'; echo '</div>';

View File

@ -172,6 +172,7 @@ unset($table);
echo '<div id="right">'; echo '<div id="right">';
// News. // News.
require_once 'general/news_dialog.php';
$options = []; $options = [];
$options['id_user'] = $config['id_user']; $options['id_user'] = $config['id_user'];
$options['modal'] = false; $options['modal'] = false;
@ -188,6 +189,7 @@ if (!empty($news)) {
$comparation_suffix = __('ago'); $comparation_suffix = __('ago');
} }
$output_news = '<div id="news_board" class="new">'; $output_news = '<div id="news_board" class="new">';
foreach ($news as $article) { foreach ($news as $article) {
$image = false; $image = false;

View File

@ -804,7 +804,7 @@ $table_adv_options .= '
'.$table_adv_gis.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.' '.$table_adv_gis.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.'
</div>'; </div>';
if (enterprise_installed()) {
echo '<div class="ui_toggle">'; echo '<div class="ui_toggle">';
ui_toggle( ui_toggle(
$table_adv_options, $table_adv_options,
@ -817,7 +817,7 @@ ui_toggle(
'no-border flex' 'no-border flex'
); );
echo '</div>'; echo '</div>';
}
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
@ -825,7 +825,7 @@ $table->class = 'custom_fields_table';
$table->head = [ $table->head = [
0 => __('Click to display').ui_print_help_tip( 0 => __('Click to display').ui_print_help_tip(
__('This field allows url insertion using the BBCode\'s url tag').'.<br />'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.<br /><br />'.__('e.g.: [url=google.com]Google web search[/url]'), __('This field allows url insertion using the BBCode\'s url tag').'.<br />'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url] or [url]\'url to navigate\'[/url] ').'.<br /><br />'.__('e.g.: [url=google.com]Google web search[/url] or [url]www.goole.com[/url]'),
true true
), ),
]; ];
@ -931,6 +931,7 @@ foreach ($fields as $field) {
$i += 2; $i += 2;
} }
if (enterprise_installed()) {
if (!empty($fields)) { if (!empty($fields)) {
echo '<div class="ui_toggle">'; echo '<div class="ui_toggle">';
ui_toggle( ui_toggle(
@ -945,6 +946,35 @@ if (!empty($fields)) {
); );
echo '</div>'; echo '</div>';
} }
} else {
echo '<div class="ui_toggle">';
ui_toggle(
$table_adv_options,
__('Advanced options'),
'',
'',
true,
false,
'white_box white_box_opened',
'no-border flex'
);
if (!empty($fields)) {
ui_toggle(
html_print_table($table, true),
__('Custom fields'),
'',
'',
true,
false,
'white_box white_box_opened',
'no-border'
);
}
echo '<div class="action-buttons" style="display: flex; justify-content: flex-end; align-items: center; width: '.$table->width.'">';
echo '</div>';
}
echo '<div class="action-buttons" style="display: flex; justify-content: flex-end; align-items: center; width: '.$table->width.'">'; echo '<div class="action-buttons" style="display: flex; justify-content: flex-end; align-items: center; width: '.$table->width.'">';

View File

@ -1559,8 +1559,14 @@ if ($update_module) {
foreach ($plugin_parameter_split as $key => $value) { foreach ($plugin_parameter_split as $key => $value) {
if ($key == 1) { if ($key == 1) {
if ($http_user) {
$values['plugin_parameter'] .= 'http_auth_user&#x20;'.$http_user.'&#x0a;'; $values['plugin_parameter'] .= 'http_auth_user&#x20;'.$http_user.'&#x0a;';
}
if ($http_pass) {
$values['plugin_parameter'] .= 'http_auth_pass&#x20;'.$http_pass.'&#x0a;'; $values['plugin_parameter'] .= 'http_auth_pass&#x20;'.$http_pass.'&#x0a;';
}
$values['plugin_parameter'] .= $value.'&#x0a;'; $values['plugin_parameter'] .= $value.'&#x0a;';
} else { } else {
$values['plugin_parameter'] .= $value.'&#x0a;'; $values['plugin_parameter'] .= $value.'&#x0a;';
@ -1757,8 +1763,14 @@ if ($create_module) {
foreach ($plugin_parameter_split as $key => $value) { foreach ($plugin_parameter_split as $key => $value) {
if ($key == 1) { if ($key == 1) {
if ($http_user) {
$values['plugin_parameter'] .= 'http_auth_user&#x20;'.$http_user.'&#x0a;'; $values['plugin_parameter'] .= 'http_auth_user&#x20;'.$http_user.'&#x0a;';
}
if ($http_pass) {
$values['plugin_parameter'] .= 'http_auth_pass&#x20;'.$http_pass.'&#x0a;'; $values['plugin_parameter'] .= 'http_auth_pass&#x20;'.$http_pass.'&#x0a;';
}
$values['plugin_parameter'] .= $value.'&#x0a;'; $values['plugin_parameter'] .= $value.'&#x0a;';
} else { } else {
$values['plugin_parameter'] .= $value.'&#x0a;'; $values['plugin_parameter'] .= $value.'&#x0a;';

View File

@ -232,10 +232,17 @@ $table->data[0][0] = '<b>'.__('Filter name').'</b>';
$table->data[0][1] = html_print_input_text('id_name', $id_name, false, 20, 80, true); $table->data[0][1] = html_print_input_text('id_name', $id_name, false, 20, 80, true);
$table->data[1][0] = '<b>'.__('Save in group').'</b>'.ui_print_help_tip(__('This group will be use to restrict the visibility of this filter with ACLs'), true); $table->data[1][0] = '<b>'.__('Save in group').'</b>'.ui_print_help_tip(__('This group will be use to restrict the visibility of this filter with ACLs'), true);
$returnAllGroup = users_can_manage_group_all();
// If the user can't manage All group but the filter is for All group, the user should see All group in the select.
if ($returnAllGroup === false && $id_group_filter == 0) {
$returnAllGroup = true;
}
$table->data[1][1] = html_print_select_groups( $table->data[1][1] = html_print_select_groups(
$config['id_user'], $config['id_user'],
$access, $access,
users_can_manage_group_all(), $returnAllGroup,
'id_group_filter', 'id_group_filter',
$id_group_filter, $id_group_filter,
'', '',

View File

@ -93,10 +93,11 @@ if ($strict_acl) {
users_can_manage_group_all() users_can_manage_group_all()
); );
} else { } else {
// All users should see the filters with the All group.
$groups_user = users_get_groups( $groups_user = users_get_groups(
$config['id_user'], $config['id_user'],
$access, $access,
users_can_manage_group_all(), true,
true true
); );
} }

View File

@ -143,12 +143,12 @@ $table->data[3] = $data;
$data = []; $data = [];
$data[0] = '<span id="command_label" class="labels">'.__('Command').'</span><span id="url_label" style="display:none;" class="labels">'.__('URL').'</span>'.ui_print_help_icon('response_macros', true); $data[0] = '<span id="command_label" class="labels">'.__('Command').'</span><span id="url_label" style="display:none;" class="labels">'.__('URL').'</span>'.ui_print_help_icon('response_macros', true);
$data[1] = html_print_input_text( $data[1] = html_print_textarea(
'target', 'target',
3,
1,
$event_response['target'], $event_response['target'],
'', 'style="min-height:initial;"',
100,
255,
true true
); );

View File

@ -700,7 +700,7 @@ if ($fields === false) {
foreach ($fields as $field) { foreach ($fields as $field) {
$data[0] = '<b>'.$field['name'].'</b>'; $data[0] = '<b>'.$field['name'].'</b>';
$data[0] .= ui_print_help_tip( $data[0] .= ui_print_help_tip(
__('This field allows url insertion using the BBCode\'s url tag').'.<br />'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.<br /><br />'.__('e.g.: [url=google.com]Google web search[/url]'), __('This field allows url insertion using the BBCode\'s url tag').'.<br />'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url] or [url]\'url to navigate\'[/url] ').'.<br /><br />'.__('e.g.: [url=google.com]Google web search[/url] or [url]www.goole.com[/url]'),
true true
); );
$combo = []; $combo = [];

View File

@ -1317,7 +1317,7 @@ $class = 'databox filters';
if (metaconsole_load_external_db($connection) == NOERR) { if (metaconsole_load_external_db($connection) == NOERR) {
$agent_name = db_get_value_filter( $agent_name = db_get_value_filter(
'nombre', 'alias',
'tagente', 'tagente',
['id_agente' => $idAgent] ['id_agente' => $idAgent]
); );

View File

@ -267,7 +267,7 @@ if ($moduleFilter != 0) {
// Filter report items created from metaconsole in normal console list and the opposite // Filter report items created from metaconsole in normal console list and the opposite
if (defined('METACONSOLE') and $config['metaconsole'] == 1) { if (defined('METACONSOLE') and $config['metaconsole'] == 1) {
$where .= ' AND ((server_name IS NOT NULL AND length(server_name) != 0) '.'OR '.$type_escaped.' IN (\'general\', \'SLA\', \'exception\', \'availability\', \'availability_graph\', \'top_n\',\'SLA_monthly\',\'SLA_weekly\',\'SLA_hourly\'))'; $where .= ' AND ((server_name IS NOT NULL AND length(server_name) != 0) '.'OR '.$type_escaped.' IN (\'general\', \'SLA\', \'exception\', \'availability\', \'availability_graph\', \'top_n\',\'SLA_monthly\',\'SLA_weekly\',\'SLA_hourly\',\'text\'))';
} else { } else {
$where .= ' AND ((server_name IS NULL OR length(server_name) = 0) '.'OR '.$type_escaped.' IN (\'general\', \'SLA\', \'exception\', \'availability\', \'top_n\'))'; $where .= ' AND ((server_name IS NULL OR length(server_name) = 0) '.'OR '.$type_escaped.' IN (\'general\', \'SLA\', \'exception\', \'availability\', \'top_n\'))';
} }
@ -342,7 +342,7 @@ if ($items) {
$table->size[0] = '5px'; $table->size[0] = '5px';
$table->size[1] = '15%'; $table->size[1] = '15%';
$table->size[4] = '8%'; $table->size[4] = '8%';
$table->size[6] = '90px'; $table->size[6] = '120px';
$table->size[7] = '30px'; $table->size[7] = '30px';
$table->head[0] = '<span title="'.__('Position').'">'.__('P.').'</span>'; $table->head[0] = '<span title="'.__('Position').'">'.__('P.').'</span>';

View File

@ -1,4 +1,22 @@
<script type="text/javascript"> <script type="text/javascript">
function dialog_message(message_id) {
$(message_id)
.css("display", "inline")
.dialog({
modal: true,
show: "blind",
hide: "blind",
width: "400px",
buttons: {
Close: function() {
$(this).dialog("close");
}
}
});
}
function check_all_checkboxes() { function check_all_checkboxes() {
if ($("input[name=all_delete]").prop("checked")) { if ($("input[name=all_delete]").prop("checked")) {
$(".check_delete").prop("checked", true); $(".check_delete").prop("checked", true);
@ -578,7 +596,7 @@ switch ($action) {
break; break;
} }
if (! $delete) { if (! $delete && !empty($type_access_selected)) {
db_pandora_audit( db_pandora_audit(
'ACL Violation', 'ACL Violation',
'Trying to access report builder deletion' 'Trying to access report builder deletion'

View File

@ -100,7 +100,15 @@ if ($update_filter > -2) {
'filter' => $filter, 'filter' => $filter,
'unified_filters_id' => $new_unified_id, 'unified_filters_id' => $new_unified_id,
]; ];
if ($values['description'] == '') {
$result = false;
$msg = __('Description is empty');
} else if ($values['filter'] == '') {
$result = false;
$msg = __('Filter is empty');
} else {
$result = db_process_sql_insert('tsnmp_filter', $values); $result = db_process_sql_insert('tsnmp_filter', $values);
}
} else { } else {
for ($i = 0; $i < $index_post; $i++) { for ($i = 0; $i < $index_post; $i++) {
$filter = get_parameter('filter_'.$i); $filter = get_parameter('filter_'.$i);
@ -109,12 +117,28 @@ if ($update_filter > -2) {
'filter' => $filter, 'filter' => $filter,
'unified_filters_id' => $new_unified_id, 'unified_filters_id' => $new_unified_id,
]; ];
if ($values['filter'] != '' && $values['description'] != '') {
$result = db_process_sql_insert('tsnmp_filter', $values); $result = db_process_sql_insert('tsnmp_filter', $values);
} }
} }
if ($result === null) {
if ($values['description'] != '') {
$result = false;
$msg = __('Filters are empty');
} else {
$result = false;
$msg = __('Description is empty');
}
}
}
if ($result === false) { if ($result === false) {
ui_print_error_message(__('There was a problem creating the filter')); if (!isset($msg)) {
$msg = __('There was a problem creating the filter');
}
ui_print_error_message($msg);
} else { } else {
ui_print_success_message(__('Successfully created')); ui_print_success_message(__('Successfully created'));
} }
@ -215,9 +239,11 @@ if ($edit_filter > -2) {
$result_unified = db_get_all_rows_sql('SELECT DISTINCT(unified_filters_id) FROM tsnmp_filter ORDER BY unified_filters_id ASC'); $result_unified = db_get_all_rows_sql('SELECT DISTINCT(unified_filters_id) FROM tsnmp_filter ORDER BY unified_filters_id ASC');
$aglomerate_result = []; $aglomerate_result = [];
if (is_array($result_unified) === true) {
foreach ($result_unified as $res) { foreach ($result_unified as $res) {
$aglomerate_result[$res['unified_filters_id']] = db_get_all_rows_sql('SELECT * FROM tsnmp_filter WHERE unified_filters_id = '.$res['unified_filters_id'].' ORDER BY id_snmp_filter ASC'); $aglomerate_result[$res['unified_filters_id']] = db_get_all_rows_sql('SELECT * FROM tsnmp_filter WHERE unified_filters_id = '.$res['unified_filters_id'].' ORDER BY id_snmp_filter ASC');
} }
}
$table = new stdClass(); $table = new stdClass();
$table->data = []; $table->data = [];
@ -282,7 +308,8 @@ if ($edit_filter > -2) {
?> ?>
<script type="text/javascript"> <script type="text/javascript">
var id = "<?php echo $index; ?>"; // +1 because there is already a defined 'filter' field.
var id = parseInt("<?php echo $index; ?>")+1;
var homeurl = "<?php echo $config['homeurl']; ?>"; var homeurl = "<?php echo $config['homeurl']; ?>";
$(document).ready (function () { $(document).ready (function () {

View File

@ -31,6 +31,10 @@ $delete = (int) get_parameter('delete_tag', 0);
$tag_name = (string) get_parameter('tag_name', ''); $tag_name = (string) get_parameter('tag_name', '');
$tab = (string) get_parameter('tab', 'list'); $tab = (string) get_parameter('tab', 'list');
if ($delete != 0 && is_metaconsole()) {
open_meta_frame();
}
// Metaconsole nodes // Metaconsole nodes
$servers = false; $servers = false;
if (is_metaconsole()) { if (is_metaconsole()) {
@ -316,6 +320,9 @@ echo '<table border=0 cellpadding=0 cellspacing=0 width=100%>';
echo '</tr>'; echo '</tr>';
echo '</table>'; echo '</table>';
if ($delete != 0 && is_metaconsole()) {
close_meta_frame();
}
// ~ enterprise_hook('close_meta_frame'); // ~ enterprise_hook('close_meta_frame');
?> ?>

View File

@ -31,6 +31,11 @@ global $config;
check_login(); check_login();
if (!enterprise_installed()) {
include 'general/noaccess.php';
exit;
}
if (! check_acl($config['id_user'], 0, 'PM') if (! check_acl($config['id_user'], 0, 'PM')
&& ! is_user_admin($config['id_user']) && ! is_user_admin($config['id_user'])
) { ) {

View File

@ -30,19 +30,21 @@ if ($php_version_array[0] < 7) {
$tab = get_parameter('tab', 'online'); $tab = get_parameter('tab', 'online');
$buttons = [ $buttons['setup'] = [
'setup' => [
'active' => ($tab == 'setup') ? true : false, 'active' => ($tab == 'setup') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options')]).'</a>', 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options')]).'</a>',
], ];
'offline' => [
if (enterprise_installed()) {
$buttons['offline'] = [
'active' => ($tab == 'offline') ? true : false, 'active' => ($tab == 'offline') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offline">'.html_print_image('images/box.png', true, ['title' => __('Offline update manager')]).'</a>', 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offline">'.html_print_image('images/box.png', true, ['title' => __('Offline update manager')]).'</a>',
], ];
'online' => [ }
$buttons['online'] = [
'active' => ($tab == 'online') ? true : false, 'active' => ($tab == 'online') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update manager')]).'</a>', 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update manager')]).'</a>',
],
]; ];

View File

@ -256,6 +256,52 @@ if ($create_user) {
$password_confirm = ''; $password_confirm = '';
$new_user = true; $new_user = true;
} else { } else {
$have_number = false;
$have_simbols = false;
if ($config['enable_pass_policy']) {
if ($config['pass_needs_numbers']) {
$nums = preg_match('/([[:alpha:]])*(\d)+(\w)*/', $password_confirm);
if ($nums == 0) {
ui_print_error_message(__('Password must contain numbers'));
$user_info = $values;
$password_new = '';
$password_confirm = '';
$new_user = true;
} else {
$have_number = true;
}
}
if ($config['pass_needs_symbols']) {
$symbols = preg_match('/(\w)*(\W)+(\w)*/', $password_confirm);
if ($symbols == 0) {
ui_print_error_message(__('Password must contain symbols'));
$user_info = $values;
$password_new = '';
$password_confirm = '';
$new_user = true;
} else {
$have_simbols = true;
}
}
if ($config['pass_needs_symbols'] && $config['pass_needs_numbers']) {
if ($have_number && $have_simbols) {
$result = create_user($id, $password_new, $values);
}
} else if ($config['pass_needs_symbols'] && !$config['pass_needs_numbers']) {
if ($have_simbols) {
$result = create_user($id, $password_new, $values);
}
} else if (!$config['pass_needs_symbols'] && $config['pass_needs_numbers']) {
if ($have_number) {
$result = create_user($id, $password_new, $values);
}
}
} else {
$result = create_user($id, $password_new, $values);
}
$info = '{"Id_user":"'.$values['id_user'].'","FullName":"'.$values['fullname'].'","Firstname":"'.$values['firstname'].'","Lastname":"'.$values['lastname'].'","Email":"'.$values['email'].'","Phone":"'.$values['phone'].'","Comments":"'.$values['comments'].'","Is_admin":"'.$values['is_admin'].'","Language":"'.$values['language'].'","Timezone":"'.$values['timezone'].'","Block size":"'.$values['block_size'].'"'; $info = '{"Id_user":"'.$values['id_user'].'","FullName":"'.$values['fullname'].'","Firstname":"'.$values['firstname'].'","Lastname":"'.$values['lastname'].'","Email":"'.$values['email'].'","Phone":"'.$values['phone'].'","Comments":"'.$values['comments'].'","Is_admin":"'.$values['is_admin'].'","Language":"'.$values['language'].'","Timezone":"'.$values['timezone'].'","Block size":"'.$values['block_size'].'"';
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) { if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
@ -264,7 +310,10 @@ if ($create_user) {
$info .= '}'; $info .= '}';
} }
$result = create_user($id, $password_new, $values); $can_create = false;
if ($result) { if ($result) {
$res = save_pass_history($id, $password_new); $res = save_pass_history($id, $password_new);
} }
@ -575,6 +624,10 @@ if ($delete_profile) {
); );
} }
if ($values) {
$user_info = $values;
}
$table = new stdClass(); $table = new stdClass();
$table->id = 'user_configuration_table'; $table->id = 'user_configuration_table';
$table->width = '100%'; $table->width = '100%';

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Some files were not shown because too many files have changed in this diff Show More