Merge branch 'develop' into 3373-Añadir-opcion-a-mas-parametros-en-api_get_groups

Former-commit-id: b8436e3dcbc1b23de21653fcbaff88c544c79562
This commit is contained in:
alejandro-campos 2019-02-15 13:54:28 +01:00
commit 196de9ae3d
872 changed files with 240435 additions and 211178 deletions

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.730, AIX version # Version 7.0NG.731, 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.730, FreeBSD Version # Version 7.0NG.731, 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.730, HP-UX Version # Version 7.0NG.731, 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.730, GNU/Linux # Version 7.0NG.731, 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.730, GNU/Linux # Version 7.0NG.731, 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.730, Solaris Version # Version 7.0NG.731, 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.730 # Version 7.0NG.731
# 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.730, AIX version # Version 7.0NG.731, 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.730 # Version 7.0NG.731
# 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.730, HPUX Version # Version 7.0NG.731, 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.730 # Version 7.0NG.731
# 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.730 # Version 7.0NG.731
# 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.730 # Version 7.0NG.731
# 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.730, Solaris version # Version 7.0NG.731, 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.730, AIX version # Version 7.0NG.731, 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.730-190114 Version: 7.0NG.731-190215
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.730-190114" pandora_version="7.0NG.731-190215"
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.730, GNU/Linux # Version 7.0NG.731, 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.730, FreeBSD Version # Version 7.0NG.731, 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.730, HP-UX Version # Version 7.0NG.731, 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.730, GNU/Linux # Version 7.0NG.731, 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.730, GNU/Linux # Version 7.0NG.731, 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.730, NetBSD Version # Version 7.0NG.731, 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.730, Solaris Version # Version 7.0NG.731, 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.730'; use constant AGENT_VERSION => '7.0NG.731';
use constant AGENT_BUILD => '190114'; use constant AGENT_BUILD => '190215';
# 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.730 %define version 7.0NG.731
%define release 190114 %define release 190215
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.730 %define version 7.0NG.731
%define release 190114 %define release 190215
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.730" PI_VERSION="7.0NG.731"
PI_BUILD="190114" PI_BUILD="190215"
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.730 # Version 7.0NG.731
# 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.730} {Pandora FMS Windows Agent v7.0NG.731}
ApplicationID ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F} {17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{190114} {190215}
ViewReadme ViewReadme
{Yes} {Yes}

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.730(Build 190114)") #define PANDORA_VERSION ("7.0NG.731(Build 190215)")
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.730(Build 190114))" VALUE "ProductVersion", "(7.0NG.731(Build 190215))"
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.730-190114 Version: 7.0NG.731-190215
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.730-190114" pandora_version="7.0NG.731-190215"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -4,101 +4,101 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License // modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
// Enable profiler for testing // Enable profiler for testing
if (!defined("__PAN_XHPROF__")) define ("__PAN_XHPROF__", 0); if (!defined('__PAN_XHPROF__')) {
define('__PAN_XHPROF__', 0);
if (__PAN_XHPROF__ === 1) {
if (function_exists('tideways_xhprof_enable')) {
tideways_xhprof_enable();
}
} }
if ((! file_exists("include/config.php")) || (! is_readable("include/config.php"))) { if (__PAN_XHPROF__ === 1) {
exit; if (function_exists('tideways_xhprof_enable')) {
tideways_xhprof_enable();
}
}
if ((! file_exists('include/config.php')) || (! is_readable('include/config.php'))) {
exit;
} }
// Don't start a session before this import. // Don't start a session before this import.
// The session is configured and started inside the config process. // The session is configured and started inside the config process.
require_once ('include/config.php'); require_once 'include/config.php';
require_once ('include/functions.php'); require_once 'include/functions.php';
require_once ('include/functions_db.php'); require_once 'include/functions_db.php';
require_once ('include/auth/mysql.php'); require_once 'include/auth/mysql.php';
// Hash login process // Hash login process
if (isset ($_GET["loginhash"])) { if (isset($_GET['loginhash'])) {
$loginhash_data = get_parameter('loginhash_data', '');
$loginhash_data = get_parameter("loginhash_data", ""); $loginhash_user = str_rot13(get_parameter('loginhash_user', ''));
$loginhash_user = str_rot13(get_parameter("loginhash_user", ""));
if ($config['loginhash_pwd'] != ''
if ($config["loginhash_pwd"] != "" && $loginhash_data == md5($loginhash_user.io_output_password($config['loginhash_pwd']))
&& $loginhash_data == md5($loginhash_user.io_output_password($config["loginhash_pwd"]))) { ) {
db_logon ($loginhash_user, $_SERVER['REMOTE_ADDR']); db_logon($loginhash_user, $_SERVER['REMOTE_ADDR']);
$_SESSION['id_usuario'] = $loginhash_user; $_SESSION['id_usuario'] = $loginhash_user;
$config["id_user"] = $loginhash_user; $config['id_user'] = $loginhash_user;
} } else {
else { include_once 'general/login_page.php';
require_once ('general/login_page.php'); db_pandora_audit('Logon Failed (loginhash', '', 'system');
db_pandora_audit("Logon Failed (loginhash", "", "system"); while (@ob_end_flush()) {
while (@ob_end_flush ()); }
exit ("</html>");
} exit('</html>');
}
} }
$public_hash = get_parameter('hash', false); $public_hash = get_parameter('hash', false);
// Check user // Check user
if ($public_hash == false) { if ($public_hash == false) {
check_login(); check_login();
} else { } else {
enterprise_include_once('include/functions_dashboard.php'); enterprise_include_once('include/functions_dashboard.php');
if (dashboard_check_public_hash($public_hash) === false) { if (dashboard_check_public_hash($public_hash) === false) {
db_pandora_audit("Invalid public hash", "Trying to access public dashboard"); db_pandora_audit('Invalid public hash', 'Trying to access public dashboard');
require ("general/noaccess.php"); include 'general/noaccess.php';
exit; exit;
} }
} }
define ('AJAX', true); define('AJAX', true);
/* Enterprise support */ // Enterprise support
if (file_exists (ENTERPRISE_DIR."/load_enterprise.php")) { if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
include_once (ENTERPRISE_DIR."/load_enterprise.php"); include_once ENTERPRISE_DIR.'/load_enterprise.php';
} }
$config["remote_addr"] = $_SERVER['REMOTE_ADDR']; $config['remote_addr'] = $_SERVER['REMOTE_ADDR'];
$page = (string) get_parameter ('page'); $page = (string) get_parameter('page');
$page = safe_url_extraclean ($page); $page = safe_url_extraclean($page);
$page .= '.php'; $page .= '.php';
$config["id_user"] = $_SESSION["id_usuario"]; $config['id_user'] = $_SESSION['id_usuario'];
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php'); $isFunctionSkins = enterprise_include_once('include/functions_skins.php');
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
$config["relative_path"] = enterprise_hook('skins_set_image_skin_path',array($config['id_user'])); $config['relative_path'] = enterprise_hook('skins_set_image_skin_path', [$config['id_user']]);
}
if (isset($config['metaconsole'])) { if (isset($config['metaconsole'])) {
// Not cool way of know if we are executing from metaconsole or normal console // Not cool way of know if we are executing from metaconsole or normal console
if ($config['metaconsole']) if ($config['metaconsole']) {
define ('METACONSOLE', true); define('METACONSOLE', true);
}
} }
if (file_exists ($page)) { if (file_exists($page)) {
require_once ($page); include_once $page;
} } else {
else { echo '<br /><b class="error">Sorry! I can\'t find the page '.$page.'!</b>';
echo '<br /><b class="error">Sorry! I can\'t find the page '.$page.'!</b>';
} }
if (__PAN_XHPROF__ === 1) { if (__PAN_XHPROF__ === 1) {
pandora_xhprof_display_result("ajax", "console"); pandora_xhprof_display_result('ajax', 'console');
} }
?>

View File

@ -1,3 +1,3 @@
<html> <html>
<!-- Blank file --> <!-- Blank file -->
</html> </html>

View File

@ -1,3 +1,3 @@
<html> <html>
<!-- Blank file --> <!-- Blank file -->
</html> </html>

View File

@ -1,3 +1,3 @@
<html> <html>
<!-- Blank file --> <!-- Blank file -->
</html> </html>

View File

@ -1,14 +1,14 @@
{ {
"name": "Pandora FMS", "name": "Pandora FMS",
"description": "Pandora Flexible Monitoring System ", "description": "Pandora Flexible Monitoring System ",
"authors": [ "authors": [
{ {
"name": "Artica", "name": "Artica",
"email": "info@artica.es" "email": "info@artica.es"
}
],
"require": {
"mpdf/mpdf": "^7.1",
"swiftmailer/swiftmailer": "^6.0"
} }
],
"require": {
"mpdf/mpdf": "^7.1",
"swiftmailer/swiftmailer": "^6.0"
}
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4,226 +4,250 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
function api_execute($url, $ip, $pandora_url, $apipass, $user, $password, $op, $op2, $id, $id2, $return_type, $other, $other_mode)
{
if (empty($url)) {
$url = 'http://'.$ip.$pandora_url.'/include/api.php';
function api_execute($url, $ip, $pandora_url, $apipass, $user, $password, $op, $op2, $id, $id2, $return_type, $other, $other_mode) { $url .= '?';
$url .= 'apipass='.$apipass;
if (empty($url)) { $url .= '&user='.$user;
$url = "http://" . $ip . $pandora_url . "/include/api.php"; $url .= '&pass='.$password;
$url .= '&op='.$op;
$url .= "?"; $url .= '&op2='.$op2;
$url .= "apipass=" . $apipass; if ($id !== '') {
$url .= "&user=" . $user; $url .= '&id='.$id;
$url .= "&pass=" . $password; }
$url .= "&op=" . $op;
$url .= "&op2=" . $op2; if ($id2 !== '') {
if ($id !== '') { $url .= '&id2='.$id2;
$url .= "&id=" . $id; }
}
if ($id2 !== '') { if ($return_type !== '') {
$url .= "&id2=" . $id2; $url .= '&return_type='.$return_type;
} }
if ($return_type !== '') {
$url .= "&return_type=" . $return_type; if ($other !== '') {
} $url .= '&other_mode='.$other_mode;
if ($other !== '') { $url .= '&other='.$other;
$url .= "&other_mode=" . $other_mode; }
$url .= "&other=" . $other; }
}
} $curlObj = curl_init();
curl_setopt($curlObj, CURLOPT_URL, $url);
$curlObj = curl_init(); curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlObj, CURLOPT_URL, $url); $result = curl_exec($curlObj);
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1); curl_close($curlObj);
$result = curl_exec($curlObj);
curl_close($curlObj); $return = [
'url' => $url,
$return = array('url' => $url, 'result' => $result); 'result' => $result,
];
return $return;
return $return;
} }
function extension_api_checker() {
global $config; function extension_api_checker()
{
check_login (); global $config;
if (! check_acl ($config['id_user'], 0, "PM")) { check_login();
db_pandora_audit("ACL Violation",
"Trying to access Profile Management"); if (! check_acl($config['id_user'], 0, 'PM')) {
require ("general/noaccess.php"); db_pandora_audit(
return; 'ACL Violation',
} 'Trying to access Profile Management'
);
$url = io_safe_output(get_parameter('url', '')); include 'general/noaccess.php';
return;
$ip = io_safe_output(get_parameter('ip', '127.0.0.1')); }
$pandora_url = io_safe_output(get_parameter('pandora_url', $config['homeurl_static']));
$apipass = io_safe_output(get_parameter('apipass', '')); $url = io_safe_output(get_parameter('url', ''));
$user = io_safe_output(get_parameter('user', $config['id_user']));
$password = io_safe_output(get_parameter('password', '')); $ip = io_safe_output(get_parameter('ip', '127.0.0.1'));
$pandora_url = io_safe_output(get_parameter('pandora_url', $config['homeurl_static']));
$op = io_safe_output(get_parameter('op', 'get')); $apipass = io_safe_output(get_parameter('apipass', ''));
$op2 = io_safe_output(get_parameter('op2', 'test')); $user = io_safe_output(get_parameter('user', $config['id_user']));
$id = io_safe_output(get_parameter('id', '')); $password = io_safe_output(get_parameter('password', ''));
$id2 = io_safe_output(get_parameter('id2', ''));
$return_type = io_safe_output(get_parameter('return_type', '')); $op = io_safe_output(get_parameter('op', 'get'));
$other = io_safe_output(get_parameter('other', '')); $op2 = io_safe_output(get_parameter('op2', 'test'));
$other_mode = io_safe_output(get_parameter('other_mode', 'url_encode_separator_|')); $id = io_safe_output(get_parameter('id', ''));
$id2 = io_safe_output(get_parameter('id2', ''));
$api_execute = get_parameter('api_execute', 0); $return_type = io_safe_output(get_parameter('return_type', ''));
$other = io_safe_output(get_parameter('other', ''));
$return_call_api = ''; $other_mode = io_safe_output(get_parameter('other_mode', 'url_encode_separator_|'));
if ($api_execute) {
$return_call_api = $api_execute = get_parameter('api_execute', 0);
api_execute($url, $ip, $pandora_url, $apipass, $user, $password,
$op, $op2, urlencode($id), urlencode($id2), $return_call_api = '';
$return_type, urlencode($other), $other_mode); if ($api_execute) {
} $return_call_api = api_execute(
$url,
ui_print_page_header (__("API checker"), $ip,
"images/extensions.png", false, "", true, ""); $pandora_url,
$apipass,
$table = null; $user,
$table->data = array(); $password,
$op,
$row = array(); $op2,
$row[] = __("IP"); urlencode($id),
$row[] = html_print_input_text('ip', $ip, '', 50, 255, true); urlencode($id2),
$table->data[] = $row; $return_type,
urlencode($other),
$row = array(); $other_mode
$row[] = __("%s Console URL", get_product_name()); );
$row[] = html_print_input_text('pandora_url', $pandora_url, '', 50, 255, true); }
$table->data[] = $row;
ui_print_page_header(
$row = array(); __('API checker'),
$row[] = __("API Pass"); 'images/extensions.png',
$row[] = html_print_input_password('apipass', $apipass, '', 50, 255, true); false,
$table->data[] = $row; '',
true,
$row = array(); ''
$row[] = __("User"); );
$row[] = html_print_input_text('user', $user, '', 50, 255, true);
$table->data[] = $row; $table = null;
$table->data = [];
$row = array();
$row[] = __("Password"); $row = [];
$row[] = html_print_input_password('password', $password, '', 50, 255, true); $row[] = __('IP');
$table->data[] = $row; $row[] = html_print_input_text('ip', $ip, '', 50, 255, true);
$table->data[] = $row;
$table2 = null;
$table2->data = array(); $row = [];
$row[] = __('%s Console URL', get_product_name());
$row = array(); $row[] = html_print_input_text('pandora_url', $pandora_url, '', 50, 255, true);
$row[] = __("Action (get or set)"); $table->data[] = $row;
$row[] = html_print_input_text('op', $op, '', 50, 255, true);
$table2->data[] = $row; $row = [];
$row[] = __('API Pass');
$row = array(); $row[] = html_print_input_password('apipass', $apipass, '', 50, 255, true);
$row[] = __("Operation"); $table->data[] = $row;
$row[] = html_print_input_text('op2', $op2, '', 50, 255, true);
$table2->data[] = $row; $row = [];
$row[] = __('User');
$row = array(); $row[] = html_print_input_text('user', $user, '', 50, 255, true);
$row[] = __("ID"); $table->data[] = $row;
$row[] = html_print_input_text('id', $id, '', 50, 255, true);
$table2->data[] = $row; $row = [];
$row[] = __('Password');
$row = array(); $row[] = html_print_input_password('password', $password, '', 50, 255, true);
$row[] = __("ID 2"); $table->data[] = $row;
$row[] = html_print_input_text('id2', $id2, '', 50, 255, true);
$table2->data[] = $row; $table2 = null;
$table2->data = [];
$row = array();
$row[] = __("Return Type"); $row = [];
$row[] = html_print_input_text('return_type', $return_type, '', 50, 255, true); $row[] = __('Action (get or set)');
$table2->data[] = $row; $row[] = html_print_input_text('op', $op, '', 50, 255, true);
$table2->data[] = $row;
$row = array();
$row[] = __("Other"); $row = [];
$row[] = html_print_input_text('other', $other, '', 50, 255, true); $row[] = __('Operation');
$table2->data[] = $row; $row[] = html_print_input_text('op2', $op2, '', 50, 255, true);
$table2->data[] = $row;
$row = array();
$row[] = __("Other Mode"); $row = [];
$row[] = html_print_input_text('other_mode', $other_mode, '', 50, 255, true); $row[] = __('ID');
$table2->data[] = $row; $row[] = html_print_input_text('id', $id, '', 50, 255, true);
$table2->data[] = $row;
$table3 = null;
$table3->data = array(); $row = [];
$row[] = __('ID 2');
$row = array(); $row[] = html_print_input_text('id2', $id2, '', 50, 255, true);
$row[] = __("Raw URL"); $table2->data[] = $row;
$row[] = html_print_input_text('url', $url, '', 150, 2048, true);
$table3->data[] = $row; $row = [];
$row[] = __('Return Type');
echo "<form method='post'>"; $row[] = html_print_input_text('return_type', $return_type, '', 50, 255, true);
echo "<fieldset>"; $table2->data[] = $row;
echo "<legend>" . __('Credentials') . "</legend>";
html_print_table($table); $row = [];
echo "</fieldset>"; $row[] = __('Other');
$row[] = html_print_input_text('other', $other, '', 50, 255, true);
echo "<fieldset>"; $table2->data[] = $row;
echo "<legend>" . __('Call parameters') . "</legend>";
html_print_table($table2); $row = [];
echo "</fieldset>"; $row[] = __('Other Mode');
echo "<div style='text-align: right;'>"; $row[] = html_print_input_text('other_mode', $other_mode, '', 50, 255, true);
html_print_input_hidden('api_execute', 1); $table2->data[] = $row;
html_print_submit_button(__('Call'), 'submit', false, 'class="sub next"');
echo "</div>"; $table3 = null;
echo "</form>"; $table3->data = [];
$row = [];
echo "<form method='post'>"; $row[] = __('Raw URL');
echo "<fieldset>"; $row[] = html_print_input_text('url', $url, '', 150, 2048, true);
echo "<legend>" . __('Custom URL') . "</legend>"; $table3->data[] = $row;
html_print_table($table3);
echo "</fieldset>"; echo "<form method='post'>";
echo '<fieldset>';
echo "<div style='text-align: right;'>"; echo '<legend>'.__('Credentials').'</legend>';
html_print_input_hidden('api_execute', 1); html_print_table($table);
html_print_submit_button(__('Call'), 'submit', false, 'class="sub next"'); echo '</fieldset>';
echo "</div>";
echo "</form>"; echo '<fieldset>';
echo '<legend>'.__('Call parameters').'</legend>';
if ($api_execute) { html_print_table($table2);
echo "<fieldset>"; echo '</fieldset>';
echo "<legend>" . __('Result') . "</legend>"; echo "<div style='text-align: right;'>";
echo __('URL') . "<br />"; html_print_input_hidden('api_execute', 1);
html_print_input_password('url', $return_call_api['url'], '', 150, 255, false, true); html_print_submit_button(__('Call'), 'submit', false, 'class="sub next"');
echo "&nbsp;<a id='show_icon' title='" . __('Show URL') . "' href='javascript: show_url();'>"; echo '</div>';
html_print_image("images/input_zoom.png"); echo '</form>';
echo "</a>";
echo "<br />"; echo "<form method='post'>";
echo __('Result') . "<br />"; echo '<fieldset>';
html_print_textarea('result', 30, 20, $return_call_api['result'], 'readonly="readonly"'); echo '<legend>'.__('Custom URL').'</legend>';
echo "</fieldset>"; html_print_table($table3);
} echo '</fieldset>';
?>
<script> echo "<div style='text-align: right;'>";
function show_url() { html_print_input_hidden('api_execute', 1);
if ($("#password-url").attr('type') == 'password') { html_print_submit_button(__('Call'), 'submit', false, 'class="sub next"');
$("#password-url").attr('type', 'text'); echo '</div>';
$("#show_icon").attr('title', '<?php echo __('Hide URL'); ?>'); echo '</form>';
}
else { if ($api_execute) {
$("#password-url").attr('type', 'password'); echo '<fieldset>';
$("#show_icon").attr('title', '<?php echo __('Show URL'); ?>'); echo '<legend>'.__('Result').'</legend>';
} echo __('URL').'<br />';
} html_print_input_password('url', $return_call_api['url'], '', 150, 255, false, true);
</script> echo "&nbsp;<a id='show_icon' title='".__('Show URL')."' href='javascript: show_url();'>";
<?php html_print_image('images/input_zoom.png');
echo '</a>';
echo '<br />';
echo __('Result').'<br />';
html_print_textarea('result', 30, 20, $return_call_api['result'], 'readonly="readonly"');
echo '</fieldset>';
}
?>
<script>
function show_url() {
if ($("#password-url").attr('type') == 'password') {
$("#password-url").attr('type', 'text');
$("#show_icon").attr('title', '<?php echo __('Hide URL'); ?>');
}
else {
$("#password-url").attr('type', 'password');
$("#show_icon").attr('title', '<?php echo __('Show URL'); ?>');
}
}
</script>
<?php
} }
extensions_add_godmode_function('extension_api_checker'); extensions_add_godmode_function('extension_api_checker');
extensions_add_godmode_menu_option(__('API checker'), 'PM', 'gextensions', null, "v1r1"); extensions_add_godmode_menu_option(__('API checker'), 'PM', 'gextensions', null, 'v1r1');
?>

View File

@ -4,423 +4,450 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
function extension_db_status()
{
global $config;
function extension_db_status() { $db_user = get_parameter('db_user', '');
global $config; $db_password = get_parameter('db_password', '');
$db_host = get_parameter('db_host', '');
$db_name = get_parameter('db_name', '');
$db_status_execute = (bool) get_parameter('db_status_execute', false);
$db_user = get_parameter('db_user', ''); ui_print_page_header(
$db_password = get_parameter('db_password', ''); __('DB Schema check'),
$db_host = get_parameter('db_host', ''); 'images/extensions.png',
$db_name = get_parameter('db_name', ''); false,
$db_status_execute = (bool)get_parameter('db_status_execute', false); '',
true,
''
);
ui_print_page_header (__("DB Schema check"), if (!is_user_admin($config['id_user'])) {
"images/extensions.png", false, "", true, ""); db_pandora_audit(
'ACL Violation',
'Trying to access db status'
);
include 'general/noaccess.php';
return;
}
if (!is_user_admin($config['id_user'])) { ui_print_info_message(
db_pandora_audit("ACL Violation", __('This extension checks the DB is correct. Because sometimes the old DB from a migration has not some fields in the tables or the data is changed.')
"Trying to access db status"); );
require ("general/noaccess.php"); ui_print_info_message(
return; __('At the moment the checks is for MySQL/MariaDB.')
} );
ui_print_info_message( echo "<form method='post'>";
__('This extension checks the DB is correct. Because sometimes the old DB from a migration has not some fields in the tables or the data is changed.'));
ui_print_info_message(
__('At the moment the checks is for MySQL/MariaDB.'));
echo "<form method='post'>"; echo '<fieldset>';
echo '<legend>'.__('DB settings').'</legend>';
$table = new stdClass();
$table->data = [];
$row = [];
$row[] = __('DB User with privileges');
$row[] = html_print_input_text('db_user', $db_user, '', 50, 255, true);
$row[] = __('DB Password for this user');
$row[] = html_print_input_password('db_password', $db_password, '', 50, 255, true);
$table->data[] = $row;
$row = [];
$row[] = __('DB Hostname');
$row[] = html_print_input_text('db_host', $db_host, '', 50, 255, true);
$row[] = __('DB Name (temporal for testing)');
$row[] = html_print_input_text('db_name', $db_name, '', 50, 255, true);
$table->data[] = $row;
html_print_table($table);
echo '</fieldset>';
echo "<fieldset>"; echo "<div style='text-align: right;'>";
echo "<legend>" . __('DB settings') . "</legend>"; html_print_input_hidden('db_status_execute', 1);
$table = new stdClass(); html_print_submit_button(__('Execute Test'), 'submit', false, 'class="sub"');
$table->data = array(); echo '</div>';
$row = array();
$row[] = __("DB User with privileges");
$row[] = html_print_input_text('db_user', $db_user, '', 50, 255, true);
$row[] = __("DB Password for this user");
$row[] = html_print_input_password('db_password', $db_password, '', 50, 255, true);
$table->data[] = $row;
$row = array();
$row[] = __("DB Hostname");
$row[] = html_print_input_text('db_host', $db_host, '', 50, 255, true);
$row[] = __("DB Name (temporal for testing)");
$row[] = html_print_input_text('db_name', $db_name, '', 50, 255, true);
$table->data[] = $row;
html_print_table($table);
echo "</fieldset>";
echo "<div style='text-align: right;'>"; echo '</form>';
html_print_input_hidden('db_status_execute', 1);
html_print_submit_button(__('Execute Test'), 'submit', false, 'class="sub"');
echo "</div>";
echo "</form>"; if ($db_status_execute) {
extension_db_status_execute_checks(
if ($db_status_execute) { $db_user,
extension_db_status_execute_checks($db_user, $db_password, $db_password,
$db_host, $db_name); $db_host,
} $db_name
);
}
} }
function extension_db_status_execute_checks($db_user, $db_password, $db_host, $db_name) {
global $config;
$connection_system = $config['dbconnection']; function extension_db_status_execute_checks($db_user, $db_password, $db_host, $db_name)
{
global $config;
// Avoid SQL injection $connection_system = $config['dbconnection'];
$db_name = io_safe_output($db_name);
$db_name = str_replace(';', ' ', $db_name);
$db_name = explode(" ", $db_name);
$db_name = $db_name[0];
if ($config["mysqli"] === true) { // Avoid SQL injection
$connection_test = mysqli_connect($db_host, $db_user, $db_password); $db_name = io_safe_output($db_name);
} $db_name = str_replace(';', ' ', $db_name);
else{ $db_name = explode(' ', $db_name);
$connection_test = mysql_connect($db_host, $db_user, $db_password); $db_name = $db_name[0];
}
if (!$connection_test) { if ($config['mysqli'] === true) {
ui_print_error_message( $connection_test = mysqli_connect($db_host, $db_user, $db_password);
__('Unsuccessful connected to the DB')); } else {
} $connection_test = mysql_connect($db_host, $db_user, $db_password);
else { }
if($config["mysqli"] === true){
$create_db = mysqli_query($connection_test, "CREATE DATABASE `$db_name`");
}else{
$create_db = mysql_query("CREATE DATABASE `$db_name`");
}
if (!$create_db) { if (!$connection_test) {
ui_print_error_message( ui_print_error_message(
__('Unsuccessful created the testing DB')); __('Unsuccessful connected to the DB')
} );
else { } else {
if ($config["mysqli"] === true) { if ($config['mysqli'] === true) {
mysqli_select_db($connection_test, $db_name); $create_db = mysqli_query($connection_test, "CREATE DATABASE `$db_name`");
} } else {
else{ $create_db = mysql_query("CREATE DATABASE `$db_name`");
mysql_select_db($db_name, $connection_test); }
}
$install_tables = extension_db_status_execute_sql_file( if (!$create_db) {
$config['homedir'] . "/pandoradb.sql", ui_print_error_message(
$connection_test); __('Unsuccessful created the testing DB')
);
} else {
if ($config['mysqli'] === true) {
mysqli_select_db($connection_test, $db_name);
} else {
mysql_select_db($db_name, $connection_test);
}
if (!$install_tables) { $install_tables = extension_db_status_execute_sql_file(
ui_print_error_message( $config['homedir'].'/pandoradb.sql',
__('Unsuccessful installed tables into the testing DB')); $connection_test
} );
else {
extension_db_check_tables_differences(
$connection_test,
$connection_system,
$db_name,
$config['dbname']);
}
if ($config["mysqli"] === true) { if (!$install_tables) {
mysqli_select_db($connection_test, $db_name); ui_print_error_message(
mysqli_query($connection_test, "DROP DATABASE IF EXISTS `$db_name`"); __('Unsuccessful installed tables into the testing DB')
} );
else{ } else {
mysql_select_db($db_name, $connection_test); extension_db_check_tables_differences(
mysql_query("DROP DATABASE IF EXISTS `$db_name`", $connection_test); $connection_test,
} $connection_system,
} $db_name,
} $config['dbname']
);
}
if ($config['mysqli'] === true) {
mysqli_select_db($connection_test, $db_name);
mysqli_query($connection_test, "DROP DATABASE IF EXISTS `$db_name`");
} else {
mysql_select_db($db_name, $connection_test);
mysql_query("DROP DATABASE IF EXISTS `$db_name`", $connection_test);
}
}
}
} }
function extension_db_check_tables_differences($connection_test,
$connection_system, $db_name_test, $db_name_system) {
global $config; function extension_db_check_tables_differences(
$connection_test,
$connection_system,
$db_name_test,
$db_name_system
) {
global $config;
// --------- Check the tables -------------------------------------- // --------- Check the tables --------------------------------------
if ($config["mysqli"] === true) { if ($config['mysqli'] === true) {
mysqli_select_db($connection_test, $db_name_test); mysqli_select_db($connection_test, $db_name_test);
$result = mysqli_query($connection_test, "SHOW TABLES"); $result = mysqli_query($connection_test, 'SHOW TABLES');
}else{ } else {
mysql_select_db($db_name_test, $connection_test); mysql_select_db($db_name_test, $connection_test);
$result = mysql_query("SHOW TABLES", $connection_test); $result = mysql_query('SHOW TABLES', $connection_test);
} }
$tables_test = array(); $tables_test = [];
if ($config["mysqli"] === true) { if ($config['mysqli'] === true) {
while ($row = mysqli_fetch_array($result)) { while ($row = mysqli_fetch_array($result)) {
$tables_test[] = $row[0]; $tables_test[] = $row[0];
} }
mysqli_free_result($result);
mysqli_select_db($connection_test, $db_name_system); mysqli_free_result($result);
$result = mysqli_query( $connection_test, "SHOW TABLES"); mysqli_select_db($connection_test, $db_name_system);
}
else{
while ($row = mysql_fetch_array($result)) {
$tables_test[] = $row[0];
}
mysql_free_result($result);
mysql_select_db($db_name_system, $connection_test); $result = mysqli_query($connection_test, 'SHOW TABLES');
} else {
while ($row = mysql_fetch_array($result)) {
$tables_test[] = $row[0];
}
$result = mysql_query("SHOW TABLES", $connection_test); mysql_free_result($result);
}
$tables_system = array(); mysql_select_db($db_name_system, $connection_test);
if ($config["mysqli"] === true) { $result = mysql_query('SHOW TABLES', $connection_test);
while ($row = mysqli_fetch_array ($result)) { }
$tables_system[] = $row[0];
}
mysqli_free_result($result);
}
else{
while ($row = mysql_fetch_array ($result)) {
$tables_system[] = $row[0];
}
mysql_free_result($result);
}
$diff_tables = array_diff($tables_test, $tables_system); $tables_system = [];
ui_print_result_message( if ($config['mysqli'] === true) {
!empty($diff_tables), while ($row = mysqli_fetch_array($result)) {
__('Success! %s DB contains all tables', get_product_name()), $tables_system[] = $row[0];
__('%s DB could not retrieve all tables. The missing tables are (%s)', }
get_product_name(), implode(", ", $diff_tables)));
if (!empty($diff_tables)) { mysqli_free_result($result);
foreach ($diff_tables as $table) { } else {
if ($config["mysqli"] === true) { while ($row = mysql_fetch_array($result)) {
mysqli_select_db($connection_test, $db_name_test); $tables_system[] = $row[0];
$result = mysqli_query($connection_test, "SHOW CREATE TABLE " . $table); }
$tables_test = array();
while ($row = mysql_fetch_array($result)) {
ui_print_info_message(
__('You can execute this SQL query for to fix.') . "<br />" .
'<pre>' .
$row[1] .
'</pre>'
);
}
mysqli_free_result($result);
}
else{
mysql_select_db($db_name_test, $connection_test);
$result = mysql_query("SHOW CREATE TABLE " . $table, $connection_test);
$tables_test = array();
while ($row = mysql_fetch_array($result)) {
ui_print_info_message(
__('You can execute this SQL query for to fix.') . "<br />" .
'<pre>' .
$row[1] .
'</pre>'
);
}
mysql_free_result($result);
}
}
}
// --------------- Check the fields ------------------------------- mysql_free_result($result);
$correct_fields = true; }
foreach ($tables_system as $table) { $diff_tables = array_diff($tables_test, $tables_system);
if ($config["mysqli"] === true) {
mysqli_select_db($connection_test, $db_name_test);
$result = mysqli_query($connection_test, "EXPLAIN " . $table);
}
else{
mysql_select_db($db_name_test, $connection_test);
$result = mysql_query("EXPLAIN " . $table, $connection_test);
}
$fields_test = array(); ui_print_result_message(
if (!empty($result)) { !empty($diff_tables),
if ($config["mysqli"] === true) { __('Success! %s DB contains all tables', get_product_name()),
while ($row = mysqli_fetch_array ($result)) { __(
$fields_test[$row[0]] = array( '%s DB could not retrieve all tables. The missing tables are (%s)',
'field ' => $row[0], get_product_name(),
'type' => $row[1], implode(', ', $diff_tables)
'null' => $row[2], )
'key' => $row[3], );
'default' => $row[4],
'extra' => $row[5]);
}
mysqli_free_result ($result);
mysqli_select_db($connection_test, $db_name_system);
}
else{
while ($row = mysql_fetch_array ($result)) {
$fields_test[$row[0]] = array(
'field ' => $row[0],
'type' => $row[1],
'null' => $row[2],
'key' => $row[3],
'default' => $row[4],
'extra' => $row[5]);
}
mysql_free_result ($result);
mysql_select_db($db_name_system, $connection_test);
}
}
if($config["mysqli"] === true){ if (!empty($diff_tables)) {
$result = mysqli_query($connection_test, "EXPLAIN " . $table); foreach ($diff_tables as $table) {
} if ($config['mysqli'] === true) {
else{ mysqli_select_db($connection_test, $db_name_test);
$result = mysql_query("EXPLAIN " . $table, $connection_test); $result = mysqli_query($connection_test, 'SHOW CREATE TABLE '.$table);
} $tables_test = [];
while ($row = mysql_fetch_array($result)) {
ui_print_info_message(
__('You can execute this SQL query for to fix.').'<br />'.'<pre>'.$row[1].'</pre>'
);
}
$fields_system = array(); mysqli_free_result($result);
if (!empty($result)) { } else {
if ($config["mysqli"] === true) { mysql_select_db($db_name_test, $connection_test);
while ($row = mysqli_fetch_array ($result)) { $result = mysql_query('SHOW CREATE TABLE '.$table, $connection_test);
$fields_system[$row[0]] = array( $tables_test = [];
'field ' => $row[0], while ($row = mysql_fetch_array($result)) {
'type' => $row[1], ui_print_info_message(
'null' => $row[2], __('You can execute this SQL query for to fix.').'<br />'.'<pre>'.$row[1].'</pre>'
'key' => $row[3], );
'default' => $row[4], }
'extra' => $row[5]);
}
mysqli_free_result($result);
}
else{
while ($row = mysql_fetch_array($result)) {
$fields_system[$row[0]] = array(
'field ' => $row[0],
'type' => $row[1],
'null' => $row[2],
'key' => $row[3],
'default' => $row[4],
'extra' => $row[5]);
}
mysql_free_result($result);
}
}
foreach ($fields_test as $name_field => $field_test) {
if (!isset($fields_system[$name_field])) {
$correct_fields = false;
ui_print_error_message( mysql_free_result($result);
__('Unsuccessful the table %s has not the field %s', }
$table, $name_field)); }
ui_print_info_message( }
__('You can execute this SQL query for to fix.') . "<br />" .
'<pre>' .
"ALTER TABLE " . $table . " ADD COLUMN " . $name_field . " text;" .
'</pre>'
);
}
else {
$correct_fields = false;
$field_system = $fields_system[$name_field];
$diff = array_diff($field_test, $field_system); // --------------- Check the fields -------------------------------
$correct_fields = true;
if (!empty($diff)) { foreach ($tables_system as $table) {
$info_message = ""; if ($config['mysqli'] === true) {
$error_message = ""; mysqli_select_db($connection_test, $db_name_test);
if($diff['type']){ $result = mysqli_query($connection_test, 'EXPLAIN '.$table);
$error_message .= "Unsuccessful the field ".$name_field." in the table ".$table." must be set the type with ".$diff['type']."<br>"; } else {
} mysql_select_db($db_name_test, $connection_test);
$result = mysql_query('EXPLAIN '.$table, $connection_test);
}
if($diff['null']){ $fields_test = [];
$error_message .= "Unsuccessful the field $name_field in the table $table must be null: (".$diff['null'].").<br>"; if (!empty($result)) {
} if ($config['mysqli'] === true) {
while ($row = mysqli_fetch_array($result)) {
$fields_test[$row[0]] = [
'field ' => $row[0],
'type' => $row[1],
'null' => $row[2],
'key' => $row[3],
'default' => $row[4],
'extra' => $row[5],
];
}
if($diff['default']){ mysqli_free_result($result);
$error_message .= "Unsuccessful the field $name_field in the table $table must be set ".$diff['default']." as default value.<br>"; mysqli_select_db($connection_test, $db_name_system);
} } else {
while ($row = mysql_fetch_array($result)) {
$fields_test[$row[0]] = [
'field ' => $row[0],
'type' => $row[1],
'null' => $row[2],
'key' => $row[3],
'default' => $row[4],
'extra' => $row[5],
];
}
if($field_test['null'] == "YES" || !isset($field_test['null']) || $field_test['null'] == ""){ mysql_free_result($result);
$null_defect = " NULL"; mysql_select_db($db_name_system, $connection_test);
} }
else{ }
$null_defect = " NOT NULL";
}
if(!isset($field_test['default']) || $field_test['default'] == ""){ if ($config['mysqli'] === true) {
$default_value = ""; $result = mysqli_query($connection_test, 'EXPLAIN '.$table);
} } else {
else{ $result = mysql_query('EXPLAIN '.$table, $connection_test);
$default_value = " DEFAULT ".$field_test['default']; }
}
if($diff['type'] || $diff['null'] || $diff['default']){ $fields_system = [];
$info_message .= "ALTER TABLE " . $table . " MODIFY COLUMN " . $name_field . " " . $field_test['type'] . $null_defect . $default_value.";"; if (!empty($result)) {
} if ($config['mysqli'] === true) {
while ($row = mysqli_fetch_array($result)) {
$fields_system[$row[0]] = [
'field ' => $row[0],
'type' => $row[1],
'null' => $row[2],
'key' => $row[3],
'default' => $row[4],
'extra' => $row[5],
];
}
if($diff['key']){ mysqli_free_result($result);
$error_message .= "Unsuccessful the field $name_field in the table $table must be set the key as defined in the SQL file.<br>"; } else {
$info_message .= "<br><br>Please check the SQL file for to know the kind of key needed."; while ($row = mysql_fetch_array($result)) {
} $fields_system[$row[0]] = [
'field ' => $row[0],
'type' => $row[1],
'null' => $row[2],
'key' => $row[3],
'default' => $row[4],
'extra' => $row[5],
];
}
if($diff['extra']){ mysql_free_result($result);
$error_message .= "Unsuccessful the field $name_field in the table $table must be set as defined in the SQL file.<br>"; }
$info_message .= "<br><br>Please check the SQL file for to know the kind of extra config needed."; }
}
ui_print_error_message(__($error_message)); foreach ($fields_test as $name_field => $field_test) {
if (!isset($fields_system[$name_field])) {
$correct_fields = false;
ui_print_info_message(__($info_message)); ui_print_error_message(
} __(
} 'Unsuccessful the table %s has not the field %s',
} $table,
} $name_field
if ($correct_fields) { )
ui_print_success_message( );
__('Successful all the tables have the correct fields') ui_print_info_message(
); __('You can execute this SQL query for to fix.').'<br />'.'<pre>'.'ALTER TABLE '.$table.' ADD COLUMN '.$name_field.' text;'.'</pre>'
} );
} else {
$correct_fields = false;
$field_system = $fields_system[$name_field];
$diff = array_diff($field_test, $field_system);
if (!empty($diff)) {
$info_message = '';
$error_message = '';
if ($diff['type']) {
$error_message .= 'Unsuccessful the field '.$name_field.' in the table '.$table.' must be set the type with '.$diff['type'].'<br>';
}
if ($diff['null']) {
$error_message .= "Unsuccessful the field $name_field in the table $table must be null: (".$diff['null'].').<br>';
}
if ($diff['default']) {
$error_message .= "Unsuccessful the field $name_field in the table $table must be set ".$diff['default'].' as default value.<br>';
}
if ($field_test['null'] == 'YES' || !isset($field_test['null']) || $field_test['null'] == '') {
$null_defect = ' NULL';
} else {
$null_defect = ' NOT NULL';
}
if (!isset($field_test['default']) || $field_test['default'] == '') {
$default_value = '';
} else {
$default_value = ' DEFAULT '.$field_test['default'];
}
if ($diff['type'] || $diff['null'] || $diff['default']) {
$info_message .= 'ALTER TABLE '.$table.' MODIFY COLUMN '.$name_field.' '.$field_test['type'].$null_defect.$default_value.';';
}
if ($diff['key']) {
$error_message .= "Unsuccessful the field $name_field in the table $table must be set the key as defined in the SQL file.<br>";
$info_message .= '<br><br>Please check the SQL file for to know the kind of key needed.';
}
if ($diff['extra']) {
$error_message .= "Unsuccessful the field $name_field in the table $table must be set as defined in the SQL file.<br>";
$info_message .= '<br><br>Please check the SQL file for to know the kind of extra config needed.';
}
ui_print_error_message(__($error_message));
ui_print_info_message(__($info_message));
}
}
}
}
if ($correct_fields) {
ui_print_success_message(
__('Successful all the tables have the correct fields')
);
}
} }
function extension_db_status_execute_sql_file($url, $connection) {
global $config; function extension_db_status_execute_sql_file($url, $connection)
if (file_exists($url)) { {
$file_content = file($url); global $config;
$query = ""; if (file_exists($url)) {
foreach ($file_content as $sql_line) { $file_content = file($url);
if (trim($sql_line) != "" && strpos($sql_line, "--") === false) { $query = '';
$query .= $sql_line; foreach ($file_content as $sql_line) {
if (preg_match("/;[\040]*\$/", $sql_line)) { if (trim($sql_line) != '' && strpos($sql_line, '--') === false) {
if ($config["mysqli"] === true) { $query .= $sql_line;
if (!$result = mysqli_query($connection, $query)) { if (preg_match("/;[\040]*\$/", $sql_line)) {
echo mysqli_error(); //Uncomment for debug if ($config['mysqli'] === true) {
echo "<i><br>$query<br></i>"; if (!$result = mysqli_query($connection, $query)) {
return 0; echo mysqli_error();
} // Uncomment for debug
} echo "<i><br>$query<br></i>";
else{ return 0;
if (!$result = mysql_query($query, $connection)) { }
echo mysql_error(); //Uncomment for debug } else {
echo "<i><br>$query<br></i>"; if (!$result = mysql_query($query, $connection)) {
return 0; echo mysql_error();
} // Uncomment for debug
} echo "<i><br>$query<br></i>";
$query = ""; return 0;
} }
} }
}
return 1; $query = '';
} }
else }
return 0; }
return 1;
} else {
return 0;
}
} }
extensions_add_godmode_function('extension_db_status'); extensions_add_godmode_function('extension_db_status');
extensions_add_godmode_menu_option(__('DB Schema check'), 'DM', 'gextensions', null, "v1r1", 'gdbman'); extensions_add_godmode_menu_option(__('DB Schema check'), 'DM', 'gextensions', null, 'v1r1', 'gdbman');
?>

View File

@ -4,160 +4,162 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
function dbmanager_query($sql, &$error, $dbconnection)
{
global $config;
function dbmanager_query ($sql, &$error, $dbconnection) { $retval = [];
global $config;
$retval = array(); if ($sql == '') {
return false;
}
if ($sql == '') $sql = html_entity_decode($sql, ENT_QUOTES);
return false; if ($config['mysqli']) {
$result = mysqli_query($dbconnection, $sql);
if ($result === false) {
$backtrace = debug_backtrace();
$error = mysqli_error($dbconnection);
return false;
}
} else {
$result = mysql_query($sql, $dbconnection);
if ($result === false) {
$backtrace = debug_backtrace();
$error = mysql_error();
return false;
}
}
$sql = html_entity_decode($sql, ENT_QUOTES); if ($result === true) {
if ($config["mysqli"]) { if ($config['mysqli']) {
$result = mysqli_query ($dbconnection, $sql); return mysqli_affected_rows($dbconnection);
if ($result === false) { } else {
$backtrace = debug_backtrace (); return mysql_affected_rows();
$error = mysqli_error ($dbconnection); }
return false; }
}
}
else{
$result = mysql_query ($sql, $dbconnection);
if ($result === false) {
$backtrace = debug_backtrace ();
$error = mysql_error ();
return false;
}
}
if ($result === true) { if ($config['mysqli']) {
if($config["mysqli"]){ while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
return mysqli_affected_rows ($dbconnection); array_push($retval, $row);
} }
else{ } else {
return mysql_affected_rows (); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
} array_push($retval, $row);
} }
}
if($config["mysqli"]){ if ($config['mysqli']) {
while ($row = mysqli_fetch_array ($result, MYSQLI_ASSOC)) { mysqli_free_result($result);
array_push ($retval, $row); } else {
} mysql_free_result($result);
} }
else{
while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) {
array_push ($retval, $row);
}
}
if($config["mysqli"]){ if (! empty($retval)) {
mysqli_free_result ($result); return $retval;
} }
else{
mysql_free_result ($result);
}
if (! empty ($retval)) // Return false, check with === or !==
return $retval; return 'Empty';
//Return false, check with === or !==
return "Empty";
} }
function dbmgr_extension_main () { function dbmgr_extension_main()
ui_require_css_file ('dbmanager', 'extensions/dbmanager/'); {
ui_require_css_file('dbmanager', 'extensions/dbmanager/');
global $config; global $config;
if (!is_user_admin($config['id_user'])) { if (!is_user_admin($config['id_user'])) {
db_pandora_audit("ACL Violation", "Trying to access Setup Management"); db_pandora_audit('ACL Violation', 'Trying to access Setup Management');
require ("general/noaccess.php"); include 'general/noaccess.php';
return; return;
} }
$sql = (string) get_parameter ('sql'); $sql = (string) get_parameter('sql');
ui_print_page_header (__('Database interface'), "images/gm_db.png", false, false, true); ui_print_page_header(__('Database interface'), 'images/gm_db.png', false, false, true);
echo '<div class="notify">'; echo '<div class="notify">';
echo __("This is an advanced extension to interface with %s database directly from WEB console echo __(
"This is an advanced extension to interface with %s database directly from WEB console
using native SQL sentences. Please note that <b>you can damage</b> your %s installation using native SQL sentences. Please note that <b>you can damage</b> your %s installation
if you don't know </b>exactly</b> what are you are doing, if you don't know </b>exactly</b> what are you are doing,
this means that you can severily damage your setup using this extension. this means that you can severily damage your setup using this extension.
This extension is intended to be used <b>only by experienced users</b> This extension is intended to be used <b>only by experienced users</b>
with a depth knowledge of %s internals.", with a depth knowledge of %s internals.",
get_product_name(), get_product_name(), get_product_name()); get_product_name(),
echo '</div>'; get_product_name(),
get_product_name()
);
echo '</div>';
echo "<br />"; echo '<br />';
echo "Some samples of usage: <blockquote><em>SHOW STATUS;<br />DESCRIBE tagente<br />SELECT * FROM tserver<br />UPDATE tagente SET id_grupo = 15 WHERE nombre LIKE '%194.179%'</em></blockquote>"; echo "Some samples of usage: <blockquote><em>SHOW STATUS;<br />DESCRIBE tagente<br />SELECT * FROM tserver<br />UPDATE tagente SET id_grupo = 15 WHERE nombre LIKE '%194.179%'</em></blockquote>";
echo "<br /><br />"; echo '<br /><br />';
echo "<form method='post' action=''>"; echo "<form method='post' action=''>";
html_print_textarea ('sql', 5, 50, html_entity_decode($sql, ENT_QUOTES)); html_print_textarea('sql', 5, 50, html_entity_decode($sql, ENT_QUOTES));
echo '<br />'; echo '<br />';
echo '<div class="action-buttons" style="width: 100%">'; echo '<div class="action-buttons" style="width: 100%">';
echo '<br />'; echo '<br />';
html_print_submit_button (__('Execute SQL'), '', false, 'class="sub next"'); html_print_submit_button(__('Execute SQL'), '', false, 'class="sub next"');
echo '</div>'; echo '</div>';
echo "</form>"; echo '</form>';
// Processing SQL Code // Processing SQL Code
if ($sql == '') if ($sql == '') {
return; return;
}
echo "<br />"; echo '<br />';
echo "<hr />"; echo '<hr />';
echo "<br />"; echo '<br />';
$dbconnection = $config['dbconnection']; $dbconnection = $config['dbconnection'];
$error = ''; $error = '';
$result = dbmanager_query ($sql, $error, $dbconnection); $result = dbmanager_query($sql, $error, $dbconnection);
if ($result === false) { if ($result === false) {
echo '<strong>An error has occured when querying the database.</strong><br />'; echo '<strong>An error has occured when querying the database.</strong><br />';
echo $error; echo $error;
db_pandora_audit("DB Interface Extension", "Error in SQL", false, false, $sql); db_pandora_audit('DB Interface Extension', 'Error in SQL', false, false, $sql);
return; return;
} }
if (! is_array ($result)) { if (! is_array($result)) {
echo "<strong>Output: <strong>".$result; echo '<strong>Output: <strong>'.$result;
db_pandora_audit("DB Interface Extension", "SQL", false, false, $sql); db_pandora_audit('DB Interface Extension', 'SQL', false, false, $sql);
return; return;
} }
echo "<div style='overflow: auto;'>"; echo "<div style='overflow: auto;'>";
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox data';
$table->head = array_keys ($result[0]); $table->head = array_keys($result[0]);
$table->data = $result; $table->data = $result;
html_print_table ($table); html_print_table($table);
echo "</div>"; echo '</div>';
} }
/* This adds a option in the operation menu */
extensions_add_godmode_menu_option (__('DB interface'), 'PM','gextensions',"dbmanager/icon.png","v1r1", 'gdbman');
/* This sets the function to be called when the extension is selected in the operation menu */ // This adds a option in the operation menu
extensions_add_godmode_function ('dbmgr_extension_main'); extensions_add_godmode_menu_option(__('DB interface'), 'PM', 'gextensions', 'dbmanager/icon.png', 'v1r1', 'gdbman');
?>
// This sets the function to be called when the extension is selected in the operation menu
extensions_add_godmode_function('dbmgr_extension_main');

View File

@ -1,29 +1,30 @@
table.dbmanager,
table.dbmanager, table.dbmanager td, table.dbmanager th { table.dbmanager td,
border:1px solid #888; table.dbmanager th {
border-collapse: collapse; border: 1px solid #888;
margin: 0; border-collapse: collapse;
padding: 0; margin: 0;
padding: 0;
} }
table.dbmanager td, table.dbmanager th { table.dbmanager td,
padding:.2em .5em; table.dbmanager th {
vertical-align: top; padding: 0.2em 0.5em;
font-weight: normal; vertical-align: top;
background: #fafafa; font-weight: normal;
color: #000; background: #fafafa;
font-size: 9px; color: #000;
font-size: 9px;
} }
table.dbmanager th { table.dbmanager th {
color: #fff; color: #fff;
font-size: 10px; font-size: 10px;
background: #888; background: #888;
} }
textarea { textarea {
min-height: 50px; min-height: 50px;
height: 50px; height: 50px;
width: 95%; width: 95%;
} }

View File

@ -4,262 +4,259 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
function load_matrix_console()
{
global $config;
function load_matrix_console() { if (! check_acl($config['id_user'], 0, 'ER')) {
global $config; db_pandora_audit('ACL Violation', 'Trying to access event viewer');
include 'general/noaccess.php';
if (! check_acl ($config["id_user"], 0, "ER")) { return;
db_pandora_audit("ACL Violation", "Trying to access event viewer"); }
require ("general/noaccess.php");
return;
}
$pure = (bool) get_parameter('pure'); $pure = (bool) get_parameter('pure');
if (! $pure) { if (! $pure) {
$title_menu = __("Matrix events"); $title_menu = __('Matrix events');
$fullscreen['text'] = '<a href="index.php?extension_in_menu=eventos&sec=extensions&sec2=extensions/matrix_events&pure=1">' $fullscreen['text'] = '<a href="index.php?extension_in_menu=eventos&sec=extensions&sec2=extensions/matrix_events&pure=1">'.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode')]).'</a>';
. html_print_image ("images/full_screen.png", true, array ("title" => __('Full screen mode'))) $onheader = ['fullscreen' => $fullscreen];
. "</a>"; ui_print_page_header($title_menu, 'images/op_monitoring.png', false, '', false, $onheader);
$onheader = array('fullscreen' => $fullscreen); }
ui_print_page_header ($title_menu, "images/op_monitoring.png", false, "", false, $onheader);
}
echo "<canvas id=\"matrix-terminal\" style=\"display:block;\"></canvas>"; echo '<canvas id="matrix-terminal" style="display:block;"></canvas>';
?> ?>
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
var terminal = { var terminal = {
element : "", element : "",
context : null, context : null,
fontSize : 14, fontSize : 14,
timers : { timers : {
rain : null, rain : null,
event : null, event : null,
events : null events : null
}, },
stopRain : function () { stopRain : function () {
if (this.timers.rain) { if (this.timers.rain) {
clearInterval(this.timers.rain); clearInterval(this.timers.rain);
} }
}, },
stopEvent : function () { stopEvent : function () {
if (this.timers.event) { if (this.timers.event) {
clearInterval(this.timers.event); clearInterval(this.timers.event);
} }
}, },
clear : function () { clear : function () {
this.stopRain(); this.stopRain();
this.stopEvent(); this.stopEvent();
if (this.context) { if (this.context) {
this.context.fillStyle = "rgba(0, 0, 0, 1.0)"; this.context.fillStyle = "rgba(0, 0, 0, 1.0)";
this.context.fillRect(0, 0, width, height); this.context.fillRect(0, 0, width, height);
} }
}, },
print : function () { print : function () {
this.stopRain(); this.stopRain();
var letters = "田由甲申甴电甶アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン<>*01ACREJWH{V"; var letters = "田由甲申甴电甶アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン<>*01ACREJWH{V";
// Converting the string into an array of single characters // Converting the string into an array of single characters
letters = letters.split(""); letters = letters.split("");
var width = this.element.width; var width = this.element.width;
var height = this.element.height; var height = this.element.height;
var context = this.context; var context = this.context;
var font_size = this.fontSize; var font_size = this.fontSize;
// Number of columns for the rain // Number of columns for the rain
var columns = Math.round(width / font_size); var columns = Math.round(width / font_size);
// Number of rows for the rain // Number of rows for the rain
var rows = Math.round(height / font_size); var rows = Math.round(height / font_size);
// An array of drops - one per column // An array of drops - one per column
var drops = []; var drops = [];
// x below is the x coordinate // x below is the x coordinate
// 1 = y co-ordinate of the drop(same for every drop initially) // 1 = y co-ordinate of the drop(same for every drop initially)
for (var x = 0; x < columns; x++) { for (var x = 0; x < columns; x++) {
drops[x] = -1; drops[x] = -1;
} }
// Drawing the characters // Drawing the characters
function draw() { function draw() {
// Black BG for the canvas // Black BG for the canvas
// Translucent BG to show trail // Translucent BG to show trail
context.fillStyle = "rgba(0, 0, 0, 0.05)"; context.fillStyle = "rgba(0, 0, 0, 0.05)";
context.fillRect(0, 0, width, height); context.fillRect(0, 0, width, height);
context.fillStyle = "#0F0"; // Green text context.fillStyle = "#0F0"; // Green text
context.font = font_size + "px arial"; context.font = font_size + "px arial";
// Looping over drops // Looping over drops
for (var i = 0; i < drops.length; i++) { for (var i = 0; i < drops.length; i++) {
if (drops[i] == -1) { if (drops[i] == -1) {
if (Math.random() > 0.975) { if (Math.random() > 0.975) {
drops[i] = 1; drops[i] = 1;
} else { } else {
continue; continue;
} }
} }
// A random character to print // A random character to print
var letter = letters[Math.floor(Math.random() * letters.length)]; var letter = letters[Math.floor(Math.random() * letters.length)];
//x = i * font_size, y = value of drops[i] * font_size //x = i * font_size, y = value of drops[i] * font_size
context.fillText(letter, i * font_size, drops[i] * font_size); context.fillText(letter, i * font_size, drops[i] * font_size);
// Sending the drop back to the top randomly after it has crossed the screen // Sending the drop back to the top randomly after it has crossed the screen
// Adding a randomness to the reset to make the drops scattered on the Y axis // Adding a randomness to the reset to make the drops scattered on the Y axis
if (drops[i] * font_size > height && Math.random() > 0.975) { if (drops[i] * font_size > height && Math.random() > 0.975) {
drops[i] = 0; drops[i] = 0;
} }
//incrementing Y coordinate //incrementing Y coordinate
drops[i]++; drops[i]++;
} }
} }
this.timers.rain = setInterval(draw, 33); this.timers.rain = setInterval(draw, 33);
}, },
showEvent : function (message) { showEvent : function (message) {
this.stopEvent(); this.stopEvent();
var context = this.context; var context = this.context;
var font_size = this.fontSize; var font_size = this.fontSize;
var width = this.element.width; var width = this.element.width;
var height = this.element.height; var height = this.element.height;
var columns = Math.round(width / font_size); var columns = Math.round(width / font_size);
var rows = Math.round(height / font_size); var rows = Math.round(height / font_size);
var middleColumn = Math.floor(rows / 2); var middleColumn = Math.floor(rows / 2);
while (message.length < columns) { while (message.length < columns) {
message = " " + message + " "; message = " " + message + " ";
} }
// Converting the string into an array of single characters // Converting the string into an array of single characters
var letters = message.split(""); var letters = message.split("");
var positions = []; var positions = [];
// x below is the x coordinate // x below is the x coordinate
// 1 = y co-ordinate of the drop(same for every drop initially) // 1 = y co-ordinate of the drop(same for every drop initially)
for (var i = 0; i < letters.length; i++) { for (var i = 0; i < letters.length; i++) {
positions[i] = -1; positions[i] = -1;
} }
function drawMessage() { function drawMessage() {
// Looping over drops // Looping over drops
for (var i = 0; i < letters.length; i++) { for (var i = 0; i < letters.length; i++) {
if (positions[i] < 0) { if (positions[i] < 0) {
if (Math.random() > 0.9) { if (Math.random() > 0.9) {
positions[i] = 1; positions[i] = 1;
} else { } else {
continue; continue;
} }
} else if (positions[i] < middleColumn) { } else if (positions[i] < middleColumn) {
context.fillStyle = "#0F0"; context.fillStyle = "#0F0";
context.fillText(letters[i], i * font_size, positions[i] * font_size); context.fillText(letters[i], i * font_size, positions[i] * font_size);
//incrementing Y coordinate //incrementing Y coordinate
positions[i]++; positions[i]++;
} else if (positions[i] > middleColumn) { } else if (positions[i] > middleColumn) {
context.fillStyle = "#0F0"; context.fillStyle = "#0F0";
context.fillText(letters[i], i * font_size, positions[i] * font_size); context.fillText(letters[i], i * font_size, positions[i] * font_size);
//incrementing Y coordinate //incrementing Y coordinate
// Adding a randomness to the reset to make the drops scattered on the Y axis // Adding a randomness to the reset to make the drops scattered on the Y axis
if (positions[i] * font_size > terminal.height) { if (positions[i] * font_size > terminal.height) {
positions[i] = -1; positions[i] = -1;
} }
//incrementing Y coordinate //incrementing Y coordinate
positions[i]++; positions[i]++;
} else { } else {
context.fillStyle = "rgba(255, 255, 255, 1.0)"; context.fillStyle = "rgba(255, 255, 255, 1.0)";
context.fillText(letters[i], i * font_size, positions[i] * font_size); context.fillText(letters[i], i * font_size, positions[i] * font_size);
function moveLetter(array, index) { function moveLetter(array, index) {
setTimeout(function() { setTimeout(function() {
if (array[index] == middleColumn) { if (array[index] == middleColumn) {
array[index]++; array[index]++;
} }
}, 15000); }, 15000);
} }
moveLetter(positions, i); moveLetter(positions, i);
} }
} }
} }
this.timers.event = setInterval(drawMessage, 100); this.timers.event = setInterval(drawMessage, 100);
} }
} }
$(document).ready (function () { $(document).ready (function () {
var pure = <?php echo json_encode($pure); ?>; var pure = <?php echo json_encode($pure); ?>;
terminal.element = document.getElementById("matrix-terminal"); terminal.element = document.getElementById("matrix-terminal");
if (pure) { if (pure) {
terminal.fontSize = terminal.fontSize + 2; terminal.fontSize = terminal.fontSize + 2;
terminal.element.height = window.innerHeight; terminal.element.height = window.innerHeight;
terminal.element.width = window.innerWidth; terminal.element.width = window.innerWidth;
$("#matrix-terminal").click(function() { $("#matrix-terminal").click(function() {
document.location.search = "?extension_in_menu=eventos&sec=extensions&sec2=extensions/matrix_events"; document.location.search = "?extension_in_menu=eventos&sec=extensions&sec2=extensions/matrix_events";
}); });
$("#main_pure").css("margin", 0) $("#main_pure").css("margin", 0)
} else { } else {
terminal.element.height = $("#main").innerHeight(); terminal.element.height = $("#main").innerHeight();
terminal.element.width = $("#main").innerWidth(); terminal.element.width = $("#main").innerWidth();
$("#matrix-terminal").dblclick(function() { $("#matrix-terminal").dblclick(function() {
document.location.search = "?extension_in_menu=eventos&sec=extensions&sec2=extensions/matrix_events&pure=1"; document.location.search = "?extension_in_menu=eventos&sec=extensions&sec2=extensions/matrix_events&pure=1";
}); });
} }
terminal.context = terminal.element.getContext("2d"); terminal.context = terminal.element.getContext("2d");
terminal.print(); terminal.print();
showLastEvents(); showLastEvents();
}); });
// Shows the last 5 events via ajax // Shows the last 5 events via ajax
function showLastEvents () { function showLastEvents () {
if (terminal.timers.events) { if (terminal.timers.events) {
clearInterval(terminal.timers.events); clearInterval(terminal.timers.events);
} }
$.ajax ({ $.ajax ({
url : "ajax.php", url : "ajax.php",
data : { data : {
page: "<?php echo EXTENSIONS_DIR; ?>/matrix_events/ajax", page: "<?php echo EXTENSIONS_DIR; ?>/matrix_events/ajax",
get_last_events: 1 get_last_events: 1
}, },
type : 'POST', type : 'POST',
dataType : 'json', dataType : 'json',
success: function (data) { success: function (data) {
events = data; events = data;
if (events.length > 0) { if (events.length > 0) {
event = events.shift(); event = events.shift();
terminal.showEvent(event.agent + " - " + event.text + " - " + event.date); terminal.showEvent(event.agent + " - " + event.text + " - " + event.date);
} }
var showEventsInterval = function () { var showEventsInterval = function () {
if (events.length > 0) { if (events.length > 0) {
event = events.shift(); event = events.shift();
terminal.showEvent(event.agent + " - " + event.text + " - " + event.date); terminal.showEvent(event.agent + " - " + event.text + " - " + event.date);
} else { } else {
showLastEvents(); showLastEvents();
} }
} }
terminal.timers.events = setInterval(showEventsInterval, 20000); terminal.timers.events = setInterval(showEventsInterval, 20000);
} }
}); });
} }
</script> </script>
<?php <?php
} }
extensions_add_operation_menu_option("Matrix", 'eventos', '', "v1r1");
extensions_add_operation_menu_option('Matrix', 'eventos', '', 'v1r1');
extensions_add_main_function('load_matrix_console'); extensions_add_main_function('load_matrix_console');
?>

View File

@ -4,89 +4,93 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
function extension_uploader_extensions()
{
global $config;
function extension_uploader_extensions() { if (!check_acl($config['id_user'], 0, 'PM')) {
global $config; db_pandora_audit(
'ACL Violation',
if (!check_acl($config['id_user'], 0, "PM")) { 'Trying to access Group Management'
db_pandora_audit("ACL Violation", );
"Trying to access Group Management"); include 'general/noaccess.php';
require ("general/noaccess.php");
return;
return; }
}
ui_print_page_header(
ui_print_page_header (__("Uploader extension"), __('Uploader extension'),
"images/extensions.png", false, "", true, ""); 'images/extensions.png',
false,
$upload = (bool)get_parameter('upload', 0); '',
$upload_enteprise = (bool)get_parameter('upload_enterprise', 0); true,
''
if ($upload) { );
$error = $_FILES['extension']['error'];
$upload = (bool) get_parameter('upload', 0);
if ($error == 0) { $upload_enteprise = (bool) get_parameter('upload_enterprise', 0);
$zip = new ZipArchive;
if ($upload) {
$tmpName = $_FILES['extension']['tmp_name']; $error = $_FILES['extension']['error'];
if ($upload_enteprise) { if ($error == 0) {
$pathname = $config['homedir'] . '/' . ENTERPRISE_DIR . '/' . EXTENSIONS_DIR . '/'; $zip = new ZipArchive;
}
else { $tmpName = $_FILES['extension']['tmp_name'];
$pathname = $config['homedir'] . '/' . EXTENSIONS_DIR . '/';
} if ($upload_enteprise) {
$pathname = $config['homedir'].'/'.ENTERPRISE_DIR.'/'.EXTENSIONS_DIR.'/';
if ($zip->open($tmpName) === true) { } else {
$result = $zip->extractTo($pathname); $pathname = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
} }
else {
$result = false; if ($zip->open($tmpName) === true) {
} $result = $zip->extractTo($pathname);
} } else {
else { $result = false;
$result = false; }
} } else {
$result = false;
if ($result) { }
db_pandora_audit ("Extension manager", "Upload extension " . $_FILES['extension']['name']);
} if ($result) {
db_pandora_audit('Extension manager', 'Upload extension '.$_FILES['extension']['name']);
ui_print_result_message ($result, __('Success to upload extension'), }
__('Fail to upload extension'));
} ui_print_result_message(
$result,
$table = null; __('Success to upload extension'),
__('Fail to upload extension')
$table->width = '100%'; );
$table->class = 'databox filters'; }
$table->data = array();
$table->data[0][0] = __('Upload extension'); $table = null;
$table->data[0][1] = html_print_input_file('extension', true) .
ui_print_help_tip (__("Upload the extension as a zip file."), true); $table->width = '100%';
if (enterprise_installed()) { $table->class = 'databox filters';
$table->data[0][2] = __('Upload enterprise extension') . "&nbsp;" . $table->data = [];
html_print_checkbox('upload_enterprise', 1, false, true); $table->data[0][0] = __('Upload extension');
} $table->data[0][1] = html_print_input_file('extension', true).ui_print_help_tip(__('Upload the extension as a zip file.'), true);
if (enterprise_installed()) {
echo "<form method='post' enctype='multipart/form-data'>"; $table->data[0][2] = __('Upload enterprise extension').'&nbsp;'.html_print_checkbox('upload_enterprise', 1, false, true);
html_print_table($table); }
echo "<div style='text-align: right; width: " . $table->width . "'>";
html_print_input_hidden('upload', 1); echo "<form method='post' enctype='multipart/form-data'>";
html_print_submit_button(__('Upload'), 'submit', false, 'class="sub add"'); html_print_table($table);
echo "</div>"; echo "<div style='text-align: right; width: ".$table->width."'>";
echo "</form>"; html_print_input_hidden('upload', 1);
html_print_submit_button(__('Upload'), 'submit', false, 'class="sub add"');
echo '</div>';
echo '</form>';
} }
extensions_add_godmode_menu_option(__('Extension uploader'), 'PM', null, null, "v1r1");
extensions_add_godmode_menu_option(__('Extension uploader'), 'PM', null, null, 'v1r1');
extensions_add_godmode_function('extension_uploader_extensions'); extensions_add_godmode_function('extension_uploader_extensions');
?>

View File

@ -4,221 +4,238 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
function pandora_files_repo_install()
{
global $config;
if (isset($config['files_repo_installed']) && $config['files_repo_installed'] == 1) {
return;
}
function pandora_files_repo_install () { $full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
global $config; $full_sql_dir = $full_extensions_dir.'files_repo/sql/';
$file_path = '';
if (isset($config['files_repo_installed']) && $config['files_repo_installed'] == 1) switch ($config['dbtype']) {
return; case 'mysql':
$file_path = $full_sql_dir.'files_repo.sql';
$full_extensions_dir = $config['homedir']."/".EXTENSIONS_DIR."/"; break;
$full_sql_dir = $full_extensions_dir."files_repo/sql/";
case 'postgresql':
$file_path = ''; $file_path = $full_sql_dir.'files_repo.postgreSQL.sql';
switch ($config['dbtype']) { break;
case "mysql":
$file_path = $full_sql_dir . 'files_repo.sql'; case 'oracle':
break; $file_path = $full_sql_dir.'files_repo.oracle.sql';
case "postgresql": break;
$file_path = $full_sql_dir . 'files_repo.postgreSQL.sql'; }
break;
case "oracle": if (!empty($file_path)) {
$file_path = $full_sql_dir . 'files_repo.oracle.sql'; $result = db_process_file($file_path);
break;
} if ($result) {
// Configuration values
if (!empty($file_path)) { $values = [
$result = db_process_file($file_path); 'token' => 'files_repo_installed',
'value' => 1,
if ($result) { ];
/* Configuration values */ db_process_sql_insert('tconfig', $values);
$values = array( }
"token" => "files_repo_installed", }
"value" => 1
);
db_process_sql_insert('tconfig', $values);
}
}
} }
function pandora_files_repo_uninstall () {
global $config;
switch ($config["dbtype"]) {
case "mysql":
db_process_sql('DROP TABLE `tfiles_repo_group`');
db_process_sql('DROP TABLE `tfiles_repo`');
db_process_sql('DELETE FROM `tconfig`
WHERE `token` LIKE "files_repo_%"');
break;
case "postgresql":
db_process_sql('DROP TABLE "tfiles_repo_group"');
db_process_sql('DROP TABLE "tfiles_repo"');
db_process_sql('DELETE FROM "tconfig"
WHERE "token" LIKE \'files_repo_%\'');
break;
case "oracle":
db_process_sql('DROP TRIGGER "tfiles_repo_group_inc"');
db_process_sql('DROP SEQUENCE "tfiles_repo_group_s"');
db_process_sql('DROP TABLE "tfiles_repo_group"');
db_process_sql('DROP TRIGGER "tfiles_repo_inc"');
db_process_sql('DROP SEQUENCE "tfiles_repo_s"');
db_process_sql('DROP TABLE "tfiles_repo"');
db_process_sql('DELETE FROM tconfig
WHERE token LIKE \'files_repo_%\'');
break;
}
if (!empty($config['attachment_store'])) function pandora_files_repo_uninstall()
delete_dir($config['attachment_store']."/files_repo"); {
global $config;
switch ($config['dbtype']) {
case 'mysql':
db_process_sql('DROP TABLE `tfiles_repo_group`');
db_process_sql('DROP TABLE `tfiles_repo`');
db_process_sql(
'DELETE FROM `tconfig`
WHERE `token` LIKE "files_repo_%"'
);
break;
case 'postgresql':
db_process_sql('DROP TABLE "tfiles_repo_group"');
db_process_sql('DROP TABLE "tfiles_repo"');
db_process_sql(
'DELETE FROM "tconfig"
WHERE "token" LIKE \'files_repo_%\''
);
break;
case 'oracle':
db_process_sql('DROP TRIGGER "tfiles_repo_group_inc"');
db_process_sql('DROP SEQUENCE "tfiles_repo_group_s"');
db_process_sql('DROP TABLE "tfiles_repo_group"');
db_process_sql('DROP TRIGGER "tfiles_repo_inc"');
db_process_sql('DROP SEQUENCE "tfiles_repo_s"');
db_process_sql('DROP TABLE "tfiles_repo"');
db_process_sql(
'DELETE FROM tconfig
WHERE token LIKE \'files_repo_%\''
);
break;
}
if (!empty($config['attachment_store'])) {
delete_dir($config['attachment_store'].'/files_repo');
}
} }
function pandora_files_repo_godmode () {
global $config; function pandora_files_repo_godmode()
{
if (!isset($config['files_repo_installed']) || !$config['files_repo_installed']) { global $config;
ui_print_error_message(__('Extension not installed'));
} if (!isset($config['files_repo_installed']) || !$config['files_repo_installed']) {
ui_print_error_message(__('Extension not installed'));
// ACL Check }
check_login ();
if (! check_acl ($config['id_user'], 0, "PM")) { // ACL Check
db_pandora_audit("ACL Violation", "Trying to access to Files repository"); check_login();
require ("general/noaccess.php"); if (! check_acl($config['id_user'], 0, 'PM')) {
return; db_pandora_audit('ACL Violation', 'Trying to access to Files repository');
} include 'general/noaccess.php';
return;
// Header tabs }
$godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'
. html_print_image ("images/setup.png", true, array ("title" => __('Administration view'))) // Header tabs
. "</a>"; $godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/setup.png', true, ['title' => __('Administration view')]).'</a>';
$godmode['godmode'] = 1; $godmode['godmode'] = 1;
$godmode['active'] = 1; $godmode['active'] = 1;
$operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">' $operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/operation.png', true, ['title' => __('Operation view')]).'</a>';
. html_print_image ("images/operation.png", true, array ("title" => __('Operation view'))) $operation['operation'] = 1;
. "</a>";
$operation['operation'] = 1; $onheader = [
'godmode' => $godmode,
$onheader = array('godmode' => $godmode, 'operation' => $operation); 'operation' => $operation,
// Header ];
ui_print_page_header (__("Files repository manager"), "images/extensions.png", false, "", true, $onheader); // Header
ui_print_page_header(__('Files repository manager'), 'images/extensions.png', false, '', true, $onheader);
$full_extensions_dir = $config['homedir']."/".EXTENSIONS_DIR."/";
require_once ($full_extensions_dir . "files_repo/functions_files_repo.php"); $full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
include_once $full_extensions_dir.'files_repo/functions_files_repo.php';
// Directory files_repo check
if (!files_repo_check_directory(true)) { // Directory files_repo check
return; if (!files_repo_check_directory(true)) {
} return;
}
$server_content_length = 0;
if (isset($_SERVER['CONTENT_LENGTH'])) $server_content_length = 0;
$server_content_length = $_SERVER['CONTENT_LENGTH']; if (isset($_SERVER['CONTENT_LENGTH'])) {
$server_content_length = $_SERVER['CONTENT_LENGTH'];
// Check for an anoying error that causes the $_POST and $_FILES arrays }
// were empty if the file is larger than the post_max_size
if (intval($server_content_length) > 0 && empty($_POST)) { // Check for an anoying error that causes the $_POST and $_FILES arrays
ui_print_error_message(__('The file exceeds the maximum size')); // were empty if the file is larger than the post_max_size
} if (intval($server_content_length) > 0 && empty($_POST)) {
ui_print_error_message(__('The file exceeds the maximum size'));
// GET and POST parameters }
$file_id = (int) get_parameter ("file_id");
$add_file = (bool) get_parameter ("add_file"); // GET and POST parameters
$update_file = (bool) get_parameter ("update_file"); $file_id = (int) get_parameter('file_id');
$delete_file = (bool) get_parameter ("delete"); $add_file = (bool) get_parameter('add_file');
$update_file = (bool) get_parameter('update_file');
// File add or update $delete_file = (bool) get_parameter('delete');
if ( $add_file || ($update_file && $file_id > 0) ) {
$groups = get_parameter ("groups", array()); // File add or update
$public = (bool) get_parameter ("public"); if ($add_file || ($update_file && $file_id > 0)) {
$description = io_safe_output((string) get_parameter ("description")); $groups = get_parameter('groups', []);
if (mb_strlen($description, "UTF-8") > 200) { $public = (bool) get_parameter('public');
$description = mb_substr($description, 0, 200, "UTF-8"); $description = io_safe_output((string) get_parameter('description'));
} if (mb_strlen($description, 'UTF-8') > 200) {
$description = io_safe_input($description); $description = mb_substr($description, 0, 200, 'UTF-8');
}
if ($add_file) {
$result = files_repo_add_file("upfile", $description, $groups, $public); $description = io_safe_input($description);
} elseif ($update_file) {
$result = files_repo_update_file($file_id, $description, $groups, $public); if ($add_file) {
$file_id = 0; $result = files_repo_add_file('upfile', $description, $groups, $public);
} } else if ($update_file) {
if ($result['status'] == false) { $result = files_repo_update_file($file_id, $description, $groups, $public);
ui_print_error_message($result['message']); $file_id = 0;
} }
}
// File delete if ($result['status'] == false) {
if ($delete_file && $file_id > 0) { ui_print_error_message($result['message']);
$result = files_repo_delete_file($file_id); }
if ($result !== -1) { }
ui_print_result_message($result, __('Successfully deleted'), __('Could not be deleted'));
} // File delete
$file_id = 0; if ($delete_file && $file_id > 0) {
} $result = files_repo_delete_file($file_id);
if ($result !== -1) {
// FORM ui_print_result_message($result, __('Successfully deleted'), __('Could not be deleted'));
require ($full_extensions_dir."files_repo/files_repo_form.php"); }
if (!$file_id) {
// LIST $file_id = 0;
$manage = true; }
require ($full_extensions_dir."files_repo/files_repo_list.php");
} // FORM
include $full_extensions_dir.'files_repo/files_repo_form.php';
if (!$file_id) {
// LIST
$manage = true;
include $full_extensions_dir.'files_repo/files_repo_list.php';
}
} }
function pandora_files_repo_operation () {
global $config; function pandora_files_repo_operation()
{
// Header tabs global $config;
$onheader = array();
if (check_acl($config['id_user'], 0, "PM")) { // Header tabs
$godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">' $onheader = [];
. html_print_image ("images/setup.png", true, array ("title" => __('Administration view'))) if (check_acl($config['id_user'], 0, 'PM')) {
. "</a>"; $godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/setup.png', true, ['title' => __('Administration view')]).'</a>';
$godmode['godmode'] = 1; $godmode['godmode'] = 1;
$operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">' $operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/operation.png', true, ['title' => __('Operation view')]).'</a>';
. html_print_image ("images/operation.png", true, array ("title" => __('Operation view'))) $operation['operation'] = 1;
. "</a>"; $operation['active'] = 1;
$operation['operation'] = 1;
$operation['active'] = 1; $onheader = [
'godmode' => $godmode,
$onheader = array('godmode' => $godmode, 'operation' => $operation); 'operation' => $operation,
} ];
// Header }
ui_print_page_header (__("Files repository"), "images/extensions.png", false, "", false, $onheader);
// Header
$full_extensions_dir = $config['homedir']."/".EXTENSIONS_DIR."/"; ui_print_page_header(__('Files repository'), 'images/extensions.png', false, '', false, $onheader);
require_once ($full_extensions_dir."files_repo/functions_files_repo.php");
$full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
// Directory files_repo check include_once $full_extensions_dir.'files_repo/functions_files_repo.php';
if (!files_repo_check_directory(true)) {
return; // Directory files_repo check
} if (!files_repo_check_directory(true)) {
return;
// LIST }
$full_extensions_dir = $config['homedir']."/".EXTENSIONS_DIR."/";
// LIST
require ($full_extensions_dir . "files_repo/files_repo_list.php"); $full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
include $full_extensions_dir.'files_repo/files_repo_list.php';
} }
extensions_add_operation_menu_option(__('Files repository'), null, null, "v1r1");
extensions_add_operation_menu_option(__('Files repository'), null, null, 'v1r1');
extensions_add_main_function('pandora_files_repo_operation'); extensions_add_main_function('pandora_files_repo_operation');
extensions_add_godmode_menu_option(__('Files repository manager'), 'PM', null, null, "v1r1"); extensions_add_godmode_menu_option(__('Files repository manager'), 'PM', null, null, 'v1r1');
extensions_add_godmode_function('pandora_files_repo_godmode'); extensions_add_godmode_function('pandora_files_repo_godmode');
//pandora_files_repo_uninstall(); // pandora_files_repo_uninstall();
pandora_files_repo_install(); pandora_files_repo_install();
?>

View File

@ -4,71 +4,69 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
$full_extensions_dir = $config['homedir']."/".EXTENSIONS_DIR."/"; $full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
require_once ($full_extensions_dir."files_repo/functions_files_repo.php"); require_once $full_extensions_dir.'files_repo/functions_files_repo.php';
$file = array(); $file = [];
$file['name'] = ''; $file['name'] = '';
$file['description'] = ''; $file['description'] = '';
$file['hash'] = ''; $file['hash'] = '';
$file['groups'] = array(); $file['groups'] = [];
if (isset($file_id) && $file_id > 0) { if (isset($file_id) && $file_id > 0) {
$file = files_repo_get_files(array('id' => $file_id)); $file = files_repo_get_files(['id' => $file_id]);
if (empty($file)) { if (empty($file)) {
$file_id = 0; $file_id = 0;
} else { } else {
$file = $file[$file_id]; $file = $file[$file_id];
} }
} }
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filters'; $table->class = 'databox filters';
$table->style = array(); $table->style = [];
$table->style[0] = "font-weight: bold;"; $table->style[0] = 'font-weight: bold;';
$table->style[2] = "text-align: center;"; $table->style[2] = 'text-align: center;';
$table->colspan = array(); $table->colspan = [];
$table->data = array(); $table->data = [];
// GROUPS // GROUPS
$groups = groups_get_all(); $groups = groups_get_all();
// Add the All group to the beginning to be always the first // Add the All group to the beginning to be always the first
// Use this instead array_unshift to keep the array keys // Use this instead array_unshift to keep the array keys
$groups = array(0 => __('All')) + $groups; $groups = ([0 => __('All')] + $groups);
$html = ""; $html = '';
$style = "style=\"padding: 2px 10px; display: inline-block;\""; $style = 'style="padding: 2px 10px; display: inline-block;"';
foreach ($groups as $id => $name) { foreach ($groups as $id => $name) {
$checked = in_array($id, $file['groups']); $checked = in_array($id, $file['groups']);
$all_checked = false; $all_checked = false;
if ($id === 0) { if ($id === 0) {
$checkbox = html_print_checkbox_extended ('groups[]', $id, $checked, false, '', 'class="chkb_all"', true); $checkbox = html_print_checkbox_extended('groups[]', $id, $checked, false, '', 'class="chkb_all"', true);
$all_checked = $checked; $all_checked = $checked;
} else { } else {
$checkbox = html_print_checkbox_extended ('groups[]', $id, $checked, $all_checked, '', 'class="chkb_group"', true); $checkbox = html_print_checkbox_extended('groups[]', $id, $checked, $all_checked, '', 'class="chkb_group"', true);
} }
$html .= "<div $style>$name&nbsp;$checkbox</div>";
$html .= "<div $style>$name&nbsp;$checkbox</div>";
} }
$row = array();
$row = [];
$row[0] = __('Groups'); $row[0] = __('Groups');
$row[1] = $html; $row[1] = $html;
$table->data[] = $row; $table->data[] = $row;
$table->colspan[][1] = 3; $table->colspan[][1] = 3;
// DESCRIPTION // DESCRIPTION
$row = array(); $row = [];
$row[0] = __('Description'); $row[0] = __('Description');
$row[0] .= ui_print_help_tip(__('Only 200 characters are permitted'), true); $row[0] .= ui_print_help_tip(__('Only 200 characters are permitted'), true);
$row[1] = html_print_textarea('description', 3, 20, $file['description'], 'style="min-height: 40px; max-height: 40px; width: 98%;"', true); $row[1] = html_print_textarea('description', 3, 20, $file['description'], 'style="min-height: 40px; max-height: 40px; width: 98%;"', true);
@ -76,54 +74,55 @@ $table->data[] = $row;
$table->colspan[][1] = 3; $table->colspan[][1] = 3;
// FILE and SUBMIT BUTTON // FILE and SUBMIT BUTTON
$row = array(); $row = [];
// Public checkbox // Public checkbox
$checkbox = html_print_checkbox('public', 1, (bool)!empty($file['hash']), true); $checkbox = html_print_checkbox('public', 1, (bool) !empty($file['hash']), true);
$style = "style=\"padding: 2px 10px; display: inline-block;\""; $style = 'style="padding: 2px 10px; display: inline-block;"';
$row[0] = __('File'); $row[0] = __('File');
if ($file_id > 0) { if ($file_id > 0) {
$row[1] = $file['name']; $row[1] = $file['name'];
$row[2] = "<div $style>".__('Public link')."&nbsp;$checkbox</div>"; $row[2] = "<div $style>".__('Public link')."&nbsp;$checkbox</div>";
$row[3] = html_print_submit_button(__('Update'), 'submit', false, 'class="sub upd"', true); $row[3] = html_print_submit_button(__('Update'), 'submit', false, 'class="sub upd"', true);
$row[3] .= html_print_input_hidden('update_file', 1, true); $row[3] .= html_print_input_hidden('update_file', 1, true);
$row[3] .= html_print_input_hidden('file_id', $file_id, true); $row[3] .= html_print_input_hidden('file_id', $file_id, true);
} else { } else {
$row[1] = html_print_input_file('upfile', true); $row[1] = html_print_input_file('upfile', true);
$row[2] = "<div $style>".__('Public link')."&nbsp;$checkbox</div>"; $row[2] = "<div $style>".__('Public link')."&nbsp;$checkbox</div>";
$row[3] = html_print_submit_button(__('Add'), 'submit', false, 'class="sub add"', true); $row[3] = html_print_submit_button(__('Add'), 'submit', false, 'class="sub add"', true);
$row[3] .= html_print_input_hidden('add_file', 1, true); $row[3] .= html_print_input_hidden('add_file', 1, true);
} }
$table->data[] = $row; $table->data[] = $row;
$table->colspan[][1] = 1; $table->colspan[][1] = 1;
$url = ui_get_full_url("index.php?sec=godmode/extensions&sec2=extensions/files_repo"); $url = ui_get_full_url('index.php?sec=godmode/extensions&sec2=extensions/files_repo');
echo "<form method='post' action='$url' enctype='multipart/form-data'>"; echo "<form method='post' action='$url' enctype='multipart/form-data'>";
html_print_table($table); html_print_table($table);
echo "</form>"; echo '</form>';
?> ?>
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
$(document).ready (function () { $(document).ready (function () {
var all_enabled = $(".chkb_all").prop("checked"); var all_enabled = $(".chkb_all").prop("checked");
if (all_enabled) { if (all_enabled) {
$(".chkb_group").prop("checked", false); $(".chkb_group").prop("checked", false);
$(".chkb_group").prop("disabled", true); $(".chkb_group").prop("disabled", true);
} }
$(".chkb_all").click(function () { $(".chkb_all").click(function () {
all_enabled = $(".chkb_all").prop("checked"); all_enabled = $(".chkb_all").prop("checked");
if (all_enabled) { if (all_enabled) {
$(".chkb_group").prop("checked", false); $(".chkb_group").prop("checked", false);
$(".chkb_group").prop("disabled", true); $(".chkb_group").prop("disabled", true);
} else { } else {
$(".chkb_group").prop("disabled", false); $(".chkb_group").prop("disabled", false);
} }
}); });
}); });
</script> </script>

View File

@ -4,18 +4,14 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas // Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License // modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
require_once '../../include/config.php';
require_once ("../../include/config.php");
$file_hash = (string) get_parameter('file'); $file_hash = (string) get_parameter('file');
@ -25,46 +21,48 @@ $check_get = (count($_GET) === 1) ? true : false;
$check_post = (count($_POST) === 0) ? true : false; $check_post = (count($_POST) === 0) ? true : false;
// Only allow the parameter 'file' // Only allow the parameter 'file'
$check_parameter = (!empty($file_hash)) ? true : false; $check_parameter = (!empty($file_hash)) ? true : false;
$check_string = (preg_match("/^[0-9a-zA-Z]{8}$/", $file_hash) === 1) ? true : false; $check_string = (preg_match('/^[0-9a-zA-Z]{8}$/', $file_hash) === 1) ? true : false;
$checks = ($check_request && $check_get && $check_post && $check_parameter && $check_string); $checks = ($check_request && $check_get && $check_post && $check_parameter && $check_string);
if (!$checks) { if (!$checks) {
throw_error(15); // ERROR throw_error(15);
// ERROR
} }
// Get the db file row // Get the db file row
$file = db_get_row_filter("tfiles_repo", array('hash' => $file_hash)); $file = db_get_row_filter('tfiles_repo', ['hash' => $file_hash]);
if (!$file) { if (!$file) {
throw_error(10); // ERROR throw_error(10);
// ERROR
} }
// Case sensitive check // Case sensitive check
$check_hash = ($file['hash'] == $file_hash) ? true : false; $check_hash = ($file['hash'] == $file_hash) ? true : false;
if (!$check_hash) { if (!$check_hash) {
throw_error(10); // ERROR throw_error(10);
// ERROR
} }
// Get the location // Get the location
$files_repo_path = io_safe_output($config['attachment_store'])."/files_repo"; $files_repo_path = io_safe_output($config['attachment_store']).'/files_repo';
$location = $files_repo_path."/".$file['id']."_".$file['name']; $location = $files_repo_path.'/'.$file['id'].'_'.$file['name'];
if (!file_exists($location) || !is_readable($location) || !is_file($location)) { if (!file_exists($location) || !is_readable($location) || !is_file($location)) {
throw_error(5); // ERROR throw_error(5);
// ERROR
} }
// All checks are fine. Download the file! // All checks are fine. Download the file!
header('Content-type: aplication/octet-stream;'); header('Content-type: aplication/octet-stream;');
header("Content-Length: " . filesize($location)); header('Content-Length: '.filesize($location));
header('Content-Disposition: attachment; filename="' . $file['name'] . '"'); header('Content-Disposition: attachment; filename="'.$file['name'].'"');
readfile($location); readfile($location);
///
function throw_error ($time = 15) {
sleep ($time);
$styleError = "background:url(\"../images/err.png\") no-repeat scroll 0 0 transparent; padding:4px 1px 6px 30px; color:#CC0000;"; function throw_error($time=15)
echo "<h3 style='" . $styleError . "'>" . {
__('Unreliable petition') . ". " . __('Please contact the administrator') . sleep($time);
"</h3>";
exit; $styleError = 'background:url("../images/err.png") no-repeat scroll 0 0 transparent; padding:4px 1px 6px 30px; color:#CC0000;';
echo "<h3 style='".$styleError."'>".__('Unreliable petition').'. '.__('Please contact the administrator').'</h3>';
exit;
} }
?>

View File

@ -4,115 +4,116 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
$full_extensions_dir = $config['homedir'] . "/" . EXTENSIONS_DIR . "/"; $full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
require_once ($full_extensions_dir . require_once $full_extensions_dir.'files_repo/functions_files_repo.php';
"files_repo/functions_files_repo.php");
$offset = (int) get_parameter('offset'); $offset = (int) get_parameter('offset');
$filter = array(); $filter = [];
$filter['limit'] = $config['block_size']; $filter['limit'] = $config['block_size'];
$filter['offset'] = $offset; $filter['offset'] = $offset;
$filter['order'] = array('field' => 'id', 'order' => 'DESC'); $filter['order'] = [
'field' => 'id',
'order' => 'DESC',
];
$files = files_repo_get_files($filter); $files = files_repo_get_files($filter);
if (!empty($files)) { if (!empty($files)) {
if (!isset($manage)) {
if (!isset($manage)) { $manage = false;
$manage = false; }
}
// Pagination
if ($manage) {
$url = ui_get_full_url("index.php?sec=godmode/extensions&sec2=extensions/files_repo");
}
else {
$url = ui_get_full_url("index.php?sec=extensions&sec2=extensions/files_repo");
}
$total_files = files_repo_get_files(false, true);
ui_pagination($total_files, $url, $offset);
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->style = array();
$table->style[1] = "max-width: 200px;";
$table->style[2] = "text-align: center;";
$table->style[3] = "text-align: center;";
$table->style[4] = "text-align: center;";
$table->head = array();
$table->head[0] = __("Name");
$table->head[1] = __("Description");
$table->head[2] = __("Size");
$table->head[3] = __("Last modification");
$table->head[4] = "";
$table->data = array();
foreach ($files as $file_id => $file) {
$data = array();
// Prepare the filename for the get_file.php script
$document_root = str_replace("\\", "/", io_safe_output($_SERVER['DOCUMENT_ROOT']));
$file['location'] = str_replace("\\", "/", io_safe_output($file['location']));
$relative_path = str_replace($document_root, '', $file['location']);
$file_path = base64_encode($relative_path);
$hash = md5($relative_path . $config['dbpass']);
$url = ui_get_full_url("include/get_file.php?file=$file_path&hash=$hash");
$date_format = ($config['date_format']) ? io_safe_output($config['date_format']) : 'F j, Y - H:m';
$data[0] = "<a href=\"$url\" target=\"_blank\">" . $file['name'] . "</a>"; // Name
$data[1] = ui_print_truncate_text($file['description'], 'description', true, true); // Description
$data[2] = ui_format_filesize($file['size']); // Size
$data[3] = date($date_format, $file['mtime']); // Last modification
// Public URL
$data[4] = "";
if (!empty($file['hash'])) {
$public_url = ui_get_full_url(EXTENSIONS_DIR . "/files_repo/files_repo_get_file.php?file=" . $file['hash']);
$message = __('Copy to clipboard') . ": Ctrl+C -> Enter";
$action = "window.prompt('$message', '$public_url');";
$data[4] .= "<a href=\"javascript:;\" onclick=\"$action\">";
$data[4] .= html_print_image('images/world.png', true, array('title' => __('Public link'))); // Public link image
$data[4] .= "</a> ";
}
$data[4] .= "<a href=\"$url\" target=\"_blank\">";
$data[4] .= html_print_image('images/download.png', true, array('title' => __('Download'))); // Download image
$data[4] .= "</a>";
if ($manage) {
$config_url = ui_get_full_url("index.php?sec=godmode/extensions&sec2=extensions/files_repo&file_id=$file_id");
$data[4] .= " <a href=\"$config_url\">";
$data[4] .= html_print_image('images/config.png', true, array('title' => __('Edit'))); // Edit image
$data[4] .= "</a>";
$delete_url = ui_get_full_url("index.php?sec=godmode/extensions&sec2=extensions/files_repo&delete=1&file_id=$file_id");
$data[4] .= " <a href=\"$delete_url\" onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\">";
$data[4] .= html_print_image('images/cross.png', true, array('title' => __('Delete'))); // Delete image
$data[4] .= "</a>";
}
$table->data[] = $data;
}
html_print_table($table);
}
else {
ui_print_info_message(__('No items'));
}
?> // Pagination
if ($manage) {
$url = ui_get_full_url('index.php?sec=godmode/extensions&sec2=extensions/files_repo');
} else {
$url = ui_get_full_url('index.php?sec=extensions&sec2=extensions/files_repo');
}
$total_files = files_repo_get_files(false, true);
ui_pagination($total_files, $url, $offset);
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->style = [];
$table->style[1] = 'max-width: 200px;';
$table->style[2] = 'text-align: center;';
$table->style[3] = 'text-align: center;';
$table->style[4] = 'text-align: center;';
$table->head = [];
$table->head[0] = __('Name');
$table->head[1] = __('Description');
$table->head[2] = __('Size');
$table->head[3] = __('Last modification');
$table->head[4] = '';
$table->data = [];
foreach ($files as $file_id => $file) {
$data = [];
// Prepare the filename for the get_file.php script
$document_root = str_replace('\\', '/', io_safe_output($_SERVER['DOCUMENT_ROOT']));
$file['location'] = str_replace('\\', '/', io_safe_output($file['location']));
$relative_path = str_replace($document_root, '', $file['location']);
$file_path = base64_encode($relative_path);
$hash = md5($relative_path.$config['dbpass']);
$url = ui_get_full_url("include/get_file.php?file=$file_path&hash=$hash");
$date_format = ($config['date_format']) ? io_safe_output($config['date_format']) : 'F j, Y - H:m';
$data[0] = "<a href=\"$url\" target=\"_blank\">".$file['name'].'</a>';
// Name
$data[1] = ui_print_truncate_text($file['description'], 'description', true, true);
// Description
$data[2] = ui_format_filesize($file['size']);
// Size
$data[3] = date($date_format, $file['mtime']);
// Last modification
// Public URL
$data[4] = '';
if (!empty($file['hash'])) {
$public_url = ui_get_full_url(EXTENSIONS_DIR.'/files_repo/files_repo_get_file.php?file='.$file['hash']);
$message = __('Copy to clipboard').': Ctrl+C -> Enter';
$action = "window.prompt('$message', '$public_url');";
$data[4] .= "<a href=\"javascript:;\" onclick=\"$action\">";
$data[4] .= html_print_image('images/world.png', true, ['title' => __('Public link')]);
// Public link image
$data[4] .= '</a> ';
}
$data[4] .= "<a href=\"$url\" target=\"_blank\">";
$data[4] .= html_print_image('images/download.png', true, ['title' => __('Download')]);
// Download image
$data[4] .= '</a>';
if ($manage) {
$config_url = ui_get_full_url("index.php?sec=godmode/extensions&sec2=extensions/files_repo&file_id=$file_id");
$data[4] .= " <a href=\"$config_url\">";
$data[4] .= html_print_image('images/config.png', true, ['title' => __('Edit')]);
// Edit image
$data[4] .= '</a>';
$delete_url = ui_get_full_url("index.php?sec=godmode/extensions&sec2=extensions/files_repo&delete=1&file_id=$file_id");
$data[4] .= " <a href=\"$delete_url\" onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\">";
$data[4] .= html_print_image('images/cross.png', true, ['title' => __('Delete')]);
// Delete image
$data[4] .= '</a>';
}
$table->data[] = $data;
}
html_print_table($table);
} else {
ui_print_info_message(__('No items'));
}

View File

@ -4,300 +4,321 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
function files_repo_check_directory($print_messages=false)
{
global $config;
$attachment_path = io_safe_output($config['attachment_store']);
$files_repo_path = $attachment_path.'/files_repo';
function files_repo_check_directory ($print_messages = false) { $result = false;
global $config; $messages = '';
$attachment_path = io_safe_output($config['attachment_store']); // attachment/ check
$files_repo_path = $attachment_path."/files_repo"; if (!is_writable($attachment_path)) {
$messages .= ui_print_error_message(
[
'message' => __('Attachment directory is not writable by HTTP Server').'</h3>'.'<p>'.sprinf(__('Please check that the web server has write rights on the %s directory'), $attachment_path),
'no_close' => true,
'force_style' => 'color: #000000 !important',
],
'',
true
);
} else {
// attachment/agent_packages/ check
if (!file_exists($files_repo_path) || !is_writable($files_repo_path)) {
// Create the directoty if not exist
if (!file_exists($files_repo_path)) {
mkdir($files_repo_path);
}
$result = false; if (!is_writable($files_repo_path)) {
$messages = ""; $messages .= ui_print_error_message(
[
'message' => __('Attachment directory is not writable by HTTP Server').'</h3>'.'<p>'.sprintf(__('Please check that the web server has write rights on the %s directory'), $attachment_path),
'no_close' => true,
'force_style' => 'color: #000000 !important',
],
'',
true
);
} else {
$result = true;
}
} else {
$result = true;
}
}
// attachment/ check if ($print_messages) {
if (!is_writable($attachment_path)) { echo $messages;
$messages .= ui_print_error_message(array('message' => __('Attachment directory is not writable by HTTP Server') }
.'</h3>'.'<p>'.sprinf(__('Please check that the web server has write rights on the %s directory'), $attachment_path),
'no_close' => true, 'force_style' => 'color: #000000 !important'), '', true);
} else {
// attachment/agent_packages/ check
if (!file_exists($files_repo_path) || !is_writable($files_repo_path)) {
// Create the directoty if not exist
if (!file_exists($files_repo_path)) {
mkdir($files_repo_path);
}
if (!is_writable($files_repo_path)) {
$messages .= ui_print_error_message(array('message' => __('Attachment directory is not writable by HTTP Server')
.'</h3>'.'<p>'.sprintf(__('Please check that the web server has write rights on the %s directory'), $attachment_path),
'no_close' => true, 'force_style' => 'color: #000000 !important'), '', true);
} else {
$result = true;
}
} else {
$result = true;
}
}
if ($print_messages) { return $result;
echo $messages;
}
return $result;
} }
function files_repo_check_file_acl ($file_id, $user_id = false, $file_groups = false, $user_groups = false) {
global $config;
$result = false; function files_repo_check_file_acl($file_id, $user_id=false, $file_groups=false, $user_groups=false)
if (!$user_id) { {
$user_id = $config['id_user']; global $config;
}
if (is_user_admin($user_id)) {
return true;
}
if (!$file_groups) {
$file_groups = files_repo_get_file_groups($file_id);
if (empty($file_groups)) {
$file_groups = array();
}
}
if (in_array(0, $file_groups)) { $result = false;
return true; if (!$user_id) {
} $user_id = $config['id_user'];
}
if (!$user_groups) { if (is_user_admin($user_id)) {
$user_groups = users_get_groups ($user_id, false, true); return true;
if (empty($user_groups)) { }
$user_groups = array();
}
}
foreach ($file_groups as $group_id) { if (!$file_groups) {
// $user_groups has the id in the array keys $file_groups = files_repo_get_file_groups($file_id);
if (in_array($group_id, $user_groups)) { if (empty($file_groups)) {
$result = true; $file_groups = [];
break; }
} }
}
if (in_array(0, $file_groups)) {
return $result; return true;
}
if (!$user_groups) {
$user_groups = users_get_groups($user_id, false, true);
if (empty($user_groups)) {
$user_groups = [];
}
}
foreach ($file_groups as $group_id) {
// $user_groups has the id in the array keys
if (in_array($group_id, $user_groups)) {
$result = true;
break;
}
}
return $result;
} }
function files_repo_get_file_groups ($file_id) {
$groups = array(); function files_repo_get_file_groups($file_id)
$filter = array('id_file' => $file_id); {
$result = db_get_all_rows_filter("tfiles_repo_group", $filter, "id_group"); $groups = [];
$filter = ['id_file' => $file_id];
$result = db_get_all_rows_filter('tfiles_repo_group', $filter, 'id_group');
if (!empty($result)) { if (!empty($result)) {
foreach ($result as $key => $value) { foreach ($result as $key => $value) {
$groups[] = $value['id_group']; $groups[] = $value['id_group'];
} }
} }
return $groups; return $groups;
} }
function files_repo_get_user_groups ($user_id) {
$groups = array(); function files_repo_get_user_groups($user_id)
$filter = array('id_usuario' => $user_id); {
$result = db_get_all_rows_filter("tusuario_perfil", $filter, "id_grupo"); $groups = [];
$filter = ['id_usuario' => $user_id];
$result = db_get_all_rows_filter('tusuario_perfil', $filter, 'id_grupo');
if (!empty($result)) { if (!empty($result)) {
foreach ($result as $key => $value) { foreach ($result as $key => $value) {
$groups[] = $value['id_grupo']; $groups[] = $value['id_grupo'];
} }
} }
return $groups; return $groups;
} }
function files_repo_get_files ($filter = false, $count = false) {
global $config; function files_repo_get_files($filter=false, $count=false)
{
// Don't use the realpath for the download links! global $config;
$files_repo_path = io_safe_output($config['attachment_store'])."/files_repo";
// Don't use the realpath for the download links!
$sql = "SELECT * $files_repo_path = io_safe_output($config['attachment_store']).'/files_repo';
$sql = 'SELECT *
FROM tfiles_repo FROM tfiles_repo
" . db_format_array_where_clause_sql($filter, "AND", "WHERE"); '.db_format_array_where_clause_sql($filter, 'AND', 'WHERE');
$files = db_get_all_rows_sql($sql); $files = db_get_all_rows_sql($sql);
if ($files === false) if ($files === false) {
$files = array(); $files = [];
}
$user_groups = files_repo_get_user_groups($config['id_user']);
$user_groups = files_repo_get_user_groups($config['id_user']);
$files_data = array();
foreach ($files as $file) { $files_data = [];
foreach ($files as $file) {
$file_groups = files_repo_get_file_groups($file['id']); $file_groups = files_repo_get_file_groups($file['id']);
$permission = files_repo_check_file_acl ($file['id'], $config['id_user'], $file_groups, $user_groups); $permission = files_repo_check_file_acl($file['id'], $config['id_user'], $file_groups, $user_groups);
if (!$permission) { if (!$permission) {
continue; continue;
} }
$data = array(); $data = [];
$data['name'] = $file['name']; $data['name'] = $file['name'];
$data['description'] = $file['description']; $data['description'] = $file['description'];
$data['location'] = $files_repo_path . "/" . $file['id']."_".$data['name']; $data['location'] = $files_repo_path.'/'.$file['id'].'_'.$data['name'];
// Size in bytes // Size in bytes
$data['size'] = filesize($data['location']); $data['size'] = filesize($data['location']);
// Last modification time in unix timestamp // Last modification time in unix timestamp
$data['mtime'] = filemtime($data['location']); $data['mtime'] = filemtime($data['location']);
$data['groups'] = $file_groups; $data['groups'] = $file_groups;
$data['hash'] = $file['hash']; $data['hash'] = $file['hash'];
$files_data[$file['id']] = $data; $files_data[$file['id']] = $data;
} }
if ($count) { if ($count) {
$files_data = count($files_data); $files_data = count($files_data);
} }
return $files_data; return $files_data;
} }
function files_repo_add_file ($file_input_name = "upfile", $description = "", $groups = array(), $public = false) {
global $config;
$attachment_path = io_safe_output($config['attachment_store']); function files_repo_add_file($file_input_name='upfile', $description='', $groups=[], $public=false)
$files_repo_path = $attachment_path."/"."files_repo"; {
global $config;
$result = array(); $attachment_path = io_safe_output($config['attachment_store']);
$result["status"] = false; $files_repo_path = $attachment_path.'/'.'files_repo';
$result["message"] = "";
$upload_status = get_file_upload_status($file_input_name); $result = [];
$upload_result = translate_file_upload_status($upload_status); $result['status'] = false;
$result['message'] = '';
if ($upload_result === true) { $upload_status = get_file_upload_status($file_input_name);
$filename = $_FILES[$file_input_name]['name']; $upload_result = translate_file_upload_status($upload_status);
// Replace conflictive characters
$filename = str_replace (array(" ", "=", "?", "&"), "_", $filename);
$filename = filter_var($filename, FILTER_SANITIZE_URL);
// The filename should not be larger than 200 characters
if (mb_strlen($filename, "UTF-8") > 200) {
$filename = mb_substr($filename, 0, 200, "UTF-8");
}
$hash = ""; if ($upload_result === true) {
if ($public) { $filename = $_FILES[$file_input_name]['name'];
$hash = md5(time() . $config['dbpass']); // Replace conflictive characters
$hash = mb_substr($hash, 0, 8, "UTF-8"); $filename = str_replace([' ', '=', '?', '&'], '_', $filename);
} $filename = filter_var($filename, FILTER_SANITIZE_URL);
// The filename should not be larger than 200 characters
if (mb_strlen($filename, 'UTF-8') > 200) {
$filename = mb_substr($filename, 0, 200, 'UTF-8');
}
$values = array( $hash = '';
'name' => $filename, if ($public) {
'description' => $description, $hash = md5(time().$config['dbpass']);
'hash' => $hash $hash = mb_substr($hash, 0, 8, 'UTF-8');
); }
$file_id = db_process_sql_insert('tfiles_repo', $values);
if ($file_id) { $values = [
'name' => $filename,
$file_tmp = $_FILES[$file_input_name]['tmp_name']; 'description' => $description,
$destination = $files_repo_path."/".$file_id."_".$filename; 'hash' => $hash,
];
if (move_uploaded_file($file_tmp, $destination)) { $file_id = db_process_sql_insert('tfiles_repo', $values);
if (is_array($groups) && !empty($groups)) { if ($file_id) {
db_process_sql_delete('tfiles_repo_group', array('id_file' => $file_id)); $file_tmp = $_FILES[$file_input_name]['tmp_name'];
foreach ($groups as $group) { $destination = $files_repo_path.'/'.$file_id.'_'.$filename;
$values = array(
'id_file' => $file_id,
'id_group' => $group
);
db_process_sql_insert('tfiles_repo_group', $values);
}
}
$result["status"] = true;
} else {
db_process_sql_delete('tfiles_repo', array('id' => $file_id));
unlink ($file_tmp);
$result["message"] = __('The file could not be copied');
}
} else {
$result["message"] = __('There was an error creating the file');
}
} else {
$result["message"] = $upload_result;
}
return $result; if (move_uploaded_file($file_tmp, $destination)) {
if (is_array($groups) && !empty($groups)) {
db_process_sql_delete('tfiles_repo_group', ['id_file' => $file_id]);
foreach ($groups as $group) {
$values = [
'id_file' => $file_id,
'id_group' => $group,
];
db_process_sql_insert('tfiles_repo_group', $values);
}
}
$result['status'] = true;
} else {
db_process_sql_delete('tfiles_repo', ['id' => $file_id]);
unlink($file_tmp);
$result['message'] = __('The file could not be copied');
}
} else {
$result['message'] = __('There was an error creating the file');
}
} else {
$result['message'] = $upload_result;
}
return $result;
} }
function files_repo_update_file ($file_id, $description = "", $groups = array(), $public = false) {
global $config;
$result = array(); function files_repo_update_file($file_id, $description='', $groups=[], $public=false)
$result["status"] = false; {
$result["message"] = ""; global $config;
$hash = ""; $result = [];
if ($public) { $result['status'] = false;
$hash = md5(time() . $config['dbpass']); $result['message'] = '';
$hash = mb_substr($hash, 0, 8, "UTF-8");
}
$values = array( $hash = '';
'description' => $description, if ($public) {
'hash' => $hash $hash = md5(time().$config['dbpass']);
); $hash = mb_substr($hash, 0, 8, 'UTF-8');
$filter = array('id' => $file_id); }
$res = db_process_sql_update('tfiles_repo', $values, $filter);
if ($res !== false) {
if (is_array($groups) && !empty($groups)) {
db_process_sql_delete('tfiles_repo_group', array('id_file' => $file_id));
foreach ($groups as $group) {
$values = array(
'id_file' => $file_id,
'id_group' => $group
);
db_process_sql_insert('tfiles_repo_group', $values);
}
}
$result["status"] = true;
} else {
$result["message"] = __('There was an error updating the file');
}
return $result; $values = [
'description' => $description,
'hash' => $hash,
];
$filter = ['id' => $file_id];
$res = db_process_sql_update('tfiles_repo', $values, $filter);
if ($res !== false) {
if (is_array($groups) && !empty($groups)) {
db_process_sql_delete('tfiles_repo_group', ['id_file' => $file_id]);
foreach ($groups as $group) {
$values = [
'id_file' => $file_id,
'id_group' => $group,
];
db_process_sql_insert('tfiles_repo_group', $values);
}
}
$result['status'] = true;
} else {
$result['message'] = __('There was an error updating the file');
}
return $result;
} }
function files_repo_delete_file ($file_id) {
global $config;
$result = -1; function files_repo_delete_file($file_id)
{
global $config;
$filename = db_get_value("name", "tfiles_repo", "id", $file_id); $result = -1;
if ($filename) { $filename = db_get_value('name', 'tfiles_repo', 'id', $file_id);
$attachment_path = io_safe_output($config['attachment_store']);
$files_repo_path = $attachment_path."/files_repo";
$location = $files_repo_path."/".$file_id."_".$filename;
if (file_exists($location)) { if ($filename) {
$result = false; $attachment_path = io_safe_output($config['attachment_store']);
if (unlink($location)) { $files_repo_path = $attachment_path.'/files_repo';
$result = (bool) db_process_sql_delete('tfiles_repo', array('id' => $file_id)); $location = $files_repo_path.'/'.$file_id.'_'.$filename;
}
} if (file_exists($location)) {
} $result = false;
if (unlink($location)) {
return $result; $result = (bool) db_process_sql_delete('tfiles_repo', ['id' => $file_id]);
}
}
}
return $result;
} }
?>

View File

@ -4,28 +4,26 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
include_once($config['homedir'] . "/include/functions_agents.php"); require_once $config['homedir'].'/include/functions_agents.php';
include_once($config['homedir'] . "/include/functions_modules.php"); require_once $config['homedir'].'/include/functions_modules.php';
include_once($config['homedir'] . "/include/functions.php"); require_once $config['homedir'].'/include/functions.php';
function createXMLData($agent, $agentModule, $time, $data) {
global $config; function createXMLData($agent, $agentModule, $time, $data)
{
$xmlTemplate = "<?xml version='1.0' encoding='UTF-8'?> global $config;
<agent_data description='' group='' os_name='%s' " .
" os_version='%s' interval='%d' version='%s' timestamp='%s' agent_name='%s' timezone_offset='0'> $xmlTemplate = "<?xml version='1.0' encoding='UTF-8'?>
<agent_data description='' group='' os_name='%s' "." os_version='%s' interval='%d' version='%s' timestamp='%s' agent_name='%s' timezone_offset='0'>
<module> <module>
<name><![CDATA[%s]]></name> <name><![CDATA[%s]]></name>
<description><![CDATA[%s]]></description> <description><![CDATA[%s]]></description>
@ -33,228 +31,241 @@ function createXMLData($agent, $agentModule, $time, $data) {
<data><![CDATA[%s]]></data> <data><![CDATA[%s]]></data>
</module> </module>
</agent_data>"; </agent_data>";
$xml = sprintf( $xml = sprintf(
$xmlTemplate, $xmlTemplate,
io_safe_output(get_os_name($agent['id_os'])), io_safe_output(get_os_name($agent['id_os'])),
io_safe_output($agent['os_version']), io_safe_output($agent['os_version']),
$agent['intervalo'], $agent['intervalo'],
io_safe_output($agent['agent_version']), io_safe_output($agent['agent_version']),
$time, $time,
io_safe_output($agent['nombre']), io_safe_output($agent['nombre']),
io_safe_output($agentModule['nombre']), io_safe_output($agentModule['nombre']),
io_safe_output($agentModule['descripcion']), io_safe_output($agentModule['descripcion']),
modules_get_type_name($agentModule['id_tipo_modulo']), modules_get_type_name($agentModule['id_tipo_modulo']),
$data $data
); );
$file_name = $config["remote_config"] . "/" . io_safe_output($agent["alias"]) . "." . strtotime($time) . ".data"; $file_name = $config['remote_config'].'/'.io_safe_output($agent['alias']).'.'.strtotime($time).'.data';
return (bool) @file_put_contents($file_name, $xml); return (bool) @file_put_contents($file_name, $xml);
} }
function mainInsertData() {
global $config;
ui_print_page_header (__("Insert data"), "images/extensions.png", false, "", true, "");
if (! check_acl ($config['id_user'], 0, "AW") && ! is_user_admin ($config['id_user'])) {
db_pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;
}
$save = (bool) get_parameter("save");
$agent_id = (int) get_parameter("agent_id");
$agent_name = (string) get_parameter("agent_name");
$id_agent_module = (int) get_parameter("id_agent_module");
$data = (string) get_parameter('data');
$date = (string) get_parameter('date', date(DATE_FORMAT));
$time = (string) get_parameter('time', date(TIME_FORMAT));
if (isset($_FILES['csv'])) {
if ($_FILES['csv']['error'] != 4) {
$csv = $_FILES['csv'];
}
else {
$csv = false;
}
}
else {
$csv = false;
}
if ($save) {
if (!check_acl($config['id_user'], agents_get_agent_group($agent_id), "AW")) {
ui_print_error_message(__('You haven\'t privileges for insert data in the agent.'));
}
else {
$agent = db_get_row_filter('tagente', array('id_agente' => $agent_id));
$agentModule = db_get_row_filter('tagente_modulo', array('id_agente_modulo' => $id_agent_module));
$done = 0;
$errors = 0;
if ($csv !== false) {
$file = file($csv['tmp_name']);
foreach ($file as $line) {
$tokens = explode(';', $line);
$utimestamp = strtotime(trim($tokens[0])) - get_fixed_offset();
$timestamp = date(DATE_FORMAT . " " . TIME_FORMAT, $utimestamp);
$result = createXMLData($agent, $agentModule, $timestamp, trim($tokens[1]));
if ($result) {
$done++;
}
else {
$errors++;
}
}
}
else {
$utimestamp = strtotime($date . " " . $time) - get_fixed_offset();
$timestamp = date(DATE_FORMAT . " " . TIME_FORMAT, $utimestamp);
$result = createXMLData($agent, $agentModule, $timestamp, $data);
if ($result) { function mainInsertData()
$done++; {
} global $config;
else {
$errors++; ui_print_page_header(__('Insert data'), 'images/extensions.png', false, '', true, '');
}
} if (! check_acl($config['id_user'], 0, 'AW') && ! is_user_admin($config['id_user'])) {
} db_pandora_audit('ACL Violation', 'Trying to access Setup Management');
include 'general/noaccess.php';
if ($errors > 0) { return;
$msg = sprintf(__('Can\'t save agent (%s), module (%s) data xml.'), $agent['alias'], $agentModule['nombre']); }
if ($errors > 1) {
$msg .= " ($errors)"; $save = (bool) get_parameter('save');
} $agent_id = (int) get_parameter('agent_id');
ui_print_error_message($msg); $agent_name = (string) get_parameter('agent_name');
}
if ($done > 0) { $id_agent_module = (int) get_parameter('id_agent_module');
$msg = sprintf(__('Save agent (%s), module (%s) data xml.'), $agent['alias'], $agentModule['nombre']); $data = (string) get_parameter('data');
if ($done > 1) { $date = (string) get_parameter('date', date(DATE_FORMAT));
$msg .= " ($done)"; $time = (string) get_parameter('time', date(TIME_FORMAT));
} if (isset($_FILES['csv'])) {
ui_print_success_message($msg); if ($_FILES['csv']['error'] != 4) {
} $csv = $_FILES['csv'];
} } else {
$csv = false;
echo '<div class="notify" style="margin-bottom:15px;">'; }
echo sprintf(__("Please check that the directory \"%s\" is writeable by the apache user. <br /><br />The CSV file format is date;value&lt;newline&gt;date;value&lt;newline&gt;... The date in CSV is in format Y/m/d H:i:s."), } else {
$config['remote_config']); $csv = false;
echo '</div>'; }
$table = new stdClass(); if ($save) {
$table->width = '100%'; if (!check_acl($config['id_user'], agents_get_agent_group($agent_id), 'AW')) {
$table->class = 'databox filters'; ui_print_error_message(__('You haven\'t privileges for insert data in the agent.'));
$table->style = array(); } else {
$table->style[0] = 'font-weight: bolder;'; $agent = db_get_row_filter('tagente', ['id_agente' => $agent_id]);
$agentModule = db_get_row_filter('tagente_modulo', ['id_agente_modulo' => $id_agent_module]);
$table->data = array();
$done = 0;
$table->data[0][0] = __('Agent'); $errors = 0;
$params = array(); if ($csv !== false) {
$params['return'] = true; $file = file($csv['tmp_name']);
$params['show_helptip'] = true; foreach ($file as $line) {
$params['input_name'] = 'agent_name'; $tokens = explode(';', $line);
$params['value'] = $agent_name;
$params['javascript_is_function_select'] = true; $utimestamp = (strtotime(trim($tokens[0])) - get_fixed_offset());
$params['javascript_name_function_select'] = 'custom_select_function'; $timestamp = date(DATE_FORMAT.' '.TIME_FORMAT, $utimestamp);
$params['javascript_code_function_select'] = ''; $result = createXMLData($agent, $agentModule, $timestamp, trim($tokens[1]));
$params['use_hidden_input_idagent'] = true;
$params['print_hidden_input_idagent'] = true; if ($result) {
$params['hidden_input_idagent_id'] = 'hidden-autocomplete_id_agent'; $done++;
$params['hidden_input_idagent_name'] = 'agent_id'; } else {
$params['hidden_input_idagent_value'] = $agent_id; $errors++;
}
$table->data[0][1] = ui_print_agent_autocomplete_input($params); }
} else {
$table->data[1][0] = __('Module'); $utimestamp = (strtotime($date.' '.$time) - get_fixed_offset());
$modules = array (); $timestamp = date(DATE_FORMAT.' '.TIME_FORMAT, $utimestamp);
if ($agent_id){ $result = createXMLData($agent, $agentModule, $timestamp, $data);
$modules = agents_get_modules ($agent_id, false, array("delete_pending" => 0));
} if ($result) {
$table->data[1][1] = html_print_select ($modules, 'id_agent_module', $id_agent_module, true, $done++;
__('Select'), 0, true, false, true, '', empty($agent_id)); } else {
$table->data[2][0] = __('Data'); $errors++;
$table->data[2][1] = html_print_input_text('data', $data, __('Data'), 40, 60, true); }
$table->data[3][0] = __('Date'); }
$table->data[3][1] = html_print_input_text ('date', $date, '', 11, 11, true).' '; }
$table->data[3][1] .= html_print_input_text ('time', $time, '', 7, 7, true);
$table->data[4][0] = __('CSV'); if ($errors > 0) {
$table->data[4][1] = html_print_input_file('csv', true); $msg = sprintf(__('Can\'t save agent (%s), module (%s) data xml.'), $agent['alias'], $agentModule['nombre']);
if ($errors > 1) {
echo "<form method='post' enctype='multipart/form-data'>"; $msg .= " ($errors)";
}
html_print_table($table);
ui_print_error_message($msg);
echo "<div style='text-align: right; width: " . $table->width . "'>"; }
html_print_input_hidden('save', 1);
html_print_submit_button(__('Save'), 'submit', ($id_agent === ''), 'class="sub next"'); if ($done > 0) {
echo "</div>"; $msg = sprintf(__('Save agent (%s), module (%s) data xml.'), $agent['alias'], $agentModule['nombre']);
if ($done > 1) {
echo "</form>"; $msg .= " ($done)";
}
ui_require_css_file ('datepicker');
ui_include_time_picker(); ui_print_success_message($msg);
ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascript/i18n/"); }
?> }
echo '<div class="notify" style="margin-bottom:15px;">';
echo sprintf(
__('Please check that the directory "%s" is writeable by the apache user. <br /><br />The CSV file format is date;value&lt;newline&gt;date;value&lt;newline&gt;... The date in CSV is in format Y/m/d H:i:s.'),
$config['remote_config']
);
echo '</div>';
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->style = [];
$table->style[0] = 'font-weight: bolder;';
$table->data = [];
$table->data[0][0] = __('Agent');
$params = [];
$params['return'] = true;
$params['show_helptip'] = true;
$params['input_name'] = 'agent_name';
$params['value'] = $agent_name;
$params['javascript_is_function_select'] = true;
$params['javascript_name_function_select'] = 'custom_select_function';
$params['javascript_code_function_select'] = '';
$params['use_hidden_input_idagent'] = true;
$params['print_hidden_input_idagent'] = true;
$params['hidden_input_idagent_id'] = 'hidden-autocomplete_id_agent';
$params['hidden_input_idagent_name'] = 'agent_id';
$params['hidden_input_idagent_value'] = $agent_id;
$table->data[0][1] = ui_print_agent_autocomplete_input($params);
$table->data[1][0] = __('Module');
$modules = [];
if ($agent_id) {
$modules = agents_get_modules($agent_id, false, ['delete_pending' => 0]);
}
$table->data[1][1] = html_print_select(
$modules,
'id_agent_module',
$id_agent_module,
true,
__('Select'),
0,
true,
false,
true,
'',
empty($agent_id)
);
$table->data[2][0] = __('Data');
$table->data[2][1] = html_print_input_text('data', $data, __('Data'), 40, 60, true);
$table->data[3][0] = __('Date');
$table->data[3][1] = html_print_input_text('date', $date, '', 11, 11, true).' ';
$table->data[3][1] .= html_print_input_text('time', $time, '', 7, 7, true);
$table->data[4][0] = __('CSV');
$table->data[4][1] = html_print_input_file('csv', true);
echo "<form method='post' enctype='multipart/form-data'>";
html_print_table($table);
echo "<div style='text-align: right; width: ".$table->width."'>";
html_print_input_hidden('save', 1);
html_print_submit_button(__('Save'), 'submit', ($id_agent === ''), 'class="sub next"');
echo '</div>';
echo '</form>';
ui_require_css_file('datepicker');
ui_include_time_picker();
ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
?>
<script type="text/javascript"> <script type="text/javascript">
/* <![CDATA[ */ /* <![CDATA[ */
$(document).ready (function () { $(document).ready (function () {
$('#text-time').timepicker({ $('#text-time').timepicker({
showSecond: true, showSecond: true,
timeFormat: '<?php echo TIME_FORMAT_JS; ?>', timeFormat: '<?php echo TIME_FORMAT_JS; ?>',
timeOnlyTitle: '<?php echo __('Choose time');?>', timeOnlyTitle: '<?php echo __('Choose time'); ?>',
timeText: '<?php echo __('Time');?>', timeText: '<?php echo __('Time'); ?>',
hourText: '<?php echo __('Hour');?>', hourText: '<?php echo __('Hour'); ?>',
minuteText: '<?php echo __('Minute');?>', minuteText: '<?php echo __('Minute'); ?>',
secondText: '<?php echo __('Second');?>', secondText: '<?php echo __('Second'); ?>',
currentText: '<?php echo __('Now');?>', currentText: '<?php echo __('Now'); ?>',
closeText: '<?php echo __('Close');?>'}); closeText: '<?php echo __('Close'); ?>'});
$("#text-date").datepicker({dateFormat: "<?php echo DATE_FORMAT_JS; ?>"}); $("#text-date").datepicker({dateFormat: "<?php echo DATE_FORMAT_JS; ?>"});
$.datepicker.setDefaults($.datepicker.regional[ "<?php echo get_user_language(); ?>"]); $.datepicker.setDefaults($.datepicker.regional[ "<?php echo get_user_language(); ?>"]);
}); });
function custom_select_function(agent_name) { function custom_select_function(agent_name) {
$('#id_agent_module').empty (); $('#id_agent_module').empty ();
var inputs = []; var inputs = [];
var id_agent = $('#hidden-autocomplete_id_agent').val(); var id_agent = $('#hidden-autocomplete_id_agent').val();
inputs.push ("id_agent=" + id_agent); inputs.push ("id_agent=" + id_agent);
inputs.push ("delete_pending=0"); inputs.push ("delete_pending=0");
inputs.push ("get_agent_modules_json=1"); inputs.push ("get_agent_modules_json=1");
inputs.push ("page=operation/agentes/ver_agente"); inputs.push ("page=operation/agentes/ver_agente");
jQuery.ajax ({ jQuery.ajax ({
data: inputs.join ("&"), data: inputs.join ("&"),
type: 'GET', type: 'GET',
url: action="ajax.php", url: action="ajax.php",
dataType: 'json', dataType: 'json',
success: function (data) { success: function (data) {
$('#id_agent_module').append ($('<option></option>').attr ('value', 0).text ("--")); $('#id_agent_module').append ($('<option></option>').attr ('value', 0).text ("--"));
jQuery.each (data, function (i, val) { jQuery.each (data, function (i, val) {
s = js_html_entity_decode (val['nombre']); s = js_html_entity_decode (val['nombre']);
$('#id_agent_module').append ($('<option></option>').attr ('value', val['id_agente_modulo']).text (s)); $('#id_agent_module').append ($('<option></option>').attr ('value', val['id_agente_modulo']).text (s));
}); });
$('#id_agent_module').enable(); $('#id_agent_module').enable();
$('#id_agent_module').fadeIn ('normal'); $('#id_agent_module').fadeIn ('normal');
$('#submit-submit').enable(); $('#submit-submit').enable();
$('#submit-submit').fadeIn ('normal'); $('#submit-submit').fadeIn ('normal');
} }
}); });
} }
/* ]]> */ /* ]]> */
</script> </script>
<?php <?php
} }
extensions_add_godmode_function('mainInsertData'); extensions_add_godmode_function('mainInsertData');
extensions_add_godmode_menu_option(__('Insert Data'), 'AW', 'gagente', null, "v1r1"); extensions_add_godmode_menu_option(__('Insert Data'), 'AW', 'gagente', null, 'v1r1');
?>

View File

@ -4,65 +4,61 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
if (is_ajax()) { if (is_ajax()) {
if (! check_acl($config['id_user'], 0, 'ER')) {
db_pandora_audit('ACL Violation', 'Trying to access event viewer');
return;
}
if (! check_acl ($config["id_user"], 0, "ER")) { $get_last_events = (bool) get_parameter('get_last_events');
db_pandora_audit("ACL Violation", "Trying to access event viewer"); if ($get_last_events) {
return; include_once 'include/functions_io.php';
} include_once 'include/functions_tags.php';
$get_last_events = (bool) get_parameter("get_last_events"); $limit = (int) get_parameter('limit', 5);
if ($get_last_events) {
require_once ('include/functions_io.php');
require_once ('include/functions_tags.php');
$limit = (int) get_parameter("limit", 5); $tags_condition = tags_get_acl_tags($config['id_user'], 0, 'ER', 'event_condition', 'AND');
$tags_condition = tags_get_acl_tags($config['id_user'], 0, 'ER', 'event_condition', 'AND'); $filter = "estado <> 1 $tags_condition";
$filter = "estado <> 1 $tags_condition";
$sql = sprintf ("SELECT id_agente, evento, utimestamp $sql = sprintf(
'SELECT id_agente, evento, utimestamp
FROM tevento FROM tevento
LEFT JOIN tagent_secondary_group LEFT JOIN tagent_secondary_group
ON tevento.id_agente = tagent_secondary_group.id_agent ON tevento.id_agente = tagent_secondary_group.id_agent
WHERE %s WHERE %s
ORDER BY utimestamp DESC LIMIT %d", ORDER BY utimestamp DESC LIMIT %d',
$filter, $limit); $filter,
$limit
$result = db_get_all_rows_sql ($sql); );
$events = array(); $result = db_get_all_rows_sql($sql);
if (! empty($result)) {
foreach ($result as $key => $value) {
$event = array();
$event['agent'] = (empty($value['id_agente'])) ? "System" : agents_get_name($value['id_agente']);
$event['text'] = io_safe_output($value['evento']);
$event['date'] = date(io_safe_output($config['date_format']), $value['utimestamp']);
$events[] = $event;
}
} else {
sleep(5);
}
echo json_encode($events); $events = [];
return; if (! empty($result)) {
} foreach ($result as $key => $value) {
$event = [];
$event['agent'] = (empty($value['id_agente'])) ? 'System' : agents_get_name($value['id_agente']);
$event['text'] = io_safe_output($value['evento']);
$event['date'] = date(io_safe_output($config['date_format']), $value['utimestamp']);
$events[] = $event;
}
} else {
sleep(5);
}
return; echo json_encode($events);
return;
}
return;
} }
?>

View File

@ -4,117 +4,128 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
// Load global vars // Load global vars
global $config; global $config;
check_login (); check_login();
if (is_ajax ()) { if (is_ajax()) {
$get_info_alert_module_group = (bool)get_parameter('get_info_alert_module_group'); $get_info_alert_module_group = (bool) get_parameter('get_info_alert_module_group');
if ($get_info_alert_module_group) { if ($get_info_alert_module_group) {
$send_tooltip = json_decode(io_safe_output(get_parameter('send_tooltip')), true); $send_tooltip = json_decode(io_safe_output(get_parameter('send_tooltip')), true);
echo "<ul class='tooltip_counters'><h3>" . __('Counters Module') . "</h3>"; echo "<ul class='tooltip_counters'><h3>".__('Counters Module').'</h3>';
echo "<li><div style='background-color: " . COL_ALERTFIRED . ";'></div>" . __('Alerts_Fired') . ": " . $send_tooltip['alerts_module_count'] . "</li>"; echo "<li><div style='background-color: ".COL_ALERTFIRED.";'></div>".__('Alerts_Fired').': '.$send_tooltip['alerts_module_count'].'</li>';
echo "<li><div style='background-color: " . COL_CRITICAL . ";'></div>" . __('Critical') . ": " . $send_tooltip['critical_module_count'] . "</li>"; echo "<li><div style='background-color: ".COL_CRITICAL.";'></div>".__('Critical').': '.$send_tooltip['critical_module_count'].'</li>';
echo "<li><div style='background-color: " . COL_WARNING . ";'></div>" . __('warning') . ": " . $send_tooltip['warning_module_count'] . "</li>"; echo "<li><div style='background-color: ".COL_WARNING.";'></div>".__('warning').': '.$send_tooltip['warning_module_count'].'</li>';
echo "<li><div style='background-color: " . COL_UNKNOWN . ";'></div>" . __('Unknown') . ": " . $send_tooltip['unknown_module_count'] . "</li>"; echo "<li><div style='background-color: ".COL_UNKNOWN.";'></div>".__('Unknown').': '.$send_tooltip['unknown_module_count'].'</li>';
echo "<li><div style='background-color: " . COL_NORMAL . ";'></div>" . __('OK') . ": " . $send_tooltip['normal_module_count'] . "</li>"; echo "<li><div style='background-color: ".COL_NORMAL.";'></div>".__('OK').': '.$send_tooltip['normal_module_count'].'</li>';
echo "<li><div style='background-color: " . COL_MAINTENANCE . ";'></div>" . __('Not_init') . ": " . $send_tooltip['notInit_module_count'] . "</li></ul>"; echo "<li><div style='background-color: ".COL_MAINTENANCE.";'></div>".__('Not_init').': '.$send_tooltip['notInit_module_count'].'</li></ul>';
} }
} }
/** /**
* The main function of module groups and the enter point to * The main function of module groups and the enter point to
* execute the code. * execute the code.
*/ */
function mainModuleGroups() { function mainModuleGroups()
global $config; {
global $config;
require_once($config['homedir'] . "/include/class/TreeGroup.class.php"); include_once $config['homedir'].'/include/class/TreeGroup.class.php';
require_once($config['homedir'] . "/include/functions_groupview.php"); include_once $config['homedir'].'/include/functions_groupview.php';
$tree_group = new TreeGroup("group", "group"); $tree_group = new TreeGroup('group', 'group');
$tree_group->setPropagateCounters(false); $tree_group->setPropagateCounters(false);
$tree_group->setDisplayAllGroups(true); $tree_group->setDisplayAllGroups(true);
$tree_group->setFilter( array( $tree_group->setFilter(
'searchAgent' => '', [
'statusAgent' => AGENT_STATUS_ALL, 'searchAgent' => '',
'searchModule' => '', 'statusAgent' => AGENT_STATUS_ALL,
'statusModule' => -1, 'searchModule' => '',
'groupID' => 0, 'statusModule' => -1,
'tagID' => 0, 'groupID' => 0,
'show_not_init_agents' => 1, 'tagID' => 0,
'show_not_init_modules' => 1 'show_not_init_agents' => 1,
)); 'show_not_init_modules' => 1,
$info = $tree_group->getArray(); ]
$info = groupview_plain_groups($info); );
$counter = count($info); $info = $tree_group->getArray();
$offset = get_parameter('offset', 0); $info = groupview_plain_groups($info);
$agent_group_search = get_parameter('agent_group_search', ''); $counter = count($info);
$module_group_search = get_parameter('module_group_search', ''); $offset = get_parameter('offset', 0);
$agent_group_search = get_parameter('agent_group_search', '');
$module_group_search = get_parameter('module_group_search', '');
$info = array_filter($info, function($v, $k) use ($agent_group_search) { $info = array_filter(
return preg_match("/$agent_group_search/i", $v['name']); $info,
}, ARRAY_FILTER_USE_BOTH); function ($v, $k) use ($agent_group_search) {
return preg_match("/$agent_group_search/i", $v['name']);
},
ARRAY_FILTER_USE_BOTH
);
if (!empty($info)) { if (!empty($info)) {
$groups_view = $is_not_paginated $groups_view = $is_not_paginated ? $info : array_slice($info, $offset, $config['block_size']);
? $info $agents_counters = array_reduce(
: array_slice($info, $offset, $config['block_size']); $groups_view,
$agents_counters = array_reduce($groups_view, function($carry, $item){ function ($carry, $item) {
$carry[$item['id']] = $item; $carry[$item['id']] = $item;
return $carry; return $carry;
}, array()); },
[]
);
$ids_array = array_keys($agents_counters); $ids_array = array_keys($agents_counters);
$ids_group = implode(',', $ids_array); $ids_group = implode(',', $ids_array);
} else } else {
$ids_group = -1; $ids_group = -1;
}
$condition_critical = modules_get_state_condition(AGENT_MODULE_STATUS_CRITICAL_ALERT); $condition_critical = modules_get_state_condition(AGENT_MODULE_STATUS_CRITICAL_ALERT);
$condition_warning = modules_get_state_condition(AGENT_MODULE_STATUS_WARNING_ALERT); $condition_warning = modules_get_state_condition(AGENT_MODULE_STATUS_WARNING_ALERT);
$condition_unknown = modules_get_state_condition(AGENT_MODULE_STATUS_UNKNOWN); $condition_unknown = modules_get_state_condition(AGENT_MODULE_STATUS_UNKNOWN);
$condition_not_init = modules_get_state_condition(AGENT_MODULE_STATUS_NO_DATA); $condition_not_init = modules_get_state_condition(AGENT_MODULE_STATUS_NO_DATA);
$condition_normal = modules_get_state_condition(AGENT_MODULE_STATUS_NORMAL); $condition_normal = modules_get_state_condition(AGENT_MODULE_STATUS_NORMAL);
$array_for_defect = array(); $array_for_defect = [];
$array_module_group = array(); $array_module_group = [];
$array_data = array(); $array_data = [];
$sql = "SELECT id_mg, `name` FROM tmodule_group"; $sql = 'SELECT id_mg, `name` FROM tmodule_group';
$array_mod= db_get_all_rows_sql($sql); $array_mod = db_get_all_rows_sql($sql);
foreach ($array_mod as $key => $value) { foreach ($array_mod as $key => $value) {
$array_module_group[$value['id_mg']] = $value['name']; $array_module_group[$value['id_mg']] = $value['name'];
} }
$array_module_group[0] = 'Nothing';
$array_module_group[0] = 'Nothing';
$array_module_group = array_filter($array_module_group, function($v, $k) use ($module_group_search) { $array_module_group = array_filter(
return preg_match("/$module_group_search/i", $v); $array_module_group,
}, ARRAY_FILTER_USE_BOTH); function ($v, $k) use ($module_group_search) {
return preg_match("/$module_group_search/i", $v);
},
ARRAY_FILTER_USE_BOTH
);
foreach ($agents_counters as $key => $value) { foreach ($agents_counters as $key => $value) {
$array_for_defect[$key]['gm'] = $array_module_group; $array_for_defect[$key]['gm'] = $array_module_group;
$array_for_defect[$key]['data']['name'] = $value['name']; $array_for_defect[$key]['data']['name'] = $value['name'];
$array_for_defect[$key]['data']['parent'] = $value['parent']; $array_for_defect[$key]['data']['parent'] = $value['parent'];
$array_for_defect[$key]['data']['icon'] = $value['icon']; $array_for_defect[$key]['data']['icon'] = $value['icon'];
} }
$sql = $sql = "SELECT SUM(IF(tae.alert_fired <> 0, 1, 0)) AS alerts_module_count,
"SELECT SUM(IF(tae.alert_fired <> 0, 1, 0)) AS alerts_module_count,
SUM(IF($condition_warning, 1, 0)) AS warning_module_count, SUM(IF($condition_warning, 1, 0)) AS warning_module_count,
SUM(IF($condition_unknown, 1, 0)) AS unknown_module_count, SUM(IF($condition_unknown, 1, 0)) AS unknown_module_count,
SUM(IF($condition_not_init, 1, 0)) AS notInit_module_count, SUM(IF($condition_not_init, 1, 0)) AS notInit_module_count,
@ -175,146 +186,145 @@ $sql =
ON tae.id_module_group = tmg.id_mg ON tae.id_module_group = tmg.id_mg
GROUP BY tae.g, tmg.id_mg"; GROUP BY tae.g, tmg.id_mg";
$array_data_prev = db_get_all_rows_sql($sql); $array_data_prev = db_get_all_rows_sql($sql);
foreach ($array_data_prev as $key => $value) { foreach ($array_data_prev as $key => $value) {
$array_data[$value['id_grupo']][$value['id_mg']] = $value; $array_data[$value['id_grupo']][$value['id_mg']] = $value;
} }
ui_print_page_header (__("Combined table of agent group and module group"), "images/module_group.png", false, "", false, ''); ui_print_page_header(__('Combined table of agent group and module group'), 'images/module_group.png', false, '', false, '');
echo "<table cellpadding='4' cellspacing='4' class='databox filters' width='100%' style='font-weight: bold; margin-bottom: 10px;'> echo "<table cellpadding='4' cellspacing='4' class='databox filters' width='100%' style='font-weight: bold; margin-bottom: 10px;'>
<tr>"; <tr>";
echo "<form method='post' echo "<form method='post'
action='index.php?sec=view&sec2=extensions/module_groups'>"; action='index.php?sec=view&sec2=extensions/module_groups'>";
echo "<td>"; echo '<td>';
echo __('Search by agent group') . '&nbsp;'; echo __('Search by agent group').'&nbsp;';
html_print_input_text ("agent_group_search", $agent_group_search); html_print_input_text('agent_group_search', $agent_group_search);
echo "</td><td>"; echo '</td><td>';
echo __('Search by module group') . '&nbsp;'; echo __('Search by module group').'&nbsp;';
html_print_input_text ("module_group_search", $module_group_search); html_print_input_text('module_group_search', $module_group_search);
echo "</td><td>"; echo '</td><td>';
echo "<input name='srcbutton' type='submit' class='sub search' value='".__('Search')."'>"; echo "<input name='srcbutton' type='submit' class='sub search' value='".__('Search')."'>";
echo "</form>"; echo '</form>';
echo "<td>"; echo '<td>';
echo "</tr></table>"; echo '</tr></table>';
if(true){ if (true) {
$table = new StdClass(); $table = new StdClass();
$table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; padding-right: 10px; min-width: 230px;'; $table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; padding-right: 10px; min-width: 230px;';
$table->width = '100%'; $table->width = '100%';
$head[0] = __('Groups'); $head[0] = __('Groups');
$headstyle[0] = "width: 20%; font-weight: bolder;"; $headstyle[0] = 'width: 20%; font-weight: bolder;';
foreach ($array_module_group as $key => $value) { foreach ($array_module_group as $key => $value) {
$headstyle[] = "min-width: 60px;max-width: 5%;text-align:center; color: #ffffff; background-color: #373737; font-weight: bolder;"; $headstyle[] = 'min-width: 60px;max-width: 5%;text-align:center; color: #ffffff; background-color: #373737; font-weight: bolder;';
$head[] = ui_print_truncate_text($value, GENERIC_SIZE_TEXT, true, true, true, '&hellip;', 'color:#FFF'); $head[] = ui_print_truncate_text($value, GENERIC_SIZE_TEXT, true, true, true, '&hellip;', 'color:#FFF');
} }
$i = 0; $i = 0;
foreach ($array_for_defect as $key => $value) { foreach ($array_for_defect as $key => $value) {
$deep = groups_get_group_deep($key); $deep = groups_get_group_deep($key);
$data[$i][0] = $deep . ui_print_truncate_text($value['data']['name'], GENERIC_SIZE_TEXT, true, true, true, '&hellip;', 'color:#FFF'); $data[$i][0] = $deep.ui_print_truncate_text($value['data']['name'], GENERIC_SIZE_TEXT, true, true, true, '&hellip;', 'color:#FFF');
$j = 1; $j = 1;
if(isset($array_data[$key])){ if (isset($array_data[$key])) {
foreach ($value['gm'] as $k => $v) { foreach ($value['gm'] as $k => $v) {
if(isset($array_data[$key][$k])){ if (isset($array_data[$key][$k])) {
$send_tooltip = json_encode($array_data[$key][$k]); $send_tooltip = json_encode($array_data[$key][$k]);
$rel = "ajax.php?page=extensions/module_groups&get_info_alert_module_group=1&send_tooltip=" . $send_tooltip; $rel = 'ajax.php?page=extensions/module_groups&get_info_alert_module_group=1&send_tooltip='.$send_tooltip;
$url = "index.php?sec=estado&sec2=operation/agentes/status_monitor&status=-1&ag_group=" . $key . "&modulegroup=" . $k; $url = 'index.php?sec=estado&sec2=operation/agentes/status_monitor&status=-1&ag_group='.$key.'&modulegroup='.$k;
if ($array_data[$key][$k]['alerts_module_count'] != 0) { if ($array_data[$key][$k]['alerts_module_count'] != 0) {
$color = '#FFA631'; //Orange when the cell for this model group and agent has at least one alert fired. $color = '#FFA631';
} // Orange when the cell for this model group and agent has at least one alert fired.
else if ($array_data[$key][$k]['critical_module_count'] != 0) { } else if ($array_data[$key][$k]['critical_module_count'] != 0) {
$color = '#FC4444'; //Red when the cell for this model group and agent has at least one module in critical state and the rest in any state. $color = '#FC4444';
} // Red when the cell for this model group and agent has at least one module in critical state and the rest in any state.
elseif ($array_data[$key][$k]['warning_module_count'] != 0) { } else if ($array_data[$key][$k]['warning_module_count'] != 0) {
$color = '#FAD403'; //Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state. $color = '#FAD403';
} // Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state.
elseif ($array_data[$key][$k]['unknown_module_count'] != 0) { } else if ($array_data[$key][$k]['unknown_module_count'] != 0) {
$color = '#B2B2B2 '; //Grey when the cell for this model group and agent has at least one module in unknown state and the rest in any state. $color = '#B2B2B2 ';
} // Grey when the cell for this model group and agent has at least one module in unknown state and the rest in any state.
elseif ($array_data[$key][$k]['normal_module_count'] != 0) { } else if ($array_data[$key][$k]['normal_module_count'] != 0) {
$color = '#80BA27'; //Green when the cell for this model group and agent has OK state all modules. $color = '#80BA27';
} // Green when the cell for this model group and agent has OK state all modules.
elseif ($array_data[$key][$k]['notInit_module_count'] != 0) { } else if ($array_data[$key][$k]['notInit_module_count'] != 0) {
$color = '#5BB6E5'; // Blue when the cell for this module group and all modules have not init value. $color = '#5BB6E5';
} // Blue when the cell for this module group and all modules have not init value.
}
$data[$i][$j] ="<div style='background:$color; height: 20px;min-width: 60px;max-width:5%;overflow:hidden; margin-left: auto; margin-right: auto; text-align: center; padding: 5px;padding-bottom:10px;font-size: 18px;line-height:25px;'>"; $data[$i][$j] = "<div style='background:$color; height: 20px;min-width: 60px;max-width:5%;overflow:hidden; margin-left: auto; margin-right: auto; text-align: center; padding: 5px;padding-bottom:10px;font-size: 18px;line-height:25px;'>";
$data[$i][$j] .= "<a class='info_cell' rel='$rel' href='$url' style='color:white;font-size: 18px;'>"; $data[$i][$j] .= "<a class='info_cell' rel='$rel' href='$url' style='color:white;font-size: 18px;'>";
$data[$i][$j] .= $array_data[$key][$k]['total_count']; $data[$i][$j] .= $array_data[$key][$k]['total_count'];
$data[$i][$j] .= "</a></div>"; $data[$i][$j] .= '</a></div>';
} } else {
else{ $data[$i][$j] = "<div style='background:white; height: 20px;min-width: 60px;max-width:5%;overflow:hidden; margin-left: auto; margin-right: auto; text-align: center; padding: 5px;padding-bottom:10px;font-size: 18px;line-height:25px;'>";
$data[$i][$j] ="<div style='background:white; height: 20px;min-width: 60px;max-width:5%;overflow:hidden; margin-left: auto; margin-right: auto; text-align: center; padding: 5px;padding-bottom:10px;font-size: 18px;line-height:25px;'>"; $data[$i][$j] .= 0;
$data[$i][$j] .= 0; $data[$i][$j] .= '</div>';
$data[$i][$j] .= "</div>"; }
}
$j++;
}
}
else{
foreach ($value['gm'] as $k => $v) {
$data[$i][$j] ="<div style='background:white; height: 20px;min-width: 60px;max-width:5%;overflow:hidden; margin-left: auto; margin-right: auto; text-align: center; padding: 5px;padding-bottom:10px;font-size: 18px;line-height:25px;'>";
$data[$i][$j] .= 0;
$data[$i][$j] .= "</div>";
$j++;
}
}
$i++;
}
$table->head = $head; $j++;
$table->headstyle = $headstyle; }
$table->data = $data; } else {
foreach ($value['gm'] as $k => $v) {
$data[$i][$j] = "<div style='background:white; height: 20px;min-width: 60px;max-width:5%;overflow:hidden; margin-left: auto; margin-right: auto; text-align: center; padding: 5px;padding-bottom:10px;font-size: 18px;line-height:25px;'>";
$data[$i][$j] .= 0;
$data[$i][$j] .= '</div>';
$j++;
}
}
ui_pagination($counter); $i++;
}
echo "<div style='width:100%; overflow-x:auto;'>"; $table->head = $head;
html_print_table($table); $table->headstyle = $headstyle;
echo "</div>"; $table->data = $data;
ui_pagination($counter); ui_pagination($counter);
echo "<div class='legend_basic' style='width: 98.6%'>"; echo "<div style='width:100%; overflow-x:auto;'>";
echo "<table >"; html_print_table($table);
echo "<tr><td colspan='2' style='padding-bottom: 10px;'><b>" . __('Legend') . "</b></td></tr>"; echo '</div>';
echo "<tr><td class='legend_square_simple'><div style='background-color: " . COL_ALERTFIRED . ";'></div></td><td>" . __("Orange cell when the module group and agent have at least one alarm fired.") . "</td></tr>";
echo "<tr><td class='legend_square_simple'><div style='background-color: " . COL_CRITICAL . ";'></div></td><td>" . __("Red cell when the module group and agent have at least one module in critical status and the others in any status") . "</td></tr>";
echo "<tr><td class='legend_square_simple'><div style='background-color: " . COL_WARNING . ";'></div></td><td>" . __("Yellow cell when the module group and agent have at least one in warning status and the others in grey or green status") . "</td></tr>";
echo "<tr><td class='legend_square_simple'><div style='background-color: " . COL_UNKNOWN . ";'></div></td><td>" . __("Grey cell when the module group and agent have at least one in unknown status and the others in green status") . "</td></tr>";
echo "<tr><td class='legend_square_simple'><div style='background-color: " . COL_NORMAL . ";'></div></td><td>" . __("Green cell when the module group and agent have all modules in OK status") . "</td></tr>";
echo "<tr><td class='legend_square_simple'><div style='background-color: " . COL_MAINTENANCE . ";'></div></td><td>" .__("Blue cell when the module group and agent have all modules in not init status.") . "</td></tr>";
echo "</table>";
echo "</div>";
} ui_pagination($counter);
else {
ui_print_info_message ( array('no_close'=>true, 'message'=> __("This table shows in columns the modules group and in rows agents group. The cell shows all modules") ));
ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no defined groups or module groups') ));
}
ui_require_css_file('cluetip'); echo "<div class='legend_basic' style='width: 98.6%'>";
ui_require_jquery_file('cluetip'); echo '<table >';
?> echo "<tr><td colspan='2' style='padding-bottom: 10px;'><b>".__('Legend').'</b></td></tr>';
<script> echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_ALERTFIRED.";'></div></td><td>".__('Orange cell when the module group and agent have at least one alarm fired.').'</td></tr>';
$(document).ready (function () { echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_CRITICAL.";'></div></td><td>".__('Red cell when the module group and agent have at least one module in critical status and the others in any status').'</td></tr>';
$("a.info_cell").cluetip ({ echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_WARNING.";'></div></td><td>".__('Yellow cell when the module group and agent have at least one in warning status and the others in grey or green status').'</td></tr>';
arrows: true, echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_UNKNOWN.";'></div></td><td>".__('Grey cell when the module group and agent have at least one in unknown status and the others in green status').'</td></tr>';
attribute: 'rel', echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_NORMAL.";'></div></td><td>".__('Green cell when the module group and agent have all modules in OK status').'</td></tr>';
cluetipClass: 'default', echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_MAINTENANCE.";'></div></td><td>".__('Blue cell when the module group and agent have all modules in not init status.').'</td></tr>';
width: '200px' echo '</table>';
}); echo '</div>';
}); } else {
</script> ui_print_info_message(['no_close' => true, 'message' => __('This table shows in columns the modules group and in rows agents group. The cell shows all modules') ]);
<?php ui_print_info_message(['no_close' => true, 'message' => __('There are no defined groups or module groups') ]);
}
ui_require_css_file('cluetip', 'include/styles/js/');
ui_require_jquery_file('cluetip');
?>
<script>
$(document).ready (function () {
$("a.info_cell").cluetip ({
arrows: true,
attribute: 'rel',
cluetipClass: 'default',
width: '200px'
});
});
</script>
<?php
} }
extensions_add_operation_menu_option(__("Module groups"), 'estado', 'module_groups/brick.png', "v1r1","view");
extensions_add_operation_menu_option(__('Module groups'), 'estado', 'module_groups/brick.png', 'v1r1', 'view');
extensions_add_main_function('mainModuleGroups'); extensions_add_main_function('mainModuleGroups');
?>

View File

@ -4,99 +4,108 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
$id_agente = get_parameter('id_agente');
$id_agente = get_parameter ("id_agente");
// This extension is usefull only if the agent has associated IP // This extension is usefull only if the agent has associated IP
$address = agents_get_address($id_agente); $address = agents_get_address($id_agente);
if (!empty($address) || empty($id_agente)) { if (!empty($address) || empty($id_agente)) {
extensions_add_opemode_tab_agent ('network_tools','Network Tools','extensions/net_tools/nettool.png',"main_net_tools", "v1r1", 'AW'); extensions_add_opemode_tab_agent('network_tools', 'Network Tools', 'extensions/net_tools/nettool.png', 'main_net_tools', 'v1r1', 'AW');
} }
function whereis_the_command ($command) {
global $config; function whereis_the_command($command)
{
if (isset($config['network_tools_config'])) { global $config;
$network_tools_config = json_decode($config['network_tools_config'], true);
$traceroute_path = $network_tools_config['traceroute_path']; if (isset($config['network_tools_config'])) {
$ping_path = $network_tools_config['ping_path']; $network_tools_config = json_decode($config['network_tools_config'], true);
$nmap_path = $network_tools_config['nmap_path']; $traceroute_path = $network_tools_config['traceroute_path'];
$dig_path = $network_tools_config['dig_path']; $ping_path = $network_tools_config['ping_path'];
$snmpget_path = $network_tools_config['snmpget_path']; $nmap_path = $network_tools_config['nmap_path'];
$dig_path = $network_tools_config['dig_path'];
switch ($command) { $snmpget_path = $network_tools_config['snmpget_path'];
case 'traceroute':
if (!empty($traceroute_path)) switch ($command) {
return $traceroute_path; case 'traceroute':
break; if (!empty($traceroute_path)) {
case 'ping': return $traceroute_path;
if (!empty($ping_path)) }
return $ping_path; break;
break;
case 'nmap': case 'ping':
if (!empty($nmap_path)) if (!empty($ping_path)) {
return $nmap_path; return $ping_path;
break; }
case 'dig': break;
if (!empty($dig_path))
return $dig_path; case 'nmap':
break; if (!empty($nmap_path)) {
case 'snmpget': return $nmap_path;
if (!empty($snmpget_path)) }
return $snmpget_path; break;
break;
} case 'dig':
} if (!empty($dig_path)) {
return $dig_path;
}
break;
ob_start();
system('whereis '. $command); case 'snmpget':
$output = ob_get_clean(); if (!empty($snmpget_path)) {
$result = explode(':', $output); return $snmpget_path;
$result = trim($result[1]); }
break;
if ( empty($result)) { }
return NULL; }
}
ob_start();
$result = explode(' ', $result); system('whereis '.$command);
$fullpath = trim($result[0]); $output = ob_get_clean();
$result = explode(':', $output);
if (! file_exists($fullpath)) { $result = trim($result[1]);
return NULL;
} if (empty($result)) {
return null;
return $fullpath; }
$result = explode(' ', $result);
$fullpath = trim($result[0]);
if (! file_exists($fullpath)) {
return null;
}
return $fullpath;
} }
function main_net_tools () {
function main_net_tools()
$id_agente = get_parameter ("id_agente"); {
$principal_ip = db_get_sql ("SELECT direccion FROM tagente WHERE id_agente = $id_agente"); $id_agente = get_parameter('id_agente');
$principal_ip = db_get_sql("SELECT direccion FROM tagente WHERE id_agente = $id_agente");
$list_address = db_get_all_rows_sql ("select id_a from taddress_agent where id_agent = " . $id_agente);
foreach ($list_address as $address) { $list_address = db_get_all_rows_sql('select id_a from taddress_agent where id_agent = '.$id_agente);
$ids []= join(",",$address); foreach ($list_address as $address) {
} $ids[] = join(',', $address);
$ids_address = implode(",",$ids); }
$ips = db_get_all_rows_sql ("select ip from taddress where id_a in (" . $ids_address . ")");
$ids_address = implode(',', $ids);
if ($ips == "") { $ips = db_get_all_rows_sql('select ip from taddress where id_a in ('.$ids_address.')');
echo "<div class='error' style='margin-top:5px'>" . __('The agent hasn\'t got IP') . "</div>";
return; if ($ips == '') {
} echo "<div class='error' style='margin-top:5px'>".__('The agent hasn\'t got IP').'</div>';
echo " return;
}
echo "
<script type='text/javascript'> <script type='text/javascript'>
function mostrarColumns(ValueSelect) { function mostrarColumns(ValueSelect) {
value = ValueSelect.value; value = ValueSelect.value;
@ -110,241 +119,243 @@ function main_net_tools () {
} }
} }
</script>"; </script>";
echo "<div>";
echo "<form name='actionbox' method='post'>";
echo "<table class='databox filters' width=100% id=netToolTable>";
echo "<tr><td>";
echo __("Operation");
ui_print_help_tip(
__('You can set the command path in the menu Administration -&gt; Extensions -&gt; Config Network Tools'));
echo "</td><td>";
echo "<select name='operation' onChange='mostrarColumns(this);'>";
echo "<option value='1'>" . __("Traceroute");
echo "<option value='2'>" . __("Ping host & Latency");
echo "<option value='3'>" . __("SNMP Interface status");
echo "<option value='4'>" . __("Basic TCP Port Scan");
echo "<option value='5'>" . __("DiG/Whois Lookup");
echo "</select>";
echo "</td>";
echo "<td>";
echo __("IP address");
echo "</td><td>";
echo "<select name='select_ips'>";
foreach ($ips as $ip) {
if ($ip['ip'] == $principal_ip) {
echo "<option value='". $ip['ip'] ."' selected = 'selected'>" . $ip['ip'];
}
else {
echo "<option value='". $ip['ip'] ."'>" . $ip['ip'];
}
}
echo "</select>";
echo "</td>";
echo "<td id='snmpcolumn' style=\"display:none;\">";
echo __("SNMP Community") . "&nbsp;";
echo "<input name=community type=text value='public'>";
echo "</td><td>";
echo "<input style='margin:0px;' name=submit type=submit class='sub next' value='".__('Execute')."'>";
echo "</td>";
echo "</tr></table>";
echo "</form>";
$operation = get_parameter ("operation", 0);
$community = get_parameter ("community", "public");
$ip = get_parameter("select_ips");
if(!validate_address($ip)){ echo '<div>';
ui_print_error_message(__('The ip or dns name entered cannot be resolved')); echo "<form name='actionbox' method='post'>";
} echo "<table class='databox filters' width=100% id=netToolTable>";
else{ echo '<tr><td>';
switch($operation) { echo __('Operation');
case 1: ui_print_help_tip(
$traceroute = whereis_the_command ('traceroute'); __('You can set the command path in the menu Administration -&gt; Extensions -&gt; Config Network Tools')
if (empty($traceroute)) { );
ui_print_error_message(__('Traceroute executable does not exist.')); echo '</td><td>';
} echo "<select name='operation' onChange='mostrarColumns(this);'>";
else { echo "<option value='1'>".__('Traceroute');
echo "<h3>".__("Traceroute to "). $ip. "</h3>"; echo "<option value='2'>".__('Ping host & Latency');
echo "<pre>"; echo "<option value='3'>".__('SNMP Interface status');
echo system ("$traceroute $ip"); echo "<option value='4'>".__('Basic TCP Port Scan');
echo "</pre>"; echo "<option value='5'>".__('DiG/Whois Lookup');
} echo '</select>';
break; echo '</td>';
case 2: echo '<td>';
$ping = whereis_the_command ('ping'); echo __('IP address');
if (empty($ping)) { echo '</td><td>';
ui_print_error_message(__('Ping executable does not exist.')); echo "<select name='select_ips'>";
} foreach ($ips as $ip) {
else { if ($ip['ip'] == $principal_ip) {
echo "<h3>" . __("Ping to %s", $ip) . "</h3>"; echo "<option value='".$ip['ip']."' selected = 'selected'>".$ip['ip'];
echo "<pre>"; } else {
echo system ("$ping -c 5 $ip"); echo "<option value='".$ip['ip']."'>".$ip['ip'];
echo "</pre>"; }
} }
break;
case 4: echo '</select>';
$nmap = whereis_the_command ('nmap'); echo '</td>';
if (empty($nmap)) { echo "<td id='snmpcolumn' style=\"display:none;\">";
ui_print_error_message(__('Nmap executable does not exist.')); echo __('SNMP Community').'&nbsp;';
} echo "<input name=community type=text value='public'>";
else { echo '</td><td>';
echo "<h3>".__("Basic TCP Scan on "). $ip. "</h3>"; echo "<input style='margin:0px;' name=submit type=submit class='sub next' value='".__('Execute')."'>";
echo "<pre>"; echo '</td>';
echo system ("$nmap -F $ip"); echo '</tr></table>';
echo "</pre>"; echo '</form>';
}
break; $operation = get_parameter('operation', 0);
case 5: $community = get_parameter('community', 'public');
echo "<h3>".__("Domain and IP information for "). $ip. "</h3>"; $ip = get_parameter('select_ips');
$dig = whereis_the_command ('dig'); if (!validate_address($ip)) {
if (empty($dig)) { ui_print_error_message(__('The ip or dns name entered cannot be resolved'));
ui_print_error_message(__('Dig executable does not exist.')); } else {
} switch ($operation) {
else { case 1:
echo "<pre>"; $traceroute = whereis_the_command('traceroute');
echo system ("dig $ip"); if (empty($traceroute)) {
echo "</pre>"; ui_print_error_message(__('Traceroute executable does not exist.'));
} } else {
echo '<h3>'.__('Traceroute to ').$ip.'</h3>';
$whois = whereis_the_command ('whois'); echo '<pre>';
if (empty($whois)) { echo system("$traceroute $ip");
ui_print_error_message(__('Whois executable does not exist.')); echo '</pre>';
} }
else { break;
echo "<pre>";
echo system ("whois $ip"); case 2:
echo "</pre>"; $ping = whereis_the_command('ping');
} if (empty($ping)) {
break; ui_print_error_message(__('Ping executable does not exist.'));
case 3: } else {
echo "<h3>".__("SNMP information for "). $ip. "</h3>"; echo '<h3>'.__('Ping to %s', $ip).'</h3>';
echo '<pre>';
$snmpget = whereis_the_command ('snmpget'); echo system("$ping -c 5 $ip");
if (empty($snmpget)) { echo '</pre>';
ui_print_error_message(__('SNMPget executable does not exist.')); }
} break;
else {
echo "<h4>" . __("Uptime") . "</h4>"; case 4:
echo "<pre>"; $nmap = whereis_the_command('nmap');
echo exec ("$snmpget -Ounv -v1 -c $community $ip .1.3.6.1.2.1.1.3.0 "); if (empty($nmap)) {
echo "</pre>"; ui_print_error_message(__('Nmap executable does not exist.'));
echo "<h4>" . __("Device info") . "</h4>"; } else {
echo "<pre>"; echo '<h3>'.__('Basic TCP Scan on ').$ip.'</h3>';
echo '<pre>';
echo system ("$snmpget -Ounv -v1 -c $community $ip .1.3.6.1.2.1.1.1.0 "); echo system("$nmap -F $ip");
echo "</pre>"; echo '</pre>';
}
echo "<h4>Interface Information</h4>"; break;
echo "<table class=databox>";
echo "<tr><th>".__("Interface"); case 5:
echo "<th>".__("Status"); echo '<h3>'.__('Domain and IP information for ').$ip.'</h3>';
$int_max = exec ("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.1.0 "); $dig = whereis_the_command('dig');
if (empty($dig)) {
for ($ax=0; $ax < $int_max; $ax++) { ui_print_error_message(__('Dig executable does not exist.'));
$interface = exec ("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.2.1.2.$ax "); } else {
$estado = exec ("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.2.1.8.$ax "); echo '<pre>';
echo "<tr><td>$interface<td>$estado"; echo system("dig $ip");
} echo '</pre>';
echo "</table>"; }
}
break; $whois = whereis_the_command('whois');
} if (empty($whois)) {
} ui_print_error_message(__('Whois executable does not exist.'));
} else {
echo "</div>"; echo '<pre>';
echo system("whois $ip");
echo '</pre>';
}
break;
case 3:
echo '<h3>'.__('SNMP information for ').$ip.'</h3>';
$snmpget = whereis_the_command('snmpget');
if (empty($snmpget)) {
ui_print_error_message(__('SNMPget executable does not exist.'));
} else {
echo '<h4>'.__('Uptime').'</h4>';
echo '<pre>';
echo exec("$snmpget -Ounv -v1 -c $community $ip .1.3.6.1.2.1.1.3.0 ");
echo '</pre>';
echo '<h4>'.__('Device info').'</h4>';
echo '<pre>';
echo system("$snmpget -Ounv -v1 -c $community $ip .1.3.6.1.2.1.1.1.0 ");
echo '</pre>';
echo '<h4>Interface Information</h4>';
echo '<table class=databox>';
echo '<tr><th>'.__('Interface');
echo '<th>'.__('Status');
$int_max = exec("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.1.0 ");
for ($ax = 0; $ax < $int_max; $ax++) {
$interface = exec("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.2.1.2.$ax ");
$estado = exec("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.2.1.8.$ax ");
echo "<tr><td>$interface<td>$estado";
}
echo '</table>';
}
break;
}
}
echo '</div>';
} }
function godmode_net_tools() {
global $config; function godmode_net_tools()
{
check_login(); global $config;
if (! check_acl ($config['id_user'], 0, "PM")) { check_login();
db_pandora_audit("ACL Violation",
"Trying to access Profile Management"); if (! check_acl($config['id_user'], 0, 'PM')) {
require ("general/noaccess.php"); db_pandora_audit(
return; 'ACL Violation',
} 'Trying to access Profile Management'
);
ui_print_page_header (__('Config Network Tools')); include 'general/noaccess.php';
return;
$update_traceroute = (bool)get_parameter('update_traceroute', 0); }
$traceroute_path = (string)get_parameter('traceroute_path', ''); ui_print_page_header(__('Config Network Tools'));
$ping_path = (string)get_parameter('ping_path', '');
$nmap_path = (string)get_parameter('nmap_path', ''); $update_traceroute = (bool) get_parameter('update_traceroute', 0);
$dig_path = (string)get_parameter('dig_path', '');
$snmpget_path = (string)get_parameter('snmpget_path', ''); $traceroute_path = (string) get_parameter('traceroute_path', '');
$ping_path = (string) get_parameter('ping_path', '');
$nmap_path = (string) get_parameter('nmap_path', '');
if ($update_traceroute) { $dig_path = (string) get_parameter('dig_path', '');
$network_tools_config = array(); $snmpget_path = (string) get_parameter('snmpget_path', '');
$network_tools_config['traceroute_path'] = $traceroute_path;
$network_tools_config['ping_path'] = $ping_path; if ($update_traceroute) {
$network_tools_config['nmap_path'] = $nmap_path; $network_tools_config = [];
$network_tools_config['dig_path'] = $dig_path; $network_tools_config['traceroute_path'] = $traceroute_path;
$network_tools_config['snmpget_path'] = $snmpget_path; $network_tools_config['ping_path'] = $ping_path;
$network_tools_config['nmap_path'] = $nmap_path;
$result = config_update_value('network_tools_config', json_encode($network_tools_config)); $network_tools_config['dig_path'] = $dig_path;
$network_tools_config['snmpget_path'] = $snmpget_path;
ui_print_result_message($result, __('Set the paths.'),
__('Set the paths.')); $result = config_update_value('network_tools_config', json_encode($network_tools_config));
}
else { ui_print_result_message(
$result,
if (isset($config['network_tools_config'])) { __('Set the paths.'),
$network_tools_config_output = io_safe_output($config['network_tools_config']); __('Set the paths.')
$network_tools_config = json_decode($network_tools_config_output, true); );
$traceroute_path = $network_tools_config['traceroute_path']; } else {
$ping_path = $network_tools_config['ping_path']; if (isset($config['network_tools_config'])) {
$nmap_path = $network_tools_config['nmap_path']; $network_tools_config_output = io_safe_output($config['network_tools_config']);
$dig_path = $network_tools_config['dig_path']; $network_tools_config = json_decode($network_tools_config_output, true);
$snmpget_path = $network_tools_config['snmpget_path']; $traceroute_path = $network_tools_config['traceroute_path'];
} $ping_path = $network_tools_config['ping_path'];
} $nmap_path = $network_tools_config['nmap_path'];
$dig_path = $network_tools_config['dig_path'];
$table = null; $snmpget_path = $network_tools_config['snmpget_path'];
$table->width = "100%"; }
}
$table->data = array();
$table = null;
$table->data[0][0] = __("Traceroute path"); $table->width = '100%';
$table->data[0][0] .= ui_print_help_tip(__('If empty, %s will search the traceroute system.', get_product_name()), true);
$table->data[0][1] = html_print_input_text('traceroute_path', $traceroute_path, '', 40, 255, true); $table->data = [];
$table->data[1][0] = __("Ping path"); $table->data[0][0] = __('Traceroute path');
$table->data[1][0] .= ui_print_help_tip(__('If empty, %s will search the ping system.', get_product_name()), true); $table->data[0][0] .= ui_print_help_tip(__('If empty, %s will search the traceroute system.', get_product_name()), true);
$table->data[1][1] = html_print_input_text('ping_path', $ping_path, '', 40, 255, true); $table->data[0][1] = html_print_input_text('traceroute_path', $traceroute_path, '', 40, 255, true);
$table->data[2][0] = __("Nmap path"); $table->data[1][0] = __('Ping path');
$table->data[2][0] .= ui_print_help_tip(__('If empty, %s will search the nmap system.', get_product_name()), true); $table->data[1][0] .= ui_print_help_tip(__('If empty, %s will search the ping system.', get_product_name()), true);
$table->data[2][1] = html_print_input_text('nmap_path', $nmap_path, '', 40, 255, true); $table->data[1][1] = html_print_input_text('ping_path', $ping_path, '', 40, 255, true);
$table->data[3][0] = __("Dig path"); $table->data[2][0] = __('Nmap path');
$table->data[3][0] .= ui_print_help_tip(__('If empty, %s will search the dig system', get_product_name()), true); $table->data[2][0] .= ui_print_help_tip(__('If empty, %s will search the nmap system.', get_product_name()), true);
$table->data[3][1] = html_print_input_text('dig_path', $dig_path, '', 40, 255, true); $table->data[2][1] = html_print_input_text('nmap_path', $nmap_path, '', 40, 255, true);
$table->data[4][0] = __("Snmpget path"); $table->data[3][0] = __('Dig path');
$table->data[4][0] .= ui_print_help_tip(__('If empty, %s will search the snmpget system.', get_product_name()), true); $table->data[3][0] .= ui_print_help_tip(__('If empty, %s will search the dig system', get_product_name()), true);
$table->data[4][1] = html_print_input_text('snmpget_path', $snmpget_path, '', 40, 255, true); $table->data[3][1] = html_print_input_text('dig_path', $dig_path, '', 40, 255, true);
echo '<form id="form_setup" method="post" >'; $table->data[4][0] = __('Snmpget path');
echo "<fieldset>"; $table->data[4][0] .= ui_print_help_tip(__('If empty, %s will search the snmpget system.', get_product_name()), true);
echo "<legend>" . __('Options') . "</legend>"; $table->data[4][1] = html_print_input_text('snmpget_path', $snmpget_path, '', 40, 255, true);
html_print_input_hidden('update_traceroute', 1);
html_print_table($table); echo '<form id="form_setup" method="post" >';
echo "</fieldset>"; echo '<fieldset>';
echo '<legend>'.__('Options').'</legend>';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; html_print_input_hidden('update_traceroute', 1);
html_print_submit_button (__('Update'), 'update_button', false, 'class="sub upd"'); html_print_table($table);
echo '</div>'; echo '</fieldset>';
echo '</form>';
echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"');
echo '</div>';
echo '</form>';
} }
extensions_add_godmode_menu_option (__('Config Network Tools'), 'PM');
extensions_add_godmode_function ('godmode_net_tools'); extensions_add_godmode_menu_option(__('Config Network Tools'), 'PM');
?> extensions_add_godmode_function('godmode_net_tools');

View File

@ -4,83 +4,76 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
function view_logfile($file_name)
{
global $config;
function view_logfile ($file_name) { $memory_limit = ini_get('memory_limit');
global $config;
if (strstr($memory_limit, 'M') !== false) {
$memory_limit = ini_get("memory_limit"); $memory_limit = str_replace('M', '', $memory_limit);
$memory_limit = ($memory_limit * 1024 * 1024);
if (strstr($memory_limit, "M") !== false) {
$memory_limit = str_replace("M", "", $memory_limit); // Arbitrary size for the PHP program
$memory_limit = $memory_limit * 1024 * 1024; $memory_limit = ($memory_limit - (8 * 1024 * 1024));
}
//Arbitrary size for the PHP program
$memory_limit = $memory_limit - (8 * 1024 * 1024); if (!file_exists($file_name)) {
} ui_print_error_message(__('Cannot find file').'('.$file_name.')');
} else {
$file_size = filesize($file_name);
if (!file_exists($file_name)) { if ($memory_limit < $file_size) {
ui_print_error_message(__("Cannot find file") . "(" . $file_name . ")"); echo "<h2>$file_name (".__('File is too large than PHP memory allocated in the system.').')</h2>';
} echo '<h2>'.__('The preview file is imposible.').'</h2>';
else { } else if ($file_size > ($config['max_log_size'] * 1000)) {
$file_size = filesize($file_name); $data = file_get_contents($file_name, false, null, ($file_size - ($config['max_log_size'] * 1000)));
echo "<h2>$file_name (".format_numeric(filesize($file_name) / 1024).' KB) </h2>';
if ($memory_limit < $file_size) { echo "<textarea style='width: 98%; float:right; height: 200px; margin-bottom:20px;' name='$file_name'>";
echo "<h2>$file_name (" . __("File is too large than PHP memory allocated in the system.") . ")</h2>"; echo '... ';
echo "<h2>" . __("The preview file is imposible.") . "</h2>"; echo $data;
} echo '</textarea><br><br>';
else if ($file_size > ($config['max_log_size'] * 1000)) { } else {
$data = file_get_contents ($file_name, false, NULL, $file_size - ($config['max_log_size'] * 1000)); $data = file_get_contents($file_name);
echo "<h2>$file_name (".format_numeric(filesize ($file_name)/1024)." KB) </h2>"; echo "<h2>$file_name (".format_numeric(filesize($file_name) / 1024).' KB) </h2>';
echo "<textarea style='width: 98%; float:right; height: 200px; margin-bottom:20px;' name='$file_name'>"; echo "<textarea style='width: 98%; float:right; height: 200px; margin-bottom:20px;' name='$file_name'>";
echo "... "; echo $data;
echo $data; echo '</textarea><br><br>';
echo "</textarea><br><br>"; }
} }
else {
$data = file_get_contents ($file_name);
echo "<h2>$file_name (".format_numeric(filesize ($file_name)/1024)." KB) </h2>";
echo "<textarea style='width: 98%; float:right; height: 200px; margin-bottom:20px;' name='$file_name'>";
echo $data;
echo "</textarea><br><br>";
}
}
} }
function pandoralogs_extension_main () { function pandoralogs_extension_main()
global $config; {
global $config;
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
db_pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;
}
ui_print_page_header (__("System logfile viewer"), "images/extensions.png", false, "", true, "" );
echo "<p>" . __('Use this tool to view your %s logfiles directly on the console', get_product_name()) . "</p>";
echo "<p>" . __('You can choose the amount of information shown in general setup (Log size limit in system logs viewer extension), ' . $config['max_log_size'] * 1000 . 'B at the moment') . "</p>"; if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
db_pandora_audit('ACL Violation', 'Trying to access Setup Management');
$logs_directory = (!empty($config["server_log_dir"])) ? io_safe_output($config["server_log_dir"]) : "/var/log/pandora"; include 'general/noaccess.php';
return;
}
view_logfile ($config["homedir"]."/pandora_console.log"); ui_print_page_header(__('System logfile viewer'), 'images/extensions.png', false, '', true, '');
view_logfile ($logs_directory."/pandora_server.log");
view_logfile ($logs_directory."/pandora_server.error"); echo '<p>'.__('Use this tool to view your %s logfiles directly on the console', get_product_name()).'</p>';
echo '<p>'.__('You can choose the amount of information shown in general setup (Log size limit in system logs viewer extension), '.($config['max_log_size'] * 1000).'B at the moment').'</p>';
$logs_directory = (!empty($config['server_log_dir'])) ? io_safe_output($config['server_log_dir']) : '/var/log/pandora';
view_logfile($config['homedir'].'/pandora_console.log');
view_logfile($logs_directory.'/pandora_server.log');
view_logfile($logs_directory.'/pandora_server.error');
} }
extensions_add_godmode_menu_option (__('System logfiles'), 'PM','', null, "v1r1");
extensions_add_godmode_menu_option(__('System logfiles'), 'PM', '', null, 'v1r1');
extensions_add_godmode_function('pandoralogs_extension_main'); extensions_add_godmode_function('pandoralogs_extension_main');
?>

View File

@ -4,434 +4,415 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
function pluginreg_extension_main()
{
global $config;
function pluginreg_extension_main () { check_login();
global $config;
check_login(); if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
db_pandora_audit('ACL Violation', 'Trying to access Setup Management');
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { include 'general/noaccess.php';
db_pandora_audit("ACL Violation", "Trying to access Setup Management"); return;
require ("general/noaccess.php"); }
return;
} ui_require_css_file('firts_task');
ui_require_css_file ('firts_task'); ui_print_page_header(__('Plugin registration'), 'images/extensions.png', false, '', true, '');
ui_print_page_header (__('Plugin registration'), "images/extensions.png", false, "", true, "" );
echo '<div class="new_task">
echo '<div class="new_task">
<div class="image_task">'; <div class="image_task">';
echo html_print_image("images/firts_task/icono_grande_import.png", true, array("title" => __("Plugin Registration") )); echo html_print_image('images/firts_task/icono_grande_import.png', true, ['title' => __('Plugin Registration') ]);
echo '</div>'; echo '</div>';
echo '<div class="text_task">'; echo '<div class="text_task">';
echo '<h3>' . __("Plugin registration") . '</h3>'; echo '<h3>'.__('Plugin registration').'</h3>';
echo '<p id="description_task">' . echo '<p id="description_task">'.__(
__("This extension makes registering server plugins an easier task. "This extension makes registering server plugins an easier task.
Here you can upload a server plugin in .pspz zipped format. Here you can upload a server plugin in .pspz zipped format.
Please refer to the official documentation on how to obtain and use Server Plugins. Please refer to the official documentation on how to obtain and use Server Plugins.
<br><br>You can get more plugins in our <a href='http://pandorafms.com/Library/Library/'>Public Resource Library</a> ") . '</p>'; <br><br>You can get more plugins in our <a href='http://pandorafms.com/Library/Library/'>Public Resource Library</a> "
// Upload form ).'</p>';
echo "<form name='submit_plugin' method='post' enctype='multipart/form-data'>"; // Upload form
echo '<table class="" id="table1" width="100%" border="0" cellpadding="4" cellspacing="4">'; echo "<form name='submit_plugin' method='post' enctype='multipart/form-data'>";
echo "<tr><td class='datos'><input type='file' name='plugin_upload' />"; echo '<table class="" id="table1" width="100%" border="0" cellpadding="4" cellspacing="4">';
echo "<td class='datos'><input type='submit' class='sub next' value='".__('Upload')."' />"; echo "<tr><td class='datos'><input type='file' name='plugin_upload' />";
echo "</form></table>"; echo "<td class='datos'><input type='submit' class='sub next' value='".__('Upload')."' />";
echo '</div>'; echo '</form></table>';
echo '</div>'; echo '</div>';
echo '</div>';
$zip = null;
$zip = null; $upload = false;
$upload = false; if (isset($_FILES['plugin_upload'])) {
if (isset($_FILES['plugin_upload'])) { $config['plugin_store'] = $config['attachment_store'].'/plugin';
$config["plugin_store"] = $config["attachment_store"] . "/plugin";
$name_file = $_FILES['plugin_upload']['name'];
$name_file = $_FILES['plugin_upload']['name'];
$zip = zip_open($_FILES['plugin_upload']['tmp_name']);
$zip = zip_open($_FILES['plugin_upload']['tmp_name']); $upload = true;
$upload = true; }
}
if ($zip) {
if ($zip) { while ($zip_entry = zip_read($zip)) {
while ($zip_entry = zip_read($zip)) { if (zip_entry_open($zip, $zip_entry, 'r')) {
if (zip_entry_open($zip, $zip_entry, "r")) { if (zip_entry_name($zip_entry) == 'plugin_definition.ini') {
if (zip_entry_name($zip_entry) == "plugin_definition.ini") { $basepath = $config['attachment_store'];
$basepath = $config["attachment_store"]; } else {
} $basepath = $config['plugin_store'];
else { }
$basepath = $config["plugin_store"];
} $filename = $basepath.'/'.zip_entry_name($zip_entry);
$filename = $basepath . "/". zip_entry_name($zip_entry); $fp = fopen($filename, 'w');
$fp = fopen($filename, 'w'); $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)); fwrite($fp, $buf);
fwrite($fp, $buf); fclose($fp);
fclose($fp); chmod($filename, 0755);
chmod ($filename, 0755); zip_entry_close($zip_entry);
zip_entry_close($zip_entry); }
} }
}
zip_close($zip); zip_close($zip);
} }
if ($upload) { if ($upload) {
// Parse with sections // Parse with sections
if (! $ini_array = parse_ini_file($config["attachment_store"] . "/plugin_definition.ini", true)) { if (! $ini_array = parse_ini_file($config['attachment_store'].'/plugin_definition.ini', true)) {
echo "<h2 class=error>".__("Cannot load INI file")."</h2>"; echo '<h2 class=error>'.__('Cannot load INI file').'</h2>';
} } else {
else { $version = preg_replace('/.*[.]/', '', $name_file);
$version = preg_replace("/.*[.]/", "", $name_file); $exec_path = $config['plugin_store'].'/'.$ini_array['plugin_definition']['filename'];
$exec_path = $config["plugin_store"] . "/" . $ini_array["plugin_definition"]["filename"]; $file_exec_path = $exec_path;
$file_exec_path = $exec_path; if (isset($ini_array['plugin_definition']['execution_command'])
&& ($ini_array['plugin_definition']['execution_command'] != '')
if (isset($ini_array["plugin_definition"]["execution_command"]) ) {
&& ($ini_array["plugin_definition"]["execution_command"] != "")) { $exec_path = $ini_array['plugin_definition']['execution_command'].' '.$config['plugin_store'].'/'.$ini_array['plugin_definition']['filename'];
}
$exec_path = $ini_array["plugin_definition"]["execution_command"] . " " . $config["plugin_store"] . "/" . $ini_array["plugin_definition"]["filename"];
} if (isset($ini_array['plugin_definition']['execution_postcommand'])
&& ($ini_array['plugin_definition']['execution_postcommand'] != '')
if (isset($ini_array["plugin_definition"]["execution_postcommand"]) ) {
&& ($ini_array["plugin_definition"]["execution_postcommand"] != "")) { $exec_path = $exec_path.' '.$ini_array['plugin_definition']['execution_postcommand'];
}
$exec_path = $exec_path . " " .$ini_array["plugin_definition"]["execution_postcommand"];
} if (!file_exists($file_exec_path)) {
echo '<h2 class=error>'.__('Plugin exec not found. Aborting!').'</h2>';
if (!file_exists($file_exec_path)) { unlink($config['attachment_store'].'/plugin_definition.ini');
echo "<h2 class=error>".__("Plugin exec not found. Aborting!")."</h2>"; } else {
unlink ($config["attachment_store"] . "/plugin_definition.ini"); // Verify if a plugin with the same name is already registered
} $sql0 = "SELECT COUNT(*)
else {
// Verify if a plugin with the same name is already registered
$sql0 = "SELECT COUNT(*)
FROM tplugin FROM tplugin
WHERE name = '" . io_safe_input ($ini_array["plugin_definition"]["name"]) . "'"; WHERE name = '".io_safe_input($ini_array['plugin_definition']['name'])."'";
$result = db_get_sql ($sql0); $result = db_get_sql($sql0);
if ($result > 0) {
if ($result> 0) { echo '<h2 class=error>'.__('Plugin already registered. Aborting!').'</h2>';
echo "<h2 class=error>".__("Plugin already registered. Aborting!")."</h2>"; unlink($config['attachment_store'].'/plugin_definition.ini');
unlink ($config["attachment_store"] . "/plugin_definition.ini"); } else {
} $values = [
else { 'name' => io_safe_input($ini_array['plugin_definition']['name']),
'description' => io_safe_input($ini_array['plugin_definition']['description']),
$values = array( 'max_timeout' => $ini_array['plugin_definition']['timeout'],
'name' => io_safe_input ($ini_array["plugin_definition"]["name"]), 'execute' => io_safe_input($exec_path),
'description' => io_safe_input ($ini_array["plugin_definition"]["description"]), 'net_dst_opt' => $ini_array['plugin_definition']['ip_opt'],
'max_timeout' => $ini_array["plugin_definition"]["timeout"], 'net_port_opt' => $ini_array['plugin_definition']['port_opt'],
'execute' => io_safe_input ($exec_path), 'user_opt' => $ini_array['plugin_definition']['user_opt'],
'net_dst_opt' => $ini_array["plugin_definition"]["ip_opt"], 'pass_opt' => $ini_array['plugin_definition']['pass_opt'],
'net_port_opt' => $ini_array["plugin_definition"]["port_opt"], 'parameters' => $ini_array['plugin_definition']['parameters'],
'user_opt' => $ini_array["plugin_definition"]["user_opt"], 'plugin_type' => $ini_array['plugin_definition']['plugin_type'],
'pass_opt' => $ini_array["plugin_definition"]["pass_opt"], ];
'parameters' => $ini_array["plugin_definition"]["parameters"],
'plugin_type' => $ini_array["plugin_definition"]["plugin_type"]); switch ($version) {
case 'pspz':
// Fixed the static parameters
switch ($version) { // for
case 'pspz': // the dinamic parameters of pandoras 5
// Fixed the static parameters $total_macros = 0;
// for $macros = [];
// the dinamic parameters of pandoras 5
if (!isset($values['parameters'])) {
$total_macros = 0; $values['parameters'] = '';
$macros = array(); }
if (!isset($values['parameters'])) if ($values['net_dst_opt'] != '') {
$values['parameters'] = ""; $total_macros++;
if ($values['net_dst_opt'] != "") { $macro = [];
$total_macros++; $macro['macro'] = '_field'.$total_macros.'_';
$macro['desc'] = 'Target IP from net';
$macro = array(); $macro['help'] = '';
$macro['macro'] = '_field' . $total_macros . '_'; $macro['value'] = '';
$macro['desc'] = 'Target IP from net';
$macro['help'] = ''; $values['parameters'] .= $values['net_dst_opt'].' _field'.$total_macros.'_ ';
$macro['value'] = '';
$macros[(string) $total_macros] = $macro;
$values['parameters'] .= }
$values['net_dst_opt'] . ' _field' . $total_macros . '_ ';
if ($values['ip_opt'] != '') {
$macros[(string)$total_macros] = $macro; $total_macros++;
}
$macro = [];
if ($values['ip_opt'] != "") { $macro['macro'] = '_field'.$total_macros.'_';
$total_macros++; $macro['desc'] = 'Target IP';
$macro['help'] = '';
$macro = array(); $macro['value'] = '';
$macro['macro'] = '_field' . $total_macros . '_';
$macro['desc'] = 'Target IP'; $values['parameters'] .= $values['ip_opt'].' _field'.$total_macros.'_ ';
$macro['help'] = '';
$macro['value'] = ''; $macros[(string) $total_macros] = $macro;
}
$values['parameters'] .=
$values['ip_opt'] . ' _field' . $total_macros . '_ '; if ($values['net_port_opt'] != '') {
$total_macros++;
$macros[(string)$total_macros] = $macro;
} $macro = [];
$macro['macro'] = '_field'.$total_macros.'_';
if ($values['net_port_opt'] != "") { $macro['desc'] = 'Port from net';
$total_macros++; $macro['help'] = '';
$macro['value'] = '';
$macro = array();
$macro['macro'] = '_field' . $total_macros . '_'; $values['parameters'] .= $values['net_port_opt'].' _field'.$total_macros.'_ ';
$macro['desc'] = 'Port from net';
$macro['help'] = ''; $macros[(string) $total_macros] = $macro;
$macro['value'] = ''; }
$values['parameters'] .= if ($values['port_opt'] != '') {
$values['net_port_opt'] . ' _field' . $total_macros . '_ '; $total_macros++;
$macros[(string)$total_macros] = $macro; $macro = [];
} $macro['macro'] = '_field'.$total_macros.'_';
$macro['desc'] = 'Port';
if ($values['port_opt'] != "") { $macro['help'] = '';
$total_macros++; $macro['value'] = '';
$macro = array(); $values['parameters'] .= $values['port_opt'].' _field'.$total_macros.'_ ';
$macro['macro'] = '_field' . $total_macros . '_';
$macro['desc'] = 'Port'; $macros[(string) $total_macros] = $macro;
$macro['help'] = ''; }
$macro['value'] = '';
if ($values['user_opt'] != '') {
$values['parameters'] .= $total_macros++;
$values['port_opt'] . ' _field' . $total_macros . '_ ';
$macro = [];
$macros[(string)$total_macros] = $macro; $macro['macro'] = '_field'.$total_macros.'_';
} $macro['desc'] = 'Username';
$macro['help'] = '';
if ($values['user_opt'] != "") { $macro['value'] = '';
$total_macros++;
$values['parameters'] .= $values['user_opt'].' _field'.$total_macros.'_ ';
$macro = array();
$macro['macro'] = '_field' . $total_macros . '_'; $macros[(string) $total_macros] = $macro;
$macro['desc'] = 'Username'; }
$macro['help'] = '';
$macro['value'] = ''; if ($values['pass_opt'] != '') {
$total_macros++;
$values['parameters'] .=
$values['user_opt'] . ' _field' . $total_macros . '_ '; $macro = [];
$macro['macro'] = '_field'.$total_macros.'_';
$macros[(string)$total_macros] = $macro; $macro['desc'] = 'Password';
} $macro['help'] = '';
$macro['value'] = '';
if ($values['pass_opt'] != "") {
$total_macros++; $values['parameters'] .= $values['pass_opt'].' _field'.$total_macros.'_ ';
$macro = array(); $macros[(string) $total_macros] = $macro;
$macro['macro'] = '_field' . $total_macros . '_'; }
$macro['desc'] = 'Password';
$macro['help'] = ''; // A last parameter is defined always to
$macro['value'] = ''; // add the old "Plug-in parameters" in the
// side of the module
$values['parameters'] .= $total_macros++;
$values['pass_opt'] . ' _field' . $total_macros . '_ ';
$macro = [];
$macros[(string)$total_macros] = $macro; $macro['macro'] = '_field'.$total_macros.'_';
} $macro['desc'] = 'Plug-in Parameters';
$macro['help'] = '';
// A last parameter is defined always to $macro['value'] = '';
// add the old "Plug-in parameters" in the
// side of the module $values['parameters'] .= ' _field'.$total_macros.'_';
$total_macros++;
$macros[(string) $total_macros] = $macro;
$macro = array();
$macro['macro'] = '_field' . $total_macros . '_'; break;
$macro['desc'] = 'Plug-in Parameters';
$macro['help'] = ''; case 'pspz2':
$macro['value'] = ''; // Fill the macros field.
$total_macros = $ini_array['plugin_definition']['total_macros_provided'];
$values['parameters'] .=
' _field' . $total_macros . '_'; $macros = [];
for ($it_macros = 1; $it_macros <= $total_macros; $it_macros++) {
$macros[(string)$total_macros] = $macro; $label = 'macro_'.$it_macros;
break; $macro = [];
case 'pspz2':
// Fill the macros field. $macro['macro'] = '_field'.$it_macros.'_';
$total_macros = $macro['hide'] = $ini_array[$label]['hide'];
$ini_array["plugin_definition"]["total_macros_provided"]; $macro['desc'] = io_safe_input(
$ini_array[$label]['description']
$macros = array(); );
for ($it_macros = 1; $it_macros <= $total_macros; $it_macros++) { $macro['help'] = io_safe_input(
$label = "macro_" . $it_macros; $ini_array[$label]['help']
);
$macro = array(); $macro['value'] = io_safe_input(
$ini_array[$label]['value']
$macro['macro'] = '_field' . $it_macros . '_'; );
$macro['hide'] =
$ini_array[$label]['hide']; $macros[(string) $it_macros] = $macro;
$macro['desc'] = io_safe_input( }
$ini_array[$label]['description']); break;
$macro['help'] = io_safe_input( }
$ini_array[$label]['help']);
$macro['value'] = io_safe_input( if (!empty($macros)) {
$ini_array[$label]['value']); $values['macros'] = json_encode($macros);
}
$macros[(string)$it_macros] = $macro;
} $create_id = db_process_sql_insert('tplugin', $values);
break;
} if (empty($create_id)) {
ui_print_error_message(
if (!empty($macros)) { __('Plug-in Remote Registered unsuccessfull')
$values['macros'] = json_encode($macros); );
} ui_print_info_message(
__('Please check the syntax of file "plugin_definition.ini"')
$create_id = db_process_sql_insert('tplugin', $values); );
} else {
if (empty($create_id)) { for ($ax = 1; $ax <= $ini_array['plugin_definition']['total_modules_provided']; $ax++) {
ui_print_error_message( $label = 'module'.$ax;
__('Plug-in Remote Registered unsuccessfull'));
ui_print_info_message( $plugin_user = '';
__('Please check the syntax of file "plugin_definition.ini"')); if (isset($ini_array[$label]['plugin_user'])) {
} $plugin_user = $ini_array[$label]['plugin_user'];
else { }
for ($ax = 1; $ax <= $ini_array["plugin_definition"]["total_modules_provided"]; $ax++) {
$label = "module" . $ax; $plugin_pass = '';
if (isset($ini_array[$label]['plugin_pass'])) {
$plugin_user = ""; $plugin_pass = $ini_array[$label]['plugin_pass'];
if (isset($ini_array[$label]["plugin_user"])) }
$plugin_user = $ini_array[$label]["plugin_user"];
$plugin_pass = ""; $plugin_parameter = '';
if (isset($ini_array[$label]["plugin_pass"])) if (isset($ini_array[$label]['plugin_parameter'])) {
$plugin_pass = $ini_array[$label]["plugin_pass"]; $plugin_parameter = $ini_array[$label]['plugin_parameter'];
$plugin_parameter = ""; }
if (isset($ini_array[$label]["plugin_parameter"]))
$plugin_parameter = $ini_array[$label]["plugin_parameter"]; $unit = '';
$unit = ""; if (isset($ini_array[$label]['unit'])) {
if (isset($ini_array[$label]["unit"])) $unit = $ini_array[$label]['unit'];
$unit = $ini_array[$label]["unit"]; }
$values = array( $values = [
'name' => io_safe_input ($ini_array[$label]["name"]), 'name' => io_safe_input($ini_array[$label]['name']),
'description' => io_safe_input ($ini_array[$label]["description"]), 'description' => io_safe_input($ini_array[$label]['description']),
'id_group' => $ini_array[$label]["id_group"], 'id_group' => $ini_array[$label]['id_group'],
'type' => $ini_array[$label]["type"], 'type' => $ini_array[$label]['type'],
'max' => isset($ini_array[$label]["max"]) ? $ini_array[$label]["max"] : '', 'max' => isset($ini_array[$label]['max']) ? $ini_array[$label]['max'] : '',
'min' => isset($ini_array[$label]["min"]) ? $ini_array[$label]["min"] : '', 'min' => isset($ini_array[$label]['min']) ? $ini_array[$label]['min'] : '',
'module_interval' => isset($ini_array[$label]["module_interval"]) ? $ini_array[$label]["module_interval"] : '', 'module_interval' => isset($ini_array[$label]['module_interval']) ? $ini_array[$label]['module_interval'] : '',
'id_module_group' => $ini_array[$label]["id_module_group"], 'id_module_group' => $ini_array[$label]['id_module_group'],
'id_modulo' => $ini_array[$label]["id_modulo"], 'id_modulo' => $ini_array[$label]['id_modulo'],
'plugin_user' => io_safe_input ($plugin_user), 'plugin_user' => io_safe_input($plugin_user),
'plugin_pass' => io_safe_input ($plugin_pass), 'plugin_pass' => io_safe_input($plugin_pass),
'plugin_parameter' => io_safe_input ($plugin_parameter), 'plugin_parameter' => io_safe_input($plugin_parameter),
'unit' => io_safe_input ($unit), 'unit' => io_safe_input($unit),
'max_timeout' => isset($ini_array[$label]["max_timeout"]) ? $ini_array[$label]["max_timeout"] : '', 'max_timeout' => isset($ini_array[$label]['max_timeout']) ? $ini_array[$label]['max_timeout'] : '',
'history_data' => isset($ini_array[$label]["history_data"]) ? $ini_array[$label]["history_data"] : '', 'history_data' => isset($ini_array[$label]['history_data']) ? $ini_array[$label]['history_data'] : '',
'dynamic_interval' => isset($ini_array[$label]["dynamic_interval"]) ? $ini_array[$label]["dynamic_interval"] : '', 'dynamic_interval' => isset($ini_array[$label]['dynamic_interval']) ? $ini_array[$label]['dynamic_interval'] : '',
'dynamic_min' => isset($ini_array[$label]["dynamic_min"]) ? $ini_array[$label]["dynamic_min"] : '', 'dynamic_min' => isset($ini_array[$label]['dynamic_min']) ? $ini_array[$label]['dynamic_min'] : '',
'dynamic_max' => isset($ini_array[$label]["dynamic_max"]) ? $ini_array[$label]["dynamic_max"] : '', 'dynamic_max' => isset($ini_array[$label]['dynamic_max']) ? $ini_array[$label]['dynamic_max'] : '',
'dynamic_two_tailed' => isset($ini_array[$label]["dynamic_two_tailed"]) ? $ini_array[$label]["dynamic_two_tailed"] : '', 'dynamic_two_tailed' => isset($ini_array[$label]['dynamic_two_tailed']) ? $ini_array[$label]['dynamic_two_tailed'] : '',
'min_warning' => isset($ini_array[$label]["min_warning"]) ? $ini_array[$label]["min_warning"] : '', 'min_warning' => isset($ini_array[$label]['min_warning']) ? $ini_array[$label]['min_warning'] : '',
'max_warning' => isset($ini_array[$label]["max_warning"]) ? $ini_array[$label]["max_warning"] : '', 'max_warning' => isset($ini_array[$label]['max_warning']) ? $ini_array[$label]['max_warning'] : '',
'str_warning' => isset($ini_array[$label]["str_warning"]) ? $ini_array[$label]["str_warning"] : '', 'str_warning' => isset($ini_array[$label]['str_warning']) ? $ini_array[$label]['str_warning'] : '',
'min_critical' => isset($ini_array[$label]["min_critical"]) ? $ini_array[$label]["min_critical"] : '', 'min_critical' => isset($ini_array[$label]['min_critical']) ? $ini_array[$label]['min_critical'] : '',
'max_critical' => isset($ini_array[$label]["max_critical"]) ? $ini_array[$label]["max_critical"] : '', 'max_critical' => isset($ini_array[$label]['max_critical']) ? $ini_array[$label]['max_critical'] : '',
'str_critical' => isset($ini_array[$label]["str_critical"]) ? $ini_array[$label]["str_critical"] : '', 'str_critical' => isset($ini_array[$label]['str_critical']) ? $ini_array[$label]['str_critical'] : '',
'min_ff_event' => isset($ini_array[$label]["min_ff_event"]) ? $ini_array[$label]["min_ff_event"] : '', 'min_ff_event' => isset($ini_array[$label]['min_ff_event']) ? $ini_array[$label]['min_ff_event'] : '',
'tcp_port' => isset($ini_array[$label]["tcp_port"]) ? $ini_array[$label]["tcp_port"] : '', 'tcp_port' => isset($ini_array[$label]['tcp_port']) ? $ini_array[$label]['tcp_port'] : '',
'id_plugin' => $create_id); 'id_plugin' => $create_id,
];
$macros_component = $macros;
$macros_component = $macros;
switch ($version) {
case 'pspz': switch ($version) {
// Fixed the static parameters case 'pspz':
// for // Fixed the static parameters
// the dinamic parameters of pandoras 5 // for
// the dinamic parameters of pandoras 5
foreach ($macros_component as $key => $macro) { foreach ($macros_component as $key => $macro) {
if ($macro['desc'] == 'Target IP from net') { if ($macro['desc'] == 'Target IP from net') {
if (!empty($values['ip_target'])) { if (!empty($values['ip_target'])) {
$macros_component[$key]['value'] = $macros_component[$key]['value'] = io_safe_input($values['ip_target']);
io_safe_input($values['ip_target']); }
} }
}
if ($macro['desc'] == 'Target IP') { if ($macro['desc'] == 'Target IP') {
if (!empty($values['ip_target'])) { if (!empty($values['ip_target'])) {
$macros_component[$key]['value'] = $macros_component[$key]['value'] = io_safe_input($values['ip_target']);
io_safe_input($values['ip_target']); }
} } else if ($macro['desc'] == 'Port from net') {
} if (!empty($values['tcp_port'])) {
else if ($macro['desc'] == 'Port from net') { $macros_component[$key]['value'] = io_safe_input($values['tcp_port']);
if (!empty($values['tcp_port'])) { }
$macros_component[$key]['value'] = } else if ($macro['desc'] == 'Port') {
io_safe_input($values['tcp_port']); if (!empty($values['tcp_port'])) {
} $macros_component[$key]['value'] = io_safe_input($values['tcp_port']);
} }
else if ($macro['desc'] == 'Port') { } else if ($macro['desc'] == 'Username') {
if (!empty($values['tcp_port'])) { if (!empty($values['plugin_user'])) {
$macros_component[$key]['value'] = $macros_component[$key]['value'] = io_safe_input($values['plugin_user']);
io_safe_input($values['tcp_port']); }
} } else if ($macro['desc'] == 'Password') {
} if (!empty($values['plugin_pass'])) {
else if ($macro['desc'] == 'Username') { $macros_component[$key]['value'] = io_safe_input($values['plugin_pass']);
if (!empty($values['plugin_user'])) { }
$macros_component[$key]['value'] = } else if ($macro['desc'] == 'Plug-in Parameters') {
io_safe_input($values['plugin_user']); if (!empty($values['plugin_parameter'])) {
} $macros_component[$key]['value'] = io_safe_input($values['plugin_parameter']);
} }
else if ($macro['desc'] == 'Password') { }
if (!empty($values['plugin_pass'])) { }
$macros_component[$key]['value'] = break;
io_safe_input($values['plugin_pass']);
} case 'pspz2':
} if ($total_macros > 0) {
else if ($macro['desc'] == 'Plug-in Parameters') { for ($it_macros = 1; $it_macros <= $total_macros; $it_macros++) {
if (!empty($values['plugin_parameter'])) { $macro = 'macro_'.$it_macros.'_value';
$macros_component[$key]['value'] =
io_safe_input($values['plugin_parameter']); // Set the value or use the default
} if (isset($ini_array[$label][$macro])) {
} $macros_component[(string) $it_macros]['value'] = io_safe_input($ini_array[$label][$macro]);
} }
break; }
case 'pspz2': }
if ($total_macros > 0) { break;
for ($it_macros = 1; $it_macros <= $total_macros; $it_macros++) { }
$macro = "macro_" . $it_macros . "_value";
if (!empty($macros_component)) {
// Set the value or use the default $values['macros'] = json_encode($macros_component);
if (isset($ini_array[$label][$macro])) { }
$macros_component[(string)$it_macros]['value'] =
io_safe_input($ini_array[$label][$macro]); db_process_sql_insert('tnetwork_component', $values);
}
} echo '<h3 class=suc>'.__('Module plugin registered').' : '.$ini_array[$label]['name'].'</h3>';
} }
break;
} echo '<h2 class=suc>'.__('Plugin').' '.$ini_array['plugin_definition']['name'].' '.__('Registered successfully').'</h2>';
}
if (!empty($macros_component)) {
$values['macros'] = json_encode($macros_component); unlink($config['attachment_store'].'/plugin_definition.ini');
} }
}
db_process_sql_insert('tnetwork_component', $values); }
}
echo "<h3 class=suc>" .
__("Module plugin registered") . " : " . $ini_array[$label]["name"] .
"</h3>";
}
echo "<h2 class=suc>" .
__("Plugin") . " " . $ini_array["plugin_definition"]["name"] . " " . __("Registered successfully") .
"</h2>";
}
unlink ($config["attachment_store"] . "/plugin_definition.ini");
}
}
}
}
} }
extensions_add_godmode_menu_option (__('Register plugin'), 'PM','gservers', null, "v1r1");
extensions_add_godmode_function('pluginreg_extension_main');
?> extensions_add_godmode_menu_option(__('Register plugin'), 'PM', 'gservers', null, 'v1r1');
extensions_add_godmode_function('pluginreg_extension_main');

View File

@ -4,191 +4,204 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2014 Artica Soluciones Tecnologicas // Copyright (c) 2005-2014 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
include_once($config['homedir'] . '/include/graphs/fgraph.php'); require_once $config['homedir'].'/include/graphs/fgraph.php';
include_once($config['homedir'] . '/include/functions_snmp_browser.php'); require_once $config['homedir'].'/include/functions_snmp_browser.php';
function pandora_realtime_graphs () {
global $config;
check_login ();
$id_network = get_parameter('id_network', 0); function pandora_realtime_graphs()
$action = get_parameter('action', 'list'); {
global $config;
check_login();
$onheader = array(); $id_network = get_parameter('id_network', 0);
$action = get_parameter('action', 'list');
$hide_header = get_parameter('hide_header', 0); $onheader = [];
if (!$hide_header) {
ui_print_page_header (__("Realtime graphs"), "images/extensions.png", false, "", false, $onheader);
}
$chart[time()]['graph'] = '0'; $hide_header = get_parameter('hide_header', 0);
$interactive_graph = true; if (!$hide_header) {
$color = array(); ui_print_page_header(__('Realtime graphs'), 'images/extensions.png', false, '', false, $onheader);
$legend = ''; }
$long_index = array();
$no_data_image = '';
$canvas = '<div id="graph_container">'; $chart[time()]['graph'] = '0';
$canvas .= '<div id="chartLegend"></div>'; $interactive_graph = true;
$color = [];
$legend = '';
$long_index = [];
$no_data_image = '';
$width = 800; $canvas = '<div id="graph_container">';
$height = 300; $canvas .= '<div id="chartLegend"></div>';
$data_array['realtime']['data'][0][0] = time() - 10; $width = 800;
$data_array['realtime']['data'][0][1] = 0; $height = 300;
$data_array['realtime']['data'][1][0] = time();
$data_array['realtime']['data'][1][1] = 0;
$data_array['realtime']['color'] = 'green';
$params =array( $data_array['realtime']['data'][0][0] = (time() - 10);
'agent_module_id' => false, $data_array['realtime']['data'][0][1] = 0;
'period' => 300, $data_array['realtime']['data'][1][0] = time();
'width' => $width, $data_array['realtime']['data'][1][1] = 0;
'height' => $height, $data_array['realtime']['color'] = 'green';
'unit' => $unit,
'only_image' => $only_image,
'homeurl' => $homeurl,
'type_graph' => 'area',
'font' => $config['fontpath'],
'font-size' => $config['font_size'],
'array_data_create' => $data_array,
'show_legend' => false,
'show_menu' => false
);
$canvas .= grafico_modulo_sparse($params); $params = [
'agent_module_id' => false,
'period' => 300,
'width' => $width,
'height' => $height,
'unit' => $unit,
'only_image' => $only_image,
'homeurl' => $homeurl,
'type_graph' => 'area',
'font' => $config['fontpath'],
'font-size' => $config['font_size'],
'array_data_create' => $data_array,
'show_legend' => false,
'show_menu' => false,
];
$canvas .= '</div>'; $canvas .= grafico_modulo_sparse($params);
echo $canvas;
$table->width = '100%'; $canvas .= '</div>';
$table->id = 'table-form'; echo $canvas;
$table->class = 'databox filters';
$table->style = array ();
$table->cellpadding = '0';
$table->cellspacing = '0';
$table->style['graph'] = 'font-weight: bold;';
$table->style['refresh'] = 'font-weight: bold;';
$table->style['incremental'] = 'font-weight: bold;';
$table->style['reset'] = 'font-weight: bold;';
$table->style['snmp_address'] = 'font-weight: bold;';
$table->style['snmp_community'] = 'font-weight: bold;';
$table->style['snmp_oid'] = 'font-weight: bold;';
$table->style['snmp_oid'] = 'font-weight: bold;';
$table->data = array ();
$graph_fields['cpu_load'] = __('%s Server CPU', get_product_name()); $table->width = '100%';
$graph_fields['pending_packets'] = __('Pending packages from %s Server', get_product_name()); $table->id = 'table-form';
$graph_fields['disk_io_wait'] = __('%s Server Disk IO Wait', get_product_name()); $table->class = 'databox filters';
$graph_fields['apache_load'] = __('%s Server Apache load', get_product_name()); $table->style = [];
$graph_fields['mysql_load'] = __('%s Server MySQL load', get_product_name()); $table->cellpadding = '0';
$graph_fields['server_load'] = __('%s Server load', get_product_name()); $table->cellspacing = '0';
$graph_fields['snmp_interface'] = __('SNMP Interface throughput'); $table->style['graph'] = 'font-weight: bold;';
$table->style['refresh'] = 'font-weight: bold;';
$table->style['incremental'] = 'font-weight: bold;';
$table->style['reset'] = 'font-weight: bold;';
$table->style['snmp_address'] = 'font-weight: bold;';
$table->style['snmp_community'] = 'font-weight: bold;';
$table->style['snmp_oid'] = 'font-weight: bold;';
$table->style['snmp_oid'] = 'font-weight: bold;';
$table->data = [];
$graph = get_parameter('graph', 'cpu_load'); $graph_fields['cpu_load'] = __('%s Server CPU', get_product_name());
$refresh = get_parameter('refresh', '1000'); $graph_fields['pending_packets'] = __('Pending packages from %s Server', get_product_name());
$graph_fields['disk_io_wait'] = __('%s Server Disk IO Wait', get_product_name());
$graph_fields['apache_load'] = __('%s Server Apache load', get_product_name());
$graph_fields['mysql_load'] = __('%s Server MySQL load', get_product_name());
$graph_fields['server_load'] = __('%s Server load', get_product_name());
$graph_fields['snmp_interface'] = __('SNMP Interface throughput');
if ($graph != 'snmp_module') { $graph = get_parameter('graph', 'cpu_load');
$data['graph'] = __('Graph') . '&nbsp;&nbsp;' . html_print_select ($graph_fields, 'graph', $graph, '', '', 0, true); $refresh = get_parameter('refresh', '1000');
}
$refresh_fields[1000] = human_time_description_raw(1, true, 'large'); if ($graph != 'snmp_module') {
$refresh_fields[5000] = human_time_description_raw(5, true, 'large'); $data['graph'] = __('Graph').'&nbsp;&nbsp;'.html_print_select($graph_fields, 'graph', $graph, '', '', 0, true);
$refresh_fields[10000] = human_time_description_raw(10, true, 'large'); }
$refresh_fields[30000] = human_time_description_raw(30, true, 'large');
if ($graph == 'snmp_module') { $refresh_fields[1000] = human_time_description_raw(1, true, 'large');
$agent_alias = io_safe_output(get_parameter('agent_alias', '')) ; $refresh_fields[5000] = human_time_description_raw(5, true, 'large');
$module_name = io_safe_output(get_parameter('module_name', '')) ; $refresh_fields[10000] = human_time_description_raw(10, true, 'large');
$module_incremental = get_parameter ('incremental', 0); $refresh_fields[30000] = human_time_description_raw(30, true, 'large');
$data['module_info'] = "$agent_alias: <b>$module_name</b>";
// Append all the hidden in this cell if ($graph == 'snmp_module') {
$data['module_info'] .= html_print_input_hidden ('incremental', $module_incremental, true); $agent_alias = io_safe_output(get_parameter('agent_alias', ''));
$data['module_info'] .= html_print_select ( $module_name = io_safe_output(get_parameter('module_name', ''));
array('snmp_module' => '-'), 'graph', 'snmp_module', '', '', 0, true, false, true, '', false, 'display: none;' $module_incremental = get_parameter('incremental', 0);
); $data['module_info'] = "$agent_alias: <b>$module_name</b>";
}
$data['refresh'] = __('Refresh interval') . '&nbsp;&nbsp;' . html_print_select ($refresh_fields, 'refresh', $refresh, '', '', 0, true);
if ($graph != 'snmp_module') {
$data['incremental'] = __('Incremental') . '&nbsp;&nbsp;' . html_print_checkbox ('incremental', 1, 0, true);
}
$data['reset'] = html_print_button(__('Clear graph'), 'reset', false, 'javascript:realtimeGraphs.clearGraph();', 'class="sub delete" style="margin-top:0px;"', true);
$table->data[] = $data;
if ($graph == 'snmp_interface' || $graph == 'snmp_module') { // Append all the hidden in this cell
$snmp_address = get_parameter('snmp_address', ''); $data['module_info'] .= html_print_input_hidden('incremental', $module_incremental, true);
$snmp_community = get_parameter('snmp_community', ''); $data['module_info'] .= html_print_select(
$snmp_oid = get_parameter('snmp_oid', ''); ['snmp_module' => '-'],
$snmp_ver = get_parameter('snmp_ver', ''); 'graph',
'snmp_module',
'',
'',
0,
true,
false,
true,
'',
false,
'display: none;'
);
}
$data = array(); $data['refresh'] = __('Refresh interval').'&nbsp;&nbsp;'.html_print_select($refresh_fields, 'refresh', $refresh, '', '', 0, true);
if ($graph != 'snmp_module') {
$data['incremental'] = __('Incremental').'&nbsp;&nbsp;'.html_print_checkbox('incremental', 1, 0, true);
}
$data['snmp_address'] = __('Target IP') . '&nbsp;&nbsp;' . html_print_input_text ('ip_target', $snmp_address, '', 50, 255, true); $data['reset'] = html_print_button(__('Clear graph'), 'reset', false, 'javascript:realtimeGraphs.clearGraph();', 'class="sub delete" style="margin-top:0px;"', true);
$table->colspan[1]['snmp_address'] = 2; $table->data[] = $data;
$data['snmp_community'] = __('Community') . '&nbsp;&nbsp;' . html_print_input_text ('snmp_community', $snmp_community, '', 50, 255, true); if ($graph == 'snmp_interface' || $graph == 'snmp_module') {
$table->colspan[1]['snmp_community'] = 2; $snmp_address = get_parameter('snmp_address', '');
$snmp_community = get_parameter('snmp_community', '');
$snmp_oid = get_parameter('snmp_oid', '');
$snmp_ver = get_parameter('snmp_ver', '');
$table->data[] = $data; $data = [];
$snmp_versions = array(); $data['snmp_address'] = __('Target IP').'&nbsp;&nbsp;'.html_print_input_text('ip_target', $snmp_address, '', 50, 255, true);
$snmp_versions['1'] = '1'; $table->colspan[1]['snmp_address'] = 2;
$snmp_versions['2'] = '2';
$snmp_versions['2c'] = '2c';
$data = array(); $data['snmp_community'] = __('Community').'&nbsp;&nbsp;'.html_print_input_text('snmp_community', $snmp_community, '', 50, 255, true);
$data['snmp_oid'] = __('OID') . '&nbsp;&nbsp;' . html_print_input_text ('snmp_oid', $snmp_oid, '', 100, 255, true); $table->colspan[1]['snmp_community'] = 2;
$table->colspan[2]['snmp_oid'] = 2;
$data['snmp_ver'] = __('Version') . '&nbsp;&nbsp;' . html_print_select ($snmp_versions, 'snmp_version', $snmp_ver, '', '', 0, true); $table->data[] = $data;
$data['snmp_ver'] .= '&nbsp;&nbsp;' . html_print_button (__('SNMP walk'), 'snmp_walk', false, 'javascript:realtimeGraphs.snmpBrowserWindow();', 'class="sub next"', true);
$table->colspan[2]['snmp_ver'] = 2;
$table->data[] = $data; $snmp_versions = [];
$snmp_versions['1'] = '1';
$snmp_versions['2'] = '2';
$snmp_versions['2c'] = '2c';
// Hide some options in snmp_module graphs $data = [];
if ($graph == 'snmp_module') { $data['snmp_oid'] = __('OID').'&nbsp;&nbsp;'.html_print_input_text('snmp_oid', $snmp_oid, '', 100, 255, true);
$table->rowstyle[1] = "display: none;"; $table->colspan[2]['snmp_oid'] = 2;
$table->rowstyle[2] = "display: none;";
}
snmp_browser_print_container (false, '100%', '60%', 'none');
}
// Print the relative path to AJAX calls: $data['snmp_ver'] = __('Version').'&nbsp;&nbsp;'.html_print_select($snmp_versions, 'snmp_version', $snmp_ver, '', '', 0, true);
html_print_input_hidden('rel_path', get_parameter('rel_path', '')); $data['snmp_ver'] .= '&nbsp;&nbsp;'.html_print_button(__('SNMP walk'), 'snmp_walk', false, 'javascript:realtimeGraphs.snmpBrowserWindow();', 'class="sub next"', true);
$table->colspan[2]['snmp_ver'] = 2;
// Print the form $table->data[] = $data;
echo '<form id="realgraph" method="post">';
html_print_table($table);
echo '</form>';
// Define a custom action to save the OID selected in the SNMP browser to the form // Hide some options in snmp_module graphs
html_print_input_hidden ('custom_action', urlencode (base64_encode('&nbsp;<a href="javascript:realtimeGraphs.setOID();"><img src="' . ui_get_full_url("images") . '/input_filter.disabled.png" title="' . __("Use this OID") . '" style="vertical-align: middle;"></img></a>')), false); if ($graph == 'snmp_module') {
html_print_input_hidden ('incremental_base', '0'); $table->rowstyle[1] = 'display: none;';
$table->rowstyle[2] = 'display: none;';
}
echo '<script type="text/javascript" src="'.ui_get_full_url("extensions/realtime_graphs/realtime_graphs.js").'"></script>'; snmp_browser_print_container(false, '100%', '60%', 'none');
echo '<script type="text/javascript" src="'.ui_get_full_url("include/javascript/pandora_snmp_browser.js").'"></script>'; }
echo '<link rel="stylesheet" type="text/css" href="'.ui_get_full_url("extensions/realtime_graphs/realtime_graphs.css").'"></style>';
// Store servers timezone offset to be retrieved from js // Print the relative path to AJAX calls:
set_js_value('timezone_offset', date('Z', time())); html_print_input_hidden('rel_path', get_parameter('rel_path', ''));
// Print the form
echo '<form id="realgraph" method="post">';
html_print_table($table);
echo '</form>';
// Define a custom action to save the OID selected in the SNMP browser to the form
html_print_input_hidden('custom_action', urlencode(base64_encode('&nbsp;<a href="javascript:realtimeGraphs.setOID();"><img src="'.ui_get_full_url('images').'/input_filter.disabled.png" title="'.__('Use this OID').'" style="vertical-align: middle;"></img></a>')), false);
html_print_input_hidden('incremental_base', '0');
echo '<script type="text/javascript" src="'.ui_get_full_url('extensions/realtime_graphs/realtime_graphs.js').'"></script>';
echo '<script type="text/javascript" src="'.ui_get_full_url('include/javascript/pandora_snmp_browser.js').'"></script>';
echo '<link rel="stylesheet" type="text/css" href="'.ui_get_full_url('extensions/realtime_graphs/realtime_graphs.css').'"></style>';
// Store servers timezone offset to be retrieved from js
set_js_value('timezone_offset', date('Z', time()));
} }
extensions_add_operation_menu_option (__('Realtime graphs'), "estado", null, "v1r1","view");
extensions_add_main_function ('pandora_realtime_graphs');
$db = NULL; extensions_add_operation_menu_option(__('Realtime graphs'), 'estado', null, 'v1r1', 'view');
?> extensions_add_main_function('pandora_realtime_graphs');
$db = null;

View File

@ -4,101 +4,111 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2014 Artica Soluciones Tecnologicas // Copyright (c) 2005-2014 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
require_once '../../include/functions_html.php';
require_once ('../../include/functions_html.php');
$graph = $_POST['graph']; $graph = $_POST['graph'];
$graph_title = $_POST['graph_title']; $graph_title = $_POST['graph_title'];
$refresh = $_POST['refresh']; $refresh = $_POST['refresh'];
$os = strtolower(PHP_OS); $os = strtolower(PHP_OS);
if (substr($os, 0, 3) === 'win') { if (substr($os, 0, 3) === 'win') {
$os = 'windows'; $os = 'windows';
} }
switch($graph) {
case 'cpu_load': switch ($graph) {
if ( $os == 'windows') case 'cpu_load':
$data = exec('wmic cpu get loadpercentage|find /I /V "Loadpercentage" | findstr /r "[0-9]" '); if ($os == 'windows') {
else $data = exec('wmic cpu get loadpercentage|find /I /V "Loadpercentage" | findstr /r "[0-9]" ');
$data = exec("top -bn 2 -d 0.01 | grep '^Cpu' | tail -n 1 | awk '{ print $2+$4+$6 }'"); } else {
break; $data = exec("top -bn 2 -d 0.01 | grep '^Cpu' | tail -n 1 | awk '{ print $2+$4+$6 }'");
case 'pending_packets': }
$data = exec("ls /var/spool/pandora/data_in/*.data | wc -l"); break;
break;
case 'disk_io_wait': case 'pending_packets':
if ( $os == 'windows') $data = exec('ls /var/spool/pandora/data_in/*.data | wc -l');
$data = exec("vmstat 1 3 | tail -1 | awk '{ print $16 }'"); break;
else
$data = exec("vmstat 1 3 | tail -1 | awk '{ print $16 }'"); case 'disk_io_wait':
break; if ($os == 'windows') {
case 'mysql_load': $data = exec("vmstat 1 3 | tail -1 | awk '{ print $16 }'");
if ( $os == 'windows') } else {
$data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(mysqld)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."'); $data = exec("vmstat 1 3 | tail -1 | awk '{ print $16 }'");
else }
$data = exec("ps aux | grep mysqld | grep -v safe | grep -v grep | awk '{ print $3 }'"); break;
break;
case 'apache_load': case 'mysql_load':
if ( $os == 'windows') if ($os == 'windows') {
$data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(httpd)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."'); $data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(mysqld)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."');
else } else {
$data = exec("ps aux | grep apache2 | grep -v safe | grep -v grep | awk '{ sum+=$3 } END { print sum }'"); $data = exec("ps aux | grep mysqld | grep -v safe | grep -v grep | awk '{ print $3 }'");
break; }
case 'server_load': break;
if ( $os == 'windows')
$data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(pandora_server)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."'); case 'apache_load':
else if ($os == 'windows') {
$data = exec("ps aux | grep pandora_server | grep -v grep | awk '{ print $3 }'"); $data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(httpd)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."');
break; } else {
case 'snmp_interface': $data = exec("ps aux | grep apache2 | grep -v safe | grep -v grep | awk '{ sum+=$3 } END { print sum }'");
case 'snmp_module': }
$snmp_address = $_POST['snmp_address']; break;
$snmp_community = $_POST['snmp_community'];
$snmp_ver = $_POST['snmp_ver']; case 'server_load':
$snmp_oid = $_POST['snmp_oid']; if ($os == 'windows') {
$data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(pandora_server)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."');
if (empty($snmp_address) || empty($snmp_oid)) { } else {
$data = 0; $data = exec("ps aux | grep pandora_server | grep -v grep | awk '{ print $3 }'");
} }
else { break;
$data = get_snmpwalk($snmp_address, $snmp_ver, $snmp_community, '', '', '', '', '', '', 0, $snmp_oid);
$data_index = array_keys($data); case 'snmp_interface':
$graph_title = $data_index[0]; case 'snmp_module':
if (!empty($data)) { $snmp_address = $_POST['snmp_address'];
$data_array = explode(' ', reset($data)); $snmp_community = $_POST['snmp_community'];
if (count($data_array) > 1) { $snmp_ver = $_POST['snmp_ver'];
$data = $data_array[1]; $snmp_oid = $_POST['snmp_oid'];
}
// Redefine boolean data if (empty($snmp_address) || empty($snmp_oid)) {
switch ($data) { $data = 0;
case "up(1)": } else {
$data = 1; $data = get_snmpwalk($snmp_address, $snmp_ver, $snmp_community, '', '', '', '', '', '', 0, $snmp_oid);
break; $data_index = array_keys($data);
case "down(0)": $graph_title = $data_index[0];
$data = 0; if (!empty($data)) {
break; $data_array = explode(' ', reset($data));
} if (count($data_array) > 1) {
} $data = $data_array[1];
} }
break;
default: // Redefine boolean data
$data = 0; switch ($data) {
case 'up(1)':
$data = 1;
break;
case 'down(0)':
$data = 0;
break;
}
}
}
break;
default:
$data = 0;
} }
if (empty($data)) { if (empty($data)) {
$data = 0; $data = 0;
} }
echo '{ echo '{
"label": "' . $graph_title . '", "label": "'.$graph_title.'",
"data": [["' . time() . '", ' . $data . ']] "data": [["'.time().'", '.$data.']]
}'; }';
?>

View File

@ -1,15 +1,15 @@
#chartLegend { #chartLegend {
width: 100%; width: 100%;
position: relative; position: relative;
height: 30px; height: 30px;
} }
#chartLegend table { #chartLegend table {
position: absolute; position: absolute;
right: 0px; right: 0px;
} }
#graph_container { #graph_container {
width: 800px; width: 800px;
margin: 20px auto !important; margin: 20px auto !important;
} }

View File

@ -1,210 +1,218 @@
(function () { (function() {
var numberOfPoints = 100; var numberOfPoints = 100;
var refresh = parseInt($('#refresh').val()); var refresh = parseInt($("#refresh").val());
var incremental = $('#checkbox-incremental').is(':checked') || $('#hidden-incremental').val() == 1; var incremental =
var lastIncVal = null; $("#checkbox-incremental").is(":checked") ||
var intervalRef = null; $("#hidden-incremental").val() == 1;
var currentXHR = null; var lastIncVal = null;
var intervalRef = null;
var currentXHR = null;
var plot; var plot;
var plotOptions = { var plotOptions = {
legend: { container: $("#chartLegend") }, legend: { container: $("#chartLegend") },
xaxis: { xaxis: {
tickFormatter: function (timestamp, axis) { tickFormatter: function(timestamp, axis) {
var date = new Date(timestamp * 1000); var date = new Date(timestamp * 1000);
var server_timezone_offset = get_php_value('timezone_offset');
var local_timezone_offset = date.getTimezoneOffset()*60*-1;
if (server_timezone_offset != local_timezone_offset) {
// If timezone of server and client is different, adjust the time to the server
date = new Date((timestamp + (server_timezone_offset - local_timezone_offset)) * 1000);
}
var hours = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours());
var minutes = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
var seconds = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
var formattedTime = hours + ':' + minutes + ':' + seconds;
return formattedTime;
}
},
yaxis: {
tickFormatter: function (value, axis) {
return shortNumber(roundToTwo(value)) ;
}
},
series: {
lines: {
lineWidth: 2,
fill: true
}
},
colors: ['#6db431']
};
function updatePlot (data) { var server_timezone_offset = get_php_value("timezone_offset");
plot = $.plot($('.graph'), data, plotOptions); var local_timezone_offset = date.getTimezoneOffset() * 60 * -1;
}
function requestData () { if (server_timezone_offset != local_timezone_offset) {
var rel_path = $("#hidden-rel_path").val(); // If timezone of server and client is different, adjust the time to the server
date = new Date(
(timestamp + (server_timezone_offset - local_timezone_offset)) *
1000
);
}
currentXHR = $.ajax({ var hours =
url: rel_path + "extensions/realtime_graphs/ajax.php", date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
type: "POST", var minutes =
dataType: "json", date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
data: { var seconds =
graph: $('#graph :selected').val(), date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
graph_title: $('#graph :selected').html(), var formattedTime = hours + ":" + minutes + ":" + seconds;
snmp_community: $('#text-snmp_community').val(), return formattedTime;
snmp_oid: $('#text-snmp_oid').val(), }
snmp_ver: $('#snmp_version :selected').val(), },
snmp_address: $('#text-ip_target').val(), yaxis: {
refresh: refresh tickFormatter: function(value, axis) {
}, return shortNumber(roundToTwo(value));
success: function (serie) { }
var timestamp = serie.data[0][0]; },
var data = plot.getData(); series: {
lines: {
if (incremental) { lineWidth: 2,
var currentVal = serie.data[0][1]; fill: true
// Try to avoid the first value, cause we need at least two values to get the increment }
serie.data[0][1] = lastIncVal == null ? 0 : currentVal - lastIncVal; },
// Incremental is always positive colors: ["#6db431"]
if (serie.data[0][1] < 0) serie.data[0][1] = 0; };
// Store the current value to use it into the next request
lastIncVal = currentVal;
}
if (data.length === 0) {
for (i = 0; i < numberOfPoints; i++) {
var step = i * (refresh / 1000);
serie.data.unshift([timestamp - step, 0]);
}
serie = [serie];
updatePlot(serie);
return;
}
data[0].label = serie.label; function updatePlot(data) {
if (data[0].data.length >= numberOfPoints) { plot = $.plot($(".graph"), data, plotOptions);
data[0].data.shift(); }
}
data[0].data.push(serie.data[0]);
updatePlot(data);
}
});
}
function startDataPooling () {
intervalRef = window.setInterval(requestData, refresh);
}
function resetDataPooling () { function requestData() {
if (currentXHR !== null) currentXHR.abort(); var rel_path = $("#hidden-rel_path").val();
// Stop and start the interval
window.clearInterval(intervalRef);
startDataPooling();
}
function clearGraph () { currentXHR = $.ajax({
var data = plot.getData(); url: rel_path + "extensions/realtime_graphs/ajax.php",
if (data.length === 0) return; type: "POST",
dataType: "json",
data: {
graph: $("#graph :selected").val(),
graph_title: $("#graph :selected").html(),
snmp_community: $("#text-snmp_community").val(),
snmp_oid: $("#text-snmp_oid").val(),
snmp_ver: $("#snmp_version :selected").val(),
snmp_address: $("#text-ip_target").val(),
refresh: refresh
},
success: function(serie) {
var timestamp = serie.data[0][0];
var data = plot.getData();
for (i = 0; i < data[0].data.length; i ++) { if (incremental) {
data[0].data[i][1] = 0; var currentVal = serie.data[0][1];
} // Try to avoid the first value, cause we need at least two values to get the increment
if (incremental) lastIncVal = null; serie.data[0][1] = lastIncVal == null ? 0 : currentVal - lastIncVal;
// Incremental is always positive
updatePlot(data); if (serie.data[0][1] < 0) serie.data[0][1] = 0;
// Store the current value to use it into the next request
lastIncVal = currentVal;
}
resetDataPooling(); if (data.length === 0) {
} for (i = 0; i < numberOfPoints; i++) {
var step = i * (refresh / 1000);
serie.data.unshift([timestamp - step, 0]);
}
// Set the form OID to the value selected in the SNMP browser serie = [serie];
function setOID () { updatePlot(serie);
if ($('#snmp_browser_version').val() == '3') { return;
$('#text-snmp_oid').val($('#table1-0-1').text()); }
} else {
$('#text-snmp_oid').val($('#snmp_selected_oid').text());
}
// Close the SNMP browser
$('.ui-dialog-titlebar-close').trigger('click');
}
// Show the SNMP browser window data[0].label = serie.label;
function snmpBrowserWindow () { if (data[0].data.length >= numberOfPoints) {
data[0].data.shift();
// Keep elements in the form and the SNMP browser synced }
$('#text-target_ip').val($('#text-ip_target').val());
$('#text-community').val($('#text-snmp_community').val());
$('#snmp_browser_version').val($('#snmp_version').val());
$('#snmp3_browser_auth_user').val($('#snmp3_auth_user').val());
$('#snmp3_browser_security_level').val($('#snmp3_security_level').val());
$('#snmp3_browser_auth_method').val($('#snmp3_auth_method').val());
$('#snmp3_browser_auth_pass').val($('#snmp3_auth_pass').val());
$('#snmp3_browser_privacy_method').val($('#snmp3_privacy_method').val());
$('#snmp3_browser_privacy_pass').val($('#snmp3_privacy_pass').val());
$("#snmp_browser_container").show().dialog ({
title: '',
resizable: true,
draggable: true,
modal: true,
overlay: {
opacity: 0.5,
background: "black"
},
width: 920,
height: 500
});
}
function shortNumber (number) { data[0].data.push(serie.data[0]);
if (Math.round(number) != number) return number; updatePlot(data);
number = Number.parseInt(number); }
if (Number.isNaN(number)) return number; });
}
var shorts = ["", "K", "M", "G", "T", "P", "E", "Z", "Y"]; function startDataPooling() {
var pos = 0; intervalRef = window.setInterval(requestData, refresh);
}
while (number >= 1000 || number <= -1000) { function resetDataPooling() {
pos++; if (currentXHR !== null) currentXHR.abort();
number = number / 1000; // Stop and start the interval
} window.clearInterval(intervalRef);
startDataPooling();
}
return number + " " + shorts[pos]; function clearGraph() {
} var data = plot.getData();
function roundToTwo(num) { if (data.length === 0) return;
return +(Math.round(num + "e+2") + "e-2");
}
$('#graph').change(function() { for (i = 0; i < data[0].data.length; i++) {
$('form#realgraph').submit(); data[0].data[i][1] = 0;
}); }
if (incremental) lastIncVal = null;
$('#refresh').change(function () { updatePlot(data);
refresh = parseInt($('#refresh').val());
resetDataPooling();
});
$('#checkbox-incremental').change(function() { resetDataPooling();
incremental = $('#checkbox-incremental').is(':checked'); }
clearGraph();
});
updatePlot([]); // Set the form OID to the value selected in the SNMP browser
requestData(); function setOID() {
startDataPooling(); if ($("#snmp_browser_version").val() == "3") {
$("#text-snmp_oid").val($("#table1-0-1").text());
} else {
$("#text-snmp_oid").val($("#snmp_selected_oid").text());
}
// Expose this functions // Close the SNMP browser
window.realtimeGraphs = { $(".ui-dialog-titlebar-close").trigger("click");
clearGraph: clearGraph, }
setOID: setOID,
snmpBrowserWindow: snmpBrowserWindow
}
})(); // Show the SNMP browser window
function snmpBrowserWindow() {
// Keep elements in the form and the SNMP browser synced
$("#text-target_ip").val($("#text-ip_target").val());
$("#text-community").val($("#text-snmp_community").val());
$("#snmp_browser_version").val($("#snmp_version").val());
$("#snmp3_browser_auth_user").val($("#snmp3_auth_user").val());
$("#snmp3_browser_security_level").val($("#snmp3_security_level").val());
$("#snmp3_browser_auth_method").val($("#snmp3_auth_method").val());
$("#snmp3_browser_auth_pass").val($("#snmp3_auth_pass").val());
$("#snmp3_browser_privacy_method").val($("#snmp3_privacy_method").val());
$("#snmp3_browser_privacy_pass").val($("#snmp3_privacy_pass").val());
$("#snmp_browser_container")
.show()
.dialog({
title: "",
resizable: true,
draggable: true,
modal: true,
overlay: {
opacity: 0.5,
background: "black"
},
width: 920,
height: 500
});
}
function shortNumber(number) {
if (Math.round(number) != number) return number;
number = Number.parseInt(number);
if (Number.isNaN(number)) return number;
var shorts = ["", "K", "M", "G", "T", "P", "E", "Z", "Y"];
var pos = 0;
while (number >= 1000 || number <= -1000) {
pos++;
number = number / 1000;
}
return number + " " + shorts[pos];
}
function roundToTwo(num) {
return +(Math.round(num + "e+2") + "e-2");
}
$("#graph").change(function() {
$("form#realgraph").submit();
});
$("#refresh").change(function() {
refresh = parseInt($("#refresh").val());
resetDataPooling();
});
$("#checkbox-incremental").change(function() {
incremental = $("#checkbox-incremental").is(":checked");
clearGraph();
});
updatePlot([]);
requestData();
startDataPooling();
// Expose this functions
window.realtimeGraphs = {
clearGraph: clearGraph,
setOID: setOID,
snmpBrowserWindow: snmpBrowserWindow
};
})();

View File

@ -4,402 +4,466 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
if (isset($_GET['get_ptr'])) { if (isset($_GET['get_ptr'])) {
if ($_GET['get_ptr'] == 1) { if ($_GET['get_ptr'] == 1) {
$ownDir = dirname(__FILE__).'/';
$ownDir = str_replace('\\', '/', $ownDir);
$ownDir = dirname(__FILE__) . '/'; // Don't start a session before this import.
$ownDir = str_replace("\\", "/", $ownDir); // The session is configured and started inside the config process.
include_once $ownDir.'../include/config.php';
// Don't start a session before this import. // Login check
// The session is configured and started inside the config process. if (!isset($_SESSION['id_usuario'])) {
require_once ($ownDir.'../include/config.php'); $config['id_user'] = null;
} else {
$config['id_user'] = $_SESSION['id_usuario'];
}
// Login check
if (!isset($_SESSION["id_usuario"])) { if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
$config['id_user'] = null; db_pandora_audit('ACL Violation', 'Trying to access Setup Management');
} include 'general/noaccess.php';
else { return;
$config['id_user'] = $_SESSION["id_usuario"]; }
}
$hook_enterprise = enterprise_include('extensions/resource_exportation/functions.php');
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { header('Content-type: binary');
db_pandora_audit("ACL Violation", "Trying to access Setup Management"); header('Content-Disposition: attachment; filename="'.get_name_xml_resource($hook_enterprise)).'"';
require ("general/noaccess.php"); header('Pragma: no-cache');
return; header('Expires: 0');
}
output_xml_resource($hook_enterprise);
$hook_enterprise = enterprise_include ('extensions/resource_exportation/functions.php'); }
} else {
header("Content-type: binary"); extensions_add_godmode_menu_option(__('Resource exportation'), 'PM', 'gagente', '', 'v1r1');
header("Content-Disposition: attachment; filename=\"".get_name_xml_resource($hook_enterprise)) . "\""; extensions_add_godmode_function('resource_exportation_extension_main');
header("Pragma: no-cache");
header("Expires: 0");
output_xml_resource($hook_enterprise);
}
}
else {
extensions_add_godmode_menu_option (__('Resource exportation'), 'PM','gagente','', "v1r1");
extensions_add_godmode_function('resource_exportation_extension_main');
} }
function output_xml_resource($hook_enterprise) {
global $config; function output_xml_resource($hook_enterprise)
{
$type = get_parameter('type'); global $config;
$id = (int)get_parameter('id');
$type = get_parameter('type');
switch ($type) { $id = (int) get_parameter('id');
case 'report':
output_xml_report($id); switch ($type) {
break; case 'report':
case 'visual_console': output_xml_report($id);
output_xml_visual_console($id); break;
break;
default: case 'visual_console':
if ($hook_enterprise === true) { output_xml_visual_console($id);
$include_agents = get_parameter('include_agents', 0); break;
return enterprise_output_xml_resource($type, $id, $include_agents);
} default:
break; if ($hook_enterprise === true) {
} $include_agents = get_parameter('include_agents', 0);
return enterprise_output_xml_resource($type, $id, $include_agents);
}
break;
}
} }
function output_xml_report($id) {
global $config; function output_xml_report($id)
{
require_once ($config['homedir'].'/include/functions_agents.php'); global $config;
$report = db_get_row('treport', 'id_report', $id); include_once $config['homedir'].'/include/functions_agents.php';
echo '<?xml version="1.0" encoding="UTF-8" ?>' . "\n"; $report = db_get_row('treport', 'id_report', $id);
echo "<report>\n";
echo "<name><![CDATA[" . io_safe_output($report['name']) . "]]></name>\n"; echo '<?xml version="1.0" encoding="UTF-8" ?>'."\n";
if (isset($report['description'])) echo "<report>\n";
echo "<description><![CDATA[" . io_safe_output($report['description']) . "]]></description>\n"; echo '<name><![CDATA['.io_safe_output($report['name'])."]]></name>\n";
$group = db_get_value('nombre', 'tgrupo', 'id_grupo', $report['id_group']); if (isset($report['description'])) {
echo "<group><![CDATA[" . io_safe_output($group) . "]]></group>\n"; echo '<description><![CDATA['.io_safe_output($report['description'])."]]></description>\n";
$items = db_get_all_rows_field_filter('treport_content', 'id_report', $report['id_report']); }
foreach ($items as $item) {
echo "<item>\n"; $group = db_get_value('nombre', 'tgrupo', 'id_grupo', $report['id_group']);
echo "<type>" . io_safe_output($item['type']) . "</type>\n"; echo '<group><![CDATA['.io_safe_output($group)."]]></group>\n";
echo "<description>" . io_safe_output($item['description']) . "</description>\n"; $items = db_get_all_rows_field_filter('treport_content', 'id_report', $report['id_report']);
echo "<period>" . io_safe_output($item['period']) . "</period>\n"; foreach ($items as $item) {
if ($item['id_agent'] != 0) { echo "<item>\n";
$agent = db_get_value ("alias","tagente","id_agente",$item['id_agent']); echo '<type>'.io_safe_output($item['type'])."</type>\n";
} echo '<description>'.io_safe_output($item['description'])."</description>\n";
if ($item['id_agent_module'] != 0) { echo '<period>'.io_safe_output($item['period'])."</period>\n";
$module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $item['id_agent_module']); if ($item['id_agent'] != 0) {
$id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $item['id_agent_module']); $agent = db_get_value('alias', 'tagente', 'id_agente', $item['id_agent']);
$agent = db_get_value ("alias","tagente","id_agente",$item['id_agent']); }
echo "<module><![CDATA[" . io_safe_output($module) . "]]></module>\n"; if ($item['id_agent_module'] != 0) {
} $module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $item['id_agent_module']);
if (isset($agent)) $id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $item['id_agent_module']);
echo "<agent><![CDATA[" . $agent . "]]></agent>\n"; $agent = db_get_value('alias', 'tagente', 'id_agente', $item['id_agent']);
$agent = null;
switch (io_safe_output($item['type'])) { echo '<module><![CDATA['.io_safe_output($module)."]]></module>\n";
case 1: }
case 'simple_graph':
break; if (isset($agent)) {
case 'simple_baseline_graph': echo '<agent><![CDATA['.$agent."]]></agent>\n";
break; }
case 2:
case 'custom_graph': $agent = null;
case 'automatic_custom_graph': switch (io_safe_output($item['type'])) {
$graph = db_get_value('name', 'tgraph', 'id_graph', $item['id_gs']); case 1:
echo "<graph><![CDATA[" . io_safe_output($graph) . "]]></graph>\n"; case 'simple_graph':
break; break;
case 3:
case 'SLA': case 'simple_baseline_graph':
echo "<only_display_wrong>" . $item['only_display_wrong'] . "</only_display_wrong>\n"; break;
echo "<monday>" . $item['monday'] . "</monday>\n";
echo "<tuesday>" . $item['tuesday'] . "</tuesday>\n"; case 2:
echo "<wednesday>" . $item['wednesday'] . "</wednesday>\n"; case 'custom_graph':
echo "<thursday>" . $item['thursday'] . "</thursday>\n"; case 'automatic_custom_graph':
echo "<friday>" . $item['friday'] . "</friday>\n"; $graph = db_get_value('name', 'tgraph', 'id_graph', $item['id_gs']);
echo "<saturday>" . $item['saturday'] . "</saturday>\n"; echo '<graph><![CDATA['.io_safe_output($graph)."]]></graph>\n";
echo "<sunday>" . $item['sunday'] . "</sunday>\n"; break;
echo "<time_from>" . $item['time_from'] . "</time_from>\n";
echo "<time_to>" . $item['time_to'] . "</time_to>\n"; case 3:
case 'SLA':
$slas = db_get_all_rows_field_filter('treport_content_sla_combined', 'id_report_content', $item['id_rc']); echo '<only_display_wrong>'.$item['only_display_wrong']."</only_display_wrong>\n";
if ($slas === false) $slas = array(); echo '<monday>'.$item['monday']."</monday>\n";
echo '<tuesday>'.$item['tuesday']."</tuesday>\n";
foreach ($slas as $sla) { echo '<wednesday>'.$item['wednesday']."</wednesday>\n";
$module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $sla['id_agent_module']); echo '<thursday>'.$item['thursday']."</thursday>\n";
$id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $sla['id_agent_module']); echo '<friday>'.$item['friday']."</friday>\n";
$agent = db_get_value ("alias","tagente","id_agente",$item['id_agent']); echo '<saturday>'.$item['saturday']."</saturday>\n";
echo "<sla>"; echo '<sunday>'.$item['sunday']."</sunday>\n";
echo "<agent><![CDATA[" . $agent . "]]></agent>\n"; echo '<time_from>'.$item['time_from']."</time_from>\n";
echo "<module><![CDATA[" . io_safe_output($module) . "]]></module>\n"; echo '<time_to>'.$item['time_to']."</time_to>\n";
echo "<sla_max>" . $sla['sla_max'] . "</sla_max>\n";
echo "<sla_min>" . $sla['sla_min'] . "</sla_min>\n"; $slas = db_get_all_rows_field_filter('treport_content_sla_combined', 'id_report_content', $item['id_rc']);
echo "<sla_limit>" . $sla['sla_limit'] . "</sla_limit>\n"; if ($slas === false) {
echo "</sla>"; $slas = [];
} }
break;
case 6: foreach ($slas as $sla) {
case 'monitor_report': $module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $sla['id_agent_module']);
break; $id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $sla['id_agent_module']);
case 7: $agent = db_get_value('alias', 'tagente', 'id_agente', $item['id_agent']);
case 'avg_value': echo '<sla>';
break; echo '<agent><![CDATA['.$agent."]]></agent>\n";
case 8: echo '<module><![CDATA['.io_safe_output($module)."]]></module>\n";
case 'max_value': echo '<sla_max>'.$sla['sla_max']."</sla_max>\n";
break; echo '<sla_min>'.$sla['sla_min']."</sla_min>\n";
case 9: echo '<sla_limit>'.$sla['sla_limit']."</sla_limit>\n";
case 'min_value': echo '</sla>';
break; }
case 10: break;
case 'sumatory':
break; case 6:
case 'agent_detailed_event': case 'monitor_report':
case 'event_report_agent': break;
break;
case 'text': case 7:
echo "<text><![CDATA[" . io_safe_output($item['text']) . "]]></text>\n"; case 'avg_value':
break; break;
case 'sql':
echo "<header_definition><![CDATA[" . io_safe_output($item['header_definition']) . "]]></header_definition>\n"; case 8:
if (!empty($item['external_source'])) { case 'max_value':
echo "<sql><![CDATA[" . io_safe_output($item['external_source']) . "]]></sql>\n"; break;
}
else { case 9:
$sql = db_get_value('sql', 'treport_custom_sql', 'id', $item['treport_custom_sql_id']); case 'min_value':
echo "<sql>" . io_safe_output($sql) . "</sql>\n"; break;
}
break; case 10:
case 'sql_graph_pie': case 'sumatory':
case 'sql_graph_vbar': break;
case 'sql_graph_hbar':
echo "<header_definition>" . io_safe_output($item['header_definition']) . "</header_definition>\n"; case 'agent_detailed_event':
if (!empty($item['external_source'])) { case 'event_report_agent':
echo "<sql>" . io_safe_output($item['external_source']) . "</sql>\n"; break;
}
else { case 'text':
$sql = db_get_value('sql', 'treport_custom_sql', 'id', $item['treport_custom_sql_id']); echo '<text><![CDATA['.io_safe_output($item['text'])."]]></text>\n";
echo "<sql>" . io_safe_output($sql) . "</sql>\n"; break;
}
break; case 'sql':
case 'event_report_group': echo '<header_definition><![CDATA['.io_safe_output($item['header_definition'])."]]></header_definition>\n";
$group = db_get_value('nombre', 'tgrupo', 'id_grupo', $item['id_agent']); if (!empty($item['external_source'])) {
echo "<group><![CDATA[" . io_safe_output($group) . "]]></group>\n"; echo '<sql><![CDATA['.io_safe_output($item['external_source'])."]]></sql>\n";
break; } else {
case 'event_report_module': $sql = db_get_value('sql', 'treport_custom_sql', 'id', $item['treport_custom_sql_id']);
break; echo '<sql>'.io_safe_output($sql)."</sql>\n";
case 'alert_report_module': }
break; break;
case 'alert_report_agent':
break; case 'sql_graph_pie':
case 'alert_report_group': case 'sql_graph_vbar':
break; case 'sql_graph_hbar':
case 'url': echo '<header_definition>'.io_safe_output($item['header_definition'])."</header_definition>\n";
echo "<url><![CDATA[" . io_safe_output($values["external_source"]) . "]]></url>"; if (!empty($item['external_source'])) {
break; echo '<sql>'.io_safe_output($item['external_source'])."</sql>\n";
case 'database_serialized': } else {
echo "<header_definition><![CDATA[" . io_safe_output($item["header_definition"]) . "]]></header_definition>"; $sql = db_get_value('sql', 'treport_custom_sql', 'id', $item['treport_custom_sql_id']);
echo "<line_separator><![CDATA[" . io_safe_output($item["line_separator"]) . "]]></line_separator>"; echo '<sql>'.io_safe_output($sql)."</sql>\n";
echo "<column_separator><![CDATA[" . io_safe_output($item["header_definition"]) . "]]></column_separator>"; }
break; break;
case 'TTRT':
break; case 'event_report_group':
case 'TTO': $group = db_get_value('nombre', 'tgrupo', 'id_grupo', $item['id_agent']);
break; echo '<group><![CDATA['.io_safe_output($group)."]]></group>\n";
case 'MTBF': break;
break;
case 'MTTR': case 'event_report_module':
break; break;
}
echo "</item>\n"; case 'alert_report_module':
} break;
echo "</report>\n";
case 'alert_report_agent':
break;
case 'alert_report_group':
break;
case 'url':
echo '<url><![CDATA['.io_safe_output($values['external_source']).']]></url>';
break;
case 'database_serialized':
echo '<header_definition><![CDATA['.io_safe_output($item['header_definition']).']]></header_definition>';
echo '<line_separator><![CDATA['.io_safe_output($item['line_separator']).']]></line_separator>';
echo '<column_separator><![CDATA['.io_safe_output($item['header_definition']).']]></column_separator>';
break;
case 'TTRT':
break;
case 'TTO':
break;
case 'MTBF':
break;
case 'MTTR':
break;
}
echo "</item>\n";
}
echo "</report>\n";
} }
function output_xml_visual_console($id) {
$visual_map = db_get_row('tlayout', 'id', $id); function output_xml_visual_console($id)
{
echo '<?xml version="1.0" encoding="UTF-8" ?>' . "\n"; $visual_map = db_get_row('tlayout', 'id', $id);
echo "<visual_map>\n";
echo "<name><![CDATA[" . io_safe_output($visual_map['name']) . "]]></name>\n"; echo '<?xml version="1.0" encoding="UTF-8" ?>'."\n";
if ($visual_map['id_group'] != 0) { echo "<visual_map>\n";
$group = db_get_value('nombre', 'tgrupo', 'id_grupo', $visual_map['id_group']); echo '<name><![CDATA['.io_safe_output($visual_map['name'])."]]></name>\n";
echo "<group><![CDATA[" . io_safe_output($group) . "]]></group>\n"; if ($visual_map['id_group'] != 0) {
} $group = db_get_value('nombre', 'tgrupo', 'id_grupo', $visual_map['id_group']);
echo "<background><![CDATA[" . io_safe_output($visual_map['background']) . "]]></background>\n"; echo '<group><![CDATA['.io_safe_output($group)."]]></group>\n";
echo "<height>" . io_safe_output($visual_map['height']) . "</height>\n"; }
echo "<width>" . io_safe_output($visual_map['width']) . "</width>\n";
$items = db_get_all_rows_field_filter('tlayout_data', 'id_layout', $visual_map['id']); echo '<background><![CDATA['.io_safe_output($visual_map['background'])."]]></background>\n";
if ($items === false) $items = array(); echo '<height>'.io_safe_output($visual_map['height'])."</height>\n";
foreach ($items as $item) { echo '<width>'.io_safe_output($visual_map['width'])."</width>\n";
echo "<item>\n"; $items = db_get_all_rows_field_filter('tlayout_data', 'id_layout', $visual_map['id']);
echo "<other_id>" . $item['id'] . "</other_id>\n"; //OLD ID USE FOR parent item if ($items === false) {
$agent = ''; $items = [];
if ($item['id_agent'] != 0) { }
$agent = db_get_value ("nombre","tagente","id_agente",$item['id_agent']);
} foreach ($items as $item) {
if (!empty($item['label'])) { echo "<item>\n";
echo "<label><![CDATA[" . io_safe_output($item['label']) . "]]></label>\n"; echo '<other_id>'.$item['id']."</other_id>\n";
} // OLD ID USE FOR parent item
echo "<x>" . $item['pos_x'] . "</x>\n"; $agent = '';
echo "<y>" . $item['pos_y'] . "</y>\n"; if ($item['id_agent'] != 0) {
echo "<type>" . $item['type'] . "</type>\n"; $agent = db_get_value('nombre', 'tagente', 'id_agente', $item['id_agent']);
if ($item['width'] != 0) { }
echo "<width>" . $item['width'] . "</width>\n";
} if (!empty($item['label'])) {
if ($item['height'] != 0) { echo '<label><![CDATA['.io_safe_output($item['label'])."]]></label>\n";
echo "<height>" . $item['height'] . "</height>\n"; }
}
if (!empty($item['image'])) { echo '<x>'.$item['pos_x']."</x>\n";
echo "<image>" . $item['image'] . "</image>\n"; echo '<y>'.$item['pos_y']."</y>\n";
} echo '<type>'.$item['type']."</type>\n";
if ($item['period'] != 0) { if ($item['width'] != 0) {
echo "<period>" . $item['period'] . "</period>\n"; echo '<width>'.$item['width']."</width>\n";
} }
if (isset($item['id_agente_modulo'])) {
if ($item['id_agente_modulo'] != 0) { if ($item['height'] != 0) {
$module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $item['id_agente_modulo']); echo '<height>'.$item['height']."</height>\n";
$id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $item['id_agente_modulo']); }
$agent = db_get_value ("nombre","tagente","id_agente",$id_agent);
if (!empty($item['image'])) {
echo "<module><![CDATA[" . io_safe_output($module) . "]]></module>\n"; echo '<image>'.$item['image']."</image>\n";
} }
}
if (!empty($agent)) { if ($item['period'] != 0) {
echo "<agent><![CDATA[" . $agent . "]]></agent>\n"; echo '<period>'.$item['period']."</period>\n";
} }
if ($item['id_layout_linked'] != 0) {
echo "<id_layout_linked>" . $item['id_layout_linked'] . "</id_layout_linked>\n"; if (isset($item['id_agente_modulo'])) {
} if ($item['id_agente_modulo'] != 0) {
if ($item['parent_item'] != 0) { $module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $item['id_agente_modulo']);
echo "<parent_item>" . $item['parent_item'] . "</parent_item>\n"; $id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $item['id_agente_modulo']);
} $agent = db_get_value('nombre', 'tagente', 'id_agente', $id_agent);
if (!empty($item['clock_animation'])) {
echo "<clock_animation>" . $item['clock_animation'] . "</clock_animation>\n"; echo '<module><![CDATA['.io_safe_output($module)."]]></module>\n";
} }
if (!empty($item['fill_color'])) { }
echo "<fill_color>" . $item['fill_color'] . "</fill_color>\n";
} if (!empty($agent)) {
if (!empty($item['type_graph'])) { echo '<agent><![CDATA['.$agent."]]></agent>\n";
echo "<type_graph>" . $item['type_graph'] . "</type_graph>\n"; }
}
if (!empty($item['time_format'])) { if ($item['id_layout_linked'] != 0) {
echo "<time_format>" . $item['time_format'] . "</time_format>\n"; echo '<id_layout_linked>'.$item['id_layout_linked']."</id_layout_linked>\n";
} }
if (!empty($item['timezone'])) {
echo "<timezone>" . $item['timezone'] . "</timezone>\n"; if ($item['parent_item'] != 0) {
} echo '<parent_item>'.$item['parent_item']."</parent_item>\n";
if (!empty($item['border_width'])) { }
echo "<border_width>" . $item['border_width'] . "</border_width>\n";
} if (!empty($item['clock_animation'])) {
if (!empty($item['border_color'])) { echo '<clock_animation>'.$item['clock_animation']."</clock_animation>\n";
echo "<border_color>" . $item['border_color'] . "</border_color>\n"; }
}
echo "</item>\n"; if (!empty($item['fill_color'])) {
} echo '<fill_color>'.$item['fill_color']."</fill_color>\n";
echo "</visual_map>\n"; }
if (!empty($item['type_graph'])) {
echo '<type_graph>'.$item['type_graph']."</type_graph>\n";
}
if (!empty($item['time_format'])) {
echo '<time_format>'.$item['time_format']."</time_format>\n";
}
if (!empty($item['timezone'])) {
echo '<timezone>'.$item['timezone']."</timezone>\n";
}
if (!empty($item['border_width'])) {
echo '<border_width>'.$item['border_width']."</border_width>\n";
}
if (!empty($item['border_color'])) {
echo '<border_color>'.$item['border_color']."</border_color>\n";
}
echo "</item>\n";
}
echo "</visual_map>\n";
} }
function get_name_xml_resource($hook_enterprise) {
global $config; function get_name_xml_resource($hook_enterprise)
{
$type = get_parameter('type'); global $config;
$id = (int)get_parameter('id');
$type = get_parameter('type');
switch ($type) { $id = (int) get_parameter('id');
case 'report':
$name = db_get_value('name', 'treport', 'id_report', $id); switch ($type) {
break; case 'report':
case 'visual_console': $name = db_get_value('name', 'treport', 'id_report', $id);
$name = db_get_value('name', 'tlayout', 'id', $id); break;
break;
default: case 'visual_console':
if ($hook_enterprise === true) $name = db_get_value('name', 'tlayout', 'id', $id);
return enterprise_get_name_xml_resource($type, $id); break;
break;
} default:
if ($hook_enterprise === true) {
$file = $name . ".ptr"; return enterprise_get_name_xml_resource($type, $id);
}
return $file; break;
}
$file = $name.'.ptr';
return $file;
} }
function get_xml_resource() {
global $config; function get_xml_resource()
{
$hook_enterprise = enterprise_include ('extensions/resource_exportation/functions.php'); global $config;
$hook_enterprise = enterprise_include('extensions/resource_exportation/functions.php');
} }
function resource_exportation_extension_main() {
global $config;
check_login();
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
db_pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;
}
$hook_enterprise = enterprise_include ('extensions/resource_exportation/functions.php');
ui_print_page_header (__('Resource exportation'), "images/extensions.png", false, "", true, "" ); function resource_exportation_extension_main()
{
echo "<div class=notify>"; global $config;
echo __("This extension makes exportation of resource template more easy.") .
" " .
__("You can export resource templates in .ptr format.");
echo "</div>";
echo "<br /><br />";
$table = null;
$table->width = '100%';
$table->style[0] = 'width: 30%;';
$table->style[1] = 'width: 10%;';
$table->class = "databox filters";
$table->data[0][0] = __('Report');
$table->data[0][1] = html_print_select_from_sql('SELECT id_report, name FROM treport', 'report', '', '', '', 0, true);
$table->data[0][2] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'report\');', 'class="sub config"', true);
$table->data[1][0] = __('Visual console');
$table->data[1][1] = html_print_select_from_sql('SELECT id, name FROM tlayout', 'visual_console', '', '', '', 0, true);
$table->data[1][2] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'visual_console\');', 'class="sub config"', true);
if ($hook_enterprise === true)
add_rows_for_enterprise($table->data);
html_print_table($table);
?>
<script type="text/javascript">
function export_to_ptr(type) {
id = $("select#" + type + " option:selected").val();
url = location.href.split('index');
if (type == "policy") {
var include_agents = $("#checkbox-export_agents").prop("checked")
url = url[0] + 'extensions/resource_exportation.php?get_ptr=1&type=' + type
+ '&id=' + id + '&include_agents=' + include_agents;
}
else {
url = url[0] + 'extensions/resource_exportation.php?get_ptr=1&type=' + type
+ '&id=' + id;
}
location.href=url; check_login();
}
</script> if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
<?php db_pandora_audit('ACL Violation', 'Trying to access Setup Management');
include 'general/noaccess.php';
return;
}
$hook_enterprise = enterprise_include('extensions/resource_exportation/functions.php');
ui_print_page_header(__('Resource exportation'), 'images/extensions.png', false, '', true, '');
echo '<div class=notify>';
echo __('This extension makes exportation of resource template more easy.').' '.__('You can export resource templates in .ptr format.');
echo '</div>';
echo '<br /><br />';
$table = null;
$table->width = '100%';
$table->style[0] = 'width: 30%;';
$table->style[1] = 'width: 10%;';
$table->class = 'databox filters';
$table->data[0][0] = __('Report');
$table->data[0][1] = html_print_select_from_sql('SELECT id_report, name FROM treport', 'report', '', '', '', 0, true);
$table->data[0][2] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'report\');', 'class="sub config"', true);
$table->data[1][0] = __('Visual console');
$table->data[1][1] = html_print_select_from_sql('SELECT id, name FROM tlayout', 'visual_console', '', '', '', 0, true);
$table->data[1][2] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'visual_console\');', 'class="sub config"', true);
if ($hook_enterprise === true) {
add_rows_for_enterprise($table->data);
}
html_print_table($table);
?>
<script type="text/javascript">
function export_to_ptr(type) {
id = $("select#" + type + " option:selected").val();
url = location.href.split('index');
if (type == "policy") {
var include_agents = $("#checkbox-export_agents").prop("checked")
url = url[0] + 'extensions/resource_exportation.php?get_ptr=1&type=' + type
+ '&id=' + id + '&include_agents=' + include_agents;
}
else {
url = url[0] + 'extensions/resource_exportation.php?get_ptr=1&type=' + type
+ '&id=' + id;
}
location.href=url;
}
</script>
<?php
} }
?>

File diff suppressed because it is too large Load Diff

View File

@ -4,125 +4,138 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
function users_extension_main()
function users_extension_main() { {
users_extension_main_god(false); users_extension_main_god(false);
} }
function users_extension_main_god ($god = true) {
global $config; function users_extension_main_god($god=true)
{
if (isset($config["id_user"])) { global $config;
if (!check_acl ($config["id_user"], 0, "UM")) {
return; if (isset($config['id_user'])) {
} if (!check_acl($config['id_user'], 0, 'UM')) {
} return;
}
if ($god) { }
$image = "images/gm_users.png";
} if ($god) {
else { $image = 'images/gm_users.png';
$image = "images/op_workspace.png"; } else {
} $image = 'images/op_workspace.png';
}
// Header
ui_print_page_header (__("Users connected"), $image, false, "", $god); // Header
ui_print_page_header(__('Users connected'), $image, false, '', $god);
// Get user conected last 5 minutes
switch ($config["dbtype"]) { // Get user conected last 5 minutes
case "mysql": switch ($config['dbtype']) {
$sql = "SELECT id_user, last_connect case 'mysql':
$sql = 'SELECT id_user, last_connect
FROM tusuario FROM tusuario
WHERE last_connect > (UNIX_TIMESTAMP(NOW()) - " . SECONDS_5MINUTES . ") WHERE last_connect > (UNIX_TIMESTAMP(NOW()) - '.SECONDS_5MINUTES.')
ORDER BY last_connect DESC"; ORDER BY last_connect DESC';
break; break;
case "postgresql":
$sql = "SELECT id_user, last_connect case 'postgresql':
$sql = "SELECT id_user, last_connect
FROM tusuario FROM tusuario
WHERE last_connect > (ceil(date_part('epoch', CURRENT_TIMESTAMP)) - " . SECONDS_5MINUTES . ") WHERE last_connect > (ceil(date_part('epoch', CURRENT_TIMESTAMP)) - ".SECONDS_5MINUTES.')
ORDER BY last_connect DESC"; ORDER BY last_connect DESC';
break; break;
case "oracle":
$sql = "SELECT id_user, last_connect case 'oracle':
$sql = "SELECT id_user, last_connect
FROM tusuario FROM tusuario
WHERE last_connect > (ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (" . SECONDS_1DAY . ")) - " . SECONDS_5MINUTES . ") WHERE last_connect > (ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (".SECONDS_1DAY.')) - '.SECONDS_5MINUTES.')
ORDER BY last_connect DESC"; ORDER BY last_connect DESC';
break; break;
} }
$rows = db_get_all_rows_sql ($sql); $rows = db_get_all_rows_sql($sql);
if (empty ($rows)) { if (empty($rows)) {
$rows = array (); $rows = [];
echo "<div class='nf'>".__('No other users connected')."</div>"; echo "<div class='nf'>".__('No other users connected').'</div>';
} } else {
else { $table->cellpadding = 4;
$table->cellpadding = 4; $table->cellspacing = 4;
$table->cellspacing = 4; $table->width = '100%';
$table->width = '100%'; $table->class = 'databox data';
$table->class = "databox data"; $table->size = [];
$table->size = array (); $table->data = [];
$table->data = array (); $table->head = [];
$table->head = array ();
$table->head[0] = __('User');
$table->head[0] = __('User'); $table->head[1] = __('IP');
$table->head[1] = __('IP'); $table->head[2] = __('Date');
$table->head[2] = __('Date');
$rowPair = true;
$rowPair = true; $iterator = 0;
$iterator = 0;
// Get data
// Get data foreach ($rows as $row) {
foreach ($rows as $row) { // Get ip_origin of the last login of the user
// Get ip_origin of the last login of the user switch ($config['dbtype']) {
switch ($config["dbtype"]) { case 'mysql':
case "mysql": case 'postgresql':
case "postgresql": $ip_origin = db_get_value_sql(
$ip_origin = db_get_value_sql(sprintf("SELECT ip_origen sprintf(
"SELECT ip_origen
FROM tsesion FROM tsesion
WHERE id_usuario = '%s' WHERE id_usuario = '%s'
AND descripcion = '" . io_safe_input('Logged in') . "' AND descripcion = '".io_safe_input('Logged in')."'
ORDER BY fecha DESC",$row["id_user"])); ORDER BY fecha DESC",
break; $row['id_user']
case "oracle": )
$ip_origin = db_get_value_sql(sprintf("SELECT ip_origen );
break;
case 'oracle':
$ip_origin = db_get_value_sql(
sprintf(
"SELECT ip_origen
FROM tsesion FROM tsesion
WHERE id_usuario = '%s' WHERE id_usuario = '%s'
AND to_char(descripcion) = '" . io_safe_input('Logged in') . "' AND to_char(descripcion) = '".io_safe_input('Logged in')."'
ORDER BY fecha DESC",$row["id_user"])); ORDER BY fecha DESC",
break; $row['id_user']
} )
);
if ($rowPair) break;
$table->rowclass[$iterator] = 'rowPair'; }
else
$table->rowclass[$iterator] = 'rowOdd'; if ($rowPair) {
$rowPair = !$rowPair; $table->rowclass[$iterator] = 'rowPair';
$iterator++; } else {
$table->rowclass[$iterator] = 'rowOdd';
$data = array (); }
$data[0] = '<a href="index.php?sec=gusuarios&amp;sec2=godmode/users/configure_user&amp;id='.$row["id_user"].'">'.$row["id_user"].'</a>';
$data[1] = $ip_origin; $rowPair = !$rowPair;
$data[2] = date($config["date_format"], $row['last_connect']); $iterator++;
array_push ($table->data, $data);
} $data = [];
$data[0] = '<a href="index.php?sec=gusuarios&amp;sec2=godmode/users/configure_user&amp;id='.$row['id_user'].'">'.$row['id_user'].'</a>';
html_print_table ($table); $data[1] = $ip_origin;
} $data[2] = date($config['date_format'], $row['last_connect']);
array_push($table->data, $data);
}
html_print_table($table);
}
} }
extensions_add_godmode_menu_option (__('Users connected'), 'UM','gusuarios',"users/icon.png", "v1r1");
extensions_add_operation_menu_option(__('Users connected'), 'workspace',"users/icon.png", "v1r1", '', "UM");
extensions_add_godmode_menu_option(__('Users connected'), 'UM', 'gusuarios', 'users/icon.png', 'v1r1');
extensions_add_operation_menu_option(__('Users connected'), 'workspace', 'users/icon.png', 'v1r1', '', 'UM');
extensions_add_godmode_function('users_extension_main_god'); extensions_add_godmode_function('users_extension_main_god');
extensions_add_main_function('users_extension_main'); extensions_add_main_function('users_extension_main');
?>

File diff suppressed because it is too large Load Diff

View File

@ -1199,13 +1199,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('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', 23); INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 24);
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');
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager'; UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
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', '730'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '731');
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tconfig_os` -- Table `tconfig_os`

View File

@ -1,15 +1,15 @@
<?php <?php
// Password estatica, se define en ambos extremos // Password estatica, se define en ambos extremos
$pwd = "sistemas"; $pwd = 'sistemas';
$user = "admin"; $user = 'admin';
$data = $user.$pwd; $data = $user.$pwd;
$data = md5($data); $data = md5($data);
echo "DEBUG md5sum $data user $user Pass $pwd<br>"; echo "DEBUG md5sum $data user $user Pass $pwd<br>";
echo '<form name=test method=post action="http://192.168.61.41/pandora_console/index.php?loginhash=auto&sec=estado&sec2=operation/agentes/estado_agente&refr=60">'; echo '<form name=test method=post action="http://192.168.61.41/pandora_console/index.php?loginhash=auto&sec=estado&sec2=operation/agentes/estado_agente&refr=60">';
echo '<input type="hidden" name="loginhash_data" value="'.$data.'">'; echo '<input type="hidden" name="loginhash_data" value="'.$data.'">';
echo '<input type="hidden" name="loginhash_user" value="' . str_rot13($user) . '">'; echo '<input type="hidden" name="loginhash_user" value="'.str_rot13($user).'">';
echo '<input type="submit">'; echo '<input type="submit">';
echo '</form>'; echo '</form>';

View File

@ -1,183 +1,190 @@
<?php <?php
/* Hello there! :) /*
Hello there! :)
We added some of what seems to be "buggy" messages to the openSource version recently. This is not to force open-source users to move to the enterprise version, this is just to inform people using Pandora FMS open source that it requires skilled people to maintain and keep it running smoothly without professional support. This does not imply open-source version is limited in any way. If you check the recently added code, it contains only warnings and messages, no limitations except one: we removed the option to add custom logo in header. In the Update Manager section, it warns about the 'danger of applying automated updates without a proper backup, remembering in the process that the Enterprise version comes with a human-tested package. Maintaining an OpenSource version with more than 500 agents is not so easy, that's why someone using a Pandora with 8000 agents should consider asking for support. It's not a joke, we know of many setups with a huge number of agents, and we hate to hear that “its becoming unstable and slow” :( We added some of what seems to be "buggy" messages to the openSource version recently. This is not to force open-source users to move to the enterprise version, this is just to inform people using Pandora FMS open source that it requires skilled people to maintain and keep it running smoothly without professional support. This does not imply open-source version is limited in any way. If you check the recently added code, it contains only warnings and messages, no limitations except one: we removed the option to add custom logo in header. In the Update Manager section, it warns about the 'danger of applying automated updates without a proper backup, remembering in the process that the Enterprise version comes with a human-tested package. Maintaining an OpenSource version with more than 500 agents is not so easy, that's why someone using a Pandora with 8000 agents should consider asking for support. It's not a joke, we know of many setups with a huge number of agents, and we hate to hear that “its becoming unstable and slow” :(
You can of course remove the warnings, that's why we include the source and do not use any kind of trick. And that's why we added here this comment, to let you know this does not reflect any change in our opensource mentality of does the last 14 years. You can of course remove the warnings, that's why we include the source and do not use any kind of trick. And that's why we added here this comment, to let you know this does not reflect any change in our opensource mentality of does the last 14 years.
*/ */
if(check_login()){ if (check_login()) {
if (!enterprise_installed()) {
$open = true;
}
$tipo = $_POST['message'];
if(!enterprise_installed()){ echo "
$open=true;
}
$tipo = $_POST['message'];
echo "
<div class='modalheader'> <div class='modalheader'>
<span class='modalheadertext'>"; <span class='modalheadertext'>";
if($tipo=='noaccess'){ if ($tipo == 'noaccess') {
echo "You don't have access to this page"; echo "You don't have access to this page";
} } else if (!enterprise_installed()) {
elseif(!enterprise_installed()){ echo 'Community version';
echo "Community version"; } else {
} echo 'Enterprise version';
else{ }
echo "Enterprise version";
}
echo "</span> echo "</span>
<img class='modalclosex cerrar' src='".$config['homeurl']."images/icono_cerrar.png'> <img class='modalclosex cerrar' src='".$config['homeurl']."images/icono_cerrar.png'>
</div> </div>
<div class='modalcontent'> <div class='modalcontent'>
<img class='modalcontentimg' src='".$config['homeurl']."images/"; <img class='modalcontentimg' src='".$config['homeurl'].'images/';
switch ($tipo) { switch ($tipo) {
case "infomodal": case 'infomodal':
echo "icono_info.png"; echo 'icono_info.png';
break;
case "helpmodal":
echo "icono_info.png";
break;
case "modulemodal":
echo "icono_popup.png";
break; break;
case "massivemodal":
echo "icono_popup.png"; case 'helpmodal':
break; echo 'icono_info.png';
case "eventsmodal":
echo "icono_popup.png";
break;
case "reportingmodal":
echo "icono_popup.png";
break;
case "visualmodal":
echo "icono_popup.png";
break;
case "updatemodal":
echo "icono_info.png";
break; break;
case "agentsmodal":
echo "icono_info.png"; case 'modulemodal':
break; echo 'icono_popup.png';
case "monitorcheckmodal": break;
echo "icono_info.png";
break; case 'massivemodal':
case "remotemodulesmodal": echo 'icono_popup.png';
echo "icono_info.png"; break;
break;
case "monitoreventsmodal": case 'eventsmodal':
echo "icono_info.png"; echo 'icono_popup.png';
break; break;
case "alertagentmodal":
echo "icono_info.png"; case 'reportingmodal':
break; echo 'icono_popup.png';
case "noaccess": break;
echo "access_denied.png";
break; case 'visualmodal':
default: echo 'icono_popup.png';
break; break;
}
case 'updatemodal':
echo 'icono_info.png';
break;
case 'agentsmodal':
echo 'icono_info.png';
break;
case 'monitorcheckmodal':
echo 'icono_info.png';
break;
case 'remotemodulesmodal':
echo 'icono_info.png';
break;
case 'monitoreventsmodal':
echo 'icono_info.png';
break;
case 'alertagentmodal':
echo 'icono_info.png';
break;
case 'noaccess':
echo 'access_denied.png';
break;
default:
break;
}
echo "'> echo "'>
<div class='modalcontenttext'>"; <div class='modalcontenttext'>";
switch ($tipo) { switch ($tipo) {
case 'helpmodal':
case "helpmodal":
echo __(
echo __("This is the online help for %s console. This help is -in best cases- just a brief contextual help, not intented to teach you how to use %s. Official documentation of %s is about 900 pages, and you probably don't need to read it entirely, but sure, you should download it and take a look.<br><br> "This is the online help for %s console. This help is -in best cases- just a brief contextual help, not intented to teach you how to use %s. Official documentation of %s is about 900 pages, and you probably don't need to read it entirely, but sure, you should download it and take a look.<br><br>
<a href='%s' target='_blanck' style='color: #82b92e; font-size: 10pt; text-decoration: underline;'>Download the official documentation</a>", <a href='%s' target='_blanck' style='color: #82b92e; font-size: 10pt; text-decoration: underline;'>Download the official documentation</a>",
get_product_name(), get_product_name(), get_product_name(), $config['custom_docs_url']); get_product_name(),
get_product_name(),
break; get_product_name(),
$config['custom_docs_url']
case "noaccess": );
echo __('Access to this page is restricted to authorized users only, please contact system administrator if you need assistance. <br> <br> break;
case 'noaccess':
echo __(
'Access to this page is restricted to authorized users only, please contact system administrator if you need assistance. <br> <br>
Please know that all attempts to access this page are recorded in security logs of %s System Database.', Please know that all attempts to access this page are recorded in security logs of %s System Database.',
get_product_name()); get_product_name()
);
break;
case "infomodal":
if($open){
echo break;
'<p>' .
__('The Update Manager client is included on %s. It helps system administrators update their %s automatically, since the Update Manager retrieves new modules, new plugins and new features (even full migrations tools for future versions) automatically.', get_product_name(), get_product_name()) . case 'infomodal':
'</p>' .
'<p>' . if ($open) {
__('<b>OpenSource version updates are automated packages generated each week. These updates come WITHOUT ANY warranty or support. If your system is corrupted or a feature stops working properly, you will need to recover a backup by yourself.</b>') . echo '<p>'.__('The Update Manager client is included on %s. It helps system administrators update their %s automatically, since the Update Manager retrieves new modules, new plugins and new features (even full migrations tools for future versions) automatically.', get_product_name(), get_product_name()).'</p>'.'<p>'.__('<b>OpenSource version updates are automated packages generated each week. These updates come WITHOUT ANY warranty or support. If your system is corrupted or a feature stops working properly, you will need to recover a backup by yourself.</b>').'</p>'.'<p>'.__('The Enterprise version comes with a different update system, with fully tested, professionally-supported packages, and our support team is there to help you in case of problems or queries. Update Manager is another feature present in the Enterprise version and not included in the OpenSource version. There are lots of advanced business-oriented features contained in %s Enterprise Edition. For more information visit <a href="http://pandorafms.com">pandorafms.com</a>', get_product_name()).'</p>';
'</p>' . } else {
'<p>' . echo '<p>'.__('The new <a href="http://updatemanager.sourceforge.net">Update Manager</a> client is included on %s. It helps system administrators update their %s automatically, since the Update Manager retrieves new modules, new plugins and new features (even full migrations tools for future versions) automatically.', get_product_name(), get_product_name()).'</p>'.'<p>'.__('The Update Manager is one of the most advanced features on the %s Enterprise Edition. For more information visit <a href="http://pandorafms.com">http://pandorafms.com</a>.', get_product_name()).'</p>'.'<p>'.__('Update Manager sends anonymous information about %s usage (number of agents and modules running). To disable it, please remove the remote server address from the Update Manager plugin setup.', get_product_name()).'</p>';
__('The Enterprise version comes with a different update system, with fully tested, professionally-supported packages, and our support team is there to help you in case of problems or queries. Update Manager is another feature present in the Enterprise version and not included in the OpenSource version. There are lots of advanced business-oriented features contained in %s Enterprise Edition. For more information visit <a href="http://pandorafms.com">pandorafms.com</a>', get_product_name()) . }
'</p>' break;
;
case 'modulemodal':
}else{ echo __(
"The community version doesn't have the ability to define your own library of local modules, or distribute it to remote agents. You need to make those changes individually on each agent which is possible by using external tools and time and effort. Nor can it distribute local plugins, or have access to the library of enterprise plugins to monitor applications such as VMWare, RHEV or Informix between others. The Enterprise version will have all this, plus the ability to distribute and manage your own local modules on your systems, individually or through policies.
echo <br><br><img style='width:105px' src='".$config['homeurl']."images/logo_oracle.png'><img style='width:105px' src='".$config['homeurl']."images/logo_citrix.png'><img style='width:105px' src='".$config['homeurl']."images/logo_sap.png'><img style='width:105px' src='".$config['homeurl']."images/logo_exchange.png'><br><br><span style='font-style:italic;'>* Todos los logotipos pertenecen a marcas registradas</span>"
'<p>' . );
__('The new <a href="http://updatemanager.sourceforge.net">Update Manager</a> client is included on %s. It helps system administrators update their %s automatically, since the Update Manager retrieves new modules, new plugins and new features (even full migrations tools for future versions) automatically.', get_product_name(), get_product_name()) . break;
'</p>' .
'<p>' . case 'massivemodal':
__('The Update Manager is one of the most advanced features on the %s Enterprise Edition. For more information visit <a href="http://pandorafms.com">http://pandorafms.com</a>.', get_product_name()) . echo __("Do you want to consolidate all your system monitoring? Do you have many systems, making it difficult to manage them in a comprehensive manner? Would you like to deploy monitoring, alerts and even local plugins with a single click? %s Enterprise Policies are exactly what you need; you'll save time, effort and annoyances. More information <a href='pandorafms.com'>pandorafms.com</a>", get_product_name());
'</p>' . break;
'<p>' .
__('Update Manager sends anonymous information about %s usage (number of agents and modules running). To disable it, please remove the remote server address from the Update Manager plugin setup.', get_product_name()) . case 'eventsmodal':
'</p>' echo __('%s Enterprise also features event correlation. Through correlation you can generate realtime alerts and / or new events based on logical rules. This allows you to automate troubleshooting. If you know the value of working with events, event correlation will take you to a new level.', get_product_name());
; break;
case 'reportingmodal':
echo __('Report generating on the Enterprise version is also more powerful: it has wizards, you can schedule emails in PDF to be sent according to the schedule you decide, and it has a template system to create personalized reports quickly for each of your customers. It will even allow your customers to generate their own reports from templates created by you. If reports are key to your business, %s Enterprise version is for you.', get_product_name());
break;
case 'visualmodal':
echo __('These options are only effective on the Enterprise version.');
break;
case 'updatemodal':
echo __('WARNING: You are just one click away from an automated update. This may result in a damaged system, including loss of data and operativity. Check you have a recent backup. OpenSource updates are automatically created packages, and there is no WARRANTY or SUPPORT. If you need professional support and warranty, please upgrade to Enterprise Version.');
break;
case 'agentsmodal':
echo __('This system is heavily loaded. OpenSource version could get a lot more agents but fine tuning requires knowledge and time. Checkout the Enterprise Version for a professional supported system.');
break;
case 'monitorcheckmodal':
echo __('This system has too many modules per agent. OpenSource version could manage thousands of modules, but is not recommended to have more than 40 modules per agent. This configuration has B/A modules per agent. Checkout the Enterprise Version for a professional supported system.');
break;
case 'remotemodulesmodal':
echo __('Too much remote modules has been detected on this system. OpenSource version could manage thousands of modules, but performance is limited on high amount of SNMP or ICMP request. Checkout the Enterprise Version for a professional supported system with improved capacity on network monitoring, including distributed servers.');
break;
case 'monitoreventsmodal':
echo __('This system has too much events in the database. Checkout database purge options. Checkout the Enterprise Version for a professional supported system.');
break;
case 'alertagentmodal':
echo __('You have defined a high number of alerts, this may cause you performance problems in the future. In the Enterprise version, you can use event correlation alerts to simplify the alerting system and have easier administration and increased performance.');
break;
default:
break;
} }
break;
case "modulemodal":
echo __("The community version doesn't have the ability to define your own library of local modules, or distribute it to remote agents. You need to make those changes individually on each agent which is possible by using external tools and time and effort. Nor can it distribute local plugins, or have access to the library of enterprise plugins to monitor applications such as VMWare, RHEV or Informix between others. The Enterprise version will have all this, plus the ability to distribute and manage your own local modules on your systems, individually or through policies.
<br><br><img style='width:105px' src='".$config['homeurl']."images/logo_oracle.png'><img style='width:105px' src='".$config['homeurl']."images/logo_citrix.png'><img style='width:105px' src='".$config['homeurl']."images/logo_sap.png'><img style='width:105px' src='".$config['homeurl']."images/logo_exchange.png'><br><br><span style='font-style:italic;'>* Todos los logotipos pertenecen a marcas registradas</span>");
break;
case "massivemodal":
echo __("Do you want to consolidate all your system monitoring? Do you have many systems, making it difficult to manage them in a comprehensive manner? Would you like to deploy monitoring, alerts and even local plugins with a single click? %s Enterprise Policies are exactly what you need; you'll save time, effort and annoyances. More information <a href='pandorafms.com'>pandorafms.com</a>", get_product_name());
break;
case "eventsmodal":
echo __("%s Enterprise also features event correlation. Through correlation you can generate realtime alerts and / or new events based on logical rules. This allows you to automate troubleshooting. If you know the value of working with events, event correlation will take you to a new level.", get_product_name());
break;
case "reportingmodal":
echo __("Report generating on the Enterprise version is also more powerful: it has wizards, you can schedule emails in PDF to be sent according to the schedule you decide, and it has a template system to create personalized reports quickly for each of your customers. It will even allow your customers to generate their own reports from templates created by you. If reports are key to your business, %s Enterprise version is for you.", get_product_name());
break;
case "visualmodal":
echo __("These options are only effective on the Enterprise version.");
break;
case "updatemodal":
echo __("WARNING: You are just one click away from an automated update. This may result in a damaged system, including loss of data and operativity. Check you have a recent backup. OpenSource updates are automatically created packages, and there is no WARRANTY or SUPPORT. If you need professional support and warranty, please upgrade to Enterprise Version.");
break;
case "agentsmodal":
echo __("This system is heavily loaded. OpenSource version could get a lot more agents but fine tuning requires knowledge and time. Checkout the Enterprise Version for a professional supported system.");
break;
case "monitorcheckmodal":
echo __("This system has too many modules per agent. OpenSource version could manage thousands of modules, but is not recommended to have more than 40 modules per agent. This configuration has B/A modules per agent. Checkout the Enterprise Version for a professional supported system.");
break;
case "remotemodulesmodal":
echo __("Too much remote modules has been detected on this system. OpenSource version could manage thousands of modules, but performance is limited on high amount of SNMP or ICMP request. Checkout the Enterprise Version for a professional supported system with improved capacity on network monitoring, including distributed servers.");
break;
case "monitoreventsmodal":
echo __("This system has too much events in the database. Checkout database purge options. Checkout the Enterprise Version for a professional supported system.");
break;
case "alertagentmodal":
echo __("You have defined a high number of alerts, this may cause you performance problems in the future. In the Enterprise version, you can use event correlation alerts to simplify the alerting system and have easier administration and increased performance.");
break;
default:
break;
}
echo " echo "
</div> </div>
<div style='float:right;width:100%;height:30px;'> <div style='float:right;width:100%;height:30px;'>
@ -185,12 +192,11 @@ echo "
<div class='modalokbutton cerrar'> <div class='modalokbutton cerrar'>
<span class='modalokbuttontext'>OK</span> <span class='modalokbuttontext'>OK</span>
</div>"; </div>";
if($open){ if ($open) {
echo "<div class='modalgobutton gopandora'> echo "<div class='modalgobutton gopandora'>
<span class='modalgobuttontext'>About Enterprise</span> <span class='modalgobuttontext'>About Enterprise</span>
</div>"; </div>";
} }
} }
?> ?>

View File

@ -1,7 +1,4 @@
<?php <?php
$stacked = db_get_sql('select stacked from tgraph where id_graph = '.$_GET['data']); $stacked = db_get_sql('select stacked from tgraph where id_graph = '.$_GET['data']);
$num_items = db_get_sql('select count(*) from tgraph_source where id_graph = '.$_GET['data']); $num_items = db_get_sql('select count(*) from tgraph_source where id_graph = '.$_GET['data']);
echo "$stacked,$num_items"; echo "$stacked,$num_items";
?>

View File

@ -1,9 +1,9 @@
<?php <?php
include_once ('include/config.php'); require_once 'include/config.php';
include_once ('include/functions.php'); require_once 'include/functions.php';
include_once ('include/functions_db.php'); require_once 'include/functions_db.php';
include_once ('include/auth/mysql.php'); require_once 'include/auth/mysql.php';
$id = get_parameter('get_image'); $id = get_parameter('get_image');
@ -13,13 +13,8 @@ $result = db_get_sql($sql);
$image = strpos($result, 'data:image'); $image = strpos($result, 'data:image');
if($image === false){ if ($image === false) {
echo 0; echo 0;
} else {
echo 1;
} }
else{
echo 1;
}
?>

View File

@ -4,31 +4,28 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
include_once("include/functions.php"); require_once 'include/functions.php';
include_once("include/functions_html.php"); require_once 'include/functions_html.php';
include_once("include/functions_ui.php"); require_once 'include/functions_ui.php';
include_once("include/functions_io.php"); require_once 'include/functions_io.php';
include_once("include/functions_extensions.php"); require_once 'include/functions_extensions.php';
echo '<html>'; echo '<html>';
ob_start ('ui_process_page_head'); ob_start('ui_process_page_head');
echo '<link rel="stylesheet" href="include/styles/pandora.css" type="text/css">'; echo '<link rel="stylesheet" href="include/styles/pandora.css" type="text/css">';
echo '</head>' . "\n"; echo '</head>'."\n";
require_once ("include/functions_themes.php"); require_once 'include/functions_themes.php';
ob_start ('ui_process_page_body'); ob_start('ui_process_page_body');
// At this point, $login_screen is setted with the error type desired // At this point, $login_screen is setted with the error type desired
require 'login_page.php';
require('login_page.php');
?> ?>
</body> </body>

View File

@ -3,87 +3,85 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2018 Artica Soluciones Tecnologicas // Copyright (c) 2005-2018 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
check_login (); check_login();
if (! check_acl ($config['id_user'], 0, "PM")) { if (! check_acl($config['id_user'], 0, 'PM')) {
db_pandora_audit("ACL Violation", db_pandora_audit(
"Trying to access HA cluster"); 'ACL Violation',
require ("general/noaccess.php"); 'Trying to access HA cluster'
exit; );
include 'general/noaccess.php';
exit;
} }
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php <?php
ui_print_info_message(['no_close' => true, 'message' => __('There are no HA clusters defined yet.') ]);
ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no HA clusters defined yet.') ) );
?> ?>
<div class="new_task_cluster"> <div class="new_task_cluster">
<div class="image_task_cluster"> <div class="image_task_cluster">
<?php echo html_print_image('images/firts_task/slave-mode.png', true, array("title" => __('Clusters')));?> <?php echo html_print_image('images/firts_task/slave-mode.png', true, ['title' => __('Clusters')]); ?>
</div> </div>
<div class="text_task_cluster"> <div class="text_task_cluster">
<h3> <?php echo __('PANDORA FMS DB CLUSTER'); ?></h3> <h3> <?php echo __('PANDORA FMS DB CLUSTER'); ?></h3>
<p id="description_task"> <?php <p id="description_task">
<?php
echo __('With Pandora FMS Enterprise you can add high availability to your Pandora FMS installation by adding redundant MySQL servers').'<br><br>'; echo __('With Pandora FMS Enterprise you can add high availability to your Pandora FMS installation by adding redundant MySQL servers').'<br><br>';
echo __('Click on "add new node" to start transforming your Pandora FMS DB Cluster into a Pandora FMS DB Cluster.').'<br><br>'; echo __('Click on "add new node" to start transforming your Pandora FMS DB Cluster into a Pandora FMS DB Cluster.').'<br><br>';
?>
?></p> </p>
<?php <?php
if(check_acl ($config['id_user'], 0, "AW")) { if (check_acl($config['id_user'], 0, 'AW')) {
echo "<div id='create_master_window'></div>"; echo "<div id='create_master_window'></div>";
?> ?>
<input style="margin-bottom:20px;" onclick="show_create_ha_cluster();" type="submit" class="button_task" value="<?php echo __('Add new node'); ?>" /> <input style="margin-bottom:20px;" onclick="show_create_ha_cluster();" type="submit" class="button_task" value="<?php echo __('Add new node'); ?>" />
<?php <?php
} }
?> ?>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
function show_create_ha_cluster() { function show_create_ha_cluster() {
var params = {}; var params = {};
params["dialog_master"] = 1; params["dialog_master"] = 1;
params["page"] = "enterprise/include/ajax/HA_cluster.ajax"; params["page"] = "enterprise/include/ajax/HA_cluster.ajax";
jQuery.ajax ({ jQuery.ajax ({
data: params, data: params,
dataType: "html", dataType: "html",
type: "POST", type: "POST",
url: "ajax.php", url: "ajax.php",
success: function (data) { success: function (data) {
$("#create_master_window").dialog ({ $("#create_master_window").dialog ({
title: '<?php echo __("Add master node");?>', title: '<?php echo __('Add master node'); ?>',
resizable: true, resizable: true,
draggable: true, draggable: true,
modal: true, modal: true,
close: function() { close: function() {
}, },
overlay: { overlay: {
opacity: 0.5, opacity: 0.5,
background: "black" background: "black"
}, },
width: 800, width: 800,
height: 600 height: 600
}).empty() }).empty()
.html(data) .html(data)
.show (); .show ();
} }
}); });
} }
</script> </script>

View File

@ -4,62 +4,60 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
check_login(); check_login();
if (! check_acl ($config['id_user'], 0, "AR") && ! check_acl ($config['id_user'], 0, "AW")) { if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'], 0, 'AW')) {
db_pandora_audit("ACL Violation", db_pandora_audit(
"Trying to access Inventory"); 'ACL Violation',
require ("general/noaccess.php"); 'Trying to access Inventory'
return; );
include 'general/noaccess.php';
return;
} }
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php <?php
ui_print_info_message(['no_close' => true, 'message' => __('There are no clusters defined yet.') ]);
ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no clusters defined yet.') ) );
?> ?>
<div class="new_task_cluster"> <div class="new_task_cluster">
<div class="image_task_cluster"> <div class="image_task_cluster">
<?php echo html_print_image('images/firts_task/icono-cluster-activo.png', true, array("title" => __('Clusters')));?> <?php echo html_print_image('images/firts_task/icono-cluster-activo.png', true, ['title' => __('Clusters')]); ?>
</div> </div>
<div class="text_task_cluster"> <div class="text_task_cluster">
<h3> <?php echo __('Create Cluster'); ?></h3> <h3> <?php echo __('Create Cluster'); ?></h3>
<p id="description_task"> <?php <p id="description_task">
<?php
echo __('A cluster is a group of devices that provide the same service in high availability.').'<br><br>'; echo __('A cluster is a group of devices that provide the same service in high availability.').'<br><br>';
echo __('Depending on how they provide that service, we can find two types:').'<br><br>'; echo __('Depending on how they provide that service, we can find two types:').'<br><br>';
echo __('<b>Clusters to balance the service load</b>: these are active - active (A/A) mode clusters. It means that all the nodes (or machines that compose it) are working. They must be working because if one stops working, it will overload the others.').'<br><br>'; echo __('<b>Clusters to balance the service load</b>: these are active - active (A/A) mode clusters. It means that all the nodes (or machines that compose it) are working. They must be working because if one stops working, it will overload the others.').'<br><br>';
echo __('<b>Clusters to guarantee service</b>: these are active - passive (A/P) mode clusters. It means that one of the nodes (or machines that make up the cluster) will be running (primary) and another won\'t (secondary). When the primary goes down, the secondary must take over and give the service instead. Although many of the elements of this cluster are active-passive, it will also have active elements in both of them that indicate that the passive node is "online", so that in the case of a service failure in the master, the active node collects this information.'); echo __('<b>Clusters to guarantee service</b>: these are active - passive (A/P) mode clusters. It means that one of the nodes (or machines that make up the cluster) will be running (primary) and another won\'t (secondary). When the primary goes down, the secondary must take over and give the service instead. Although many of the elements of this cluster are active-passive, it will also have active elements in both of them that indicate that the passive node is "online", so that in the case of a service failure in the master, the active node collects this information.');
?>
?></p> </p>
<?php <?php
if(check_acl ($config['id_user'], 0, "AW")) { if (check_acl($config['id_user'], 0, 'AW')) {
?> ?>
<form action="index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&step=1" method="post"> <form action="index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_builder&step=1" method="post">
<input style="margin-bottom:20px;" type="submit" class="button_task" value="<?php echo __('Create Cluster'); ?>" /> <input style="margin-bottom:20px;" type="submit" class="button_task" value="<?php echo __('Create Cluster'); ?>" />
</form> </form>
<?php <?php
} }
?> ?>
</div> </div>
</div> </div>

View File

@ -4,37 +4,39 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no collections defined yet.') ) ); ?> <?php ui_print_info_message(['no_close' => true, 'message' => __('There are no collections defined yet.') ]); ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/icono_grande_reconserver.png', true, array("title" => __('Collections')));?> <?php echo html_print_image('images/icono_grande_reconserver.png', true, ['title' => __('Collections')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Collections'); ?></h3> <h3> <?php echo __('Create Collections'); ?> <p id="description_task">
<p id="description_task"> <?php echo __("A file collection is a group of files (e.g. scripts or executables) which are <?php
echo __(
"A file collection is a group of files (e.g. scripts or executables) which are
automatically copied to a specific directory of the agent (under Windows or UNIX). The file collections allow to be propagated automatically copied to a specific directory of the agent (under Windows or UNIX). The file collections allow to be propagated
along with the policies in order to be used by a group of agents, using a 'package' of scripts and modules which use them. along with the policies in order to be used by a group of agents, using a 'package' of scripts and modules which use them.
First we learn how to use the file collections in the agent's view, how to conduct it manually, agent by agent, without using collections, First we learn how to use the file collections in the agent's view, how to conduct it manually, agent by agent, without using collections,
and how to do the same thing by using policies.Our first task is to arrange a compilation of files. In order to do this, please go to the agent's and how to do the same thing by using policies.Our first task is to arrange a compilation of files. In order to do this, please go to the agent's
administrator. Subsequently, we're going to see a 'sub option' called 'Collections'. Please click on it in order to create a new collection as we can see on administrator. Subsequently, we're going to see a 'sub option' called 'Collections'. Please click on it in order to create a new collection as we can see on
the picture below. "); ?></p> the picture below. "
<form action="index.php?sec=gagente&sec2=enterprise/godmode/agentes/collections&action=new" method="post"> );
<input type="submit" class="button_task" value="<?php echo __('Create Collections'); ?>" /> ?>
</form> </p>
</div> <form action="index.php?sec=gagente&sec2=enterprise/godmode/agentes/collections&action=new" method="post">
<input type="submit" class="button_task" value="<?php echo __('Create Collections'); ?>" />
</form>
</div>
</div> </div>

View File

@ -4,35 +4,36 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php <?php
ui_print_info_message(['no_close' => true, 'message' => __('There are no custom fields defined yet.') ]);
ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no custom fields defined yet.') ) );
?> ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, array("title" => __('Custom Fields')));?> <?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, ['title' => __('Custom Fields')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Custom Fields'); ?></h3> <h3> <?php echo __('Create Custom Fields'); ?> <p id="description_task">
<p id="description_task"> <?php echo __("Custom fields are an easy way to personalized agent's information. <?php
You're able to create custom fields by klicking on 'Administration' -> 'Manage monitoring' -> 'Manage custom fields'. "); ?></p> echo __(
<form action="index.php?sec=gagente&sec2=godmode/agentes/configure_field" method="post"> "Custom fields are an easy way to personalized agent's information.
<input type="submit" class="button_task" value="<?php echo __('Create Custom Fields'); ?>" /> You're able to create custom fields by klicking on 'Administration' -> 'Manage monitoring' -> 'Manage custom fields'. "
</form> );
</div> ?>
</p>
<form action="index.php?sec=gagente&sec2=godmode/agentes/configure_field" method="post">
<input type="submit" class="button_task" value="<?php echo __('Create Custom Fields'); ?>" />
</form>
</div>
</div> </div>

View File

@ -4,37 +4,39 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php <?php
ui_print_info_message(['no_close' => true, 'message' => __('There are no custom graphs defined yet.') ]);
ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no custom graphs defined yet.') ) );
?> ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_custom_reporting.png', true, array("title" => __('Custom Graphs')));?> <?php echo html_print_image('images/firts_task/icono_grande_custom_reporting.png', true, ['title' => __('Custom Graphs')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Custom Graph'); ?></h3> <h3> <?php echo __('Create Custom Graph'); ?> <p id="description_task">
<p id="description_task"> <?php echo __("Graphs are designed to show the data collected by %s in a temporary scale defined by the user. <?php
echo __(
"Graphs are designed to show the data collected by %s in a temporary scale defined by the user.
%s Graphs display data in real time. They are generated every time the operator requires any of them and display the up-to-date state. %s Graphs display data in real time. They are generated every time the operator requires any of them and display the up-to-date state.
There are two types of graphs: The agent's automated graphs and the graphs the user customizes by using one or more modules to do so.", There are two types of graphs: The agent's automated graphs and the graphs the user customizes by using one or more modules to do so.",
get_product_name(), get_product_name()); ?></p> get_product_name(),
<form action="index.php?sec=reporting&sec2=godmode/reporting/graph_builder" method="post"> get_product_name()
<input type="submit" class="button_task" value="<?php echo __('Create Custom Graph'); ?>" /> );
</form> ?>
</div> </p>
<form action="index.php?sec=reporting&sec2=godmode/reporting/graph_builder" method="post">
<input type="submit" class="button_task" value="<?php echo __('Create Custom Graph'); ?>" />
</form>
</div>
</div> </div>

View File

@ -4,32 +4,34 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no custom fields defined yet.') ) ); ?> <?php ui_print_info_message(['no_close' => true, 'message' => __('There are no custom fields defined yet.') ]); ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, array("title" => __('Fields Manager')));?> <?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, ['title' => __('Fields Manager')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Fields Manager'); ?></h3> <h3> <?php echo __('Create Fields Manager'); ?> <p id="description_task">
<p id="description_task"> <?php echo __("Custom fields are an easy way to personalized agent's information. <?php
You're able to create custom fields by klicking on 'Administration' -> 'Manage monitoring' -> 'Manage custom fields'. "); ?></p> echo __(
<form action="index.php?sec=gagente&sec2=godmode/agentes/configure_field" method="post"> "Custom fields are an easy way to personalized agent's information.
<input type="submit" class="button_task" value="<?php echo __('Create Fields '); ?>" /> You're able to create custom fields by klicking on 'Administration' -> 'Manage monitoring' -> 'Manage custom fields'. "
</form> );
</div> ?>
</p>
<form action="index.php?sec=gagente&sec2=godmode/agentes/configure_field" method="post">
<input type="submit" class="button_task" value="<?php echo __('Create Fields '); ?>" />
</form>
</div>
</div> </div>

View File

@ -4,45 +4,48 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
global $incident_w; global $incident_w;
global $incident_m; global $incident_m;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php <?php
ui_print_info_message(['no_close' => true, 'message' => __('There are no incidents defined yet.') ]);
ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no incidents defined yet.') ) );
if ($incident_w || $incident_m) { if ($incident_w || $incident_m) {
?> ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_incidencia.png', true, array("title" => __('Incidents')));?> <?php echo html_print_image('images/firts_task/icono_grande_incidencia.png', true, ['title' => __('Incidents')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Incidents'); ?></h3> <h3> <?php echo __('Create Incidents'); ?> <p id="description_task">
<p id="description_task"> <?php echo __("Besides receiving and processing data to monitor systems or applications, <?php
echo __(
"Besides receiving and processing data to monitor systems or applications,
you're also required to monitor possible incidents which might take place on these subsystems within the system's monitoring process. you're also required to monitor possible incidents which might take place on these subsystems within the system's monitoring process.
For it, the %s team has designed an incident manager from which any user is able to open incidents, For it, the %s team has designed an incident manager from which any user is able to open incidents,
that explain what's happened on the network, and update them with comments and files, at any time, in case there is a need to do so. that explain what's happened on the network, and update them with comments and files, at any time, in case there is a need to do so.
This system allows users to work as a team, along with different roles and work-flow systems which allow an incident to be This system allows users to work as a team, along with different roles and work-flow systems which allow an incident to be
moved from one group to another, and members from different groups and different people could work on the same incident, sharing information and files. moved from one group to another, and members from different groups and different people could work on the same incident, sharing information and files.
", get_product_name()); ?></p> ",
<form action="index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;insert_form=1" method="post"> get_product_name()
<input type="submit" class="button_task" value="<?php echo __('Create Incidents'); ?>" /> );
</form> ?>
</div> </p>
<form action="index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;insert_form=1" method="post">
<input type="submit" class="button_task" value="<?php echo __('Create Incidents'); ?>" />
</form>
</div>
</div> </div>
<?php } ?> <?php
}

View File

@ -4,48 +4,47 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
global $vconsoles_write; global $vconsoles_write;
global $vconsoles_manage; global $vconsoles_manage;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
ui_print_info_message( ui_print_info_message(
array( [
'no_close'=>true, 'no_close' => true,
'message'=> __('There are no visual console defined yet.'))); 'message' => __('There are no visual console defined yet.'),
]
);
if ($vconsoles_write || $vconsoles_manage) { if ($vconsoles_write || $vconsoles_manage) {
?> ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_visualconsole.png', true, array("title" => __('Visual Console')));?> <?php echo html_print_image('images/firts_task/icono_grande_visualconsole.png', true, ['title' => __('Visual Console')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Visual Console'); ?></h3> <h3> <?php echo __('Create Visual Console'); ?> <p id="description_task">
<p id="description_task"> <?php echo __( <?php
"%s allows users to create visual maps on which each user is able to create his or her " . echo __(
"own monitoring map. The new visual console editor is much more practical, although the prior " . '%s allows users to create visual maps on which each user is able to create his or her '.'own monitoring map. The new visual console editor is much more practical, although the prior '."visual console editor had its advantages. On the new visual console, we've been successful in "."imitating the sensation and touch of a drawing application like GIMP. We've also simplified the "."editor by dividing it into several subject-divided tabs named 'Data', 'Preview', 'Wizard', 'List of "."Elements' and 'Editor'. The items the %s Visual Map was designed to handle are "."'static images', 'percentage bars', 'module graphs' and 'simple values'.",
"visual console editor had its advantages. On the new visual console, we've been successful in " . get_product_name(),
"imitating the sensation and touch of a drawing application like GIMP. We've also simplified the " . get_product_name()
"editor by dividing it into several subject-divided tabs named 'Data', 'Preview', 'Wizard', 'List of " . );
"Elements' and 'Editor'. The items the %s Visual Map was designed to handle are " . ?>
"'static images', 'percentage bars', 'module graphs' and 'simple values'.", </p>
get_product_name(), get_product_name()); ?></p> <form action="index.php?sec=network&amp;sec2=godmode/reporting/visual_console_builder" method="post">
<form action="index.php?sec=network&amp;sec2=godmode/reporting/visual_console_builder" method="post"> <?php html_print_input_hidden('edit_layout', 1); ?>
<?php html_print_input_hidden ('edit_layout', 1); ?> <input type="submit" class="button_task" value="<?php echo __('Create Visual Console'); ?>" />
<input type="submit" class="button_task" value="<?php echo __('Create Visual Console'); ?>" /> </form>
</form> </div>
</div>
</div> </div>
<?php } ?> <?php
}

View File

@ -4,49 +4,50 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php <?php
ui_print_info_message(['no_close' => true, 'message' => __('There are no network map defined yet.') ]);
ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no network map defined yet.') ) );
$strict_user = db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_user']); $strict_user = db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_user']);
$networkmap_types = networkmap_get_types($strict_user); $networkmap_types = networkmap_get_types($strict_user);
?> ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, array("title" => __('Network Map')));?> <?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, ['title' => __('Network Map')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Network Map'); ?></h3> <h3> <?php echo __('Create Network Map'); ?> <p id="description_task">
<p id="description_task"> <?php echo __("There is also an open-source version of the network map. <?php
echo __(
'There is also an open-source version of the network map.
This functionality allows to graphically display the nodes and relationships, agents, modules and groups available to the user. This functionality allows to graphically display the nodes and relationships, agents, modules and groups available to the user.
There are three types of network maps: There are three types of network maps:
"); '
echo "<li>" . __("Topology Map") . "</li> );
<li>" . __("Group Map") . "</li> echo '<li>'.__('Topology Map').'</li>
<li>" . __("Radial Map (User without strict user)") . "</li> <li>'.__('Group Map').'</li>
<li>" . __("Dinamic Map") . "</li> <li>'.__('Radial Map (User without strict user)').'</li>
<li>" . __("Policy Map (Only Enterprise version)") . "</li>"; <li>'.__('Dinamic Map').'</li>
?> </p> <li>'.__('Policy Map (Only Enterprise version)').'</li>';
<form id="networkmap_action" method="post" action="index.php?sec=network&amp;sec2=operation/agentes/networkmap&action=create"> ?>
<?php echo html_print_select($networkmap_types, 'tab', 'topology', '', '', 0); </p>
html_print_input_hidden('add_networkmap', 1); <form id="networkmap_action" method="post" action="index.php?sec=network&amp;sec2=operation/agentes/networkmap&action=create">
?> <?php
echo html_print_select($networkmap_types, 'tab', 'topology', '', '', 0);
<input type="submit" class="button_task" value="<?php echo __('Create Network Map'); ?>" /> html_print_input_hidden('add_networkmap', 1);
</form> ?>
</div>
<input type="submit" class="button_task" value="<?php echo __('Create Network Map'); ?>" />
</form>
</div>
</div> </div>

View File

@ -4,35 +4,37 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no planned downtime defined yet.') ) ); ?> <?php ui_print_info_message(['no_close' => true, 'message' => __('There are no planned downtime defined yet.') ]); ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_visualconsole.png', true, array("title" => __('Planned Downtime')));?> <?php echo html_print_image('images/firts_task/icono_grande_visualconsole.png', true, ['title' => __('Planned Downtime')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Planned Downtime'); ?></h3> <h3> <?php echo __('Create Planned Downtime'); ?> <p id="description_task">
<p id="description_task"> <?php echo __("%s contains a scheduled downtime management system. <?php
echo __(
"%s contains a scheduled downtime management system.
This system was designed to deactivate alerts during specific intervals whenever there is down time by deactivating the agent. This system was designed to deactivate alerts during specific intervals whenever there is down time by deactivating the agent.
If an agent is deactivated, it doesn't gather information. During down time, down-time intervals aren't taken into If an agent is deactivated, it doesn't gather information. During down time, down-time intervals aren't taken into
account for most metrics or report types, because agents don't contain any data within those intervals.", account for most metrics or report types, because agents don't contain any data within those intervals.",
get_product_name()); ?></p> get_product_name()
<form action="index.php?sec=estado&amp;sec2=godmode/agentes/planned_downtime.editor" method="post"> );
<input type="submit" class="button_task" value="<?php echo __('Create Planned Downtime'); ?>" /> ?>
</form> </p>
</div> <form action="index.php?sec=estado&amp;sec2=godmode/agentes/planned_downtime.editor" method="post">
<input type="submit" class="button_task" value="<?php echo __('Create Planned Downtime'); ?>" />
</form>
</div>
</div> </div>

View File

@ -4,35 +4,37 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no recon task defined yet.') ) ); ?> <?php ui_print_info_message(['no_close' => true, 'message' => __('There are no recon task defined yet.') ]); ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, array("title" => __('Recon server')));?> <?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, ['title' => __('Recon server')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Recon Task'); ?></h3> <h3> <?php echo __('Create Recon Task'); ?> <p id="description_task">
<p id="description_task"> <?php echo __('The Recon Task definition of Pandora FMS is used to find new elements in the network. <?php
echo __(
'The Recon Task definition of Pandora FMS is used to find new elements in the network.
If it detects any item, it will add that item to the monitoring, and if that item it is already being monitored, then it will If it detects any item, it will add that item to the monitoring, and if that item it is already being monitored, then it will
ignore it or will update its information.There are three types of detection: Based on <strong id="fuerte"> ICMP </strong>(pings), ignore it or will update its information.There are three types of detection: Based on <strong id="fuerte"> ICMP </strong>(pings),
<strong id="fuerte">SNMP</strong> (detecting the topology of networks and their interfaces), and other <strong id="fuerte"> customized </strong> <strong id="fuerte">SNMP</strong> (detecting the topology of networks and their interfaces), and other <strong id="fuerte"> customized </strong>
type. You can define your own customized recon script.'); ?></p> type. You can define your own customized recon script.'
<form action="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&create" method="post"> );
<input type="submit" class="button_task" value="<?php echo __('Create Recon Task'); ?>" /> ?>
</form> </p>
</div> <form action="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&create" method="post">
<input type="submit" class="button_task" value="<?php echo __('Create Recon Task'); ?>" />
</form>
</div>
</div> </div>

View File

@ -4,42 +4,45 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
global $agent_w; global $agent_w;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no services defined yet.') ) ); ?> <?php ui_print_info_message(['no_close' => true, 'message' => __('There are no services defined yet.') ]); ?>
<?php if ($agent_w) { ?> <?php if ($agent_w) { ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_servicios.png', true, array("title" => __('Services')));?> <?php echo html_print_image('images/firts_task/icono_grande_servicios.png', true, ['title' => __('Services')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Services'); ?></h3> <h3> <?php echo __('Create Services'); ?> <p id="description_task">
<p id="description_task"> <?php echo __("A service is a way to group your IT resources based on their functionalities. <?php
echo __(
"A service is a way to group your IT resources based on their functionalities.
A service could be e.g. your official website, your CRM system, your support application, or even your printers. A service could be e.g. your official website, your CRM system, your support application, or even your printers.
Services are logical groups which can include hosts, routers, switches, firewalls, CRMs, ERPs, websites and numerous other services. Services are logical groups which can include hosts, routers, switches, firewalls, CRMs, ERPs, websites and numerous other services.
By the following example, you're able to see more clearly what a service is: By the following example, you're able to see more clearly what a service is:
A chip manufacturer sells computers by its website all around the world. A chip manufacturer sells computers by its website all around the world.
His company consists of three big departments: A management, an on-line shop and support."); ?></p> His company consists of three big departments: A management, an on-line shop and support."
);
<form action="index.php?sec=estado&sec2=enterprise/godmode/services/services.service&action=new_service" method="post"> ?>
<input type="submit" class="button_task" value="<?php echo __('Create Services'); ?>" /> </p>
</form>
<form action="index.php?sec=estado&sec2=enterprise/godmode/services/services.service&action=new_service" method="post">
</div> <input type="submit" class="button_task" value="<?php echo __('Create Services'); ?>" />
</div> </form>
<?php } ?>
</div>
</div>
<?php
}

View File

@ -4,35 +4,37 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no SNMP filter defined yet.') ) ); ?> <?php ui_print_info_message(['no_close' => true, 'message' => __('There are no SNMP filter defined yet.') ]); ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, array("title" => __('SNMP Filter')));?> <?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, ['title' => __('SNMP Filter')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create SNMP Filter'); ?></h3> <h3> <?php echo __('Create SNMP Filter'); ?> <p id="description_task">
<p id="description_task"> <?php echo __("Some systems receive a high number of traps. <?php
echo __(
"Some systems receive a high number of traps.
We're only interested in monitoring a tiny percentage of them. From Pandora FMS versions 3.2 and above, We're only interested in monitoring a tiny percentage of them. From Pandora FMS versions 3.2 and above,
it's possible to filter the traps that the server obtains in order to avoid straining the application unnecessarily. it's possible to filter the traps that the server obtains in order to avoid straining the application unnecessarily.
In order to define different filters, please go to 'Administration' -> 'Manage SNMP Console' and 'SNMP Filters'. In order to define different filters, please go to 'Administration' -> 'Manage SNMP Console' and 'SNMP Filters'.
One trap which is going to run in conjunction with any of them - just the ones for the server are going to get ruled out automatically. "); ?></p> One trap which is going to run in conjunction with any of them - just the ones for the server are going to get ruled out automatically. "
<form action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter=-1" method="post"> );
<input type="submit" class="button_task" value="<?php echo __('Create SNMP Filter'); ?>" /> ?>
</form> </p>
</div> <form action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter=-1" method="post">
<input type="submit" class="button_task" value="<?php echo __('Create SNMP Filter'); ?>" />
</form>
</div>
</div> </div>

View File

@ -4,33 +4,35 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no tags defined yet.') ) ); ?> <?php ui_print_info_message(['no_close' => true, 'message' => __('There are no tags defined yet.') ]); ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_gestiondetags.png', true, array("title" => __('Tags')));?> <?php echo html_print_image('images/firts_task/icono_grande_gestiondetags.png', true, ['title' => __('Tags')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Tags'); ?></h3> <h3> <?php echo __('Create Tags'); ?> <p id="description_task">
<p id="description_task"> <?php echo __("Access to modules can be configured by a tagging system. <?php
echo __(
"Access to modules can be configured by a tagging system.
Tags are configured on the system and are assigned to the chosen modules. Tags are configured on the system and are assigned to the chosen modules.
A user's access can therefore be restricted to modules with certain tags."); ?></p> A user's access can therefore be restricted to modules with certain tags."
<form action="index.php?sec=gmodules&sec2=godmode/tag/edit_tag&action=new" method="post"> );
<input type="submit" class="button_task" value="<?php echo __('Create Tags'); ?>" /> ?>
</form> </p>
</div> <form action="index.php?sec=gmodules&sec2=godmode/tag/edit_tag&action=new" method="post">
<input type="submit" class="button_task" value="<?php echo __('Create Tags'); ?>" />
</form>
</div>
</div> </div>

View File

@ -4,39 +4,43 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
global $config; global $config;
global $networkmaps_write; global $networkmaps_write;
global $networkmaps_manage; global $networkmaps_manage;
check_login (); check_login();
ui_require_css_file ('firts_task'); ui_require_css_file('firts_task');
?> ?>
<?php ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no transactions defined yet.') ) ); <?php
ui_print_info_message(['no_close' => true, 'message' => __('There are no transactions defined yet.') ]);
if ($networkmaps_write || $networkmaps_manage) { if ($networkmaps_write || $networkmaps_manage) {
?> ?>
<div class="new_task"> <div class="new_task">
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/firts_task/icono_grande_topology.png', true, array("title" => __('Transactions')));?> <?php echo html_print_image('images/firts_task/icono_grande_topology.png', true, ['title' => __('Transactions')]); ?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Transactions'); ?></h3> <h3> <?php echo __('Create Transactions'); ?> <p id="description_task">
<p id="description_task"> <?php echo __("The new transactional server allows you to execute tasks dependent on the others following a user-defined design. This means that it is possible to coordinate several executions to check a target at a given time. <?php
echo __(
'The new transactional server allows you to execute tasks dependent on the others following a user-defined design. This means that it is possible to coordinate several executions to check a target at a given time.
Transaction graphs represent the different processes within our infrastructure that we use to deliver our service."); ?></p> Transaction graphs represent the different processes within our infrastructure that we use to deliver our service.'
<form action="index.php?sec=network&sec2=enterprise/operation/agentes/manage_transmap_creation&create_transaction=1" method="post"> );
<input type="submit" class="button_task" value="<?php echo __('Create Transactions'); ?>" /> ?>
</form> </p>
</div> <form action="index.php?sec=network&sec2=enterprise/operation/agentes/manage_transmap_creation&create_transaction=1" method="post">
<input type="submit" class="button_task" value="<?php echo __('Create Transactions'); ?>" />
</form>
</div>
</div> </div>
<?php } ?> <?php
}

View File

@ -4,55 +4,48 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
if (isset($_SERVER['REQUEST_TIME'])) { if (isset($_SERVER['REQUEST_TIME'])) {
$time = $_SERVER['REQUEST_TIME']; $time = $_SERVER['REQUEST_TIME'];
} } else {
else { $time = get_system_time();
$time = get_system_time ();
} }
$license_file = 'general/license/pandora_info_'.$config["language"].'.html'; $license_file = 'general/license/pandora_info_'.$config['language'].'.html';
if (! file_exists ($config["homedir"] . $license_file)) { if (! file_exists($config['homedir'].$license_file)) {
$license_file = 'general/license/pandora_info_en.html'; $license_file = 'general/license/pandora_info_en.html';
} }
if (!$config["MR"]) { if (!$config['MR']) {
$config["MR"] = 0; $config['MR'] = 0;
} }
echo '<a class="white_bold footer" target="_blank" href="' . $config["homeurl"] . $license_file. '">'; echo '<a class="white_bold footer" target="_blank" href="'.$config['homeurl'].$license_file.'">';
include_once ($config["homedir"]."/include/functions_update_manager.php"); require_once $config['homedir'].'/include/functions_update_manager.php';
$current_package = update_manager_get_current_package(); $current_package = update_manager_get_current_package();
if($current_package == 0){ if ($current_package == 0) {
$build_package_version = $build_version; $build_package_version = $build_version;
} } else {
else{ $build_package_version = $current_package;
$build_package_version = $current_package;
} }
echo sprintf(__('%s %s - Build %s - MR %s', get_product_name(), $pandora_version, $build_package_version, $config["MR"])); echo sprintf(__('%s %s - Build %s - MR %s', get_product_name(), $pandora_version, $build_package_version, $config['MR']));
echo '</a><br />'; echo '</a><br />';
echo '<a class="white footer">'. __('Page generated at') . ' '. date($config["date_format"]); echo '<a class="white footer">'.__('Page generated at').' '.date($config['date_format']);
echo '</a><br /><span style="color:#eff">&reg; '.get_copyright_notice().'</span>'; echo '</a><br /><span style="color:#eff">&reg; '.get_copyright_notice().'</span>';
if (isset ($config['debug'])) { if (isset($config['debug'])) {
$cache_info = array(); $cache_info = [];
$cache_info = db_get_cached_queries(); $cache_info = db_get_cached_queries();
echo ' - Saved '.$cache_info[0].' Queries'; echo ' - Saved '.$cache_info[0].' Queries';
} }
?>

View File

@ -4,507 +4,499 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
require_once 'include/functions_messages.php';
require_once ("include/functions_messages.php"); require_once 'include/functions_servers.php';
require_once ('include/functions_servers.php');
// Check permissions // Check permissions
// Global errors/warnings checking. // Global errors/warnings checking.
config_check(); config_check();
?> ?>
<table width="100%" cellpadding="0" cellspacing="0" style="margin:0px; padding:0px; margin-top: 0px; height: 100%" border="0"> <table width="100%" cellpadding="0" cellspacing="0" style="margin:0px; padding:0px; margin-top: 0px; height: 100%" border="0">
<tr> <tr>
<td style="width:90%;"> <td style="width:90%;">
<a href="index.php?sec=main"> <a href="index.php?sec=main">
<?php <?php
$custom_logo = 'images/custom_logo/' . $config['custom_logo']; $custom_logo = 'images/custom_logo/'.$config['custom_logo'];
if (!defined ('PANDORA_ENTERPRISE')) { if (!defined('PANDORA_ENTERPRISE')) {
$logo_title = get_product_name() . ' Opensource'; $logo_title = get_product_name().' Opensource';
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png'; $custom_logo = 'images/custom_logo/pandora_logo_head_3.png';
} } else {
else { if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) {
if (file_exists(ENTERPRISE_DIR . '/' . $custom_logo)) { $custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
$custom_logo = ENTERPRISE_DIR . '/' . $custom_logo; }
}
$logo_title = get_product_name() . ' Enterprise'; $logo_title = get_product_name().' Enterprise';
} }
echo html_print_image($custom_logo, true, echo html_print_image(
array("alt" => $logo_title, "border" => '0')); $custom_logo,
?> true,
</a> [
</td> 'alt' => $logo_title,
<td style="min-width:200px;"> 'border' => '0',
<?php ]
$table = new stdClass(); );
$table->id = "header_table"; ?>
$table->class = "none"; </a>
$table->cellpadding = 0; </td>
$table->cellspacing = 0; <td style="min-width:200px;">
$table->head = array (); <?php
$table->data = array (); $table = new stdClass();
$table->style[0] = $table->id = 'header_table';
$table->style['clippy'] = $table->class = 'none';
$table->style[1] = $table->cellpadding = 0;
$table->style[3] = $table->cellspacing = 0;
$table->style[4] = $table->head = [];
$table->style[5] = $table->data = [];
$table->style[6] = $table->style[0] = $table->style['clippy'] = $table->style[1] = $table->style[3] = $table->style[4] = $table->style[5] = $table->style[6] = $table->style[8] = $table->style[9] = $table->style['qr'] = 'width: 22px; text-align:center; height: 22px; padding-right: 9px;padding-left: 9px;';
$table->style[8] = $table->style[7] = 'width: 20px; padding-right: 9px;';
$table->style[9] = $table->style['searchbar'] = 'width: 180px; min-width: 180px;';
$table->style['qr'] = $table->style[11] = 'padding-left: 10px; padding-right: 5px;width: 16px;';
'width: 22px; text-align:center; height: 22px; padding-right: 9px;padding-left: 9px;'; $table->width = '100%';
$table->style[7] = 'width: 20px; padding-right: 9px;'; $table->styleTable = 'margin: auto; margin-top: 0px;';
$table->style['searchbar'] = 'width: 180px; min-width: 180px;'; $table->rowclass[0] = '';
$table->style[11] = 'padding-left: 10px; padding-right: 5px;width: 16px;';
$table->width = "100%"; $acl_head_search = true;
$table->styleTable = 'margin: auto; margin-top: 0px;'; if ($config['acl_enterprise'] == 1 && !users_is_admin()) {
$table->rowclass[0] = ''; $acl_head_search = db_get_sql(
"SELECT sec FROM tusuario
$acl_head_search = true;
if ($config["acl_enterprise"] == 1 && !users_is_admin()) {
$acl_head_search = db_get_sql("SELECT sec FROM tusuario
INNER JOIN tusuario_perfil ON tusuario.id_user = tusuario_perfil.id_usuario INNER JOIN tusuario_perfil ON tusuario.id_user = tusuario_perfil.id_usuario
INNER JOIN tprofile_view ON tprofile_view.id_profile = tusuario_perfil.id_perfil INNER JOIN tprofile_view ON tprofile_view.id_profile = tusuario_perfil.id_perfil
WHERE tusuario.id_user = '".$config['id_user']."' AND (sec = '*' OR sec = 'head_search')"); WHERE tusuario.id_user = '".$config['id_user']."' AND (sec = '*' OR sec = 'head_search')"
} );
if ($acl_head_search) { }
$table->data[0][11] = ui_print_help_tip (__("Blank characters are used as AND conditions"), true);
if ($acl_head_search) {
// Search bar $table->data[0][11] = ui_print_help_tip(__('Blank characters are used as AND conditions'), true);
$search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">';
if (!isset($config['search_keywords'])) { // Search bar
$search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = true; </script>'; $search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">';
} if (!isset($config['search_keywords'])) {
else { $search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = true; </script>';
if (strlen($config['search_keywords']) == 0) } else {
$search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = true; </script>'; if (strlen($config['search_keywords']) == 0) {
else $search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = true; </script>';
$search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = false; </script>'; } else {
} $search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = false; </script>';
}
$search_bar .= '<input type="text" id="keywords" name="keywords"'; }
if (!isset($config['search_keywords']))
$search_bar .= "value='" . __("Enter keywords to search") . "'"; $search_bar .= '<input type="text" id="keywords" name="keywords"';
else if (strlen($config['search_keywords']) == 0) if (!isset($config['search_keywords'])) {
$search_bar .= "value='" . __("Enter keywords to search") . "'"; $search_bar .= "value='".__('Enter keywords to search')."'";
else } else if (strlen($config['search_keywords']) == 0) {
$search_bar .= "value='" . $config['search_keywords'] . "'"; $search_bar .= "value='".__('Enter keywords to search')."'";
} else {
$search_bar .= 'onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');" $search_bar .= "value='".$config['search_keywords']."'";
}
$search_bar .= 'onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');"
onkeyup="javascript: fieldKeyWordEmpty = false;" onkeyup="javascript: fieldKeyWordEmpty = false;"
style="margin-top:5px;" class="search_input" />'; style="margin-top:5px;" class="search_input" />';
//$search_bar .= 'onClick="javascript: document.quicksearch.submit()"';
$search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
$search_bar .= '</form>';
$table->data[0]['searchbar'] = $search_bar;
}
// Servers check
$servers = array();
$servers["all"] = (int) db_get_value ('COUNT(id_server)','tserver');
$servers["up"] = (int) servers_check_status ();
$servers["down"] = $servers["all"] - $servers["up"];
if ($servers["up"] == 0) {
//All Servers down or no servers at all
$servers_check_img = html_print_image("images/header_down.png", true, array("alt" => 'cross', "class" => 'bot', 'title' => __('All systems').': '.__('Down')));
}
elseif ($servers["down"] != 0) {
//Some servers down
$servers_check_img = html_print_image("images/header_warning.png", true, array("alt" => 'error', "class" => 'bot', 'title' => $servers["down"].' '.__('servers down')));
}
else {
//All servers up
$servers_check_img = html_print_image("images/header_ready.png", true, array("alt" => 'ok', "class" => 'bot', 'title' => __('All systems').': '.__('Ready')));
}
unset ($servers); // Since this is the header, we don't like to trickle down variables.
$servers_link_open = '<a class="white" href="index.php?sec=gservers&amp;sec2=godmode/servers/modificar_server&amp;refr=60">';
$servers_link_close = '</a>';
if ($config['show_qr_code_header'] == 0){
$show_qr_code_header = 'display: none;';
}
else {
$show_qr_code_header = 'display: inline;';
}
$table->data[0]['qr'] =
'<div style="' . $show_qr_code_header . '" id="qr_code_container" style="">' .
'<a href="javascript: show_dialog_qrcode();">' .
html_print_image(
"images/qrcode_icon.png",
true,
array("alt" => __('QR Code of the page'),
'title' => __('QR Code of the page'))) .
'</a>' .
'</div>';
echo "<div style='display: none;' id='qrcode_container' title='" . __('QR code of the page') . "'>";
echo "<div id='qrcode_container_image'></div>";
echo "</div>";
?>
<script type='text/javascript'>
$(document).ready(function() {
$( "#qrcode_container" ).dialog({
autoOpen: false,
modal: true
});
});
</script>
<?php
if ($config['tutorial_mode'] !== 'expert' && !$config['disable_help']) {
$table->data[0]['clippy'] =
'<a href="javascript: show_clippy();">' .
html_print_image(
"images/clippy_icon.png",
true,
array("id" => 'clippy',
"class" => 'clippy',
"alt" => __('%s assistant', get_product_name()),
'title' => __('%s assistant', get_product_name()))) .
'</a>';
}
$table->data[0][0] = $servers_link_open .
$servers_check_img . $servers_link_close;
//======= Autorefresh code =============================
$autorefresh_txt = '';
$autorefresh_additional = '';
$ignored_params = array ('agent_config' => false, 'code' => false);
if (!isset($_GET['sec2'])) {
$_GET['sec2'] = '';
}
if (!isset($_GET['refr'])) {
$_GET['refr'] = null;
}
$select = db_process_sql("SELECT autorefresh_white_list,time_autorefresh FROM tusuario WHERE id_user = '" . $config['id_user'] . "'");
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
if ($autorefresh_list !== null && array_search($_GET['sec2'], $autorefresh_list) !== false) {
$do_refresh = true;
if ($_GET['sec2'] == 'operation/agentes/pandora_networkmap') {
if ((!isset($_GET['tab'])) || ($_GET['tab'] != 'view')) {
$do_refresh = false;
}
}
if ($do_refresh) { // $search_bar .= 'onClick="javascript: document.quicksearch.submit()"';
$autorefresh_img = html_print_image("images/header_refresh.png", true, array("class" => 'bot', "alt" => 'lightning', 'title' => __('Configure autorefresh'))); $search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
$search_bar .= '</form>';
if ($_GET['refr']) {
$autorefresh_txt .= ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
}
$ignored_params['refr'] = '';
$values = get_refresh_time_array();
$autorefresh_additional = '<span id="combo_refr" style="display: none;">';
$autorefresh_additional .= html_print_select ($values, 'ref', '', '', __('Select'), '0', true, false, false);
$autorefresh_additional .= '</span>';
unset ($values);
$autorefresh_link_open_img =
'<a class="white autorefresh" href="' . ui_get_url_refresh ($ignored_params) . '">';
if ($_GET['refr']) {
$autorefresh_link_open_txt =
'<a class="white autorefresh autorefresh_txt" href="' . ui_get_url_refresh ($ignored_params) . '">';
}
else {
$autorefresh_link_open_txt = '<a>';
}
$autorefresh_link_close = '</a>';
}
else {
$autorefresh_img = html_print_image("images/header_refresh_disabled.png", true, array("class" => 'bot autorefresh_disabled', "alt" => 'lightning', 'title' => __('Disabled autorefresh')));
$ignored_params['refr'] = false;
$autorefresh_link_open_img = '';
$autorefresh_link_open_txt = '';
$autorefresh_link_close = '';
}
}
else {
$autorefresh_img = html_print_image("images/header_refresh_disabled.png", true, array("class" => 'bot autorefresh_disabled', "alt" => 'lightning', 'title' => __('Disabled autorefresh')));
$ignored_params['refr'] = false;
$autorefresh_link_open_img = '';
$autorefresh_link_open_txt = '';
$autorefresh_link_close = '';
}
$table->data[0][1] = $autorefresh_link_open_img . $autorefresh_img . $autorefresh_link_close;
$table->data[0][2] = $autorefresh_link_open_txt . $autorefresh_txt . $autorefresh_link_close . $autorefresh_additional;
//======================================================
$check_minor_release_available = false;
$pandora_management = check_acl($config['id_user'], 0, "PM");
$check_minor_release_available = db_check_minor_relase_available ();
if ($check_minor_release_available) {
if (users_is_admin($config['id_user'])) {
if($config['language'] == 'es'){
set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. <a style="font-size:8pt;font-style:italic;" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Actualizacion#Versi.C3.B3n_7.0NG_.28_Rolling_Release_.29">'.__('Sobre actualización de revisión menor').'</a>', 'Revisión/es menor/es disponible/s');
}
else{
set_pandora_error_for_header('There are one or more minor releases waiting for update. <a style="font-size:8pt;font-style:italic;" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Anexo_Upgrade#Version_7.0NG_.28_Rolling_Release_.29">'.__('About minor release update').'</a>', 'minor release/s available');
}
}
}
echo '<div id="alert_messages" style="display: none"></div>';
if ($config["alert_cnt"] > 0) { $table->data[0]['searchbar'] = $search_bar;
$maintenance_link = 'javascript:'; }
$maintenance_title = __("System alerts detected - Please fix as soon as possible");
$maintenance_class = $maintenance_id = 'show_systemalert_dialog white'; // Servers check
$servers = [];
$maintenance_link_open_txt = $servers['all'] = (int) db_get_value('COUNT(id_server)', 'tserver');
'<a href="' . $maintenance_link . '" title="' . $maintenance_title . '" class="' . $maintenance_class . '" id="show_systemalert_dialog">'; $servers['up'] = (int) servers_check_status();
$maintenance_link_open_img = $servers['down'] = ($servers['all'] - $servers['up']);
'<a href="' . $maintenance_link . '" title="' . $maintenance_title . '" class="' . $maintenance_class . '">'; if ($servers['up'] == 0) {
$maintenance_link_close = '</a>'; // All Servers down or no servers at all
if (!$pandora_management) { $servers_check_img = html_print_image('images/header_down.png', true, ['alt' => 'cross', 'class' => 'bot', 'title' => __('All systems').': '.__('Down')]);
$maintenance_img = ''; } else if ($servers['down'] != 0) {
} // Some servers down
else { $servers_check_img = html_print_image('images/header_warning.png', true, ['alt' => 'error', 'class' => 'bot', 'title' => $servers['down'].' '.__('servers down')]);
$maintenance_img = $maintenance_link_open_img . } else {
html_print_image("images/header_yellow.png", // All servers up
true, array( $servers_check_img = html_print_image('images/header_ready.png', true, ['alt' => 'ok', 'class' => 'bot', 'title' => __('All systems').': '.__('Ready')]);
"title" => __('You have %d warning(s)', }
$config["alert_cnt"]),
"id" => "yougotalert", unset($servers);
"class" => "bot")) . $maintenance_link_close; // Since this is the header, we don't like to trickle down variables.
} $servers_link_open = '<a class="white" href="index.php?sec=gservers&amp;sec2=godmode/servers/modificar_server&amp;refr=60">';
} $servers_link_close = '</a>';
else {
if (!$pandora_management) { if ($config['show_qr_code_header'] == 0) {
$maintenance_img = ''; $show_qr_code_header = 'display: none;';
} } else {
else { $show_qr_code_header = 'display: inline;';
$maintenance_img = html_print_image ("images/header_ready.png", true, array ("title" => __('There are not warnings'), "id" => "yougotalert", "class" => "bot")); }
}
} $table->data[0]['qr'] = '<div style="'.$show_qr_code_header.'" id="qr_code_container" style="">'.'<a href="javascript: show_dialog_qrcode();">'.html_print_image(
'images/qrcode_icon.png',
$table->data[0][3] = $maintenance_img; true,
[
// Main help icon 'alt' => __('QR Code of the page'),
if (!$config['disable_help']) { 'title' => __('QR Code of the page'),
$table->data[0][4] = ]
'<a href="#" class="modalpopup" id="helpmodal">' . ).'</a>'.'</div>';
html_print_image("images/header_help.png", true, array(
"title" => __('Main help'), echo "<div style='display: none;' id='qrcode_container' title='".__('QR code of the page')."'>";
"id" => "helpmodal", echo "<div id='qrcode_container_image'></div>";
"class" => "modalpopup")) . echo '</div>';
'</a>'; ?>
} <script type='text/javascript'>
$(document).ready(function() {
// Logout $( "#qrcode_container" ).dialog({
$table->data[0][5] = '<a class="white" href="' . ui_get_full_url('index.php?bye=bye') . '">'; autoOpen: false,
$table->data[0][5] .= html_print_image("images/header_logout.png", true, array("alt" => __('Logout'), "class" => 'bot', "title" => __('Logout'))); modal: true
$table->data[0][5] .= '</a>'; });
});
// User </script>
if (is_user_admin ($config["id_user"]) == 1) <?php
$table->data[0][6] = html_print_image("images/header_user_admin.png" , true, array("title" => __('Edit my user'), "class" => 'bot', "alt" => 'user')); if ($config['tutorial_mode'] !== 'expert' && !$config['disable_help']) {
else $table->data[0]['clippy'] = '<a href="javascript: show_clippy();">'.html_print_image(
$table->data[0][6] = html_print_image("images/header_user.png" , true, array("title" => __('Edit my user'), "class" => 'bot', "alt" => 'user')); 'images/clippy_icon.png',
true,
$table->data[0][6] = '<a href="index.php?sec=workspace&sec2=operation/users/user_edit">' . $table->data[0][6] . '</a>'; [
'id' => 'clippy',
$table->data[0][7] = '<a href="index.php?sec=workspace&amp;sec2=operation/users/user_edit" class="white_bold"> (' . $config["id_user"] . ')</a>'; 'class' => 'clippy',
'alt' => __('%s assistant', get_product_name()),
// Chat messages 'title' => __(
$table->data[0][8] = "<span id='icon_new_messages_chat' style='display: none;'>"; '%s assistant',
$table->data[0][8] .= "<a href='index.php?sec=workspace&sec2=operation/users/webchat'>"; get_product_name()
$table->data[0][8] .= html_print_image('images/header_chat.png', true, array("title" => __('New chat message'))); ),
$table->data[0][8] .= "</a>"; ]
$table->data[0][8] .= "</span>"; ).'</a>';
}
// Messages
$msg_cnt = messages_get_count ($config["id_user"]);
if ($msg_cnt > 0) { $table->data[0][0] = $servers_link_open.$servers_check_img.$servers_link_close;
echo '<div id="dialog_messages" style="display: none"></div>';
$table->data[0][9] = '<a href="ajax.php?page=operation/messages/message_list" title="' . __("Message overview") . '" id="show_messages_dialog">';
$table->data[0][9] .= html_print_image ("images/header_email.png", true, array ("title" => __('You have %d unread message(s)', $msg_cnt), "id" => "yougotmail", "class" => "bot", 'style' => 'width:24px;'));
$table->data[0][9] .= '</a>';
}
html_print_table($table);
// ======= Autorefresh code =============================
unset($table); $autorefresh_txt = '';
?> $autorefresh_additional = '';
</td>
<!-- $ignored_params = [
<td style="text-align:center"> 'agent_config' => false,
<?php 'code' => false,
echo "<a href='index.php?sec=main'>"; ];
if (isset($config["custom_logo"])) {
echo html_print_image("images/custom_logo/" . $config["custom_logo"], true, array("height" => '60', "width" => '139', "alt" => 'Logo')); if (!isset($_GET['sec2'])) {
} $_GET['sec2'] = '';
echo "</a>"; }
?>
</td> if (!isset($_GET['refr'])) {
--> $_GET['refr'] = null;
</tr> }
$select = db_process_sql("SELECT autorefresh_white_list,time_autorefresh FROM tusuario WHERE id_user = '".$config['id_user']."'");
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
if ($autorefresh_list !== null && array_search($_GET['sec2'], $autorefresh_list) !== false) {
$do_refresh = true;
if ($_GET['sec2'] == 'operation/agentes/pandora_networkmap') {
if ((!isset($_GET['tab'])) || ($_GET['tab'] != 'view')) {
$do_refresh = false;
}
}
if ($do_refresh) {
$autorefresh_img = html_print_image('images/header_refresh.png', true, ['class' => 'bot', 'alt' => 'lightning', 'title' => __('Configure autorefresh')]);
if ($_GET['refr']) {
$autorefresh_txt .= ' (<span id="refrcounter">'.date('i:s', $config['refr']).'</span>)';
}
$ignored_params['refr'] = '';
$values = get_refresh_time_array();
$autorefresh_additional = '<span id="combo_refr" style="display: none;">';
$autorefresh_additional .= html_print_select($values, 'ref', '', '', __('Select'), '0', true, false, false);
$autorefresh_additional .= '</span>';
unset($values);
$autorefresh_link_open_img = '<a class="white autorefresh" href="'.ui_get_url_refresh($ignored_params).'">';
if ($_GET['refr']) {
$autorefresh_link_open_txt = '<a class="white autorefresh autorefresh_txt" href="'.ui_get_url_refresh($ignored_params).'">';
} else {
$autorefresh_link_open_txt = '<a>';
}
$autorefresh_link_close = '</a>';
} else {
$autorefresh_img = html_print_image('images/header_refresh_disabled.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]);
$ignored_params['refr'] = false;
$autorefresh_link_open_img = '';
$autorefresh_link_open_txt = '';
$autorefresh_link_close = '';
}
} else {
$autorefresh_img = html_print_image('images/header_refresh_disabled.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]);
$ignored_params['refr'] = false;
$autorefresh_link_open_img = '';
$autorefresh_link_open_txt = '';
$autorefresh_link_close = '';
}
$table->data[0][1] = $autorefresh_link_open_img.$autorefresh_img.$autorefresh_link_close;
$table->data[0][2] = $autorefresh_link_open_txt.$autorefresh_txt.$autorefresh_link_close.$autorefresh_additional;
// ======================================================
$check_minor_release_available = false;
$pandora_management = check_acl($config['id_user'], 0, 'PM');
$check_minor_release_available = db_check_minor_relase_available();
if ($check_minor_release_available) {
if (users_is_admin($config['id_user'])) {
if ($config['language'] == 'es') {
set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. <a style="font-size:8pt;font-style:italic;" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Actualizacion#Versi.C3.B3n_7.0NG_.28_Rolling_Release_.29">'.__('Sobre actualización de revisión menor').'</a>', 'Revisión/es menor/es disponible/s');
} else {
set_pandora_error_for_header('There are one or more minor releases waiting for update. <a style="font-size:8pt;font-style:italic;" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Anexo_Upgrade#Version_7.0NG_.28_Rolling_Release_.29">'.__('About minor release update').'</a>', 'minor release/s available');
}
}
}
echo '<div id="alert_messages" style="display: none"></div>';
if ($config['alert_cnt'] > 0) {
$maintenance_link = 'javascript:';
$maintenance_title = __('System alerts detected - Please fix as soon as possible');
$maintenance_class = $maintenance_id = 'show_systemalert_dialog white';
$maintenance_link_open_txt = '<a href="'.$maintenance_link.'" title="'.$maintenance_title.'" class="'.$maintenance_class.'" id="show_systemalert_dialog">';
$maintenance_link_open_img = '<a href="'.$maintenance_link.'" title="'.$maintenance_title.'" class="'.$maintenance_class.'">';
$maintenance_link_close = '</a>';
if (!$pandora_management) {
$maintenance_img = '';
} else {
$maintenance_img = $maintenance_link_open_img.html_print_image(
'images/header_yellow.png',
true,
[
'title' => __(
'You have %d warning(s)',
$config['alert_cnt']
),
'id' => 'yougotalert',
'class' => 'bot',
]
).$maintenance_link_close;
}
} else {
if (!$pandora_management) {
$maintenance_img = '';
} else {
$maintenance_img = html_print_image('images/header_ready.png', true, ['title' => __('There are not warnings'), 'id' => 'yougotalert', 'class' => 'bot']);
}
}
$table->data[0][3] = $maintenance_img;
// Main help icon
if (!$config['disable_help']) {
$table->data[0][4] = '<a href="#" class="modalpopup" id="helpmodal">'.html_print_image(
'images/header_help.png',
true,
[
'title' => __('Main help'),
'id' => 'helpmodal',
'class' => 'modalpopup',
]
).'</a>';
}
// Logout
$table->data[0][5] = '<a class="white" href="'.ui_get_full_url('index.php?bye=bye').'">';
$table->data[0][5] .= html_print_image('images/header_logout.png', true, ['alt' => __('Logout'), 'class' => 'bot', 'title' => __('Logout')]);
$table->data[0][5] .= '</a>';
// User
if (is_user_admin($config['id_user']) == 1) {
$table->data[0][6] = html_print_image('images/header_user_admin.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
} else {
$table->data[0][6] = html_print_image('images/header_user.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
}
$table->data[0][6] = '<a href="index.php?sec=workspace&sec2=operation/users/user_edit">'.$table->data[0][6].'</a>';
$table->data[0][7] = '<a href="index.php?sec=workspace&amp;sec2=operation/users/user_edit" class="white_bold"> ('.$config['id_user'].')</a>';
// Chat messages
$table->data[0][8] = "<span id='icon_new_messages_chat' style='display: none;'>";
$table->data[0][8] .= "<a href='index.php?sec=workspace&sec2=operation/users/webchat'>";
$table->data[0][8] .= html_print_image('images/header_chat.png', true, ['title' => __('New chat message')]);
$table->data[0][8] .= '</a>';
$table->data[0][8] .= '</span>';
// Messages
$msg_cnt = messages_get_count($config['id_user']);
if ($msg_cnt > 0) {
echo '<div id="dialog_messages" style="display: none"></div>';
$table->data[0][9] = '<a href="ajax.php?page=operation/messages/message_list" title="'.__('Message overview').'" id="show_messages_dialog">';
$table->data[0][9] .= html_print_image('images/header_email.png', true, ['title' => __('You have %d unread message(s)', $msg_cnt), 'id' => 'yougotmail', 'class' => 'bot', 'style' => 'width:24px;']);
$table->data[0][9] .= '</a>';
}
html_print_table($table);
unset($table);
?>
</td>
<!--
<td style="text-align:center">
<?php
echo "<a href='index.php?sec=main'>";
if (isset($config['custom_logo'])) {
echo html_print_image('images/custom_logo/'.$config['custom_logo'], true, ['height' => '60', 'width' => '139', 'alt' => 'Logo']);
}
echo '</a>';
?>
</td>
-->
</tr>
</table> </table>
<script type="text/javascript"> <script type="text/javascript">
/* <![CDATA[ */ /* <![CDATA[ */
<?php <?php
$config_fixed_header = false; $config_fixed_header = false;
if (isset($config['fixed_header'])) { if (isset($config['fixed_header'])) {
$config_fixed_header = $config['fixed_header']; $config_fixed_header = $config['fixed_header'];
} }
?> ?>
var fixed_header = <?php echo json_encode((bool)$config_fixed_header); ?>; var fixed_header = <?php echo json_encode((bool) $config_fixed_header); ?>;
var new_chat = <?php echo (int)$_SESSION['new_chat'];?>; var new_chat = <?php echo (int) $_SESSION['new_chat']; ?>;
$(document).ready (function () { $(document).ready (function () {
<?php <?php
if (($autorefresh_list !== null) && (array_search($_GET['sec2'], $autorefresh_list) !== false) && (!isset($_GET["refr"]))) { if (($autorefresh_list !== null) && (array_search($_GET['sec2'], $autorefresh_list) !== false) && (!isset($_GET['refr']))) {
$do_refresh = true; $do_refresh = true;
if ($_GET['sec2'] == 'operation/agentes/pandora_networkmap') { if ($_GET['sec2'] == 'operation/agentes/pandora_networkmap') {
if ((!isset($_GET['tab'])) || ($_GET['tab'] != 'view')) { if ((!isset($_GET['tab'])) || ($_GET['tab'] != 'view')) {
$do_refresh = false; $do_refresh = false;
} }
} }
$new_dashboard = get_parameter('new_dashboard',0);
if ($_GET['sec2'] == 'enterprise/dashboard/main_dashboard' && $new_dashboard) {
$do_refresh = false;
}
if ($do_refresh) { $new_dashboard = get_parameter('new_dashboard', 0);
?>
$("a.autorefresh_txt").toggle ();
$("#combo_refr").toggle ();
$("#combo_refr").css('padding-right', '9px');
href = $("a.autorefresh").attr ("href");
<?php
if($select[0]['time_autorefresh']){
?>
var refresh = '<?php echo $select[0]["time_autorefresh"] ?>';
$(document).attr ("location", href + refresh);
<?php
}
?>
<?php
}
}
?>
if (fixed_header) { if ($_GET['sec2'] == 'enterprise/dashboard/main_dashboard' && $new_dashboard) {
$('div#head').addClass('fixed_header'); $do_refresh = false;
$('div#page') }
.css('padding-top', $('div#head').innerHeight() + 'px')
.css('position', 'relative');
}
check_new_chats_icon('icon_new_messages_chat');
/* Temporal fix to hide graphics when ui_dialog are displayed */
$("#yougotalert").click(function () {
$("#agent_access").css("display", "none");
});
$("#ui_close_dialog_titlebar").click(function () {
$("#agent_access").css("display","");
});
function blinkmail(){
$("#yougotmail").delay(100).fadeTo(300,0.2).delay(100).fadeTo(300,1, blinkmail);
}
function blinkalert(){
$("#yougotalert").delay(100).fadeTo(300,0.2).delay(100).fadeTo(300,1, blinkalert);
}
function blinkpubli(){
$(".publienterprise").delay(100).fadeTo(300,0.2).delay(100).fadeTo(300,1, blinkpubli);
}
<?php
if ($msg_cnt > 0) {
?>
blinkmail();
<?php
}
?>
<?php
if ($config["alert_cnt"] > 0) {
?>
blinkalert();
<?php
}
?>
blinkpubli();
<?php if ($do_refresh) {
if ($_GET["refr"]) { ?>
?> $("a.autorefresh_txt").toggle ();
var refr_time = <?php echo (int) get_parameter("refr", 0); ?>; $("#combo_refr").toggle ();
var t = new Date(); $("#combo_refr").css('padding-right', '9px');
t.setTime (t.getTime () + href = $("a.autorefresh").attr ("href");
parseInt(<?php echo $config["refr"] * 1000; ?>)); <?php
$("#refrcounter").countdown ({until: t, if ($select[0]['time_autorefresh']) {
layout: '%M%nn%M:%S%nn%S', ?>
labels: ['', '', '', '', '', '', ''], var refresh = '<?php echo $select[0]['time_autorefresh']; ?>';
onExpiry: function () { $(document).attr ("location", href + refresh);
href = $("a.autorefresh").attr ("href"); <?php
href = href + refr_time; }
$(document).attr ("location", href); ?>
}
}); <?php
<?php }
} }
?> ?>
$("a.autorefresh").click (function () { if (fixed_header) {
$("a.autorefresh_txt").toggle (); $('div#head').addClass('fixed_header');
$("#combo_refr").toggle (); $('div#page')
$("#combo_refr").css('padding-right', '9px'); .css('padding-top', $('div#head').innerHeight() + 'px')
$("select#ref").change (function () { .css('position', 'relative');
href = $("a.autorefresh").attr ("href"); }
$(document).attr ("location", href + this.value);
}); check_new_chats_icon('icon_new_messages_chat');
return false; /* Temporal fix to hide graphics when ui_dialog are displayed */
}); $("#yougotalert").click(function () {
}); $("#agent_access").css("display", "none");
});
$("#ui_close_dialog_titlebar").click(function () {
$("#agent_access").css("display","");
});
function blinkmail(){
$("#yougotmail").delay(100).fadeTo(300,0.2).delay(100).fadeTo(300,1, blinkmail);
}
function blinkalert(){
$("#yougotalert").delay(100).fadeTo(300,0.2).delay(100).fadeTo(300,1, blinkalert);
}
function blinkpubli(){
$(".publienterprise").delay(100).fadeTo(300,0.2).delay(100).fadeTo(300,1, blinkpubli);
}
<?php
if ($msg_cnt > 0) {
?>
blinkmail();
<?php
}
?>
<?php
if ($config['alert_cnt'] > 0) {
?>
blinkalert();
<?php
}
?>
blinkpubli();
<?php
if ($_GET['refr']) {
?>
var refr_time = <?php echo (int) get_parameter('refr', 0); ?>;
var t = new Date();
t.setTime (t.getTime () +
parseInt(<?php echo ($config['refr'] * 1000); ?>));
$("#refrcounter").countdown ({until: t,
layout: '%M%nn%M:%S%nn%S',
labels: ['', '', '', '', '', '', ''],
onExpiry: function () {
href = $("a.autorefresh").attr ("href");
href = href + refr_time;
$(document).attr ("location", href);
}
});
<?php
}
?>
$("a.autorefresh").click (function () {
$("a.autorefresh_txt").toggle ();
$("#combo_refr").toggle ();
$("#combo_refr").css('padding-right', '9px');
$("select#ref").change (function () {
href = $("a.autorefresh").attr ("href");
$(document).attr ("location", href + this.value);
});
return false;
});
});
/* ]]> */ /* ]]> */
</script> </script>

View File

@ -4,11 +4,9 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2016 Artica Soluciones Tecnologicas // Copyright (c) 2005-2016 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -20,35 +18,36 @@
global $config; global $config;
include_once("include/functions_update_manager.php"); require_once 'include/functions_update_manager.php';
$message = array(); $message = [];
if (is_ajax()) { if (is_ajax()) {
$message_id = get_parameter('message_id', false);
$message_id = get_parameter ('message_id', false); if ($message_id === false) {
if ($message_id === false) return false; return false;
$message = update_manger_get_single_message ($message_id); }
$message = update_manger_get_single_message($message_id);
} else { } else {
$message = update_manger_get_last_message();
$message = update_manger_get_last_message ();
if ($message === false) return false; if ($message === false) {
return false;
}
update_manger_set_read_message($message["svn_version"], 1); update_manger_set_read_message($message['svn_version'], 1);
update_manager_remote_read_messages ($message["svn_version"]); update_manager_remote_read_messages($message['svn_version']);
} }
// Prints first step pandora registration // Prints first step pandora registration
echo '<div id="message_id_dialog" title="' . echo '<div id="message_id_dialog" title="'.io_safe_output($message['db_field_value']).'">';
io_safe_output($message['db_field_value']) . '">';
echo '<div>';
echo '<div>'; echo io_safe_output_html($message['data']);
echo io_safe_output_html($message["data"]); echo '</div>';
echo '</div>';
echo '</div>'; echo '</div>';
?> ?>
@ -57,17 +56,17 @@ echo '</div>';
/* <![CDATA[ */ /* <![CDATA[ */
$(document).ready (function () { $(document).ready (function () {
$("#message_id_dialog").dialog({ $("#message_id_dialog").dialog({
resizable: true, resizable: true,
draggable: true, draggable: true,
modal: true, modal: true,
width: 850 width: 850
}); });
$(".ui-widget-overlay").css("background", "#000"); $(".ui-widget-overlay").css("background", "#000");
$(".ui-widget-overlay").css("opacity", 0.6); $(".ui-widget-overlay").css("opacity", 0.6);
}); });
/* ]]> */ /* ]]> */

View File

@ -1,392 +1,542 @@
<html> <html>
<head> <head>
<title>Licencia P&uacute;blica GNU</title> <title>Licencia P&uacute;blica GNU</title>
</head> </head>
<body> <body>
<h2>Licencia P&uacute;blica GNU</h2>
<h2>Licencia P&uacute;blica GNU</h2> <h3>Contenido</h3>
<h3>Contenido</h3>
<ul> <ul>
<li><a href="#SEC1">Licencia P&uacute;blica GNU</a></li> <li><a href="#SEC1">Licencia P&uacute;blica GNU</a></li>
<li><a href="#SEC2">Pre&aacute;mbulo</a></li> <li><a href="#SEC2">Pre&aacute;mbulo</a></li>
<li><a href="#SEC3">T&eacute;rminos y condiciones para la copia, <li>
distribuci&oacute;n y modificaci&oacute;n</a></li> <a href="#SEC3"
<li><a href="#APPENDIX">Ap&eacute;ndice: C&oacute;mo aplicar estos >T&eacute;rminos y condiciones para la copia, distribuci&oacute;n y
t&eacute;rminos a sus nuevos programas</a></li> modificaci&oacute;n</a
</ul> >
<br> </li>
<h3><a name="SEC1">Licencia P&uacute;blica GNU</a></h3> <li>
<p> <a href="#APPENDIX"
Esta es la conocida GNU Public License (GPL), versi&oacute;n 2 (de junio >Ap&eacute;ndice: C&oacute;mo aplicar estos t&eacute;rminos a sus
de 1.991), que cubre la mayor parte del software de la Free Software Foundation, nuevos programas</a
y muchos m&aacute;s programas.</p> >
</li>
</ul>
<br />
<h3><a name="SEC1">Licencia P&uacute;blica GNU</a></h3>
<p>
Esta es la conocida GNU Public License (GPL), versi&oacute;n 2 (de junio
de 1.991), que cubre la mayor parte del software de la Free Software
Foundation, y muchos m&aacute;s programas.
</p>
<p>Los autores de esta traducci&oacute;n son:</p> <p>Los autores de esta traducci&oacute;n son:</p>
<ul><li><a href="mailto:jgb@computer.org">Jes&uacute;s Gonz&aacute;lez Barahona</a> <ul>
</li><li><a href="mailto:pheras@acm.org">Pedro de las Heras Quir&oacute;s</a> <li>
</li></ul> <a href="mailto:jgb@computer.org"
>Jes&uacute;s Gonz&aacute;lez Barahona</a
>
</li>
<li>
<a href="mailto:pheras@acm.org">Pedro de las Heras Quir&oacute;s</a>
</li>
</ul>
<blockquote> <blockquote>
<hr> <hr />
<b>NOTA IMPORTANTE:</b> <b>NOTA IMPORTANTE:</b>
<p> <p>
Esta es una traducci&oacute;n no oficial al espa&ntilde;ol de la GNU General Public Esta es una traducci&oacute;n no oficial al espa&ntilde;ol de la GNU
License. No ha sido publicada por la Free Software Foundation, y no General Public License. No ha sido publicada por la Free Software
establece legalmente las condiciones de distribuci&oacute;n para el software Foundation, y no establece legalmente las condiciones de
que usa la GNU GPL. Estas condiciones se establecen solamente por distribuci&oacute;n para el software que usa la GNU GPL. Estas
el texto original, en ingl&eacute;s, de la GNU GPL. Sin embargo, esperamos condiciones se establecen solamente por el texto original, en
que esta traducci&oacute;n ayude a los hispanohablantes a entender mejor la ingl&eacute;s, de la GNU GPL. Sin embargo, esperamos que esta
GNU GPL. traducci&oacute;n ayude a los hispanohablantes a entender mejor la GNU
</p><p> GPL.
</p>
<p><b>IMPORTANT NOTICE:</b></p>
<p>
This is an unofficial translation of the GNU General Public License into
Spanish. It was not published by the Free Software Foundation, and does
not legally state the distribution terms for software that uses the GNU
GPL--only the original English text of the GNU GPL does that. However,
we hope that this translation will help Spanish speakers understand the
GNU GPL better.
</p>
<p></p>
<hr />
</blockquote>
<b>IMPORTANT NOTICE:</b> <p>Copyright (C) 1989, 1991 Free Software Foundation, Inc.</p>
</p><p> <p>675 Mass Ave, Cambridge, MA 02139, EEUU</p>
This is an unofficial translation of the GNU General Public License <p>
into Spanish. It was not published by the Free Software Se permite la copia y distribuci&oacute;n de copias literales de este
Foundation, and does not legally state the distribution terms for documento, pero no se permite su modificaci&oacute;n.
software that uses the GNU GPL--only the original English text of </p>
the GNU GPL does that. However, we hope that this translation will
help Spanish speakers understand the GNU GPL better.
</p><p>
</p><hr>
</blockquote>
<p>Copyright (C) 1989, 1991 Free Software Foundation, Inc. <h3><a name="SEC2">Pre&aacute;mbulo</a></h3>
</p><p>675 Mass Ave, Cambridge, MA 02139, EEUU <p>
</p><p>Se permite la copia y distribuci&oacute;n de copias literales de este Las licencias que cubren la mayor parte del software est&aacute;n
documento, pero no se permite su modificaci&oacute;n. dise&ntilde;adas para quitarle a usted la libertad de compartirlo y
</p> modificarlo. Por el contrario, la Licencia P&uacute;blica General de GNU
pretende garantizarle la libertad de compartir y modificar software libre,
para asegurar que el software es libre para todos sus usuarios. Esta
Licencia P&uacute;blica General se aplica a la mayor parte del software
del la Free Software Foundation y a cualquier otro programa si sus autores
se comprometen a utilizarla. (Existe otro software de la Free Software
Foundation que est&aacute; cubierto por la Licencia P&uacute;blica General
de GNU para Bibliotecas). Si quiere, tambi&eacute;n puede aplicarla a sus
propios programas.
</p>
<p>
Cuando hablamos de software libre, estamos refiri&eacute;ndonos a
libertad, no a precio. Nuestras Licencias P&uacute;blicas Generales
est&aacute;n dise&ntilde;adas para asegurarnos de que tenga la libertad de
distribuir copias de software libre (y cobrar por ese servicio si quiere),
de que reciba el c&oacute;digo fuente o que pueda conseguirlo si lo
quiere, de que pueda modificar el software o usar fragmentos de &eacute;l
en nuevos programas libres, y de que sepa que puede hacer todas estas
cosas.
</p>
<p>
Para proteger sus derechos necesitamos algunas restricciones que prohiban
a cualquiera negarle a usted estos derechos o pedirle que renuncie a
ellos. Estas restricciones se traducen en ciertas obligaciones que le
afectan si distribuye copias del software, o si lo modifica.
</p>
<p>
Por ejemplo, si distribuye copias de uno de estos programas, sea
gratuitamente, o a cambio de una contraprestaci&oacute;n, debe dar a los
receptores todos los derechos que tiene. Debe asegurarse de que ellos
tambi&eacute;n reciben, o pueden conseguir, el c&oacute;digo fuente. Y
debe mostrarles estas condiciones de forma que conozcan sus derechos.
</p>
<p>Protegemos sus derechos con la combinaci&oacute;n de dos medidas:</p>
<ol type="1">
<li>Ponemos el software bajo copyright y</li>
<li>
le ofrecemos esta licencia, que le da permiso legal para copiar,
distribuir y/o modificar el software.
</li>
</ol>
<p>
Tambi&eacute;n, para la protecci&oacute;n de cada autor y la nuestra
propia, queremos asegurarnos de que todo el mundo comprende que no se
proporciona ninguna garant&iacute;a para este software libre. Si el
software se modifica por cualquiera y &eacute;ste a su vez lo distribuye,
queremos que sus receptores sepan que lo que tienen no es el original, de
forma que cualquier problema introducido por otros no afecte a la
reputaci&oacute;n de los autores originales.
</p>
<p>
Por &uacute;ltimo, cualquier programa libre est&aacute; constantemente
amenazado por patentes sobre el software. Queremos evitar el peligro de
que los redistribuidores de un programa libre obtengan patentes por su
cuenta, convirtiendo de facto el programa en propietario. Para evitar
esto, hemos dejado claro que cualquier patente debe ser pedida para el uso
libre de cualquiera, o no ser pedida.
</p>
<p>
Los t&eacute;rminos exactos y las condiciones para la copia,
distribuci&oacute;n y modificaci&oacute;n se exponen a
continuaci&oacute;n.
</p>
<h3>
<a name="SEC3"
>T&eacute;rminos y condiciones para la copia, distribuci&oacute;n y
modificaci&oacute;n</a
>
</h3>
<h3><a name="SEC2">Pre&aacute;mbulo</a></h3> <ol type="1">
<p> <li>
Las licencias que cubren la mayor parte del software est&aacute;n dise&ntilde;adas Esta Licencia se aplica a cualquier programa u otro tipo de trabajo que
para quitarle a usted la libertad de compartirlo y modificarlo. Por el contenga una nota colocada por el tenedor del copyright diciendo que
contrario, la Licencia P&uacute;blica General de GNU pretende garantizarle puede ser distribuido bajo los t&eacute;rminos de esta Licencia
la libertad de compartir y modificar software libre, para asegurar que P&uacute;blica General. En adelante, &laquo;Programa&raquo; se
el software es libre para todos sus usuarios. Esta Licencia P&uacute;blica referir&aacute; a cualquier programa o trabajo que cumpla esa
General se aplica a la mayor parte del software del la Free Software Foundation condici&oacute;n y &laquo;trabajo basado en el Programa&raquo; se
y a cualquier otro programa si sus autores se comprometen a utilizarla. referir&aacute; bien al Programa o a cualquier trabajo derivado de
(Existe otro software de la Free Software Foundation que est&aacute; cubierto &eacute;l seg&uacute;n la ley de copyright. Esto es, un trabajo que
por la Licencia P&uacute;blica General de GNU para Bibliotecas). Si quiere, contenga el programa o una proci&oacute;n de &eacute;l, bien en forma
tambi&eacute;n puede aplicarla a sus propios programas.</p> literal o con modificaciones y/o traducido en otro lenguaje. Por lo
<p>Cuando hablamos de software libre, estamos refiri&eacute;ndonos a libertad, tanto, la traducci&oacute;n est&aacute; incluida sin limitaciones en el
no a precio. Nuestras Licencias P&uacute;blicas Generales est&aacute;n t&eacute;rmino &laquo;modificaci&oacute;n&raquo;. Cada concesionario
dise&ntilde;adas para asegurarnos de que tenga la libertad de distribuir (licenciatario) ser&aacute; denominado &laquo;usted&raquo;.
copias de software libre (y cobrar por ese servicio si quiere), de que <p>
reciba el c&oacute;digo fuente o que pueda conseguirlo si lo quiere, de Cualquier otra actividad que no sea la copia, distribuci&oacute;n o
que pueda modificar el software o usar fragmentos de &eacute;l en nuevos modificaci&oacute;n no est&aacute; cubierta por esta Licencia,
programas libres, y de que sepa que puede hacer todas estas cosas. est&aacute; fuera de su &aacute;mbito. El acto de ejecutar el Programa
</p><p>Para proteger sus derechos necesitamos algunas restricciones que prohiban no est&aacute; restringido, y los resultados del Programa est&aacute;n
a cualquiera negarle a usted estos derechos o pedirle que renuncie a ellos. cubiertos &uacute;nicamente si sus contenidos constituyen un trabajo
Estas restricciones se traducen en ciertas obligaciones que le afectan basado en el Programa, independientemente de haberlo producido
si distribuye copias del software, o si lo modifica. mediante la ejecuci&oacute;n del programa. El que esto se cumpla,
</p><p>Por ejemplo, si distribuye copias de uno de estos programas, sea gratuitamente, depende de lo que haga el programa.
o a cambio de una contraprestaci&oacute;n, debe dar a los receptores todos </p>
los derechos que tiene. Debe asegurarse de que ellos tambi&eacute;n reciben, </li>
o pueden conseguir, el c&oacute;digo fuente. Y debe mostrarles estas condiciones <li>
de forma que conozcan sus derechos. Usted puede copiar y distribuir copias literales del c&oacute;digo
</p><p>Protegemos sus derechos con la combinaci&oacute;n de dos medidas: fuente del Programa, seg&uacute;n lo has recibido, en cualquier medio,
</p><ol type="1"> supuesto que de forma adecuada y bien visible publique en cada copia un
<li>Ponemos el software bajo copyright y anuncio de copyright adecuado y un repudio de garant&iacute;a, mantenga
</li><li>le ofrecemos esta licencia, que le da permiso legal para copiar, distribuir intactos todos los anuncios que se refieran a esta Licencia y a la
y/o modificar el software.</li></ol> ausencia de garant&iacute;a, y proporcione a cualquier otro receptor del
<p> programa una copia de esta Licencia junto con el Programa.
Tambi&eacute;n, para la protecci&oacute;n de cada autor y la nuestra propia, <p>
queremos asegurarnos de que todo el mundo comprende que no se proporciona Puede cobrar un precio por el acto f&iacute;sico de transferir una
ninguna garant&iacute;a para este software libre. Si el software se modifica copia, y puede, seg&uacute;n su libre albedr&iacute;o, ofrecer
por cualquiera y &eacute;ste a su vez lo distribuye, queremos que sus receptores garant&iacute;a a cambio de unos honorarios.
sepan que lo que tienen no es el original, de forma que cualquier problema </p>
introducido por otros no afecte a la reputaci&oacute;n de los autores originales.</p> </li>
<p>Por &uacute;ltimo, cualquier programa libre est&aacute; constantemente <li>
amenazado por patentes sobre el software. Queremos evitar el peligro de Puede modificar su copia o copias del Programa o de cualquier
que los redistribuidores de un programa libre obtengan patentes por su porci&oacute;n de &eacute;l, formando de esta manera un trabajo basado
cuenta, convirtiendo de facto el programa en propietario. Para evitar esto, en el Programa, y copiar y distribuir esa modificaci&oacute;n o trabajo
hemos dejado claro que cualquier patente debe ser pedida para el uso libre bajo los t&eacute;rminos del apartado 1, antedicho, supuesto que
de cualquiera, o no ser pedida. adem&aacute;s cumpla las siguientes condiciones:
</p><p>Los t&eacute;rminos exactos y las condiciones para la copia, distribuci&oacute;n <ol type="a">
y modificaci&oacute;n se exponen a continuaci&oacute;n.</p> <li>
Debe hacer que los ficheros modificados lleven anuncios prominentes
indicando que los ha cambiado y la fecha de cualquier cambio.
</li>
<li>
Debe hacer que cualquier trabajo que distribuya o publique y que en
todo o en parte contenga o sea derivado del Programa o de cualquier
parte de &eacute;l sea licenciada como un todo, sin carga alguna, a
todas las terceras partes y bajo los t&eacute;rminos de esta
Licencia.
</li>
<li>
Si el programa modificado lee normalmente &oacute;rdenes
interactivamente cuando es ejecutado, debe hacer que, cuando
comience su ejecuci&oacute;n para ese uso interactivo de la forma
m&aacute;s habitual, muestre o escriba un mensaje que incluya un
anuncio de copyright y un anuncio de que no se ofrece ninguna
garant&iacute;a (o por el contrario que s&iacute; se ofrece
garant&iacute;a) y que los usuarios pueden redistribuir el programa
bajo estas condiciones, e indicando al usuario c&oacute;mo ver una
copia de esta licencia. (Excepci&oacute;n: si el propio programa es
interactivo pero normalmente no muestra ese anuncio, no se requiere
que su trabajo basado en el Programa muestre ning&uacute;n anuncio).
</li>
</ol>
Estos requisitos se aplican al trabajo modificado como un todo. Si
partes identificables de ese trabajo no son derivadas del Programa, y
pueden, razonablemente, ser consideradas trabajos independientes y
separados por ellos mismos, entonces esta Licencia y sus t&eacute;rminos
no se aplican a esas partes cuando sean distribuidas como trabajos
separados. Pero cuando distribuya esas mismas secciones como partes de
un todo que es un trabajo basado en el Programa, la distribuci&oacute;n
del todo debe ser seg&uacute;n los t&eacute;rminos de esta licencia,
cuyos permisos para otros licenciatarios se extienden al todo completo,
y por lo tanto a todas y cada una de sus partes, con independencia de
qui&eacute;n la escribi&oacute;.
<p>
Por lo tanto, no es la intenci&oacute;n de este apartado reclamar
derechos o desafiar sus derechos sobre trabajos escritos totalmente
por usted mismo. El intento es ejercer el derecho a controlar la
distribuci&oacute;n de trabajos derivados o colectivos basados en el
Programa.
</p>
<p>
Adem&aacute;s, el simple hecho de reunir un trabajo no basado en el
Programa con el Programa (o con un trabajo basado en el Programa) en
un volumen de almacenamiento o en un medio de distribuci&oacute;n no
hace que dicho trabajo entre dentro del &aacute;mbito cubierto por
esta Licencia.
</p>
</li>
<li>
Puede copiar y distribuir el Programa (o un trabajo basado en &eacute;l,
seg&uacute;n se especifica en el apartado 2, como c&oacute;digo objeto o
en formato ejecutable seg&uacute;n los t&eacute;rminos de los apartados
1 y 2, supuesto que adem&aacute;s cumpla una de las siguientes
condiciones:
<ol type="a">
<li>
Acompa&ntilde;arlo con el c&oacute;digo fuente completo
correspondiente, en formato electr&oacute;nico, que debe ser
distribuido seg&uacute;n se especifica en los apartados 1 y 2 de
esta Licencia en un medio habitualmente utilizado para el
intercambio de programas, o
</li>
<li>
Acompa&ntilde;arlo con una oferta por escrito, v&aacute;lida durante
al menos tres a&ntilde;os, de proporcionar a cualquier tercera parte
una copia completa en formato electr&oacute;nico del c&oacute;digo
fuente correspondiente, a un coste no mayor que el de realizar
f&iacute;sicamente la distribuci&oacute;n del fuente, que
ser&aacute; distribuido bajo las condiciones descritas en los
apartados 1 y 2 anteriores, en un medio habitualmente utilizado para
el intercambio de programas, o
</li>
<li>
Acompa&ntilde;arlo con la informaci&oacute;n que recibiste
ofreciendo distribuir el c&oacute;digo fuente correspondiente. (Esta
opci&oacute;n se permite s&oacute;lo para distribuci&oacute;n no
comercial y s&oacute;lo si usted recibi&oacute; el programa como
c&oacute;digo objeto o en formato ejecutable con tal oferta, de
acuerdo con el apartado b anterior).
</li>
</ol>
Por c&oacute;digo fuente de un trabajo se entiende la forma preferida
del trabajo cuando se le hacen modificaciones. Para un trabajo
ejecutable, se entiende por c&oacute;digo fuente completo todo el
c&oacute;digo fuente para todos los m&oacute;dulos que contiene,
m&aacute;s cualquier fichero asociado de definici&oacute;n de
interfaces, m&aacute;s los guiones utilizados para controlar la
compilaci&oacute;n e instalaci&oacute;n del ejecutable. Como
excepci&oacute;n especial el c&oacute;digo fuente distribuido no
necesita incluir nada que sea distribuido normalmente (bien como fuente,
bien en forma binaria) con los componentes principales (compilador,
kernel y similares) del sistema operativo en el cual funciona el
ejecutable, a no ser que el propio componente acompa&ntilde;e al
ejecutable.
<p>
Si la distribuci&oacute;n del ejecutable o del c&oacute;digo objeto se
hace mediante la oferta acceso para copiarlo de un cierto lugar,
entonces se considera la oferta de acceso para copiar el c&oacute;digo
fuente del mismo lugar como distribuci&oacute;n del c&oacute;digo
fuente, incluso aunque terceras partes no est&eacute;n forzadas a
copiar el fuente junto con el c&oacute;digo objeto.
</p>
</li>
<li>
No puede copiar, modificar, sublicenciar o distribuir el Programa
excepto como prev&eacute; expresamente esta Licencia. Cualquier intento
de copiar, modificar sublicenciar o distribuir el Programa de otra forma
es inv&aacute;lida, y har&aacute; que cesen autom&aacute;ticamente los
derechos que te proporciona esta Licencia. En cualquier caso, las partes
que hayan recibido copias o derechos de usted bajo esta Licencia no
cesar&aacute;n en sus derechos mientras esas partes contin&uacute;en
cumpli&eacute;ndola.
</li>
<li>
No est&aacute; obligado a aceptar esta licencia, ya que no la ha
firmado. Sin embargo, no hay hada m&aacute;s que le proporcione permiso
para modificar o distribuir el Programa o sus trabajos derivados. Estas
acciones est&aacute;n prohibidas por la ley si no acepta esta Licencia.
Por lo tanto, si modifica o distribuye el Programa (o cualquier trabajo
basado en el Programa), est&aacute; indicando que acepta esta Licencia
para poder hacerlo, y todos sus t&eacute;rminos y condiciones para
copiar, distribuir o modificar el Programa o trabajos basados en
&eacute;l.
</li>
<li>
Cada vez que redistribuya el Programa (o cualquier trabajo basado en el
Programa), el receptor recibe autom&aacute;ticamente una licencia del
licenciatario original para copiar, distribuir o modificar el Programa,
de forma sujeta a estos t&eacute;rminos y condiciones. No puede imponer
al receptor ninguna restricci&oacute;n m&aacute;s sobre el ejercicio de
los derechos aqu&iacute; garantizados. No es usted responsable de hacer
cumplir esta licencia por terceras partes.
</li>
<li>
Si como consecuencia de una resoluci&oacute;n judicial o de una
alegaci&oacute;n de infracci&oacute;n de patente o por cualquier otra
raz&oacute;n (no limitada a asuntos relacionados con patentes) se le
imponen condiciones (ya sea por mandato judicial, por acuerdo o por
cualquier otra causa) que contradigan las condiciones de esta Licencia,
ello no le exime de cumplir las condiciones de esta Licencia. Si no
puede realizar distribuciones de forma que se satisfagan
simult&aacute;neamente sus obligaciones bajo esta licencia y cualquier
otra obligaci&oacute;n pertinente entonces, como consecuencia, no puede
distribuir el Programa de ninguna forma. Por ejemplo, si una patente no
permite la redistribuci&oacute;n libre de derechos de autor del Programa
por parte de todos aquellos que reciban copias directa o indirectamente
a trav&eacute;s de usted, entonces la &uacute;nica forma en que
podr&iacute;a satisfacer tanto esa condici&oacute;n como esta Licencia
ser&iacute;a evitar completamente la distribuci&oacute;n del Programa.
<p>
Si cualquier porci&oacute;n de este apartado se considera
inv&aacute;lida o imposible de cumplir bajo cualquier circunstancia
particular ha de cumplirse el resto y la secci&oacute;n por entero ha
de cumplirse en cualquier otra circunstancia.
</p>
<p>
No es el prop&oacute;sito de este apartado inducirle a infringir
ninguna reivindicaci&oacute;n de patente ni de ning&uacute;n otro
derecho de propiedad o impugnar la validez de ninguna de dichas
reivindicaciones. Este apartado tiene el &uacute;nico prop&oacute;sito
de proteger la integridad del sistema de distribuci&oacute;n de
software libre, que se realiza mediante pr&aacute;cticas de licencia
p&uacute;blica. Mucha gente ha hecho contribuciones generosas a la
gran variedad de software distribuido mediante ese sistema con la
confianza de que el sistema se aplicar&aacute; consistentemente.
Ser&aacute; el autor/donante quien decida si quiere distribuir
software mediante cualquier otro sistema y una licencia no puede
imponer esa elecci&oacute;n.
</p>
<p>
Este apartado pretende dejar completamente claro lo que se cree que es
una consecuencia del resto de esta Licencia.
</p>
</li>
<li>
Si la distribuci&oacute;n y/o uso de el Programa est&aacute; restringida
en ciertos pa&iacute;ses, bien por patentes o por interfaces bajo
copyright, el tenedor del copyright que coloca este Programa bajo esta
Licencia puede a&ntilde;adir una limitaci&oacute;n expl&iacute;cita de
distribuci&oacute;n geogr&aacute;fica excluyendo esos pa&iacute;ses, de
forma que la distribuci&oacute;n se permita s&oacute;lo en o entre los
pa&iacute;ses no excluidos de esta manera. En ese caso, esta Licencia
incorporar&aacute; la limitaci&oacute;n como si estuviese escrita en el
cuerpo de esta Licencia.
</li>
<li>
La Free Software Foundation puede publicar versiones revisadas y/o
nuevas de la Licencia P&uacute;blica General de tiempo en tiempo. Dichas
nuevas versiones ser&aacute;n similares en esp&iacute;ritu a la presente
versi&oacute;n, pero pueden ser diferentes en detalles para considerar
nuevos problemas o situaciones.
<p>
Cada versi&oacute;n recibe un n&uacute;mero de versi&oacute;n que la
distingue de otras. Si el Programa especifica un n&uacute;mero de
versi&oacute;n de esta Licencia que se refiere a ella y a
&laquo;cualquier versi&oacute;n posterior&raquo;, tienes la
opci&oacute;n de seguir los t&eacute;rminos y condiciones, bien de esa
versi&oacute;n, bien de cualquier versi&oacute;n posterior publicada
por la Free Software Foundation. Si el Programa no especifica un
n&uacute;mero de versi&oacute;n de esta Licencia, puedes escoger
cualquier versi&oacute;n publicada por la Free Software Foundation.
</p>
</li>
<li>
Si quiere incorporar partes del Programa en otros programas libres cuyas
condiciones de distribuci&oacute;n son diferentes, escribe al autor para
pedirle permiso. Si el software tiene copyright de la Free Software
Foundation, escribe a la Free Software Foundation: algunas veces hacemos
excepciones en estos casos. Nuestra decisi&oacute;n estar&aacute; guiada
por el doble objetivo de de preservar la libertad de todos los derivados
de nuestro software libre y promover el que se comparta y reutilice el
software en general.
</li>
</ol>
<h3><a name="SEC3">T&eacute;rminos y condiciones para la copia, <h3>AUSENCIA DE GARANT&Iacute;A</h3>
distribuci&oacute;n y modificaci&oacute;n</a></h3>
<ol type="1"> <ol start="12" type="1">
<li>Esta Licencia se aplica a cualquier programa u otro tipo <li>
de trabajo que contenga una nota colocada por el tenedor del copyright Como el programa se licencia libre de cargas, no se ofrece ninguna
diciendo que puede ser distribuido bajo los t&eacute;rminos de esta Licencia garant&iacute;a sobre el programa, en todas la extensi&oacute;n
P&uacute;blica General. En adelante, &laquo;Programa&raquo; se referir&aacute; permitida por la legislaci&oacute;n aplicable. Excepto cuando se indique
a cualquier programa o trabajo que cumpla esa condici&oacute;n y &laquo;trabajo de otra forma por escrito, los tenedores del copyright y/u otras partes
basado en el Programa&raquo; se referir&aacute; bien al Programa o a cualquier proporcionan el programa &laquo;tal cual&raquo;, sin garant&iacute;a de
trabajo derivado de &eacute;l seg&uacute;n la ley de copyright. Esto es, ninguna clase, bien expresa o impl&iacute;cita, con inclusi&oacute;n,
un trabajo que contenga el programa o una proci&oacute;n de &eacute;l, pero sin limitaci&oacute;n a las garant&iacute;as mercantiles
bien en forma literal o con modificaciones y/o traducido en otro lenguaje. impl&iacute;citas o a la conveniencia para un prop&oacute;sito
Por lo tanto, la traducci&oacute;n est&aacute; incluida sin limitaciones particular. Cualquier riesgo referente a la calidad y prestaciones del
en el t&eacute;rmino &laquo;modificaci&oacute;n&raquo;. Cada concesionario programa es asumido por usted. Si se probase que el Programa es
(licenciatario) ser&aacute; denominado &laquo;usted&raquo;. defectuoso, asume el coste de cualquier servicio, reparaci&oacute;n o
<p>Cualquier otra actividad que no sea la copia, distribuci&oacute;n o correcci&oacute;n.
modificaci&oacute;n no est&aacute; cubierta por esta Licencia, est&aacute; </li>
fuera de su &aacute;mbito. El acto de ejecutar el Programa no est&aacute; <li>
restringido, y los resultados del Programa est&aacute;n cubiertos &uacute;nicamente En ning&uacute;n caso, salvo que lo requiera la legislaci&oacute;n
si sus contenidos constituyen un trabajo basado en el Programa, independientemente aplicable o haya sido acordado por escrito, ning&uacute;n tenedor del
de haberlo producido mediante la ejecuci&oacute;n del programa. El que copyright ni ninguna otra parte que modifique y/o redistribuya el
esto se cumpla, depende de lo que haga el programa. Programa seg&uacute;n se permite en esta Licencia ser&aacute;
</p></li><li>Usted puede copiar y distribuir copias literales del c&oacute;digo fuente responsable ante usted por da&ntilde;os, incluyendo cualquier
del Programa, seg&uacute;n lo has recibido, en cualquier medio, supuesto da&ntilde;o general, especial, incidental o resultante producido por el
que de forma adecuada y bien visible publique en cada copia un anuncio uso o la imposibilidad de uso del Programa (con inclusi&oacute;n, pero
de copyright adecuado y un repudio de garant&iacute;a, mantenga intactos sin limitaci&oacute;n a la p&eacute;rdida de datos o a la
todos los anuncios que se refieran a esta Licencia y a la ausencia de garant&iacute;a, generaci&oacute;n incorrecta de datos o a p&eacute;rdidas sufridas por
y proporcione a cualquier otro receptor del programa una copia de esta usted o por terceras partes o a un fallo del Programa al funcionar en
Licencia junto con el Programa. combinaci&oacute;n con cualquier otro programa), incluso si dicho
<p>Puede cobrar un precio por el acto f&iacute;sico de transferir una copia, tenedor u otra parte ha sido advertido de la posibilidad de dichos
y puede, seg&uacute;n su libre albedr&iacute;o, ofrecer garant&iacute;a da&ntilde;os.
a cambio de unos honorarios. </li>
</p></li><li>Puede modificar su copia o copias del Programa o de cualquier porci&oacute;n </ol>
de &eacute;l, formando de esta manera un trabajo basado en el Programa,
y copiar y distribuir esa modificaci&oacute;n o trabajo bajo los t&eacute;rminos
del apartado 1, antedicho, supuesto que adem&aacute;s cumpla las siguientes
condiciones:
<ol type="a"><li>Debe hacer que los ficheros modificados lleven anuncios
prominentes indicando que los ha cambiado y la fecha de cualquier cambio.
</li><li>Debe hacer que cualquier trabajo que distribuya o publique y que en
todo o en parte contenga o sea derivado del Programa o de cualquier parte
de &eacute;l sea licenciada como un todo, sin carga alguna, a todas las
terceras partes y bajo los t&eacute;rminos de esta Licencia.
</li><li>Si el programa modificado lee normalmente &oacute;rdenes interactivamente
cuando es ejecutado, debe hacer que, cuando comience su ejecuci&oacute;n
para ese uso interactivo de la forma m&aacute;s habitual, muestre o escriba
un mensaje que incluya un anuncio de copyright y un anuncio de que no se
ofrece ninguna garant&iacute;a (o por el contrario que s&iacute; se ofrece
garant&iacute;a) y que los usuarios pueden redistribuir el programa bajo
estas condiciones, e indicando al usuario c&oacute;mo ver una copia de
esta licencia. (Excepci&oacute;n: si el propio programa es interactivo
pero normalmente no muestra ese anuncio, no se requiere que su trabajo
basado en el Programa muestre ning&uacute;n anuncio).</li></ol>
Estos requisitos se aplican al trabajo modificado como un todo. Si partes
identificables de ese trabajo no son derivadas del Programa, y pueden,
razonablemente, ser consideradas trabajos independientes y separados por
ellos mismos, entonces esta Licencia y sus t&eacute;rminos no se aplican
a esas partes cuando sean distribuidas como trabajos separados. Pero cuando
distribuya esas mismas secciones como partes de un todo que es un trabajo
basado en el Programa, la distribuci&oacute;n del todo debe ser seg&uacute;n
los t&eacute;rminos de esta licencia, cuyos permisos para otros licenciatarios
se extienden al todo completo, y por lo tanto a todas y cada una de sus
partes, con independencia de qui&eacute;n la escribi&oacute;.
<p>Por lo tanto, no es la intenci&oacute;n de este apartado reclamar derechos
o desafiar sus derechos sobre trabajos escritos totalmente por usted mismo.
El intento es ejercer el derecho a controlar la distribuci&oacute;n de
trabajos derivados o colectivos basados en el Programa.
</p><p>Adem&aacute;s, el simple hecho de reunir un trabajo no basado en el
Programa con el Programa (o con un trabajo basado en el Programa) en un
volumen de almacenamiento o en un medio de distribuci&oacute;n no hace
que dicho trabajo entre dentro del &aacute;mbito cubierto por esta Licencia.
</p></li><li>Puede copiar y distribuir el Programa (o un trabajo basado en &eacute;l,
seg&uacute;n se especifica en el apartado 2, como c&oacute;digo objeto
o en formato ejecutable seg&uacute;n los t&eacute;rminos de los apartados
1 y 2, supuesto que adem&aacute;s cumpla una de las siguientes condiciones:
<ol type="a"><li>Acompa&ntilde;arlo con el c&oacute;digo fuente completo
correspondiente, en formato electr&oacute;nico, que debe ser distribuido
seg&uacute;n se especifica en los apartados 1 y 2 de esta Licencia en un
medio habitualmente utilizado para el intercambio de programas, o
</li><li>Acompa&ntilde;arlo con una oferta por escrito, v&aacute;lida durante
al menos tres a&ntilde;os, de proporcionar a cualquier tercera parte una
copia completa en formato electr&oacute;nico del c&oacute;digo fuente correspondiente,
a un coste no mayor que el de realizar f&iacute;sicamente la distribuci&oacute;n
del fuente, que ser&aacute; distribuido bajo las condiciones descritas
en los apartados 1 y 2 anteriores, en un medio habitualmente utilizado
para el intercambio de programas, o
</li><li>Acompa&ntilde;arlo con la informaci&oacute;n que recibiste ofreciendo
distribuir el c&oacute;digo fuente correspondiente. (Esta opci&oacute;n
se permite s&oacute;lo para distribuci&oacute;n no comercial y s&oacute;lo
si usted recibi&oacute; el programa como c&oacute;digo objeto o en formato
ejecutable con tal oferta, de acuerdo con el apartado b anterior).</li></ol>
Por c&oacute;digo fuente de un trabajo se entiende la forma preferida del
trabajo cuando se le hacen modificaciones. Para un trabajo ejecutable,
se entiende por c&oacute;digo fuente completo todo el c&oacute;digo fuente
para todos los m&oacute;dulos que contiene, m&aacute;s cualquier fichero
asociado de definici&oacute;n de interfaces, m&aacute;s los guiones utilizados
para controlar la compilaci&oacute;n e instalaci&oacute;n del ejecutable.
Como excepci&oacute;n especial el c&oacute;digo fuente distribuido no necesita
incluir nada que sea distribuido normalmente (bien como fuente, bien en
forma binaria) con los componentes principales (compilador, kernel y similares)
del sistema operativo en el cual funciona el ejecutable, a no ser que el
propio componente acompa&ntilde;e al ejecutable.
<p>Si la distribuci&oacute;n del ejecutable o del c&oacute;digo objeto
se hace mediante la oferta acceso para copiarlo de un cierto lugar, entonces
se considera la oferta de acceso para copiar el c&oacute;digo fuente del
mismo lugar como distribuci&oacute;n del c&oacute;digo fuente, incluso
aunque terceras partes no est&eacute;n forzadas a copiar el fuente junto
con el c&oacute;digo objeto.
</p></li><li>No puede copiar, modificar, sublicenciar o distribuir el Programa excepto
como prev&eacute; expresamente esta Licencia. Cualquier intento de copiar,
modificar sublicenciar o distribuir el Programa de otra forma es inv&aacute;lida,
y har&aacute; que cesen autom&aacute;ticamente los derechos que te proporciona
esta Licencia. En cualquier caso, las partes que hayan recibido copias
o derechos de usted bajo esta Licencia no cesar&aacute;n en sus derechos
mientras esas partes contin&uacute;en cumpli&eacute;ndola.
</li><li>No est&aacute; obligado a aceptar esta licencia, ya que no la ha firmado.
Sin embargo, no hay hada m&aacute;s que le proporcione permiso para modificar
o distribuir el Programa o sus trabajos derivados. Estas acciones est&aacute;n
prohibidas por la ley si no acepta esta Licencia. Por lo tanto, si modifica
o distribuye el Programa (o cualquier trabajo basado en el Programa), est&aacute;
indicando que acepta esta Licencia para poder hacerlo, y todos sus t&eacute;rminos
y condiciones para copiar, distribuir o modificar el Programa o trabajos
basados en &eacute;l.
</li><li>Cada vez que redistribuya el Programa (o cualquier trabajo basado en
el Programa), el receptor recibe autom&aacute;ticamente una licencia del
licenciatario original para copiar, distribuir o modificar el Programa,
de forma sujeta a estos t&eacute;rminos y condiciones. No puede imponer
al receptor ninguna restricci&oacute;n m&aacute;s sobre el ejercicio de
los derechos aqu&iacute; garantizados. No es usted responsable de hacer
cumplir esta licencia por terceras partes.
</li><li>Si como consecuencia de una resoluci&oacute;n judicial o de una alegaci&oacute;n
de infracci&oacute;n de patente o por cualquier otra raz&oacute;n (no limitada
a asuntos relacionados con patentes) se le imponen condiciones (ya sea
por mandato judicial, por acuerdo o por cualquier otra causa) que contradigan
las condiciones de esta Licencia, ello no le exime de cumplir las condiciones
de esta Licencia. Si no puede realizar distribuciones de forma que se satisfagan
simult&aacute;neamente sus obligaciones bajo esta licencia y cualquier
otra obligaci&oacute;n pertinente entonces, como consecuencia, no puede
distribuir el Programa de ninguna forma. Por ejemplo, si una patente no
permite la redistribuci&oacute;n libre de derechos de autor del Programa
por parte de todos aquellos que reciban copias directa o indirectamente
a trav&eacute;s de usted, entonces la &uacute;nica forma en que podr&iacute;a
satisfacer tanto esa condici&oacute;n como esta Licencia ser&iacute;a evitar
completamente la distribuci&oacute;n del Programa.
<p>Si cualquier porci&oacute;n de este apartado se considera inv&aacute;lida
o imposible de cumplir bajo cualquier circunstancia particular ha de cumplirse
el resto y la secci&oacute;n por entero ha de cumplirse en cualquier otra
circunstancia.
</p><p>No es el prop&oacute;sito de este apartado inducirle a infringir ninguna
reivindicaci&oacute;n de patente ni de ning&uacute;n otro derecho de propiedad
o impugnar la validez de ninguna de dichas reivindicaciones. Este apartado
tiene el &uacute;nico prop&oacute;sito de proteger la integridad del sistema
de distribuci&oacute;n de software libre, que se realiza mediante pr&aacute;cticas
de licencia p&uacute;blica. Mucha gente ha hecho contribuciones generosas
a la gran variedad de software distribuido mediante ese sistema con la
confianza de que el sistema se aplicar&aacute; consistentemente. Ser&aacute;
el autor/donante quien decida si quiere distribuir software mediante cualquier
otro sistema y una licencia no puede imponer esa elecci&oacute;n.
</p><p>Este apartado pretende dejar completamente claro lo que se cree que
es una consecuencia del resto de esta Licencia.
</p></li><li>Si la distribuci&oacute;n y/o uso de el Programa est&aacute; restringida
en ciertos pa&iacute;ses, bien por patentes o por interfaces bajo copyright,
el tenedor del copyright que coloca este Programa bajo esta Licencia puede
a&ntilde;adir una limitaci&oacute;n expl&iacute;cita de distribuci&oacute;n
geogr&aacute;fica excluyendo esos pa&iacute;ses, de forma que la distribuci&oacute;n
se permita s&oacute;lo en o entre los pa&iacute;ses no excluidos de esta
manera. En ese caso, esta Licencia incorporar&aacute; la limitaci&oacute;n
como si estuviese escrita en el cuerpo de esta Licencia.
</li><li>La Free Software Foundation puede publicar versiones revisadas y/o nuevas
de la Licencia P&uacute;blica General de tiempo en tiempo. Dichas nuevas
versiones ser&aacute;n similares en esp&iacute;ritu a la presente versi&oacute;n,
pero pueden ser diferentes en detalles para considerar nuevos problemas
o situaciones.
<p>Cada versi&oacute;n recibe un n&uacute;mero de versi&oacute;n que la
distingue de otras. Si el Programa especifica un n&uacute;mero de versi&oacute;n
de esta Licencia que se refiere a ella y a &laquo;cualquier versi&oacute;n
posterior&raquo;, tienes la opci&oacute;n de seguir los t&eacute;rminos
y condiciones, bien de esa versi&oacute;n, bien de cualquier versi&oacute;n
posterior publicada por la Free Software Foundation. Si el Programa no
especifica un n&uacute;mero de versi&oacute;n de esta Licencia, puedes
escoger cualquier versi&oacute;n publicada por la Free Software Foundation.
</p></li><li>Si quiere incorporar partes del Programa en otros programas libres cuyas
condiciones de distribuci&oacute;n son diferentes, escribe al autor para
pedirle permiso. Si el software tiene copyright de la Free Software Foundation,
escribe a la Free Software Foundation: algunas veces hacemos excepciones
en estos casos. Nuestra decisi&oacute;n estar&aacute; guiada por el doble
objetivo de de preservar la libertad de todos los derivados de nuestro
software libre y promover el que se comparta y reutilice el software en
general.</li></ol>
<h3>AUSENCIA DE GARANT&Iacute;A</h3> <h3>FIN DE T&Eacute;RMINOS Y CONDICIONES</h3>
<ol start="12" type="1"> <h3>
<li>Como el programa se licencia libre de cargas, <a name="APPENDIX">Ap&eacute;ndice</a>: C&oacute;mo aplicar estos
no se ofrece ninguna garant&iacute;a sobre el programa, en todas la extensi&oacute;n t&eacute;rminos a sus nuevos programas.
permitida por la legislaci&oacute;n aplicable. Excepto cuando se indique </h3>
de otra forma por escrito, los tenedores del copyright y/u otras partes <p>
proporcionan el programa &laquo;tal cual&raquo;, sin garant&iacute;a de Si usted desarrolla un nuevo Programa, y quiere que sea del mayor uso
ninguna clase, bien expresa o impl&iacute;cita, con inclusi&oacute;n, pero posible para el p&uacute;blico en general, la mejor forma de conseguirlo
sin limitaci&oacute;n a las garant&iacute;as mercantiles impl&iacute;citas es convirti&eacute;ndolo en software libre que cualquiera pueda
o a la conveniencia para un prop&oacute;sito particular. Cualquier riesgo redistribuir y cambiar bajo estos t&eacute;rminos.
referente a la calidad y prestaciones del programa es asumido por usted. </p>
Si se probase que el Programa es defectuoso, asume el coste de cualquier <p>
servicio, reparaci&oacute;n o correcci&oacute;n. Para hacerlo, a&ntilde;ada los siguientes anuncios al programa. Lo
</li><li>En ning&uacute;n caso, salvo que lo requiera la legislaci&oacute;n aplicable m&aacute;s seguro es a&ntilde;adirlos al principio de cada fichero fuente
o haya sido acordado por escrito, ning&uacute;n tenedor del copyright ni para transmitir lo m&aacute;s efectivamente posible la ausencia de
ninguna otra parte que modifique y/o redistribuya el Programa seg&uacute;n garant&iacute;a. Adem&aacute;s cada fichero deber&iacute;a tener al menos
se permite en esta Licencia ser&aacute; responsable ante usted por da&ntilde;os, la l&iacute;nea de &laquo;copyright&raquo; y un indicador a d&oacute;nde
incluyendo cualquier da&ntilde;o general, especial, incidental o resultante puede encontrarse el anuncio completo.
producido por el uso o la imposibilidad de uso del Programa (con inclusi&oacute;n, </p>
pero sin limitaci&oacute;n a la p&eacute;rdida de datos o a la generaci&oacute;n <div>
incorrecta de datos o a p&eacute;rdidas sufridas por usted o por terceras &lt;una l&iacute;nea para indicar el nombre del programa y una
partes o a un fallo del Programa al funcionar en combinaci&oacute;n con r&aacute;pida idea de qu&eacute; hace.&gt;
cualquier otro programa), incluso si dicho tenedor u otra parte ha sido <p>Copyright (C) 19aa &lt;nombre del autor&gt;</p>
advertido de la posibilidad de dichos da&ntilde;os.</li></ol> <p>
Este programa es software libre. Puede redistribuirlo y/o modificarlo
<h3>FIN DE T&Eacute;RMINOS Y CONDICIONES</h3> bajo los t&eacute;rminos de la Licencia P&uacute;blica General de GNU
seg&uacute;n es publicada por la Free Software Foundation, bien de la
<h3><a name="APPENDIX">Ap&eacute;ndice</a>: C&oacute;mo aplicar estos versi&oacute;n 2 de dicha Licencia o bien (seg&uacute;n su
t&eacute;rminos a sus nuevos programas.</h3> elecci&oacute;n) de cualquier versi&oacute;n posterior.
<p> </p>
Si usted desarrolla un nuevo Programa, y quiere que sea del mayor uso posible <p>
para el p&uacute;blico en general, la mejor forma de conseguirlo es convirti&eacute;ndolo Este programa se distribuye con la esperanza de que sea &uacute;til,
en software libre que cualquiera pueda redistribuir y cambiar bajo estos pero SIN NINGUNA GARANT&Iacute;A, incluso sin la garant&iacute;a
t&eacute;rminos.</p> MERCANTIL impl&iacute;cita o sin garantizar la CONVENIENCIA PARA UN
<p>Para hacerlo, a&ntilde;ada los siguientes anuncios al programa. Lo m&aacute;s PROP&Oacute;SITO PARTICULAR. V&eacute;ase la Licencia P&uacute;blica
seguro es a&ntilde;adirlos al principio de cada fichero fuente para transmitir General de GNU para m&aacute;s detalles.
lo m&aacute;s efectivamente posible la ausencia de garant&iacute;a. Adem&aacute;s </p>
cada fichero deber&iacute;a tener al menos la l&iacute;nea de &laquo;copyright&raquo; <p>
y un indicador a d&oacute;nde puede encontrarse el anuncio completo. Deber&iacute;a haber recibido una copia de la Licencia P&uacute;blica
</p><div>&lt;una l&iacute;nea para indicar el nombre General junto con este programa. Si no ha sido as&iacute;, escriba a la
del programa y una r&aacute;pida idea de qu&eacute; hace.&gt; Free Software Foundation, Inc., en 675 Mass Ave, Cambridge, MA 02139,
<p>Copyright (C) 19aa &lt;nombre del autor&gt; EEUU.
</p><p>Este programa es software libre. Puede redistribuirlo y/o modificarlo </p>
bajo los t&eacute;rminos de la Licencia P&uacute;blica General de GNU seg&uacute;n </div>
es publicada por la Free Software Foundation, bien de la versi&oacute;n <p>
2 de dicha Licencia o bien (seg&uacute;n su elecci&oacute;n) de cualquier A&ntilde;ada tambi&eacute;n informaci&oacute;n sobre c&oacute;mo contactar
versi&oacute;n posterior. con usted mediante correo electr&oacute;nico y postal.
</p><p>Este programa se distribuye con la esperanza de que sea &uacute;til, </p>
pero SIN NINGUNA GARANT&Iacute;A, incluso sin la garant&iacute;a MERCANTIL <p>
impl&iacute;cita o sin garantizar la CONVENIENCIA PARA UN PROP&Oacute;SITO Si el programa es interactivo, haga que muestre un peque&ntilde;o anuncio
PARTICULAR. V&eacute;ase la Licencia P&uacute;blica General de GNU para como el siguiente, cuando comienza a funcionar en modo interactivo:
m&aacute;s detalles. </p>
</p><p>Deber&iacute;a haber recibido una copia de la Licencia P&uacute;blica <div>
General junto con este programa. Si no ha sido as&iacute;, escriba a la Gnomovision versi&oacute;n 69, Copyright (C) 19aa nombre del autor
Free Software Foundation, Inc., en 675 Mass Ave, Cambridge, MA 02139, EEUU.</p></div> <p>
<p> Gnomovision no ofrece ABSOLUTAMENTE NINGUNA GARANT&Iacute;A. Para
A&ntilde;ada tambi&eacute;n informaci&oacute;n sobre c&oacute;mo contactar m&aacute;s detalles escriba &laquo;show w&raquo;.
con usted mediante correo electr&oacute;nico y postal.</p> </p>
<p>Si el programa es interactivo, haga que muestre un peque&ntilde;o anuncio </div>
como el siguiente, cuando comienza a funcionar en modo interactivo: <p>
</p><div>Gnomovision versi&oacute;n 69, Copyright Los comandos hipot&eacute;ticos &laquo;show w&raquo; y &laquo;show
(C) 19aa nombre del autor c&raquo; deber&iacute;an mostrar las partes adecuadas de la Licencia
<p>Gnomovision no ofrece ABSOLUTAMENTE NINGUNA GARANT&Iacute;A. Para m&aacute;s P&uacute;blica General. Por supuesto, los comandos que use pueden llamarse
detalles escriba &laquo;show w&raquo;.</p></div> de cualquier otra manera. Podr&iacute;an incluso ser pulsaciones del
<p> rat&oacute;n o elementos de un men&uacute; (lo que sea apropiado para su
Los comandos hipot&eacute;ticos &laquo;show w&raquo; y &laquo;show c&raquo; programa).
deber&iacute;an mostrar las partes adecuadas de la Licencia P&uacute;blica </p>
General. Por supuesto, los comandos que use pueden llamarse de cualquier <p>
otra manera. Podr&iacute;an incluso ser pulsaciones del rat&oacute;n o Tambi&eacute;n deber&iacute;as conseguir que su empleador (si trabaja como
elementos de un men&uacute; (lo que sea apropiado para su programa).</p> programador) o tu Universidad (si es el caso) firme un &laquo;renuncia de
<p>Tambi&eacute;n deber&iacute;as conseguir que su empleador (si trabaja copyright&raquo; para el programa, si es necesario. A continuaci&oacute;n
como programador) o tu Universidad (si es el caso) firme un &laquo;renuncia se ofrece un ejemplo, altere los nombres seg&uacute;n sea conveniente:
de copyright&raquo; para el programa, si es necesario. A continuaci&oacute;n </p>
se ofrece un ejemplo, altere los nombres seg&uacute;n sea conveniente: <div style="margin-left: 30px;">
</p> Yoyodyne, Inc. mediante este documento renuncia a cualquier inter&eacute;s
<div style="margin-left: 30px;"> de derechos de copyright con respecto al programa Gnomovision (que hace
Yoyodyne, Inc. mediante este documento renuncia pasadas a compiladores) escrito por Pepe Programador.
a cualquier inter&eacute;s de derechos de copyright con respecto al programa <p>&lt;firma de Pepito Grillo&gt;, 20 de diciembre de 1996</p>
Gnomovision (que hace pasadas a compiladores) escrito por Pepe Programador. <p>Pepito Grillo, Presidente de Asuntillos Varios.</p>
<p>&lt;firma de Pepito Grillo&gt;, 20 de diciembre de 1996 </div>
</p><p>Pepito Grillo, Presidente de Asuntillos Varios.</p> <p>
</div> Esta Licencia P&uacute;blica General no permite que incluya sus programas
<p> en programas propietarios. Si su programa es una biblioteca de subrutinas,
Esta Licencia P&uacute;blica General no permite que incluya sus programas puede considerar m&aacute;s &uacute;til el permitir el enlazado de
en programas propietarios. Si su programa es una biblioteca de subrutinas, aplicaciones propietarias con la biblioteca. Si este es el caso, use la
puede considerar m&aacute;s &uacute;til el permitir el enlazado de aplicaciones Licencia P&uacute;blica General de GNU para Bibliotecas en lugar de esta
propietarias con la biblioteca. Si este es el caso, use la Licencia P&uacute;blica Licencia.
General de GNU para Bibliotecas en lugar de esta Licencia.</p> </p>
</body>
</body></html> </html>

View File

@ -1,348 +1,460 @@
<html> <html>
<head> <head>
<title>Llic&egrave;ncia P&uacute;blica General de GNU</title> <title>Llic&egrave;ncia P&uacute;blica General de GNU</title>
</head> </head>
<body> <body>
<h2>Llic&egrave;ncia P&uacute;blica General de GNU</h2>
<h2>Llic&egrave;ncia P&uacute;blica General de GNU</h2> <h3>Advertiment</h3>
This is an unofficial translation of the GNU General Public License into
Catalan. It was not published by the Free Software Foundation, and does not
legally state the distribution terms for software that uses the GNU
GPL--only the original English text of the GNU GPL does that. However, we
hope that this translation will help Catalan speakers understand the GNU GPL
better
<p>
Ve't aqu&iacute; una traducci&oacute; no oficial al catal&agrave; de la
llic&egrave;ncia p&uacute;blica general (GPL) de GNU. No ha estat
publicada per la Free Software Foundation (fundaci&oacute; per al
programari lliure), i no defineix legalment els termes de
distribuci&oacute; del programari que utilitza la GPL de GNU --
nom&eacute;s el text original en angl&egrave;s ho fa. Tot i aix&ograve;,
esperem que aquesta traducci&oacute; ajudi els catalanoparlants a entendre
millor la GPL de GNU.
</p>
<h3>Advertiment</h3> <h3>&Iacute;ndex</h3>
This is an unofficial translation of the GNU General Public License into
Catalan. It was not published by the Free Software Foundation, and does
not legally state the distribution terms for software that uses the GNU
GPL--only the original English text of the GNU GPL does that. However,
we hope that this translation will help Catalan speakers understand the
GNU GPL better
<p>Ve't aqu&iacute; una traducci&oacute; no oficial al catal&agrave; de
la llic&egrave;ncia p&uacute;blica general (GPL) de GNU. No ha estat publicada
per la Free Software Foundation (fundaci&oacute; per al programari lliure),
i no defineix legalment els termes de distribuci&oacute; del programari
que utilitza la GPL de GNU -- nom&eacute;s el text original en angl&egrave;s
ho fa. Tot i aix&ograve;, esperem que aquesta traducci&oacute; ajudi els
catalanoparlants a entendre millor la GPL de GNU.</p>
<h3>&Iacute;ndex</h3> <p></p>
<p> <ul>
<li>
<a name="TOC1" href="#SEC1" name="TOC1"
>LLIC&Egrave;NCIA P&Uacute;BLICA GENERAL DE GNU</a
>
</li>
</ul>
<ul> <ul>
<li> <li><a name="TOC2" href="#SEC2" name="TOC2">Pre&agrave;mbul</a></li>
<a NAME="TOC1" HREF="#SEC1" NAME="TOC1">LLIC&Egrave;NCIA <li>
P&Uacute;BLICA GENERAL DE GNU</a></li> <a name="TOC3" href="#SEC3" name="TOC3"
</ul> >TERMES I CONDICIONS PER A LA C&Ograve;PIA, DISTRIBUCI&Oacute; I
MODIFICACI&Oacute;</a
>
</li>
<li>
<a name="TOC4" href="#SEC4" name="TOC4"
>Com podeu aplicar aquests termes als vostres programes nous</a
>
</li>
</ul>
<ul> <hr />
<li> <h2>
<a NAME="TOC2" HREF="#SEC2" NAME="TOC2">Pre&agrave;mbul</a></li> <a name="SEC1" href="gpl-cat.html#TOC1"></a
<li> ><a name="SEC1" href="http://www.fsf.org/copyleft/gpl-cat.html#TOC1"></a
<a NAME="TOC3" HREF="#SEC3" NAME="TOC3">TERMES I CONDICIONS PER A LA C&Ograve;PIA, DISTRIBUCI&Oacute; I MODIFICACI&Oacute;</a></li> ><a name="SEC1" href="http://www.fsf.org/copyleft/gpl-cat.html#TOC1"></a
<li> ><a href="http://www.fsf.org/copyleft/gpl-cat.html#TOC1" name="SEC1"
<a NAME="TOC4" HREF="#SEC4" NAME="TOC4">Com >LLIC&Egrave;NCIA P&Uacute;BLICA GENERAL DE GNU</a
podeu aplicar aquests termes als vostres programes nous</a></li> >
</ul> </h2>
Versi&oacute; 2, Juny de 1991
<hr> <pre>
<h2> Copyright (C) 1989, 1991 Free Software Foundation, Inc.&nbsp;&nbsp;
<a NAME="SEC1" HREF="gpl-cat.html#TOC1"></a><a NAME="SEC1" href="http://www.fsf.org/copyleft/gpl-cat.html#TOC1"></a><a NAME="SEC1" href="http://www.fsf.org/copyleft/gpl-cat.html#TOC1"></a><a href="http://www.fsf.org/copyleft/gpl-cat.html#TOC1" NAME="SEC1">LLIC&Egrave;NCIA
P&Uacute;BLICA GENERAL DE GNU</a></h2>
Versi&oacute; 2, Juny de 1991
<pre>Copyright (C) 1989, 1991 Free Software Foundation, Inc.&nbsp;&nbsp;
59 Temple Place - Suite 330, Boston, MA&nbsp; 02111-1307, USA 59 Temple Place - Suite 330, Boston, MA&nbsp; 02111-1307, USA
Es permet que tothom faci c&ograve;pies literals d'aquest document de Es permet que tothom faci c&ograve;pies literals d'aquest document de
&nbsp;llic&egrave;ncia i les distribueixi, per&ograve; no &eacute;s perm&egrave;s modificar-lo. &nbsp;llic&egrave;ncia i les distribueixi, per&ograve; no &eacute;s perm&egrave;s modificar-lo.
</pre> </pre
>
<h3><a NAME="SEC2" HREF="#TOC2" NAME="SEC2">Pre&agrave;mbul</a></h3> <h3><a name="SEC2" href="#TOC2" name="SEC2">Pre&agrave;mbul</a></h3>
Les llic&egrave;ncies de la major part de programari estan pensades per Les llic&egrave;ncies de la major part de programari estan pensades per
prendre-us la llibertat de compartir-lo i modificar-lo. Contr&agrave;riament, prendre-us la llibertat de compartir-lo i modificar-lo.
la Llic&egrave;ncia p&uacute;blica general de GNU pret&eacute;n garantir-vos Contr&agrave;riament, la Llic&egrave;ncia p&uacute;blica general de GNU
la llibertat de compartir i modificar el programari lliure -- assegurar-se pret&eacute;n garantir-vos la llibertat de compartir i modificar el
que el programari sigui lliure per a tots els seus usuaris i usu&agrave;ries. programari lliure -- assegurar-se que el programari sigui lliure per a tots
Aquesta Llic&egrave;ncia p&uacute;blica general de GNU afecta la majoria els seus usuaris i usu&agrave;ries. Aquesta Llic&egrave;ncia p&uacute;blica
del programari de la Free Software Foundation (fundaci&oacute; pel programari general de GNU afecta la majoria del programari de la Free Software
lliure) i a qualsevol altre programa els autors o autores del qual decideixin Foundation (fundaci&oacute; pel programari lliure) i a qualsevol altre
usar-la (algun altre programari de la Free Software Foundation, en canvi, programa els autors o autores del qual decideixin usar-la (algun altre
est&agrave; protegit per la Llic&egrave;ncia p&uacute;blica general per programari de la Free Software Foundation, en canvi, est&agrave; protegit
a biblioteques de GNU [NdeT: aquesta llic&egrave;ncia, la LGPL, &eacute;s per la Llic&egrave;ncia p&uacute;blica general per a biblioteques de GNU
la que actualment la FSF anomena Llic&egrave;ncia p&uacute;blica menys [NdeT: aquesta llic&egrave;ncia, la LGPL, &eacute;s la que actualment la FSF
general]). Tamb&eacute; podeu aplicar-la als vostres programes. anomena Llic&egrave;ncia p&uacute;blica menys general]). Tamb&eacute; podeu
<p>Quan parlem de programari lliure (free software) ens referim a la llibertat, aplicar-la als vostres programes.
no al preu [NdeT: en catal&agrave; no hi ha l'ambig&uuml;itat que hi ha <p>
en angl&egrave;s]. Les nostres llic&egrave;ncies p&uacute;bliques generals Quan parlem de programari lliure (free software) ens referim a la
estan pensades per assegurar que tingueu la llibertat de distribuir c&ograve;pies llibertat, no al preu [NdeT: en catal&agrave; no hi ha l'ambig&uuml;itat
del programari lliure (i cobrar per aquest servei si aix&iacute; ho voleu), que hi ha en angl&egrave;s]. Les nostres llic&egrave;ncies
que rebeu el codi font o que el pugueu rebre si el voleu, que pugueu modificar p&uacute;bliques generals estan pensades per assegurar que tingueu la
el programari o fer-ne servir parts en programes lliures nous; i que sapigueu</p> llibertat de distribuir c&ograve;pies del programari lliure (i cobrar per
que podeu fer aquestes coses. aquest servei si aix&iacute; ho voleu), que rebeu el codi font o que el
<p>Per protegir els vostres drets, hem d'imposar restriccions que prohibeixin pugueu rebre si el voleu, que pugueu modificar el programari o fer-ne
a tothom denegar-vos aquests drets o demanar-vos que hi renuncieu. Aquestes servir parts en programes lliures nous; i que sapigueu
restriccions suposen algunes responsabilitats per a v&oacute;s si distribu&iuml;u </p>
c&ograve;pies del programari o si el modifiqueu.</p> que podeu fer aquestes coses.
<p>Per exemple, si distribu&iuml;u c&ograve;pies d'un aquests programes, <p>
tant si &eacute;s de franc com per un preu, heu de donar als destinataris Per protegir els vostres drets, hem d'imposar restriccions que prohibeixin
els mateixos drets que teniu v&oacute;s. Us heu d'assegurar que tamb&eacute; a tothom denegar-vos aquests drets o demanar-vos que hi renuncieu.
ells rebin o puguin obtenir el codi font. I els heu de fer saber aquests Aquestes restriccions suposen algunes responsabilitats per a v&oacute;s si
termes per tal que coneguin els seus drets.</p> distribu&iuml;u c&ograve;pies del programari o si el modifiqueu.
<p>Protegim els vostres drets en dos passos: (1) Ens reservem el copyright </p>
del programari, i (2) us oferim aquesta llic&egrave;ncia que us d&oacute;na <p>
perm&iacute;s legal per copiar, distribuir i/o modificar el programari.</p> Per exemple, si distribu&iuml;u c&ograve;pies d'un aquests programes, tant
<p>A m&eacute;s a m&eacute;s, per protegir-nos i protegir l'autor o autora, si &eacute;s de franc com per un preu, heu de donar als destinataris els
volem estar segurs que tothom ent&eacute;n que no hi ha cap garantia per mateixos drets que teniu v&oacute;s. Us heu d'assegurar que tamb&eacute;
a aquest programari lliure. Si alg&uacute; modifica el programari i el ells rebin o puguin obtenir el codi font. I els heu de fer saber aquests
passa, volem que els destinataris s&agrave;piguen que el que tenen no &eacute;s termes per tal que coneguin els seus drets.
l'original, per tal que qualsevol problema que haguessin pogut introduir </p>
terceres persones no repercuteixi en la reputaci&oacute; de l'autor o autora <p>
original.</p> Protegim els vostres drets en dos passos: (1) Ens reservem el copyright
<p>Finalment, qualsevol programa lliure est&agrave; constantment amena&ccedil;at del programari, i (2) us oferim aquesta llic&egrave;ncia que us
per les patents de programari. Volem evitar el perill de que els redistribu&iuml;dors d&oacute;na perm&iacute;s legal per copiar, distribuir i/o modificar el
d'un programa lliure acabin obtenint llic&egrave;ncies de patents, i de programari.
resultes el programa esdevingui propietat exclusiva d'alg&uacute;. Per </p>
evitar-ho, he deixat clar que de qualsevol patent se n'han d'emetre llic&egrave;ncies <p>
per a tothom o no emetre'n cap.</p> A m&eacute;s a m&eacute;s, per protegir-nos i protegir l'autor o autora,
<p>Les condicions exactes per a la c&ograve;pia, distribuci&oacute; i modificaci&oacute; volem estar segurs que tothom ent&eacute;n que no hi ha cap garantia per a
s&oacute;n les seg&uuml;ents.</p> aquest programari lliure. Si alg&uacute; modifica el programari i el
passa, volem que els destinataris s&agrave;piguen que el que tenen no
&eacute;s l'original, per tal que qualsevol problema que haguessin pogut
introduir terceres persones no repercuteixi en la reputaci&oacute; de
l'autor o autora original.
</p>
<p>
Finalment, qualsevol programa lliure est&agrave; constantment
amena&ccedil;at per les patents de programari. Volem evitar el perill de
que els redistribu&iuml;dors d'un programa lliure acabin obtenint
llic&egrave;ncies de patents, i de resultes el programa esdevingui
propietat exclusiva d'alg&uacute;. Per evitar-ho, he deixat clar que de
qualsevol patent se n'han d'emetre llic&egrave;ncies per a tothom o no
emetre'n cap.
</p>
<p>
Les condicions exactes per a la c&ograve;pia, distribuci&oacute; i
modificaci&oacute; s&oacute;n les seg&uuml;ents.
</p>
<h3><a NAME="SEC3" HREF="#TOC3" NAME="SEC3">TERMES <h3>
I CONDICIONS PER A LA C&Ograve;PIA, DISTRIBUCI&Oacute; I MODIFICACI&Oacute;</a></h3> <a name="SEC3" href="#TOC3" name="SEC3"
>TERMES I CONDICIONS PER A LA C&Ograve;PIA, DISTRIBUCI&Oacute; I
MODIFICACI&Oacute;</a
>
</h3>
<p> <p>
<b>0.</b> Aquesta llic&egrave;ncia afecta a qualsevol programa o altra <b>0.</b> Aquesta llic&egrave;ncia afecta a qualsevol programa o altra
obra que contingui un av&iacute;s del posse&iuml;dor del copyright que obra que contingui un av&iacute;s del posse&iuml;dor del copyright que
digui que es pot distribuir sota els termes d'aquesta llic&egrave;ncia digui que es pot distribuir sota els termes d'aquesta llic&egrave;ncia
p&uacute;blica general. D'ara endavant, el "programa" es refereix a aquest p&uacute;blica general. D'ara endavant, el "programa" es refereix a aquest
programa o obra, i una "obra basada en el programa" voldr&agrave; dir el programa o obra, i una "obra basada en el programa" voldr&agrave; dir el
programa o qualsevol obra derivada segons la llei de copyright: &eacute;s programa o qualsevol obra derivada segons la llei de copyright: &eacute;s
a dir una obra que contingui el programa o alguna part d'ell, ja sigui a dir una obra que contingui el programa o alguna part d'ell, ja sigui
literalment o amb modificacions o b&eacute; tradu&iuml;t a altres lleng&uuml;es. literalment o amb modificacions o b&eacute; tradu&iuml;t a altres
(Per aix&ograve; mateix, les traduccions s'inclouen sense cap limitaci&oacute; lleng&uuml;es. (Per aix&ograve; mateix, les traduccions s'inclouen sense
en el terme "modificaci&oacute;"). Ens referim a Cada beneficiari de la cap limitaci&oacute; en el terme "modificaci&oacute;"). Ens referim a Cada
llic&egrave;ncia com a "v&oacute;s".</p> beneficiari de la llic&egrave;ncia com a "v&oacute;s".
<p>Les activitats que no siguin c&ograve;pia, distribuci&oacute; o modificaci&oacute; </p>
no estan contemplades en aquesta llic&egrave;ncia, queden fora del seu <p>
&agrave;mbit. No es restringeix l'acte d'executar el programa, i la sortida Les activitats que no siguin c&ograve;pia, distribuci&oacute; o
del programa queda contemplada nom&eacute;s si el seu contingut constitueix modificaci&oacute; no estan contemplades en aquesta llic&egrave;ncia,
una obra basada en el programa (independentment de que s'hagi creat executant queden fora del seu &agrave;mbit. No es restringeix l'acte d'executar el
el programa). Que aquest sigui el cas o no dep&egrave;n de qu&egrave; faci programa, i la sortida del programa queda contemplada nom&eacute;s si el
el programa.</p> seu contingut constitueix una obra basada en el programa (independentment
<p><b>1.</b> Podeu copiar i distribuir c&ograve;pies literals del codi de que s'hagi creat executant el programa). Que aquest sigui el cas o no
font del programa tal i com el rebeu, en qualsevol mitj&agrave;, sempre dep&egrave;n de qu&egrave; faci el programa.
i quan publiqueu en cada c&ograve;pia, de manera adient i ben visible, </p>
una nota de copyright i una ren&uacute;ncia de garantia; manteniu intactes <p>
tots els avisos que fan refer&egrave;ncia a aquesta llic&egrave;ncia i <b>1.</b> Podeu copiar i distribuir c&ograve;pies literals del codi font
a l'abs&egrave;ncia de garanties de cap mena; i lliureu a qualsevol altre del programa tal i com el rebeu, en qualsevol mitj&agrave;, sempre i quan
destinatari del programa una c&ograve;pia d'aquesta llic&egrave;ncia juntament publiqueu en cada c&ograve;pia, de manera adient i ben visible, una nota
amb el programa.</p> de copyright i una ren&uacute;ncia de garantia; manteniu intactes tots els
<p>Podeu cobrar un preu per l'acte f&iacute;sic de trametre una c&ograve;pia avisos que fan refer&egrave;ncia a aquesta llic&egrave;ncia i a
i podeu, si aix&iacute; ho voleu, oferir alguna garantia a canvi d'un preu.</p> l'abs&egrave;ncia de garanties de cap mena; i lliureu a qualsevol altre
<p><b>2.</b> Podeu modificar la c&ograve;pia o c&ograve;pies del programa destinatari del programa una c&ograve;pia d'aquesta llic&egrave;ncia
o qualsevol tros, tot fornint una obra basada en el programa, i podeu copiar juntament amb el programa.
i distribuir aquestes modificacions o obres sota els termes de la Secci&oacute; </p>
1 anterior, sempre i quan tamb&eacute; compliu les seg&uuml;ents condicions:</p> <p>
<ul> Podeu cobrar un preu per l'acte f&iacute;sic de trametre una c&ograve;pia
<li> i podeu, si aix&iacute; ho voleu, oferir alguna garantia a canvi d'un
<b>a)</b> Heu de fer que els fitxers modificats portin indicacions ben preu.
visibles que diguin que heu modificat els fitxers i la data de la modificaci&oacute;.</li> </p>
<p>
<b>2.</b> Podeu modificar la c&ograve;pia o c&ograve;pies del programa o
qualsevol tros, tot fornint una obra basada en el programa, i podeu copiar
i distribuir aquestes modificacions o obres sota els termes de la
Secci&oacute; 1 anterior, sempre i quan tamb&eacute; compliu les
seg&uuml;ents condicions:
</p>
<ul>
<li>
<b>a)</b> Heu de fer que els fitxers modificats portin indicacions ben
visibles que diguin que heu modificat els fitxers i la data de la
modificaci&oacute;.
</li>
<li> <li>
<b>b)</b> Heu d'atorgar gratu&iuml;tament a totes les terceres parts els <b>b)</b> Heu d'atorgar gratu&iuml;tament a totes les terceres parts els
termes d'aquesta mateixa llic&egrave;ncia sobre la totalitat de qualsevol termes d'aquesta mateixa llic&egrave;ncia sobre la totalitat de
obra que distribu&iuml;u o publiqueu, que completament o en part contingui qualsevol obra que distribu&iuml;u o publiqueu, que completament o en
o sigui un derivat del programa o qualsevol part d'aquest.</li> part contingui o sigui un derivat del programa o qualsevol part
d'aquest.
</li>
<li> <li>
<b>c)</b> Si el programa modificat normalment llegeix instruccions interactivament <b>c)</b> Si el programa modificat normalment llegeix instruccions
quan s'executa, heu de fer que quan s'arrenqui per a aquest &uacute;s interactiu interactivament quan s'executa, heu de fer que quan s'arrenqui per a
de la manera m&eacute;s habitual, imprimeixi o mostri un missatge que inclogui aquest &uacute;s interactiu de la manera m&eacute;s habitual, imprimeixi
una nota de copyright adient i un av&iacute;s de que no hi ha garantia o mostri un missatge que inclogui una nota de copyright adient i un
(o, si de cas, que digui que la garantia l'oferiu v&oacute;s mateix) i av&iacute;s de que no hi ha garantia (o, si de cas, que digui que la
que els usuaris poden redistribuir el programa sota aquestes condicions, garantia l'oferiu v&oacute;s mateix) i que els usuaris poden
i que indiqui a l'usuari o usu&agrave;ria com veure una c&ograve;pia d'aquesta redistribuir el programa sota aquestes condicions, i que indiqui a
llic&egrave;ncia. (Excepci&oacute;: si el mateix programa &eacute;s interactiu l'usuari o usu&agrave;ria com veure una c&ograve;pia d'aquesta
per&ograve; normalment no escriu un missatge d'aquesta mena, la vostra llic&egrave;ncia. (Excepci&oacute;: si el mateix programa &eacute;s
obra basada en el programa tampoc cal que l'escrigui).</li> interactiu per&ograve; normalment no escriu un missatge d'aquesta mena,
</ul> la vostra obra basada en el programa tampoc cal que l'escrigui).
<p> </li>
Aquests requeriments afecten a l'obra modificada com un tot. Si hi ha parts </ul>
identificables que no estan derivades del programa, i es poden considerar <p>
raonablement com a obres independents i separades en si mateixes, aleshores Aquests requeriments afecten a l'obra modificada com un tot. Si hi ha
aquesta llic&egrave;ncia i els seus termes no s'apliquen a aquelles parts parts identificables que no estan derivades del programa, i es poden
quan les distribu&iuml;u com a obres separades. Per&ograve; quan distribu&iuml;u considerar raonablement com a obres independents i separades en si
aquestes mateixes parts integrades en un tot que sigui una obra basada mateixes, aleshores aquesta llic&egrave;ncia i els seus termes no
en el programa, la distribuci&oacute; del tot s'ha de fer d'acord amb els s'apliquen a aquelles parts quan les distribu&iuml;u com a obres
termes d'aquesta llic&egrave;ncia, i els permisos atorgats a altres beneficiaris separades. Per&ograve; quan distribu&iuml;u aquestes mateixes parts
abasten el tot sencer i, per tant, totes i cadascuna de les parts, independentment integrades en un tot que sigui una obra basada en el programa, la
de qui les hagi escrites.. distribuci&oacute; del tot s'ha de fer d'acord amb els termes d'aquesta
<p>Aix&iacute; doncs, la intenci&oacute; d'aquesta secci&oacute; no &eacute;s llic&egrave;ncia, i els permisos atorgats a altres beneficiaris abasten el
reclamar o disputar-vos cap dret a codi que hagueu escrit del tot v&oacute;s tot sencer i, per tant, totes i cadascuna de les parts, independentment de
mateix. La intenci&oacute; &eacute;s m&eacute;s aviat exercir el dret a qui les hagi escrites..
controlar la distribuci&oacute; d'obres derivades o col&middot;lectives </p>
basades en el programa.</p>
<p>A m&eacute;s a m&eacute;s, la simple agregaci&oacute; amb el programa
(o amb una obra basada en el programa) d'altres obres no basades en el
programa en un volum d'un mitj&agrave; d'emmagatzemament o de distribuci&oacute;
no posa aquestes altres obres sota l'&agrave;mbit de la llic&egrave;ncia.</p>
<p><b>3.</b> Podeu copiar i distribuir el programa (o una obra basada en
el programa, segons la secci&oacute; 2) en forma executable o de codi objecte
d'acord amb els termes de les Seccions 1 i 2 anteriors, sempre i quan tamb&eacute;
feu una de les coses seg&uuml;ents:&nbsp;<!-- we use this doubled UL to get the sub-sections indented, --><!-- while making the bullets as unobvious as
possible. --></p>
<ul>
<li>
<b>a)</b> L'acompanyeu amb el codi font complet corresponent, capa&ccedil;
de ser llegit per un ordinador i en un mitj&agrave; utilitzat habitualment
per a l'intercanvi de programari; o</li>
<li> <p>
<b>b)</b> L'acompanyeu amb un oferiment per escrit, amb validesa com a Aix&iacute; doncs, la intenci&oacute; d'aquesta secci&oacute; no &eacute;s
m&iacute;nim fins al cap de tres anys, de subministrar a tota tercera part, reclamar o disputar-vos cap dret a codi que hagueu escrit del tot
i per un preu no superior al que us costi f&iacute;sicament realitzar la v&oacute;s mateix. La intenci&oacute; &eacute;s m&eacute;s aviat exercir
distribuci&oacute;, el codi font complet corresponent, que es distribuir&agrave; el dret a controlar la distribuci&oacute; d'obres derivades o
d'acord amb els termes de les seccions 1 i 2 anteriors en un mitj&agrave; col&middot;lectives basades en el programa.
utilitzat habitualment per a l'intercanvi de programari; o,</li> </p>
<p>
A m&eacute;s a m&eacute;s, la simple agregaci&oacute; amb el programa (o
amb una obra basada en el programa) d'altres obres no basades en el
programa en un volum d'un mitj&agrave; d'emmagatzemament o de
distribuci&oacute; no posa aquestes altres obres sota l'&agrave;mbit de la
llic&egrave;ncia.
</p>
<p>
<b>3.</b> Podeu copiar i distribuir el programa (o una obra basada en el
programa, segons la secci&oacute; 2) en forma executable o de codi objecte
d'acord amb els termes de les Seccions 1 i 2 anteriors, sempre i quan
tamb&eacute; feu una de les coses seg&uuml;ents:&nbsp;<!-- we use this doubled UL to get the sub-sections indented, --><!-- while making the bullets as unobvious as
possible. -->
</p>
<ul>
<li>
<b>a)</b> L'acompanyeu amb el codi font complet corresponent,
capa&ccedil; de ser llegit per un ordinador i en un mitj&agrave;
utilitzat habitualment per a l'intercanvi de programari; o
</li>
<li> <li>
<b>c)</b> L'acompanyeu amb la informaci&oacute; que hagueu rebut de l'oferiment <b>b)</b> L'acompanyeu amb un oferiment per escrit, amb validesa com a
de distribuir el codi font corresponent (Aquesta alternativa nom&eacute;s m&iacute;nim fins al cap de tres anys, de subministrar a tota tercera
&eacute;s permesa per a la distribuci&oacute; no comercial i nom&eacute;s part, i per un preu no superior al que us costi f&iacute;sicament
si heu rebut el programa en forma executable o de codi objecte amb aquest realitzar la distribuci&oacute;, el codi font complet corresponent, que
oferiment, d'acord amb la subsecci&oacute; b anterior).</li> es distribuir&agrave; d'acord amb els termes de les seccions 1 i 2
</ul> anteriors en un mitj&agrave; utilitzat habitualment per a l'intercanvi
El codi font per a una obra vol dir la forma preferida de l'obra per tal de programari; o,
de fer-hi modificacions. Per una obra executable, el codi font complet </li>
vol dir tot el codi font per tots els m&ograve;duls que cont&eacute;, m&eacute;s
tots els fitxers de definici&oacute; d'interf&iacute;cies associats si
s'escau, m&eacute;s els <i>scripts</i> que es facin servir per controlar
la compilaci&oacute; i la instal&middot;laci&oacute; de l'executable si
s'escau. Tanmateix, fent una excepci&oacute; especial, el codi font que
es distribueixi no cal que inclogui res del que normalment es distribueixi
(sia en forma bin&agrave;ria o de codi font) amb els components principals
(compilador, nucli o similars) del sistema operatiu en qu&egrave; s'executa
el programa, tret que el component en q&uuml;esti&oacute; acompanyi l'executable.
<p>Si la distribuci&oacute; de l'executable consisteix en donar acc&eacute;s
per copiar-lo d'un lloc determinat, aleshores serveix com a distribuci&oacute;
del codi font el fet de donar un acc&eacute;s equivalent per copiar el
codi font, encara que les terceres parts no estiguin obligades a copiar
el codi font en copiar el codi objecte.</p>
<p><b>4.</b> No podeu copiar, modificar, reemetre llic&egrave;ncies, o
distribuir el programa si no &eacute;s de la forma expressa que atorga
aquesta Llic&egrave;ncia. Qualsevol altre intent de copiar, modificar,
reemetre llic&egrave;ncies, o distribuir el programa &eacute;s il&middot;l&iacute;cit
i finalitzar&agrave; autom&agrave;ticament els drets que hagueu obtingut
d'aquesta llic&egrave;ncia. Tanmateix, les parts que hagin rebut de v&oacute;s
c&ograve;pies o drets d'acord amb aquesta llic&egrave;ncia no veuran les
seves llic&egrave;ncies finalitzades mentre segueixin observant-les estrictament.</p>
<p><b>5.</b> No esteu obligat a acceptar aquesta llic&egrave;ncia, donat
que no l'heu signada. Tanmateix, no hi ha cap altra opci&oacute; que us
doni perm&iacute;s per modificar o distribuir el programa o les seves obres
derivades. Aquestes accions queden prohibides per la llei si no accepteu
aquesta llic&egrave;ncia. Aix&iacute; doncs, en modificar o distribuir
el programa o les seves obres derivades, esteu indicant que accepteu aquesta
llic&egrave;ncia per fer-ho, i tots els seus termes i condicions per copiar,
distribuir o modificar el programa o obres basades en ell.</p>
<p><b>6.</b> Cada cop que distribu&iuml;u el programa (o qualsevol obra
basada en el programa), el destinatari rep autom&agrave;ticament, de qui
va emetre la llic&egrave;ncia origin&agrave;riament, una llic&egrave;ncia
per copiar, distribuir o modificar el programa sotmesa a aquests termes
i condicions. No podeu imposar cap m&eacute;s restricci&oacute; a l'exercici
dels drets que aqu&iacute; es confereixen. No sou responsable de fer complir
aquesta llic&egrave;ncia a terceres parts.</p>
<p><b>7.</b> Si, a conseq&uuml;&egrave;ncia d'una decisi&oacute; judicial,
una demanda per infracci&oacute; d'una patent o per qualsevol altra ra&oacute;
(no exclusivament relacionada amb patents), se us imposen condicions (tant
si &eacute;s per ordre judicial, acord, o el que sigui) que contradiuen
les condicions d'aquesta llic&egrave;ncia, no quedeu excusat de les condicions
d'aquesta llic&egrave;ncia. Si no us &eacute;s possible distribuir de manera
que satisfeu alhora les obligacions que us imposa aquesta llic&egrave;ncia
i qualsevol altra obligaci&oacute; pertinent, aleshores resulta que no
podeu distribuir el programa en absolut. Per exemple, si una llic&egrave;ncia
de patent no permet&eacute;s redistribuir gratu&iuml;tament el programa
a aquells que hagin rebut c&ograve;pies de v&oacute;s directament o indirecta,
aleshores la &uacute;nica manera en qu&egrave; podr&iacute;eu satisfer
tant aix&ograve; com aquesta llic&egrave;ncia seria abstenir-vos completament
de distribuir el programa.</p>
<p>Si qualsevol fragment d'aquesta secci&oacute; qued&eacute;s invalidat
o no es pogu&eacute;s fer complir en qualsevol circumst&agrave;ncia particular,
la intenci&oacute; &eacute;s que s'apliqui el balan&ccedil; de la secci&oacute;,
i que s'apliqui la secci&oacute; en la seva totalitat en altres circumst&agrave;ncies.</p>
<p>El prop&ograve;sit d'aquesta secci&oacute; no &eacute;s induir-vos a
infringir cap patent ni cap altre requeriment del dret a la propietat,
o a discutir-ne la validesa; l'&uacute;nic prop&ograve;sit d'aquesta secci&oacute;
&eacute;s protegir la integritat del sistema de distribuci&oacute; de programari
lliure, que s'implementa amb pr&agrave;ctiques de llic&egrave;ncia p&uacute;blica.
Molta gent ha fet generoses contribucions a l'ampli ventall de programari
distribu&iuml;t per aquest sistema refiant-se de l'aplicaci&oacute; consistent
del sistema; li pertoca a l'autor, autora o donant decidir si vol distribuir
programari per algun altre sistema, i un beneficiari de la llic&egrave;ncia
no pot imposar aquesta opci&oacute;.</p>
<p>Aquesta secci&oacute; pret&eacute;n deixar del tot clar el que es considera
una conseq&uuml;&egrave;ncia de la resta de la llic&egrave;ncia.</p>
<p><b>8.</b> Si hi ha pa&iuml;sos que restringeixen la distribuci&oacute;
o l'&uacute;s del programari, ja sigui per patents o per interf&iacute;cies
sota copyright, el posse&iuml;dor del copyright original que posi el programa
sota aquesta llic&egrave;ncia pot afegir limitacions geogr&agrave;fiques
expl&iacute;cites que excloguin aquests pa&iuml;sos, de manera que la distribuci&oacute;
nom&eacute;s quedi permesa dintre dels pa&iuml;sos no exclosos, o entre
ells. En tal cas, aquesta llic&egrave;ncia incorpora la limitaci&oacute;
com si estigu&eacute;s escrita en el text de la llic&egrave;ncia.</p>
<p><b>9.</b> La Free Software Foundation (Fundaci&oacute; per al programari
lliure) pot publicar versions revisades o noves de la llic&egrave;ncia
p&uacute;blica general de tant en tant. Aquestes versions noves seran semblants
en esperit a la versi&oacute; present, per&ograve; poden diferir en detalls
per tractar nous neguits o problemes.</p>
<p>Cada versi&oacute; rep un n&uacute;mero de versi&oacute; distintiu.
Si el programa especifica un n&uacute;mero de versi&oacute; d'aquesta llic&egrave;ncia
que li &eacute;s aplicable i "qualsevol versi&oacute; posterior", teniu
l'opci&oacute; de seguir els termes i condicions de la versi&oacute; especificada
o de qualsevol versi&oacute; publicada posteriorment per la Free Software
Foundation. Si el programa no especifica un n&uacute;mero de versi&oacute;
d'aquesta llic&egrave;ncia, podeu triar qualsevol versi&oacute; que hagi
publicat la Free Software Foundation en qualsevol data.</p>
<p><b>10.</b> Si voleu incorporar parts del programa en altres programes
lliures les condicions de distribuci&oacute; dels quals s&oacute;n diferents,
escriviu a l'autor per demanar-li perm&iacute;s. Per al programari que
est&agrave; sota copyright de la Free Software Foundation, escriviu a la
Free Software Foundation; de vegades fem excepcions per permetre-ho. Prendrem
la nostra decisi&oacute; guiats pels dos objectius de mantenir la condici&oacute;
de lliure de tots els derivats del nostre programari lliure i de promoure
la compartici&oacute; i la reutilitzaci&oacute; del programari en general.</p>
<p><b>ABS&Egrave;NCIA DE GARANTIES</b></p>
<p><b>11.</b> COM QUE LA LLIC&Egrave;NCIA DEL PROGRAMA &Eacute;S GRATU&Iuml;TA,
NO HI HA GARANTIA PER AL PROGRAMA, EN LA MESURA QUE HO PERMETI LA LLEI
APLICABLE. EXCEPTE EL QUE ALTRAMENT ES DIGUI PER ESCRIT, ELS POSSE&Iuml;DORS
DEL COPYRIGHT I/O ALTRES PARTS SUBMINISTREN EL PROGRAMA "TAL QUAL" SENSE
CAP MENA DE GARANTIA, NI EXPL&Iacute;CITA NI IMPL&Iacute;CITA, INCLOSES,
ENTRE ALTRES, LES GARANTIES IMPL&Iacute;CITES DE COMERCIALITZABILITAT I
APTITUD PER A PROP&Ograve;SITS DETERMINATS. TOT EL RISC PEL QUE FA A LA
QUALITAT I RENDIMENT DEL PROGRAMA &Eacute;S VOSTRE. EN CAS QUE EL PROGRAMA
RESULT&Eacute;S DEFECTU&Oacute;S, V&Oacute;S ASSUMIU TOT EL COST D'ASSIST&Egrave;NCIA,
REPARACI&Oacute; O CORRECCI&Oacute;.</p>
<p><b>12.</b> EL POSSE&Iuml;DOR DEL COPYRIGHT, O QUALSEVOL ALTRA PART QUE
PUGUI MODIFICAR O REDISTRIBUIR EL PROGRAMA TAL I COM ES PERMET M&Eacute;S
AMUNT NO US HAUR&Agrave; DE RESPONDRE EN CAP CAS, TRET DEL QUE REQUEREIXI
LA LLEI APLICABLE O ELS ACORDS PER ESCRIT, PER PERJUDICIS, INCLOSOS ELS
INCIDENTALS, DERIVATS, ESPECIALS O GENERALS QUE ES DERIVIN DE L'&Uacute;S
O DE LA IMPOSSIBILITAT D'&Uacute;S DEL PROGRAMA (INCLOSES ENTRE D'ALTRES
LES P&Egrave;RDUES DE DADES, LES DADES QUE EL PROGRAMA HAGI MALM&Egrave;S,
LES P&Egrave;RDUES QUE US HAGI PROVOCAT A V&Oacute;S O A TERCERS O LA IMPOSSIBILITAT
DE QUE EL PROGRAMA FUNCIONI AMB QUALSEVOL ALTRE PROGRAMA), FINS I TOT SI
AQUEST POSSE&Iuml;DOR O ALTRA PART HA ESTAT ADVERTIDA DE LA POSSIBILITAT
D'AQUESTS PERJUDICIS.</p>
<h3>FINAL DELS TERMES I CONDICIONS</h3>
<h3> <li>
<a NAME="SEC4" HREF="#TOC4" NAME="SEC4">Com <b>c)</b> L'acompanyeu amb la informaci&oacute; que hagueu rebut de
podeu aplicar aquests termes als vostres programes nous</a></h3> l'oferiment de distribuir el codi font corresponent (Aquesta alternativa
Si desenvolupeu un programa nou, i voleu que tingui l'&uacute;s m&eacute;s nom&eacute;s &eacute;s permesa per a la distribuci&oacute; no comercial
gran possible per part del p&uacute;blic, la millor manera d'aconseguir-ho i nom&eacute;s si heu rebut el programa en forma executable o de codi
&eacute;s fer-lo programari lliure que tothom podr&agrave; redistribuir objecte amb aquest oferiment, d'acord amb la subsecci&oacute; b
i modificar d'acord amb aquests termes. anterior).
<p>Per fer-ho, afegiu els avisos seg&uuml;ents al programa. El m&eacute;s </li>
segur &eacute;s posar-los al comen&ccedil;ament de cada fitxer font per </ul>
transmetre de la manera m&eacute;s efectiva l'exclusi&oacute; de garanties; El codi font per a una obra vol dir la forma preferida de l'obra per tal de
i cada fitxer hauria de portar com a m&iacute;nim la l&iacute;nia de "copyright" fer-hi modificacions. Per una obra executable, el codi font complet vol dir
i un apuntador que indiqui on es pot trobar la nota sencera.</p> tot el codi font per tots els m&ograve;duls que cont&eacute;, m&eacute;s
<pre><i>Una l&iacute;nia amb el nom del programa i una idea de qu&egrave; fa. tots els fitxers de definici&oacute; d'interf&iacute;cies associats si
s'escau, m&eacute;s els <i>scripts</i> que es facin servir per controlar la
compilaci&oacute; i la instal&middot;laci&oacute; de l'executable si
s'escau. Tanmateix, fent una excepci&oacute; especial, el codi font que es
distribueixi no cal que inclogui res del que normalment es distribueixi (sia
en forma bin&agrave;ria o de codi font) amb els components principals
(compilador, nucli o similars) del sistema operatiu en qu&egrave; s'executa
el programa, tret que el component en q&uuml;esti&oacute; acompanyi
l'executable.
<p>
Si la distribuci&oacute; de l'executable consisteix en donar acc&eacute;s
per copiar-lo d'un lloc determinat, aleshores serveix com a
distribuci&oacute; del codi font el fet de donar un acc&eacute;s
equivalent per copiar el codi font, encara que les terceres parts no
estiguin obligades a copiar el codi font en copiar el codi objecte.
</p>
<p>
<b>4.</b> No podeu copiar, modificar, reemetre llic&egrave;ncies, o
distribuir el programa si no &eacute;s de la forma expressa que atorga
aquesta Llic&egrave;ncia. Qualsevol altre intent de copiar, modificar,
reemetre llic&egrave;ncies, o distribuir el programa &eacute;s
il&middot;l&iacute;cit i finalitzar&agrave; autom&agrave;ticament els
drets que hagueu obtingut d'aquesta llic&egrave;ncia. Tanmateix, les parts
que hagin rebut de v&oacute;s c&ograve;pies o drets d'acord amb aquesta
llic&egrave;ncia no veuran les seves llic&egrave;ncies finalitzades mentre
segueixin observant-les estrictament.
</p>
<p>
<b>5.</b> No esteu obligat a acceptar aquesta llic&egrave;ncia, donat que
no l'heu signada. Tanmateix, no hi ha cap altra opci&oacute; que us doni
perm&iacute;s per modificar o distribuir el programa o les seves obres
derivades. Aquestes accions queden prohibides per la llei si no accepteu
aquesta llic&egrave;ncia. Aix&iacute; doncs, en modificar o distribuir el
programa o les seves obres derivades, esteu indicant que accepteu aquesta
llic&egrave;ncia per fer-ho, i tots els seus termes i condicions per
copiar, distribuir o modificar el programa o obres basades en ell.
</p>
<p>
<b>6.</b> Cada cop que distribu&iuml;u el programa (o qualsevol obra
basada en el programa), el destinatari rep autom&agrave;ticament, de qui
va emetre la llic&egrave;ncia origin&agrave;riament, una llic&egrave;ncia
per copiar, distribuir o modificar el programa sotmesa a aquests termes i
condicions. No podeu imposar cap m&eacute;s restricci&oacute; a l'exercici
dels drets que aqu&iacute; es confereixen. No sou responsable de fer
complir aquesta llic&egrave;ncia a terceres parts.
</p>
<p>
<b>7.</b> Si, a conseq&uuml;&egrave;ncia d'una decisi&oacute; judicial,
una demanda per infracci&oacute; d'una patent o per qualsevol altra
ra&oacute; (no exclusivament relacionada amb patents), se us imposen
condicions (tant si &eacute;s per ordre judicial, acord, o el que sigui)
que contradiuen les condicions d'aquesta llic&egrave;ncia, no quedeu
excusat de les condicions d'aquesta llic&egrave;ncia. Si no us &eacute;s
possible distribuir de manera que satisfeu alhora les obligacions que us
imposa aquesta llic&egrave;ncia i qualsevol altra obligaci&oacute;
pertinent, aleshores resulta que no podeu distribuir el programa en
absolut. Per exemple, si una llic&egrave;ncia de patent no permet&eacute;s
redistribuir gratu&iuml;tament el programa a aquells que hagin rebut
c&ograve;pies de v&oacute;s directament o indirecta, aleshores la
&uacute;nica manera en qu&egrave; podr&iacute;eu satisfer tant aix&ograve;
com aquesta llic&egrave;ncia seria abstenir-vos completament de distribuir
el programa.
</p>
<p>
Si qualsevol fragment d'aquesta secci&oacute; qued&eacute;s invalidat o no
es pogu&eacute;s fer complir en qualsevol circumst&agrave;ncia particular,
la intenci&oacute; &eacute;s que s'apliqui el balan&ccedil; de la
secci&oacute;, i que s'apliqui la secci&oacute; en la seva totalitat en
altres circumst&agrave;ncies.
</p>
<p>
El prop&ograve;sit d'aquesta secci&oacute; no &eacute;s induir-vos a
infringir cap patent ni cap altre requeriment del dret a la propietat, o a
discutir-ne la validesa; l'&uacute;nic prop&ograve;sit d'aquesta
secci&oacute; &eacute;s protegir la integritat del sistema de
distribuci&oacute; de programari lliure, que s'implementa amb
pr&agrave;ctiques de llic&egrave;ncia p&uacute;blica. Molta gent ha fet
generoses contribucions a l'ampli ventall de programari distribu&iuml;t
per aquest sistema refiant-se de l'aplicaci&oacute; consistent del
sistema; li pertoca a l'autor, autora o donant decidir si vol distribuir
programari per algun altre sistema, i un beneficiari de la
llic&egrave;ncia no pot imposar aquesta opci&oacute;.
</p>
<p>
Aquesta secci&oacute; pret&eacute;n deixar del tot clar el que es
considera una conseq&uuml;&egrave;ncia de la resta de la llic&egrave;ncia.
</p>
<p>
<b>8.</b> Si hi ha pa&iuml;sos que restringeixen la distribuci&oacute; o
l'&uacute;s del programari, ja sigui per patents o per interf&iacute;cies
sota copyright, el posse&iuml;dor del copyright original que posi el
programa sota aquesta llic&egrave;ncia pot afegir limitacions
geogr&agrave;fiques expl&iacute;cites que excloguin aquests pa&iuml;sos,
de manera que la distribuci&oacute; nom&eacute;s quedi permesa dintre dels
pa&iuml;sos no exclosos, o entre ells. En tal cas, aquesta
llic&egrave;ncia incorpora la limitaci&oacute; com si estigu&eacute;s
escrita en el text de la llic&egrave;ncia.
</p>
<p>
<b>9.</b> La Free Software Foundation (Fundaci&oacute; per al programari
lliure) pot publicar versions revisades o noves de la llic&egrave;ncia
p&uacute;blica general de tant en tant. Aquestes versions noves seran
semblants en esperit a la versi&oacute; present, per&ograve; poden diferir
en detalls per tractar nous neguits o problemes.
</p>
<p>
Cada versi&oacute; rep un n&uacute;mero de versi&oacute; distintiu. Si el
programa especifica un n&uacute;mero de versi&oacute; d'aquesta
llic&egrave;ncia que li &eacute;s aplicable i "qualsevol versi&oacute;
posterior", teniu l'opci&oacute; de seguir els termes i condicions de la
versi&oacute; especificada o de qualsevol versi&oacute; publicada
posteriorment per la Free Software Foundation. Si el programa no
especifica un n&uacute;mero de versi&oacute; d'aquesta llic&egrave;ncia,
podeu triar qualsevol versi&oacute; que hagi publicat la Free Software
Foundation en qualsevol data.
</p>
<p>
<b>10.</b> Si voleu incorporar parts del programa en altres programes
lliures les condicions de distribuci&oacute; dels quals s&oacute;n
diferents, escriviu a l'autor per demanar-li perm&iacute;s. Per al
programari que est&agrave; sota copyright de la Free Software Foundation,
escriviu a la Free Software Foundation; de vegades fem excepcions per
permetre-ho. Prendrem la nostra decisi&oacute; guiats pels dos objectius
de mantenir la condici&oacute; de lliure de tots els derivats del nostre
programari lliure i de promoure la compartici&oacute; i la
reutilitzaci&oacute; del programari en general.
</p>
<p><b>ABS&Egrave;NCIA DE GARANTIES</b></p>
<p>
<b>11.</b> COM QUE LA LLIC&Egrave;NCIA DEL PROGRAMA &Eacute;S
GRATU&Iuml;TA, NO HI HA GARANTIA PER AL PROGRAMA, EN LA MESURA QUE HO
PERMETI LA LLEI APLICABLE. EXCEPTE EL QUE ALTRAMENT ES DIGUI PER ESCRIT,
ELS POSSE&Iuml;DORS DEL COPYRIGHT I/O ALTRES PARTS SUBMINISTREN EL
PROGRAMA "TAL QUAL" SENSE CAP MENA DE GARANTIA, NI EXPL&Iacute;CITA NI
IMPL&Iacute;CITA, INCLOSES, ENTRE ALTRES, LES GARANTIES IMPL&Iacute;CITES
DE COMERCIALITZABILITAT I APTITUD PER A PROP&Ograve;SITS DETERMINATS. TOT
EL RISC PEL QUE FA A LA QUALITAT I RENDIMENT DEL PROGRAMA &Eacute;S
VOSTRE. EN CAS QUE EL PROGRAMA RESULT&Eacute;S DEFECTU&Oacute;S,
V&Oacute;S ASSUMIU TOT EL COST D'ASSIST&Egrave;NCIA, REPARACI&Oacute; O
CORRECCI&Oacute;.
</p>
<p>
<b>12.</b> EL POSSE&Iuml;DOR DEL COPYRIGHT, O QUALSEVOL ALTRA PART QUE
PUGUI MODIFICAR O REDISTRIBUIR EL PROGRAMA TAL I COM ES PERMET M&Eacute;S
AMUNT NO US HAUR&Agrave; DE RESPONDRE EN CAP CAS, TRET DEL QUE REQUEREIXI
LA LLEI APLICABLE O ELS ACORDS PER ESCRIT, PER PERJUDICIS, INCLOSOS ELS
INCIDENTALS, DERIVATS, ESPECIALS O GENERALS QUE ES DERIVIN DE L'&Uacute;S
O DE LA IMPOSSIBILITAT D'&Uacute;S DEL PROGRAMA (INCLOSES ENTRE D'ALTRES
LES P&Egrave;RDUES DE DADES, LES DADES QUE EL PROGRAMA HAGI MALM&Egrave;S,
LES P&Egrave;RDUES QUE US HAGI PROVOCAT A V&Oacute;S O A TERCERS O LA
IMPOSSIBILITAT DE QUE EL PROGRAMA FUNCIONI AMB QUALSEVOL ALTRE PROGRAMA),
FINS I TOT SI AQUEST POSSE&Iuml;DOR O ALTRA PART HA ESTAT ADVERTIDA DE LA
POSSIBILITAT D'AQUESTS PERJUDICIS.
</p>
<h3>FINAL DELS TERMES I CONDICIONS</h3>
<h3>
<a name="SEC4" href="#TOC4" name="SEC4"
>Com podeu aplicar aquests termes als vostres programes nous</a
>
</h3>
Si desenvolupeu un programa nou, i voleu que tingui l'&uacute;s m&eacute;s
gran possible per part del p&uacute;blic, la millor manera d'aconseguir-ho
&eacute;s fer-lo programari lliure que tothom podr&agrave; redistribuir i
modificar d'acord amb aquests termes.
<p>
Per fer-ho, afegiu els avisos seg&uuml;ents al programa. El m&eacute;s
segur &eacute;s posar-los al comen&ccedil;ament de cada fitxer font per
transmetre de la manera m&eacute;s efectiva l'exclusi&oacute; de
garanties; i cada fitxer hauria de portar com a m&iacute;nim la
l&iacute;nia de "copyright" i un apuntador que indiqui on es pot trobar la
nota sencera.
</p>
<pre><i>Una l&iacute;nia amb el nom del programa i una idea de qu&egrave; fa.
</i>Copyright (C) <i>any</i>&nbsp; <i>nom de l'autor o autora </i>Copyright (C) <i>any</i>&nbsp; <i>nom de l'autor o autora
</i>Aquest programa &eacute;s lliure; el podeu redistribuir i/o modificar </i>Aquest programa &eacute;s lliure; el podeu redistribuir i/o modificar
@ -360,51 +472,67 @@ la Llic&egrave;ncia general p&uacute;blica de GNU per a m&eacute;s detalls.&nbsp
Haur&iacute;eu d'haver rebut una c&ograve;pia de la llic&egrave;ncia p&uacute;blica general&nbsp; Haur&iacute;eu d'haver rebut una c&ograve;pia de la llic&egrave;ncia p&uacute;blica general&nbsp;
de GNU amb aquest programa; si no, escriviu a la Free Software&nbsp; de GNU amb aquest programa; si no, escriviu a la Free Software&nbsp;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA&nbsp; 02111-1307, USA.</pre> Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA&nbsp; 02111-1307, USA.</pre>
Poseu-hi la informaci&oacute; que calgui per contactar amb v&oacute;s per Poseu-hi la informaci&oacute; que calgui per contactar amb v&oacute;s per
correu electr&ograve;nic i de paper. correu electr&ograve;nic i de paper.
<p>Si el programa &eacute;s interactiu, feu-lo treure una breu nota com <p>
aquesta quan arrenca en mode interactiu:</p> Si el programa &eacute;s interactiu, feu-lo treure una breu nota com
<pre>Gnomovisi&oacute; versi&oacute; 69, Copyright (C) <i>any</i> <i>nom de l'autor o autora aquesta quan arrenca en mode interactiu:
</p>
<pre>Gnomovisi&oacute; versi&oacute; 69, Copyright (C) <i>any</i> <i>nom de l'autor o autora
</i>El Gnomovisi&oacute; va SENSE CAP MENA DE GARANTIA; premeu 'mostra g' per saber-ne&nbsp; </i>El Gnomovisi&oacute; va SENSE CAP MENA DE GARANTIA; premeu 'mostra g' per saber-ne&nbsp;
els detalls.&nbsp; Aix&ograve; &eacute;s programari lliure, i se us convida a redistribuir-lo els detalls.&nbsp; Aix&ograve; &eacute;s programari lliure, i se us convida a redistribuir-lo
d'acord amb certes condicions; piqueu 'mostra c' per saber-ne els detalls.</pre> d'acord amb certes condicions; piqueu 'mostra c' per saber-ne els detalls.</pre>
<p></p>Les instruccions hipot&egrave;tiques <tt>'mostra g'</tt> i <tt>'mostra <p></p>
c'</tt> haurien de mostrar les parts escaients de la llic&egrave;ncia p&uacute;blica Les instruccions hipot&egrave;tiques <tt>'mostra g'</tt> i
general. Naturalment, les instruccions poden tenir altres noms que no siguin <tt>'mostra c'</tt> haurien de mostrar les parts escaients de la
<tt>'mostra llic&egrave;ncia p&uacute;blica general. Naturalment, les instruccions poden
g'</tt> i tenir altres noms que no siguin <tt>'mostra g'</tt> i <tt>'mostra c'</tt>;
<tt>'mostra c'</tt>; fins i tot podrien ser pics amb el ratol&iacute; fins i tot podrien ser pics amb el ratol&iacute; o opcions de men&uacute;, o
o opcions de men&uacute;, o el que li vagi b&eacute; al vostre programa. el que li vagi b&eacute; al vostre programa.
<p>Tamb&eacute; haur&iacute;eu d'aconseguir que l'empresari per qui treballeu <p>
(si treballeu de programador) o la vostra escola, si &eacute;s el cas, Tamb&eacute; haur&iacute;eu d'aconseguir que l'empresari per qui treballeu
signin una "ren&uacute;ncia de copyright" pel programa, si s'escau. Aqu&iacute; (si treballeu de programador) o la vostra escola, si &eacute;s el cas,
teniu un exemple, canvieu-hi els noms:</p> signin una "ren&uacute;ncia de copyright" pel programa, si s'escau.
<pre>Ioiodina, S.A. , per la present renuncia a tot inter&egrave;s&nbsp; Aqu&iacute; teniu un exemple, canvieu-hi els noms:
</p>
<pre>Ioiodina, S.A. , per la present renuncia a tot inter&egrave;s&nbsp;
en el copyright del programa `Gnomovisi&oacute;' (que fa l'aleta&nbsp; en el copyright del programa `Gnomovisi&oacute;' (que fa l'aleta&nbsp;
als compiladors) escrit&nbsp;&nbsp; pel Jordi Pica Codi als compiladors) escrit&nbsp;&nbsp; pel Jordi Pica Codi
<i>signat per Mag Nat</i>, 28 de desembre de 1989 <i>signat per Mag Nat</i>, 28 de desembre de 1989
Mag Nat, Vici-President</pre> Mag Nat, Vici-President</pre>
Aquesta Llic&egrave;ncia p&uacute;blica general no us permet incorporar Aquesta Llic&egrave;ncia p&uacute;blica general no us permet incorporar el
el vostre programa en programes de propietat. Si el vostre programa &eacute;s vostre programa en programes de propietat. Si el vostre programa &eacute;s
una biblioteca de subrutines, potser trobeu m&eacute;s &uacute;til permetre una biblioteca de subrutines, potser trobeu m&eacute;s &uacute;til permetre
enlla&ccedil;ar (link) aplicacions de propietat amb la biblioteca. Si &eacute;s enlla&ccedil;ar (link) aplicacions de propietat amb la biblioteca. Si
aix&ograve; el que voleu, feu servir la Llic&egrave;ncia p&uacute;blica &eacute;s aix&ograve; el que voleu, feu servir la Llic&egrave;ncia
general per a biblioteques de GNU per comptes d'aquesta llic&egrave;ncia p&uacute;blica general per a biblioteques de GNU per comptes d'aquesta
[NdeT: la FSF ara li diu llic&egrave;ncia p&uacute;blica menys general llic&egrave;ncia [NdeT: la FSF ara li diu llic&egrave;ncia p&uacute;blica
per comptes de llic&egrave;ncia p&uacute;blica general per a biblioteques].&nbsp; menys general per comptes de llic&egrave;ncia p&uacute;blica general per a
<hr>Torna a <a href="http://www.fsf.org/home.html">la p&agrave;gina principal biblioteques].&nbsp;
de GNU</a>. <hr />
<p>Per preguntes i aclariments de GNU i la FSF escriviu a: <i><a href="mailto:gnu@gnu.org">gnu@gnu.org</a></i>. Torna a
Altres <a href="http://www.fsf.org/home.html#ContactInfo">maneres de contactar <a href="http://www.fsf.org/home.html">la p&agrave;gina principal de GNU</a
</a>amb >.
la FSF:</p> <p>
<p>Envieu comentaris sobre aquestes planes de web a <i><a href="mailto:webmasters@www.gnu.org">webmasters@www.gnu.org</a></i>, Per preguntes i aclariments de GNU i la FSF escriviu a:
Envieu altres preguntes a <i><a href="mailto:gnu@gnu.org">gnu@gnu.org</a></i>.</p> <i><a href="mailto:gnu@gnu.org">gnu@gnu.org</a></i
<p>La nota de Copyright &eacute;s m&eacute;s amunt.</p> >. Altres
<br>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, <a href="http://www.fsf.org/home.html#ContactInfo"
MA 02111, USA >maneres de contactar </a
<p>Actualitzat:<!-- hhmts start -->3 Jan 2000 rms<!-- hhmts end --></p> >amb la FSF:
<hr> </p>
</body> <p>
</html> Envieu comentaris sobre aquestes planes de web a
<i><a href="mailto:webmasters@www.gnu.org">webmasters@www.gnu.org</a></i
>, Envieu altres preguntes a
<i><a href="mailto:gnu@gnu.org">gnu@gnu.org</a></i
>.
</p>
<p>La nota de Copyright &eacute;s m&eacute;s amunt.</p>
<br />Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111, USA
<p>Actualitzat:<!-- hhmts start -->3 Jan 2000 rms<!-- hhmts end --></p>
<hr />
</body>
</html>

View File

@ -1,364 +1,353 @@
<html> <html>
<head> <head>
<title>GNU General Public License</title> <title>GNU General Public License</title>
</head> </head>
<body> <body>
<h2>GNU General Public License</h2> <h2>GNU General Public License</h2>
<h3>Table of Contents</h3> <h3>Table of Contents</h3>
<ul> <ul>
<li><a href="#SEC1">GNU GENERAL PUBLIC LICENSE</a></li> <li><a href="#SEC1">GNU GENERAL PUBLIC LICENSE</a></li>
<li><a href="#SEC2">Preamble</a></li> <li><a href="#SEC2">Preamble</a></li>
<li><a href="#SEC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a> <li>
</ul> <a href="#SEC3"
<hr /> >TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a
<p></p> >
<h3><a name="SEC1">GNU GENERAL PUBLIC LICENSE</a></h3> </li>
<p>Version 2, June 1991</p> </ul>
<pre>Copyright (C) 1989, 1991 Free Software Foundation, Inc.
<hr />
<p></p>
<h3><a name="SEC1">GNU GENERAL PUBLIC LICENSE</a></h3>
<p>Version 2, June 1991</p>
<pre>
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.</pre> of this license document, but changing it is not allowed.</pre
>
<h3><a name="SEC2">Preamble</a></h3> <h3><a name="SEC2">Preamble</a></h3>
<p> <p>
The licenses for most software are designed to take away your The licenses for most software are designed to take away your freedom to
freedom to share and change it. By contrast, the GNU General Public share and change it. By contrast, the GNU General Public License is
License is intended to guarantee your freedom to share and change free intended to guarantee your freedom to share and change free software--to
software--to make sure the software is free for all its users. This make sure the software is free for all its users. This General Public
General Public License applies to most of the Free Software License applies to most of the Free Software Foundation's software and to
Foundation's software and to any other program whose authors commit to any other program whose authors commit to using it. (Some other Free
using it. (Some other Free Software Foundation software is covered by Software Foundation software is covered by the GNU Library General Public
the GNU Library General Public License instead.) You can apply it to License instead.) You can apply it to your programs, too.
your programs, too. </p>
</p> <p>
<p> When we speak of free software, we are referring to freedom, not price.
When we speak of free software, we are referring to freedom, not Our General Public Licenses are designed to make sure that you have the
price. Our General Public Licenses are designed to make sure that you freedom to distribute copies of free software (and charge for this service
have the freedom to distribute copies of free software (and charge for if you wish), that you receive source code or can get it if you want it,
this service if you wish), that you receive source code or can get it that you can change the software or use pieces of it in new free programs;
if you want it, that you can change the software or use pieces of it and that you know you can do these things.
in new free programs; and that you know you can do these things. </p>
</p> <p>
<p> To protect your rights, we need to make restrictions that forbid anyone to
To protect your rights, we need to make restrictions that forbid deny you these rights or to ask you to surrender the rights. These
anyone to deny you these rights or to ask you to surrender the rights. restrictions translate to certain responsibilities for you if you
These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
distribute copies of the software, or if you modify it. </p>
</p> <p>
<p> For example, if you distribute copies of such a program, whether gratis or
For example, if you distribute copies of such a program, whether for a fee, you must give the recipients all the rights that you have. You
gratis or for a fee, you must give the recipients all the rights that must make sure that they, too, receive or can get the source code. And you
you have. You must make sure that they, too, receive or can get the must show them these terms so they know their rights.
source code. And you must show them these terms so they know their </p>
rights. <p>
</p> We protect your rights with two steps: (1) copyright the software, and (2)
<p> offer you this license which gives you legal permission to copy,
We protect your rights with two steps: (1) copyright the software, and distribute and/or modify the software.
(2) offer you this license which gives you legal permission to copy, </p>
distribute and/or modify the software. <p>
</p> Also, for each author's protection and ours, we want to make certain that
<p> everyone understands that there is no warranty for this free software. If
Also, for each author's protection and ours, we want to make certain the software is modified by someone else and passed on, we want its
that everyone understands that there is no warranty for this free recipients to know that what they have is not the original, so that any
software. If the software is modified by someone else and passed on, we problems introduced by others will not reflect on the original authors'
want its recipients to know that what they have is not the original, so reputations.
that any problems introduced by others will not reflect on the original </p>
authors' reputations. <p>
</p> Finally, any free program is threatened constantly by software patents. We
<p> wish to avoid the danger that redistributors of a free program will
Finally, any free program is threatened constantly by software individually obtain patent licenses, in effect making the program
patents. We wish to avoid the danger that redistributors of a free proprietary. To prevent this, we have made it clear that any patent must
program will individually obtain patent licenses, in effect making the be licensed for everyone's free use or not licensed at all.
program proprietary. To prevent this, we have made it clear that any </p>
patent must be licensed for everyone's free use or not licensed at all. <p>
</p> The precise terms and conditions for copying, distribution and
<p> modification follow.
The precise terms and conditions for copying, distribution and </p>
modification follow.
</p>
<h3><a name="SEC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></h3> <h3>
<a name="SEC3"
>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a
>
</h3>
<p> <p>
<strong>0.</strong> <strong>0.</strong> This License applies to any program or other work
This License applies to any program or other work which contains which contains a notice placed by the copyright holder saying it may be
a notice placed by the copyright holder saying it may be distributed distributed under the terms of this General Public License. The "Program",
under the terms of this General Public License. The "Program", below, below, refers to any such program or work, and a "work based on the
refers to any such program or work, and a "work based on the Program" Program" means either the Program or any derivative work under copyright
means either the Program or any derivative work under copyright law: law: that is to say, a work containing the Program or a portion of it,
that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another
either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the
language. (Hereinafter, translation is included without limitation in term "modification".) Each licensee is addressed as "you".
the term "modification".) Each licensee is addressed as "you". </p>
</p> <p>
<p> Activities other than copying, distribution and modification are not
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running
covered by this License; they are outside its scope. The act of the Program is not restricted, and the output from the Program is covered
running the Program is not restricted, and the output from the Program only if its contents constitute a work based on the Program (independent
is covered only if its contents constitute a work based on the of having been made by running the Program). Whether that is true depends
Program (independent of having been made by running the Program). on what the Program does.
Whether that is true depends on what the Program does. </p>
</p> <p>
<p> <strong>1.</strong> You may copy and distribute verbatim copies of the
<strong>1.</strong> Program's source code as you receive it, in any medium, provided that you
You may copy and distribute verbatim copies of the Program's conspicuously and appropriately publish on each copy an appropriate
source code as you receive it, in any medium, provided that you copyright notice and disclaimer of warranty; keep intact all the notices
conspicuously and appropriately publish on each copy an appropriate that refer to this License and to the absence of any warranty; and give
copyright notice and disclaimer of warranty; keep intact all the any other recipients of the Program a copy of this License along with the
notices that refer to this License and to the absence of any warranty; Program.
and give any other recipients of the Program a copy of this License </p>
along with the Program. <p>
</p> You may charge a fee for the physical act of transferring a copy, and you
<p> may at your option offer warranty protection in exchange for a fee.
You may charge a fee for the physical act of transferring a copy, and </p>
you may at your option offer warranty protection in exchange for a fee. <p>
</p> <strong>2.</strong> You may modify your copy or copies of the Program or
<p> any portion of it, thus forming a work based on the Program, and copy and
<strong>2.</strong> distribute such modifications or work under the terms of Section 1 above,
You may modify your copy or copies of the Program or any portion provided that you also meet all of these conditions:
of it, thus forming a work based on the Program, and copy and </p>
distribute such modifications or work under the terms of Section 1 <p></p>
above, provided that you also meet all of these conditions:
</p>
<p></p>
<dl> <dl>
<dd> <dd>
<strong>a)</strong> <strong>a)</strong> You must cause the modified files to carry prominent
You must cause the modified files to carry prominent notices notices stating that you changed the files and the date of any change.
stating that you changed the files and the date of any change. </dd>
</dd> </dl>
</dl> <dl>
<dl> <dd>
<dd> <strong>b)</strong> You must cause any work that you distribute or
<strong>b)</strong> publish, that in whole or in part contains or is derived from the
You must cause any work that you distribute or publish, that in Program or any part thereof, to be licensed as a whole at no charge to
whole or in part contains or is derived from the Program or any all third parties under the terms of this License.
part thereof, to be licensed as a whole at no charge to all third </dd>
parties under the terms of this License. </dl>
</dd> <dl>
</dl> <dd>
<dl> <strong>c)</strong> If the modified program normally reads commands
<dd> interactively when run, you must cause it, when started running for such
<strong>c)</strong> interactive use in the most ordinary way, to print or display an
If the modified program normally reads commands interactively announcement including an appropriate copyright notice and a notice that
when run, you must cause it, when started running for such there is no warranty (or else, saying that you provide a warranty) and
interactive use in the most ordinary way, to print or display an that users may redistribute the program under these conditions, and
announcement including an appropriate copyright notice and a telling the user how to view a copy of this License. (Exception: if the
notice that there is no warranty (or else, saying that you provide Program itself is interactive but does not normally print such an
a warranty) and that users may redistribute the program under announcement, your work based on the Program is not required to print an
these conditions, and telling the user how to view a copy of this announcement.)
License. (Exception: if the Program itself is interactive but </dd>
does not normally print such an announcement, your work based on </dl>
the Program is not required to print an announcement.) <p>
</dd> These requirements apply to the modified work as a whole. If identifiable
</dl> sections of that work are not derived from the Program, and can be
<p> reasonably considered independent and separate works in themselves, then
These requirements apply to the modified work as a whole. If this License, and its terms, do not apply to those sections when you
identifiable sections of that work are not derived from the Program, distribute them as separate works. But when you distribute the same
and can be reasonably considered independent and separate works in sections as part of a whole which is a work based on the Program, the
themselves, then this License, and its terms, do not apply to those distribution of the whole must be on the terms of this License, whose
sections when you distribute them as separate works. But when you permissions for other licensees extend to the entire whole, and thus to
distribute the same sections as part of a whole which is a work based each and every part regardless of who wrote it.
on the Program, the distribution of the whole must be on the terms of </p>
this License, whose permissions for other licensees extend to the <p>
entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your
</p> rights to work written entirely by you; rather, the intent is to exercise
<p> the right to control the distribution of derivative or collective works
Thus, it is not the intent of this section to claim rights or contest based on the Program.
your rights to work written entirely by you; rather, the intent is to </p>
exercise the right to control the distribution of derivative or <p>
collective works based on the Program. In addition, mere aggregation of another work not based on the Program
</p> with the Program (or with a work based on the Program) on a volume of a
<p>In addition, mere aggregation of another work not based on the Program storage or distribution medium does not bring the other work under the
with the Program (or with a work based on the Program) on a volume of scope of this License.
a storage or distribution medium does not bring the other work under </p>
the scope of this License. <p>
</p> <strong>3.</strong> You may copy and distribute the Program (or a work
<p><strong>3.</strong> based on it, under Section 2) in object code or executable form under the
You may copy and distribute the Program (or a work based on it, terms of Sections 1 and 2 above provided that you also do one of the
under Section 2) in object code or executable form under the terms of following:
Sections 1 and 2 above provided that you also do one of the following: </p>
</p> <dl>
<dl> <dd>
<dd> <strong>a)</strong> Accompany it with the complete corresponding
<strong>a)</strong> machine-readable source code, which must be distributed under the terms
Accompany it with the complete corresponding machine-readable of Sections 1 and 2 above on a medium customarily used for software
source code, which must be distributed under the terms of Sections interchange; or,
1 and 2 above on a medium customarily used for software interchange; or, </dd>
</dd> <dd>
<dd> <strong>b)</strong> Accompany it with a written offer, valid for at
<strong>b)</strong> least three years, to give any third party, for a charge no more than
Accompany it with a written offer, valid for at least three your cost of physically performing source distribution, a complete
years, to give any third party, for a charge no more than your machine-readable copy of the corresponding source code, to be
cost of physically performing source distribution, a complete distributed under the terms of Sections 1 and 2 above on a medium
machine-readable copy of the corresponding source code, to be customarily used for software interchange; or,
distributed under the terms of Sections 1 and 2 above on a medium </dd>
customarily used for software interchange; or, </dl>
</dd> <dl>
</dl> <dd>
<dl> <strong>c)</strong> Accompany it with the information you received as to
<dd> the offer to distribute corresponding source code. (This alternative is
<strong>c)</strong> allowed only for noncommercial distribution and only if you received the
Accompany it with the information you received as to the offer program in object code or executable form with such an offer, in accord
to distribute corresponding source code. (This alternative is with Subsection b above.)
allowed only for noncommercial distribution and only if you </dd>
received the program in object code or executable form with such </dl>
an offer, in accord with Subsection b above.) <p>
</dd> The source code for a work means the preferred form of the work for making
</dl> modifications to it. For an executable work, complete source code means
<p> all the source code for all modules it contains, plus any associated
The source code for a work means the preferred form of the work for interface definition files, plus the scripts used to control compilation
making modifications to it. For an executable work, complete source and installation of the executable. However, as a special exception, the
code means all the source code for all modules it contains, plus any source code distributed need not include anything that is normally
associated interface definition files, plus the scripts used to distributed (in either source or binary form) with the major components
control compilation and installation of the executable. However, as a (compiler, kernel, and so on) of the operating system on which the
special exception, the source code distributed need not include executable runs, unless that component itself accompanies the executable.
anything that is normally distributed (in either source or binary </p>
form) with the major components (compiler, kernel, and so on) of the <p>
operating system on which the executable runs, unless that component If distribution of executable or object code is made by offering access to
itself accompanies the executable. copy from a designated place, then offering equivalent access to copy the
</p> source code from the same place counts as distribution of the source code,
<p> even though third parties are not compelled to copy the source along with
If distribution of executable or object code is made by offering the object code.
access to copy from a designated place, then offering equivalent </p>
access to copy the source code from the same place counts as <p>
distribution of the source code, even though third parties are not <strong>4.</strong> You may not copy, modify, sublicense, or distribute
compelled to copy the source along with the object code. the Program except as expressly provided under this License. Any attempt
</p> otherwise to copy, modify, sublicense or distribute the Program is void,
<p> and will automatically terminate your rights under this License. However,
<strong>4.</strong> parties who have received copies, or rights, from you under this License
You may not copy, modify, sublicense, or distribute the Program will not have their licenses terminated so long as such parties remain in
except as expressly provided under this License. Any attempt full compliance.
otherwise to copy, modify, sublicense or distribute the Program is </p>
void, and will automatically terminate your rights under this License. <p>
However, parties who have received copies, or rights, from you under <strong>5.</strong> You are not required to accept this License, since you
this License will not have their licenses terminated so long as such have not signed it. However, nothing else grants you permission to modify
parties remain in full compliance. or distribute the Program or its derivative works. These actions are
</p> prohibited by law if you do not accept this License. Therefore, by
<p> modifying or distributing the Program (or any work based on the Program),
<strong>5.</strong> you indicate your acceptance of this License to do so, and all its terms
You are not required to accept this License, since you have not and conditions for copying, distributing or modifying the Program or works
signed it. However, nothing else grants you permission to modify or based on it.
distribute the Program or its derivative works. These actions are </p>
prohibited by law if you do not accept this License. Therefore, by <p>
modifying or distributing the Program (or any work based on the <strong>6.</strong> Each time you redistribute the Program (or any work
Program), you indicate your acceptance of this License to do so, and based on the Program), the recipient automatically receives a license from
all its terms and conditions for copying, distributing or modifying the original licensor to copy, distribute or modify the Program subject to
the Program or works based on it. these terms and conditions. You may not impose any further restrictions on
</p> the recipients' exercise of the rights granted herein. You are not
<p> responsible for enforcing compliance by third parties to this License.
<strong>6.</strong> </p>
Each time you redistribute the Program (or any work based on the <p>
Program), the recipient automatically receives a license from the <strong>7.</strong> If, as a consequence of a court judgment or allegation
original licensor to copy, distribute or modify the Program subject to of patent infringement or for any other reason (not limited to patent
these terms and conditions. You may not impose any further issues), conditions are imposed on you (whether by court order, agreement
restrictions on the recipients' exercise of the rights granted herein. or otherwise) that contradict the conditions of this License, they do not
You are not responsible for enforcing compliance by third parties to excuse you from the conditions of this License. If you cannot distribute
this License. so as to satisfy simultaneously your obligations under this License and
</p> any other pertinent obligations, then as a consequence you may not
<p> distribute the Program at all. For example, if a patent license would not
<strong>7.</strong> permit royalty-free redistribution of the Program by all those who receive
If, as a consequence of a court judgment or allegation of patent copies directly or indirectly through you, then the only way you could
infringement or for any other reason (not limited to patent issues), satisfy both it and this License would be to refrain entirely from
conditions are imposed on you (whether by court order, agreement or distribution of the Program.
otherwise) that contradict the conditions of this License, they do not </p>
excuse you from the conditions of this License. If you cannot <p>
distribute so as to satisfy simultaneously your obligations under this If any portion of this section is held invalid or unenforceable under any
License and any other pertinent obligations, then as a consequence you particular circumstance, the balance of the section is intended to apply
may not distribute the Program at all. For example, if a patent and the section as a whole is intended to apply in other circumstances.
license would not permit royalty-free redistribution of the Program by </p>
all those who receive copies directly or indirectly through you, then <p>
the only way you could satisfy both it and this License would be to It is not the purpose of this section to induce you to infringe any
refrain entirely from distribution of the Program. patents or other property right claims or to contest validity of any such
</p> claims; this section has the sole purpose of protecting the integrity of
<p> the free software distribution system, which is implemented by public
If any portion of this section is held invalid or unenforceable under license practices. Many people have made generous contributions to the
any particular circumstance, the balance of the section is intended to wide range of software distributed through that system in reliance on
apply and the section as a whole is intended to apply in other consistent application of that system; it is up to the author/donor to
circumstances. decide if he or she is willing to distribute software through any other
</p> system and a licensee cannot impose that choice.
<p> </p>
It is not the purpose of this section to induce you to infringe any <p>
patents or other property right claims or to contest validity of any This section is intended to make thoroughly clear what is believed to be a
such claims; this section has the sole purpose of protecting the consequence of the rest of this License.
integrity of the free software distribution system, which is </p>
implemented by public license practices. Many people have made <p>
generous contributions to the wide range of software distributed <strong>8.</strong> If the distribution and/or use of the Program is
through that system in reliance on consistent application of that restricted in certain countries either by patents or by copyrighted
system; it is up to the author/donor to decide if he or she is willing interfaces, the original copyright holder who places the Program under
to distribute software through any other system and a licensee cannot this License may add an explicit geographical distribution limitation
impose that choice. excluding those countries, so that distribution is permitted only in or
</p> among countries not thus excluded. In such case, this License incorporates
<p> the limitation as if written in the body of this License.
This section is intended to make thoroughly clear what is believed to </p>
be a consequence of the rest of this License. <p>
</p> <strong>9.</strong> The Free Software Foundation may publish revised
<p> and/or new versions of the General Public License from time to time. Such
<strong>8.</strong> new versions will be similar in spirit to the present version, but may
If the distribution and/or use of the Program is restricted in differ in detail to address new problems or concerns.
certain countries either by patents or by copyrighted interfaces, the </p>
original copyright holder who places the Program under this License <p>
may add an explicit geographical distribution limitation excluding Each version is given a distinguishing version number. If the Program
those countries, so that distribution is permitted only in or among specifies a version number of this License which applies to it and "any
countries not thus excluded. In such case, this License incorporates later version", you have the option of following the terms and conditions
the limitation as if written in the body of this License. either of that version or of any later version published by the Free
</p> Software Foundation. If the Program does not specify a version number of
<p> this License, you may choose any version ever published by the Free
<strong>9.</strong> Software Foundation.
The Free Software Foundation may publish revised and/or new versions </p>
of the General Public License from time to time. Such new versions will <p>
be similar in spirit to the present version, but may differ in detail to <strong>10.</strong> If you wish to incorporate parts of the Program into
address new problems or concerns. other free programs whose distribution conditions are different, write to
</p> the author to ask for permission. For software which is copyrighted by the
<p> Free Software Foundation, write to the Free Software Foundation; we
Each version is given a distinguishing version number. If the Program sometimes make exceptions for this. Our decision will be guided by the two
specifies a version number of this License which applies to it and "any goals of preserving the free status of all derivatives of our free
later version", you have the option of following the terms and conditions software and of promoting the sharing and reuse of software generally.
either of that version or of any later version published by the Free </p>
Software Foundation. If the Program does not specify a version number of <p><strong>NO WARRANTY</strong></p>
this License, you may choose any version ever published by the Free Software <p>
Foundation. <strong>11.</strong> BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE
</p> IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
<p> EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
<strong>10.</strong> PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
If you wish to incorporate parts of the Program into other free EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
programs whose distribution conditions are different, write to the author WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
to ask for permission. For software which is copyrighted by the Free ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
Software Foundation, write to the Free Software Foundation; we sometimes SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
make exceptions for this. Our decision will be guided by the two goals SERVICING, REPAIR OR CORRECTION.
of preserving the free status of all derivatives of our free software and </p>
of promoting the sharing and reuse of software generally. <p>
</p> <strong>12.</strong> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR
<p> AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
<strong>NO WARRANTY</strong> MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO
</p> YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
<p> CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
<strong>11.</strong> PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED </p>
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF <p></p>
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS <h3>END OF TERMS AND CONDITIONS</h3>
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE </body>
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, </html>
REPAIR OR CORRECTION.
</p>
<p>
<strong>12.</strong>
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
</p>
<p></p>
<h3>END OF TERMS AND CONDITIONS</h3>
</body></html>

View File

@ -1,391 +1,542 @@
<html> <html>
<head> <head>
<title>Licencia P&uacute;blica GNU</title> <title>Licencia P&uacute;blica GNU</title>
</head> </head>
<body> <body>
<h2>Licencia P&uacute;blica GNU</h2>
<h3>Contenido</h3>
<h2>Licencia P&uacute;blica GNU</h2> <ul>
<h3>Contenido</h3> <li><a href="#SEC1">Licencia P&uacute;blica GNU</a></li>
<li><a href="#SEC2">Pre&aacute;mbulo</a></li>
<li>
<a href="#SEC3"
>T&eacute;rminos y condiciones para la copia, distribuci&oacute;n y
modificaci&oacute;n</a
>
</li>
<li>
<a href="#APPENDIX"
>Ap&eacute;ndice: C&oacute;mo aplicar estos t&eacute;rminos a sus
nuevos programas</a
>
</li>
</ul>
<br />
<h3><a name="SEC1">Licencia P&uacute;blica GNU</a></h3>
<p>
Esta es la conocida GNU Public License (GPL), versi&oacute;n 2 (de junio
de 1.991), que cubre la mayor parte del software de la Free Software
Foundation, y muchos m&aacute;s programas.
</p>
<ul> <p>Los autores de esta traducci&oacute;n son:</p>
<li><a href="#SEC1">Licencia P&uacute;blica GNU</a></li> <ul>
<li><a href="#SEC2">Pre&aacute;mbulo</a></li> <li>
<li><a href="#SEC3">T&eacute;rminos y condiciones para la copia, <a href="mailto:jgb@computer.org"
distribuci&oacute;n y modificaci&oacute;n</a></li> >Jes&uacute;s Gonz&aacute;lez Barahona</a
<li><a href="#APPENDIX">Ap&eacute;ndice: C&oacute;mo aplicar estos >
t&eacute;rminos a sus nuevos programas</a></li> </li>
</ul> <li>
<br> <a href="mailto:pheras@acm.org">Pedro de las Heras Quir&oacute;s</a>
<h3><a name="SEC1">Licencia P&uacute;blica GNU</a></h3> </li>
<p> </ul>
Esta es la conocida GNU Public License (GPL), versi&oacute;n 2 (de junio
de 1.991), que cubre la mayor parte del software de la Free Software Foundation,
y muchos m&aacute;s programas.</p>
<p>Los autores de esta traducci&oacute;n son: <blockquote>
</p><ul><li><a href="mailto:jgb@computer.org">Jes&uacute;s Gonz&aacute;lez Barahona</a> <hr />
</li><li><a href="mailto:pheras@acm.org">Pedro de las Heras Quir&oacute;s</a> <b>NOTA IMPORTANTE:</b>
</li></ul> <p>
Esta es una traducci&oacute;n no oficial al espa&ntilde;ol de la GNU
General Public License. No ha sido publicada por la Free Software
Foundation, y no establece legalmente las condiciones de
distribuci&oacute;n para el software que usa la GNU GPL. Estas
condiciones se establecen solamente por el texto original, en
ingl&eacute;s, de la GNU GPL. Sin embargo, esperamos que esta
traducci&oacute;n ayude a los hispanohablantes a entender mejor la GNU
GPL.
</p>
<p><b>IMPORTANT NOTICE:</b></p>
<p>
This is an unofficial translation of the GNU General Public License into
Spanish. It was not published by the Free Software Foundation, and does
not legally state the distribution terms for software that uses the GNU
GPL--only the original English text of the GNU GPL does that. However,
we hope that this translation will help Spanish speakers understand the
GNU GPL better.
</p>
<p></p>
<hr />
</blockquote>
<blockquote> <p>Copyright (C) 1989, 1991 Free Software Foundation, Inc.</p>
<hr> <p>675 Mass Ave, Cambridge, MA 02139, EEUU</p>
<b>NOTA IMPORTANTE:</b> <p>
<p> Se permite la copia y distribuci&oacute;n de copias literales de este
Esta es una traducci&oacute;n no oficial al espa&ntilde;ol de la GNU General Public documento, pero no se permite su modificaci&oacute;n.
License. No ha sido publicada por la Free Software Foundation, y no </p>
establece legalmente las condiciones de distribuci&oacute;n para el software
que usa la GNU GPL. Estas condiciones se establecen solamente por
el texto original, en ingl&eacute;s, de la GNU GPL. Sin embargo, esperamos
que esta traducci&oacute;n ayude a los hispanohablantes a entender mejor la
GNU GPL.
</p><p>
<b>IMPORTANT NOTICE:</b> <h3><a name="SEC2">Pre&aacute;mbulo</a></h3>
</p><p> <p>
This is an unofficial translation of the GNU General Public License Las licencias que cubren la mayor parte del software est&aacute;n
into Spanish. It was not published by the Free Software dise&ntilde;adas para quitarle a usted la libertad de compartirlo y
Foundation, and does not legally state the distribution terms for modificarlo. Por el contrario, la Licencia P&uacute;blica General de GNU
software that uses the GNU GPL--only the original English text of pretende garantizarle la libertad de compartir y modificar software libre,
the GNU GPL does that. However, we hope that this translation will para asegurar que el software es libre para todos sus usuarios. Esta
help Spanish speakers understand the GNU GPL better. Licencia P&uacute;blica General se aplica a la mayor parte del software
</p><p> del la Free Software Foundation y a cualquier otro programa si sus autores
</p><hr> se comprometen a utilizarla. (Existe otro software de la Free Software
</blockquote> Foundation que est&aacute; cubierto por la Licencia P&uacute;blica General
de GNU para Bibliotecas). Si quiere, tambi&eacute;n puede aplicarla a sus
propios programas.
</p>
<p>
Cuando hablamos de software libre, estamos refiri&eacute;ndonos a
libertad, no a precio. Nuestras Licencias P&uacute;blicas Generales
est&aacute;n dise&ntilde;adas para asegurarnos de que tenga la libertad de
distribuir copias de software libre (y cobrar por ese servicio si quiere),
de que reciba el c&oacute;digo fuente o que pueda conseguirlo si lo
quiere, de que pueda modificar el software o usar fragmentos de &eacute;l
en nuevos programas libres, y de que sepa que puede hacer todas estas
cosas.
</p>
<p>
Para proteger sus derechos necesitamos algunas restricciones que prohiban
a cualquiera negarle a usted estos derechos o pedirle que renuncie a
ellos. Estas restricciones se traducen en ciertas obligaciones que le
afectan si distribuye copias del software, o si lo modifica.
</p>
<p>
Por ejemplo, si distribuye copias de uno de estos programas, sea
gratuitamente, o a cambio de una contraprestaci&oacute;n, debe dar a los
receptores todos los derechos que tiene. Debe asegurarse de que ellos
tambi&eacute;n reciben, o pueden conseguir, el c&oacute;digo fuente. Y
debe mostrarles estas condiciones de forma que conozcan sus derechos.
</p>
<p>Protegemos sus derechos con la combinaci&oacute;n de dos medidas:</p>
<ol type="1">
<li>Ponemos el software bajo copyright y</li>
<li>
le ofrecemos esta licencia, que le da permiso legal para copiar,
distribuir y/o modificar el software.
</li>
</ol>
<p>
Tambi&eacute;n, para la protecci&oacute;n de cada autor y la nuestra
propia, queremos asegurarnos de que todo el mundo comprende que no se
proporciona ninguna garant&iacute;a para este software libre. Si el
software se modifica por cualquiera y &eacute;ste a su vez lo distribuye,
queremos que sus receptores sepan que lo que tienen no es el original, de
forma que cualquier problema introducido por otros no afecte a la
reputaci&oacute;n de los autores originales.
</p>
<p>
Por &uacute;ltimo, cualquier programa libre est&aacute; constantemente
amenazado por patentes sobre el software. Queremos evitar el peligro de
que los redistribuidores de un programa libre obtengan patentes por su
cuenta, convirtiendo de facto el programa en propietario. Para evitar
esto, hemos dejado claro que cualquier patente debe ser pedida para el uso
libre de cualquiera, o no ser pedida.
</p>
<p>
Los t&eacute;rminos exactos y las condiciones para la copia,
distribuci&oacute;n y modificaci&oacute;n se exponen a
continuaci&oacute;n.
</p>
<p>Copyright (C) 1989, 1991 Free Software Foundation, Inc. <h3>
</p><p>675 Mass Ave, Cambridge, MA 02139, EEUU <a name="SEC3"
</p><p>Se permite la copia y distribuci&oacute;n de copias literales de este >T&eacute;rminos y condiciones para la copia, distribuci&oacute;n y
documento, pero no se permite su modificaci&oacute;n. modificaci&oacute;n</a
</p> >
</h3>
<ol type="1">
<li>
Esta Licencia se aplica a cualquier programa u otro tipo de trabajo que
contenga una nota colocada por el tenedor del copyright diciendo que
puede ser distribuido bajo los t&eacute;rminos de esta Licencia
P&uacute;blica General. En adelante, <20>Programa<6D> se referir&aacute; a
cualquier programa o trabajo que cumpla esa condici&oacute;n y <20>trabajo
basado en el Programa<6D> se referir&aacute; bien al Programa o a cualquier
trabajo derivado de &eacute;l seg&uacute;n la ley de copyright. Esto es,
un trabajo que contenga el programa o una proci&oacute;n de &eacute;l,
bien en forma literal o con modificaciones y/o traducido en otro
lenguaje. Por lo tanto, la traducci&oacute;n est&aacute; incluida sin
limitaciones en el t&eacute;rmino <20>modificaci&oacute;n<EFBFBD>. Cada
concesionario (licenciatario) ser&aacute; denominado <20>usted<65>.
<p>
Cualquier otra actividad que no sea la copia, distribuci&oacute;n o
modificaci&oacute;n no est&aacute; cubierta por esta Licencia,
est&aacute; fuera de su &aacute;mbito. El acto de ejecutar el Programa
no est&aacute; restringido, y los resultados del Programa est&aacute;n
cubiertos &uacute;nicamente si sus contenidos constituyen un trabajo
basado en el Programa, independientemente de haberlo producido
mediante la ejecuci&oacute;n del programa. El que esto se cumpla,
depende de lo que haga el programa.
</p>
</li>
<li>
Usted puede copiar y distribuir copias literales del c&oacute;digo
fuente del Programa, seg&uacute;n lo has recibido, en cualquier medio,
supuesto que de forma adecuada y bien visible publique en cada copia un
anuncio de copyright adecuado y un repudio de garant&iacute;a, mantenga
intactos todos los anuncios que se refieran a esta Licencia y a la
ausencia de garant&iacute;a, y proporcione a cualquier otro receptor del
programa una copia de esta Licencia junto con el Programa.
<p>
Puede cobrar un precio por el acto f&iacute;sico de transferir una
copia, y puede, seg&uacute;n su libre albedr&iacute;o, ofrecer
garant&iacute;a a cambio de unos honorarios.
</p>
</li>
<li>
Puede modificar su copia o copias del Programa o de cualquier
porci&oacute;n de &eacute;l, formando de esta manera un trabajo basado
en el Programa, y copiar y distribuir esa modificaci&oacute;n o trabajo
bajo los t&eacute;rminos del apartado 1, antedicho, supuesto que
adem&aacute;s cumpla las siguientes condiciones:
<ol type="a">
<li>
Debe hacer que los ficheros modificados lleven anuncios prominentes
indicando que los ha cambiado y la fecha de cualquier cambio.
</li>
<li>
Debe hacer que cualquier trabajo que distribuya o publique y que en
todo o en parte contenga o sea derivado del Programa o de cualquier
parte de &eacute;l sea licenciada como un todo, sin carga alguna, a
todas las terceras partes y bajo los t&eacute;rminos de esta
Licencia.
</li>
<li>
Si el programa modificado lee normalmente &oacute;rdenes
interactivamente cuando es ejecutado, debe hacer que, cuando
comience su ejecuci&oacute;n para ese uso interactivo de la forma
m&aacute;s habitual, muestre o escriba un mensaje que incluya un
anuncio de copyright y un anuncio de que no se ofrece ninguna
garant&iacute;a (o por el contrario que s&iacute; se ofrece
garant&iacute;a) y que los usuarios pueden redistribuir el programa
bajo estas condiciones, e indicando al usuario c&oacute;mo ver una
copia de esta licencia. (Excepci&oacute;n: si el propio programa es
interactivo pero normalmente no muestra ese anuncio, no se requiere
que su trabajo basado en el Programa muestre ning&uacute;n anuncio).
</li>
</ol>
Estos requisitos se aplican al trabajo modificado como un todo. Si
partes identificables de ese trabajo no son derivadas del Programa, y
pueden, razonablemente, ser consideradas trabajos independientes y
separados por ellos mismos, entonces esta Licencia y sus t&eacute;rminos
no se aplican a esas partes cuando sean distribuidas como trabajos
separados. Pero cuando distribuya esas mismas secciones como partes de
un todo que es un trabajo basado en el Programa, la distribuci&oacute;n
del todo debe ser seg&uacute;n los t&eacute;rminos de esta licencia,
cuyos permisos para otros licenciatarios se extienden al todo completo,
y por lo tanto a todas y cada una de sus partes, con independencia de
qui&eacute;n la escribi&oacute;.
<p>
Por lo tanto, no es la intenci&oacute;n de este apartado reclamar
derechos o desafiar sus derechos sobre trabajos escritos totalmente
por usted mismo. El intento es ejercer el derecho a controlar la
distribuci&oacute;n de trabajos derivados o colectivos basados en el
Programa.
</p>
<p>
Adem&aacute;s, el simple hecho de reunir un trabajo no basado en el
Programa con el Programa (o con un trabajo basado en el Programa) en
un volumen de almacenamiento o en un medio de distribuci&oacute;n no
hace que dicho trabajo entre dentro del &aacute;mbito cubierto por
esta Licencia.
</p>
</li>
<li>
Puede copiar y distribuir el Programa (o un trabajo basado en &eacute;l,
seg&uacute;n se especifica en el apartado 2, como c&oacute;digo objeto o
en formato ejecutable seg&uacute;n los t&eacute;rminos de los apartados
1 y 2, supuesto que adem&aacute;s cumpla una de las siguientes
condiciones:
<ol type="a">
<li>
Acompa&ntilde;arlo con el c&oacute;digo fuente completo
correspondiente, en formato electr&oacute;nico, que debe ser
distribuido seg&uacute;n se especifica en los apartados 1 y 2 de
esta Licencia en un medio habitualmente utilizado para el
intercambio de programas, o
</li>
<li>
Acompa&ntilde;arlo con una oferta por escrito, v&aacute;lida durante
al menos tres a&ntilde;os, de proporcionar a cualquier tercera parte
una copia completa en formato electr&oacute;nico del c&oacute;digo
fuente correspondiente, a un coste no mayor que el de realizar
f&iacute;sicamente la distribuci&oacute;n del fuente, que
ser&aacute; distribuido bajo las condiciones descritas en los
apartados 1 y 2 anteriores, en un medio habitualmente utilizado para
el intercambio de programas, o
</li>
<li>
Acompa&ntilde;arlo con la informaci&oacute;n que recibiste
ofreciendo distribuir el c&oacute;digo fuente correspondiente. (Esta
opci&oacute;n se permite s&oacute;lo para distribuci&oacute;n no
comercial y s&oacute;lo si usted recibi&oacute; el programa como
c&oacute;digo objeto o en formato ejecutable con tal oferta, de
acuerdo con el apartado b anterior).
</li>
</ol>
Por c&oacute;digo fuente de un trabajo se entiende la forma preferida
del trabajo cuando se le hacen modificaciones. Para un trabajo
ejecutable, se entiende por c&oacute;digo fuente completo todo el
c&oacute;digo fuente para todos los m&oacute;dulos que contiene,
m&aacute;s cualquier fichero asociado de definici&oacute;n de
interfaces, m&aacute;s los guiones utilizados para controlar la
compilaci&oacute;n e instalaci&oacute;n del ejecutable. Como
excepci&oacute;n especial el c&oacute;digo fuente distribuido no
necesita incluir nada que sea distribuido normalmente (bien como fuente,
bien en forma binaria) con los componentes principales (compilador,
kernel y similares) del sistema operativo en el cual funciona el
ejecutable, a no ser que el propio componente acompa&ntilde;e al
ejecutable.
<p>
Si la distribuci&oacute;n del ejecutable o del c&oacute;digo objeto se
hace mediante la oferta acceso para copiarlo de un cierto lugar,
entonces se considera la oferta de acceso para copiar el c&oacute;digo
fuente del mismo lugar como distribuci&oacute;n del c&oacute;digo
fuente, incluso aunque terceras partes no est&eacute;n forzadas a
copiar el fuente junto con el c&oacute;digo objeto.
</p>
</li>
<li>
No puede copiar, modificar, sublicenciar o distribuir el Programa
excepto como prev&eacute; expresamente esta Licencia. Cualquier intento
de copiar, modificar sublicenciar o distribuir el Programa de otra forma
es inv&aacute;lida, y har&aacute; que cesen autom&aacute;ticamente los
derechos que te proporciona esta Licencia. En cualquier caso, las partes
que hayan recibido copias o derechos de usted bajo esta Licencia no
cesar&aacute;n en sus derechos mientras esas partes contin&uacute;en
cumpli&eacute;ndola.
</li>
<li>
No est&aacute; obligado a aceptar esta licencia, ya que no la ha
firmado. Sin embargo, no hay hada m&aacute;s que le proporcione permiso
para modificar o distribuir el Programa o sus trabajos derivados. Estas
acciones est&aacute;n prohibidas por la ley si no acepta esta Licencia.
Por lo tanto, si modifica o distribuye el Programa (o cualquier trabajo
basado en el Programa), est&aacute; indicando que acepta esta Licencia
para poder hacerlo, y todos sus t&eacute;rminos y condiciones para
copiar, distribuir o modificar el Programa o trabajos basados en
&eacute;l.
</li>
<li>
Cada vez que redistribuya el Programa (o cualquier trabajo basado en el
Programa), el receptor recibe autom&aacute;ticamente una licencia del
licenciatario original para copiar, distribuir o modificar el Programa,
de forma sujeta a estos t&eacute;rminos y condiciones. No puede imponer
al receptor ninguna restricci&oacute;n m&aacute;s sobre el ejercicio de
los derechos aqu&iacute; garantizados. No es usted responsable de hacer
cumplir esta licencia por terceras partes.
</li>
<li>
Si como consecuencia de una resoluci&oacute;n judicial o de una
alegaci&oacute;n de infracci&oacute;n de patente o por cualquier otra
raz&oacute;n (no limitada a asuntos relacionados con patentes) se le
imponen condiciones (ya sea por mandato judicial, por acuerdo o por
cualquier otra causa) que contradigan las condiciones de esta Licencia,
ello no le exime de cumplir las condiciones de esta Licencia. Si no
puede realizar distribuciones de forma que se satisfagan
simult&aacute;neamente sus obligaciones bajo esta licencia y cualquier
otra obligaci&oacute;n pertinente entonces, como consecuencia, no puede
distribuir el Programa de ninguna forma. Por ejemplo, si una patente no
permite la redistribuci&oacute;n libre de derechos de autor del Programa
por parte de todos aquellos que reciban copias directa o indirectamente
a trav&eacute;s de usted, entonces la &uacute;nica forma en que
podr&iacute;a satisfacer tanto esa condici&oacute;n como esta Licencia
ser&iacute;a evitar completamente la distribuci&oacute;n del Programa.
<p>
Si cualquier porci&oacute;n de este apartado se considera
inv&aacute;lida o imposible de cumplir bajo cualquier circunstancia
particular ha de cumplirse el resto y la secci&oacute;n por entero ha
de cumplirse en cualquier otra circunstancia.
</p>
<p>
No es el prop&oacute;sito de este apartado inducirle a infringir
ninguna reivindicaci&oacute;n de patente ni de ning&uacute;n otro
derecho de propiedad o impugnar la validez de ninguna de dichas
reivindicaciones. Este apartado tiene el &uacute;nico prop&oacute;sito
de proteger la integridad del sistema de distribuci&oacute;n de
software libre, que se realiza mediante pr&aacute;cticas de licencia
p&uacute;blica. Mucha gente ha hecho contribuciones generosas a la
gran variedad de software distribuido mediante ese sistema con la
confianza de que el sistema se aplicar&aacute; consistentemente.
Ser&aacute; el autor/donante quien decida si quiere distribuir
software mediante cualquier otro sistema y una licencia no puede
imponer esa elecci&oacute;n.
</p>
<p>
Este apartado pretende dejar completamente claro lo que se cree que es
una consecuencia del resto de esta Licencia.
</p>
</li>
<li>
Si la distribuci&oacute;n y/o uso de el Programa est&aacute; restringida
en ciertos pa&iacute;ses, bien por patentes o por interfaces bajo
copyright, el tenedor del copyright que coloca este Programa bajo esta
Licencia puede a&ntilde;adir una limitaci&oacute;n expl&iacute;cita de
distribuci&oacute;n geogr&aacute;fica excluyendo esos pa&iacute;ses, de
forma que la distribuci&oacute;n se permita s&oacute;lo en o entre los
pa&iacute;ses no excluidos de esta manera. En ese caso, esta Licencia
incorporar&aacute; la limitaci&oacute;n como si estuviese escrita en el
cuerpo de esta Licencia.
</li>
<li>
La Free Software Foundation puede publicar versiones revisadas y/o
nuevas de la Licencia P&uacute;blica General de tiempo en tiempo. Dichas
nuevas versiones ser&aacute;n similares en esp&iacute;ritu a la presente
versi&oacute;n, pero pueden ser diferentes en detalles para considerar
nuevos problemas o situaciones.
<p>
Cada versi&oacute;n recibe un n&uacute;mero de versi&oacute;n que la
distingue de otras. Si el Programa especifica un n&uacute;mero de
versi&oacute;n de esta Licencia que se refiere a ella y a <20>cualquier
versi&oacute;n posterior<6F>, tienes la opci&oacute;n de seguir los
t&eacute;rminos y condiciones, bien de esa versi&oacute;n, bien de
cualquier versi&oacute;n posterior publicada por la Free Software
Foundation. Si el Programa no especifica un n&uacute;mero de
versi&oacute;n de esta Licencia, puedes escoger cualquier
versi&oacute;n publicada por la Free Software Foundation.
</p>
</li>
<li>
Si quiere incorporar partes del Programa en otros programas libres cuyas
condiciones de distribuci&oacute;n son diferentes, escribe al autor para
pedirle permiso. Si el software tiene copyright de la Free Software
Foundation, escribe a la Free Software Foundation: algunas veces hacemos
excepciones en estos casos. Nuestra decisi&oacute;n estar&aacute; guiada
por el doble objetivo de de preservar la libertad de todos los derivados
de nuestro software libre y promover el que se comparta y reutilice el
software en general.
</li>
</ol>
<h3><a name="SEC2">Pre&aacute;mbulo</a></h3> <h3>AUSENCIA DE GARANT&Iacute;A</h3>
<p>
Las licencias que cubren la mayor parte del software est&aacute;n dise&ntilde;adas
para quitarle a usted la libertad de compartirlo y modificarlo. Por el
contrario, la Licencia P&uacute;blica General de GNU pretende garantizarle
la libertad de compartir y modificar software libre, para asegurar que
el software es libre para todos sus usuarios. Esta Licencia P&uacute;blica
General se aplica a la mayor parte del software del la Free Software Foundation
y a cualquier otro programa si sus autores se comprometen a utilizarla.
(Existe otro software de la Free Software Foundation que est&aacute; cubierto
por la Licencia P&uacute;blica General de GNU para Bibliotecas). Si quiere,
tambi&eacute;n puede aplicarla a sus propios programas.</p>
<p>Cuando hablamos de software libre, estamos refiri&eacute;ndonos a libertad,
no a precio. Nuestras Licencias P&uacute;blicas Generales est&aacute;n
dise&ntilde;adas para asegurarnos de que tenga la libertad de distribuir
copias de software libre (y cobrar por ese servicio si quiere), de que
reciba el c&oacute;digo fuente o que pueda conseguirlo si lo quiere, de
que pueda modificar el software o usar fragmentos de &eacute;l en nuevos
programas libres, y de que sepa que puede hacer todas estas cosas.
</p><p>Para proteger sus derechos necesitamos algunas restricciones que prohiban
a cualquiera negarle a usted estos derechos o pedirle que renuncie a ellos.
Estas restricciones se traducen en ciertas obligaciones que le afectan
si distribuye copias del software, o si lo modifica.
</p><p>Por ejemplo, si distribuye copias de uno de estos programas, sea gratuitamente,
o a cambio de una contraprestaci&oacute;n, debe dar a los receptores todos
los derechos que tiene. Debe asegurarse de que ellos tambi&eacute;n reciben,
o pueden conseguir, el c&oacute;digo fuente. Y debe mostrarles estas condiciones
de forma que conozcan sus derechos.
</p><p>Protegemos sus derechos con la combinaci&oacute;n de dos medidas:
</p><ol type="1">
<li>Ponemos el software bajo copyright y
</li><li>le ofrecemos esta licencia, que le da permiso legal para copiar, distribuir
y/o modificar el software.</li></ol>
<p>
Tambi&eacute;n, para la protecci&oacute;n de cada autor y la nuestra propia,
queremos asegurarnos de que todo el mundo comprende que no se proporciona
ninguna garant&iacute;a para este software libre. Si el software se modifica
por cualquiera y &eacute;ste a su vez lo distribuye, queremos que sus receptores
sepan que lo que tienen no es el original, de forma que cualquier problema
introducido por otros no afecte a la reputaci&oacute;n de los autores originales.</p>
<p>Por &uacute;ltimo, cualquier programa libre est&aacute; constantemente
amenazado por patentes sobre el software. Queremos evitar el peligro de
que los redistribuidores de un programa libre obtengan patentes por su
cuenta, convirtiendo de facto el programa en propietario. Para evitar esto,
hemos dejado claro que cualquier patente debe ser pedida para el uso libre
de cualquiera, o no ser pedida.
</p><p>Los t&eacute;rminos exactos y las condiciones para la copia, distribuci&oacute;n
y modificaci&oacute;n se exponen a continuaci&oacute;n.</p>
<h3><a name="SEC3">T&eacute;rminos y condiciones para la copia, <ol start="12" type="1">
distribuci&oacute;n y modificaci&oacute;n</a></h3> <li>
Como el programa se licencia libre de cargas, no se ofrece ninguna
garant&iacute;a sobre el programa, en todas la extensi&oacute;n
permitida por la legislaci&oacute;n aplicable. Excepto cuando se indique
de otra forma por escrito, los tenedores del copyright y/u otras partes
proporcionan el programa <20>tal cual<61>, sin garant&iacute;a de ninguna
clase, bien expresa o impl&iacute;cita, con inclusi&oacute;n, pero sin
limitaci&oacute;n a las garant&iacute;as mercantiles impl&iacute;citas o
a la conveniencia para un prop&oacute;sito particular. Cualquier riesgo
referente a la calidad y prestaciones del programa es asumido por usted.
Si se probase que el Programa es defectuoso, asume el coste de cualquier
servicio, reparaci&oacute;n o correcci&oacute;n.
</li>
<li>
En ning&uacute;n caso, salvo que lo requiera la legislaci&oacute;n
aplicable o haya sido acordado por escrito, ning&uacute;n tenedor del
copyright ni ninguna otra parte que modifique y/o redistribuya el
Programa seg&uacute;n se permite en esta Licencia ser&aacute;
responsable ante usted por da&ntilde;os, incluyendo cualquier
da&ntilde;o general, especial, incidental o resultante producido por el
uso o la imposibilidad de uso del Programa (con inclusi&oacute;n, pero
sin limitaci&oacute;n a la p&eacute;rdida de datos o a la
generaci&oacute;n incorrecta de datos o a p&eacute;rdidas sufridas por
usted o por terceras partes o a un fallo del Programa al funcionar en
combinaci&oacute;n con cualquier otro programa), incluso si dicho
tenedor u otra parte ha sido advertido de la posibilidad de dichos
da&ntilde;os.
</li>
</ol>
<ol type="1"> <h3>FIN DE T&Eacute;RMINOS Y CONDICIONES</h3>
<li>Esta Licencia se aplica a cualquier programa u otro tipo
de trabajo que contenga una nota colocada por el tenedor del copyright
diciendo que puede ser distribuido bajo los t&eacute;rminos de esta Licencia
P&uacute;blica General. En adelante, <20>Programa<6D> se referir&aacute;
a cualquier programa o trabajo que cumpla esa condici&oacute;n y <20>trabajo
basado en el Programa<6D> se referir&aacute; bien al Programa o a cualquier
trabajo derivado de &eacute;l seg&uacute;n la ley de copyright. Esto es,
un trabajo que contenga el programa o una proci&oacute;n de &eacute;l,
bien en forma literal o con modificaciones y/o traducido en otro lenguaje.
Por lo tanto, la traducci&oacute;n est&aacute; incluida sin limitaciones
en el t&eacute;rmino <20>modificaci&oacute;n<EFBFBD>. Cada concesionario
(licenciatario) ser&aacute; denominado <20>usted<65>.
<p>Cualquier otra actividad que no sea la copia, distribuci&oacute;n o
modificaci&oacute;n no est&aacute; cubierta por esta Licencia, est&aacute;
fuera de su &aacute;mbito. El acto de ejecutar el Programa no est&aacute;
restringido, y los resultados del Programa est&aacute;n cubiertos &uacute;nicamente
si sus contenidos constituyen un trabajo basado en el Programa, independientemente
de haberlo producido mediante la ejecuci&oacute;n del programa. El que
esto se cumpla, depende de lo que haga el programa.
</p></li><li>Usted puede copiar y distribuir copias literales del c&oacute;digo fuente
del Programa, seg&uacute;n lo has recibido, en cualquier medio, supuesto
que de forma adecuada y bien visible publique en cada copia un anuncio
de copyright adecuado y un repudio de garant&iacute;a, mantenga intactos
todos los anuncios que se refieran a esta Licencia y a la ausencia de garant&iacute;a,
y proporcione a cualquier otro receptor del programa una copia de esta
Licencia junto con el Programa.
<p>Puede cobrar un precio por el acto f&iacute;sico de transferir una copia,
y puede, seg&uacute;n su libre albedr&iacute;o, ofrecer garant&iacute;a
a cambio de unos honorarios.
</p></li><li>Puede modificar su copia o copias del Programa o de cualquier porci&oacute;n
de &eacute;l, formando de esta manera un trabajo basado en el Programa,
y copiar y distribuir esa modificaci&oacute;n o trabajo bajo los t&eacute;rminos
del apartado 1, antedicho, supuesto que adem&aacute;s cumpla las siguientes
condiciones:
<ol type="a"><li>Debe hacer que los ficheros modificados lleven anuncios
prominentes indicando que los ha cambiado y la fecha de cualquier cambio.
</li><li>Debe hacer que cualquier trabajo que distribuya o publique y que en
todo o en parte contenga o sea derivado del Programa o de cualquier parte
de &eacute;l sea licenciada como un todo, sin carga alguna, a todas las
terceras partes y bajo los t&eacute;rminos de esta Licencia.
</li><li>Si el programa modificado lee normalmente &oacute;rdenes interactivamente
cuando es ejecutado, debe hacer que, cuando comience su ejecuci&oacute;n
para ese uso interactivo de la forma m&aacute;s habitual, muestre o escriba
un mensaje que incluya un anuncio de copyright y un anuncio de que no se
ofrece ninguna garant&iacute;a (o por el contrario que s&iacute; se ofrece
garant&iacute;a) y que los usuarios pueden redistribuir el programa bajo
estas condiciones, e indicando al usuario c&oacute;mo ver una copia de
esta licencia. (Excepci&oacute;n: si el propio programa es interactivo
pero normalmente no muestra ese anuncio, no se requiere que su trabajo
basado en el Programa muestre ning&uacute;n anuncio).</li></ol>
Estos requisitos se aplican al trabajo modificado como un todo. Si partes
identificables de ese trabajo no son derivadas del Programa, y pueden,
razonablemente, ser consideradas trabajos independientes y separados por
ellos mismos, entonces esta Licencia y sus t&eacute;rminos no se aplican
a esas partes cuando sean distribuidas como trabajos separados. Pero cuando
distribuya esas mismas secciones como partes de un todo que es un trabajo
basado en el Programa, la distribuci&oacute;n del todo debe ser seg&uacute;n
los t&eacute;rminos de esta licencia, cuyos permisos para otros licenciatarios
se extienden al todo completo, y por lo tanto a todas y cada una de sus
partes, con independencia de qui&eacute;n la escribi&oacute;.
<p>Por lo tanto, no es la intenci&oacute;n de este apartado reclamar derechos
o desafiar sus derechos sobre trabajos escritos totalmente por usted mismo.
El intento es ejercer el derecho a controlar la distribuci&oacute;n de
trabajos derivados o colectivos basados en el Programa.
</p><p>Adem&aacute;s, el simple hecho de reunir un trabajo no basado en el
Programa con el Programa (o con un trabajo basado en el Programa) en un
volumen de almacenamiento o en un medio de distribuci&oacute;n no hace
que dicho trabajo entre dentro del &aacute;mbito cubierto por esta Licencia.
</p></li><li>Puede copiar y distribuir el Programa (o un trabajo basado en &eacute;l,
seg&uacute;n se especifica en el apartado 2, como c&oacute;digo objeto
o en formato ejecutable seg&uacute;n los t&eacute;rminos de los apartados
1 y 2, supuesto que adem&aacute;s cumpla una de las siguientes condiciones:
<ol type="a"><li>Acompa&ntilde;arlo con el c&oacute;digo fuente completo
correspondiente, en formato electr&oacute;nico, que debe ser distribuido
seg&uacute;n se especifica en los apartados 1 y 2 de esta Licencia en un
medio habitualmente utilizado para el intercambio de programas, o
</li><li>Acompa&ntilde;arlo con una oferta por escrito, v&aacute;lida durante
al menos tres a&ntilde;os, de proporcionar a cualquier tercera parte una
copia completa en formato electr&oacute;nico del c&oacute;digo fuente correspondiente,
a un coste no mayor que el de realizar f&iacute;sicamente la distribuci&oacute;n
del fuente, que ser&aacute; distribuido bajo las condiciones descritas
en los apartados 1 y 2 anteriores, en un medio habitualmente utilizado
para el intercambio de programas, o
</li><li>Acompa&ntilde;arlo con la informaci&oacute;n que recibiste ofreciendo
distribuir el c&oacute;digo fuente correspondiente. (Esta opci&oacute;n
se permite s&oacute;lo para distribuci&oacute;n no comercial y s&oacute;lo
si usted recibi&oacute; el programa como c&oacute;digo objeto o en formato
ejecutable con tal oferta, de acuerdo con el apartado b anterior).</li></ol>
Por c&oacute;digo fuente de un trabajo se entiende la forma preferida del
trabajo cuando se le hacen modificaciones. Para un trabajo ejecutable,
se entiende por c&oacute;digo fuente completo todo el c&oacute;digo fuente
para todos los m&oacute;dulos que contiene, m&aacute;s cualquier fichero
asociado de definici&oacute;n de interfaces, m&aacute;s los guiones utilizados
para controlar la compilaci&oacute;n e instalaci&oacute;n del ejecutable.
Como excepci&oacute;n especial el c&oacute;digo fuente distribuido no necesita
incluir nada que sea distribuido normalmente (bien como fuente, bien en
forma binaria) con los componentes principales (compilador, kernel y similares)
del sistema operativo en el cual funciona el ejecutable, a no ser que el
propio componente acompa&ntilde;e al ejecutable.
<p>Si la distribuci&oacute;n del ejecutable o del c&oacute;digo objeto
se hace mediante la oferta acceso para copiarlo de un cierto lugar, entonces
se considera la oferta de acceso para copiar el c&oacute;digo fuente del
mismo lugar como distribuci&oacute;n del c&oacute;digo fuente, incluso
aunque terceras partes no est&eacute;n forzadas a copiar el fuente junto
con el c&oacute;digo objeto.
</p></li><li>No puede copiar, modificar, sublicenciar o distribuir el Programa excepto
como prev&eacute; expresamente esta Licencia. Cualquier intento de copiar,
modificar sublicenciar o distribuir el Programa de otra forma es inv&aacute;lida,
y har&aacute; que cesen autom&aacute;ticamente los derechos que te proporciona
esta Licencia. En cualquier caso, las partes que hayan recibido copias
o derechos de usted bajo esta Licencia no cesar&aacute;n en sus derechos
mientras esas partes contin&uacute;en cumpli&eacute;ndola.
</li><li>No est&aacute; obligado a aceptar esta licencia, ya que no la ha firmado.
Sin embargo, no hay hada m&aacute;s que le proporcione permiso para modificar
o distribuir el Programa o sus trabajos derivados. Estas acciones est&aacute;n
prohibidas por la ley si no acepta esta Licencia. Por lo tanto, si modifica
o distribuye el Programa (o cualquier trabajo basado en el Programa), est&aacute;
indicando que acepta esta Licencia para poder hacerlo, y todos sus t&eacute;rminos
y condiciones para copiar, distribuir o modificar el Programa o trabajos
basados en &eacute;l.
</li><li>Cada vez que redistribuya el Programa (o cualquier trabajo basado en
el Programa), el receptor recibe autom&aacute;ticamente una licencia del
licenciatario original para copiar, distribuir o modificar el Programa,
de forma sujeta a estos t&eacute;rminos y condiciones. No puede imponer
al receptor ninguna restricci&oacute;n m&aacute;s sobre el ejercicio de
los derechos aqu&iacute; garantizados. No es usted responsable de hacer
cumplir esta licencia por terceras partes.
</li><li>Si como consecuencia de una resoluci&oacute;n judicial o de una alegaci&oacute;n
de infracci&oacute;n de patente o por cualquier otra raz&oacute;n (no limitada
a asuntos relacionados con patentes) se le imponen condiciones (ya sea
por mandato judicial, por acuerdo o por cualquier otra causa) que contradigan
las condiciones de esta Licencia, ello no le exime de cumplir las condiciones
de esta Licencia. Si no puede realizar distribuciones de forma que se satisfagan
simult&aacute;neamente sus obligaciones bajo esta licencia y cualquier
otra obligaci&oacute;n pertinente entonces, como consecuencia, no puede
distribuir el Programa de ninguna forma. Por ejemplo, si una patente no
permite la redistribuci&oacute;n libre de derechos de autor del Programa
por parte de todos aquellos que reciban copias directa o indirectamente
a trav&eacute;s de usted, entonces la &uacute;nica forma en que podr&iacute;a
satisfacer tanto esa condici&oacute;n como esta Licencia ser&iacute;a evitar
completamente la distribuci&oacute;n del Programa.
<p>Si cualquier porci&oacute;n de este apartado se considera inv&aacute;lida
o imposible de cumplir bajo cualquier circunstancia particular ha de cumplirse
el resto y la secci&oacute;n por entero ha de cumplirse en cualquier otra
circunstancia.
</p><p>No es el prop&oacute;sito de este apartado inducirle a infringir ninguna
reivindicaci&oacute;n de patente ni de ning&uacute;n otro derecho de propiedad
o impugnar la validez de ninguna de dichas reivindicaciones. Este apartado
tiene el &uacute;nico prop&oacute;sito de proteger la integridad del sistema
de distribuci&oacute;n de software libre, que se realiza mediante pr&aacute;cticas
de licencia p&uacute;blica. Mucha gente ha hecho contribuciones generosas
a la gran variedad de software distribuido mediante ese sistema con la
confianza de que el sistema se aplicar&aacute; consistentemente. Ser&aacute;
el autor/donante quien decida si quiere distribuir software mediante cualquier
otro sistema y una licencia no puede imponer esa elecci&oacute;n.
</p><p>Este apartado pretende dejar completamente claro lo que se cree que
es una consecuencia del resto de esta Licencia.
</p></li><li>Si la distribuci&oacute;n y/o uso de el Programa est&aacute; restringida
en ciertos pa&iacute;ses, bien por patentes o por interfaces bajo copyright,
el tenedor del copyright que coloca este Programa bajo esta Licencia puede
a&ntilde;adir una limitaci&oacute;n expl&iacute;cita de distribuci&oacute;n
geogr&aacute;fica excluyendo esos pa&iacute;ses, de forma que la distribuci&oacute;n
se permita s&oacute;lo en o entre los pa&iacute;ses no excluidos de esta
manera. En ese caso, esta Licencia incorporar&aacute; la limitaci&oacute;n
como si estuviese escrita en el cuerpo de esta Licencia.
</li><li>La Free Software Foundation puede publicar versiones revisadas y/o nuevas
de la Licencia P&uacute;blica General de tiempo en tiempo. Dichas nuevas
versiones ser&aacute;n similares en esp&iacute;ritu a la presente versi&oacute;n,
pero pueden ser diferentes en detalles para considerar nuevos problemas
o situaciones.
<p>Cada versi&oacute;n recibe un n&uacute;mero de versi&oacute;n que la
distingue de otras. Si el Programa especifica un n&uacute;mero de versi&oacute;n
de esta Licencia que se refiere a ella y a <20>cualquier versi&oacute;n
posterior<EFBFBD>, tienes la opci&oacute;n de seguir los t&eacute;rminos
y condiciones, bien de esa versi&oacute;n, bien de cualquier versi&oacute;n
posterior publicada por la Free Software Foundation. Si el Programa no
especifica un n&uacute;mero de versi&oacute;n de esta Licencia, puedes
escoger cualquier versi&oacute;n publicada por la Free Software Foundation.
</p></li><li>Si quiere incorporar partes del Programa en otros programas libres cuyas
condiciones de distribuci&oacute;n son diferentes, escribe al autor para
pedirle permiso. Si el software tiene copyright de la Free Software Foundation,
escribe a la Free Software Foundation: algunas veces hacemos excepciones
en estos casos. Nuestra decisi&oacute;n estar&aacute; guiada por el doble
objetivo de de preservar la libertad de todos los derivados de nuestro
software libre y promover el que se comparta y reutilice el software en
general.</li></ol>
<h3>AUSENCIA DE GARANT&Iacute;A</h3> <h3>
<a name="APPENDIX">Ap&eacute;ndice</a>: C&oacute;mo aplicar estos
<ol start="12" type="1"> t&eacute;rminos a sus nuevos programas.
<li>Como el programa se licencia libre de cargas, </h3>
no se ofrece ninguna garant&iacute;a sobre el programa, en todas la extensi&oacute;n <p>
permitida por la legislaci&oacute;n aplicable. Excepto cuando se indique Si usted desarrolla un nuevo Programa, y quiere que sea del mayor uso
de otra forma por escrito, los tenedores del copyright y/u otras partes posible para el p&uacute;blico en general, la mejor forma de conseguirlo
proporcionan el programa <20>tal cual<61>, sin garant&iacute;a de es convirti&eacute;ndolo en software libre que cualquiera pueda
ninguna clase, bien expresa o impl&iacute;cita, con inclusi&oacute;n, pero redistribuir y cambiar bajo estos t&eacute;rminos.
sin limitaci&oacute;n a las garant&iacute;as mercantiles impl&iacute;citas </p>
o a la conveniencia para un prop&oacute;sito particular. Cualquier riesgo <p>
referente a la calidad y prestaciones del programa es asumido por usted. Para hacerlo, a&ntilde;ada los siguientes anuncios al programa. Lo
Si se probase que el Programa es defectuoso, asume el coste de cualquier m&aacute;s seguro es a&ntilde;adirlos al principio de cada fichero fuente
servicio, reparaci&oacute;n o correcci&oacute;n. para transmitir lo m&aacute;s efectivamente posible la ausencia de
</li><li>En ning&uacute;n caso, salvo que lo requiera la legislaci&oacute;n aplicable garant&iacute;a. Adem&aacute;s cada fichero deber&iacute;a tener al menos
o haya sido acordado por escrito, ning&uacute;n tenedor del copyright ni la l&iacute;nea de <20>copyright<68> y un indicador a d&oacute;nde puede
ninguna otra parte que modifique y/o redistribuya el Programa seg&uacute;n encontrarse el anuncio completo.
se permite en esta Licencia ser&aacute; responsable ante usted por da&ntilde;os, </p>
incluyendo cualquier da&ntilde;o general, especial, incidental o resultante <div>
producido por el uso o la imposibilidad de uso del Programa (con inclusi&oacute;n, &lt;una l&iacute;nea para indicar el nombre del programa y una
pero sin limitaci&oacute;n a la p&eacute;rdida de datos o a la generaci&oacute;n r&aacute;pida idea de qu&eacute; hace.&gt;
incorrecta de datos o a p&eacute;rdidas sufridas por usted o por terceras <p>Copyright (C) 19aa &lt;nombre del autor&gt;</p>
partes o a un fallo del Programa al funcionar en combinaci&oacute;n con <p>
cualquier otro programa), incluso si dicho tenedor u otra parte ha sido Este programa es software libre. Puede redistribuirlo y/o modificarlo
advertido de la posibilidad de dichos da&ntilde;os.</li></ol> bajo los t&eacute;rminos de la Licencia P&uacute;blica General de GNU
seg&uacute;n es publicada por la Free Software Foundation, bien de la
<h3>FIN DE T&Eacute;RMINOS Y CONDICIONES</h3> versi&oacute;n 2 de dicha Licencia o bien (seg&uacute;n su
elecci&oacute;n) de cualquier versi&oacute;n posterior.
<h3><a name="APPENDIX">Ap&eacute;ndice</a>: C&oacute;mo aplicar estos </p>
t&eacute;rminos a sus nuevos programas.</h3> <p>
<p> Este programa se distribuye con la esperanza de que sea &uacute;til,
Si usted desarrolla un nuevo Programa, y quiere que sea del mayor uso posible pero SIN NINGUNA GARANT<4E>A, incluso sin la garant&iacute;a MERCANTIL
para el p&uacute;blico en general, la mejor forma de conseguirlo es convirti&eacute;ndolo impl&iacute;cita o sin garantizar la CONVENIENCIA PARA UN PROP<4F>SITO
en software libre que cualquiera pueda redistribuir y cambiar bajo estos PARTICULAR. V&eacute;ase la Licencia P&uacute;blica General de GNU para
t&eacute;rminos.</p> m&aacute;s detalles.
<p>Para hacerlo, a&ntilde;ada los siguientes anuncios al programa. Lo m&aacute;s </p>
seguro es a&ntilde;adirlos al principio de cada fichero fuente para transmitir <p>
lo m&aacute;s efectivamente posible la ausencia de garant&iacute;a. Adem&aacute;s Deber&iacute;a haber recibido una copia de la Licencia P&uacute;blica
cada fichero deber&iacute;a tener al menos la l&iacute;nea de <20>copyright<68> General junto con este programa. Si no ha sido as&iacute;, escriba a la
y un indicador a d&oacute;nde puede encontrarse el anuncio completo. Free Software Foundation, Inc., en 675 Mass Ave, Cambridge, MA 02139,
</p><div>&lt;una l&iacute;nea para indicar el nombre EEUU.
del programa y una r&aacute;pida idea de qu&eacute; hace.&gt; </p>
<p>Copyright (C) 19aa &lt;nombre del autor&gt; </div>
</p><p>Este programa es software libre. Puede redistribuirlo y/o modificarlo <p>
bajo los t&eacute;rminos de la Licencia P&uacute;blica General de GNU seg&uacute;n A&ntilde;ada tambi&eacute;n informaci&oacute;n sobre c&oacute;mo contactar
es publicada por la Free Software Foundation, bien de la versi&oacute;n con usted mediante correo electr&oacute;nico y postal.
2 de dicha Licencia o bien (seg&uacute;n su elecci&oacute;n) de cualquier </p>
versi&oacute;n posterior. <p>
</p><p>Este programa se distribuye con la esperanza de que sea &uacute;til, Si el programa es interactivo, haga que muestre un peque&ntilde;o anuncio
pero SIN NINGUNA GARANT<4E>A, incluso sin la garant&iacute;a MERCANTIL como el siguiente, cuando comienza a funcionar en modo interactivo:
impl&iacute;cita o sin garantizar la CONVENIENCIA PARA UN PROP<4F>SITO </p>
PARTICULAR. V&eacute;ase la Licencia P&uacute;blica General de GNU para <div>
m&aacute;s detalles. Gnomovision versi&oacute;n 69, Copyright (C) 19aa nombre del autor
</p><p>Deber&iacute;a haber recibido una copia de la Licencia P&uacute;blica <p>
General junto con este programa. Si no ha sido as&iacute;, escriba a la Gnomovision no ofrece ABSOLUTAMENTE NINGUNA GARANT&Iacute;A. Para
Free Software Foundation, Inc., en 675 Mass Ave, Cambridge, MA 02139, EEUU.</p></div> m&aacute;s detalles escriba <20>show w<>.
<p> </p>
A&ntilde;ada tambi&eacute;n informaci&oacute;n sobre c&oacute;mo contactar </div>
con usted mediante correo electr&oacute;nico y postal.</p> <p>
<p>Si el programa es interactivo, haga que muestre un peque&ntilde;o anuncio Los comandos hipot&eacute;ticos <20>show w<> y <20>show c<> deber&iacute;an
como el siguiente, cuando comienza a funcionar en modo interactivo: mostrar las partes adecuadas de la Licencia P&uacute;blica General. Por
</p><div>Gnomovision versi&oacute;n 69, Copyright supuesto, los comandos que use pueden llamarse de cualquier otra manera.
(C) 19aa nombre del autor Podr&iacute;an incluso ser pulsaciones del rat&oacute;n o elementos de un
<p>Gnomovision no ofrece ABSOLUTAMENTE NINGUNA GARANT&Iacute;A. Para m&aacute;s men&uacute; (lo que sea apropiado para su programa).
detalles escriba <20>show w<>.</p></div> </p>
<p> <p>
Los comandos hipot&eacute;ticos <20>show w<> y <20>show c<> Tambi&eacute;n deber&iacute;as conseguir que su empleador (si trabaja como
deber&iacute;an mostrar las partes adecuadas de la Licencia P&uacute;blica programador) o tu Universidad (si es el caso) firme un <20>renuncia de
General. Por supuesto, los comandos que use pueden llamarse de cualquier copyright<68> para el programa, si es necesario. A continuaci&oacute;n se
otra manera. Podr&iacute;an incluso ser pulsaciones del rat&oacute;n o ofrece un ejemplo, altere los nombres seg&uacute;n sea conveniente:
elementos de un men&uacute; (lo que sea apropiado para su programa).</p> </p>
<p>Tambi&eacute;n deber&iacute;as conseguir que su empleador (si trabaja <ol>
como programador) o tu Universidad (si es el caso) firme un <20>renuncia <li>
de copyright<68> para el programa, si es necesario. A continuaci&oacute;n Yoyodyne, Inc. mediante este documento renuncia a cualquier
se ofrece un ejemplo, altere los nombres seg&uacute;n sea conveniente: inter&eacute;s de derechos de copyright con respecto al programa
</p><ol> Gnomovision (que hace pasadas a compiladores) escrito por Pepe
<li> Programador.
Yoyodyne, Inc. mediante este documento renuncia <p>&lt;firma de Pepito Grillo&gt;, 20 de diciembre de 1996</p>
a cualquier inter&eacute;s de derechos de copyright con respecto al programa <p>Pepito Grillo, Presidente de Asuntillos Varios.</p>
Gnomovision (que hace pasadas a compiladores) escrito por Pepe Programador. </li>
<p>&lt;firma de Pepito Grillo&gt;, 20 de diciembre de 1996 </ol>
</p><p>Pepito Grillo, Presidente de Asuntillos Varios.</p></li></ol> <p>
<p> Esta Licencia P&uacute;blica General no permite que incluya sus programas
Esta Licencia P&uacute;blica General no permite que incluya sus programas en programas propietarios. Si su programa es una biblioteca de subrutinas,
en programas propietarios. Si su programa es una biblioteca de subrutinas, puede considerar m&aacute;s &uacute;til el permitir el enlazado de
puede considerar m&aacute;s &uacute;til el permitir el enlazado de aplicaciones aplicaciones propietarias con la biblioteca. Si este es el caso, use la
propietarias con la biblioteca. Si este es el caso, use la Licencia P&uacute;blica Licencia P&uacute;blica General de GNU para Bibliotecas en lugar de esta
General de GNU para Bibliotecas en lugar de esta Licencia.</p> Licencia.
</p>
</body></html> </body>
</html>

View File

@ -1,437 +1,553 @@
<html> <html>
<head> <head>
<title>Licence Publique G&eacute;n&eacute;rale GNU</title> <title>Licence Publique G&eacute;n&eacute;rale GNU</title>
</head> </head>
<body> <body>
<h2>Licence Publique G&eacute;n&eacute;rale GNU</h2> <h2>Licence Publique G&eacute;n&eacute;rale GNU</h2>
<p><b>Benjamin Drieu, APRIL (<a href="mailto:bdrieu@april.org">bdrieu@april.org</a>), M&eacute;lanie <p>
Cl&eacute;ment-Fontaine (<a href="mailto:melanie@amberlab.net">melanie@amberlab.net</a>), <b
Arnaud Fontaine (<a href="mailto:arnaud@crao.net">arnaud@crao.net</a>), Lo<4C>c Dachary >Benjamin Drieu, APRIL (<a href="mailto:bdrieu@april.org"
(<a href="mailto:loic@gnu.org">loic@gnu.org</a>), Fr&eacute;d&eacute;ric Couchet (<a href="mailto:fcouchet@fsffrance.org">fcouchet@fsffrance.org</a>). >bdrieu@april.org</a
</b></p> >), M&eacute;lanie Cl&eacute;ment-Fontaine (<a
<h3>Advertiment</h3> href="mailto:melanie@amberlab.net"
<p> >melanie@amberlab.net</a
This is an unofficial translation of the GNU General Public >), Arnaud Fontaine (<a href="mailto:arnaud@crao.net">arnaud@crao.net</a
License into French. It was not published by the Free Software >), Lo<4C>c Dachary (<a href="mailto:loic@gnu.org">loic@gnu.org</a>),
Foundation, and does not legally state the distribution terms Fr&eacute;d&eacute;ric Couchet (<a href="mailto:fcouchet@fsffrance.org"
for software that uses the GNU GPL--only the original English >fcouchet@fsffrance.org</a
text of the GNU GPL does that. However, we hope that this >).
translation will help French speakers understand the GNU GPL </b>
better. </p>
</p> <h3>Advertiment</h3>
<p>
This is an unofficial translation of the GNU General Public License into
French. It was not published by the Free Software Foundation, and does not
legally state the distribution terms for software that uses the GNU
GPL--only the original English text of the GNU GPL does that. However, we
hope that this translation will help French speakers understand the GNU
GPL better.
</p>
<p> <p>
Ceci est une traduction non officielle de la GNU General Public Ceci est une traduction non officielle de la GNU General Public License en
License en fran<61>ais. Elle n'a pas &eacute;t&eacute; publi&eacute;e par la Free fran<61>ais. Elle n'a pas &eacute;t&eacute; publi&eacute;e par la Free
Software Foundation, et ne d&eacute;termine pas les termes de Software Foundation, et ne d&eacute;termine pas les termes de distribution
distribution pour les logiciels qui utilisent la GNU GPL, seul pour les logiciels qui utilisent la GNU GPL, seul le texte anglais
le texte anglais original de la GNU GPL d&eacute;terminent ces original de la GNU GPL d&eacute;terminent ces termes. Cependant, nous
termes. Cependant, nous esp&eacute;rons que cette traduction aidera les esp&eacute;rons que cette traduction aidera les francophones &agrave;
francophones &agrave; mieux comprendre la GNU GPL. mieux comprendre la GNU GPL.
</p> </p>
<h2>Licence Publique G&eacute;n&eacute;rale GNU</h2> <h2>Licence Publique G&eacute;n&eacute;rale GNU</h2>
<p>Les licences de la plupart des logiciels sont <p>
con<EFBFBD>ues pour vous enlever toute libert&eacute; de les partager et de les Les licences de la plupart des logiciels sont con<6F>ues pour vous enlever
modifier. </p> toute libert&eacute; de les partager et de les modifier.
<p>A contrario, la Licence Publique G&eacute;n&eacute;rale est destin&eacute;e &agrave; garantir </p>
votre libert&eacute; de partager et de modifier les logiciels libres, <p>
et &agrave; assurer que ces logiciels soient libres pour tous leurs A contrario, la Licence Publique G&eacute;n&eacute;rale est
utilisateurs.</p> destin&eacute;e &agrave; garantir votre libert&eacute; de partager et de
<p>La pr&eacute;sente Licence Publique G&eacute;n&eacute;rale s'applique &agrave; la modifier les logiciels libres, et &agrave; assurer que ces logiciels
plupart des logiciels de la Free Software Foundation, ainsi soient libres pour tous leurs utilisateurs.
qu'&agrave; tout autre programme pour lequel ses auteurs s'engagent &agrave; </p>
l'utiliser.</p> <p>
<p>(Certains autres logiciels de la Free Software Foundation La pr&eacute;sente Licence Publique G&eacute;n&eacute;rale s'applique
sont couverts par la GNU Lesser General Public License &agrave; la place.)</p> &agrave; la plupart des logiciels de la Free Software Foundation, ainsi
<p>Vous pouvez aussi l'appliquer aux programmes qui sont les v<>tres.</p> qu'&agrave; tout autre programme pour lequel ses auteurs s'engagent
<p>Quand nous parlons de logiciels libres, nous parlons de &agrave; l'utiliser.
libert&eacute;, non de prix.</p> </p>
<p>Nos licences publiques g&eacute;n&eacute;rales sont con<6F>ues pour vous donner <p>
l'assurance d'<27>tre libres de distribuer des copies des (Certains autres logiciels de la Free Software Foundation sont couverts
logiciels libres (et de facturer ce service, si vous le par la GNU Lesser General Public License &agrave; la place.)
souhaitez), de recevoir le code source ou de pouvoir </p>
l'obtenir si vous le souhaitez, de pouvoir modifier les <p>Vous pouvez aussi l'appliquer aux programmes qui sont les v<>tres.</p>
logiciels ou en utiliser des &eacute;l&eacute;ments dans de nouveaux <p>
programmes libres et de savoir que vous pouvez le Quand nous parlons de logiciels libres, nous parlons de libert&eacute;,
faire. </p> non de prix.
<p>Pour prot&eacute;ger vos droits, il nous est n&eacute;cessaire d'imposer </p>
des limitations qui interdisent &agrave; quiconque de vous refuser <p>
ces droits ou de vous demander d'y renoncer.</p> Nos licences publiques g&eacute;n&eacute;rales sont con<6F>ues pour vous
<p>Certaines responsabilit&eacute;s vous incombent en raison de ces donner l'assurance d'<27>tre libres de distribuer des copies des logiciels
limitations si vous distribuez des copies de ces logiciels, ou libres (et de facturer ce service, si vous le souhaitez), de recevoir le
si vous les modifiez.</p> code source ou de pouvoir l'obtenir si vous le souhaitez, de pouvoir
<p>Par exemple, si vous distribuez des copies d'un tel modifier les logiciels ou en utiliser des &eacute;l&eacute;ments dans de
programme, &agrave; titre gratuit ou contre une r&eacute;mun&eacute;ration, vous devez nouveaux programmes libres et de savoir que vous pouvez le faire.
accorder aux destinataires tous les droits dont vous disposez. </p>
</p> <p>
<p>Vous devez vous assurer qu'eux aussi re<72>oivent ou puissent Pour prot&eacute;ger vos droits, il nous est n&eacute;cessaire d'imposer
disposer du code source.</p> des limitations qui interdisent &agrave; quiconque de vous refuser ces
<p>Et vous devez leur montrer les pr&eacute;sentes conditions afin droits ou de vous demander d'y renoncer.
qu'ils aient connaissance de leurs droits.</p> </p>
<p>Nous prot&eacute;geons vos droits en deux &eacute;tapes : (1) nous sommes <p>
titulaires des droits d'auteur du logiciel, et Certaines responsabilit&eacute;s vous incombent en raison de ces
(2) nous vous delivrons cette licence, qui vous donne limitations si vous distribuez des copies de ces logiciels, ou si vous les
l'autorisation l&eacute;gale de copier, distribuer et/ou modifier modifiez.
le logiciel.</p> </p>
<p>En outre, pour la protection de chaque auteur ainsi que la n<>tre, <p>
nous voulons nous assurer que chacun comprenne que ce logiciel libre ne fait l'objet Par exemple, si vous distribuez des copies d'un tel programme, &agrave;
d'aucune garantie.</p> titre gratuit ou contre une r&eacute;mun&eacute;ration, vous devez
<p>Si le logiciel est modifi&eacute; par quelqu'un d'autre puis accorder aux destinataires tous les droits dont vous disposez.
transmis &agrave; des tiers, nous voulons que les destinataires </p>
soient mis au courant que ce qu'ils ont re<72>u n'est pas le logiciel d'origine, de sorte <p>
que tout probl&egrave;me introduit par d'autres ne puisse entacher Vous devez vous assurer qu'eux aussi re<72>oivent ou puissent disposer du
la r&eacute;putation de code source.
l'auteur originel.</p> </p>
<p>En d&eacute;finitive, un programme libre restera &agrave; la merci des <p>
brevets de logiciels.</p> Et vous devez leur montrer les pr&eacute;sentes conditions afin qu'ils
<p>Nous souhaitons &eacute;viter le risque que les redistributeurs aient connaissance de leurs droits.
d'un programme libre fassent des demandes individuelles de </p>
licence de brevet, ceci ayant pour effet de rendre le programme <p>
propri&eacute;taire. Nous prot&eacute;geons vos droits en deux &eacute;tapes : (1) nous sommes
</p> titulaires des droits d'auteur du logiciel, et (2) nous vous delivrons
<p>Pour &eacute;viter cela, nous &eacute;tablissons clairement que toute licence de brevet cette licence, qui vous donne l'autorisation l&eacute;gale de copier,
doit <20>tre conc&eacute;d&eacute;e de fa<66>on a ce que l'usage en soit libre pour tous distribuer et/ou modifier le logiciel.
ou bien qu'aucune licence ne soit conc&eacute;d&eacute;e.</p> </p>
<p>Les termes exacts et les conditions de copie, distribution et <p>
modification sont les suivants:</p> En outre, pour la protection de chaque auteur ainsi que la n<>tre, nous
<h2>Conditions de copie, distribution voulons nous assurer que chacun comprenne que ce logiciel libre ne fait
et modification de la Licence Publique G&eacute;n&eacute;rale GNU.</h2> l'objet d'aucune garantie.
<p>0. La pr&eacute;sente Licence s'applique &agrave; tout programme </p>
ou tout autre ouvrage contenant un avis, appos&eacute; par le titulaire des <p>
droits d'auteur, stipulant qu'il peut <20>tre distribu&eacute; au titre Si le logiciel est modifi&eacute; par quelqu'un d'autre puis transmis
des conditions de la pr&eacute;sente Licence Publique &agrave; des tiers, nous voulons que les destinataires soient mis au
G&eacute;n&eacute;rale.</p> courant que ce qu'ils ont re<72>u n'est pas le logiciel d'origine, de sorte
<p>Ci-apr&egrave;s, le "Programme" d&eacute;signe l'un quelconque de ces que tout probl&egrave;me introduit par d'autres ne puisse entacher la
programmes ou ouvrages, et un "ouvrage fond&eacute; sur le Programme" r&eacute;putation de l'auteur originel.
d&eacute;signe soit le Programme, soit un ouvrage qui en d&eacute;rive au </p>
titre des lois sur le droit d'auteur: en d'autres termes, <p>
un ouvrage contenant le Programme ou une partie de En d&eacute;finitive, un programme libre restera &agrave; la merci des
ce dernier, soit &agrave; l'identique, soit avec des modifications et/ou brevets de logiciels.
traduit dans un autre langage.</p> </p>
<p>(Ci-apr&egrave;s, le terme "modification" implique, sans s'y r&eacute;duire, le terme traduction)</p> <p>
<p>Chaque concessionaire sera d&eacute;sign&eacute; par "vous".</p> Nous souhaitons &eacute;viter le risque que les redistributeurs d'un
<p>Les activit&eacute;s autres que la copie, la distribution et programme libre fassent des demandes individuelles de licence de brevet,
la modification ne sont pas couvertes par la pr&eacute;sente Licence ceci ayant pour effet de rendre le programme propri&eacute;taire.
; elles sont hors de son champ d'application.</p> </p>
<p>L'op&eacute;ration consistant &agrave; ex&eacute;cuter le Programme n'est soumise &agrave; aucune limitation <p>
et les sorties du programme ne sont couvertes que si leur Pour &eacute;viter cela, nous &eacute;tablissons clairement que toute
contenu constitue un ouvrage fond&eacute; sur le Programme licence de brevet doit <20>tre conc&eacute;d&eacute;e de fa<66>on a ce que
(ind&eacute;pendamment du fait qu'il ait &eacute;t&eacute; r&eacute;alis&eacute; par l'ex&eacute;cution l'usage en soit libre pour tous ou bien qu'aucune licence ne soit
du Programme).</p> conc&eacute;d&eacute;e.
<p>La validit&eacute; de ce qui pr&eacute;c&egrave;de d&eacute;pend de ce que fait le </p>
Programme.</p> <p>
<p>1. Vous pouvez copier et distribuer des copies &agrave; Les termes exacts et les conditions de copie, distribution et modification
l'identique du code source du Programme tel que vous l'avez sont les suivants:
re<EFBFBD>u, sur n'importe quel support, du moment que vous apposiez </p>
sur chaque copie, de mani&egrave;re ad hoc et parfaitement <h2>
visible, l'avis de droit d'auteur ad&eacute;quat et Conditions de copie, distribution et modification de la Licence Publique
une exon&eacute;ration de garantie ; que vous gardiez intacts tous les G&eacute;n&eacute;rale GNU.
avis faisant r&eacute;f&eacute;rence &agrave; la pr&eacute;sente Licence et &agrave; l'absence de </h2>
toute garantie ; et que vous fournissiez &agrave; tout destinataire du <p>
Programme autre que vous m<>me un exemplaire de la pr&eacute;sente 0. La pr&eacute;sente Licence s'applique &agrave; tout programme ou tout
Licence en m<>me temps que le Programme.</p> autre ouvrage contenant un avis, appos&eacute; par le titulaire des droits
<p>Vous pouvez faire payer l'acte physique de d'auteur, stipulant qu'il peut <20>tre distribu&eacute; au titre des
transmission d'une copie, et vous pouvez, &agrave; votre discr&eacute;tion, conditions de la pr&eacute;sente Licence Publique G&eacute;n&eacute;rale.
proposer une garantie contre r&eacute;mun&eacute;ration.</p> </p>
<p>2. Vous pouvez modifier votre copie ou des copies du Programme <p>
ou n'importe quelle partie de celui-ci, cr&eacute;ant ainsi un ouvrage Ci-apr&egrave;s, le "Programme" d&eacute;signe l'un quelconque de ces
fond&eacute; sur le Programme, et copier et distribuer de telles modifications ou ouvrage selon les programmes ou ouvrages, et un "ouvrage fond&eacute; sur le Programme"
termes de l'Article 1 ci-dessus, &agrave; condition de vous conformer &eacute;galement d&eacute;signe soit le Programme, soit un ouvrage qui en d&eacute;rive au
&agrave; chacune des obligations suivantes:</p> titre des lois sur le droit d'auteur: en d'autres termes, un ouvrage
<p>a) Vous devez munir les fichiers modifi&eacute;s d'avis bien visibles contenant le Programme ou une partie de ce dernier, soit &agrave;
stipulants que vous avez modifi&eacute; ces l'identique, soit avec des modifications et/ou traduit dans un autre
fichiers, ainsi que la date de chaque modification;</p> langage.
<p>b) Vous devez prendre les dispositions n&eacute;cessaires pour que </p>
tout ouvrage <p>
que vous distribuez ou publiez, et qui, en totalit&eacute; ou en partie, (Ci-apr&egrave;s, le terme "modification" implique, sans s'y
contient ou est fond&eacute; sur le Programme - ou une partie r&eacute;duire, le terme traduction)
quelconque de ce dernier - soit conc&eacute;d&eacute; comme un tout, </p>
&agrave; titre gratuit, &agrave; n'importe quel tiers, au titre des conditions <p>Chaque concessionaire sera d&eacute;sign&eacute; par "vous".</p>
de la pr&eacute;sente Licence.</p> <p>
<p>c) Si le programme modifi&eacute; lit habituellement des instructions Les activit&eacute;s autres que la copie, la distribution et la
de fa<66>on interactive lorsqu'on l'ex&eacute;cute, vous devez, modification ne sont pas couvertes par la pr&eacute;sente Licence ; elles
quand il commence son ex&eacute;cution pour ladite sont hors de son champ d'application.
utilisation interactive de la mani&egrave;re la plus usuelle, faire </p>
en sorte qu'il imprime ou affiche une annonce <p>
comprenant un avis de droit d'auteur ad hoc, et un avis L'op&eacute;ration consistant &agrave; ex&eacute;cuter le Programme n'est
stipulant qu'il n'y a pas de garantie (ou bien indiquant que soumise &agrave; aucune limitation et les sorties du programme ne sont
c'est vous qui fournissez la garantie), et que couvertes que si leur contenu constitue un ouvrage fond&eacute; sur le
les utilisateurs peuvent redistribuer le programme en respectant Programme (ind&eacute;pendamment du fait qu'il ait &eacute;t&eacute;
les pr&eacute;sentes obligations, et expliquant &agrave; l'utilisateur comment r&eacute;alis&eacute; par l'ex&eacute;cution du Programme).
voir une copie de la pr&eacute;sente Licence.</p> </p>
<p>(Exception : si le Programme est lui-m<>me interactif <p>
mais n'imprime pas habituellement une telle annonce, votre La validit&eacute; de ce qui pr&eacute;c&egrave;de d&eacute;pend de ce que
ouvrage fond&eacute; sur le Programme n'est pas oblig&eacute; fait le Programme.
d'imprimer une annonce).</p> </p>
<p>Ces obligations s'appliquent &agrave; l'ouvrage modifi&eacute; <p>
pris comme un tout. 1. Vous pouvez copier et distribuer des copies &agrave; l'identique du
</p> code source du Programme tel que vous l'avez re<72>u, sur n'importe quel
<p>Si des &eacute;l&eacute;ments identifiables support, du moment que vous apposiez sur chaque copie, de mani&egrave;re
de cet ouvrage ne sont pas fond&eacute;es sur le Programme et peuvent ad hoc et parfaitement visible, l'avis de droit d'auteur ad&eacute;quat et
raisonnablement <20>tre consid&eacute;r&eacute;es comme des ouvrages ind&eacute;pendants une exon&eacute;ration de garantie ; que vous gardiez intacts tous les
distincts en eux m<>mes, alors la pr&eacute;sente Licence et avis faisant r&eacute;f&eacute;rence &agrave; la pr&eacute;sente Licence
ses conditions ne et &agrave; l'absence de toute garantie ; et que vous fournissiez &agrave;
s'appliquent pas &agrave; ces &eacute;l&eacute;ments lorsque vous les distribuez tout destinataire du Programme autre que vous m<>me un exemplaire de la
en tant qu'ouvrages distincts.</p> pr&eacute;sente Licence en m<>me temps que le Programme.
<p> </p>
Mais lorsque vous distribuez ces m<>mes &eacute;l&eacute;ments comme partie <p>
d'un tout, lequel constitue un ouvrage fond&eacute; sur le Programme, Vous pouvez faire payer l'acte physique de transmission d'une copie, et
la distribution de ce tout doit <20>tre soumise aux conditions de vous pouvez, &agrave; votre discr&eacute;tion, proposer une garantie
la pr&eacute;sente Licence, et les autorisations qu'elle octroie aux contre r&eacute;mun&eacute;ration.
autres concessionaires s'&eacute;tendent &agrave; l'ensemble de l'ouvrage et </p>
par cons&eacute;quent &agrave; chaque et toute partie indiff&eacute;rement de qui <p>
l'a &eacute;crite. 2. Vous pouvez modifier votre copie ou des copies du Programme ou
</p> n'importe quelle partie de celui-ci, cr&eacute;ant ainsi un ouvrage
<p>Par cons&eacute;quent, l'objet du pr&eacute;sent article n'est pas de revendiquer des droits fond&eacute; sur le Programme, et copier et distribuer de telles
ou de contester vos droits sur un ouvrage enti&egrave;rement &eacute;crit par modifications ou ouvrage selon les termes de l'Article 1 ci-dessus,
vous; son objet est plut<75>t d'exercer le droit de contr<74>ler &agrave; condition de vous conformer &eacute;galement &agrave; chacune des
la distribution d'ouvrages d&eacute;riv&eacute;s ou d'ouvrages collectifs fond&eacute;s obligations suivantes:
sur le Programme. </p>
</p> <p>
<p> a) Vous devez munir les fichiers modifi&eacute;s d'avis bien visibles
De plus, la simple proximit&eacute; du Programme avec un autre stipulants que vous avez modifi&eacute; ces fichiers, ainsi que la date de
ouvrage qui n'est pas fond&eacute; sur le Programme (ou un ouvrage chaque modification;
fond&eacute; sur le Programme) sur une partition d'un espace de </p>
stockage ou un support de distribution ne place pas cet autre <p>
ouvrage dans le champ d'application de la pr&eacute;sente Licence. b) Vous devez prendre les dispositions n&eacute;cessaires pour que tout
</p> ouvrage que vous distribuez ou publiez, et qui, en totalit&eacute; ou en
<p>3. Vous pouvez copier et distribuer le Programme (ou un partie, contient ou est fond&eacute; sur le Programme - ou une partie
ouvrage fond&eacute; sur lui, selon l'Article 2) sous forme de code quelconque de ce dernier - soit conc&eacute;d&eacute; comme un tout,
objet ou d'ex&eacute;cutable, selon les termes des Articles 1 et 2 &agrave; titre gratuit, &agrave; n'importe quel tiers, au titre des
ci-dessus, &agrave; condition que vous accomplissiez l'un des points conditions de la pr&eacute;sente Licence.
suivants :</p> </p>
<p>a) L'accompagner de l'int&eacute;gralit&eacute; du code source correspondant, <p>
sous une forme lisible par un ordinateur, lequel doit <20>tre distribu&eacute; c) Si le programme modifi&eacute; lit habituellement des instructions de
au titre fa<66>on interactive lorsqu'on l'ex&eacute;cute, vous devez, quand il
des termes des Articles 1 et 2 ci-dessus, sur un support commence son ex&eacute;cution pour ladite utilisation interactive de la
habituellement utilis&eacute; pour l'&eacute;change de logiciels; ou,</p> mani&egrave;re la plus usuelle, faire en sorte qu'il imprime ou affiche
<p>b) L'accompagner d'une proposition &eacute;crite, valable pendant une annonce comprenant un avis de droit d'auteur ad hoc, et un avis
au moins trois ans, de fournir &agrave; tout tiers, &agrave; un tarif qui stipulant qu'il n'y a pas de garantie (ou bien indiquant que c'est vous
ne soit pas sup&eacute;rieur &agrave; ce que vous co<63>te l'acte physique de qui fournissez la garantie), et que les utilisateurs peuvent redistribuer
r&eacute;aliser une distribution source, une copie int&eacute;grale du code le programme en respectant les pr&eacute;sentes obligations, et expliquant
source correspondant sous une forme lisible par un &agrave; l'utilisateur comment voir une copie de la pr&eacute;sente
ordinateur, qui sera distribu&eacute;e au titre des termes des Licence.
Articles 1 et 2 ci-dessus, sur un support habituellement </p>
utilis&eacute; pour l'&eacute;change de logiciels; ou, <p>
</p> (Exception : si le Programme est lui-m<>me interactif mais n'imprime pas
<p>c) L'accompagner des informations re<72>ues par vous concernant la proposition de distribution du code source correspondant. (Cette habituellement une telle annonce, votre ouvrage fond&eacute; sur le
solution n'est autoris&eacute;e que dans le cas d'une distribution non-commerciale Programme n'est pas oblig&eacute; d'imprimer une annonce).
et seulement si vous avez re<72>u le programme sous forme de code objet ou </p>
d'&eacute;x&eacute;cutable accompagn&eacute; d'une telle proposition - en conformit&eacute; avec le <p>
sous-Article b ci-dessus.) Ces obligations s'appliquent &agrave; l'ouvrage modifi&eacute; pris comme
</p> un tout.
<p>Le code source d'un ouvrage d&eacute;signe la forme favorite pour </p>
travailler &agrave; des modifications de cet ouvrage. Pour un <p>
ouvrage ex&eacute;cutable, le code source int&eacute;gral d&eacute;signe la Si des &eacute;l&eacute;ments identifiables de cet ouvrage ne sont pas
totalit&eacute; du code source de la totalit&eacute; des modules qu'il fond&eacute;es sur le Programme et peuvent raisonnablement <20>tre
contient, ainsi que les &eacute;ventuels fichiers de d&eacute;finition des consid&eacute;r&eacute;es comme des ouvrages ind&eacute;pendants distincts
interfaces qui y sont associ&eacute;s, ainsi que les scripts utilis&eacute;s en eux m<>mes, alors la pr&eacute;sente Licence et ses conditions ne
pour contr<74>ler la compilation et l'installation de s'appliquent pas &agrave; ces &eacute;l&eacute;ments lorsque vous les
l'ex&eacute;cutable. Cependant, par exception sp&eacute;ciale, le code distribuez en tant qu'ouvrages distincts.
source distribu&eacute; n'est pas cens&eacute; inclure quoi que ce soit de </p>
normalement distribu&eacute; (que ce soit sous forme source ou <p>
binaire) avec les composants principaux (compilateur, noyau, Mais lorsque vous distribuez ces m<>mes &eacute;l&eacute;ments comme partie
et autre) du syst&egrave;me d'exploitation sur lequel l'ex&eacute;cutable d'un tout, lequel constitue un ouvrage fond&eacute; sur le Programme, la
tourne, &agrave; moins que ce composant lui-m<>me n'accompagne distribution de ce tout doit <20>tre soumise aux conditions de la
l'ex&eacute;cutable. pr&eacute;sente Licence, et les autorisations qu'elle octroie aux autres
</p> concessionaires s'&eacute;tendent &agrave; l'ensemble de l'ouvrage et par
<p> cons&eacute;quent &agrave; chaque et toute partie indiff&eacute;rement de
Si distribuer un ex&eacute;cutable ou un code objet consiste &agrave; qui l'a &eacute;crite.
offrir un acc&egrave;s permettant leur copie depuis un </p>
endroit particulier, alors l'offre d'un acc&egrave;s &eacute;quivalent pour <p>
copier le code source depuis le m<>me endroit compte comme une Par cons&eacute;quent, l'objet du pr&eacute;sent article n'est pas de
distribution du code source - m<>me si les tiers ne sont pas revendiquer des droits ou de contester vos droits sur un ouvrage
contraints de copier le source en m<>me temps que le code enti&egrave;rement &eacute;crit par vous; son objet est plut<75>t d'exercer
objet. le droit de contr<74>ler la distribution d'ouvrages d&eacute;riv&eacute;s ou
</p> d'ouvrages collectifs fond&eacute;s sur le Programme.
<p>4. Vous ne pouvez copier, modifier, conc&eacute;der en sous-licence, ou distribuer </p>
le Programme, sauf tel qu'express&eacute;ment pr&eacute;vu par la pr&eacute;sente Licence. <p>
Toute tentative de copier, modifier, conc&eacute;der en sous-licence, ou De plus, la simple proximit&eacute; du Programme avec un autre ouvrage qui
distribuer le Programme d'une autre mani&egrave;re est r&eacute;put&eacute;e non valable, et met n'est pas fond&eacute; sur le Programme (ou un ouvrage fond&eacute; sur le
imm&eacute;diatement fin &agrave; vos droits au titre de la pr&eacute;sente Licence. Programme) sur une partition d'un espace de stockage ou un support de
Toutefois, les tiers ayant re<72>u de vous des copies, ou des droits, distribution ne place pas cet autre ouvrage dans le champ d'application de
au titre de la pr&eacute;sente Licence ne verront pas leurs autorisations r&eacute;sili&eacute;es la pr&eacute;sente Licence.
aussi longtemps que ledits tiers se conforment pleinement &agrave; elle. </p>
</p> <p>
<p>5. Vous n'<27>tes pas oblig&eacute; d'accepter la pr&eacute;sente Licence &eacute;tant donn&eacute; que vous ne 3. Vous pouvez copier et distribuer le Programme (ou un ouvrage
l'avez pas sign&eacute;e. Cependant, rien d'autre fond&eacute; sur lui, selon l'Article 2) sous forme de code objet ou
ne vous accorde l'autorisation de modifier ou d'ex&eacute;cutable, selon les termes des Articles 1 et 2 ci-dessus,
distribuer le Programme ou les ouvrages fond&eacute;s sur lui. Ces actions sont &agrave; condition que vous accomplissiez l'un des points suivants :
interdites par la loi si vous n'acceptez pas la pr&eacute;sente Licence. </p>
En cons&eacute;quence, en modifiant ou <p>
distribuant le Programme (ou un ouvrage quelconque fond&eacute; sur a) L'accompagner de l'int&eacute;gralit&eacute; du code source
le Programme), vous signifiez votre acceptation de la pr&eacute;sente Licence en le faisant, correspondant, sous une forme lisible par un ordinateur, lequel doit <20>tre
et de toutes ses conditions concernant la copie, la distribu&eacute; au titre des termes des Articles 1 et 2 ci-dessus, sur un
distribution ou la modification du Programme ou d'ouvrages fond&eacute;s support habituellement utilis&eacute; pour l'&eacute;change de logiciels;
sur lui.</p> ou,
<p> </p>
6. Chaque fois que vous redistribuez le Programme (ou n'importe quel <p>
ouvrage fond&eacute; sur le Programme), une licence est automatiquement b) L'accompagner d'une proposition &eacute;crite, valable pendant au moins
conc&eacute;d&eacute;e au destinataire par le conc&eacute;dant originel de la licence, trois ans, de fournir &agrave; tout tiers, &agrave; un tarif qui ne soit
l'autorisant &agrave; pas sup&eacute;rieur &agrave; ce que vous co<63>te l'acte physique de
copier, distribuer ou modifier le Programme, sous r&eacute;serve r&eacute;aliser une distribution source, une copie int&eacute;grale du
des pr&eacute;sentes conditions. Vous ne pouvez imposer code source correspondant sous une forme lisible par un ordinateur, qui
une quelconque limitation suppl&eacute;mentaire &agrave; l'exercice des sera distribu&eacute;e au titre des termes des Articles 1 et 2 ci-dessus,
droits octroy&eacute;s au titre des pr&eacute;sentes par le destinataire. Vous sur un support habituellement utilis&eacute; pour l'&eacute;change de
n'avez pas la responsabilit&eacute; d'imposer le respect de logiciels; ou,
la pr&eacute;sente Licence &agrave; des tiers. </p> </p>
<p> <p>
7. Si, cons&eacute;quement &agrave; une d&eacute;cision de justice ou l'all&eacute;gation c) L'accompagner des informations re<72>ues par vous concernant la
d'une transgression de brevet ou pour toute autre raison (non limit&eacute;e &agrave; un proposition de distribution du code source correspondant. (Cette solution
probleme de brevet), des obligations vous sont impos&eacute;es (que ce soit par jugement, n'est autoris&eacute;e que dans le cas d'une distribution non-commerciale
conciliation ou autre) qui contredisent les conditions de la pr&eacute;sente Licence, elles et seulement si vous avez re<72>u le programme sous forme de code objet ou
ne vous excusent pas des conditions de la pr&eacute;sente Licence. Si vous ne pouvez d'&eacute;x&eacute;cutable accompagn&eacute; d'une telle proposition - en
distribuer de mani&egrave;re &agrave; satisfaire simultan&eacute;ment vos obligations au titre conformit&eacute; avec le sous-Article b ci-dessus.)
de la pr&eacute;sente Licence et toute autre obligation pertinente, alors il en d&eacute;coule que vous ne pouvez pas du tout distribuer le Programme. Par exemple, </p>
si une licence de brevet ne permettait pas une redistribution sans redevance du <p>
Programme par tous ceux qui re<72>oivent une copie directement ou indirectement Le code source d'un ouvrage d&eacute;signe la forme favorite pour
par votre interm&eacute;diaire, alors la seule fa<66>on pour vous de satisfaire &agrave; la travailler &agrave; des modifications de cet ouvrage. Pour un ouvrage
fois &agrave; la licence du brevet et &agrave; la pr&eacute;sente Licence serait de vous abstenir ex&eacute;cutable, le code source int&eacute;gral d&eacute;signe la
totalement de toute distribution du Programme. totalit&eacute; du code source de la totalit&eacute; des modules qu'il
</p> contient, ainsi que les &eacute;ventuels fichiers de d&eacute;finition des
<p>Si une partie quelconque de cet article est tenue pour interfaces qui y sont associ&eacute;s, ainsi que les scripts
nulle ou inopposable dans une circonstance particuli&egrave;re utilis&eacute;s pour contr<74>ler la compilation et l'installation de
quelconque, l'intention est que le reste de l'article l'ex&eacute;cutable. Cependant, par exception sp&eacute;ciale, le code
s'applique. La totalit&eacute; de la section s'appliquera dans toutes les source distribu&eacute; n'est pas cens&eacute; inclure quoi que ce soit de
autres circonstances.</p> normalement distribu&eacute; (que ce soit sous forme source ou binaire)
<p>Cet article n'a pas pour but de vous induire &agrave; transgresser un avec les composants principaux (compilateur, noyau, et autre) du
quelconque brevet ou d'autres revendications &agrave; un droit de propri&eacute;t&eacute; ou syst&egrave;me d'exploitation sur lequel l'ex&eacute;cutable tourne,
&agrave; contester la validit&eacute; de la moindre de ces revendications ; cet article a pour &agrave; moins que ce composant lui-m<>me n'accompagne l'ex&eacute;cutable.
seul objectif de prot&eacute;ger l'int&eacute;grit&eacute; du syst&egrave;me de distribution </p>
du logiciel libre, qui est mis en oeuvre par la pratique des licenses <p>
publiques. De nombreuses personnes ont fait de g&eacute;n&eacute;reuses contributions Si distribuer un ex&eacute;cutable ou un code objet consiste &agrave;
au large spectre de logiciels distribu&eacute;s par ce syst&egrave;me en se fiant &agrave; offrir un acc&egrave;s permettant leur copie depuis un endroit
l'application coh&eacute;rente de ce syst&egrave;me ; il appartient &agrave; chaque auteur/donateur particulier, alors l'offre d'un acc&egrave;s &eacute;quivalent pour copier
de d&eacute;cider si il ou elle veut distribuer du logiciel par l'interm&eacute;diaire le code source depuis le m<>me endroit compte comme une distribution du
d'un quelconque autre syst&egrave;me et un concessionaire ne peut imposer ce code source - m<>me si les tiers ne sont pas contraints de copier le source
choix. en m<>me temps que le code objet.
</p> </p>
<p>Cet article a pour but de rendre totalement limpide ce que l'on pense <p>
<EFBFBD>tre une cons&eacute;quence du reste de la pr&eacute;sente Licence.</p> 4. Vous ne pouvez copier, modifier, conc&eacute;der en sous-licence, ou
<p>8. Si la distribution et/ou l'utilisation du Programme est limit&eacute;e distribuer le Programme, sauf tel qu'express&eacute;ment pr&eacute;vu par
dans certains pays que ce soit par des brevets ou par des interfaces soumises la pr&eacute;sente Licence. Toute tentative de copier, modifier,
au droit d'auteur, le titulaire originel des droits d'auteur conc&eacute;der en sous-licence, ou distribuer le Programme d'une autre
qui d&eacute;cide de couvrir le Programme par la pr&eacute;sente Licence peut ajouter mani&egrave;re est r&eacute;put&eacute;e non valable, et met
une limitation g&eacute;ographique de distribution explicite qui exclue ces pays afin imm&eacute;diatement fin &agrave; vos droits au titre de la
que la distribution soit permise seulement dans ou entre les pays qui ne sont pr&eacute;sente Licence. Toutefois, les tiers ayant re<72>u de vous des
pas ainsi exclus. Dans ce cas, la pr&eacute;sente Licence incorpore la limitation copies, ou des droits, au titre de la pr&eacute;sente Licence ne verront
comme si elle &eacute;tait &eacute;crite dans le corps de la pr&eacute;sente Licence. pas leurs autorisations r&eacute;sili&eacute;es aussi longtemps que ledits
</p> tiers se conforment pleinement &agrave; elle.
<p>9. La Free Software Foundation peut, de temps &agrave; autre, publier des </p>
versions r&eacute;vis&eacute;es et/ou nouvelles de la Licence Publique G&eacute;n&eacute;rale. De telles <p>
nouvelles versions seront similaires &agrave; la pr&eacute;sente version dans l'esprit 5. Vous n'<27>tes pas oblig&eacute; d'accepter la pr&eacute;sente Licence
mais pourront diff&eacute;rer dans le d&eacute;tail pour prendre en compte &eacute;tant donn&eacute; que vous ne l'avez pas sign&eacute;e. Cependant,
de nouvelles probl&eacute;matiques ou inqui&eacute;tudes. rien d'autre ne vous accorde l'autorisation de modifier ou distribuer le
</p> Programme ou les ouvrages fond&eacute;s sur lui. Ces actions sont
<p>Chaque version poss&egrave;de un num&eacute;ro de version la distinguant. Si le Programme interdites par la loi si vous n'acceptez pas la pr&eacute;sente Licence.
pr&eacute;cise le num&eacute;ro de version de la pr&eacute;sente Licence qui s'y applique En cons&eacute;quence, en modifiant ou distribuant le Programme (ou un
et "une version ult&eacute;rieure quelconque", vous avez le choix ouvrage quelconque fond&eacute; sur le Programme), vous signifiez votre
de suivre les acceptation de la pr&eacute;sente Licence en le faisant, et de toutes ses
conditions de conditions concernant la copie, la distribution ou la modification du
la pr&eacute;sente version ou de toute autre version ult&eacute;rieure publi&eacute;e par la Programme ou d'ouvrages fond&eacute;s sur lui.
Free Software Foundation. Si le Programme ne sp&eacute;cifie aucun num&eacute;ro de </p>
version de la pr&eacute;sente Licence, vous pouvez choisir une version quelconque <p>
publi&eacute;e par la Free Software Foundation &agrave; quelque moment que ce soit.</p> 6. Chaque fois que vous redistribuez le Programme (ou n'importe quel
<p>10. Si vous souhaitez incorporer des parties du Programme ouvrage fond&eacute; sur le Programme), une licence est automatiquement
dans d'autres programmes libres dont les conditions de conc&eacute;d&eacute;e au destinataire par le conc&eacute;dant originel de
distribution sont diff&eacute;rentes, &eacute;crivez &agrave; l'auteur pour lui en demander la licence, l'autorisant &agrave; copier, distribuer ou modifier le
l'autorisation. Pour les logiciels dont la Free Software Foundation est Programme, sous r&eacute;serve des pr&eacute;sentes conditions. Vous ne
titulaire des droits d'auteur, &eacute;crivez &agrave; la Free Software Foundation ; pouvez imposer une quelconque limitation suppl&eacute;mentaire &agrave;
nous faisons parfois des exceptions dans ce sens. Notre d&eacute;cision sera guid&eacute;e l'exercice des droits octroy&eacute;s au titre des pr&eacute;sentes par le
par le double objectif de pr&eacute;server le statut libre de tous les d&eacute;riv&eacute;s de nos destinataire. Vous n'avez pas la responsabilit&eacute; d'imposer le
logiciels libres et de promouvoir le partage et la r&eacute;utilisation des logiciels respect de la pr&eacute;sente Licence &agrave; des tiers.
en g&eacute;n&eacute;ral. </p>
</p> <p>
<h2>ABSENCE DE GARANTIE</h2> 7. Si, cons&eacute;quement &agrave; une d&eacute;cision de justice ou
<p>11. COMME LA LICENCE DU PROGRAMME EST CONCEDEE A TITRE GRATUIT, l'all&eacute;gation d'une transgression de brevet ou pour toute autre
AUCUNE GARANTIE NE S'APPLIQUE AU PROGRAMME, DANS LES LIMITES raison (non limit&eacute;e &agrave; un probleme de brevet), des
AUTORISEES PAR LA LOI APPLICABLE. SAUF MENTION CONTRAIRE ECRITE, obligations vous sont impos&eacute;es (que ce soit par jugement,
LES TITULAIRES DU DROIT D'AUTEUR ET/OU LES AUTRES PARTIES FOURNISSENT conciliation ou autre) qui contredisent les conditions de la
LE PROGRAMME "EN L'ETAT", SANS AUCUNE GARANTIE DE pr&eacute;sente Licence, elles ne vous excusent pas des conditions de la
QUELQUE NATURE QUE CE SOIT, EXPRESSE OU IMPLICITE, Y COMPRIS, MAIS pr&eacute;sente Licence. Si vous ne pouvez distribuer de mani&egrave;re
SANS Y ETRE LIMITE, LES GARANTIES IMPLICITES DE COMMERCIABILITE ET &agrave; satisfaire simultan&eacute;ment vos obligations au titre de la
DE LA CONFORMITE A UNE UTILISATION PARTICULIERE. VOUS pr&eacute;sente Licence et toute autre obligation pertinente, alors il en
ASSUMEZ LA TOTALITE DES RISQUES LIES A LA QUALITE ET AUX PERFORMANCES DU PROGRAMME. d&eacute;coule que vous ne pouvez pas du tout distribuer le Programme. Par
SI LE PROGRAMME SE REVELAIT DEFECTUEUX, LE COUT DE L'ENTRETIEN, exemple, si une licence de brevet ne permettait pas une redistribution
DES REPARATIONS OU DES CORRECTIONS NECESSAIRES sans redevance du Programme par tous ceux qui re<72>oivent une copie
VOUS INCOMBENT INTEGRALEMENT.</p> directement ou indirectement par votre interm&eacute;diaire, alors la
<p>12. EN AUCUN CAS, SAUF LORSQUE LA LOI APPLICABLE OU UNE CONVENTION ECRITE L'EXIGE, UN TITULAIRE DE DROIT D'AUTEUR QUEL QU'IL SOIT, OU TOUTE PARTIE QUI POURRAIT MODIFIER ET/OU REDISTRIBUER LE PROGRAMME COMME PERMIS CI-DESSUS, NE POURRAIT ETRE TENU POUR RESPONSABLE A VOTRE EGARD DES DOMMAGES, INCLUANT LES DOMMAGES GENERIQUES, SPECIFIQUES, SECONDAIRES OU CONSECUTIFS, RESULTANT DE L'UTILISATION OU DE L'INCAPACITE D'UTILISER LE PROGRAMME (Y COMPRIS, MAIS SANS Y ETRE LIMITE, LA PERTE DE DONNEES, OU LE FAIT QUE DES DONNEES SOIENT RENDUES IMPRECISES, OU LES PERTES EPROUVEES PAR VOUS OU PAR DES TIERS, OU LE FAIT QUE LE PROGRAMME ECHOUE A INTEROPERER AVEC UN AUTRE PROGRAMME QUEL QU'IL SOIT) MEME SI LE DIT TITULAIRE DU DROIT D'AUTEUR OU LE PARTIE CONCERNEE A ETE AVERTI DE L'EVENTUALITE DE TELS DOMMAGES. seule fa<66>on pour vous de satisfaire &agrave; la fois &agrave; la licence
</p> du brevet et &agrave; la pr&eacute;sente Licence serait de vous abstenir
<h2>FIN DES CONDITIONS</h2> totalement de toute distribution du Programme.
<h2>Comment appliquer ces conditions &agrave; vos nouveaux programmes</h2> </p>
<p> Si vous d&eacute;veloppez un nouveau programme, et si vous voulez qu'il soit de la plus grande utilit&eacute; possible pour le public, le meilleur moyen d'y parvenir est d'en faire un logiciel libre que chacun peut redistribuer et modifier au titre des pr&eacute;sentes conditions.</p> <p>
<p>Pour ce faire, munissez le programme des avis qui suivent. Si une partie quelconque de cet article est tenue pour nulle ou
Le plus s<>r est de les ajouter au d&eacute;but de chaque fichier source inopposable dans une circonstance particuli&egrave;re quelconque,
pour v&eacute;hiculer le plus efficacement possible l'absence l'intention est que le reste de l'article s'applique. La totalit&eacute;
de toute garantie; chaque fichier devrait aussi contenir au moins de la section s'appliquera dans toutes les autres circonstances.
la ligne "copyright" et une indication de l'endroit o&ugrave; se trouve l'avis </p>
compl<EFBFBD>t. <p>
</p> Cet article n'a pas pour but de vous induire &agrave; transgresser un
<p> [Une ligne donnant le nom du programme et une courte id&eacute;e de ce qu'il fait.] quelconque brevet ou d'autres revendications &agrave; un droit de
</p> propri&eacute;t&eacute; ou &agrave; contester la validit&eacute; de la
<p> moindre de ces revendications ; cet article a pour seul objectif de
Copyright (C) [ann&eacute;e] [nom de l'auteur] prot&eacute;ger l'int&eacute;grit&eacute; du syst&egrave;me de
</p> distribution du logiciel libre, qui est mis en oeuvre par la pratique des
<p> licenses publiques. De nombreuses personnes ont fait de
Ce programme est un logiciel libre ; vous pouvez le g&eacute;n&eacute;reuses contributions au large spectre de logiciels
redistribuer et/ou le modifier au titre des clauses de la distribu&eacute;s par ce syst&egrave;me en se fiant &agrave; l'application
Licence Publique G&eacute;n&eacute;rale GNU, telle que publi&eacute;e par la Free coh&eacute;rente de ce syst&egrave;me ; il appartient &agrave; chaque
Software Foundation ; soit la version 2 de la Licence, ou (&agrave; auteur/donateur de d&eacute;cider si il ou elle veut distribuer du
votre discr&eacute;tion) une version ult&eacute;rieure quelconque. logiciel par l'interm&eacute;diaire d'un quelconque autre syst&egrave;me
</p> et un concessionaire ne peut imposer ce choix.
<p> </p>
Ce programme est distribu&eacute; dans l'espoir qu'il sera utile, <p>
mais SANS AUCUNE GARANTIE ; sans m<>me une garantie implicite de Cet article a pour but de rendre totalement limpide ce que l'on pense <20>tre
COMMERCIABILITE ou DE CONFORMITE A UNE UTILISATION une cons&eacute;quence du reste de la pr&eacute;sente Licence.
PARTICULIERE. Voir la Licence Publique </p>
G&eacute;n&eacute;rale GNU pour plus de d&eacute;tails. <p>
</p> 8. Si la distribution et/ou l'utilisation du Programme est limit&eacute;e
<p> dans certains pays que ce soit par des brevets ou par des interfaces
Vous devriez avoir re<72>u un exemplaire de la Licence Publique soumises au droit d'auteur, le titulaire originel des droits d'auteur qui
G&eacute;n&eacute;rale GNU avec ce programme ; si ce n'est pas le cas, d&eacute;cide de couvrir le Programme par la pr&eacute;sente Licence peut
&eacute;crivez &agrave; la Free Software Foundation Inc., 51 Franklin ajouter une limitation g&eacute;ographique de distribution explicite qui
Street, Fifth Floor, Boston, MA 02110-1301, USA.</p> exclue ces pays afin que la distribution soit permise seulement dans ou
<p>Ajoutez aussi des informations sur la mani&egrave;re de vous contacter entre les pays qui ne sont pas ainsi exclus. Dans ce cas, la
par courrier &eacute;lectronique et courrier postal.</p> pr&eacute;sente Licence incorpore la limitation comme si elle &eacute;tait
<p>Si le programme est interactif, faites en sorte qu'il &eacute;crite dans le corps de la pr&eacute;sente Licence.
affiche un court avis tel que celui-ci lorsqu'il d&eacute;marre en </p>
mode interactif : <p>
</p> 9. La Free Software Foundation peut, de temps &agrave; autre, publier des
<p>Gnomovision version 69, Copyright (C) ann&eacute;e nom de l'auteur versions r&eacute;vis&eacute;es et/ou nouvelles de la Licence Publique
Gnomovision n'est accompagn&eacute; d'ABSOLUMENT AUCUNE GARANTIE ; pour plus de G&eacute;n&eacute;rale. De telles nouvelles versions seront similaires
d&eacute;tails tapez "show w". Ceci est un logiciel libre et vous <20>tes &agrave; la pr&eacute;sente version dans l'esprit mais pourront
invit&eacute; &agrave; le redistribuer en respectant certaines obligations ; pour plus diff&eacute;rer dans le d&eacute;tail pour prendre en compte de nouvelles
de d&eacute;tails tapez "show c".</p> probl&eacute;matiques ou inqui&eacute;tudes.
<p>Les instructions hypoth&eacute;tiques "show w" et "show c" sont suppos&eacute;es montrer </p>
les parties ad hoc de la Licence Publique G&eacute;n&eacute;rale. Bien <p>
entendu, les instructions que vous utilisez peuvent porter d'autres Chaque version poss&egrave;de un num&eacute;ro de version la distinguant.
noms que "show w" et "show c" ; elles peuvent m<>me <20>tre des Si le Programme pr&eacute;cise le num&eacute;ro de version de la
clics de souris ou des &eacute;l&eacute;ments d'un menu ou tout ce qui convient &agrave; pr&eacute;sente Licence qui s'y applique et "une version ult&eacute;rieure
votre programme.</p> quelconque", vous avez le choix de suivre les conditions de la
<p>Vous devriez aussi obtenir de votre employeur (si vous pr&eacute;sente version ou de toute autre version ult&eacute;rieure
travaillez en tant que d&eacute;veloppeur) ou de votre &eacute;cole, si c'est publi&eacute;e par la Free Software Foundation. Si le Programme ne
le cas, qu'il (ou elle) signe une "renonciation aux droits sp&eacute;cifie aucun num&eacute;ro de version de la pr&eacute;sente
d'auteur" concernant le programme, si n&eacute;cessaire. Voici un Licence, vous pouvez choisir une version quelconque publi&eacute;e par la
exemple (changez les noms) : Free Software Foundation &agrave; quelque moment que ce soit.
</p> </p>
<p>Yoyodyne, Inc., d&eacute;clare par la pr&eacute;sente renoncer &agrave; toute pr&eacute;tention <p>
sur les droits d'auteur du programme "Gnomovision" (qui fait des 10. Si vous souhaitez incorporer des parties du Programme dans d'autres
avances aux compilateurs) &eacute;crit par James Hacker. programmes libres dont les conditions de distribution sont
</p> diff&eacute;rentes, &eacute;crivez &agrave; l'auteur pour lui en demander
<p> l'autorisation. Pour les logiciels dont la Free Software Foundation est
[signature de Ty Coon], 1er avril 1989 titulaire des droits d'auteur, &eacute;crivez &agrave; la Free Software
</p> Foundation ; nous faisons parfois des exceptions dans ce sens. Notre
<p> d&eacute;cision sera guid&eacute;e par le double objectif de
Ty Coon, President du Vice</p> pr&eacute;server le statut libre de tous les d&eacute;riv&eacute;s de nos
<p>La pr&eacute;sente Licence Publique G&eacute;n&eacute;rale n'autorise pas l'incorporation de votre logiciels libres et de promouvoir le partage et la r&eacute;utilisation
programme dans des programmes des logiciels en g&eacute;n&eacute;ral.
propri&eacute;taires. Si votre programme est une biblioth&egrave;que de </p>
sous-programmes, vous pouvez consid&eacute;rer plus utile <h2>ABSENCE DE GARANTIE</h2>
d'autoriser l'&eacute;dition de liens d'applications propri&eacute;taires avec <p>
la biblioth&egrave;que. Si c'est ce que vous voulez faire, utilisez la 11. COMME LA LICENCE DU PROGRAMME EST CONCEDEE A TITRE GRATUIT, AUCUNE
GNU Lesser General Public License au lieu de la pr&eacute;sente Licence. GARANTIE NE S'APPLIQUE AU PROGRAMME, DANS LES LIMITES AUTORISEES PAR LA
</p> LOI APPLICABLE. SAUF MENTION CONTRAIRE ECRITE, LES TITULAIRES DU DROIT
</body> D'AUTEUR ET/OU LES AUTRES PARTIES FOURNISSENT LE PROGRAMME "EN L'ETAT",
</html> SANS AUCUNE GARANTIE DE QUELQUE NATURE QUE CE SOIT, EXPRESSE OU IMPLICITE,
Y COMPRIS, MAIS SANS Y ETRE LIMITE, LES GARANTIES IMPLICITES DE
COMMERCIABILITE ET DE LA CONFORMITE A UNE UTILISATION PARTICULIERE. VOUS
ASSUMEZ LA TOTALITE DES RISQUES LIES A LA QUALITE ET AUX PERFORMANCES DU
PROGRAMME. SI LE PROGRAMME SE REVELAIT DEFECTUEUX, LE COUT DE L'ENTRETIEN,
DES REPARATIONS OU DES CORRECTIONS NECESSAIRES VOUS INCOMBENT
INTEGRALEMENT.
</p>
<p>
12. EN AUCUN CAS, SAUF LORSQUE LA LOI APPLICABLE OU UNE CONVENTION ECRITE
L'EXIGE, UN TITULAIRE DE DROIT D'AUTEUR QUEL QU'IL SOIT, OU TOUTE PARTIE
QUI POURRAIT MODIFIER ET/OU REDISTRIBUER LE PROGRAMME COMME PERMIS
CI-DESSUS, NE POURRAIT ETRE TENU POUR RESPONSABLE A VOTRE EGARD DES
DOMMAGES, INCLUANT LES DOMMAGES GENERIQUES, SPECIFIQUES, SECONDAIRES OU
CONSECUTIFS, RESULTANT DE L'UTILISATION OU DE L'INCAPACITE D'UTILISER LE
PROGRAMME (Y COMPRIS, MAIS SANS Y ETRE LIMITE, LA PERTE DE DONNEES, OU LE
FAIT QUE DES DONNEES SOIENT RENDUES IMPRECISES, OU LES PERTES EPROUVEES
PAR VOUS OU PAR DES TIERS, OU LE FAIT QUE LE PROGRAMME ECHOUE A
INTEROPERER AVEC UN AUTRE PROGRAMME QUEL QU'IL SOIT) MEME SI LE DIT
TITULAIRE DU DROIT D'AUTEUR OU LE PARTIE CONCERNEE A ETE AVERTI DE
L'EVENTUALITE DE TELS DOMMAGES.
</p>
<h2>FIN DES CONDITIONS</h2>
<h2>Comment appliquer ces conditions &agrave; vos nouveaux programmes</h2>
<p>
Si vous d&eacute;veloppez un nouveau programme, et si vous voulez qu'il
soit de la plus grande utilit&eacute; possible pour le public, le meilleur
moyen d'y parvenir est d'en faire un logiciel libre que chacun peut
redistribuer et modifier au titre des pr&eacute;sentes conditions.
</p>
<p>
Pour ce faire, munissez le programme des avis qui suivent. Le plus s<>r est
de les ajouter au d&eacute;but de chaque fichier source pour
v&eacute;hiculer le plus efficacement possible l'absence de toute
garantie; chaque fichier devrait aussi contenir au moins la ligne
"copyright" et une indication de l'endroit o&ugrave; se trouve l'avis
compl<70>t.
</p>
<p>
[Une ligne donnant le nom du programme et une courte id&eacute;e de ce
qu'il fait.]
</p>
<p>Copyright (C) [ann&eacute;e] [nom de l'auteur]</p>
<p>
Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le
modifier au titre des clauses de la Licence Publique
G&eacute;n&eacute;rale GNU, telle que publi&eacute;e par la Free Software
Foundation ; soit la version 2 de la Licence, ou (&agrave; votre
discr&eacute;tion) une version ult&eacute;rieure quelconque.
</p>
<p>
Ce programme est distribu&eacute; dans l'espoir qu'il sera utile, mais
SANS AUCUNE GARANTIE ; sans m<>me une garantie implicite de COMMERCIABILITE
ou DE CONFORMITE A UNE UTILISATION PARTICULIERE. Voir la Licence Publique
G&eacute;n&eacute;rale GNU pour plus de d&eacute;tails.
</p>
<p>
Vous devriez avoir re<72>u un exemplaire de la Licence Publique
G&eacute;n&eacute;rale GNU avec ce programme ; si ce n'est pas le cas,
&eacute;crivez &agrave; la Free Software Foundation Inc., 51 Franklin
Street, Fifth Floor, Boston, MA 02110-1301, USA.
</p>
<p>
Ajoutez aussi des informations sur la mani&egrave;re de vous contacter par
courrier &eacute;lectronique et courrier postal.
</p>
<p>
Si le programme est interactif, faites en sorte qu'il affiche un court
avis tel que celui-ci lorsqu'il d&eacute;marre en mode interactif :
</p>
<p>
Gnomovision version 69, Copyright (C) ann&eacute;e nom de l'auteur
Gnomovision n'est accompagn&eacute; d'ABSOLUMENT AUCUNE GARANTIE ; pour
plus de d&eacute;tails tapez "show w". Ceci est un logiciel libre et vous
<20>tes invit&eacute; &agrave; le redistribuer en respectant certaines
obligations ; pour plus de d&eacute;tails tapez "show c".
</p>
<p>
Les instructions hypoth&eacute;tiques "show w" et "show c" sont
suppos&eacute;es montrer les parties ad hoc de la Licence Publique
G&eacute;n&eacute;rale. Bien entendu, les instructions que vous utilisez
peuvent porter d'autres noms que "show w" et "show c" ; elles peuvent m<>me
<20>tre des clics de souris ou des &eacute;l&eacute;ments d'un menu ou tout
ce qui convient &agrave; votre programme.
</p>
<p>
Vous devriez aussi obtenir de votre employeur (si vous travaillez en tant
que d&eacute;veloppeur) ou de votre &eacute;cole, si c'est le cas, qu'il
(ou elle) signe une "renonciation aux droits d'auteur" concernant le
programme, si n&eacute;cessaire. Voici un exemple (changez les noms) :
</p>
<p>
Yoyodyne, Inc., d&eacute;clare par la pr&eacute;sente renoncer &agrave;
toute pr&eacute;tention sur les droits d'auteur du programme "Gnomovision"
(qui fait des avances aux compilateurs) &eacute;crit par James Hacker.
</p>
<p>[signature de Ty Coon], 1er avril 1989</p>
<p>Ty Coon, President du Vice</p>
<p>
La pr&eacute;sente Licence Publique G&eacute;n&eacute;rale n'autorise pas
l'incorporation de votre programme dans des programmes
propri&eacute;taires. Si votre programme est une biblioth&egrave;que de
sous-programmes, vous pouvez consid&eacute;rer plus utile d'autoriser
l'&eacute;dition de liens d'applications propri&eacute;taires avec la
biblioth&egrave;que. Si c'est ce que vous voulez faire, utilisez la GNU
Lesser General Public License au lieu de la pr&eacute;sente Licence.
</p>
</body>
</html>

View File

@ -1,279 +1,304 @@
<html> <html>
<head> <head>
<title>Licenze GNU</title> <title>Licenze GNU</title>
</head> </head>
<body> <body>
<h3>Licenze GNU</h3>
<h3>Licenze GNU</h3> <h4>Sommario</h4>
<ul>
<li><a href="#Intro" id="TOIntro">Introduzione</a></li>
<li><a href="#GPL" id="TOCGPL"> La Licenza Pubblica Generica GNU</a></li>
<li>
<a href="#LGPL" id="TOCLGPL"
>La Licenza Pubblica Generica Attenuata GNU</a
>
</li>
<li>
<a href="#FDL" id="TOCFDL">La Licenza per Documentazione Libera GNU</a>
</li>
<li>
<a href="#VerbatimCopying" id="TOCVerbatimCopying"
>Copie letterali e distribuzione</a
>
</li>
<li>
<a href="#LicenseList" id="TOCLicenseList"
>Elenco di licenze per il software libero</a
>
</li>
<li>
<a href="#WhatIsCopyleft" id="TOCWhatIsCopyleft"
>Cos'&egrave; il permesso d'autore (copyleft)?</a
>
</li>
<li>
<a href="#OtherWorks" id="TOCOtherWorks"
>Licenze per altri tipi di opere</a
>
</li>
</ul>
<h4>Sommario</h4> <hr />
<ul> <h3><a href="TOCIntro" id="Intro">Introduzione</a></h3>
<li><a href="#Intro" id="TOIntro">Introduzione</a></li>
<li><a href="#GPL" id="TOCGPL">
La Licenza Pubblica Generica GNU</a></li>
<li><a href="#LGPL"
id="TOCLGPL">La Licenza Pubblica Generica Attenuata GNU</a></li>
<li><a href="#FDL"
id="TOCFDL">La Licenza per Documentazione Libera GNU</a></li>
<li><a href="#VerbatimCopying"
id="TOCVerbatimCopying">Copie letterali e distribuzione</a></li>
<li><a href="#LicenseList"
id="TOCLicenseList">Elenco di licenze per il software libero</a></li>
<li><a href="#WhatIsCopyleft"
id="TOCWhatIsCopyleft">Cos'&egrave; il permesso d'autore (copyleft)?</a></li>
<li><a href="#OtherWorks"
id="TOCOtherWorks">Licenze per altri tipi di opere</a></li>
</ul>
<hr /> <p>
Tutto il software pubblicato dovrebbe essere software libero.
Perch&eacute; sia libero, bisogna pubblicarlo con una licenza per il
software libero. Normalmente utilizziamo la
<a href="GPL">Licenza Pubblica Generica GNU</a> (GNU GPL), ma talvolta
utilizziamo anche
<a href="LicenseList">altre licenze per software libero</a>. Per il
software GNU utilizziamo solo licenze compatibili con la GNU GPL.
</p>
<h3><a href="TOCIntro" id="Intro">Introduzione</a></h3> <p>
La documentazione per il software libero dovrebbe essere documentazione
libera, in modo che si possa distribuire e migliorare assieme al software
che essa descrive. Per rendere libera la documentazione occorre
rilasciarla con una licenza di documentazione libera. Normalmente
utilizziamo la
<a href="FDL">Licenza per Documentazione Libera GNU</a> (GNU FDL), ma
talvolta utilizziamo anche
<a href="LicenseList">altre licenze per la documentazione libera</a>.
</p>
<p> <h3><a href="TOCGPL" id="GPL">La Licenza Pubblica Generica GNU</a></h3>
Tutto il software pubblicato dovrebbe essere software libero. Perch&eacute; sia
libero, bisogna pubblicarlo con una licenza per il software libero.
Normalmente utilizziamo la <a href="GPL">Licenza
Pubblica Generica GNU</a> (GNU GPL), ma talvolta utilizziamo anche <a
href="LicenseList">altre licenze per software
libero</a>. Per il software GNU utilizziamo solo licenze compatibili
con la GNU GPL.
</p>
<p> <p>
La documentazione per il software libero dovrebbe La Licenza Pubblica Generica GNU &egrave; spesso indicata brevemente come
essere documentazione GNU GPL; &egrave; usata dalla maggioranza dei programmi GNU, e da
libera, in modo che si possa distribuire e migliorare assieme al pi&ugrave; della met&agrave; di tutti i pacchetti di software libero.
software che essa descrive. Per rendere libera la documentazione </p>
occorre rilasciarla con una licenza di documentazione
libera. Normalmente utilizziamo
la <a href="FDL">Licenza per Documentazione Libera
GNU</a> (GNU FDL), ma talvolta utilizziamo
anche <a href="LicenseList">altre licenze per la
documentazione libera</a>.
</p>
<h3><a href="TOCGPL" <h3>
id="GPL">La Licenza Pubblica Generica GNU</a></h3> <a href="TOCLGPL" id="LGPL">Licenza Pubblica Generica Attenuata GNU</a>
</h3>
<p> <p>
La Licenza Pubblica Generica GNU &egrave; spesso indicata brevemente come GNU La Licenza Pubblica Generica Attenuata GNU &egrave; utilizzata da alcune
GPL; &egrave; usata dalla maggioranza dei programmi GNU, e da pi&ugrave; della met&agrave; di (non tutte) delle librerie GNU. Questa licenza era originariamente
tutti i pacchetti di software libero. chiamata la GPL per Librerie, ma in seguito le cambiammo nome
</p> perch&eacute; il vecchio nome ne incoraggiava un uso pi&ugrave; frequente
del dovuto.
</p>
<h3><a href="TOCLGPL" <h3>
id="LGPL">Licenza Pubblica Generica Attenuata GNU</a></h3> <a href="TOCFDL" id="FDL">La Licenza per Documentazione Libera GNU</a>
</h3>
<p> <p>
La Licenza Pubblica Generica Attenuata GNU &egrave; utilizzata da alcune (non La licenza di Documentazione Libera &egrave; una forma di permesso
tutte) delle librerie GNU. Questa licenza era originariamente chiamata d'autore (copyleft) pensata per un manuale, libro di testo o altro
la GPL per Librerie, ma in seguito le cambiammo nome perch&eacute; il vecchio documento, in modo da garantire a chiunque l'effettiva libert&agrave; di
nome ne incoraggiava un uso pi&ugrave; frequente del dovuto. usarlo e distribuirlo, con o senza modifiche, commercialmente o meno.
</p> </p>
<h3>
<a href="TOCVerbatimCopying" id="VerbatimCopying"
>Copie letterali e distribuzione</a
>
</h3>
<p>
La nota standard di copyright per le pagine web GNU recita:
<em
>La copia letterale e la distribuzione di questo articolo nella sua
integrit&agrave; sono permesse con qualsiasi mezzo, a condizione che
questa nota sia riprodotta</em
>. Si tenga presente questo commento di Eben Moglen:
</p>
<h3><a href="TOCFDL" <p>
id="FDL">La Licenza per Documentazione Libera GNU</a></h3> &laquo;Con la frase "copia letterale con qualsiasi mezzo" non intendiamo
richiedere il mantenimento di intestazioni, pi&egrave; di pagina o altre
caratteristiche di formattazione. Si richiede tuttavia di mantenere link
web sia per i media ipertestuali sia per quelli non ipertestuali (in forma
di note o URL riportate letteralmente su media non HTML).&raquo;
</p>
<p> <h3>
La licenza di Documentazione Libera &egrave; una forma di permesso d'autore <a href="TOCLicenseList" id="LicenseList"
(copyleft) pensata per un manuale, libro di testo o altro documento, in >Elenco di licenze per il software libero</a
modo da garantire a chiunque l'effettiva libert&agrave; di usarlo e >
distribuirlo, con o senza modifiche, commercialmente o meno. </h3>
</p>
<h3><a href="TOCVerbatimCopying" <ul>
id="VerbatimCopying">Copie letterali e distribuzione</a></h3> <li>
<p> Elenco di licenze per il software libero
La nota standard di copyright per le pagine web GNU recita: <em>La copia
letterale e la distribuzione di questo articolo nella sua integrit&agrave; sono
permesse con qualsiasi mezzo, a condizione che questa nota sia
riprodotta</em>. Si tenga presente questo commento di Eben Moglen:
</p>
<p> <p>
&laquo;Con la frase "copia letterale con qualsiasi mezzo" non intendiamo Se state pensando di scrivere una nuova licenza, vi preghiamo di
richiedere il mantenimento di intestazioni, pi&egrave; di pagina o altre contattare la FSF scrivendo a
caratteristiche di formattazione. Si richiede tuttavia di mantenere link <a href="mailto:licensing@fsf.org">&lt;licensing@fsf.org&gt;</a>. Il
web sia per i media ipertestuali sia per quelli non ipertestuali (in proliferare di diverse licenze di software libero significa un aumento
forma di note o URL riportate letteralmente su media non HTML).&raquo; di lavoro per gli utenti per la loro comprensione. Potremmo essere in
</p> grado di aiutarvi a trovare una licenza esistente per software libero
che soddisfi le vostre esigenze.
</p>
<h3><a href="TOCLicenseList" <p>
id="LicenseList">Elenco di licenze per il software libero</a></h3> Nel caso ci&ograve; non sia possibile, se effettivamente avete bisogno
di una nuova licenza con il nostro aiuto potete assicuravi che la
vostra licenza sia effettivamente una licenza per software libero, ed
evitare vari problemi pratici.
</p>
</li>
</ul>
<ul> <h3>
<li> <a href="TOCWhatIsCopyleft" id="WhatIsCopyleft"
Elenco di licenze per il software libero >Cos'&egrave; il permesso d'autore (copyleft)?</a
>
</h3>
<p> Se state pensando di scrivere una nuova licenza, vi preghiamo di <p>
contattare la FSF scrivendo a <a Il <em>permesso d'autore</em> (<em>copyleft</em>) &egrave; un metodo
href="mailto:licensing@fsf.org">&lt;licensing@fsf.org&gt;</a>. Il generico per rendere un programma libero ed imporre che tutte le modifiche
proliferare di diverse licenze di software libero significa un aumento e versioni estese del programma siano anch'esse software libero.
di lavoro per gli utenti per la loro comprensione. Potremmo essere in </p>
grado di aiutarvi a trovare una licenza esistente per software libero
che soddisfi le vostre esigenze.
</p>
<p> <p>
Nel caso ci&ograve; non sia possibile, se effettivamente avete bisogno di una [NdT: si tratta di un gioco di parole, che qui viene reso con "permesso di
nuova licenza con il nostro aiuto potete assicuravi che la vostra autore": copyright (diritto di autore) &egrave; formato dalle parola
licenza sia effettivamente una licenza per software libero, ed evitare "copy" (copia) e "right" (diritto, ma anche destra), opposto di "left"
vari problemi pratici. (sinistra, ma anche lasciato).]
</p> </p>
</li> <p>
</ul> Il modo pi&ugrave; semplice per rendere un programma libero &egrave;
dichiararlo di dominio pubblico, privo di copyright. [NdT: in Italia
questo concetto a rigore non esiste, perch&eacute; l'autore non pu&ograve;
rinunciare alla paternit&agrave; dell'opera; effetti simili si possono
ottenere con l'uso di una licenza permissiva, come la licenza di X del
MIT]. Ci&ograve; permette a chiunque di condividere il programma e i suoi
miglioramenti. Tuttavia permette anche a chi non vuol cooperare di
convertire il programma in software proprietario. Costoro possono infatti
apportare modifiche, che siano significative o meno, e distribuire il
risultato come prodotto proprietario. Chi riceve il programma nella forma
modificata non ha la libert&agrave; data dall'autore originario;
l'intermediario l'avr&agrave; rimossa.
</p>
<h3><a href="TOCWhatIsCopyleft" <p>
id="WhatIsCopyleft">Cos'&egrave; il permesso d'autore (copyleft)?</a></h3> Nel Progetto GNU, la nostra intenzione &egrave; dare a <em>tutti</em> gli
utenti la libert&agrave; di ridistribuire e modificare software GNU. Se
l'intermediario potesse rimuoverne la libert&agrave;, potremmo avere molti
utenti, ma costoro non avrebbero libert&agrave;. Cos&igrave;, invece di
rilasciare il software GNU come dominio pubblico, utilizziamo il permesso
d'autore. Il permesso d'autore (copyleft) significa che chiunque
distribuisca il software, con o senza modifiche, deve accompagnarlo con la
libert&agrave; di ulteriori copie o modifiche. Il permesso d'autore
garantisce che ogni utente sia libero.
</p>
<p> <p>
Il <em>permesso d'autore</em> (<em>copyleft</em>) &egrave; un metodo generico Il permesso d'autore costituisce anche un incentivo per altri
per rendere un programma libero ed imporre che tutte le modifiche e programmatori ad incrementare il software libero. Alcuni programmi liberi
versioni estese del programma siano anch'esse software libero. importanti, come il compilatore GNU C++, esistono solo grazie a questo.
</p> </p>
<p> <p>
[NdT: si tratta di un gioco di parole, che qui viene reso con "permesso Il permesso d'autore aiuta anche i programmatori che desiderano
di autore": copyright (diritto di autore) &egrave; formato dalle parola "copy" contribuire con miglioramenti al software libero ad ottenerne il permesso.
(copia) e "right" (diritto, ma anche destra), opposto di "left" Questi programmatori spesso lavorano per aziende o universit&agrave; che
(sinistra, ma anche lasciato).] farebbero quasi qualunque cosa per avere pi&ugrave; denaro. Un
</p> programmatore potrebbe voler cedere le sue modifiche alla comunit&agrave;,
ma il suo superiore potrebbe volerne fare un prodotto software
proprietario.
</p>
<p> <p>
Il modo pi&ugrave; semplice per rendere un programma libero &egrave; dichiararlo di dominio Quando spieghiamo ai datori di lavoro che &egrave; illegale distribuire la
pubblico, privo di copyright. [NdT: in Italia questo concetto a versione migliorata se non come software libero, questi normalmente
rigore non esiste, perch&eacute; l'autore non pu&ograve; rinunciare alla paternit&agrave; decidono di rilasciarla come software libero piuttosto che buttarla via.
dell'opera; effetti simili si possono ottenere con l'uso di una licenza </p>
permissiva, come la licenza di X del MIT]. Ci&ograve; permette a chiunque di
condividere il programma e i suoi miglioramenti. Tuttavia permette anche
a chi non vuol cooperare di convertire il programma in software
proprietario. Costoro possono infatti apportare modifiche, che
siano significative o meno, e distribuire il risultato come prodotto
proprietario. Chi riceve il programma nella forma modificata non ha la
libert&agrave; data dall'autore originario; l'intermediario l'avr&agrave; rimossa.
</p>
<p> <p>
Nel Progetto GNU, la nostra Nel rendere un programma copyleft, per prima cosa mettiamo in chiaro che
intenzione &egrave; dare a <em>tutti</em> gli utenti la libert&agrave; di &egrave; soggetto a diritto d'autore; poi aggiungiamo le condizioni di
ridistribuire e modificare software GNU. Se l'intermediario potesse distribuzione, che sono uno strumento legale per dare a chiunque i diritti
rimuoverne la libert&agrave;, potremmo avere molti utenti, ma costoro non d'uso, di modifica e ridistribuzione del codice del programma
avrebbero libert&agrave;. Cos&igrave;, invece di rilasciare il software GNU come <em>ed ogni programma da esso derivato</em>, ma solo se si lasciano
dominio pubblico, utilizziamo il permesso d'autore. Il permesso invariati i termini di distribuzione. Cos&igrave;, il codice e le
d'autore (copyleft) significa che chiunque distribuisca il software, con libert&agrave; divengono legalmente inseparabili.
o senza modifiche, deve accompagnarlo con la libert&agrave; di ulteriori </p>
copie o modifiche. Il permesso d'autore garantisce che ogni utente sia
libero.
</p>
<p> <p>
Il permesso d'autore costituisce anche un incentivo per altri Gli sviluppatori di software proprietario utilizzano il diritto d'autore
programmatori ad incrementare il software libero. Alcuni programmi per togliere la libert&agrave; agli utenti. Noi lo utilizziamo per
liberi importanti, come il compilatore GNU C++, esistono solo grazie a garantire la loro libert&agrave;. Ecco perch&eacute; invertiamo il
questo. termine, trasformando "diritto d'autore" in "permesso d'autore"
</p> ("copyright" in "copyleft").
</p>
<p> <p>
Il permesso d'autore aiuta anche i programmatori che desiderano Il permesso d'autore &egrave; un concetto generale; ci sono molti modi di
contribuire con miglioramenti al software libero ad ottenerne il completare i dettagli. Nel Progetto GNU, le specifiche condizioni di
permesso. Questi programmatori spesso lavorano per aziende o universit&agrave; distribuzione che utilizziamo sono contenute nella Licenza Pubblica
che farebbero quasi qualunque cosa per avere pi&ugrave; denaro. Un Generica GNU, la Licenza Pubblica Generica Attenuata GNU e la Licenza per
programmatore potrebbe voler cedere le sue modifiche alla comunit&agrave;, ma Documentazione Libera GNU.
il suo superiore potrebbe volerne fare un prodotto software </p>
proprietario.
</p>
<p> <p>
Quando spieghiamo ai datori di lavoro che &egrave; illegale distribuire la La licenza appropriata &egrave; inclusa in molti manuali e in ogni
versione migliorata se non come software libero, questi normalmente distribuzione di codice sorgente GNU.
decidono di rilasciarla come software libero piuttosto che buttarla via. </p>
</p>
<p> <p>
Nel rendere un programma copyleft, per prima cosa mettiamo in chiaro che La GNU GPL &egrave; progettata perch&eacute; possiate applicarla
&egrave; soggetto a diritto d'autore; poi aggiungiamo le condizioni di facilmente ai vostri programmi se siete i titolari dei relativi diritti.
distribuzione, che sono uno strumento legale per dare a chiunque i Per far questo non dovete modificare la GNU GPL ma solo aggiungere nel
diritti d'uso, di modifica e ridistribuzione del codice del programma programma una nota che vi faccia riferimento. Vi preghiamo di tener
<em>ed ogni programma da esso derivato</em>, ma solo se si lasciano presente che se usate la GNU GPL dovete usare il testo integrale della
invariati i termini di distribuzione. Cos&igrave;, il codice e le libert&agrave; licenza. E' un tutto unico, versioni parziali non sono consentite (lo
divengono legalmente inseparabili. stesso vale per la LGPL e la FDL).
</p> </p>
<p> <p>
Gli sviluppatori di software proprietario utilizzano il diritto d'autore Usare gli stessi termini di distribuzione per molti programmi rende facile
per togliere la libert&agrave; agli utenti. Noi lo utilizziamo per garantire la copiare codice tra programmi diversi. Dato che tutti hanno gli stessi
loro libert&agrave;. Ecco perch&eacute; invertiamo il termine, trasformando "diritto termini di distribuzione, non c'&egrave; bisogno di preoccuparsi se i
d'autore" in "permesso d'autore" ("copyright" in "copyleft"). termini siano compatibili. La GPL Attenuata include una clausola che
</p> permette di trasformare i termini di distribuzione nella GPL ordinaria, in
modo che possiate copiare codice in un altro programma coperto dalla GPL.
</p>
<p> <h3>
Il permesso d'autore &egrave; un concetto generale; ci sono molti modi di <a href="TOCOtherWorks" id="OtherWorks"
completare i dettagli. Nel Progetto GNU, le specifiche condizioni di >Licenze per altri tipi di opere</a
distribuzione che utilizziamo sono contenute nella Licenza Pubblica >
Generica GNU, la Licenza Pubblica Generica Attenuata GNU e la Licenza </h3>
per Documentazione Libera GNU.
</p>
<p> <p>
La licenza appropriata &egrave; inclusa in molti manuali e in ogni Noi crediamo che il software e la documentazione che si pubblicano debbano
distribuzione di codice sorgente GNU. essere <a href="Intro">software libero e documentazione libera</a>.
</p> Consigliamo di rendere ugualmente libera ogni genere di opera educativa e
di riferimento, utilizzando licenze di documentazione libera come la
<a href="FDL">Licenza per Documentazione Libera GNU</a> (GNU FDL).
</p>
<p> <p>
La GNU GPL &egrave; progettata perch&eacute; possiate applicarla facilmente ai vostri Per saggi o pubblicazioni scientifiche, consigliamo la semplice licenza di
programmi se siete i titolari dei relativi diritti. Per far questo non "copia letterale" utilizzata ad esempio per questa pagina Web.
dovete modificare la GNU GPL ma solo aggiungere nel programma una nota </p>
che vi faccia riferimento. Vi preghiamo di tener presente che se usate
la GNU GPL dovete usare il testo integrale della licenza. E' un tutto
unico, versioni parziali non sono consentite (lo stesso vale per la LGPL
e la FDL).
</p>
<p> <p>
Usare gli stessi termini di distribuzione per molti programmi rende Non prendiamo posizione sull'idea che i lavori artistici o letterari
facile copiare codice tra programmi diversi. Dato che tutti hanno gli debbano essere liberi, ma se volete fare in modo che un vostro lavoro lo
stessi termini di distribuzione, non c'&egrave; bisogno di preoccuparsi se i sia vi consigliamo la
termini siano compatibili. La GPL Attenuata include una clausola che <a href="http://artlibre.org/licence/lalgb.html">Free Art License</a> (in
permette di trasformare i termini di distribuzione nella GPL ordinaria, inglese).
in modo che possiate copiare codice in un altro programma coperto dalla </p>
GPL.
</p>
<h3><a href="TOCOtherWorks" <p>
id="OtherWorks">Licenze per altri tipi di opere</a></h3> Copyright (C) 1996, 1997, 1998, 1999, 2003, 2004, 2005 Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
<p> <br />
Noi crediamo che il software e la documentazione che si pubblicano La copia letterale e la distribuzione di questo articolo nella sua
debbano essere <a href="Intro">software libero e integrit&agrave; sono permesse con qualsiasi mezzo gratuitamente a
documentazione libera</a>. Consigliamo di rendere ugualmente libera condizione che questa nota sia riprodotta.
ogni genere di opera educativa e di riferimento, utilizzando licenze di </p>
documentazione libera come la <a href="FDL">Licenza per </body>
Documentazione Libera GNU</a> (GNU FDL).
</p>
<p>
Per saggi o pubblicazioni scientifiche, consigliamo la semplice licenza
di "copia letterale" utilizzata ad esempio per questa pagina Web.</p>
<p>
Non prendiamo posizione sull'idea che i lavori artistici o letterari
debbano essere liberi, ma se volete fare in modo che un vostro lavoro
lo sia vi consigliamo la <a href="http://artlibre.org/licence/lalgb.html">Free
Art License</a> (in inglese).</p>
<p>
Copyright (C) 1996, 1997, 1998, 1999, 2003, 2004, 2005 Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110, USA
<br />
La copia letterale e la distribuzione di questo articolo nella sua
integrit&agrave; sono permesse con qualsiasi mezzo gratuitamente a
condizione che questa nota sia riprodotta.
</p>
</body>
</html> </html>

View File

@ -1,436 +1,433 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html> <html>
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>GNU 一般公衆利用許諾契約書 - GNU プロジェクト - フリーソフトウェア財団 (FSF)</title> <title>
</head> GNU 一般公衆利用許諾契約書 - GNU プロジェクト - フリーソフトウェア財団
<body> (FSF)
</title>
</head>
<body>
本訳は、<a href="http://www.opensource.jp/gpl/gpl.ja.html.euc-jp"
>http://www.opensource.jp/gpl/gpl.ja.html.euc-jp</a
>より転載している。
本訳は、<a href="http://www.opensource.jp/gpl/gpl.ja.html.euc-jp">http://www.opensource.jp/gpl/gpl.ja.html.euc-jp</a>より転載している。 <hr />
<hr> <h2>GNU 一般公衆利用許諾契約書</h2>
<h2>GNU 一般公衆利用許諾契約書</h2> <h3>もくじ</h3>
<ul>
<li>
<a href="#SEC1">GNU 一般公衆利用許諾契約書</a>
<ul>
<li><a href="#SEC2">はじめに</a></li>
<li><a href="#SEC3">複製、頒布、改変に関する条件と制約</a></li>
</ul>
</li>
</ul>
<h3>もくじ</h3> <hr />
<ul> <p></p>
<h3><a name="SEC1">GNU 一般公衆利用許諾契約書</a></h3>
<p>
バージョン 2、1991年6月<br />
日本語訳、2002年8月28日
</p>
<li><a href="#SEC1">GNU 一般公衆利用許諾契約書</a> <pre>
<ul>
<li><a href="#SEC2">はじめに</a></li>
<li><a href="#SEC3">複製、頒布、改変に関する条件と制約</a></li>
</ul>
</ul>
<hr>
<p>
<h3><a name="SEC1">GNU 一般公衆利用許諾契約書</a></h3>
<p>
バージョン 2、1991年6月<br>
日本語訳、2002年8月28日
</p>
<pre>
Copyright (C) 1989, 1991 Free Software Foundation, Inc. Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
この利用許諾契約書を、一字一句そのままに複製し頒布することは許可する。 この利用許諾契約書を、一字一句そのままに複製し頒布することは許可する。
しかし変更は認めない。 しかし変更は認めない。
</pre> </pre
>
<blockquote> <blockquote>
This is an unofficial translation of the GNU General Public License This is an unofficial translation of the GNU General Public License into
into Japanese. It was not published by the Free Software Foundation, Japanese. It was not published by the Free Software Foundation, and does
and does not legally state the distribution terms for software that not legally state the distribution terms for software that uses the GNU
uses the GNU GPL--only the original English text of the GNU GPL does GPL--only the original English text of the GNU GPL does that. However, we
that. However, we hope that this translation will help Japanese hope that this translation will help Japanese speakers understand the GNU
speakers understand the GNU GPL better. GPL better.
</blockquote> </blockquote>
<blockquote> <blockquote>
(訳: 以下はGNU General Public Licenseの非公式な日本語訳です。これはフ (訳: 以下はGNU General Public Licenseの非公式な日本語訳です。これはフ
リーソフトウェア財団(the Free Software Foundation)によって発表されたも リーソフトウェア財団(the Free Software Foundation)によって発表されたも
のではなく、GNU GPLを適用したソフトウェアの頒布条件を法的に有効な形で のではなく、GNU GPLを適用したソフトウェアの頒布条件を法的に有効な形で
述べたものではありません。頒布条件としてはGNU GPLの英語版テキストで指 述べたものではありません。頒布条件としてはGNU GPLの英語版テキストで指
定されているもののみが有効です。しかしながら、私たちはこの翻訳が、日本 定されているもののみが有効です。しかしながら、私たちはこの翻訳が、日本
語を使用する人々にとってGNU GPLをより良く理解する助けとなることを望ん 語を使用する人々にとってGNU GPLをより良く理解する助けとなることを望ん
でいます。) でいます。)
</blockquote> </blockquote>
<BLOCKQUOTE> <blockquote>
翻訳は 八田真行&lt;<A 翻訳は 八田真行&lt;<a href="mailto:mhatta@gnu.org">mhatta@gnu.org</a
HREF="mailto:mhatta@gnu.org">mhatta@gnu.org</A>&gt;が行った。原文は<A >&gt;が行った。原文は<a href="http://www.gnu.org/licenses/gpl.html"
HREF="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</A> >http://www.gnu.org/licenses/gpl.html</a
である。誤訳の指摘や改善案を歓迎する。 >
</BLOCKQUOTE> である。誤訳の指摘や改善案を歓迎する。
</blockquote>
<h3><a name="SEC2">はじめに</a></h3> <h3><a name="SEC2">はじめに</a></h3>
<p> <p>
ソフトウェア向けライセンスの大半は、あなたがそのソフトウェアを共有した ソフトウェア向けライセンスの大半は、あなたがそのソフトウェアを共有した
り変更したりする自由を奪うように設計されています。対照的に、GNU 一般公 り変更したりする自由を奪うように設計されています。対照的に、GNU 一般公
衆利用許諾契約書は、あなたがフリーソフトウェアを共有したり変更したりす 衆利用許諾契約書は、あなたがフリーソフトウェアを共有したり変更したりす
る自由を保証する--すなわち、ソフトウェアがそのユーザすべてにとってフリー る自由を保証する--すなわち、ソフトウェアがそのユーザすべてにとってフリー
であることを保証することを目的としています。この一般公衆利用許諾契約書 であることを保証することを目的としています。この一般公衆利用許諾契約書
はフリーソフトウェア財団のソフトウェアのほとんどに適用されており、また はフリーソフトウェア財団のソフトウェアのほとんどに適用されており、また GNU
GNU GPLを適用すると決めたフリーソフトウェア財団以外の作者によるプログ GPLを適用すると決めたフリーソフトウェア財団以外の作者によるプログ
ラムにも適用されています(いくつかのフリーソフトウェア財団のソフトウェ ラムにも適用されています(いくつかのフリーソフトウェア財団のソフトウェ
アには、GNU GPLではなくGNU ライブラリ一般公衆利用許諾契約書が適用され アには、GNU GPLではなくGNU ライブラリ一般公衆利用許諾契約書が適用され
ています)。あなたもまた、ご自分のプログラムにGNU GPLを適用することが可 ています)。あなたもまた、ご自分のプログラムにGNU GPLを適用することが可
能です。 能です。
</p>
<p>
私たちがフリーソフトウェアと言うとき、それは利用の自由について言及して
いるのであって、価格は問題にしていません。私たちの一般公衆利用許諾契約
書は、あなたがフリーソフトウェアの複製物を頒布する自由を保証するよう設
計されています(希望に応じてその種のサービスに手数料を課す自由も保証さ
れます)。また、あなたがソースコードを受け取るか、あるいは望めばそれを
入手することが可能であるということ、あなたがソフトウェアを変更し、その
一部を新たなフリーのプログラムで利用できるということ、そして、以上で述
べたようなことができるということがあなたに知らされるということも保証さ
れます。
</p>
<p>
あなたの権利を守るため、私たちは誰かがあなたの有するこれらの権利を否定
することや、これらの権利を放棄するよう要求することを禁止するという制限
を加える必要があります。よって、あなたがソフトウェアの複製物を頒布した
りそれを変更したりする場合には、そういった制限のためにあなたにある種の
責任が発生することになります。
</p>
<p>
例えば、あなたがフリーなプログラムの複製物を頒布する場合、有料か無料に
関わらず、あなたは自分が有する権利を全て受領者に与えなければなりません。
また、あなたは彼らもソースコードを受け取るか手に入れることができるよう
保証しなければなりません。そして、あなたは彼らに対して以下で述べる条件
を示し、彼らに自らの持つ権利について知らしめるようにしなければなりませ
ん。
</p>
<p>
私たちはあなたの権利を二段階の手順を踏んで保護します。(1) まずソフトウェ
アに対して著作権を主張し、そして (2) あなたに対して、ソフトウェアの複
製や頒布または改変についての法的な許可を与えるこの契約書を提示します。
</p>
<p>
また、各作者や私たちを保護するため、私たちはこのフリーソフトウェアには
何の保証も無いということを誰もが確実に理解するようにし、またソフトウェ
アが誰か他人によって改変され、それが次々と頒布されていったとしても、そ
の受領者は彼らが手に入れたソフトウェアがオリジナルのバージョンでは無い
こと、そして原作者の名声は他人によって持ち込まれた可能性のある問題によっ
て影響されることがないということを周知させたいと思います。
</p>
<p>
最後に、ソフトウェア特許がいかなるフリーのプログラムの存在にも不断の脅
威を投げかけていますが、私たちは、フリーなプログラムの再頒布者が個々に
特許ライセンスを取得することによって、事実上プログラムを独占的にしてし
まうという危険を避けたいと思います。こういった事態を予防するため、私た
ちはいかなる特許も誰もが自由に利用できるようライセンスされるか、全くラ
イセンスされないかのどちらかでなければならないことを明確にしました。
</p>
</p> <blockquote>
<p> (訳注: 本契約書で「独占的(proprietary)」とは、ソフトウェアの利用や再頒
私たちがフリーソフトウェアと言うとき、それは利用の自由について言及して 布、改変が禁止されているか、許可を得ることが必要とされているか、あるい
いるのであって、価格は問題にしていません。私たちの一般公衆利用許諾契約 は厳しい制限が課せられていて自由にそうすることが事実上できなくなってい
書は、あなたがフリーソフトウェアの複製物を頒布する自由を保証するよう設 る状態のことを指す。詳しくは<a
計されています(希望に応じてその種のサービスに手数料を課す自由も保証さ href="http://www.gnu.org/philosophy/categories.ja.html#ProprietarySoftware"
れます)。また、あなたがソースコードを受け取るか、あるいは望めばそれを >http://www.gnu.org/philosophy/categories.ja.html#ProprietarySoftware</a
入手することが可能であるということ、あなたがソフトウェアを変更し、その >
一部を新たなフリーのプログラムで利用できるということ、そして、以上で述 を参照せよ。)
べたようなことができるということがあなたに知らされるということも保証さ </blockquote>
れます。
</p> <p>複製や頒布、改変についての正確な条件と制約を以下で述べていきます。</p>
<p>
あなたの権利を守るため、私たちは誰かがあなたの有するこれらの権利を否定
することや、これらの権利を放棄するよう要求することを禁止するという制限
を加える必要があります。よって、あなたがソフトウェアの複製物を頒布した
りそれを変更したりする場合には、そういった制限のためにあなたにある種の
責任が発生することになります。
</p> <h3><a name="SEC3">複製、頒布、改変に関する条件と制約</a></h3>
<p>
例えば、あなたがフリーなプログラムの複製物を頒布する場合、有料か無料に
関わらず、あなたは自分が有する権利を全て受領者に与えなければなりません。
また、あなたは彼らもソースコードを受け取るか手に入れることができるよう
保証しなければなりません。そして、あなたは彼らに対して以下で述べる条件
を示し、彼らに自らの持つ権利について知らしめるようにしなければなりませ
ん。
</p> <p>
<p> <strong>0.</strong>
私たちはあなたの権利を二段階の手順を踏んで保護します。(1) まずソフトウェ この利用許諾契約書は、そのプログラム(またはその他の著作物)をこの一般公
アに対して著作権を主張し、そして (2) あなたに対して、ソフトウェアの複 衆利用許諾契約書の定める条件の下で頒布できる、という告知が著作権者によっ
製や頒布または改変についての法的な許可を与えるこの契約書を提示します。 て記載されたプログラムまたはその他の著作物全般に適用される。以下では、
「『プログラム』」とはそのようにしてこの契約書が適用されたプログラムや
著作物全般を意味し、また「『プログラム』を基にした著作物」とは『プログ
ラム』やその他著作権法の下で派生物と見なされるもの全般を指す。すなわち、
『プログラム』かその一部を、全く同一のままか、改変を加えたか、あるいは
他の言語に翻訳された形で含む著作物のことである(「改変」という語の本来
の意味からはずれるが、以下では翻訳も改変の一種と見なす)。それぞれの契
約者は「あなた」と表現される。
</p>
<p>
複製や頒布、改変以外の活動はこの契約書ではカバーされない。それらはこの
契約書の対象外である。『プログラム』を実行する行為自体に制限はない。ま
た、そのような『プログラム』の出力結果は、その内容が『プログラム』を基
にした著作物を構成する場合のみこの契約書によって保護される(『プログラ
ム』を実行したことによって作成されたということとは無関係である)。この
ような線引きの妥当性は、『プログラム』が何をするのかに依存する。
</p>
<p>
<strong>1.</strong>
それぞれの複製物において適切な著作権表示と保証の否認声明(disclaimer of
warranty)を目立つよう適切に掲載し、またこの契約書および一切の保証の不
在に触れた告知すべてをそのまま残し、そしてこの契約書の複製物を『プログ
ラム』のいかなる受領者にも『プログラム』と共に頒布する限り、あなたは
『プログラム』のソースコードの複製物を、あなたが受け取った通りの形で複
製または頒布することができる。媒体は問わない。
</p>
<p>
あなたは、物理的に複製物を譲渡するという行為に関して手数料を課しても良
いし、希望によっては手数料を取って交換における保護の保証を提供しても良
い。
</p>
<p>
<strong>2.</strong>
あなたは自分の『プログラム』の複製物かその一部を改変して『プログラム』
を基にした著作物を形成し、そのような改変点や著作物を上記第1節の定める
条件の下で複製または頒布することができる。ただし、そのためには以下の条
件すべてを満たしていなければならない:
</p>
<p></p>
<ul>
<li>
<strong>a)</strong>
あなたがそれらのファイルを変更したということと変更した日時が良く
分かるよう、改変されたファイルに告示しなければならない。
</p> <p></p>
<p> </li>
また、各作者や私たちを保護するため、私たちはこのフリーソフトウェアには <li>
何の保証も無いということを誰もが確実に理解するようにし、またソフトウェ <strong>b)</strong>
アが誰か他人によって改変され、それが次々と頒布されていったとしても、そ 『プログラム』またはその一部を含む著作物、あるいは『プログラム』
の受領者は彼らが手に入れたソフトウェアがオリジナルのバージョンでは無い かその一部から派生した著作物を頒布あるいは発表する場合には、その
こと、そして原作者の名声は他人によって持ち込まれた可能性のある問題によっ 全体をこの契約書の条件に従って第三者へ無償で利用許諾しなけれ
て影響されることがないということを周知させたいと思います。 ばならない
</p> <p></p>
<p> </li>
最後に、ソフトウェア特許がいかなるフリーのプログラムの存在にも不断の脅 <li>
威を投げかけていますが、私たちは、フリーなプログラムの再頒布者が個々に <strong>c)</strong>
特許ライセンスを取得することによって、事実上プログラムを独占的にしてし 改変されたプログラムが、通常実行する際に対話的にコマンドを読むよ
まうという危険を避けたいと思います。こういった事態を予防するため、私た うになっているならば、そのプログラムを最も一般的な方法で対話的に
ちはいかなる特許も誰もが自由に利用できるようライセンスされるか、全くラ 実行する際、適切な著作権表示、無保証であること(あるいはあなたが保
イセンスされないかのどちらかでなければならないことを明確にしました。 証を提供するということ)、ユーザがプログラムをこの契約書で述べた条
件の下で頒布することができるということ、そしてこの契約書の複製物
を閲覧するにはどうしたらよいかというユーザへの説明を含む告知が印
刷されるか、あるいは画面に表示されるようにしなければならない(例外
として、『プログラム』そのものは対話的であっても通常そのような告
知を印刷しない場合には、『プログラム』を基にしたあなたの著作物に
そのような告知を印刷させる必要はない)。
</li>
</ul>
</p> 以上の必要条件は全体としての改変された著作物に適用される。著作物の一部
が『プログラム』から派生したものではないと確認でき、それら自身別の独立
した著作物であると合理的に考えられるならば、あなたがそれらを別の著作物
として分けて頒布する場合、そういった部分にはこの契約書とその条件は適用
されない。しかし、あなたが同じ部分を『プログラム』を基にした著作物全体
の一部として頒布するならば、全体としての頒布物は、この契約書が課す条件
に従わなければならない。というのは、この契約書が他の契約者に与える許可
は『プログラム』丸ごと全体に及び、誰が書いたかは関係なく各部分のすべて
を保護するからである。
<p>
よって、すべてあなたによって書かれた著作物に対し、権利を主張したりあな
たの権利に異議を申し立てることはこの節の意図するところではない。むしろ、
その趣旨は『プログラム』を基にした派生物ないし集合著作物の頒布を管理す
る権利を行使するということにある。
</p>
<p>
また、『プログラム』を基にしていないその他の著作物を『プログラム』(あ
るいは『プログラム』を基にした著作物)と一緒に集めただけのものを一巻の
保管装置ないし頒布媒体に収めても、その他の著作物までこの契約書が保護す
る対象になるということにはならない。
</p>
<p>
<strong>3.</strong>
あなたは上記第1節および2節の条件に従い、『プログラム』(あるいは第2節に
おける派生物)をオブジェクトコードないし実行形式で複製または頒布するこ
とができる。ただし、その場合あなたは以下のうちどれか一つを実施しなけれ
ばならない:
<blockquote> <!-- we use this doubled UL to get the sub-sections indented, -->
(訳注: 本契約書で「独占的(proprietary)」とは、ソフトウェアの利用や再頒 <!-- while making the bullets as unobvious as possible. -->
布、改変が禁止されているか、許可を得ることが必要とされているか、あるい </p>
は厳しい制限が課せられていて自由にそうすることが事実上できなくなってい <ul>
る状態のことを指す。詳しくは<a href="http://www.gnu.org/philosophy/categories.ja.html#ProprietarySoftware">http://www.gnu.org/philosophy/categories.ja.html#ProprietarySoftware</a> <li>
を参照せよ。) <strong>a)</strong>
</blockquote> 著作物に、『プログラム』に対応した完全かつ機械で読み取り可能なソー
スコードを添付する。ただし、ソースコードは上記第1節および2節の条
件に従いソフトウェアの交換で習慣的に使われる媒体で頒布しなければ
ならない。あるいは、
<p></p>
</li>
<li>
<strong>b)</strong>
著作物に、いかなる第三者に対しても、『プログラム』に対応した完全
かつ機械で読み取り可能なソースコードを、頒布に要する物理的コスト
を上回らない程度の手数料と引き換えに提供する旨述べた少なくとも3年
間は有効な書面になった申し出を添える。ただし、ソースコードは上記
第1節および2節の条件に従いソフトウェアの交換で習慣的に使われる媒
体で頒布しなければならない。あるいは、
<p></p>
</li>
<li>
<strong>c)</strong>
対応するソースコード頒布の申し出に際して、あなたが得た情報を一緒
に引き渡す(この選択肢は、営利を目的としない頒布であって、かつあな
たが上記小節bで指定されているような申し出と共にオブジェクトコード
あるいは実行形式のプログラムしか入手していない場合に限り許可され る)。
</li>
</ul>
<p> 著作物のソースコードとは、それに対して改変を加える上で好ましいとされる
複製や頒布、改変についての正確な条件と制約を以下で述べていきます。 著作物の形式を意味する。ある実行形式の著作物にとって完全なソースコード
とは、それが含むモジュールすべてのソースコード全部に加え、関連するイン
ターフェース定義ファイルのすべてとライブラリのコンパイルやインストール
を制御するために使われるスクリプトをも加えたものを意味する。しかし特別
な例外として、そのコンポーネント自体が実行形式に付随するのでは無い限り、
頒布されるものの中に、実行形式が実行されるオペレーティングシステムの主
要なコンポーネント(コンパイラやカーネル等)と通常一緒に(ソースかバイナ
リ形式のどちらかで)頒布されるものを含んでいる必要はないとする。
<p>
実行形式またはオブジェクトコードの頒布が、指定された場所からコピーする
ためのアクセス手段を提供することで為されるとして、その上でソースコード
も同等のアクセス手段によって同じ場所からコピーできるようになっているな
らば、第三者がオブジェクトコードと一緒にソースも強制的にコピーさせられ
るようになっていなくてもソースコード頒布の条件を満たしているものとする。
</p>
<p>
<strong>4.</strong>
あなたは『プログラム』を、この契約書において明確に提示された行為を除き
複製や改変、サブライセンス、あるいは頒布してはならない。他に『プログラ
ム』を複製や改変、サブライセンス、あるいは頒布する企てはすべて無効であ
り、この契約書の下でのあなたの権利を自動的に終結させることになろう。し
かし、複製物や権利をこの契約書に従ってあなたから得た人々に関しては、そ
のような人々がこの契約書に完全に従っている限り彼らのライセンスまで終結
することはない。
</p>
<p>
<strong>5.</strong>
あなたはこの契約書を受諾する必要は無い。というのは、あなたはこれに署名
していないからである。しかし、この契約書以外にあなたに対して『プログラ
ム』やその派生物を改変または頒布する許可を与えるものは存在しない。これ
らの行為は、あなたがこの契約書を受け入れない限り法によって禁じられてい
る。そこで、『プログラム』(あるいは『プログラム』を基にした著作物全般)
を改変ないし頒布することにより、あなたは自分がそのような行為を行うため
にこの契約書を受諾したということ、そして『プログラム』とそれに基づく著
作物の複製や頒布、改変についてこの契約書が課す制約と条件をすべて受け入
れたということを示したものと見なす。
</p>
<p>
<strong>6.</strong>
あなたが『プログラム』(または『プログラム』を基にした著作物全般)を再頒
布するたびに、その受領者は元々のライセンス許可者から、この契約書で指定
された条件と制約の下で『プログラム』を複製や頒布、あるいは改変する許可
を自動的に得るものとする。あなたは、受領者がここで認められた権利を行使
することに関してこれ以上他のいかなる制限も課してはならない。あなたには、
第三者がこの契約書に従うことを強制する責任はない。
</p>
<p>
<strong>7.</strong>
特許侵害あるいはその他の理由(特許関係に限らない)から、裁判所の判決ある
いは申し立ての結果としてあなたに(裁判所命令や契約などにより)このライセ
ンスの条件と矛盾する制約が課された場合でも、あなたがこの契約書の条
件を免除されるわけではない。もしこの契約書の下であなたに課せられた
責任と他の関連する責任を同時に満たすような形で頒布できないならば、結果
としてあなたは『プログラム』を頒布することが全くできないということであ
る。例えば特許ライセンスが、あなたから直接間接を問わずコピーを受け取っ
た人が誰でも『プログラム』を使用料無料で再頒布することを認めていない場
合、あなたがその制約とこの契約書を両方とも満たすには『プログラム』
の頒布を完全に中止するしかないだろう。
</p>
<p>
この節の一部分が特定の状況の下で無効ないし実施不可能な場合でも、節の残
りの部分は適用されるよう意図されている。その他の状況では節が全体として
適用されるよう意図されている。
</p>
<p>
特許やその他の財産権を侵害したり、そのような権利の主張の効力に異議を唱
えたりするようあなたを誘惑することがこの節の目的ではない。この節には、
人々によってライセンス慣行として実現されてきた、フリーソフトウェア頒布
のシステムの完全性を護るという目的しかない。多くの人々が、フリーソフト
ウェアの頒布システムが首尾一貫して適用されているという信頼に基づき、こ
のシステムを通じて頒布される多様なソフトウェアに寛大な貢献をしてきたの
は事実であるが、人がどのようなシステムを通じてソフトウェアを頒布したい
と思うかはあくまでも作者/寄与者次第であり、あなたが選択を押しつけるこ
とはできない。
</p>
<p>
この節は、この契約書のこの節以外の部分の一帰結になると考えられるケー
スを徹底的に明らかにすることを目的としている。
</p>
<p>
<strong>8.</strong>
『プログラム』の頒布や利用が、ある国においては特許または著作権が主張さ
れたインターフェースのいずれかによって制限されている場合、『プログラム』
にこの契約書を適用した元の著作権者は、そういった国々を排除した明確
な地理的頒布制限を加え、そこで排除されていない国の中やそれらの国々の間
でのみ頒布が許可されるようにしても構わない。その場合、そのような制限は
この契約書本文で書かれているのと同様に見なされる。
</p>
<p>
<strong>9.</strong>
フリーソフトウェア財団は、時によって改訂または新版の一般公衆利用許諾書
を発表することができる。そのような新版は現在のバージョンとその精神にお
いては似たものになるだろうが、新たな問題や懸念を解決するため細部では異
なる可能性がある。
</p>
<p>
それぞれのバージョンには、見分けが付くようにバージョン番号が振られてい
る。『プログラム』においてそれに適用されるこの契約書のバージョン番号が
指定されていて、更に「それ以降のいかなるバージョン(any later version)」
も適用して良いとなっていた場合、あなたは従う条件と制約として、指定のバー
ジョンか、フリーソフトウェア財団によって発行された指定のバージョン以降
の版のどれか一つのどちらかを選ぶことが出来る。『プログラム』でライセン
スのバージョン番号が指定されていないならば、あなたは今までにフリーソフ
トウェア財団から発行されたバージョンの中から好きに選んで構わない。
</p>
<p>
<strong>10.</strong>
もしあなたが『プログラム』の一部を、その頒布条件がこの契約書と異なる他
のフリーなプログラムと統合したいならば、作者に連絡して許可を求めよ。フ
リーソフトウェア財団が著作権を保有するソフトウェアについては、フリーソ
フトウェア財団に連絡せよ。私たちは、このような場合のために特別な例外を
設けることもある。私たちが決定を下すにあたっては、私たちのフリーソフト
ウェアの派生物すべてがフリーな状態に保たれるということと、一般的にソフ
トウェアの共有と再利用を促進するという二つの目標を規準に検討されるであ
ろう。
</p>
<p><strong>無保証について</strong></p>
</p> <p>
<strong>11.</strong>
<strong>
『プログラム』は代価無しに利用が許可されるので、適切な法が認める限りに
おいて、『プログラム』に関するいかなる保証も存在しない。書面で別に述べ
る場合を除いて、著作権者、またはその他の団体は、『プログラム』を、表明
されたか言外にかは問わず、商業的適性を保証するほのめかしやある特定の目
的への適合性(に限られない)を含む一切の保証無しに「あるがまま」で提供す
る。『プログラム』の質と性能に関するリスクのすべてはあなたに帰属する。
『プログラム』に欠陥があると判明した場合、あなたは必要な保守点検や補修、
修正に要するコストのすべてを引き受けることになる。
</strong>
</p>
<p>
<strong>12.</strong>
<strong>
適切な法か書面での同意によって命ぜられない限り、著作権者、または上記で
許可されている通りに『プログラム』を改変または再頒布したその他の団体は、
あなたに対して『プログラム』の利用ないし利用不能で生じた通常損害や特別
損害、偶発損害、間接損害(データの消失や不正確な処理、あなたか第三者が
被った損失、あるいは『プログラム』が他のソフトウェアと一緒に動作しない
という不具合などを含むがそれらに限らない)に一切の責任を負わない。その
ような損害が生ずる可能性について彼らが忠告されていたとしても同様である。
</strong>
</p>
<h3>条件と制約終わり</h3>
<h3><a name="SEC3">複製、頒布、改変に関する条件と制約</a></h3> </body>
</html>
<p>
<strong>0.</strong>
この利用許諾契約書は、そのプログラム(またはその他の著作物)をこの一般公
衆利用許諾契約書の定める条件の下で頒布できる、という告知が著作権者によっ
て記載されたプログラムまたはその他の著作物全般に適用される。以下では、
「『プログラム』」とはそのようにしてこの契約書が適用されたプログラムや
著作物全般を意味し、また「『プログラム』を基にした著作物」とは『プログ
ラム』やその他著作権法の下で派生物と見なされるもの全般を指す。すなわち、
『プログラム』かその一部を、全く同一のままか、改変を加えたか、あるいは
他の言語に翻訳された形で含む著作物のことである(「改変」という語の本来
の意味からはずれるが、以下では翻訳も改変の一種と見なす)。それぞれの契
約者は「あなた」と表現される。
</p><p>
複製や頒布、改変以外の活動はこの契約書ではカバーされない。それらはこの
契約書の対象外である。『プログラム』を実行する行為自体に制限はない。ま
た、そのような『プログラム』の出力結果は、その内容が『プログラム』を基
にした著作物を構成する場合のみこの契約書によって保護される(『プログラ
ム』を実行したことによって作成されたということとは無関係である)。この
ような線引きの妥当性は、『プログラム』が何をするのかに依存する。
</p><p>
<strong>1.</strong>
それぞれの複製物において適切な著作権表示と保証の否認声明(disclaimer of
warranty)を目立つよう適切に掲載し、またこの契約書および一切の保証の不
在に触れた告知すべてをそのまま残し、そしてこの契約書の複製物を『プログ
ラム』のいかなる受領者にも『プログラム』と共に頒布する限り、あなたは
『プログラム』のソースコードの複製物を、あなたが受け取った通りの形で複
製または頒布することができる。媒体は問わない。
</p><p>
あなたは、物理的に複製物を譲渡するという行為に関して手数料を課しても良
いし、希望によっては手数料を取って交換における保護の保証を提供しても良
い。
</p><p>
<strong>2.</strong>
あなたは自分の『プログラム』の複製物かその一部を改変して『プログラム』
を基にした著作物を形成し、そのような改変点や著作物を上記第1節の定める
条件の下で複製または頒布することができる。ただし、そのためには以下の条
件すべてを満たしていなければならない:
</p><p>
</p><ul>
<li><strong>a)</strong>
あなたがそれらのファイルを変更したということと変更した日時が良く
分かるよう、改変されたファイルに告示しなければならない。
<p>
</p></li><li><strong>b)</strong>
『プログラム』またはその一部を含む著作物、あるいは『プログラム』
かその一部から派生した著作物を頒布あるいは発表する場合には、その
全体をこの契約書の条件に従って第三者へ無償で利用許諾しなけれ
ばならない。
<p>
</p></li><li><strong>c)</strong>
改変されたプログラムが、通常実行する際に対話的にコマンドを読むよ
うになっているならば、そのプログラムを最も一般的な方法で対話的に
実行する際、適切な著作権表示、無保証であること(あるいはあなたが保
証を提供するということ)、ユーザがプログラムをこの契約書で述べた条
件の下で頒布することができるということ、そしてこの契約書の複製物
を閲覧するにはどうしたらよいかというユーザへの説明を含む告知が印
刷されるか、あるいは画面に表示されるようにしなければならない(例外
として、『プログラム』そのものは対話的であっても通常そのような告
知を印刷しない場合には、『プログラム』を基にしたあなたの著作物に
そのような告知を印刷させる必要はない)。
</li></ul>
以上の必要条件は全体としての改変された著作物に適用される。著作物の一部
が『プログラム』から派生したものではないと確認でき、それら自身別の独立
した著作物であると合理的に考えられるならば、あなたがそれらを別の著作物
として分けて頒布する場合、そういった部分にはこの契約書とその条件は適用
されない。しかし、あなたが同じ部分を『プログラム』を基にした著作物全体
の一部として頒布するならば、全体としての頒布物は、この契約書が課す条件
に従わなければならない。というのは、この契約書が他の契約者に与える許可
は『プログラム』丸ごと全体に及び、誰が書いたかは関係なく各部分のすべて
を保護するからである。
<p>
よって、すべてあなたによって書かれた著作物に対し、権利を主張したりあな
たの権利に異議を申し立てることはこの節の意図するところではない。むしろ、
その趣旨は『プログラム』を基にした派生物ないし集合著作物の頒布を管理す
る権利を行使するということにある。
</p><p>
また、『プログラム』を基にしていないその他の著作物を『プログラム』(あ
るいは『プログラム』を基にした著作物)と一緒に集めただけのものを一巻の
保管装置ないし頒布媒体に収めても、その他の著作物までこの契約書が保護す
る対象になるということにはならない。
</p><p>
<strong>3.</strong>
あなたは上記第1節および2節の条件に従い、『プログラム』(あるいは第2節に
おける派生物)をオブジェクトコードないし実行形式で複製または頒布するこ
とができる。ただし、その場合あなたは以下のうちどれか一つを実施しなけれ
ばならない:
<!-- we use this doubled UL to get the sub-sections indented, -->
<!-- while making the bullets as unobvious as possible. -->
</p><ul>
<li><strong>a)</strong>
著作物に、『プログラム』に対応した完全かつ機械で読み取り可能なソー
スコードを添付する。ただし、ソースコードは上記第1節および2節の条
件に従いソフトウェアの交換で習慣的に使われる媒体で頒布しなければ
ならない。あるいは、
<p>
</p></li><li><strong>b)</strong>
著作物に、いかなる第三者に対しても、『プログラム』に対応した完全
かつ機械で読み取り可能なソースコードを、頒布に要する物理的コスト
を上回らない程度の手数料と引き換えに提供する旨述べた少なくとも3年
間は有効な書面になった申し出を添える。ただし、ソースコードは上記
第1節および2節の条件に従いソフトウェアの交換で習慣的に使われる媒
体で頒布しなければならない。あるいは、
<p>
</p></li><li><strong>c)</strong>
対応するソースコード頒布の申し出に際して、あなたが得た情報を一緒
に引き渡す(この選択肢は、営利を目的としない頒布であって、かつあな
たが上記小節bで指定されているような申し出と共にオブジェクトコード
あるいは実行形式のプログラムしか入手していない場合に限り許可され
る)。
</li></ul>
著作物のソースコードとは、それに対して改変を加える上で好ましいとされる
著作物の形式を意味する。ある実行形式の著作物にとって完全なソースコード
とは、それが含むモジュールすべてのソースコード全部に加え、関連するイン
ターフェース定義ファイルのすべてとライブラリのコンパイルやインストール
を制御するために使われるスクリプトをも加えたものを意味する。しかし特別
な例外として、そのコンポーネント自体が実行形式に付随するのでは無い限り、
頒布されるものの中に、実行形式が実行されるオペレーティングシステムの主
要なコンポーネント(コンパイラやカーネル等)と通常一緒に(ソースかバイナ
リ形式のどちらかで)頒布されるものを含んでいる必要はないとする。
<p>
実行形式またはオブジェクトコードの頒布が、指定された場所からコピーする
ためのアクセス手段を提供することで為されるとして、その上でソースコード
も同等のアクセス手段によって同じ場所からコピーできるようになっているな
らば、第三者がオブジェクトコードと一緒にソースも強制的にコピーさせられ
るようになっていなくてもソースコード頒布の条件を満たしているものとする。
</p><p>
<strong>4.</strong>
あなたは『プログラム』を、この契約書において明確に提示された行為を除き
複製や改変、サブライセンス、あるいは頒布してはならない。他に『プログラ
ム』を複製や改変、サブライセンス、あるいは頒布する企てはすべて無効であ
り、この契約書の下でのあなたの権利を自動的に終結させることになろう。し
かし、複製物や権利をこの契約書に従ってあなたから得た人々に関しては、そ
のような人々がこの契約書に完全に従っている限り彼らのライセンスまで終結
することはない。
</p><p>
<strong>5.</strong>
あなたはこの契約書を受諾する必要は無い。というのは、あなたはこれに署名
していないからである。しかし、この契約書以外にあなたに対して『プログラ
ム』やその派生物を改変または頒布する許可を与えるものは存在しない。これ
らの行為は、あなたがこの契約書を受け入れない限り法によって禁じられてい
る。そこで、『プログラム』(あるいは『プログラム』を基にした著作物全般)
を改変ないし頒布することにより、あなたは自分がそのような行為を行うため
にこの契約書を受諾したということ、そして『プログラム』とそれに基づく著
作物の複製や頒布、改変についてこの契約書が課す制約と条件をすべて受け入
れたということを示したものと見なす。
</p><p>
<strong>6.</strong>
あなたが『プログラム』(または『プログラム』を基にした著作物全般)を再頒
布するたびに、その受領者は元々のライセンス許可者から、この契約書で指定
された条件と制約の下で『プログラム』を複製や頒布、あるいは改変する許可
を自動的に得るものとする。あなたは、受領者がここで認められた権利を行使
することに関してこれ以上他のいかなる制限も課してはならない。あなたには、
第三者がこの契約書に従うことを強制する責任はない。
</p><p>
<strong>7.</strong>
特許侵害あるいはその他の理由(特許関係に限らない)から、裁判所の判決ある
いは申し立ての結果としてあなたに(裁判所命令や契約などにより)このライセ
ンスの条件と矛盾する制約が課された場合でも、あなたがこの契約書の条
件を免除されるわけではない。もしこの契約書の下であなたに課せられた
責任と他の関連する責任を同時に満たすような形で頒布できないならば、結果
としてあなたは『プログラム』を頒布することが全くできないということであ
る。例えば特許ライセンスが、あなたから直接間接を問わずコピーを受け取っ
た人が誰でも『プログラム』を使用料無料で再頒布することを認めていない場
合、あなたがその制約とこの契約書を両方とも満たすには『プログラム』
の頒布を完全に中止するしかないだろう。
</p><p>
この節の一部分が特定の状況の下で無効ないし実施不可能な場合でも、節の残
りの部分は適用されるよう意図されている。その他の状況では節が全体として
適用されるよう意図されている。
</p><p>
特許やその他の財産権を侵害したり、そのような権利の主張の効力に異議を唱
えたりするようあなたを誘惑することがこの節の目的ではない。この節には、
人々によってライセンス慣行として実現されてきた、フリーソフトウェア頒布
のシステムの完全性を護るという目的しかない。多くの人々が、フリーソフト
ウェアの頒布システムが首尾一貫して適用されているという信頼に基づき、こ
のシステムを通じて頒布される多様なソフトウェアに寛大な貢献をしてきたの
は事実であるが、人がどのようなシステムを通じてソフトウェアを頒布したい
と思うかはあくまでも作者/寄与者次第であり、あなたが選択を押しつけるこ
とはできない。
</p><p>
この節は、この契約書のこの節以外の部分の一帰結になると考えられるケー
スを徹底的に明らかにすることを目的としている。
</p><p>
<strong>8.</strong>
『プログラム』の頒布や利用が、ある国においては特許または著作権が主張さ
れたインターフェースのいずれかによって制限されている場合、『プログラム』
にこの契約書を適用した元の著作権者は、そういった国々を排除した明確
な地理的頒布制限を加え、そこで排除されていない国の中やそれらの国々の間
でのみ頒布が許可されるようにしても構わない。その場合、そのような制限は
この契約書本文で書かれているのと同様に見なされる。
</p><p>
<strong>9.</strong>
フリーソフトウェア財団は、時によって改訂または新版の一般公衆利用許諾書
を発表することができる。そのような新版は現在のバージョンとその精神にお
いては似たものになるだろうが、新たな問題や懸念を解決するため細部では異
なる可能性がある。
</p><p>
それぞれのバージョンには、見分けが付くようにバージョン番号が振られてい
る。『プログラム』においてそれに適用されるこの契約書のバージョン番号が
指定されていて、更に「それ以降のいかなるバージョン(any later version)」
も適用して良いとなっていた場合、あなたは従う条件と制約として、指定のバー
ジョンか、フリーソフトウェア財団によって発行された指定のバージョン以降
の版のどれか一つのどちらかを選ぶことが出来る。『プログラム』でライセン
スのバージョン番号が指定されていないならば、あなたは今までにフリーソフ
トウェア財団から発行されたバージョンの中から好きに選んで構わない。
</p><p>
<strong>10.</strong>
もしあなたが『プログラム』の一部を、その頒布条件がこの契約書と異なる他
のフリーなプログラムと統合したいならば、作者に連絡して許可を求めよ。フ
リーソフトウェア財団が著作権を保有するソフトウェアについては、フリーソ
フトウェア財団に連絡せよ。私たちは、このような場合のために特別な例外を
設けることもある。私たちが決定を下すにあたっては、私たちのフリーソフト
ウェアの派生物すべてがフリーな状態に保たれるということと、一般的にソフ
トウェアの共有と再利用を促進するという二つの目標を規準に検討されるであ
ろう。
</p><p><strong>無保証について</strong></p>
<p>
<strong>11.</strong>
<strong>
『プログラム』は代価無しに利用が許可されるので、適切な法が認める限りに
おいて、『プログラム』に関するいかなる保証も存在しない。書面で別に述べ
る場合を除いて、著作権者、またはその他の団体は、『プログラム』を、表明
されたか言外にかは問わず、商業的適性を保証するほのめかしやある特定の目
的への適合性(に限られない)を含む一切の保証無しに「あるがまま」で提供す
る。『プログラム』の質と性能に関するリスクのすべてはあなたに帰属する。
『プログラム』に欠陥があると判明した場合、あなたは必要な保守点検や補修、
修正に要するコストのすべてを引き受けることになる。
</strong>
</p><p>
<strong>12.</strong>
<strong>
適切な法か書面での同意によって命ぜられない限り、著作権者、または上記で
許可されている通りに『プログラム』を改変または再頒布したその他の団体は、
あなたに対して『プログラム』の利用ないし利用不能で生じた通常損害や特別
損害、偶発損害、間接損害(データの消失や不正確な処理、あなたか第三者が
被った損失、あるいは『プログラム』が他のソフトウェアと一緒に動作しない
という不具合などを含むがそれらに限らない)に一切の責任を負わない。その
ような損害が生ずる可能性について彼らが忠告されていたとしても同様である。
</strong>
</p>
<h3>条件と制約終わり</h3>
</body></html>

View File

@ -1,424 +1,457 @@
<html> <html>
<head> <head>
<title>Licen<EFBFBD>a P&uacute;blica Geral GNU</title> <title>Licen<EFBFBD>a P&uacute;blica Geral GNU</title>
</head> </head>
<body> <body>
<h3>LICEN<EFBFBD>A P<>BLICA GERAL GNU</h3>
<h3>LICEN<EFBFBD>A P<>BLICA GERAL GNU</h3> <p>Vers<EFBFBD>o 2, junho de 1991</p>
<p>Vers<EFBFBD>o 2, junho de 1991</p> <p>
<p> This is an unofficial translation of the GNU General Public License into
This is an unofficial translation of the GNU General Public License Brazilian Portuguese. It was not published by the Free Software
into Brazilian Portuguese. It was not published by the Free Software Foundation, and does not legally state the distribution terms for software
Foundation, and does not legally state the distribution terms for that uses the GNU GPL -- only the original English text of the GNU GPL
software that uses the GNU GPL -- only the original English text of does that. However, we hope that this translation will help Brazilian
the GNU GPL does that. However, we hope that this translation will Portuguese speakers understand the GNU GPL better.
help Brazilian Portuguese speakers understand the GNU GPL better. </p>
</p> <p>
<p> Esta <20> uma tradu<64><75>o n<>o-oficial da Licen<65>a P<>blica Geral GNU ("GPL GNU")
Esta <20> uma tradu<64><75>o n<>o-oficial da Licen<65>a P<>blica Geral GNU ("GPL para o portugu<67>s do Brasil. Ela n<>o foi publicada pela Free Software
GNU") para o portugu<67>s do Brasil. Ela n<>o foi publicada pela Free Foundation, e legalmente n<>o afirma os termos de distribui<75><69>o de software
Software Foundation, e legalmente n<>o afirma os termos de distribui<75><69>o que utiliza a GPL GNU -- apenas o texto original da GPL GNU, em ingl<67>s,
de software que utiliza a GPL GNU -- apenas o texto original da GPL faz isso. Contudo, esperamos que esta tradu<64><75>o ajude aos que utilizam o
GNU, em ingl<67>s, faz isso. Contudo, esperamos que esta tradu<64><75>o ajude portugu<67>s do Brasil a entender melhor a GPL GNU.
aos que utilizam o portugu<67>s do Brasil a entender melhor a GPL GNU. </p>
</p> <p>
<p>Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA</p> Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave,
<p> Cambridge, MA 02139, USA
A qualquer pessoa <20> permitido copiar e distribuir c<>pias desse </p>
documento de licen<65>a, desde que sem qualquer altera<72><61>o. <p>
</p> A qualquer pessoa <20> permitido copiar e distribuir c<>pias desse documento
de licen<65>a, desde que sem qualquer altera<72><61>o.
<h3>Introdu<EFBFBD><EFBFBD>o</h3> </p>
<p>As licen<65>as de muitos software s<>o desenvolvidas para restringir sua
liberdade de compartilh<6C>-lo e mud<75>-lo. Contr<74>ria a isso, a Licen<65>a
P<EFBFBD>blica Geral GNU pretende garantir sua liberdade de compartilhar e
alterar software livres -- garantindo que o software ser<65> livre e
gratuito para os seus usu<73>rios. Esta Licen<65>a P<>blica Geral aplica-se <20>
maioria dos software da Free Software Foundation e a qualquer outro
programa cujo autor decida aplic<69>-la. (Alguns outros software da FSF
s<EFBFBD>o cobertos pela Licen<65>a P<>blica Geral de Bibliotecas, no entanto.)
Voc<EFBFBD> pode aplic<69>-la tamb<6D>m aos seus programas.</p>
<p>Quando nos referimos a software livre, estamos nos referindo a
liberdade e n<>o a pre<72>o. Nossa Licen<65>a P<>blica Geral foi desenvolvida
para garantir que voc<6F> tenha a liberdade de distribuir c<>pias de
software livre (e cobrar por isso, se quiser); que voc<6F> receba o
c<EFBFBD>digo-fonte ou tenha acesso a ele, se quiser; que voc<6F> possa mudar o
software ou utilizar partes dele em novos programas livres e
gratuitos; e que voc<6F> saiba que pode fazer tudo isso.</p>
<p>Para proteger seus direitos, precisamos fazer restri<72><69>es que impe<70>am
a qualquer um negar estes direitos ou solicitar que voc<6F> deles
abdique. Estas restri<72><69>es traduzem-se em certas responsabilidades para
voc<EFBFBD>, se voc<6F> for distribuir c<>pias do software ou modific<69>-lo.</p>
<p>Por exemplo, se voc<6F> distribuir c<>pias de um programa, gratuitamente
ou por alguma quantia, voc<6F> tem que fornecer aos recebedores todos os
direitos que voc<6F> possui. Voc<6F> tem que garantir que eles tamb<6D>m
recebam ou possam obter o c<>digo-fonte. E voc<6F> tem que mostrar-lhes
estes termos para que eles possam conhecer seus direitos.</p>
<p>N<EFBFBD>s protegemos seus direitos em dois passos: (1) com copyright do
software e (2) com a oferta desta licen<65>a, que lhe d<> permiss<73>o legal
para copiar, distribuir e/ou modificar o software.</p>
<p>Al<EFBFBD>m disso, tanto para a prote<74><65>o do autor quanto a nossa,
gostar<EFBFBD>amos de certificar-nos que todos entendam que n<>o h<> qualquer
garantia nestes software livres. Se o software <20> modificado por algu<67>m
mais e passado adiante, queremos que seus recebedores saibam que o que
eles obtiveram n<>o <20> original, de forma que qualquer problema
introduzido por terceiros n<>o interfira na reputa<74><61>o do autor
original.</p>
<p>Finalmente, qualquer programa <20> amea<65>ado constantemente por patentes
de software. Queremos evitar o perigo de que distribuidores de
software livre obtenham patentes individuais, o que tem o efeito de
tornar o programa propriet<65>rio. Para prevenir isso, deixamos claro que
qualquer patente tem que ser licenciada para uso livre e gratuito por
qualquer pessoa, ou ent<6E>o que nem necessite ser licenciada.
</p>
<p>Os termos e condi<64><69>es precisas para c<>pia, distribui<75><69>o e
modifica<EFBFBD><EFBFBD>o se encontram abaixo:</p>
<h3>LICEN<EFBFBD>A P<>BLICA GERAL GNU TERMOS E CONDI<44><49>ES PARA C<>PIA, DISTRIBUI<55><49>O E MODIFICA<43><41>O</h3>
<p>
<strong>0.</strong>Esta licen<65>a se aplica a qualquer programa ou outro trabalho que
contenha um aviso colocado pelo detentor dos direitos autorais
informando que aquele pode ser distribu<62>do sob as condi<64><69>es desta
Licen<EFBFBD>a P<>blica Geral. O "Programa" abaixo refere-se a qualquer
programa ou trabalho, e "trabalho baseado no Programa" significa tanto
o Programa em si como quaisquer trabalhos derivados, de acordo com a
lei de direitos autorais: isto quer dizer um trabalho que contenha o
Programa ou parte dele, tanto originalmente ou com modifica<63><61>es, e/ou
tradu<EFBFBD><EFBFBD>o para outros idiomas. (Doravante o processo de tradu<64><75>o est<73>
inclu<EFBFBD>do sem limites no termo "modifica<63><61>o".) Cada licenciado <20>
mencionado como "voc<6F>".</p>
<p>
Atividades outras que a c<>pia, a distribui<75><69>o e modifica<63><61>o n<>o est<73>o
cobertas por esta Licen<65>a; elas est<73>o fora de seu escopo. O ato de
executar o Programa n<>o <20> restringido e o resultado do Programa <20>
coberto apenas se seu conte<74>do contenha trabalhos baseados no Programa
(independentemente de terem sido gerados pela execu<63><75>o do
Programa). Se isso <20> verdadeiro depende do que o programa faz.</p>
<p>
<strong>1.</strong>Voc<EFBFBD> pode copiar e distribuir c<>pias fi<66>is do c<>digo-fonte do
Programa da mesma forma que voc<6F> o recebeu, usando qualquer meio,
deste que voc<6F> consp<73>cua e apropriadamente publique em cada c<>pia um
aviso de direitos autorais e uma declara<72><61>o de inexist<73>ncia de
garantias; mantenha intactas todos os avisos que se referem a esta
Licen<EFBFBD>a e <20> aus<75>ncia total de garantias; e forne<6E>a a outros
recebedores do Programa uma c<>pia desta Licen<65>a, junto com o Programa.
</p>
<p>
Voc<EFBFBD> pode cobrar pelo ato f<>sico de transferir uma c<>pia e pode,
opcionalmente, oferecer garantia em troca de pagamento.
</p>
<p>
<strong>2.</strong> Voc<6F> pode modificar sua c<>pia ou c<>pias do Programa, ou qualquer
parte dele, assim gerando um trabalho baseado no Programa, e copiar e
distribuir essas modifica<63><61>es ou trabalhos sob os temos da se<73><65>o 1
acima, desde que voc<6F> tamb<6D>m se enquadre em todas estas condi<64><69>es:</p>
<dl><dd>
<strong>a)</strong> Voc<6F> tem que fazer com que os arquivos modificados levem avisos
proeminentes afirmando que voc<6F> alterou os arquivos, incluindo a
data de qualquer altera<72><61>o.
</dd></dl>
<dl><dd>
<strong>b)</strong> Voc<6F> tem que fazer com que quaisquer trabalhos que voc<6F>
distribua ou publique, e que integralmente ou em partes contenham
ou sejam derivados do Programa ou de suas partes, sejam
licenciados, integralmente e sem custo algum para quaisquer
terceiros, sob os termos desta Licen<65>a.
</dd></dl>
<dl><dd>
<strong>c)</strong> Se qualquer programa modificado normalmente l<> comandos
interativamente quando executados, voc<6F> tem que fazer com que,
quando iniciado tal uso interativo da forma mais simples, seja
impresso ou mostrado um an<61>ncio de que n<>o h<> qualquer garantia
(ou ent<6E>o que voc<6F> fornece a garantia) e que os usu<73>rios podem
redistribuir o programa sob estas condi<64><69>es, ainda informando os
usu<73>rios como consultar uma c<>pia desta Licen<65>a. (Exce<63><65>o: se o
Programa em si <20> interativo mas normalmente n<>o imprime estes
tipos de an<61>ncios, seu trabalho baseado no Programa n<>o precisa
imprimir um an<61>ncio.)
</dd></dl>
<p>
Estas exig<69>ncias aplicam-se ao trabalho modificado como um todo. Se
se<EFBFBD><EFBFBD>es identific<69>veis de tal trabalho n<>o s<>o derivadas do Programa, e
podem ser razoavelmente consideradas trabalhos independentes e
separados por si s<>, ent<6E>o esta Licen<65>a, e seus termos, n<>o se aplicam
a estas se<73><65>es quando voc<6F> distribui-las como trabalhos em
separado. Mas quando voc<6F> distribuir as mesmas se<73><65>es como parte de um
todo que <20> trabalho baseado no Programa, a distribui<75><69>o como um todo
tem que se enquadrar nos termos desta Licen<65>a, cujas permiss<73>es para
outros licenciados se estendem ao todo, portanto tamb<6D>m para cada e
toda parte independente de quem a escreveu.
</p>
<p>
Desta forma, esta se<73><65>o n<>o tem a inten<65><6E>o de reclamar direitos os
contestar seus direitos sobre o trabalho escrito completamente por
voc<EFBFBD>; ao inv<6E>s disso, a inten<65><6E>o <20> a de exercitar o direito de
controlar a distribui<75><69>o de trabalhos, derivados ou coletivos,
baseados no Programa.
</p>
<p>
Adicionalmente, a mera adi<64><69>o ao Programa de outro trabalho n<>o
baseado no Programa (ou de trabalho baseado no Programa) em um volume
de armazenamento ou meio de distribui<75><69>o n<>o faz o outro trabalho
parte do escopo desta Licen<65>a.
</p>
<p><strong>3.</strong> Voc<6F> pode copiar e distribuir o Programa (ou trabalho baseado
nele, conforme descrito na Se<53><65>o 2) em c<>digo-objeto ou em forma
execut<EFBFBD>vel sob os termos das Se<53><65>es 1 e 2 acima, desde que voc<6F>
fa<EFBFBD>a um dos seguintes:
</p>
<dl><dd>
<strong>a)</strong>O acompanhe com o c<>digo-fonte completo e em forma acess<73>vel
por m<>quinas, que tem que ser distribu<62>do sob os termos das Se<53><65>es
1 e 2 acima e em meio normalmente utilizado para o interc<72>mbio de
software; ou,
</dd></dl>
<dl><dd>
<strong>b)</strong> O acompanhe com uma oferta escrita, v<>lida por pelo menos tr<74>s
anos, de fornecer a qualquer um, com um custo n<>o superior ao
custo de distribui<75><69>o f<>sica do material, uma c<>pia do
c<>digo-fonte completo e em forma acess<73>vel por m<>quinas, que tem
que ser distribu<62>do sob os termos das Se<53><65>es 1 e 2 acima e em meio
normalmente utilizado para o interc<72>mbio de software; ou,
</dd></dl>
<dl><dd>
<p>
<strong>c)</strong> O acompanhe com a informa<6D><61>o que voc<6F> recebeu em rela<6C><61>o <20>
oferta de distribui<75><69>o do c<>digo-fonte correspondente. (Esta
alternativa <20> permitida somente em distribui<75><69>o n<>o comerciais, e
apenas se voc<6F> recebeu o programa em forma de c<>digo-objeto ou
execut<75>vel, com oferta de acordo com a Subse<73><65>o b acima.)
</p>
</dd></dl>
<p>
O c<>digo-fonte de um trabalho corresponde <20> forma de trabalho
preferida para se fazer modifica<63><61>es. Para um trabalho em forma
execut<EFBFBD>vel, o c<>digo-fonte completo significa todo o c<>digo-fonte de
todos os m<>dulos que ele cont<6E>m, mais quaisquer arquivos de defini<6E><69>o
de "interface", mais os "scripts" utilizados para se controlar a
compila<EFBFBD><EFBFBD>o e a instala<6C><61>o do execut<75>vel. Contudo, como exce<63><65>o
especial, o c<>digo-fonte distribu<62>do n<>o precisa incluir qualquer
componente normalmente distribu<62>do (tanto em forma original quanto
bin<EFBFBD>ria) com os maiores componentes (o compilador, o "kernel" etc.) do
sistema operacional sob o qual o execut<75>vel funciona, a menos que o
componente em si acompanhe o execut<75>vel.
</p>
<p>
Se a distribui<75><69>o do execut<75>vel ou c<>digo-objeto <20> feita atrav<61>s da
oferta de acesso a c<>pias de algum lugar, ent<6E>o ofertar o acesso
equivalente a c<>pia, do mesmo lugar, do c<>digo-fonte equivale <20>
distribui<EFBFBD><EFBFBD>o do c<>digo-fonte, mesmo que terceiros n<>o sejam compelidos
a copiar o c<>digo-fonte com o c<>digo-objeto.
</p>
<p>
<strong>4.</strong> Voc<6F> n<>o pode copiar, modificar, sub-licenciar ou distribuir o
Programa, exceto de acordo com as condi<64><69>es expressas nesta
Licen<EFBFBD>a. Qualquer outra tentativa de c<>pia, modifica<63><61>o,
sub-licenciamento ou distribui<75><69>o do Programa n<>o <20> valida, e
cancelar<EFBFBD> automaticamente os direitos que lhe foram fornecidos por
esta Licen<65>a. No entanto, terceiros que de voc<6F> receberam c<>pias ou
direitos, fornecidos sob os termos desta Licen<65>a, n<>o ter<65>o suas
licen<EFBFBD>as terminadas, desde que permane<6E>am em total concord<72>ncia com
ela.
</p>
<p>
<strong>5.</strong> Voc<6F> n<>o <20> obrigado a aceitar esta Licen<65>a j<> que n<>o a
assinou. No entanto, nada mais o dar<61> permiss<73>o para modificar ou
distribuir o Programa ou trabalhos derivados deste. Estas a<><61>es s<>o
proibidas por lei, caso voc<6F> n<>o aceite esta Licen<65>a. Desta forma, ao
modificar ou distribuir o Programa (ou qualquer trabalho derivado do
Programa), voc<6F> estar<61> indicando sua total aceita<74><61>o desta Licen<65>a
para faz<61>-los, e todos os seus termos e condi<64><69>es para copiar,
distribuir ou modificar o Programa, ou trabalhos baseados nele.
</p>
<p>
<strong>6.</strong> Cada vez que voc<6F> redistribuir o Programa (ou qualquer trabalho
baseado nele), os recebedores adquirir<69>o automaticamente do
licenciador original uma licen<65>a para copiar, distribuir ou modificar
o Programa, sujeitos a estes termos e condi<64><69>es. Voc<6F> n<>o poder<65> impor
aos recebedores qualquer outra restri<72><69>o ao exerc<72>cio dos direitos
ent<EFBFBD>o adquiridos. Voc<6F> n<>o <20> respons<6E>vel em garantir a concord<72>ncia de
terceiros a esta Licen<65>a.
</p>
<p>
<strong>7.</strong> Se, em conseq<65><71>ncia de decis<69>es judiciais ou alega<67><61>es de
infringimento de patentes ou quaisquer outras raz<61>es (n<>o limitadas a
assuntos relacionados a patentes), condi<64><69>es forem impostas a voc<6F>
(por ordem judicial, acordos ou outras formas) e que contradigam as
condi<EFBFBD><EFBFBD>es desta Licen<65>a, elas n<>o o livram das condi<64><69>es desta
Licen<EFBFBD>a. Se voc<6F> n<>o puder distribuir de forma a satisfazer
simultaneamente suas obriga<67><61>es para com esta Licen<65>a e para com as
outras obriga<67><61>es pertinentes, ent<6E>o como conseq<65><71>ncia voc<6F> n<>o poder<65>
distribuir o Programa. Por exemplo, se uma licen<65>a de patente n<>o
permitir<EFBFBD> a redistribui<75><69>o, livre de "royalties", do Programa, por
todos aqueles que receberem c<>pias direta ou indiretamente de voc<6F>,
ent<EFBFBD>o a <20>nica forma de voc<6F> satisfazer a ela e a esta Licen<65>a seria a
de desistir completamente de distribuir o Programa.
</p>
<p>
Se qualquer parte desta se<73><65>o for considerada inv<6E>lida ou n<>o
aplic<EFBFBD>vel em qualquer circunst<73>ncia particular, o restante da se<73><65>o se
aplica, e a se<73><65>o como um todo se aplica em outras circunst<73>ncias.
</p>
<p>
O prop<6F>sito desta se<73><65>o n<>o <20> o de induzi-lo a infringir quaisquer
patentes ou reivindica<63><61>o de direitos de propriedade outros, ou a
contestar a validade de quaisquer dessas reivindica<63><61>es; esta se<73><65>o
tem como <20>nico prop<6F>sito proteger a integridade dos sistemas de
distribui<EFBFBD><EFBFBD>o de software livres, o que <20> implementado pela pr<70>tica de
licen<EFBFBD>as p<>blicas. V<>rias pessoas t<>m contribu<62>do generosamente e em
grande escala para os software distribu<62>dos usando este sistema, na
certeza de que sua aplica<63><61>o <20> feita de forma consistente; fica a
crit<EFBFBD>rio do autor/doador decidir se ele ou ela est<73> disposto a
distribuir software utilizando outro sistema, e um licenciado n<>o pode
impor qualquer escolha.
</p>
<p>
Esta se<73><65>o destina-se a tornar bastante claro o que se acredita ser
conseq<EFBFBD><EFBFBD>ncia do restante desta Licen<65>a.
</p>
<p>
<strong>8.</strong> Se a distribui<75><69>o e/ou uso do Programa s<>o restringidos em certos
pa<EFBFBD>ses por patentes ou direitos autorais, o detentor dos direitos
autorais original, e que colocou o Programa sob esta Licen<65>a, pode
incluir uma limita<74><61>o geogr<67>fica de distribui<75><69>o, excluindo aqueles
pa<EFBFBD>ses de forma a tornar a distribui<75><69>o permitida apenas naqueles ou
entre aqueles pa<70>ses ent<6E>o n<>o exclu<6C>dos. Nestes casos, esta Licen<65>a
incorpora a limita<74><61>o como se a mesma constasse escrita nesta Licen<65>a.
</p>
<p>
<strong>9.</strong> A Free Software Foundation pode publicar vers<72>es revisadas e/ou
novas da Licen<65>a P<>blica Geral de tempos em tempos. Estas novas
vers<EFBFBD>es ser<65>o similares em esp<73>rito <20> vers<72>o atual, mas podem diferir
em detalhes que resolvem novos problemas ou situa<75><61>es.
</p>
<p>
A cada vers<72>o <20> dada um n<>mero distinto. Se o Programa especifica um
n<EFBFBD>mero de vers<72>o espec<65>fico desta Licen<65>a que se aplica a ele e a
"qualquer nova vers<72>o", voc<6F> tem a op<6F><70>o de aceitar os termos e
condi<EFBFBD><EFBFBD>es daquela vers<72>o ou de qualquer outra vers<72>o publicada pela
Free Software Foundation. Se o programa n<>o especifica um n<>mero de
vers<EFBFBD>o desta Licen<65>a, voc<6F> pode escolher qualquer vers<72>o j<> publicada
pela Free Software Foundation.
</p>
<p>
<strong>10.</strong> Se voc<6F> pretende incorporar partes do Programa em outros
programas livres cujas condi<64><69>es de distribui<75><69>o s<>o diferentes,
escreva ao autor e solicite permiss<73>o. Para o software que a Free
Software Foundation det<65>m direitos autorais, escreva <20> Free Software
Foundation; <20>s vezes n<>s permitimos exce<63><65>es a este caso. Nossa
decis<EFBFBD>o ser<65> guiada pelos dois objetivos de preservar a condi<64><69>o de
liberdade de todas as deriva<76><61>es do nosso software livre, e de
promover o compartilhamento e reutiliza<7A><61>o de software em aspectos
gerais.
</p>
<p>
<strong>AUS<EFBFBD>NCIA DE GARANTIAS</strong>
</p>
<p>
<strong>11.</strong> UMA VEZ QUE O PROGRAMA <20> LICENCIADO SEM <20>NUS, N<>O H<> QUALQUER
GARANTIA PARA O PROGRAMA, NA EXTENS<4E>O PERMITIDA PELAS LEIS
APLIC<EFBFBD>VEIS. EXCETO QUANDO EXPRESSADO DE FORMA ESCRITA, OS DETENTORES
DOS DIREITOS AUTORAIS E/OU TERCEIROS DISPONIBILIZAM O PROGRAMA "NO
ESTADO", SEM QUALQUER TIPO DE GARANTIAS, EXPRESSAS OU IMPL<50>CITAS,
INCLUINDO, MAS N<>O LIMITADO A, AS GARANTIAS IMPL<50>CITAS DE
COMERCIALIZA<EFBFBD><EFBFBD>O E AS DE ADEQUA<55><41>O A QUALQUER PROP<4F>SITO. O RISCO TOTAL
COM A QUALIDADE E DESEMPENHO DO PROGRAMA <20> SEU. SE O PROGRAMA SE
MOSTRAR DEFEITUOSO, VOC<4F> ASSUME OS CUSTOS DE TODAS AS MANUTEN<45><4E>ES,
REPAROS E CORRE<52><45>ES.
</p>
<p>
<strong>12.</strong> EM NENHUMA OCASI<53>O, A MENOS QUE EXIGIDO PELAS LEIS APLIC<49>VEIS OU
ACORDO ESCRITO, OS DETENTORES DOS DIREITOS AUTORAIS, OU QUALQUER OUTRA
PARTE QUE POSSA MODIFICAR E/OU REDISTRIBUIR O PROGRAMA CONFORME
PERMITIDO ACIMA, SER<45>O RESPONSABILIZADOS POR VOC<4F> POR DANOS, INCLUINDO
QUALQUER DANO EM GERAL, ESPECIAL, ACIDENTAL OU CONSEQ<45>ENTE,
RESULTANTES DO USO OU INCAPACIDADE DE USO DO PROGRAMA (INCLUINDO, MAS
N<EFBFBD>O LIMITADO A, A PERDA DE DADOS OU DADOS TORNADOS INCORRETOS, OU
PERDAS SOFRIDAS POR VOC<4F> OU POR OUTRAS PARTES, OU FALHAS DO PROGRAMA
AO OPERAR COM QUALQUER OUTRO PROGRAMA), MESMO QUE TAL DETENTOR OU
PARTE TENHAM SIDO AVISADOS DA POSSIBILIDADE DE TAIS DANOS.
</p>
<h3>FIM DOS TERMOS E CONDI<44><49>ES</h3>
<h3>Como Aplicar Estes Termos aos Seus Novos Programas</h3> <h3>Introdu<EFBFBD><EFBFBD>o</h3>
<p>Se voc<6F> desenvolver um novo programa, e quer que ele seja utilizado <p>
amplamente pelo p<>blico, a melhor forma de alcan<61>ar este objetivo <20> As licen<65>as de muitos software s<>o desenvolvidas para restringir sua
torn<EFBFBD>-lo software livre que qualquer um pode redistribuir e alterar, liberdade de compartilh<6C>-lo e mud<75>-lo. Contr<74>ria a isso, a Licen<65>a P<>blica
sob estes termos. Geral GNU pretende garantir sua liberdade de compartilhar e alterar
</p> software livres -- garantindo que o software ser<65> livre e gratuito para os
<p>Para isso, anexe os seguintes avisos ao programa. <20> mais seguro seus usu<73>rios. Esta Licen<65>a P<>blica Geral aplica-se <20> maioria dos software
anex<EFBFBD>-los logo no in<69>cio de cada arquivo-fonte para refor<6F>arem mais da Free Software Foundation e a qualquer outro programa cujo autor decida
efetivamente a inexist<73>ncia de garantias; e cada arquivo deve possuir aplic<69>-la. (Alguns outros software da FSF s<>o cobertos pela Licen<65>a
pelo menos a linha de "copyright" e uma indica<63><61>o de onde o texto P<>blica Geral de Bibliotecas, no entanto.) Voc<6F> pode aplic<69>-la tamb<6D>m aos
completo se encontra. seus programas.
</p> </p>
<p>&lt;uma linha que forne<6E>a o nome do programa e uma id<69>ia do que ele faz.&gt;
Copyright (C) &lt;ano&gt; &lt;nome do autor&gt; <p>
</p> Quando nos referimos a software livre, estamos nos referindo a liberdade e
<p>Este programa <20> software livre; voc<6F> pode redistribu<62>-lo e/ou n<>o a pre<72>o. Nossa Licen<65>a P<>blica Geral foi desenvolvida para garantir
modific<69>-lo sob os termos da Licen<65>a P<>blica Geral GNU, conforme que voc<6F> tenha a liberdade de distribuir c<>pias de software livre (e
publicada pela Free Software Foundation; tanto a vers<72>o 2 da cobrar por isso, se quiser); que voc<6F> receba o c<>digo-fonte ou tenha
Licen<65>a como (a seu crit<69>rio) qualquer vers<72>o mais nova. acesso a ele, se quiser; que voc<6F> possa mudar o software ou utilizar
</p> partes dele em novos programas livres e gratuitos; e que voc<6F> saiba que
<p> Este programa <20> distribu<62>do na expectativa de ser <20>til, mas SEM pode fazer tudo isso.
QUALQUER GARANTIA; sem mesmo a garantia impl<70>cita de </p>
COMERCIALIZA<5A><41>O ou de ADEQUA<55><41>O A QUALQUER PROP<4F>SITO EM
PARTICULAR. Consulte a Licen<65>a P<>blica Geral GNU para obter mais <p>
detalhes. Para proteger seus direitos, precisamos fazer restri<72><69>es que impe<70>am a
</p> qualquer um negar estes direitos ou solicitar que voc<6F> deles abdique.
<p> Voc<6F> deve ter recebido uma c<>pia da Licen<65>a P<>blica Geral GNU Estas restri<72><69>es traduzem-se em certas responsabilidades para voc<6F>, se
junto com este programa; se n<>o, escreva para a Free Software voc<6F> for distribuir c<>pias do software ou modific<69>-lo.
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA </p>
02111-1307, USA.
</p> <p>
<p>Inclua tamb<6D>m informa<6D><61>es sobre como contact<63>-lo eletronicamente e por carta.</p> Por exemplo, se voc<6F> distribuir c<>pias de um programa, gratuitamente ou
<p>Se o programa <20> interativo, fa<66>a-o mostrar um aviso breve como este, ao iniciar um modo interativo: por alguma quantia, voc<6F> tem que fornecer aos recebedores todos os
</p> direitos que voc<6F> possui. Voc<6F> tem que garantir que eles tamb<6D>m recebam ou
<p>Gnomovision vers<72>o 69, Copyright (C) ano nome do autor possam obter o c<>digo-fonte. E voc<6F> tem que mostrar-lhes estes termos para
O Gnomovision n<>o possui QUALQUER GARANTIA; para obter mais que eles possam conhecer seus direitos.
detalhes digite `show w'. Ele <20> software livre e voc<6F> est<73> </p>
convidado a redistribui-lo sob certas condi<64><69>es; digite `show c'
para obter detalhes. <p>
</p> N<>s protegemos seus direitos em dois passos: (1) com copyright do software
<p>Os comandos hipot<6F>ticos `show w' e `show c' devem mostrar as partes e (2) com a oferta desta licen<65>a, que lhe d<> permiss<73>o legal para copiar,
apropriadas da Licen<65>a P<>blica Geral. Claro, os comandos que voc<6F> usar distribuir e/ou modificar o software.
podem ser ativados de outra forma que `show w' e `show c'; eles podem </p>
at<EFBFBD> ser cliques do mouse ou itens de um menu -- o que melhor se
adequar ao programa. <p>
</p> Al<41>m disso, tanto para a prote<74><65>o do autor quanto a nossa, gostar<61>amos de
<p>Voc<EFBFBD> tamb<6D>m deve obter do seu empregador (se voc<6F> trabalha como certificar-nos que todos entendam que n<>o h<> qualquer garantia nestes
programador) ou escola, se houver, uma "declara<72><61>o de aus<75>ncia de software livres. Se o software <20> modificado por algu<67>m mais e passado
direitos autorais" sobre o programa, se necess<73>rio. Aqui est<73> um adiante, queremos que seus recebedores saibam que o que eles obtiveram n<>o
exemplo; altere os nomes: <20> original, de forma que qualquer problema introduzido por terceiros n<>o
</p> interfira na reputa<74><61>o do autor original.
<p>Yoyodyne, Inc., aqui declara a aus<75>ncia de quaisquer direitos </p>
autorais sobre o programa `Gnomovision' (que executa interpreta<74><61>es
em compiladores) escrito por James Hacker. <p>
</p> Finalmente, qualquer programa <20> amea<65>ado constantemente por patentes de
<p>&lt;assinatura de Ty Coon&gt;, 1o. de abril de 1989 software. Queremos evitar o perigo de que distribuidores de software livre
</p> obtenham patentes individuais, o que tem o efeito de tornar o programa
<p>Ty Con, Vice-presidente propriet<65>rio. Para prevenir isso, deixamos claro que qualquer patente tem
que ser licenciada para uso livre e gratuito por qualquer pessoa, ou ent<6E>o
</p> que nem necessite ser licenciada.
<p>Esta Licen<65>a P<>blica Geral n<>o permite incorporar seu programa em </p>
programas propriet<65>rios. Se seu programa <20> uma biblioteca de
sub-rotinas, voc<6F> deve considerar mais <20>til permitir ligar aplica<63><61>es <p>
propriet<EFBFBD>rias com a biblioteca. Se isto <20> o que voc<6F> deseja, use a Os termos e condi<64><69>es precisas para c<>pia, distribui<75><69>o e modifica<63><61>o se
Licen<EFBFBD>a P<>blica Geral de Bibliotecas GNU, ao inv<6E>s desta Licen<65>a. encontram abaixo:
</p> </p>
</body></html>
<h3>
LICEN<45>A P<>BLICA GERAL GNU TERMOS E CONDI<44><49>ES PARA C<>PIA, DISTRIBUI<55><49>O E
MODIFICA<43><41>O
</h3>
<p>
<strong>0.</strong>Esta licen<65>a se aplica a qualquer programa ou outro
trabalho que contenha um aviso colocado pelo detentor dos direitos
autorais informando que aquele pode ser distribu<62>do sob as condi<64><69>es desta
Licen<65>a P<>blica Geral. O "Programa" abaixo refere-se a qualquer programa
ou trabalho, e "trabalho baseado no Programa" significa tanto o Programa
em si como quaisquer trabalhos derivados, de acordo com a lei de direitos
autorais: isto quer dizer um trabalho que contenha o Programa ou parte
dele, tanto originalmente ou com modifica<63><61>es, e/ou tradu<64><75>o para outros
idiomas. (Doravante o processo de tradu<64><75>o est<73> inclu<6C>do sem limites no
termo "modifica<63><61>o".) Cada licenciado <20> mencionado como "voc<6F>".
</p>
<p>
Atividades outras que a c<>pia, a distribui<75><69>o e modifica<63><61>o n<>o est<73>o
cobertas por esta Licen<65>a; elas est<73>o fora de seu escopo. O ato de
executar o Programa n<>o <20> restringido e o resultado do Programa <20> coberto
apenas se seu conte<74>do contenha trabalhos baseados no Programa
(independentemente de terem sido gerados pela execu<63><75>o do Programa). Se
isso <20> verdadeiro depende do que o programa faz.
</p>
<p>
<strong>1.</strong>Voc<EFBFBD> pode copiar e distribuir c<>pias fi<66>is do
c<>digo-fonte do Programa da mesma forma que voc<6F> o recebeu, usando
qualquer meio, deste que voc<6F> consp<73>cua e apropriadamente publique em cada
c<>pia um aviso de direitos autorais e uma declara<72><61>o de inexist<73>ncia de
garantias; mantenha intactas todos os avisos que se referem a esta Licen<65>a
e <20> aus<75>ncia total de garantias; e forne<6E>a a outros recebedores do
Programa uma c<>pia desta Licen<65>a, junto com o Programa.
</p>
<p>
Voc<6F> pode cobrar pelo ato f<>sico de transferir uma c<>pia e pode,
opcionalmente, oferecer garantia em troca de pagamento.
</p>
<p>
<strong>2.</strong> Voc<6F> pode modificar sua c<>pia ou c<>pias do Programa,
ou qualquer parte dele, assim gerando um trabalho baseado no Programa, e
copiar e distribuir essas modifica<63><61>es ou trabalhos sob os temos da se<73><65>o
1 acima, desde que voc<6F> tamb<6D>m se enquadre em todas estas condi<64><69>es:
</p>
<dl>
<dd>
<strong>a)</strong> Voc<6F> tem que fazer com que os arquivos modificados
levem avisos proeminentes afirmando que voc<6F> alterou os arquivos,
incluindo a data de qualquer altera<72><61>o.
</dd>
</dl>
<dl>
<dd>
<strong>b)</strong> Voc<6F> tem que fazer com que quaisquer trabalhos que
voc<6F> distribua ou publique, e que integralmente ou em partes contenham
ou sejam derivados do Programa ou de suas partes, sejam licenciados,
integralmente e sem custo algum para quaisquer terceiros, sob os termos
desta Licen<65>a.
</dd>
</dl>
<dl>
<dd>
<strong>c)</strong> Se qualquer programa modificado normalmente l<>
comandos interativamente quando executados, voc<6F> tem que fazer com que,
quando iniciado tal uso interativo da forma mais simples, seja impresso
ou mostrado um an<61>ncio de que n<>o h<> qualquer garantia (ou ent<6E>o que
voc<6F> fornece a garantia) e que os usu<73>rios podem redistribuir o programa
sob estas condi<64><69>es, ainda informando os usu<73>rios como consultar uma
c<>pia desta Licen<65>a. (Exce<63><65>o: se o Programa em si <20> interativo mas
normalmente n<>o imprime estes tipos de an<61>ncios, seu trabalho baseado no
Programa n<>o precisa imprimir um an<61>ncio.)
</dd>
</dl>
<p>
Estas exig<69>ncias aplicam-se ao trabalho modificado como um todo. Se se<73><65>es
identific<69>veis de tal trabalho n<>o s<>o derivadas do Programa, e podem ser
razoavelmente consideradas trabalhos independentes e separados por si s<>,
ent<6E>o esta Licen<65>a, e seus termos, n<>o se aplicam a estas se<73><65>es quando
voc<6F> distribui-las como trabalhos em separado. Mas quando voc<6F> distribuir
as mesmas se<73><65>es como parte de um todo que <20> trabalho baseado no Programa,
a distribui<75><69>o como um todo tem que se enquadrar nos termos desta Licen<65>a,
cujas permiss<73>es para outros licenciados se estendem ao todo, portanto
tamb<6D>m para cada e toda parte independente de quem a escreveu.
</p>
<p>
Desta forma, esta se<73><65>o n<>o tem a inten<65><6E>o de reclamar direitos os
contestar seus direitos sobre o trabalho escrito completamente por voc<6F>;
ao inv<6E>s disso, a inten<65><6E>o <20> a de exercitar o direito de controlar a
distribui<75><69>o de trabalhos, derivados ou coletivos, baseados no Programa.
</p>
<p>
Adicionalmente, a mera adi<64><69>o ao Programa de outro trabalho n<>o baseado no
Programa (ou de trabalho baseado no Programa) em um volume de
armazenamento ou meio de distribui<75><69>o n<>o faz o outro trabalho parte do
escopo desta Licen<65>a.
</p>
<p>
<strong>3.</strong> Voc<6F> pode copiar e distribuir o Programa (ou trabalho
baseado nele, conforme descrito na Se<53><65>o 2) em c<>digo-objeto ou em forma
execut<75>vel sob os termos das Se<53><65>es 1 e 2 acima, desde que voc<6F> fa<66>a um
dos seguintes:
</p>
<dl>
<dd>
<strong>a)</strong>O acompanhe com o c<>digo-fonte completo e em forma
acess<73>vel por m<>quinas, que tem que ser distribu<62>do sob os termos das
Se<53><65>es 1 e 2 acima e em meio normalmente utilizado para o interc<72>mbio de
software; ou,
</dd>
</dl>
<dl>
<dd>
<strong>b)</strong> O acompanhe com uma oferta escrita, v<>lida por pelo
menos tr<74>s anos, de fornecer a qualquer um, com um custo n<>o superior ao
custo de distribui<75><69>o f<>sica do material, uma c<>pia do c<>digo-fonte
completo e em forma acess<73>vel por m<>quinas, que tem que ser distribu<62>do
sob os termos das Se<53><65>es 1 e 2 acima e em meio normalmente utilizado
para o interc<72>mbio de software; ou,
</dd>
</dl>
<dl>
<dd>
<p>
<strong>c)</strong> O acompanhe com a informa<6D><61>o que voc<6F> recebeu em
rela<6C><61>o <20> oferta de distribui<75><69>o do c<>digo-fonte correspondente. (Esta
alternativa <20> permitida somente em distribui<75><69>o n<>o comerciais, e
apenas se voc<6F> recebeu o programa em forma de c<>digo-objeto ou
execut<75>vel, com oferta de acordo com a Subse<73><65>o b acima.)
</p>
</dd>
</dl>
<p>
O c<>digo-fonte de um trabalho corresponde <20> forma de trabalho preferida
para se fazer modifica<63><61>es. Para um trabalho em forma execut<75>vel, o
c<>digo-fonte completo significa todo o c<>digo-fonte de todos os m<>dulos
que ele cont<6E>m, mais quaisquer arquivos de defini<6E><69>o de "interface", mais
os "scripts" utilizados para se controlar a compila<6C><61>o e a instala<6C><61>o do
execut<75>vel. Contudo, como exce<63><65>o especial, o c<>digo-fonte distribu<62>do n<>o
precisa incluir qualquer componente normalmente distribu<62>do (tanto em
forma original quanto bin<69>ria) com os maiores componentes (o compilador, o
"kernel" etc.) do sistema operacional sob o qual o execut<75>vel funciona, a
menos que o componente em si acompanhe o execut<75>vel.
</p>
<p>
Se a distribui<75><69>o do execut<75>vel ou c<>digo-objeto <20> feita atrav<61>s da oferta
de acesso a c<>pias de algum lugar, ent<6E>o ofertar o acesso equivalente a
c<>pia, do mesmo lugar, do c<>digo-fonte equivale <20> distribui<75><69>o do
c<>digo-fonte, mesmo que terceiros n<>o sejam compelidos a copiar o
c<>digo-fonte com o c<>digo-objeto.
</p>
<p>
<strong>4.</strong> Voc<6F> n<>o pode copiar, modificar, sub-licenciar ou
distribuir o Programa, exceto de acordo com as condi<64><69>es expressas nesta
Licen<65>a. Qualquer outra tentativa de c<>pia, modifica<63><61>o, sub-licenciamento
ou distribui<75><69>o do Programa n<>o <20> valida, e cancelar<61> automaticamente os
direitos que lhe foram fornecidos por esta Licen<65>a. No entanto, terceiros
que de voc<6F> receberam c<>pias ou direitos, fornecidos sob os termos desta
Licen<65>a, n<>o ter<65>o suas licen<65>as terminadas, desde que permane<6E>am em total
concord<72>ncia com ela.
</p>
<p>
<strong>5.</strong> Voc<6F> n<>o <20> obrigado a aceitar esta Licen<65>a j<> que n<>o
a assinou. No entanto, nada mais o dar<61> permiss<73>o para modificar ou
distribuir o Programa ou trabalhos derivados deste. Estas a<><61>es s<>o
proibidas por lei, caso voc<6F> n<>o aceite esta Licen<65>a. Desta forma, ao
modificar ou distribuir o Programa (ou qualquer trabalho derivado do
Programa), voc<6F> estar<61> indicando sua total aceita<74><61>o desta Licen<65>a para
faz<61>-los, e todos os seus termos e condi<64><69>es para copiar, distribuir ou
modificar o Programa, ou trabalhos baseados nele.
</p>
<p>
<strong>6.</strong> Cada vez que voc<6F> redistribuir o Programa (ou qualquer
trabalho baseado nele), os recebedores adquirir<69>o automaticamente do
licenciador original uma licen<65>a para copiar, distribuir ou modificar o
Programa, sujeitos a estes termos e condi<64><69>es. Voc<6F> n<>o poder<65> impor aos
recebedores qualquer outra restri<72><69>o ao exerc<72>cio dos direitos ent<6E>o
adquiridos. Voc<6F> n<>o <20> respons<6E>vel em garantir a concord<72>ncia de terceiros
a esta Licen<65>a.
</p>
<p>
<strong>7.</strong> Se, em conseq<65><71>ncia de decis<69>es judiciais ou alega<67><61>es
de infringimento de patentes ou quaisquer outras raz<61>es (n<>o limitadas a
assuntos relacionados a patentes), condi<64><69>es forem impostas a voc<6F> (por
ordem judicial, acordos ou outras formas) e que contradigam as condi<64><69>es
desta Licen<65>a, elas n<>o o livram das condi<64><69>es desta Licen<65>a. Se voc<6F> n<>o
puder distribuir de forma a satisfazer simultaneamente suas obriga<67><61>es
para com esta Licen<65>a e para com as outras obriga<67><61>es pertinentes, ent<6E>o
como conseq<65><71>ncia voc<6F> n<>o poder<65> distribuir o Programa. Por exemplo, se
uma licen<65>a de patente n<>o permitir<69> a redistribui<75><69>o, livre de
"royalties", do Programa, por todos aqueles que receberem c<>pias direta ou
indiretamente de voc<6F>, ent<6E>o a <20>nica forma de voc<6F> satisfazer a ela e a
esta Licen<65>a seria a de desistir completamente de distribuir o Programa.
</p>
<p>
Se qualquer parte desta se<73><65>o for considerada inv<6E>lida ou n<>o aplic<69>vel em
qualquer circunst<73>ncia particular, o restante da se<73><65>o se aplica, e a
se<73><65>o como um todo se aplica em outras circunst<73>ncias.
</p>
<p>
O prop<6F>sito desta se<73><65>o n<>o <20> o de induzi-lo a infringir quaisquer
patentes ou reivindica<63><61>o de direitos de propriedade outros, ou a
contestar a validade de quaisquer dessas reivindica<63><61>es; esta se<73><65>o tem
como <20>nico prop<6F>sito proteger a integridade dos sistemas de distribui<75><69>o
de software livres, o que <20> implementado pela pr<70>tica de licen<65>as
p<>blicas. V<>rias pessoas t<>m contribu<62>do generosamente e em grande escala
para os software distribu<62>dos usando este sistema, na certeza de que sua
aplica<63><61>o <20> feita de forma consistente; fica a crit<69>rio do autor/doador
decidir se ele ou ela est<73> disposto a distribuir software utilizando outro
sistema, e um licenciado n<>o pode impor qualquer escolha.
</p>
<p>
Esta se<73><65>o destina-se a tornar bastante claro o que se acredita ser
conseq<65><71>ncia do restante desta Licen<65>a.
</p>
<p>
<strong>8.</strong> Se a distribui<75><69>o e/ou uso do Programa s<>o
restringidos em certos pa<70>ses por patentes ou direitos autorais, o
detentor dos direitos autorais original, e que colocou o Programa sob esta
Licen<65>a, pode incluir uma limita<74><61>o geogr<67>fica de distribui<75><69>o, excluindo
aqueles pa<70>ses de forma a tornar a distribui<75><69>o permitida apenas naqueles
ou entre aqueles pa<70>ses ent<6E>o n<>o exclu<6C>dos. Nestes casos, esta Licen<65>a
incorpora a limita<74><61>o como se a mesma constasse escrita nesta Licen<65>a.
</p>
<p>
<strong>9.</strong> A Free Software Foundation pode publicar vers<72>es
revisadas e/ou novas da Licen<65>a P<>blica Geral de tempos em tempos. Estas
novas vers<72>es ser<65>o similares em esp<73>rito <20> vers<72>o atual, mas podem
diferir em detalhes que resolvem novos problemas ou situa<75><61>es.
</p>
<p>
A cada vers<72>o <20> dada um n<>mero distinto. Se o Programa especifica um
n<>mero de vers<72>o espec<65>fico desta Licen<65>a que se aplica a ele e a
"qualquer nova vers<72>o", voc<6F> tem a op<6F><70>o de aceitar os termos e condi<64><69>es
daquela vers<72>o ou de qualquer outra vers<72>o publicada pela Free Software
Foundation. Se o programa n<>o especifica um n<>mero de vers<72>o desta
Licen<65>a, voc<6F> pode escolher qualquer vers<72>o j<> publicada pela Free
Software Foundation.
</p>
<p>
<strong>10.</strong> Se voc<6F> pretende incorporar partes do Programa em
outros programas livres cujas condi<64><69>es de distribui<75><69>o s<>o diferentes,
escreva ao autor e solicite permiss<73>o. Para o software que a Free Software
Foundation det<65>m direitos autorais, escreva <20> Free Software Foundation; <20>s
vezes n<>s permitimos exce<63><65>es a este caso. Nossa decis<69>o ser<65> guiada pelos
dois objetivos de preservar a condi<64><69>o de liberdade de todas as deriva<76><61>es
do nosso software livre, e de promover o compartilhamento e reutiliza<7A><61>o
de software em aspectos gerais.
</p>
<p><strong>AUS<EFBFBD>NCIA DE GARANTIAS</strong></p>
<p>
<strong>11.</strong> UMA VEZ QUE O PROGRAMA <20> LICENCIADO SEM <20>NUS, N<>O H<>
QUALQUER GARANTIA PARA O PROGRAMA, NA EXTENS<4E>O PERMITIDA PELAS LEIS
APLIC<49>VEIS. EXCETO QUANDO EXPRESSADO DE FORMA ESCRITA, OS DETENTORES DOS
DIREITOS AUTORAIS E/OU TERCEIROS DISPONIBILIZAM O PROGRAMA "NO ESTADO",
SEM QUALQUER TIPO DE GARANTIAS, EXPRESSAS OU IMPL<50>CITAS, INCLUINDO, MAS
N<>O LIMITADO A, AS GARANTIAS IMPL<50>CITAS DE COMERCIALIZA<5A><41>O E AS DE
ADEQUA<55><41>O A QUALQUER PROP<4F>SITO. O RISCO TOTAL COM A QUALIDADE E DESEMPENHO
DO PROGRAMA <20> SEU. SE O PROGRAMA SE MOSTRAR DEFEITUOSO, VOC<4F> ASSUME OS
CUSTOS DE TODAS AS MANUTEN<45><4E>ES, REPAROS E CORRE<52><45>ES.
</p>
<p>
<strong>12.</strong> EM NENHUMA OCASI<53>O, A MENOS QUE EXIGIDO PELAS LEIS
APLIC<49>VEIS OU ACORDO ESCRITO, OS DETENTORES DOS DIREITOS AUTORAIS, OU
QUALQUER OUTRA PARTE QUE POSSA MODIFICAR E/OU REDISTRIBUIR O PROGRAMA
CONFORME PERMITIDO ACIMA, SER<45>O RESPONSABILIZADOS POR VOC<4F> POR DANOS,
INCLUINDO QUALQUER DANO EM GERAL, ESPECIAL, ACIDENTAL OU CONSEQ<45>ENTE,
RESULTANTES DO USO OU INCAPACIDADE DE USO DO PROGRAMA (INCLUINDO, MAS N<>O
LIMITADO A, A PERDA DE DADOS OU DADOS TORNADOS INCORRETOS, OU PERDAS
SOFRIDAS POR VOC<4F> OU POR OUTRAS PARTES, OU FALHAS DO PROGRAMA AO OPERAR
COM QUALQUER OUTRO PROGRAMA), MESMO QUE TAL DETENTOR OU PARTE TENHAM SIDO
AVISADOS DA POSSIBILIDADE DE TAIS DANOS.
</p>
<h3>FIM DOS TERMOS E CONDI<44><49>ES</h3>
<h3>Como Aplicar Estes Termos aos Seus Novos Programas</h3>
<p>
Se voc<6F> desenvolver um novo programa, e quer que ele seja utilizado
amplamente pelo p<>blico, a melhor forma de alcan<61>ar este objetivo <20>
torn<72>-lo software livre que qualquer um pode redistribuir e alterar, sob
estes termos.
</p>
<p>
Para isso, anexe os seguintes avisos ao programa. <20> mais seguro anex<65>-los
logo no in<69>cio de cada arquivo-fonte para refor<6F>arem mais efetivamente a
inexist<73>ncia de garantias; e cada arquivo deve possuir pelo menos a linha
de "copyright" e uma indica<63><61>o de onde o texto completo se encontra.
</p>
<p>
&lt;uma linha que forne<6E>a o nome do programa e uma id<69>ia do que ele
faz.&gt; Copyright (C) &lt;ano&gt; &lt;nome do autor&gt;
</p>
<p>
Este programa <20> software livre; voc<6F> pode redistribu<62>-lo e/ou modific<69>-lo
sob os termos da Licen<65>a P<>blica Geral GNU, conforme publicada pela Free
Software Foundation; tanto a vers<72>o 2 da Licen<65>a como (a seu crit<69>rio)
qualquer vers<72>o mais nova.
</p>
<p>
Este programa <20> distribu<62>do na expectativa de ser <20>til, mas SEM QUALQUER
GARANTIA; sem mesmo a garantia impl<70>cita de COMERCIALIZA<5A><41>O ou de
ADEQUA<55><41>O A QUALQUER PROP<4F>SITO EM PARTICULAR. Consulte a Licen<65>a P<>blica
Geral GNU para obter mais detalhes.
</p>
<p>
Voc<6F> deve ter recebido uma c<>pia da Licen<65>a P<>blica Geral GNU junto com
este programa; se n<>o, escreva para a Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307, USA.
</p>
<p>
Inclua tamb<6D>m informa<6D><61>es sobre como contact<63>-lo eletronicamente e por
carta.
</p>
<p>
Se o programa <20> interativo, fa<66>a-o mostrar um aviso breve como este, ao
iniciar um modo interativo:
</p>
<p>
Gnomovision vers<72>o 69, Copyright (C) ano nome do autor O Gnomovision n<>o
possui QUALQUER GARANTIA; para obter mais detalhes digite `show w'. Ele <20>
software livre e voc<6F> est<73> convidado a redistribui-lo sob certas
condi<64><69>es; digite `show c' para obter detalhes.
</p>
<p>
Os comandos hipot<6F>ticos `show w' e `show c' devem mostrar as partes
apropriadas da Licen<65>a P<>blica Geral. Claro, os comandos que voc<6F> usar
podem ser ativados de outra forma que `show w' e `show c'; eles podem at<61>
ser cliques do mouse ou itens de um menu -- o que melhor se adequar ao
programa.
</p>
<p>
Voc<6F> tamb<6D>m deve obter do seu empregador (se voc<6F> trabalha como
programador) ou escola, se houver, uma "declara<72><61>o de aus<75>ncia de direitos
autorais" sobre o programa, se necess<73>rio. Aqui est<73> um exemplo; altere os
nomes:
</p>
<p>
Yoyodyne, Inc., aqui declara a aus<75>ncia de quaisquer direitos autorais
sobre o programa `Gnomovision' (que executa interpreta<74><61>es em
compiladores) escrito por James Hacker.
</p>
<p>&lt;assinatura de Ty Coon&gt;, 1o. de abril de 1989</p>
<p>Ty Con, Vice-presidente</p>
<p>
Esta Licen<65>a P<>blica Geral n<>o permite incorporar seu programa em
programas propriet<65>rios. Se seu programa <20> uma biblioteca de sub-rotinas,
voc<6F> deve considerar mais <20>til permitir ligar aplica<63><61>es propriet<65>rias com
a biblioteca. Se isto <20> o que voc<6F> deseja, use a Licen<65>a P<>blica Geral de
Bibliotecas GNU, ao inv<6E>s desta Licen<65>a.
</p>
</body>
</html>

View File

@ -4,24 +4,21 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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.
$sql = 'SELECT link, name FROM tlink ORDER BY name'; $sql = 'SELECT link, name FROM tlink ORDER BY name';
$result = db_get_all_rows_sql ($sql); $result = db_get_all_rows_sql($sql);
if ($result !== false) { if ($result !== false) {
echo '<div class="tit bg4">:: '.__('Links').' ::</div>'; echo '<div class="tit bg4">:: '.__('Links').' ::</div>';
echo '<div class="menu"><ul>'; echo '<div class="menu"><ul>';
foreach ($result as $link) { foreach ($result as $link) {
echo '<li class="links"><a href="'.$link["link"].'" target="_blank">'.$link["name"].'</a></li>'; echo '<li class="links"><a href="'.$link['link'].'" target="_blank">'.$link['name'].'</a></li>';
} }
echo '</ul></div>';
echo '</ul></div>';
} }
?>

View File

@ -4,11 +4,9 @@
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 // as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -21,113 +19,136 @@
global $config; global $config;
if (is_ajax()) { if (is_ajax()) {
$skip_login_help = get_parameter('skip_login_help', 0); $skip_login_help = get_parameter('skip_login_help', 0);
// Updates config['skip_login_help_dialog'] in order to don't show login help message // Updates config['skip_login_help_dialog'] in order to don't show login help message
if ($skip_login_help) { if ($skip_login_help) {
if (isset ($config['skip_login_help_dialog'])) if (isset($config['skip_login_help_dialog'])) {
$result_config = db_process_sql_update('tconfig', array("value" => 1), array("token" => "skip_login_help_dialog")); $result_config = db_process_sql_update('tconfig', ['value' => 1], ['token' => 'skip_login_help_dialog']);
else } else {
$result_config = db_process_sql_insert ('tconfig', array ("value" => 1, "token" => "skip_login_help_dialog")); $result_config = db_process_sql_insert('tconfig', ['value' => 1, 'token' => 'skip_login_help_dialog']);
} }
}
return;
return;
} }
// Prints help dialog information // Prints help dialog information
echo '<div id="login_help_dialog" title="' . echo '<div id="login_help_dialog" title="'.__('Welcome to %s', get_product_name()).'" style="">';
__('Welcome to %s', get_product_name()) . '" style="">';
echo '<div style="font-size: 10pt; margin: 20px;">';
echo '<div style="font-size: 10pt; margin: 20px;">'; echo __(
echo __("If this is your first time using %s, we suggest a few links that'll help you learn more about the software. Monitoring can be overwhelming, but take your time to learn how to harness the power of %s!", "If this is your first time using %s, we suggest a few links that'll help you learn more about the software. Monitoring can be overwhelming, but take your time to learn how to harness the power of %s!",
get_product_name(), get_product_name()); get_product_name(),
echo '</div>'; get_product_name()
);
echo '<div style="">'; echo '</div>';
echo '<table cellspacing=0 cellpadding=0 style="border:1px solid #FFF; width:100%; height: 100%">';
echo '<tr>'; echo '<div style="">';
echo '<td style="border:1px solid #FFF; text-align:center;">'; echo '<table cellspacing=0 cellpadding=0 style="border:1px solid #FFF; width:100%; height: 100%">';
echo '<a href="' . ui_get_full_url(false) . 'general/pandora_help.php?id=main_help" target="_blank" style="text-decoration:none;">' . echo '<tr>';
html_print_image('images/online_help.png', true, echo '<td style="border:1px solid #FFF; text-align:center;">';
array("alt" => __('Online help'), "border" => 0)) . '</a>'; echo '<a href="'.ui_get_full_url(false).'general/pandora_help.php?id=main_help" target="_blank" style="text-decoration:none;">'.html_print_image(
echo '<br style="margin-bottom: 40px;" />'; 'images/online_help.png',
echo '<a style="font-size: 9pt;" href="' . ui_get_full_url(false) . 'general/pandora_help.php?id=main_help" target="_blank">' . __('Online help') . '</a>'; true,
echo '</td>'; [
'alt' => __('Online help'),
echo '<td style="border:1px solid #FFF; text-align:center;">'; 'border' => 0,
echo '<a href="http://pandorafms.com/" target="_blank" style="text-decoration:none;">' . ]
html_print_image('images/enterprise_version.png', true, ).'</a>';
array("alt" => __('Enterprise version'), "border" => 0)) . '</a>'; echo '<br style="margin-bottom: 40px;" />';
echo '<br style="margin-bottom: 40px;" />'; echo '<a style="font-size: 9pt;" href="'.ui_get_full_url(false).'general/pandora_help.php?id=main_help" target="_blank">'.__('Online help').'</a>';
echo '<a style="font-size: 9pt;" href="http://pandorafms.com/" target="_blank">' . __('Enterprise version') . '</a>'; echo '</td>';
echo '</td>';
echo '<td style="border:1px solid #FFF; text-align:center;">';
echo '<td style="border:1px solid #FFF; text-align:center;">'; echo '<a href="http://pandorafms.com/" target="_blank" style="text-decoration:none;">'.html_print_image(
echo '<a href="https://pandorafms.com/forums" target="_blank" style="text-decoration:none;">' . 'images/enterprise_version.png',
html_print_image('images/support.png', true, true,
array("alt" => __('Support'), "border" => 0)) . '</a>'; [
echo '<br style="margin-bottom: 40px;" />'; 'alt' => __('Enterprise version'),
echo '<a style="font-size: 9pt;" href="https://pandorafms.com/forums" target="_blank">' . __('Support') . ' / ' . __('Forums') . '</a>'; 'border' => 0,
echo '</td>'; ]
).'</a>';
echo '<td style="border:1px solid #FFF; text-align:center;">'; echo '<br style="margin-bottom: 40px;" />';
echo '<a href="' . $config['custom_docs_url'] . '" target="_blank" style="text-decoration:none;">' . echo '<a style="font-size: 9pt;" href="http://pandorafms.com/" target="_blank">'.__('Enterprise version').'</a>';
html_print_image('images/documentation.png', true, echo '</td>';
array("alt" => __('Documentation'), "border" => 0)) . '</a>';
echo '<br style="margin-bottom: 40px;" />'; echo '<td style="border:1px solid #FFF; text-align:center;">';
echo '<a style="font-size: 9pt;" href="' . $config['custom_docs_url'] . '" target="_blank">' . __('Documentation') . '</span></a>'; echo '<a href="https://pandorafms.com/forums" target="_blank" style="text-decoration:none;">'.html_print_image(
echo '</td>'; 'images/support.png',
echo '</tr>'; true,
echo '</table>'; [
echo '</div>'; 'alt' => __('Support'),
'border' => 0,
echo '<div style="position:absolute; margin: 0 auto; top: 240px; right: 10px; border: 1px solid #FFF; width: 570px">'; ]
echo '<div style="float: left; margin-top: 3px; margin-left: 0px; width: 80%; text-align: left;">'; ).'</a>';
html_print_checkbox('skip_login_help', 1, false, false, false, 'cursor: \'pointer\''); echo '<br style="margin-bottom: 40px;" />';
echo '&nbsp;<span style="font-size: 12px;">' .__("Click here to don't show again this message") . '</span>'; echo '<a style="font-size: 9pt;" href="https://pandorafms.com/forums" target="_blank">'.__('Support').' / '.__('Forums').'</a>';
echo '</div>'; echo '</td>';
echo '<div style="float: right; width: 20%;">';
html_print_submit_button("Ok", 'hide-login-help', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok" style="width:100px;"'); echo '<td style="border:1px solid #FFF; text-align:center;">';
echo '</div>'; echo '<a href="'.$config['custom_docs_url'].'" target="_blank" style="text-decoration:none;">'.html_print_image(
echo '</div>'; 'images/documentation.png',
true,
echo '</div>'; [
?> 'alt' => __('Documentation'),
'border' => 0,
]
).'</a>';
echo '<br style="margin-bottom: 40px;" />';
echo '<a style="font-size: 9pt;" href="'.$config['custom_docs_url'].'" target="_blank">'.__('Documentation').'</span></a>';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</div>';
echo '<div style="position:absolute; margin: 0 auto; top: 240px; right: 10px; border: 1px solid #FFF; width: 570px">';
echo '<div style="float: left; margin-top: 3px; margin-left: 0px; width: 80%; text-align: left;">';
html_print_checkbox('skip_login_help', 1, false, false, false, 'cursor: \'pointer\'');
echo '&nbsp;<span style="font-size: 12px;">'.__("Click here to don't show again this message").'</span>';
echo '</div>';
echo '<div style="float: right; width: 20%;">';
html_print_submit_button('Ok', 'hide-login-help', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok" style="width:100px;"');
echo '</div>';
echo '</div>';
echo '</div>';
?>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
/* <![CDATA[ */ /* <![CDATA[ */
$(document).ready (function () { $(document).ready (function () {
$("#login_help_dialog").dialog({ $("#login_help_dialog").dialog({
resizable: true, resizable: true,
draggable: true, draggable: true,
modal: true, modal: true,
height: 350, height: 350,
width: 630, width: 630,
overlay: { overlay: {
opacity: 0.5, opacity: 0.5,
background: "black" background: "black"
} }
}); });
$("#submit-hide-login-help").click (function () { $("#submit-hide-login-help").click (function () {
$("#login_help_dialog" ).dialog('close'); $("#login_help_dialog" ).dialog('close');
var skip_login_help = $("#checkbox-skip_login_help").is(':checked'); var skip_login_help = $("#checkbox-skip_login_help").is(':checked');
// Update config['skip_login_help_dialog'] to don't display more this message // Update config['skip_login_help_dialog'] to don't display more this message
if (skip_login_help) { if (skip_login_help) {
jQuery.post ("ajax.php", jQuery.post ("ajax.php",
{"page": "general/login_help_dialog", {"page": "general/login_help_dialog",
"skip_login_help": 1}, "skip_login_help": 1},
function (data) {} function (data) {}
); );
} }
}); });
}); });
/* ]]> */ /* ]]> */

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