From d206125313fcb26a45ddf043c96d16d0ce91764b Mon Sep 17 00:00:00 2001
From: darode <drd.sqki@gmail.com>
Date: Tue, 8 Jan 2013 11:05:14 +0000
Subject: [PATCH] 2013-01-08 Dario Rodriguez <dario.rodriguez@artica.es>

	* godmode/reporting/reporting_builder.php: Added a default cover
	for PDF reports.
	include/help/ja/help_reporting_advanced_tab.php,
	include/help/en/help_reporting_advanced_tab.php,
	include/help/es/help_reporting_advanced_tab.php: Documented new macro
	called REPORT_NAME

	MERGED FROM 4.0.3



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7365 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 pandora_console/ChangeLog                             | 11 +++++++++++
 .../godmode/reporting/reporting_builder.php           |  4 ++++
 .../include/help/en/help_reporting_advanced_tab.php   |  4 +++-
 .../include/help/es/help_reporting_advanced_tab.php   |  2 +-
 .../include/help/ja/help_reporting_advanced_tab.php   |  3 ++-
 5 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index 5064431af9..e582026d19 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,14 @@
+2013-01-08 Dario Rodriguez <dario.rodriguez@artica.es>
+
+	* godmode/reporting/reporting_builder.php: Added a default cover
+	for PDF reports.
+	include/help/ja/help_reporting_advanced_tab.php,
+	include/help/en/help_reporting_advanced_tab.php,
+	include/help/es/help_reporting_advanced_tab.php: Documented new macro
+	called REPORT_NAME
+
+	MERGED FROM 4.0.3
+
 2013-01-08 Dario Rodriguez <dario.rodriguez@artica.es>
 
 	* godmode/agentes/module_manager.php: Added a link to module library
diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php
index c12e434e35..120a52ae75 100644
--- a/pandora_console/godmode/reporting/reporting_builder.php
+++ b/pandora_console/godmode/reporting/reporting_builder.php
@@ -560,10 +560,14 @@ switch ($action) {
 						else
 							$metaconsole_report = 0;
 						
+						$start_url = ui_get_full_url(false);
+						$first_page = "&lt;p&#x20;style=&quot;text-align:&#x20;center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&#x0d;&#x0a;&lt;p&#x20;style=&quot;text-align:&#x20;center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&#x0d;&#x0a;&lt;p&#x20;style=&quot;text-align:&#x20;center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&#x0d;&#x0a;&lt;p&#x20;style=&quot;text-align:&#x20;center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&#x0d;&#x0a;&lt;p&#x20;style=&quot;text-align:&#x20;center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&#x0d;&#x0a;&lt;p&#x20;style=&quot;text-align:&#x20;center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&#x0d;&#x0a;&lt;p&#x20;style=&quot;text-align:&#x20;center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&#x0d;&#x0a;&lt;p&#x20;style=&quot;text-align:&#x20;center;&quot;&gt;&lt;img&#x20;src=&quot;".$start_url."/images/pandora_report_logo.png&quot;&#x20;alt=&quot;&quot;&#x20;width=&quot;800&quot;&#x20;/&gt;&lt;/p&gt;&#x0d;&#x0a;&lt;p&#x20;style=&quot;text-align:&#x20;center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&#x0d;&#x0a;&lt;p&#x20;style=&quot;text-align:&#x20;center;&quot;&gt;&lt;span&#x20;style=&quot;font-size:&#x20;xx-large;&quot;&gt;&#40;_REPORT_NAME_&#41;&lt;/span&gt;&lt;/p&gt;&#x0d;&#x0a;&lt;p&#x20;style=&quot;text-align:&#x20;center;&quot;&gt;&lt;span&#x20;style=&quot;font-size:&#x20;large;&quot;&gt;&#40;_DATETIME_&#41;&lt;/span&gt;&lt;/p&gt;";
+
 						$idOrResult = db_process_sql_insert('treport',
 							array('name' => $reportName,
 								'id_group' => $idGroupReport,
 								'description' => $description,
+								'first_page' => $first_page,
 								'private' => $private,
 								'id_group_edit' => $id_group_edit,
 								'id_user' => $config['id_user'],
diff --git a/pandora_console/include/help/en/help_reporting_advanced_tab.php b/pandora_console/include/help/en/help_reporting_advanced_tab.php
index e95b0942d1..2df2f46ca3 100755
--- a/pandora_console/include/help/en/help_reporting_advanced_tab.php
+++ b/pandora_console/include/help/en/help_reporting_advanced_tab.php
@@ -5,7 +5,9 @@
 ?>
 <h1>Advanced reporting</h1>
 <p>
-You can use only a macro in the first page:  (_DATETIME_) this token will be replaced by the current date and time in the moment of generating the PDF.
+You can use only a macro in the first page: <br><br>
+<b>(_DATETIME_)</b> will be replaced by the current date and time in the moment of generating the PDF.<br>
+<b>(_REPORT_NAME_)</b> will be replaced by the current name of report.
 <br><br>
 If you have problems loading a image file, try using a PNG format instead JPG or other formats.
 </p>
diff --git a/pandora_console/include/help/es/help_reporting_advanced_tab.php b/pandora_console/include/help/es/help_reporting_advanced_tab.php
index 40da06669b..65ef234f06 100755
--- a/pandora_console/include/help/es/help_reporting_advanced_tab.php
+++ b/pandora_console/include/help/es/help_reporting_advanced_tab.php
@@ -6,8 +6,8 @@
 <h1>Opciones avanzadas</h1>
 <p>
 Puede usar una macro en la portada:<br><br>
-
 <b>(_DATETIME_)</b>  este token será reemplazado por la fecha y hora actual en el momento de generar el PDF.
+<b>(_REPORT_NAME_)</b> este token será reemplazado por el nombre del informe.
 <br><br>
 Si tiene problemas visualizando una imagen, prueba a usar el formato PNG en vez de usar otros formatos.
 </p>
diff --git a/pandora_console/include/help/ja/help_reporting_advanced_tab.php b/pandora_console/include/help/ja/help_reporting_advanced_tab.php
index 642a4966d8..1c2eaf4606 100755
--- a/pandora_console/include/help/ja/help_reporting_advanced_tab.php
+++ b/pandora_console/include/help/ja/help_reporting_advanced_tab.php
@@ -5,7 +5,8 @@
 ?>
 <h1>拡張レポート</h1>
 <p>
-_DATETIME_ マクロは、最初のページで利用できます。これは、PDF を生成した時点の日時に置き換えられます。
+<b>(_DATETIME_)</b> マクロは、最初のページで利用できます。これは、PDF を生成した時点の日時に置き換えられます。<br>
+<b>(_REPORT_NAME)</b> will be replaced by the current name of report.
 <br><br>
 画像ファイルの読み込みで問題がある場合は、JPG 等のフォーマットではなく、PNG フォーマットを使ってみてください。
 </p>