From 5e927537b91f69c6a62a973156869fd1741fe827 Mon Sep 17 00:00:00 2001
From: raulmateos <noreply@pandorafms.org>
Date: Sun, 9 Jul 2006 14:58:02 +0000
Subject: [PATCH] - Create new var. for help language in config.php and changed
 in all the .php files where the help was available (Pandora Console) - Change
 tlanguage table definition to add ISO 639-2 compliant lang codes in
 pandoradb.sql file and also changed the name of bable from bb to ast_es in
 pandoradbdata.sql and changed name of include lang files and help files
 (Pandora Console)

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@112 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 .../godmode/agentes/configurar_agente.php     | 12 +++----
 .../godmode/agentes/manage_config.php         |  2 +-
 .../godmode/agentes/modificar_agente.php      |  2 +-
 .../godmode/alertas/configurar_alerta.php     |  2 +-
 .../godmode/alertas/modificar_alerta.php      |  2 +-
 pandora_console/godmode/db/db_audit.php       |  2 +-
 pandora_console/godmode/db/db_event.php       |  2 +-
 pandora_console/godmode/db/db_info.php        |  2 +-
 pandora_console/godmode/db/db_main.php        |  2 +-
 pandora_console/godmode/db/db_purge.php       |  2 +-
 pandora_console/godmode/db/db_refine.php      |  2 +-
 .../godmode/grupos/configurar_grupo.php       |  4 +--
 .../godmode/grupos/lista_grupos.php           |  2 +-
 .../godmode/perfiles/lista_perfiles.php       |  6 ++--
 pandora_console/godmode/setup/setup.php       |  2 +-
 .../godmode/usuarios/configurar_usuarios.php  |  4 +--
 .../godmode/usuarios/lista_usuarios.php       |  2 +-
 pandora_console/help/bb/chap1.php             | 34 -------------------
 pandora_console/help/bb/chap2.php             | 34 -------------------
 pandora_console/help/bb/chap3.php             | 34 -------------------
 pandora_console/help/bb/chap4.php             | 34 -------------------
 pandora_console/help/bb/chap5.php             | 34 -------------------
 pandora_console/help/bb/chap6.php             | 34 -------------------
 pandora_console/help/bb/chap7.php             | 34 -------------------
 pandora_console/help/bb/chap8.php             | 34 -------------------
 pandora_console/help/es/toc.php               |  4 +--
 pandora_console/include/config.php            |  7 +++-
 .../{language_bb.php => language_ast_es.php}  |  0
 .../operation/agentes/estadisticas.php        |  2 +-
 .../operation/agentes/estado_agente.php       |  2 +-
 .../operation/agentes/estado_alertas.php      |  4 +--
 .../agentes/estado_generalagente.php          |  2 +-
 .../operation/agentes/estado_monitores.php    |  2 +-
 .../agentes/estado_ultimopaquete.php          |  2 +-
 .../operation/agentes/exportdata.php          |  4 +--
 .../operation/agentes/status_monitor.php      |  2 +-
 .../operation/events/event_statistics.php     |  2 +-
 pandora_console/operation/events/events.php   |  2 +-
 .../operation/incidents/incident.php          |  2 +-
 .../operation/incidents/incident_detail.php   |  4 +--
 .../operation/incidents/incident_search.php   |  2 +-
 .../incidents/incident_statistics.php         |  2 +-
 pandora_console/operation/users/user.php      |  4 +--
 pandora_console/operation/users/user_edit.php |  2 +-
 .../operation/users/user_statistics.php       |  2 +-
 pandora_console/pandoradb.sql                 |  4 +--
 pandora_console/pandoradb_data.sql            |  2 +-
 47 files changed, 58 insertions(+), 325 deletions(-)
 delete mode 100644 pandora_console/help/bb/chap1.php
 delete mode 100644 pandora_console/help/bb/chap2.php
 delete mode 100644 pandora_console/help/bb/chap3.php
 delete mode 100644 pandora_console/help/bb/chap4.php
 delete mode 100644 pandora_console/help/bb/chap5.php
 delete mode 100644 pandora_console/help/bb/chap6.php
 delete mode 100644 pandora_console/help/bb/chap7.php
 delete mode 100644 pandora_console/help/bb/chap8.php
 rename pandora_console/include/languages/{language_bb.php => language_ast_es.php} (100%)

diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php
index a9751db13d..5adae8a5c3 100644
--- a/pandora_console/godmode/agentes/configurar_agente.php
+++ b/pandora_console/godmode/agentes/configurar_agente.php
@@ -583,8 +583,8 @@ if (give_acl($id_user, 0, "AW")==1) {
 // ========================
 
 echo "<h2>".$lang_label["agent_conf"]."</h2>";
-if (isset($_GET["creacion"])){echo "<h3>".$lang_label["create_agent"]."<a href='help/".substr($language_code,0,2)."/chap3.php#32' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";}
-else {echo "<h3>".$lang_label["update_agent"]."<a href='help/".substr($language_code,0,2)."/chap3.php#32' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";}
+if (isset($_GET["creacion"])){echo "<h3>".$lang_label["create_agent"]."<a href='help/".$help_code."/chap3.php#32' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";}
+else {echo "<h3>".$lang_label["update_agent"]."<a href='help/".$help_code."/chap3.php#32' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";}
 echo '<form name="conf_agent" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">';
 if ($creacion_agente == 1)
 	echo "<input type='hidden' name='create_agent' value='1'>";
@@ -692,7 +692,7 @@ if ( $creacion_agente != 1) {
 	$result=mysql_query($sql1);
 	if ($row=mysql_num_rows($result)){
 		?>
-		<h3><?php echo $lang_label["assigned_modules"]?><a href='help/<?php echo substr($language_code,0,2) ?>/chap3.php#321' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
+		<h3><?php echo $lang_label["assigned_modules"]?><a href='help/<?php echo $help_code ?>/chap3.php#321' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
 		<table width="700" cellpadding="3" cellspacing="3" class="fon">
 		<tr>
 		<th><?php echo $lang_label["module_name"]?>
@@ -760,7 +760,7 @@ $sql1='SELECT * FROM tagente_modulo WHERE id_agente = "'.$id_agente.'"';
 $result=mysql_query($sql1);
 	if ($row=mysql_num_rows($result)){
 
-		echo "<h3>".$lang_label["assigned_alerts"]."<a href='help/".substr($language_code,0,2)."/chap3.php#3222' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+		echo "<h3>".$lang_label["assigned_alerts"]."<a href='help/".$help_code."/chap3.php#3222' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 
 		$color=1;
 		while ($row=mysql_fetch_array($result)){  // All modules of this agent
@@ -838,7 +838,7 @@ else {
 	}
 }
 ?>
-<h3><?php echo $lang_label["module_asociation_form"] ?><a href='help/<?php echo substr($language_code,0,2) ?>/chap3.php#321' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
+<h3><?php echo $lang_label["module_asociation_form"] ?><a href='help/<?php echo $help_code ?>/chap3.php#321' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
 <a name="modules"> <!-- Don't Delete !! -->
 <table width="650" cellpadding="3" cellspacing="3" class="fon">
 <tr><td class='lb' rowspan='8' width='5'>
@@ -948,7 +948,7 @@ if (isset($_POST["oid"])){
 ?>
 
 <!-- Alert Configuration -->
-<h3><?php echo $lang_label["alert_asociation_form"] ?><a href='help/<?php echo substr($language_code,0,2) ?>/chap3.php#3222' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
+<h3><?php echo $lang_label["alert_asociation_form"] ?><a href='help/<?php echo $help_code ?>/chap3.php#3222' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
 
 
 <?php
diff --git a/pandora_console/godmode/agentes/manage_config.php b/pandora_console/godmode/agentes/manage_config.php
index 388b7605ea..df39d7ce6b 100644
--- a/pandora_console/godmode/agentes/manage_config.php
+++ b/pandora_console/godmode/agentes/manage_config.php
@@ -248,7 +248,7 @@ if (comprueba_login() == 0)
 			?>
 							
 			<h2><?php echo $lang_label["agent_conf"] ?></h2>
-			<h3><?php echo $lang_label["config_manage"]; ?><a href="help/<?php echo substr($language_code,0,2);?>/chap3.php#323" target="_help" class="help">&nbsp;<span><?php echo $lang_label["help"]; ?></span></a></h3>
+			<h3><?php echo $lang_label["config_manage"]; ?><a href="help/<?php echo $help_code;?>/chap3.php#323" target="_help" class="help">&nbsp;<span><?php echo $lang_label["help"]; ?></span></a></h3>
 			<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/manage_config&operacion=1">
 			<table width=450 border=0 cellspacing=3 cellpadding=5>
 			<tr>
diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php
index 6e211d87a8..459a23dfff 100644
--- a/pandora_console/godmode/agentes/modificar_agente.php
+++ b/pandora_console/godmode/agentes/modificar_agente.php
@@ -46,7 +46,7 @@ if (give_acl($id_user, 0, "AW")==1) {
         	}
 	}
 	echo "<h2>".$lang_label["agent_conf"]."</h2>";
-	echo "<h3>".$lang_label["agent_defined2"]."<a href='help/".substr($language_code,0,2)."/chap3.php#3' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["agent_defined2"]."<a href='help/".$help_code."/chap3.php#3' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 	
 	// Load icon index from tgrupos
 	$iconindex_g[]="";
diff --git a/pandora_console/godmode/alertas/configurar_alerta.php b/pandora_console/godmode/alertas/configurar_alerta.php
index f1916703c9..a02f5ce53a 100644
--- a/pandora_console/godmode/alertas/configurar_alerta.php
+++ b/pandora_console/godmode/alertas/configurar_alerta.php
@@ -40,7 +40,7 @@ if ( (give_acl($id_user, 0, "LM")==1)){
 	
 ?>
 <h2><?php echo $lang_label["alert_config"];?></h2>
-<h3><?php if (isset($_GET["creacion"])){echo $lang_label["create_alert"];} if (isset($_GET["id_alerta"])){echo $lang_label["mod_alert"];} ?><a href="help/<?php echo substr($language_code,0,2);?>/chap3.php#3221" target="_help" class="help">&nbsp;<span><?php echo $lang_label["help"];?></span></a></h3>
+<h3><?php if (isset($_GET["creacion"])){echo $lang_label["create_alert"];} if (isset($_GET["id_alerta"])){echo $lang_label["mod_alert"];} ?><a href="help/<?php echo $help_code;?>/chap3.php#3221" target="_help" class="help">&nbsp;<span><?php echo $lang_label["help"];?></span></a></h3>
 
 <table width="500" cellspacing="3" cellpadding="3">
 
diff --git a/pandora_console/godmode/alertas/modificar_alerta.php b/pandora_console/godmode/alertas/modificar_alerta.php
index 995b245fa7..0fa0f0cc8c 100644
--- a/pandora_console/godmode/alertas/modificar_alerta.php
+++ b/pandora_console/godmode/alertas/modificar_alerta.php
@@ -51,7 +51,7 @@ if ( (give_acl($id_user, 0, "LM")==1)){
 	}
 
     echo "<h2>".$lang_label["alert_config"]."</h2>";
-	echo "<h3>".$lang_label["alert_defined2"]."<a href='help/".substr($language_code,0,2)."/chap3.php#3221' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["alert_defined2"]."<a href='help/".$help_code."/chap3.php#3221' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 	echo "<table width='500' cellpadding='3' cellspacing='3'>";
 	echo "<th class='w100'>".$lang_label["alertname"];
 	echo "<th>".$lang_label["description"];
diff --git a/pandora_console/godmode/db/db_audit.php b/pandora_console/godmode/db/db_audit.php
index 14e33be6ae..2294ccbe94 100644
--- a/pandora_console/godmode/db/db_audit.php
+++ b/pandora_console/godmode/db/db_audit.php
@@ -85,7 +85,7 @@ if (comprueba_login() == 0)
 	# End of get parameters block
 	
 	echo "<h2>".$lang_label["dbmain_title"]."</h2>";
-	echo "<h3>".$lang_label["db_purge_audit"]."<a href='help/".substr($language_code,0,2)."/chap8.php#841' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["db_purge_audit"]."<a href='help/".$help_code."/chap8.php#841' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 
 	echo "<table cellpadding='4' cellspacing='4' border='0'>";
 	echo "<tr><td class='datos'>";
diff --git a/pandora_console/godmode/db/db_event.php b/pandora_console/godmode/db/db_event.php
index b8038832ef..4127111c9e 100644
--- a/pandora_console/godmode/db/db_event.php
+++ b/pandora_console/godmode/db/db_event.php
@@ -76,7 +76,7 @@ if (comprueba_login() == 0)
 	# End of get parameters block
 	
 	echo "<h2>".$lang_label["dbmain_title"]."</h2>";
-	echo "<h3>".$lang_label["db_purge_event"]."<a href='help/".substr($language_code,0,2)."/chap8.php#842' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["db_purge_event"]."<a href='help/".$help_code."/chap8.php#842' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 
 	echo "<table cellpadding='4' cellspacing='4' border='0'>";
 	echo "<tr><td class='datos'>";	
diff --git a/pandora_console/godmode/db/db_info.php b/pandora_console/godmode/db/db_info.php
index 78b9515b95..b1566ce873 100644
--- a/pandora_console/godmode/db/db_info.php
+++ b/pandora_console/godmode/db/db_info.php
@@ -23,7 +23,7 @@ if (comprueba_login() == 0)
  	*/
 		
 	echo "<h2>".$lang_label["dbmain_title"]."</h2>";
-	echo "<h3>".$lang_label["db_info2"]."<a href='help/".substr($language_code,0,2)."/chap8.php#81' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["db_info2"]."<a href='help/".$help_code."/chap8.php#81' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 	echo "<table border=0>";
 	echo "<tr><td><img src='reporting/fgraph.php?tipo=db_agente_modulo'><br>";
 	echo "<tr><td><br>";
diff --git a/pandora_console/godmode/db/db_main.php b/pandora_console/godmode/db/db_main.php
index 7a772c5726..ecd18fc31e 100644
--- a/pandora_console/godmode/db/db_main.php
+++ b/pandora_console/godmode/db/db_main.php
@@ -23,7 +23,7 @@ if (comprueba_login() == 0)
  	*/
 ?>
 	<h2><?php echo $lang_label["dbmain_title"] ?></h2>
-	<h3><?php echo $lang_label["current_dbsetup"] ?><a href="help/<?php echo substr($language_code,0,2) ?>/chap8.php#8" target="_help" class="help">&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
+	<h3><?php echo $lang_label["current_dbsetup"] ?><a href="help/<?php echo $help_code ?>/chap8.php#8" target="_help" class="help">&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
 	<table width=550 cellspacing=3 cellpadding=3 border=0>
 	<tr><td>
 	<i><?php echo $lang_label["days_compact"]; ?>:</i>&nbsp;<b><?php echo $days_compact; ?></b><br><br>
diff --git a/pandora_console/godmode/db/db_purge.php b/pandora_console/godmode/db/db_purge.php
index 13802a159c..5005883acc 100644
--- a/pandora_console/godmode/db/db_purge.php
+++ b/pandora_console/godmode/db/db_purge.php
@@ -23,7 +23,7 @@ if (comprueba_login() == 0)
  	*/
 	 ?>	
 	<h2><?php echo $lang_label["dbmain_title"] ?></h2>
-	<h3><?php echo $lang_label["db_purge"] ?><a href='help/<?php echo substr($language_code,0,2) ?>/chap8.php#8' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
+	<h3><?php echo $lang_label["db_purge"] ?><a href='help/<?php echo $help_code ?>/chap8.php#8' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
 	<img src="reporting/fgraph.php?tipo=db_agente_purge&id=-1"><br><br>
 	<h3><?php echo $lang_label["get_data_agent"] ?></h3>
 	<?php
diff --git a/pandora_console/godmode/db/db_refine.php b/pandora_console/godmode/db/db_refine.php
index c341f5aefe..8c4f9637db 100644
--- a/pandora_console/godmode/db/db_refine.php
+++ b/pandora_console/godmode/db/db_refine.php
@@ -47,7 +47,7 @@ if (comprueba_login() == 0)
 		} else { // Form view
 			?>
 			<h2><?php echo $lang_label["dbmain_title"]; ?></h2>
-			<h3><?php echo $lang_label["db_refine"]; ?><a href='help/<?php echo substr($language_code,0,2)?>/chap8.php#831' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3> 
+			<h3><?php echo $lang_label["db_refine"]; ?><a href='help/<?php echo $help_code?>/chap8.php#831' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3> 
 			<form method="post" action="index.php?sec=gdbman&sec2=godmode/db/db_refine&operacion=1">
 			<table width='500' border='0' cellspacing='3' cellpadding='5'>
 			<tr>
diff --git a/pandora_console/godmode/grupos/configurar_grupo.php b/pandora_console/godmode/grupos/configurar_grupo.php
index eae8d2121a..caa2da964b 100644
--- a/pandora_console/godmode/grupos/configurar_grupo.php
+++ b/pandora_console/godmode/grupos/configurar_grupo.php
@@ -38,8 +38,8 @@ if (comprueba_login() == 0)
 	}
 
 	echo "<h2>".$lang_label["group_management"]."</h2>";
-	if (isset($_GET["creacion_grupo"])) {echo "<h3>".$lang_label["create_group"]."<a href='help/".substr($language_code,0,2)."/chap3.php#31' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";}
-	if (isset($_GET["id_grupo"])) {echo "<h3>".$lang_label["update_group"]."<a href='help/".substr($language_code,0,2)."/chap3.php#31' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";}
+	if (isset($_GET["creacion_grupo"])) {echo "<h3>".$lang_label["create_group"]."<a href='help/".$help_code."/chap3.php#31' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";}
+	if (isset($_GET["id_grupo"])) {echo "<h3>".$lang_label["update_group"]."<a href='help/".$help_code."/chap3.php#31' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";}
 	
 ?>
 <table width="450">
diff --git a/pandora_console/godmode/grupos/lista_grupos.php b/pandora_console/godmode/grupos/lista_grupos.php
index 15497c6033..17be797838 100644
--- a/pandora_console/godmode/grupos/lista_grupos.php
+++ b/pandora_console/godmode/grupos/lista_grupos.php
@@ -47,7 +47,7 @@ if (comprueba_login() == 0)
 			echo "<h3 class='suc'>".$lang_label["delete_group_ok"]."</h3>";
 	}
 	echo "<h2>".$lang_label["group_management"]."</h2>";	
-	echo "<h3>".$lang_label["definedgroups"]."<a href='help/".substr($language_code,0,2)."/chap3.php#31' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["definedgroups"]."<a href='help/".$help_code."/chap3.php#31' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 
 	// Load icon index from tgrupos
 	$iconindex_g[]="";
diff --git a/pandora_console/godmode/perfiles/lista_perfiles.php b/pandora_console/godmode/perfiles/lista_perfiles.php
index eb8765f7b6..410a577d2d 100644
--- a/pandora_console/godmode/perfiles/lista_perfiles.php
+++ b/pandora_console/godmode/perfiles/lista_perfiles.php
@@ -126,9 +126,9 @@ if (comprueba_login() == 0)
 		}
 		echo '<h2>'.$lang_label["profile_title"].'</h2>';     
 		echo (isset($_GET["new_profile"]))?
-		('<h3>'.$lang_label["create_profile"].'<a href="help/'.substr($language_code,0,2).'/chap2.php#21" target="_help" class="help">&nbsp;<span>'.$lang_label["help"].'</span></a></h3>'):
-		((isset($_GET["edit_profile"]))?('<h3>'.$lang_label["update_profile"].'<a href="help/'.substr($language_code,0,2).'/chap2.php#21" target="_help" class="help">&nbsp;<span>'.$lang_label["help"].'</span></a></h3>'):
-		('<h3>'.$lang_label["definedprofiles"].'<a href="help/'.substr($language_code,0,2).'/chap2.php#21" target="_help"  class="help">&nbsp;<span>'.$lang_label["help"].'</span></a></h3>'));
+		('<h3>'.$lang_label["create_profile"].'<a href="help/'.$help_code.'/chap2.php#21" target="_help" class="help">&nbsp;<span>'.$lang_label["help"].'</span></a></h3>'):
+		((isset($_GET["edit_profile"]))?('<h3>'.$lang_label["update_profile"].'<a href="help/'.$help_code.'/chap2.php#21" target="_help" class="help">&nbsp;<span>'.$lang_label["help"].'</span></a></h3>'):
+		('<h3>'.$lang_label["definedprofiles"].'<a href="help/'.$help_code.'/chap2.php#21" target="_help"  class="help">&nbsp;<span>'.$lang_label["help"].'</span></a></h3>'));
 		// Form to manage date
 		if (isset ($id_perfil)){ // There are values defined, let's show form with data for INSERT or UPDATE
 			echo "<table width='400' cellpadding='3' cellspacing='3'>";
diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php
index 8aea225d0d..ea536acafa 100644
--- a/pandora_console/godmode/setup/setup.php
+++ b/pandora_console/godmode/setup/setup.php
@@ -33,7 +33,7 @@ if (comprueba_login() == 0)
 		$result2=mysql_query("UPDATE tconfig SET VALUE='".$config_bgimage."' WHERE token='bgimage'");
 	}	
 	echo "<h2>".$lang_label["setup_screen"]."</h2>";
-	echo "<h3>".$lang_label["general_config"]."<a href='help/".substr($language_code,0,2)."/chap7.php#7' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["general_config"]."<a href='help/".$help_code."/chap7.php#7' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 	echo "<form name='setup' method='POST' action='index.php?sec=gsetup&amp;sec2=godmode/setup/setup&update=1'>";
 	echo '<table width="500" cellpadding="3" cellspacing="3">';
 	echo '<tr><td class="lb" rowspan="9" width="5"></td><td class="datos">'.$lang_label["language_code"];
diff --git a/pandora_console/godmode/usuarios/configurar_usuarios.php b/pandora_console/godmode/usuarios/configurar_usuarios.php
index 4828ecb386..4e80e49c64 100644
--- a/pandora_console/godmode/usuarios/configurar_usuarios.php
+++ b/pandora_console/godmode/usuarios/configurar_usuarios.php
@@ -136,11 +136,11 @@ if (comprueba_login() == 0)
 		echo "<h2>".$lang_label["user_management"]."</h2>";
 		if (isset($_GET["alta"])){
 				if ($_GET["alta"]==1){
-				echo '<h3>'.$lang_label["create_user"].'<a href="help/'.substr($language_code,0,2).'/chap2.php#22" target="_help" class="help">&nbsp;<span>'.$lang_label["help"].'</span></a></h3>';
+				echo '<h3>'.$lang_label["create_user"].'<a href="help/'.$help_code.'/chap2.php#22" target="_help" class="help">&nbsp;<span>'.$lang_label["help"].'</span></a></h3>';
 				}
 		}
 		if (isset($_GET["id_usuario_mio"]) OR isset($_GET["nuevo_usuario"])){
-			echo '<h3>'.$lang_label["update_user"].'<a href="help/'.substr($language_code,0,2).'/chap2.php#22" target="_help" class="help">&nbsp;<span>'.$lang_label["help"].'</span></a></h3>';
+			echo '<h3>'.$lang_label["update_user"].'<a href="help/'.$help_code.'/chap2.php#22" target="_help" class="help">&nbsp;<span>'.$lang_label["help"].'</span></a></h3>';
 		}
 
 ?> 
diff --git a/pandora_console/godmode/usuarios/lista_usuarios.php b/pandora_console/godmode/usuarios/lista_usuarios.php
index fa71e9fe9c..cae6cf2672 100644
--- a/pandora_console/godmode/usuarios/lista_usuarios.php
+++ b/pandora_console/godmode/usuarios/lista_usuarios.php
@@ -28,7 +28,7 @@ if (comprueba_login() == 0)
 ?>
 
 <h2><?php echo $lang_label["user_management"] ?></h2>
-<h3><?php echo $lang_label["users"] ?><a href="help/<?php echo substr($language_code,0,2); ?>/chap2.php#22" target="_help" class="help">&nbsp;<span><?php echo $lang_label["help"]; ?></span></a></h3>
+<h3><?php echo $lang_label["users"] ?><a href="help/<?php echo $help_code; ?>/chap2.php#22" target="_help" class="help">&nbsp;<span><?php echo $lang_label["help"]; ?></span></a></h3>
  
 <table cellpadding=3 cellspacing=3 width=550>
 <th class="w80"><?php echo $lang_label["user_ID"]?>
diff --git a/pandora_console/help/bb/chap1.php b/pandora_console/help/bb/chap1.php
deleted file mode 100644
index 66482ce896..0000000000
--- a/pandora_console/help/bb/chap1.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-// Pandora - The Free Monitoring System
-// This code is protected by GPL license.
-// Este codigo esta protegido por la licencia GPL.
-// Sancho Lerena <slerena@gmail.com>, 2003-2006
-// Raul Mateos <raulofpandora@gmail.com>, 2004-2006
-?>
-<html>
-<head>
-<title>Pandora - Sistema de monitorizaci&oacute;n de Software Libre / Free Software Monitoring System</title>
-<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css">
-<style>
-div.logo {float:left;}
-div.toc {padding-left: 200px;}
-div.rayah {clear:both; border-top: 1px solid #708090; width: 100%;}
-</style>
-
-<div class='logo'>
-<img src="../../images/logo_menu.gif" alt='logo'><h1>Pandora 1.2 Help / Ayuda de Pandora v1.2</h1>
-</div>
-
-<div class="rayah">
-<p>Pandora is a GPL Software Project. English version &copy; Sancho Lerena 2003-2005, David villanueva 2004-2005, Alex Arnal 2005, Ra&uacute;l Mateos 2004-2005.</p>
-<p>Pandora es un proyecto de software GPL. Versi&oacute;n en espa&ntilde;ol&copy; Sancho Lerena 2003-2005, David Villanueva 2004-2005 y Ra&uacute;l Mateos 2004-2005.</p>
-</div>
-
-<h1>Not translated yet / No se ha traducido todav&iacute;a</h1>
-
-<p>Please use <a href="../en/toc.php">English version</a> or <a href="../es/toc.php"> Spanish version</a>.</p>
-<p>Utiliza la versi&oacute;n en <a href="../es/toc.php">castellano (espa&ntilde;ol)</a> o en <a href="../en/toc.php">ingl&eacute;s.</a>
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/pandora_console/help/bb/chap2.php b/pandora_console/help/bb/chap2.php
deleted file mode 100644
index 66482ce896..0000000000
--- a/pandora_console/help/bb/chap2.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-// Pandora - The Free Monitoring System
-// This code is protected by GPL license.
-// Este codigo esta protegido por la licencia GPL.
-// Sancho Lerena <slerena@gmail.com>, 2003-2006
-// Raul Mateos <raulofpandora@gmail.com>, 2004-2006
-?>
-<html>
-<head>
-<title>Pandora - Sistema de monitorizaci&oacute;n de Software Libre / Free Software Monitoring System</title>
-<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css">
-<style>
-div.logo {float:left;}
-div.toc {padding-left: 200px;}
-div.rayah {clear:both; border-top: 1px solid #708090; width: 100%;}
-</style>
-
-<div class='logo'>
-<img src="../../images/logo_menu.gif" alt='logo'><h1>Pandora 1.2 Help / Ayuda de Pandora v1.2</h1>
-</div>
-
-<div class="rayah">
-<p>Pandora is a GPL Software Project. English version &copy; Sancho Lerena 2003-2005, David villanueva 2004-2005, Alex Arnal 2005, Ra&uacute;l Mateos 2004-2005.</p>
-<p>Pandora es un proyecto de software GPL. Versi&oacute;n en espa&ntilde;ol&copy; Sancho Lerena 2003-2005, David Villanueva 2004-2005 y Ra&uacute;l Mateos 2004-2005.</p>
-</div>
-
-<h1>Not translated yet / No se ha traducido todav&iacute;a</h1>
-
-<p>Please use <a href="../en/toc.php">English version</a> or <a href="../es/toc.php"> Spanish version</a>.</p>
-<p>Utiliza la versi&oacute;n en <a href="../es/toc.php">castellano (espa&ntilde;ol)</a> o en <a href="../en/toc.php">ingl&eacute;s.</a>
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/pandora_console/help/bb/chap3.php b/pandora_console/help/bb/chap3.php
deleted file mode 100644
index 66482ce896..0000000000
--- a/pandora_console/help/bb/chap3.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-// Pandora - The Free Monitoring System
-// This code is protected by GPL license.
-// Este codigo esta protegido por la licencia GPL.
-// Sancho Lerena <slerena@gmail.com>, 2003-2006
-// Raul Mateos <raulofpandora@gmail.com>, 2004-2006
-?>
-<html>
-<head>
-<title>Pandora - Sistema de monitorizaci&oacute;n de Software Libre / Free Software Monitoring System</title>
-<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css">
-<style>
-div.logo {float:left;}
-div.toc {padding-left: 200px;}
-div.rayah {clear:both; border-top: 1px solid #708090; width: 100%;}
-</style>
-
-<div class='logo'>
-<img src="../../images/logo_menu.gif" alt='logo'><h1>Pandora 1.2 Help / Ayuda de Pandora v1.2</h1>
-</div>
-
-<div class="rayah">
-<p>Pandora is a GPL Software Project. English version &copy; Sancho Lerena 2003-2005, David villanueva 2004-2005, Alex Arnal 2005, Ra&uacute;l Mateos 2004-2005.</p>
-<p>Pandora es un proyecto de software GPL. Versi&oacute;n en espa&ntilde;ol&copy; Sancho Lerena 2003-2005, David Villanueva 2004-2005 y Ra&uacute;l Mateos 2004-2005.</p>
-</div>
-
-<h1>Not translated yet / No se ha traducido todav&iacute;a</h1>
-
-<p>Please use <a href="../en/toc.php">English version</a> or <a href="../es/toc.php"> Spanish version</a>.</p>
-<p>Utiliza la versi&oacute;n en <a href="../es/toc.php">castellano (espa&ntilde;ol)</a> o en <a href="../en/toc.php">ingl&eacute;s.</a>
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/pandora_console/help/bb/chap4.php b/pandora_console/help/bb/chap4.php
deleted file mode 100644
index 66482ce896..0000000000
--- a/pandora_console/help/bb/chap4.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-// Pandora - The Free Monitoring System
-// This code is protected by GPL license.
-// Este codigo esta protegido por la licencia GPL.
-// Sancho Lerena <slerena@gmail.com>, 2003-2006
-// Raul Mateos <raulofpandora@gmail.com>, 2004-2006
-?>
-<html>
-<head>
-<title>Pandora - Sistema de monitorizaci&oacute;n de Software Libre / Free Software Monitoring System</title>
-<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css">
-<style>
-div.logo {float:left;}
-div.toc {padding-left: 200px;}
-div.rayah {clear:both; border-top: 1px solid #708090; width: 100%;}
-</style>
-
-<div class='logo'>
-<img src="../../images/logo_menu.gif" alt='logo'><h1>Pandora 1.2 Help / Ayuda de Pandora v1.2</h1>
-</div>
-
-<div class="rayah">
-<p>Pandora is a GPL Software Project. English version &copy; Sancho Lerena 2003-2005, David villanueva 2004-2005, Alex Arnal 2005, Ra&uacute;l Mateos 2004-2005.</p>
-<p>Pandora es un proyecto de software GPL. Versi&oacute;n en espa&ntilde;ol&copy; Sancho Lerena 2003-2005, David Villanueva 2004-2005 y Ra&uacute;l Mateos 2004-2005.</p>
-</div>
-
-<h1>Not translated yet / No se ha traducido todav&iacute;a</h1>
-
-<p>Please use <a href="../en/toc.php">English version</a> or <a href="../es/toc.php"> Spanish version</a>.</p>
-<p>Utiliza la versi&oacute;n en <a href="../es/toc.php">castellano (espa&ntilde;ol)</a> o en <a href="../en/toc.php">ingl&eacute;s.</a>
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/pandora_console/help/bb/chap5.php b/pandora_console/help/bb/chap5.php
deleted file mode 100644
index 66482ce896..0000000000
--- a/pandora_console/help/bb/chap5.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-// Pandora - The Free Monitoring System
-// This code is protected by GPL license.
-// Este codigo esta protegido por la licencia GPL.
-// Sancho Lerena <slerena@gmail.com>, 2003-2006
-// Raul Mateos <raulofpandora@gmail.com>, 2004-2006
-?>
-<html>
-<head>
-<title>Pandora - Sistema de monitorizaci&oacute;n de Software Libre / Free Software Monitoring System</title>
-<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css">
-<style>
-div.logo {float:left;}
-div.toc {padding-left: 200px;}
-div.rayah {clear:both; border-top: 1px solid #708090; width: 100%;}
-</style>
-
-<div class='logo'>
-<img src="../../images/logo_menu.gif" alt='logo'><h1>Pandora 1.2 Help / Ayuda de Pandora v1.2</h1>
-</div>
-
-<div class="rayah">
-<p>Pandora is a GPL Software Project. English version &copy; Sancho Lerena 2003-2005, David villanueva 2004-2005, Alex Arnal 2005, Ra&uacute;l Mateos 2004-2005.</p>
-<p>Pandora es un proyecto de software GPL. Versi&oacute;n en espa&ntilde;ol&copy; Sancho Lerena 2003-2005, David Villanueva 2004-2005 y Ra&uacute;l Mateos 2004-2005.</p>
-</div>
-
-<h1>Not translated yet / No se ha traducido todav&iacute;a</h1>
-
-<p>Please use <a href="../en/toc.php">English version</a> or <a href="../es/toc.php"> Spanish version</a>.</p>
-<p>Utiliza la versi&oacute;n en <a href="../es/toc.php">castellano (espa&ntilde;ol)</a> o en <a href="../en/toc.php">ingl&eacute;s.</a>
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/pandora_console/help/bb/chap6.php b/pandora_console/help/bb/chap6.php
deleted file mode 100644
index 66482ce896..0000000000
--- a/pandora_console/help/bb/chap6.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-// Pandora - The Free Monitoring System
-// This code is protected by GPL license.
-// Este codigo esta protegido por la licencia GPL.
-// Sancho Lerena <slerena@gmail.com>, 2003-2006
-// Raul Mateos <raulofpandora@gmail.com>, 2004-2006
-?>
-<html>
-<head>
-<title>Pandora - Sistema de monitorizaci&oacute;n de Software Libre / Free Software Monitoring System</title>
-<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css">
-<style>
-div.logo {float:left;}
-div.toc {padding-left: 200px;}
-div.rayah {clear:both; border-top: 1px solid #708090; width: 100%;}
-</style>
-
-<div class='logo'>
-<img src="../../images/logo_menu.gif" alt='logo'><h1>Pandora 1.2 Help / Ayuda de Pandora v1.2</h1>
-</div>
-
-<div class="rayah">
-<p>Pandora is a GPL Software Project. English version &copy; Sancho Lerena 2003-2005, David villanueva 2004-2005, Alex Arnal 2005, Ra&uacute;l Mateos 2004-2005.</p>
-<p>Pandora es un proyecto de software GPL. Versi&oacute;n en espa&ntilde;ol&copy; Sancho Lerena 2003-2005, David Villanueva 2004-2005 y Ra&uacute;l Mateos 2004-2005.</p>
-</div>
-
-<h1>Not translated yet / No se ha traducido todav&iacute;a</h1>
-
-<p>Please use <a href="../en/toc.php">English version</a> or <a href="../es/toc.php"> Spanish version</a>.</p>
-<p>Utiliza la versi&oacute;n en <a href="../es/toc.php">castellano (espa&ntilde;ol)</a> o en <a href="../en/toc.php">ingl&eacute;s.</a>
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/pandora_console/help/bb/chap7.php b/pandora_console/help/bb/chap7.php
deleted file mode 100644
index 66482ce896..0000000000
--- a/pandora_console/help/bb/chap7.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-// Pandora - The Free Monitoring System
-// This code is protected by GPL license.
-// Este codigo esta protegido por la licencia GPL.
-// Sancho Lerena <slerena@gmail.com>, 2003-2006
-// Raul Mateos <raulofpandora@gmail.com>, 2004-2006
-?>
-<html>
-<head>
-<title>Pandora - Sistema de monitorizaci&oacute;n de Software Libre / Free Software Monitoring System</title>
-<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css">
-<style>
-div.logo {float:left;}
-div.toc {padding-left: 200px;}
-div.rayah {clear:both; border-top: 1px solid #708090; width: 100%;}
-</style>
-
-<div class='logo'>
-<img src="../../images/logo_menu.gif" alt='logo'><h1>Pandora 1.2 Help / Ayuda de Pandora v1.2</h1>
-</div>
-
-<div class="rayah">
-<p>Pandora is a GPL Software Project. English version &copy; Sancho Lerena 2003-2005, David villanueva 2004-2005, Alex Arnal 2005, Ra&uacute;l Mateos 2004-2005.</p>
-<p>Pandora es un proyecto de software GPL. Versi&oacute;n en espa&ntilde;ol&copy; Sancho Lerena 2003-2005, David Villanueva 2004-2005 y Ra&uacute;l Mateos 2004-2005.</p>
-</div>
-
-<h1>Not translated yet / No se ha traducido todav&iacute;a</h1>
-
-<p>Please use <a href="../en/toc.php">English version</a> or <a href="../es/toc.php"> Spanish version</a>.</p>
-<p>Utiliza la versi&oacute;n en <a href="../es/toc.php">castellano (espa&ntilde;ol)</a> o en <a href="../en/toc.php">ingl&eacute;s.</a>
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/pandora_console/help/bb/chap8.php b/pandora_console/help/bb/chap8.php
deleted file mode 100644
index 66482ce896..0000000000
--- a/pandora_console/help/bb/chap8.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-// Pandora - The Free Monitoring System
-// This code is protected by GPL license.
-// Este codigo esta protegido por la licencia GPL.
-// Sancho Lerena <slerena@gmail.com>, 2003-2006
-// Raul Mateos <raulofpandora@gmail.com>, 2004-2006
-?>
-<html>
-<head>
-<title>Pandora - Sistema de monitorizaci&oacute;n de Software Libre / Free Software Monitoring System</title>
-<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css">
-<style>
-div.logo {float:left;}
-div.toc {padding-left: 200px;}
-div.rayah {clear:both; border-top: 1px solid #708090; width: 100%;}
-</style>
-
-<div class='logo'>
-<img src="../../images/logo_menu.gif" alt='logo'><h1>Pandora 1.2 Help / Ayuda de Pandora v1.2</h1>
-</div>
-
-<div class="rayah">
-<p>Pandora is a GPL Software Project. English version &copy; Sancho Lerena 2003-2005, David villanueva 2004-2005, Alex Arnal 2005, Ra&uacute;l Mateos 2004-2005.</p>
-<p>Pandora es un proyecto de software GPL. Versi&oacute;n en espa&ntilde;ol&copy; Sancho Lerena 2003-2005, David Villanueva 2004-2005 y Ra&uacute;l Mateos 2004-2005.</p>
-</div>
-
-<h1>Not translated yet / No se ha traducido todav&iacute;a</h1>
-
-<p>Please use <a href="../en/toc.php">English version</a> or <a href="../es/toc.php"> Spanish version</a>.</p>
-<p>Utiliza la versi&oacute;n en <a href="../es/toc.php">castellano (espa&ntilde;ol)</a> o en <a href="../en/toc.php">ingl&eacute;s.</a>
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/pandora_console/help/es/toc.php b/pandora_console/help/es/toc.php
index ba72c81c8c..598cfb0b36 100644
--- a/pandora_console/help/es/toc.php
+++ b/pandora_console/help/es/toc.php
@@ -30,8 +30,8 @@ dd.help_t4 {margin-left: 92px; margin-top: 3px; margin-bottom: 2px;}
 
 <dl>
 
-<dd class="help_t1"><a href="chap1.php#1"><h1>1. Introduction</h1></a></dd>
-<dd class="help_t2"><a href="chap1.php#11">1.1. Administraci�n de Pandora</a></dd>
+<dd class="help_t1"><a href="chap1.php#1"><h1>1. Introducci&oacute;n</h1></a></dd>
+<dd class="help_t2"><a href="chap1.php#11">1.1. Administraci&oacute;n de Pandora</a></dd>
 
 <dd class="help_t1"><a href="chap2.php#2"><h1>2. Usuarios</h1></a></dd>
 <dd class="help_t2"><a href="chap2.php#21">2.1. Gesti&oacute;n de perfiles</a></dd>
diff --git a/pandora_console/include/config.php b/pandora_console/include/config.php
index f5aac6663c..c8f52b56d2 100644
--- a/pandora_console/include/config.php
+++ b/pandora_console/include/config.php
@@ -52,4 +52,9 @@ while ($row2=mysql_fetch_array($result2)){
 						break;
 	}
 }
-?>
+if ($language_code == 'ast_es') {
+	$help_code='ast';
+	}
+else $help_code = substr($language_code,0,2);
+
+?>
\ No newline at end of file
diff --git a/pandora_console/include/languages/language_bb.php b/pandora_console/include/languages/language_ast_es.php
similarity index 100%
rename from pandora_console/include/languages/language_bb.php
rename to pandora_console/include/languages/language_ast_es.php
diff --git a/pandora_console/operation/agentes/estadisticas.php b/pandora_console/operation/agentes/estadisticas.php
index 54cf81e70f..2b9072bbb6 100644
--- a/pandora_console/operation/agentes/estadisticas.php
+++ b/pandora_console/operation/agentes/estadisticas.php
@@ -12,7 +12,7 @@ if (comprueba_login() == 0){
 	$iduser_temp=$_SESSION['id_usuario'];
 	if (give_acl($iduser_temp, 0, "AR") == 1){
 		echo "<h2>".$lang_label["ag_title"]."</h2>";
-		echo "<h3>".$lang_label["db_stat_agent"]."<a href='help/".substr($language_code,0,2)."/chap3.php#337' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+		echo "<h3>".$lang_label["db_stat_agent"]."<a href='help/".$help_code."/chap3.php#337' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 		echo "<table border=0>";
 		echo "<tr><td><img src='reporting/fgraph.php?tipo=db_agente_modulo'><br>";
 		echo "<tr><td><br>";
diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php
index 84f36f905c..71444cef07 100644
--- a/pandora_console/operation/agentes/estado_agente.php
+++ b/pandora_console/operation/agentes/estado_agente.php
@@ -24,7 +24,7 @@ if (comprueba_login() == 0) {
 		$ag_group = $_GET["ag_group_refresh"];
 	}
 	echo "<h2>".$lang_label["ag_title"]."</h2>";
-	echo "<h3>".$lang_label["summary"]."<a href='help/".substr($language_code,0,2)."/chap3.php#331' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["summary"]."<a href='help/".$help_code."/chap3.php#331' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 
 	$iduser_temp=$_SESSION['id_usuario'];
 	
diff --git a/pandora_console/operation/agentes/estado_alertas.php b/pandora_console/operation/agentes/estado_alertas.php
index ae4cbdf289..5f352db9ba 100644
--- a/pandora_console/operation/agentes/estado_alertas.php
+++ b/pandora_console/operation/agentes/estado_alertas.php
@@ -22,7 +22,7 @@ if (comprueba_login() == 0) {
  	if ((give_acl($id_user, 0, "AR")==1) or (give_acl($id_user,0,"AW")) or (dame_admin($id_user)==1)) {
 
 	if (isset($_GET["id_agente"])){
-		echo "<h3>".$lang_label["alert_listing"]."<a href='help/".substr($language_code,0,2)."/chap3.php#3324' target='_help' class='help'><span>".$lang_label["help"]."</span></a></h3>";
+		echo "<h3>".$lang_label["alert_listing"]."<a href='help/".$help_code."/chap3.php#3324' target='_help' class='help'><span>".$lang_label["help"]."</span></a></h3>";
 		$id_agente = $_GET["id_agente"];
 		$query_gen='SELECT talerta_agente_modulo.id_alerta, talerta_agente_modulo.descripcion, talerta_agente_modulo.last_fired, talerta_agente_modulo.times_fired, tagente_modulo.nombre, talerta_agente_modulo.dis_max, talerta_agente_modulo.dis_min, talerta_agente_modulo.max_alerts, talerta_agente_modulo.time_threshold, talerta_agente_modulo.min_alerts, talerta_agente_modulo.id_agente_modulo, tagente_modulo.id_agente_modulo FROM tagente_modulo, talerta_agente_modulo WHERE tagente_modulo.id_agente = '.$id_agente.' AND tagente_modulo.id_agente_modulo = talerta_agente_modulo.id_agente_modulo order by tagente_modulo.nombre';
 		$result_gen=mysql_query($query_gen);
@@ -59,7 +59,7 @@ if (comprueba_login() == 0) {
 	else 
 	{
 		echo "<h2>".$lang_label["ag_title"]."</h2>";
-		echo "<h3>".$lang_label["alert_listing"]."<a href='help/".substr($language_code,0,2)."/chap3.php#335' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+		echo "<h3>".$lang_label["alert_listing"]."<a href='help/".$help_code."/chap3.php#335' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 		$iduser_temp=$_SESSION['id_usuario'];
 		if (isset($_POST["ag_group"]))
 			$ag_group = $_POST["ag_group"];
diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php
index bcb283a822..3173191fb5 100644
--- a/pandora_console/operation/agentes/estado_generalagente.php
+++ b/pandora_console/operation/agentes/estado_generalagente.php
@@ -49,7 +49,7 @@ if (comprueba_login() == 0) {
 	}
 	
 	echo "<h2>".$lang_label["ag_title"]."</h2>";
-	echo "<h3>".$lang_label["view_agent_general_data"]."<a href='help/".substr($language_code,0,2)."/chap3.php#3321' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["view_agent_general_data"]."<a href='help/".$help_code."/chap3.php#3321' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 	echo '<table cellspacing=3 cellpadding=3 border=0 width=750>';	
 	echo '<tr><td class="datos"><b>'.$lang_label["agent_name"].'</b> <td class="datos">'.salida_limpia($nombre_agente);
 
diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php
index 8bfb849e68..4441cc8b73 100644
--- a/pandora_console/operation/agentes/estado_monitores.php
+++ b/pandora_console/operation/agentes/estado_monitores.php
@@ -24,7 +24,7 @@ if (comprueba_login() == 0) {
 	if (isset($_GET["id_agente"])){
 		$id_agente = $_GET["id_agente"];
 	}
-	echo "<h3>".$lang_label["monitor_listing"]."<a href='help/".substr($language_code,0,2)."/chap3.php#3323' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["monitor_listing"]."<a href='help/".$help_code."/chap3.php#3323' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 	// Get all module from agent
 	$sql_t='SELECT * FROM tagente_estado, tagente_modulo WHERE tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.id_agente='.$id_agente.' and tagente_estado.estado != 100 order by tagente_modulo.nombre';
 	$result_t=mysql_query($sql_t);
diff --git a/pandora_console/operation/agentes/estado_ultimopaquete.php b/pandora_console/operation/agentes/estado_ultimopaquete.php
index 2791f159a4..416819090d 100644
--- a/pandora_console/operation/agentes/estado_ultimopaquete.php
+++ b/pandora_console/operation/agentes/estado_ultimopaquete.php
@@ -72,7 +72,7 @@ if (comprueba_login() == 0) {
 	//$sql3='SELECT * FROM tagente_modulo WHERE id_agente = '.$id_agente.' order by id_module_group';
 	$label_group=0;
 	$last_label = "";
-	echo "<h3>".$lang_label["last_data_chunk"]."<a href='help/".substr($language_code,0,2)."/chap3.php#3322' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["last_data_chunk"]."<a href='help/".$help_code."/chap3.php#3322' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 	$result3=mysql_query($sql3);
 	if (mysql_num_rows ($result3)) {
 	echo "<table width='750' cellpadding='3' cellspacing='3'><th>X<th>".$lang_label["module_name"];
diff --git a/pandora_console/operation/agentes/exportdata.php b/pandora_console/operation/agentes/exportdata.php
index c6cff657e0..b19738bfc3 100644
--- a/pandora_console/operation/agentes/exportdata.php
+++ b/pandora_console/operation/agentes/exportdata.php
@@ -13,7 +13,7 @@ if (comprueba_login() == 0)
 		if ((isset($_GET["operacion"])) AND (! isset($_POST["update_agent"]))){
  			if (isset ($_POST["copiar"])){ // Export main button
 				echo "<h2>".$lang_label["ag_title"]."</h2>";
-				echo "<h3>".$lang_label["export_title"]."<a href='help/".substr($language_code,0,2)."/chap3.php#336' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+				echo "<h3>".$lang_label["export_title"]."<a href='help/".$help_code."/chap3.php#336' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 				if (isset ($_POST["origen_modulo"])){
 				if (isset ($_POST["csv"])) // CSV version
 					$csv = 1;
@@ -64,7 +64,7 @@ if (comprueba_login() == 0)
 		} else { // Form view
 			?>
 			<h2><?php echo $lang_label["ag_title"] ?></h2>
-			<h3><?php echo $lang_label["export_data"] ?><a href='help/<?php echo substr($language_code,0,2);?>/chap3.php#336' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
+			<h3><?php echo $lang_label["export_data"] ?><a href='help/<?php echo $help_code;?>/chap3.php#336' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
 			<form method="post" action="index.php?sec=estado&sec2=operation/agentes/exportdata&operacion=1" name="export_form">
 			<table width=550 border=0 cellspacing=3 cellpadding=5 class=fon>
 			<tr>
diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php
index dc9b67a154..1b3f9a3c1a 100644
--- a/pandora_console/operation/agentes/status_monitor.php
+++ b/pandora_console/operation/agentes/status_monitor.php
@@ -30,7 +30,7 @@ if (comprueba_login() == 0) {
 	}
 
 	echo "<h2>".$lang_label["ag_title"]."</h2>";
-	echo "<h3>".$lang_label["monitor_listing"]."<a href='help/".substr($language_code,0,2)."/chap3.php#334' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["monitor_listing"]."<a href='help/".$help_code."/chap3.php#334' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 	$iduser_temp=$_SESSION['id_usuario'];
 	
 
diff --git a/pandora_console/operation/events/event_statistics.php b/pandora_console/operation/events/event_statistics.php
index c975e56ed7..8de65cea84 100644
--- a/pandora_console/operation/events/event_statistics.php
+++ b/pandora_console/operation/events/event_statistics.php
@@ -13,7 +13,7 @@ if (comprueba_login() == 0) {
 	$id_usuario =$_SESSION["id_usuario"];
         if (give_acl($id_usuario, 0, "AR")==1) {
 		echo "<h2>".$lang_label["events"]."</h2>";
-		echo "<h3>".$lang_label["event_statistics"]."<a href='help/".substr($language_code,0,2)."/chap5.php#51' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+		echo "<h3>".$lang_label["event_statistics"]."<a href='help/".$help_code."/chap5.php#51' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 		echo '<img src="reporting/fgraph.php?tipo=total_events" border=0>';
 		echo "<br><br>";
 		echo '<img src="reporting/fgraph.php?tipo=user_events" border=0>';
diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php
index d96689ca6d..9ba9fd5fc9 100644
--- a/pandora_console/operation/events/events.php
+++ b/pandora_console/operation/events/events.php
@@ -109,7 +109,7 @@ if (comprueba_login() == 0) {
 	}
 
 	echo "<h2>".$lang_label["events"]."</h2>";
-	echo "<h3>".$lang_label["event_main_view"]."<a href='help/".substr($language_code,0,2)."/chap5.php#5' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["event_main_view"]."<a href='help/".$help_code."/chap5.php#5' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 
 	// Prepare index for pagination
 	$event_list[]="";
diff --git a/pandora_console/operation/incidents/incident.php b/pandora_console/operation/incidents/incident.php
index 5bf159a00a..b3d1b12de5 100644
--- a/pandora_console/operation/incidents/incident.php
+++ b/pandora_console/operation/incidents/incident.php
@@ -127,7 +127,7 @@ if ((give_acl($id_user, 0, "IR")==1) OR (give_acl($id_user, 0, "IM")==1) or (dam
 	$sql1_count="SELECT COUNT(id_incidencia) FROM tincidencia ".$sql1;
 	$sql1=$sql0;
 	echo "<h2>".$lang_label["incident_manag"]."</h2>";
-	echo "<h3>".$lang_label["manage_incidents"]."<a href='help/".substr($language_code,0,2)."/chap4.php#4' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+	echo "<h3>".$lang_label["manage_incidents"]."<a href='help/".$help_code."/chap4.php#4' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 ?>
 
 <?php
diff --git a/pandora_console/operation/incidents/incident_detail.php b/pandora_console/operation/incidents/incident_detail.php
index 40a85dfd50..6ab63e37aa 100644
--- a/pandora_console/operation/incidents/incident_detail.php
+++ b/pandora_console/operation/incidents/incident_detail.php
@@ -219,8 +219,8 @@ $creacion_incidente = "";
 			
 		if (isset($id_inc)) {echo "<input type='hidden' name='id_inc' value='".$id_inc."'>";}
 		echo "<h2>".$lang_label["incident_manag"]."</h2>";
-		if (isset($id_inc)) {echo "<h3>".$lang_label["rev_incident"]." # ".$id_inc." <a href='help/<?php echo substr($language_code,0,2);?>/chap4.php#42' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";} 
-			else {echo "<h3>".$lang_label["create_incident"]."<a href='help/".substr($language_code,0,2)."/chap4.php#41' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";}
+		if (isset($id_inc)) {echo "<h3>".$lang_label["rev_incident"]." # ".$id_inc." <a href='help/<?php echo $help_code;?>/chap4.php#42' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";} 
+			else {echo "<h3>".$lang_label["create_incident"]."<a href='help/".$help_code."/chap4.php#41' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";}
 		echo '<table cellpadding=3 cellspacing=3 border=0 width=600>';
 		if ((give_acl($iduser_temp, $id_grupo, "IM")==1) OR ($usuario == $iduser_temp)) 
 			echo '<tr><td class="lb" rowspan="6" width="5"><td class="datos"><b>'.$lang_label["incident"].'</b><td colspan=3 class="datos"><input type="text" name="titulo" size=70 value="'.$titulo.'">';
diff --git a/pandora_console/operation/incidents/incident_search.php b/pandora_console/operation/incidents/incident_search.php
index 31fc78aca2..f9f03a59f5 100644
--- a/pandora_console/operation/incidents/incident_search.php
+++ b/pandora_console/operation/incidents/incident_search.php
@@ -13,7 +13,7 @@ if (comprueba_login() == 0) {
 
 
 echo "<h2>".$lang_label["incident_manag"]."</h2>";
-echo "<h3>".$lang_label["find_crit"]." <a href='help/".substr($language_code,0,2)."/chap4.php#43' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+echo "<h3>".$lang_label["find_crit"]." <a href='help/".$help_code."/chap4.php#43' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 echo "<div style='width:645'>";
 echo "<div style='float:right;'><img src='images/pulpo_lupa.gif' class='bot' align='left'></div>";	
 ?>
diff --git a/pandora_console/operation/incidents/incident_statistics.php b/pandora_console/operation/incidents/incident_statistics.php
index 17ea47897c..d76946d1c5 100644
--- a/pandora_console/operation/incidents/incident_statistics.php
+++ b/pandora_console/operation/incidents/incident_statistics.php
@@ -14,7 +14,7 @@ if (comprueba_login() == 0) {
 	$iduser=$_SESSION['id_usuario'];
 	if (give_acl($id_user, 0, "IR")==1) {	
 		echo "<h2>".$lang_label["incident_manag"]."</h2>";
-		echo "<h3>".$lang_label["statistics"]."<a href='help/".substr($language_code,0,2)."/chap4.php#44' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+		echo "<h3>".$lang_label["statistics"]."<a href='help/".$help_code."/chap4.php#44' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 echo '<img src="reporting/fgraph.php?tipo=estado_incidente" border=0>';
 echo "<br><br>";
 echo '<img src="reporting/fgraph.php?tipo=prioridad_incidente" border=0>';
diff --git a/pandora_console/operation/users/user.php b/pandora_console/operation/users/user.php
index 4e72c60240..c5f83b5f2a 100644
--- a/pandora_console/operation/users/user.php
+++ b/pandora_console/operation/users/user.php
@@ -15,7 +15,7 @@ if (comprueba_login() == 0) {
 ?>
 
 <h2><?php echo $lang_label["users_"] ?></h3>
-<h3><?php echo $lang_label["users"] ?><a href='help/<?php echo substr($language_code,0,2) ?>/chap2.php#2' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
+<h3><?php echo $lang_label["users"] ?><a href='help/<?php echo $help_code ?>/chap2.php#2' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
 
 <table cellpadding="3" cellspacing="3" width="700">
 <th class="w80"><?php echo $lang_label["user_ID"]?>
@@ -68,7 +68,7 @@ echo "<tr><td colspan='5'><div class='raya'></div></td></tr></table><br>";
 ?>
 
 
-<h3><?php echo $lang_label["definedprofiles"] ?><a href='help/<?php echo substr($language_code,0,2) ?>/chap2.php#21' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
+<h3><?php echo $lang_label["definedprofiles"] ?><a href='help/<?php echo $help_code ?>/chap2.php#21' target='_help' class='help'>&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
 
 <table cellpadding=3 cellspacing=3 border=0>
 <?php
diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php
index 2e44661e0c..a3634efc63 100644
--- a/pandora_console/operation/users/user_edit.php
+++ b/pandora_console/operation/users/user_edit.php
@@ -73,7 +73,7 @@ if (comprueba_login() == 0) {
 		}
 	} 
 		echo "<h2>".$lang_label["users_"]."</h2>";
-		echo "<h3>".$lang_label["user_edit_title"]."<a href='help/".substr($language_code,0,2)."/chap2.php#22' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+		echo "<h3>".$lang_label["user_edit_title"]."<a href='help/".$help_code."/chap2.php#22' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 
 	// Sino se obtiene la variable "modificado" es que se esta visualizando la informacion y
 	// preparandola para su modificacion, no se almacenan los datos
diff --git a/pandora_console/operation/users/user_statistics.php b/pandora_console/operation/users/user_statistics.php
index f3b8432df2..9e28343f05 100644
--- a/pandora_console/operation/users/user_statistics.php
+++ b/pandora_console/operation/users/user_statistics.php
@@ -10,7 +10,7 @@ require("include/config.php");
 //require("include/functions_db.php");
 if (comprueba_login() == 0) {
 echo "<h2>".$lang_label["users"]."</h2>";
-echo "<h3>".$lang_label["users_statistics"]."<a href='help/".substr($language_code,0,2)."/chap2.php#24' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
+echo "<h3>".$lang_label["users_statistics"]."<a href='help/".$help_code."/chap2.php#24' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
 echo '<img src="reporting/fgraph.php?tipo=user_activity" border=0>';
 echo "<br><br>";
 }
diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql
index d789829a04..38fc67327e 100644
--- a/pandora_console/pandoradb.sql
+++ b/pandora_console/pandoradb.sql
@@ -261,8 +261,8 @@ CREATE TABLE `tincidencia` (
 # Table: 'tlanguage'
 # 
 CREATE TABLE `tlanguage` (
-  `id_language` char(5) NOT NULL default '',
-  `name` varchar(100) NOT NULL default '',
+  `id_language` char(6) NOT NULL default '',
+  `name` varchar(50) NOT NULL default '',
   PRIMARY KEY  (`id_language`)
 ) TYPE=InnoDB; 
 
diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql
index 760922dd76..1205272504 100644
--- a/pandora_console/pandoradb_data.sql
+++ b/pandora_console/pandoradb_data.sql
@@ -134,7 +134,7 @@ INSERT INTO `tusuario_perfil` VALUES (2,'admin',5,1,'admin');
 --
 
 
-INSERT INTO `tlanguage` VALUES ('bb','Bable');
+INSERT INTO `tlanguage` VALUES ('ast_es','Bable');
 INSERT INTO `tlanguage` VALUES ('en','English');
 INSERT INTO `tlanguage` VALUES ('es_es','Espa&ntilde;ol');
 INSERT INTO `tlanguage` VALUES ('es_la','Espa&ntilde;ol-Latinoam&eacute;rica');