Add plugin Report
authorJehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr>
Fri, 17 Aug 2012 23:58:33 +0000 (01:58 +0200)
committerJehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr>
Wed, 22 Aug 2012 10:39:41 +0000 (12:39 +0200)
This plugin is the old Report feature from PPA <5.1 moved as a plugin in
the new plugin architecture.

38 files changed:
plugins/Report/INSTALL [new file with mode: 0644]
plugins/Report/classes/Reports.php [new file with mode: 0644]
plugins/Report/conf/config.inc.php [new file with mode: 0644]
plugins/Report/images/Report.png [new file with mode: 0644]
plugins/Report/images/Reports.png [new file with mode: 0644]
plugins/Report/lang/afrikaans.php [new file with mode: 0644]
plugins/Report/lang/arabic.php [new file with mode: 0644]
plugins/Report/lang/catalan.php [new file with mode: 0644]
plugins/Report/lang/chinese-sim.php [new file with mode: 0644]
plugins/Report/lang/chinese-tr.php [new file with mode: 0644]
plugins/Report/lang/chinese-utf8-zh_CN.php [new file with mode: 0644]
plugins/Report/lang/chinese-utf8-zh_TW.php [new file with mode: 0644]
plugins/Report/lang/czech.php [new file with mode: 0644]
plugins/Report/lang/danish.php [new file with mode: 0644]
plugins/Report/lang/dutch.php [new file with mode: 0644]
plugins/Report/lang/english.php [new file with mode: 0644]
plugins/Report/lang/french.php [new file with mode: 0644]
plugins/Report/lang/galician.php [new file with mode: 0644]
plugins/Report/lang/german.php [new file with mode: 0644]
plugins/Report/lang/greek.php [new file with mode: 0644]
plugins/Report/lang/hebrew.php [new file with mode: 0644]
plugins/Report/lang/hungarian.php [new file with mode: 0644]
plugins/Report/lang/italian.php [new file with mode: 0644]
plugins/Report/lang/japanese.php [new file with mode: 0644]
plugins/Report/lang/lithuanian.php [new file with mode: 0644]
plugins/Report/lang/mongol.php [new file with mode: 0644]
plugins/Report/lang/polish.php [new file with mode: 0644]
plugins/Report/lang/portuguese-br.php [new file with mode: 0644]
plugins/Report/lang/portuguese-pt.php [new file with mode: 0644]
plugins/Report/lang/romanian.php [new file with mode: 0644]
plugins/Report/lang/russian.php [new file with mode: 0644]
plugins/Report/lang/slovak.php [new file with mode: 0644]
plugins/Report/lang/spanish.php [new file with mode: 0644]
plugins/Report/lang/swedish.php [new file with mode: 0644]
plugins/Report/lang/turkish.php [new file with mode: 0644]
plugins/Report/lang/ukrainian.php [new file with mode: 0644]
plugins/Report/plugin.php [new file with mode: 0644]
plugins/Report/sql/reports-pgsql.sql [new file with mode: 0644]

diff --git a/plugins/Report/INSTALL b/plugins/Report/INSTALL
new file mode 100644 (file)
index 0000000..263f308
--- /dev/null
@@ -0,0 +1,13 @@
+phpPgAdmin Report Plugin Installation Guide
+-------------------------------------------
+1. Report Plugin activation
+
+   Open conf/config.inc.php and add the 'Report' value in the $conf['plugins'] array:
+
+   $conf['plugins'] = array('Report');
+
+2. Set up the reports database.
+
+   If you want to enable reports (which are a useful feature) then go to
+   the 'sql' subdirectory and view the SQL script for your database.  It
+   will contain instructions on how to set up the reports database.
diff --git a/plugins/Report/classes/Reports.php b/plugins/Report/classes/Reports.php
new file mode 100644 (file)
index 0000000..a0303a9
--- /dev/null
@@ -0,0 +1,128 @@
+<?php
+       /**
+        * Class to manage reports.  Note how this class is designed to use
+        * the functions provided by the database driver exclusively, and hence
+        * will work with any database without modification.
+        *
+        * $Id: Reports.php,v 1.18 2007/04/16 11:02:35 mr-russ Exp $
+        */
+
+       class Reports {
+
+               // A database driver
+               var $driver;
+               var $conf;
+
+               /* Constructor */
+               function __construct(&$conf, &$status) {
+                       global $misc, $data;
+                       
+                       $this->conf = $conf;
+
+                       // Check to see if the reports database exists
+                       $rs = $data->getDatabase($this->conf['reports_db']);
+                       if ($rs->recordCount() != 1) $status = -1;
+                       else {
+                               // Create a new database access object.
+                               $this->driver = $misc->getDatabaseAccessor($this->conf['reports_db']);
+                               // Reports database should have been created in public schema
+                               $this->driver->setSchema($this->conf['reports_schema']);
+                               $status = 0;
+                       }
+               }
+
+               /**
+                * Finds all reports
+                * @return A recordset
+                */
+               function getReports() {
+                       global $misc;
+                       // Filter for owned reports if necessary
+                       if ($this->conf['owned_reports_only']) {
+                               $server_info = $misc->getServerInfo();
+                               $filter['created_by'] = $server_info['username'];
+                               $ops = array('created_by' => '=');
+                       }
+                       else $filter = $ops = array();
+
+                       $sql = $this->driver->getSelectSQL($this->conf['reports_table'],
+                               array('report_id', 'report_name', 'db_name', 'date_created', 'created_by', 'descr', 'report_sql', 'paginate'),
+                               $filter, $ops, array('db_name' => 'asc', 'report_name' => 'asc'));
+
+                       return $this->driver->selectSet($sql);
+               }
+
+               /**
+                * Finds a particular report
+                * @param $report_id The ID of the report to find
+                * @return A recordset
+                */
+               function getReport($report_id) {                        
+                       $sql = $this->driver->getSelectSQL($this->conf['reports_table'],
+                               array('report_id', 'report_name', 'db_name', 'date_created', 'created_by', 'descr', 'report_sql', 'paginate'),
+                               array('report_id' => $report_id), array('report_id' => '='), array());
+
+                       return $this->driver->selectSet($sql);
+               }
+               
+               /**
+                * Creates a report
+                * @param $report_name The name of the report
+                * @param $db_name The name of the database
+                * @param $descr The comment on the report
+                * @param $report_sql The SQL for the report
+                * @param $paginate The report should be paginated
+                * @return 0 success
+                */
+               function createReport($report_name, $db_name, $descr, $report_sql, $paginate) {
+                       global $misc;
+                       $server_info = $misc->getServerInfo();
+                       $temp = array(
+                               'report_name' => $report_name,
+                               'db_name' => $db_name,
+                               'created_by' => $server_info['username'],
+                               'report_sql' => $report_sql,
+                               'paginate' => $paginate ? 'true' : 'false',
+                       );
+                       if ($descr != '') $temp['descr'] = $descr;
+
+                       return $this->driver->insert($this->conf['reports_table'], $temp);
+               }
+
+               /**
+                * Alters a report
+                * @param $report_id The ID of the report
+                * @param $report_name The name of the report
+                * @param $db_name The name of the database
+                * @param $descr The comment on the report
+                * @param $report_sql The SQL for the report
+                * @param $paginate The report should be paginated
+                * @return 0 success
+                */
+               function alterReport($report_id, $report_name, $db_name, $descr, $report_sql, $paginate) {
+                       global $misc;
+                       $server_info = $misc->getServerInfo();
+                       $temp = array(
+                               'report_name' => $report_name,
+                               'db_name' => $db_name,
+                               'created_by' => $server_info['username'],
+                               'report_sql' => $report_sql,
+                               'paginate' => $paginate ? 'true' : 'false',
+                               'descr' => $descr
+                       );
+
+                       return $this->driver->update($this->conf['reports_table'], $temp,
+                                                       array('report_id' => $report_id));
+               }
+
+               /**
+                * Drops a report
+                * @param $report_id The ID of the report to drop
+                * @return 0 success
+                */
+               function dropReport($report_id) {
+                       return $this->driver->delete($this->conf['reports_table'], array('report_id' => $report_id));
+               }
+
+       }
+?>
diff --git a/plugins/Report/conf/config.inc.php b/plugins/Report/conf/config.inc.php
new file mode 100644 (file)
index 0000000..c036544
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+       /* Database and table for reports */
+       $plugin_conf['reports_db'] = 'phppgadmin';
+       $plugin_conf['reports_schema'] = 'public';
+       $plugin_conf['reports_table'] = 'ppa_reports';
+
+       /* Only show owned reports?
+        * Note: This does not prevent people from accessing other reports by
+        * other means.
+        */
+       $plugin_conf['owned_reports_only'] = false;
+?>
diff --git a/plugins/Report/images/Report.png b/plugins/Report/images/Report.png
new file mode 100644 (file)
index 0000000..f9158b9
Binary files /dev/null and b/plugins/Report/images/Report.png differ
diff --git a/plugins/Report/images/Reports.png b/plugins/Report/images/Reports.png
new file mode 100644 (file)
index 0000000..4a403e0
Binary files /dev/null and b/plugins/Report/images/Reports.png differ
diff --git a/plugins/Report/lang/afrikaans.php b/plugins/Report/lang/afrikaans.php
new file mode 100644 (file)
index 0000000..fa2e30f
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Afrikaans Language file.
+        */
+
+       // Basic strings
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Jy het nie die verslae-databasis geskep nie. Lees asb. die INSTALL-lรชer vir instruksies.';
+
+       // Reports
+       $plugin_lang['strreport'] =  'Verslag';
+       $plugin_lang['strreports'] =  'Verslae';
+       $plugin_lang['strshowallreports'] =  'Wys alle verslae';
+       $plugin_lang['strnoreports'] =  'Geen verslae gevind.';
+       $plugin_lang['strcreatereport'] =  'Skep verslag';
+       $plugin_lang['strreportdropped'] =  'Verslag is verwyder.';
+       $plugin_lang['strreportdroppedbad'] =  'Verwydering van verslag het misluk.';
+       $plugin_lang['strconfdropreport'] =  'Is jy seker dat jy die verslag "%s" wil verwyder?';
+       $plugin_lang['strreportneedsname'] =  'Jy moet \'n naam gee vir die verslag.';
+       $plugin_lang['strreportneedsdef'] =  'Jy moet SQL-kode skryf vir die verslag.';
+       $plugin_lang['strreportcreated'] =  'Verslag is geskep.';
+       $plugin_lang['strreportcreatedbad'] =  'Die verslag kon nie geskep word nie.';
+?>
diff --git a/plugins/Report/lang/arabic.php b/plugins/Report/lang/arabic.php
new file mode 100644 (file)
index 0000000..32a34c3
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+    /**
+     * Arabic language file.
+     */
+
+    // Basic strings
+    $plugin_lang['strplugindescription'] = 'Report plugin';
+    $plugin_lang['strnoreportsdb'] = 'ู„ู… ุชู‚ู… ุจุฅู†ุดุงุก ู‚ุงุนุฏุฉ ุจูŠุงู†ุงุช ุงู„ุชู‚ุงุฑูŠุฑ reports database. ุฅู‚ุฑุฃ ุงู„ุชุนู„ูŠู…ุงุช ููŠ ุงู„ู…ู INSTALL.';
+
+    // Reports
+    $plugin_lang['strreport'] = 'ุชู‚ุฑูŠุฑ Report';
+    $plugin_lang['strreports'] = 'ุชู‚ุงุฑูŠุฑ Reports';
+    $plugin_lang['strshowallreports'] = 'ุนุฑุถ ุฌู…ูŠุน ุงู„ุชู‚ุงุฑูŠุฑ';
+    $plugin_lang['strnoreports'] = 'ู„ู… ุชูˆุฌุฏ ุชู‚ุงุฑูŠุฑ.';
+    $plugin_lang['strcreatereport'] = 'ุฅู†ุดุงุก ุชู‚ุฑูŠุฑ ุฌุฏูŠุฏ';
+    $plugin_lang['strreportdropped'] = 'ุชู… ุญุฐู ุงู„ุชู‚ุฑูŠุฑ.';
+    $plugin_lang['strreportdroppedbad'] = 'ูุดู„ุช ุนู…ู„ูŠุฉ ุญุฐู ุงู„ุชู‚ุฑูŠุฑ.';
+    $plugin_lang['strconfdropreport'] = 'ู‡ู„ ุฃู†ุช ู…ุชุฃูƒุฏ ุชุฑูŠุฏ ุญุฐู ุงู„ุชู‚ุฑูŠุฑ "%s"ุŸ';
+    $plugin_lang['strreportneedsname'] = 'ูŠุฌุจ ุฅุนุทุงุก ุงุณู… ู„ู„ุชู‚ุฑูŠุฑ.';
+    $plugin_lang['strreportneedsdef'] = 'ูŠุฌุจ ูƒุชุงุจุฉ ุนุจุงุฑุฉ SQL ู„ู„ุชู‚ุฑูŠุฑ.';
+    $plugin_lang['strreportcreated'] = 'ุชู… ุญูุธ ุงู„ุชู‚ุฑูŠุฑ.';
+    $plugin_lang['strreportcreatedbad'] = 'ู„ู… ูŠุชู… ุญูุธ ุงู„ุชู‚ุฑูŠุฑุŒ ู„ู‚ุฏ ูุดู„ุช ุนู…ู„ูŠุฉ ุงู„ุญูุธ.';
+?>
diff --git a/plugins/Report/lang/catalan.php b/plugins/Report/lang/catalan.php
new file mode 100644 (file)
index 0000000..0f5c82c
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Catalan language file.
+        */
+
+       // Basic strings
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'La base de dades dels reports no estร  creada. Llegeixi el fitxer INSTALL per fer-ho.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Report';
+       $plugin_lang['strreports'] = 'Reports';
+       $plugin_lang['strshowallreports'] = 'Mostra tots els reports';
+       $plugin_lang['strnoreports'] = 'No s\'han trobat reports';
+       $plugin_lang['strcreatereport'] = 'Crea un report';
+       $plugin_lang['strreportdropped'] = 'Report eliminat.';
+       $plugin_lang['strreportdroppedbad'] = 'No s\'ha pogut eliminar el report.';
+       $plugin_lang['strconfdropreport'] = 'Estร  segur de voler eliminar el report "%s"?';
+       $plugin_lang['strreportneedsname'] = 'Ha de donar un nom al report.';
+       $plugin_lang['strreportneedsdef'] = 'Ha de donar un SQL al report.';
+       $plugin_lang['strreportcreated'] = 'Report desat.';
+       $plugin_lang['strreportcreatedbad'] = 'No s\'ha pogut desar el report.';
+?>
diff --git a/plugins/Report/lang/chinese-sim.php b/plugins/Report/lang/chinese-sim.php
new file mode 100644 (file)
index 0000000..aedf4d1
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+    /**
+    * @maintainer He Wei Ping [laser@zhengmai.com.cn]
+    */
+
+    // Basic strings
+    $plugin_lang['strplugindescription'] = 'Report plugin';
+
+    //Reports
+    $plugin_lang['strreport'] = 'ๆŠฅ่กจ';
+    $plugin_lang['strreports'] = 'ๆŠฅ่กจ';
+    $plugin_lang['strshowallreports'] = 'ๆ˜พ็คบๆ‰€ๆœ‰ๆŠฅ่กจ';
+    $plugin_lang['strnoreports'] = 'ๆŸฅๆ— ๆญคๆŠฅ่กจ';
+    $plugin_lang['strcreatereport'] = 'ๅˆ›ๅปบๆŠฅ่กจ';
+    $plugin_lang['strreportdropped'] = 'ๅˆ›ๅปบๆŠฅ่กจๅฎŒๆˆ.';
+    $plugin_lang['strreportdroppedbad'] = 'ๅˆ ้™คๆŠฅ่กจๅคฑ่ดฅ';
+    $plugin_lang['strconfdropreport'] = 'ๆ‚จ็กฎๅฎš่ฆๅˆ ้™คๆŠฅ่กจ"%s"ไนˆ๏ผŸ';
+    $plugin_lang['strreportneedsname'] = 'ไฝ ๅฟ…้กป็ป™ๆ‚จ็š„ๆŠฅ่กจๅ‘ฝๅ';
+    $plugin_lang['strreportcreated'] = 'ๅ‚จๅญ˜ๆŠฅ่กจๅฎŒๆˆ';
+    $plugin_lang['strreportcreatedbad'] = 'ๅ‚จๅญ˜ๆŠฅ่กจๅคฑ่ดฅ';
+?>
diff --git a/plugins/Report/lang/chinese-tr.php b/plugins/Report/lang/chinese-tr.php
new file mode 100644 (file)
index 0000000..d5bfbc1
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Chinese language file.
+        */
+
+       // Basic strings
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'ๆ‚จๅฐšๆœชๅปบๆ–ฐๅ ฑ่กจ่ณ‡ๆ–™ๅบซ๏ผŒ่ซ‹ๅƒ้–ฑINSTALLๆช”่ชชๆ˜Žใ€‚';
+
+       // Reports
+       $plugin_lang['strreport'] = 'ๅ ฑ่กจ';
+       $plugin_lang['strreports'] = 'ๅ ฑ่กจ';
+       $plugin_lang['strshowallreports'] = '้กฏ็คบๆ‰€ๆœ‰็š„ๅ ฑ่กจ';
+       $plugin_lang['strnoreports'] = 'ๆ‰พไธๅˆฐๆญคๅ ฑ่กจใ€‚';
+       $plugin_lang['strcreatereport'] = 'ๅปบ็ซ‹ๆ–ฐๅ ฑ่กจ';
+       $plugin_lang['strreportdropped'] = 'ๆˆๅŠŸๅˆช้™คๅ ฑ่กจใ€‚';
+       $plugin_lang['strreportdroppedbad'] = 'ๅˆช้™คๅ ฑ่กจไฝœๆฅญๅคฑๆ•—ใ€‚';
+       $plugin_lang['strconfdropreport'] = 'ๆ‚จ็ขบๅฎš่ฆๅˆช้™คๅ ฑ่กจ "%s"?';
+       $plugin_lang['strreportneedsname'] = 'ๆ‚จ้œ€็‚บๆ‚จ็š„ๅ ฑ่กจๅ‘ฝๅใ€‚';
+       $plugin_lang['strreportneedsdef'] = 'ๆ‚จ้œ€็ตฆๆ‚จ็š„ๅ ฑ่กจ SQLใ€‚';
+       $plugin_lang['strreportcreated'] = 'ๆˆๅŠŸๅ„ฒๅญ˜ๅ ฑ่กจใ€‚';
+       $plugin_lang['strreportcreatedbad'] = '็„กๆณ•ๅ„ฒๅญ˜ๅ ฑ่กจใ€‚';
+?>
diff --git a/plugins/Report/lang/chinese-utf8-zh_CN.php b/plugins/Report/lang/chinese-utf8-zh_CN.php
new file mode 100644 (file)
index 0000000..834a93b
--- /dev/null
@@ -0,0 +1,23 @@
+<?php\r
+       /**\r
+       * Chinese language file.\r
+       */\r
+\r
+       //Basic\r
+       $plugin_lang['strplugindescription'] = 'Report plugin';\r
+       $plugin_lang['strnoreportsdb'] = 'ไฝ ไธ่ƒฝๅˆ›ๅปบๆŠฅๅ‘Šๆ•ฐๆฎๅบ“ใ€‚ ่ฏทๅ‚้˜…INSTALLๆ–‡ไปถใ€‚';\r
+\r
+       // Reports\r
+       $plugin_lang['strreport'] = 'ๆŠฅ่กจ';\r
+       $plugin_lang['strreports'] = 'ๆŠฅ่กจ';\r
+       $plugin_lang['strshowallreports'] = 'ๆ˜พ็คบๆ‰€ๆœ‰ๆŠฅ่กจ';\r
+       $plugin_lang['strnoreports'] = 'ๆŸฅๆ— ๆŠฅ่กจใ€‚';\r
+       $plugin_lang['strcreatereport'] = 'ๅˆ›ๅปบๆŠฅ่กจ';\r
+       $plugin_lang['strreportdropped'] = 'ๆŠฅ่กจๅทฒๅˆ ้™คใ€‚';\r
+       $plugin_lang['strreportdroppedbad'] = 'ๆŠฅ่กจๅˆ ้™คๅคฑ่ดฅใ€‚';\r
+       $plugin_lang['strconfdropreport'] = '็กฎๅฎš่ฆๅˆ ้™คๆŠฅ่กจ"%s"ๅ—๏ผŸ';\r
+       $plugin_lang['strreportneedsname'] = 'ๅฟ…้กปๆŒ‡ๅฎšๆŠฅ่กจๅ็งฐใ€‚';\r
+       $plugin_lang['strreportneedsdef'] = 'ๅฟ…้กป็ป™ๆŠฅ่กจๆŒ‡ๅฎšSQLใ€‚';\r
+       $plugin_lang['strreportcreated'] = 'ๆŠฅ่กจๅทฒไฟๅญ˜ใ€‚';\r
+       $plugin_lang['strreportcreatedbad'] = 'ๆŠฅ่กจไฟๅญ˜ๅคฑ่ดฅใ€‚';\r
+?>\r
diff --git a/plugins/Report/lang/chinese-utf8-zh_TW.php b/plugins/Report/lang/chinese-utf8-zh_TW.php
new file mode 100644 (file)
index 0000000..907b234
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+       * Chinese zh_TW translation file for phpPgAdmin.
+       */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'ๆ‚จๅฐšๆœชๅปบ็ซ‹ๅ ฑ่กจ่ณ‡ๆ–™ๅบซใ€‚่ซ‹ๅƒ้–ฑๆŒ‡ๅฐŽ INSTALL ๆช”่ชชๆ˜Žใ€‚';
+
+       // Reports
+       $plugin_lang['strreport'] = 'ๅ ฑ่กจ';
+       $plugin_lang['strreports'] = 'ๅ ฑ่กจ';
+       $plugin_lang['strshowallreports'] = '้กฏ็คบๅ…จ้ƒจๅ ฑ่กจ';
+       $plugin_lang['strnoreports'] = 'ๆ‰พไธๅˆฐไปปไฝ•ๅ ฑ่กจใ€‚';
+       $plugin_lang['strcreatereport'] = 'ๅปบ็ซ‹ๅ ฑ่กจ';
+       $plugin_lang['strreportdropped'] = 'ๅ ฑ่กจๅทฒ็งป้™คใ€‚';
+       $plugin_lang['strreportdroppedbad'] = 'ๅ ฑ่กจ็งป้™คๅทฒๅคฑๆ•—ใ€‚';
+       $plugin_lang['strconfdropreport'] = 'ๆ‚จ็ขบๅฎšๆ‚จ่ฆ็งป้™ค้€™ๅ€‹ๅ ฑ่กจ "%s" ๅ—Ž?';
+       $plugin_lang['strreportneedsname'] = 'ๆ‚จๅฟ…้œ€็‚บๆ‚จ็š„ๅ ฑ่กจ็ตฆไธ€ๅ€‹ๅ็จฑใ€‚';
+       $plugin_lang['strreportneedsdef'] = 'ๆ‚จๅฟ…้œ€็‚บๆ‚จ็š„ๅ ฑ่กจ็ตฆ SQLใ€‚';
+       $plugin_lang['strreportcreated'] = 'ๅ ฑ่กจๅทฒๅ„ฒๅญ˜ใ€‚';
+       $plugin_lang['strreportcreatedbad'] = 'ๅ ฑ่กจๅ„ฒๅญ˜ๅทฒๅคฑๆ•—ใ€‚';
+?>
diff --git a/plugins/Report/lang/czech.php b/plugins/Report/lang/czech.php
new file mode 100644 (file)
index 0000000..ff6f539
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Czech language file.
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Nemรกte vytvoล™enou databรกzi vรฝstupnรญch sestav. Pล™eฤtฤ›te si soubor INSTALL s instrukcemi.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Vรฝstupnรญ sestava';
+       $plugin_lang['strreports'] = 'Vรฝstupnรญ sestavy';
+       $plugin_lang['strshowallreports'] = 'Zobrazit vลกechny vรฝstupnรญ sestavy';
+       $plugin_lang['strnoreports'] = 'Nebyly nalezeny ลพรกdnรฉ vรฝstupnรญ sestava.';
+       $plugin_lang['strcreatereport'] = 'Vytvoล™it vรฝstupnรญ sestavu';
+       $plugin_lang['strreportdropped'] = 'Vรฝstupnรญ sestava byla odstranฤ›na.';
+       $plugin_lang['strreportdroppedbad'] = 'Nezdaล™ilo se odstranit vรฝstupnรญ sestavu.';
+       $plugin_lang['strconfdropreport'] = 'Opravdu chcete odstranit vรฝstupnรญ sestavu โ€ž%sโ€œ?';
+       $plugin_lang['strreportneedsname'] = 'Musรญte zadat nรกzev pro vรฝstupnรญ sestavu.';
+       $plugin_lang['strreportneedsdef'] = 'Musรญte zadat dotaz SQL pro vรฝstupnรญ sestavu.';
+       $plugin_lang['strreportcreated'] = 'Vรฝstupnรญ sestava byla uloลพena.';
+       $plugin_lang['strreportcreatedbad'] = 'Nezdaล™ilo se uloลพit vรฝstupnรญ sestavu.';
+?>
diff --git a/plugins/Report/lang/danish.php b/plugins/Report/lang/danish.php
new file mode 100644 (file)
index 0000000..7d5df86
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+       /**
+        * Danish language file.
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Du har ikke oprettet nogen rapportdatabase. For instruktioner lรฆs filen INSTALL.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Rapport';
+       $plugin_lang['strreports'] = 'Rapporter';
+       $plugin_lang['strshowallreports'] = 'Vis alle rapporter';
+       $plugin_lang['strtopbar'] = '%s kรธrer pรฅ %s:%s -- Du er logged ind som bruger "%s"';
+       $plugin_lang['strtimefmt'] = 'jS M, Y g:iA';
+       $plugin_lang['strnoreports'] = 'Ingen rapporter fundet.';
+       $plugin_lang['strcreatereport'] = 'Opret rapport';
+       $plugin_lang['strreportdropped'] = 'Rapport fjernet.';
+       $plugin_lang['strreportcreated'] = 'Rapport oprettet.';
+       $plugin_lang['strreportneedsname'] = 'Rapport skal have et navn.';
+       $plugin_lang['strreportcreatedbad'] = 'Det lykkedes ikke at oprette rapport.';
+       $plugin_lang['strreportdroppedbad'] = 'Det lykkedes ikke at fjerne rapport.';
+       $plugin_lang['strconfdropreport'] = 'Er du sikker pรฅ, at du vil fjerne rapporten "%s"?';
+       $plugin_lang['strreportneedsdef'] = 'Du skal angive en SQL-forespรธrgsel.';
+?>
diff --git a/plugins/Report/lang/dutch.php b/plugins/Report/lang/dutch.php
new file mode 100644 (file)
index 0000000..aa541fb
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+       /**
+        * Dutch Language file.
+        */
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+
+       //Reports
+       $plugin_lang['strreport'] = 'Rapport';
+       $plugin_lang['strreports'] = 'Rapporten';
+       $plugin_lang['strshowallreports'] = 'Toon alle rapporten';
+       $plugin_lang['strnoreports'] = 'Geen rapporten gevonden.';
+       $plugin_lang['strcreatereport'] = 'Maak rapport aan';
+       $plugin_lang['strreportdropped'] = 'Rapport verwijderd.';
+       $plugin_lang['strreportdroppedbad'] = 'Verwijdering van rapport mislukt.';
+       $plugin_lang['strconfdropreport'] = 'Weet u zeker dat u het rapport "%s" wilt verwijderen?';
+       $plugin_lang['strreportneedsname'] = 'U dient een naam op te geven voor het rapport.';
+       $plugin_lang['strreportneedsdef'] = 'U dient SQL op te geven voor het rapport.';
+       $plugin_lang['strreportcreated'] = 'Rapport bewaard.';
+       $plugin_lang['strreportcreatedbad'] = 'Bewaren van het rapport mislukt.';
+?>
diff --git a/plugins/Report/lang/english.php b/plugins/Report/lang/english.php
new file mode 100644 (file)
index 0000000..2ceee1e
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * English language file for phpPgAdmin.
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'You have not created the reports database. Read the INSTALL file for directions.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Report';
+       $plugin_lang['strreports'] = 'Reports';
+       $plugin_lang['strshowallreports'] = 'Show all reports';
+       $plugin_lang['strnoreports'] = 'No reports found.';
+       $plugin_lang['strcreatereport'] = 'Create report';
+       $plugin_lang['strreportdropped'] = 'Report dropped.';
+       $plugin_lang['strreportdroppedbad'] = 'Report drop failed.';
+       $plugin_lang['strconfdropreport'] = 'Are you sure you want to drop the report "%s"?';
+       $plugin_lang['strreportneedsname'] = 'You must give a name for your report.';
+       $plugin_lang['strreportneedsdef'] = 'You must give SQL for your report.';
+       $plugin_lang['strreportcreated'] = 'Report saved.';
+       $plugin_lang['strreportcreatedbad'] = 'Failed to save report.';
+?>
diff --git a/plugins/Report/lang/french.php b/plugins/Report/lang/french.php
new file mode 100644 (file)
index 0000000..13db41d
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+       * French Language file.
+       */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Vous n\'avez pas crรฉรฉ la base de donnรฉes reports. Lisez le fichier INSTALL pour en savoir plus.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Rapport';
+       $plugin_lang['strreports'] = 'Rapports';
+       $plugin_lang['strshowallreports'] = 'Voir tous les rapports';
+       $plugin_lang['strnoreports'] = 'Aucun rapport trouvรฉ.';
+       $plugin_lang['strcreatereport'] = 'Crรฉer un rapport';
+       $plugin_lang['strreportdropped'] = 'Rapport supprimรฉ.';
+       $plugin_lang['strreportdroppedbad'] = 'ร‰chec lors de la suppression du rapport.';
+       $plugin_lang['strconfdropreport'] = 'รŠtes-vous sรปr de vouloir supprimer le rapport ยซ %s ยป ?';
+       $plugin_lang['strreportneedsname'] = 'Vous devez indiquer un nom pour votre rapport.';
+       $plugin_lang['strreportneedsdef'] = 'Vous devez fournir une requรชte SQL pour votre rapport.';
+       $plugin_lang['strreportcreated'] = 'Rapport sauvegardรฉ.';
+       $plugin_lang['strreportcreatedbad'] = 'ร‰chec lors de la sauvegarde du rapport.';
+?>
diff --git a/plugins/Report/lang/galician.php b/plugins/Report/lang/galician.php
new file mode 100644 (file)
index 0000000..87da669
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Galician language file.
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Non creou a base de datos de informes. Lea o ficheiro ยปINSTALLยป (en inglรฉs) para mรกis informaciรณn.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Informe';
+       $plugin_lang['strreports'] = 'Informes';
+       $plugin_lang['strshowallreports'] = 'Listar todos os informes';
+       $plugin_lang['strnoreports'] = 'Non se atopou informe algรบn.';
+       $plugin_lang['strcreatereport'] = 'Crear un informe';
+       $plugin_lang['strreportdropped'] = 'Eliminouse o informe.';
+       $plugin_lang['strreportdroppedbad'] = 'Non se conseguiu eliminar o informe.';
+       $plugin_lang['strconfdropreport'] = 'Estรก seguro de que quere eliminar o informe ยซ%sยป?';
+       $plugin_lang['strreportneedsname'] = 'Debe fornecer un nome para o informe.';
+       $plugin_lang['strreportneedsdef'] = 'Debe fornecer un cรณdigo SQL para o informe.';
+       $plugin_lang['strreportcreated'] = 'Gardouse o informe.';
+       $plugin_lang['strreportcreatedbad'] = 'Non se conseguiu gardar o informe.';
+?>
diff --git a/plugins/Report/lang/german.php b/plugins/Report/lang/german.php
new file mode 100644 (file)
index 0000000..5f5cec5
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * German language file.
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Sie haben die Berichtsdatenbank nicht angelegt. In der Datei INSTALL finden Sie Anweisungen dafรผr.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Bericht';
+       $plugin_lang['strreports'] = 'Berichte';
+       $plugin_lang['strshowallreports'] = 'Alle Berichte anzeigen';
+       $plugin_lang['strnoreports'] = 'Keine Berichte gefunden.';
+       $plugin_lang['strcreatereport'] = 'Bericht erstellen.';
+       $plugin_lang['strreportdropped'] = 'Bericht gelรถscht.';
+       $plugin_lang['strreportdroppedbad'] = 'Lรถschen des Berichtes fehlgeschlagen.';
+       $plugin_lang['strconfdropreport'] = 'Sind Sie sicher, dass Sie den Bericht "%s" lรถschen wollen?';
+       $plugin_lang['strreportneedsname'] = 'Sie mรผssen fรผr den Bericht einen Namen angeben.';
+       $plugin_lang['strreportneedsdef'] = 'Sie mรผssen eine SQL-Abfrage fรผr den Bericht eingeben.';
+       $plugin_lang['strreportcreated'] = 'Bericht gespeichert.';
+       $plugin_lang['strreportcreatedbad'] = 'Speichern des Berichtes fehlgeschlagen.';
+?>
diff --git a/plugins/Report/lang/greek.php b/plugins/Report/lang/greek.php
new file mode 100644 (file)
index 0000000..78bde37
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+       /**
+        * Greek language file.
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'ฮ— ฮฒฮฌฯƒฮท ฮฑฮฝฮฑฯ†ฮฟฯฯŽฮฝ ฮดฮตฮฝ ฮญฯ‡ฮตฮน ฮดฮทฮผฮนฮฟฯ…ฯฮณฮทฮธฮตฮฏ. ฮ”ฮนฮฑฮฒฮฌฯƒฯ„ฮต ฯ„ฮฟ ฮฑฯฯ‡ฮตฮฏฮฟ INSTALL ฮณฮนฮฑ ฮฟฮดฮทฮณฮฏฮตฯ‚.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'ฮ‘ฮฝฮฑฯ†ฮฟฯฮฌ';
+       $plugin_lang['strreports'] = 'ฮ‘ฮฝฮฑฯ†ฮฟฯฮญฯ‚';
+       $plugin_lang['strshowallreports'] = 'ฮ•ฮผฯ†ฮฌฮฝฮนฯƒฮท ฯŒฮปฯ‰ฮฝ ฯ„ฯ‰ฮฝ ฮฑฮฝฮฑฯ†ฮฟฯฯŽฮฝ';
+       $plugin_lang['strnoreports'] = 'ฮ”ฮต ฮฒฯฮญฮธฮทฮบฮฑฮฝ ฮฑฮฝฮฑฯ†ฮฟฯฮญฯ‚.';
+       $plugin_lang['strcreatereport'] = 'ฮ”ฮทฮผฮนฮฟฯ…ฯฮณฮฏฮฑ ฮฑฮฝฮฑฯ†ฮฟฯฮฌฯ‚';
+       $plugin_lang['strreportdropped'] = 'ฮ— ฮฑฮฝฮฑฯ†ฮฟฯฮฌ ฮดฮนฮฑฮณฯฮฌฯ†ฮทฮบฮต.';
+       $plugin_lang['strreportdroppedbad'] = 'ฮ— ฮดฮนฮฑฮณฯฮฑฯ†ฮฎ ฯ„ฮทฯ‚ ฮฑฮฝฮฑฯ†ฮฟฯฮฌฯ‚ ฮฑฯ€ฮญฯ„ฯ…ฯ‡ฮต.';
+       $plugin_lang['strconfdropreport'] = 'ฮฮฑ ฮดฮนฮฑฮณฯฮฑฯ†ฮตฮฏ ฮท ฮฑฮฝฮฑฯ†ฮฟฯฮฌ "%s"?';
+       $plugin_lang['strreportneedsname'] = 'ฮ ฯฮญฯ€ฮตฮน ฮฝฮฑ ฮดฯŽฯƒฮตฯ„ฮต ฯŒฮฝฮฟฮผฮฑ ฯƒฯ„ฮทฮฝ ฮฑฮฝฮฑฯ†ฮฟฯฮฌ.';
+       $plugin_lang['strreportneedsdef'] = 'ฮ ฯฮญฯ€ฮตฮน ฮฝฮฑ ฮดฯŽฯƒฮตฯ„ฮต SQL ฮณฮนฮฑ ฯ„ฮทฮฝ ฮฑฮฝฮฑฯ†ฮฟฯฮฌ.';
+       $plugin_lang['strreportcreated'] = 'ฮ— ฮฑฮฝฮฑฯ†ฮฟฯฮฌ ฮฑฯ€ฮฟฮธฮทฮบฮตฯฯ„ฮทฮบฮต.';
+       $plugin_lang['strreportcreatedbad'] = 'ฮ— ฮฑฯ€ฮฟฮธฮฎฮบฮตฯ…ฯƒฮท ฯ„ฮทฯ‚ ฮฑฮฝฮฑฯ†ฮฟฯฮฌฯ‚ ฮฑฯ€ฮญฯ„ฯ…ฯ‡ฮต.';
+
+?>
diff --git a/plugins/Report/lang/hebrew.php b/plugins/Report/lang/hebrew.php
new file mode 100644 (file)
index 0000000..d369f06
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Hebrew language file.
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'ืœื ื™ืฆืจืชื” ื‘ืกื™ืก ื ืชื•ื ื™ื ื‘ื™ืฉื‘ื™ืœ ื”ื“ื•ื—ื•ืช. ืื ื ืงืจื ืืช ืงื•ื‘ืฅ ื” INSTALL ื‘ื™ืฉื‘ื™ืœ ื”ื“ืจื›ื”.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'ื“ื•ื—';
+       $plugin_lang['strreports'] = 'ื“ื•ื—ื•ืช';
+       $plugin_lang['strshowallreports'] = 'ื”ืจืื” ืืช ื›ืœ ื”ื“ื•ื—ื•ืช';
+       $plugin_lang['strnoreports'] = 'ืœื ื ืžืฆืื• ื“ื•ื—ื•ืช.';
+       $plugin_lang['strcreatereport'] = 'ืฆื•ืจ ื“ื•ื—';
+       $plugin_lang['strreportdropped'] = 'ื“ื•ื— ื ืžื—ืง.';
+       $plugin_lang['strreportdroppedbad'] = 'ืžื—ื™ืงืช ื“ื•ื— ื ื›ืฉืœื”';
+       $plugin_lang['strconfdropreport'] = 'ื”ืื ืืชื” ื‘ื˜ื•ื— ืฉื‘ืจืฆื•ื ืš ืœืžื—ื•ืง ืืช ื”ื“ื•ื— &quot;%s&quotl?';
+       $plugin_lang['strreportneedsname'] = 'ืืชื” ื—ื™ื™ื‘ ืœืฆื™ื™ืŸ ืฉื ืœื“ื•ื—.';
+       $plugin_lang['strreportneedsdef'] = 'ืืชื” ื—ื™ื™ื‘ ืœืชืช SQL ืœื“ื•ื—.';
+       $plugin_lang['strreportcreated'] = 'ื“ื•ื— ื ืฉืžืจ.';
+       $plugin_lang['strreportcreatedbad'] = 'ืฉืžื™ืจืช ื“ื•ื— ื ื›ืฉืœื”.';
+?>
diff --git a/plugins/Report/lang/hungarian.php b/plugins/Report/lang/hungarian.php
new file mode 100644 (file)
index 0000000..bb94af9
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Hungarian language file for phpPgAdmin.
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'ร–n mรฉg nem teremtette meg a jelentรฉsek adatbรกzisรกt. Olvassa el az INSTALL fรกjlt tovรกbbi รบtmutatรกsรฉrt!';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Jelentรฉs';
+       $plugin_lang['strreports'] = 'Jelentรฉsek';
+       $plugin_lang['strshowallreports'] = 'Minden jelentรฉst megjelenรญt';
+       $plugin_lang['strnoreports'] = 'Nincsenek jelentรฉsek.';
+       $plugin_lang['strcreatereport'] = 'Jelentรฉst teremt';
+       $plugin_lang['strreportdropped'] = 'A jelentรฉs tรถrรถlve.';
+       $plugin_lang['strreportdroppedbad'] = 'Nem sikerรผlt tรถrรถlni a jelentรฉst.';
+       $plugin_lang['strconfdropreport'] = 'Biztosan tรถrรถlni kรญvรกnja โ€ž%sโ€ jelentรฉst?';
+       $plugin_lang['strreportneedsname'] = 'Meg kell adni a jelentรฉsnevet.';
+       $plugin_lang['strreportneedsdef'] = 'SQL kifejezรฉst kell hozzรกadni a jelentรฉshez.';
+       $plugin_lang['strreportcreated'] = 'A jelentรฉs megteremtve.';
+       $plugin_lang['strreportcreatedbad'] = 'Nem sikerรผlt megteremteni a jelentรฉst.';
+?>
diff --git a/plugins/Report/lang/italian.php b/plugins/Report/lang/italian.php
new file mode 100644 (file)
index 0000000..17716ea
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Italian language file.
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Non รจ stato creato il database dei report. Leggere il file INSTALL per istruzioni.';
+
+       // Reports - Rapporti
+       $plugin_lang['strreport'] = 'Rapporto';
+       $plugin_lang['strreports'] = 'Rapporti';
+       $plugin_lang['strshowallreports'] = 'Mostra tutti i rapporti';
+       $plugin_lang['strnoreports'] = 'Nessun rapporto trovato.';
+       $plugin_lang['strcreatereport'] = 'Crea rapporto';
+       $plugin_lang['strreportdropped'] = 'Rapporto eliminato.';
+       $plugin_lang['strreportdroppedbad'] = 'Eliminazione del rapporto fallita.';
+       $plugin_lang['strconfdropreport'] = 'Eliminare il rapporto "%s"?';
+       $plugin_lang['strreportneedsname'] = 'รˆ necessario specificare un nome per il rapporto.';
+       $plugin_lang['strreportneedsdef'] = 'รˆ necessario inserire il codice SQL per il rapporto.';
+       $plugin_lang['strreportcreated'] = 'Rapporto salvato';
+       $plugin_lang['strreportcreatedbad'] = 'Salvataggio del rapporto fallito.';
+?>
diff --git a/plugins/Report/lang/japanese.php b/plugins/Report/lang/japanese.php
new file mode 100644 (file)
index 0000000..ec0dad2
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Japanese language file.
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'ใƒฌใƒใƒผใƒˆใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นใŒไฝœๆˆใ•ใ‚Œใฆใ„ใพใ›ใ‚“ใ€‚ใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒชใซใ‚ใ‚‹ INSTALL ใƒ•ใ‚กใ‚คใƒซใ‚’่ชญใ‚“ใงใใ ใ•ใ„ใ€‚';
+
+       // Reports
+       $plugin_lang['strreport'] = 'ใƒฌใƒใƒผใƒˆ';
+       $plugin_lang['strreports'] = 'ใƒฌใƒใƒผใƒˆ';
+       $plugin_lang['strshowallreports'] = 'ใ™ในใฆใฎใƒฌใƒใƒผใƒˆใ‚’่กจ็คบใ™ใ‚‹';
+       $plugin_lang['strnoreports'] = 'ใƒฌใƒใƒผใƒˆใŒ่ฆ‹ใคใ‹ใ‚Šใพใ›ใ‚“ใ€‚';
+       $plugin_lang['strcreatereport'] = 'ใƒฌใƒใƒผใƒˆใ‚’ไฝœๆˆใ™ใ‚‹';
+       $plugin_lang['strreportdropped'] = 'ใƒฌใƒใƒผใƒˆใ‚’็ ดๆฃ„ใ—ใพใ—ใŸใ€‚';
+       $plugin_lang['strreportdroppedbad'] = 'ใƒฌใƒใƒผใƒˆใฎ็ ดๆฃ„ใซๅคฑๆ•—ใ—ใพใ—ใŸใ€‚';
+       $plugin_lang['strconfdropreport'] = 'ๆœฌๅฝ“ใซใƒฌใƒใƒผใƒˆใ€Œ%sใ€ใ‚’็ ดๆฃ„ใ—ใพใ™ใ‹?';
+       $plugin_lang['strreportneedsname'] = 'ใƒฌใƒใƒผใƒˆๅใ‚’ๆŒ‡ๅฎšใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚';
+       $plugin_lang['strreportneedsdef'] = 'ใƒฌใƒใƒผใƒˆ็”จใฎSQLใ‚’ๆŒ‡ๅฎšใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚';
+       $plugin_lang['strreportcreated'] = 'ใƒฌใƒใƒผใƒˆใฎไฟๅญ˜ใ‚’ใ—ใพใ—ใŸใ€‚';
+       $plugin_lang['strreportcreatedbad'] = 'ใƒฌใƒใƒผใƒˆใฎไฟๅญ˜ใซๅคฑๆ•—ใ—ใพใ—ใŸใ€‚';
+?>
diff --git a/plugins/Report/lang/lithuanian.php b/plugins/Report/lang/lithuanian.php
new file mode 100644 (file)
index 0000000..2f4ddd5
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Lithuanian language file.
+        */ 
+
+       // Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Jลซs nesate sukลซrฤ™ ataskaitลณ duomenลณ bazฤ—s. Instrukcijas skaitykite INSTALL faile.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Ataskaita';
+       $plugin_lang['strreports'] = 'Ataskaitos';
+       $plugin_lang['strshowallreports'] = 'Rodyti visas ataskaitas';
+       $plugin_lang['strnoreports'] = 'Ataskaitลณ nerasta.';
+       $plugin_lang['strcreatereport'] = 'Kurti ataskaitฤ…';
+       $plugin_lang['strreportdropped'] = 'Ataskaita paลกalinta.';
+       $plugin_lang['strreportdroppedbad'] = 'Nepavyko paลกalinti ataskaitos.';
+       $plugin_lang['strconfdropreport'] = 'Ar tikrai norite ลกalinti ataskaitฤ… "%s"?';
+       $plugin_lang['strreportneedsname'] = 'Turite suteikti ataskaitai pavadinimฤ….';
+       $plugin_lang['strreportneedsdef'] = 'Turite pateikti ataskaitos SQL apibrฤ—ลพtฤฏ.';
+       $plugin_lang['strreportcreated'] = 'Ataskaita ฤฏraลกyta.';
+       $plugin_lang['strreportcreatedbad'] = 'Nepavyko ฤฏraลกyti ataskaitos.';
+?>
diff --git a/plugins/Report/lang/mongol.php b/plugins/Report/lang/mongol.php
new file mode 100644 (file)
index 0000000..0b171dc
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+       /**
+        * Mongolian language filen. 
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+
+       // Reports
+       $plugin_lang['strreport'] = 'ัะดะพะฅะด';
+       $plugin_lang['strreports'] = 'ัะดะพะฅะดะน';
+       $plugin_lang['strshowallreports'] = 'โ„–ะฏะซะกะบะกะดะธ ะทะณะฅ ะฏะดะพะฅะดะน';
+       $plugin_lang['strnoreports'] = 'ัะดะพะฅะดะฏะท ะฎะฅะด.';
+       $plugin_lang['strcreatereport'] = 'ั“ะฏะบะคะกะดะธ ะฏะดะพะฅะด';
+       $plugin_lang['strreportdropped'] = 'ัะดะพะฅะด ะตะฎะฉะพะดะฏะถะฅะฎ.';
+       $plugin_lang['strreportdroppedbad'] = 'ั•ะฎะฉะพะดะฏะถะฅะฎะฉะฅ ะฏะดะพะฅะดะก ะฐะฒะฅะฒะทะกะฎะฏ.';
+       $plugin_lang['strconfdropreport'] = 'ั—ะน ะตะทะฅะฒะฅะฎะน, ะพะดะฏ ะจะฏะดะฉะดะฅ ะตะฎะฉะพะดะฏะถะฉะดะธ ะฏะดะพะฅะด "%s"?';
+       $plugin_lang['strreportneedsname'] = 'ั—ะกะญ ะฎะฅะฏะขะจะฏะคะฉะญะฏ ะตะซะกะบะกะดะธ ะฉะญะฑ ะฏะดะพะฅะดะก.';
+       $plugin_lang['strreportneedsdef'] = 'ั—ะกะญ ะฎะฅะฏะขะจะฏะคะฉะญะฏ ะตะซะกะบะกะดะธ SQL-ะบะกะฐะฒะฏะณ ะคะฌะฑ ั—ะกะปะฅะงะฏ ะฏะดะพะฅะดะก.';
+       $plugin_lang['strreportcreated'] = 'ัะดะพะฅะด ะณะฏะจะฒะกะฎะฅะฎ.';
+       $plugin_lang['strreportcreatedbad'] = 'ั“ะฏะจะฒะกะฎะฅะฎะฉะฅ ะฏะดะพะฅะดะก ะฐะฒะฅะฒะทะกะฎะฏ.';
+?>
diff --git a/plugins/Report/lang/polish.php b/plugins/Report/lang/polish.php
new file mode 100644 (file)
index 0000000..ed5e047
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Polish language file.
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Nie utworzyล‚eล› bazy raportรณw. Instrukcjฤ™ znajdziesz w pliku INSTALL.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Raport';
+       $plugin_lang['strreports'] = 'Raporty';
+       $plugin_lang['strshowallreports'] = 'Pokaลผ wszystkie raporty';
+       $plugin_lang['strnoreports'] = 'Nie znaleziono raportรณw.';
+       $plugin_lang['strcreatereport'] = 'Utwรณrz raport';
+       $plugin_lang['strreportdropped'] = 'Raport zostaล‚ usuniฤ™ty.';
+       $plugin_lang['strreportdroppedbad'] = 'Prรณba usuniฤ™cia raportu siฤ™ nie powiodล‚a.';
+       $plugin_lang['strconfdropreport'] = 'Czy na pewno chcesz usunฤ…ฤ‡ raport "%s"?';
+       $plugin_lang['strreportneedsname'] = 'Musisz nazwaฤ‡ raport.';
+       $plugin_lang['strreportneedsdef'] = 'Musisz podaฤ‡ zapytanie SQL definiujฤ…ce raport.';
+       $plugin_lang['strreportcreated'] = 'Raport zostaล‚ utworzony.';
+       $plugin_lang['strreportcreatedbad'] = 'Prรณba utworzenia raportu siฤ™ nie powiodล‚a.';
+?>
diff --git a/plugins/Report/lang/portuguese-br.php b/plugins/Report/lang/portuguese-br.php
new file mode 100644 (file)
index 0000000..d686d23
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Brazilian Portuguese language file.
+        */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Plugin de relatรณrio';
+       $plugin_lang['strnoreportsdb'] = 'Vocรช nรฃo criou a base de dados para relatรณrios. Leia o arquivo INSTALL para resoluรงรฃo.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Relatรณrio';
+       $plugin_lang['strreports'] = 'Relatรณrios';
+       $plugin_lang['strshowallreports'] = 'Exibir todos os relatรณrios';
+       $plugin_lang['strnoreports'] = 'Nenhum relatรณrio encontrado.';
+       $plugin_lang['strcreatereport'] = 'Criar relatรณrio';
+       $plugin_lang['strreportdropped'] = 'Relatรณrio deletado.';
+       $plugin_lang['strreportdroppedbad'] = 'Falha ao deletar o relatรณrio.';
+       $plugin_lang['strconfdropreport'] = 'Vocรช tรชm certeza que deseja deletar o relatรณrio "%s"?';
+       $plugin_lang['strreportneedsname'] = 'Vocรช deve informar um nome para o seu relatรณrio.';
+       $plugin_lang['strreportneedsdef'] = 'Vocรช deve informar o SQL para o seu relatรณrio.';
+       $plugin_lang['strreportcreated'] = 'Relatรณrio salvo.';
+       $plugin_lang['strreportcreatedbad'] = 'Falha ao salvar o relatรณrio.';
+?>
diff --git a/plugins/Report/lang/portuguese-pt.php b/plugins/Report/lang/portuguese-pt.php
new file mode 100644 (file)
index 0000000..769a2c0
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+/**
+* Portuguese language file.
+*/
+
+    // Basic strings
+    $plugin_lang['strplugindescription'] = 'Report plugin';
+    $plugin_lang['strnoreportsdb'] = 'Nรฃo criou uma base de dados de relatรณrio. Leia o ficheiro INSTALL para mais informaรงรตes.';
+
+    // Reports
+    $plugin_lang['strreport'] = 'Relatรณrio';                  
+    $plugin_lang['strreports'] = 'Relatรณrios';                        
+    $plugin_lang['strshowallreports'] = 'Exibir todos os relatรณrios';         
+    $plugin_lang['strnoreports'] = 'Relatรณrio nรฃo encontrado.';              
+    $plugin_lang['strcreatereport'] = 'Criar relatรณrio';              
+    $plugin_lang['strreportdropped'] = 'Relatรณrio eliminado.';                
+    $plugin_lang['strreportdroppedbad'] = 'Falha ao eliminar o relatรณrio.';           
+    $plugin_lang['strconfdropreport'] = 'Tem certeza que quer eliminar o relatรณrio "%s"?';            
+    $plugin_lang['strreportneedsname'] = 'Dรช um nome ao seu relatรณrio.';     
+    $plugin_lang['strreportneedsdef'] = 'Adicione a instruรงรฃo SQL ao seu relatรณrio.';       
+    $plugin_lang['strreportcreated'] = 'Relatรณrio salvo.';                                    
+    $plugin_lang['strreportcreatedbad'] = 'Falha ao salvar o relatรณrio.';             
+?>
diff --git a/plugins/Report/lang/romanian.php b/plugins/Report/lang/romanian.php
new file mode 100644 (file)
index 0000000..c4ad159
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+       * Romanian language file.
+       */
+
+       //Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Nu aลฃi creat baza de date pentru rapoarte. Citiลฃi fiลŸierul INSTALL pentru instrucลฃiuni.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Raport';
+       $plugin_lang['strreports'] = 'Rapoarte';
+       $plugin_lang['strshowallreports'] = 'AfiลŸare toate rapoartele';
+       $plugin_lang['strnoreports'] = 'Nici un raport gฤƒsit.';
+       $plugin_lang['strcreatereport'] = 'Creare raport';
+       $plugin_lang['strreportdropped'] = 'Report dropped.';
+       $plugin_lang['strreportdroppedbad'] = 'ลžtergere raport eลŸuatฤƒ.';
+       $plugin_lang['strconfdropreport'] = 'Sigur ลŸtergeลฃi raportul "%s"?';
+       $plugin_lang['strreportneedsname'] = 'Specificaลฃi un nume pentru raport.';
+       $plugin_lang['strreportneedsdef'] = 'Specificaลฃi o instrucลฃiune SQL pentru raport.';
+       $plugin_lang['strreportcreated'] = 'Raport salvat.';
+       $plugin_lang['strreportcreatedbad'] = 'Salvare raport eลŸuatฤƒ.';
+?>
diff --git a/plugins/Report/lang/russian.php b/plugins/Report/lang/russian.php
new file mode 100644 (file)
index 0000000..2082be2
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Russian UTF-8 language file. 
+        */
+
+       // Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'ะ’ั‹ ะฝะต ัะพะทะดะฐะปะธ ะฑะฐะทัƒ ะดะฐะฝะฝั‹ั… ะพั‚ั‡ะตั‚ะพะฒ. ะงะธั‚ะฐะนั‚ะต ั€ะฐะทัŠััะฝะตะฝะธั ะฒ ั„ะฐะนะปะต INSTALL.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'ะžั‚ั‡ะตั‚';
+       $plugin_lang['strreports'] = 'ะžั‚ั‡ะตั‚ั‹';
+       $plugin_lang['strshowallreports'] = 'ะŸะพะบะฐะทะฐั‚ัŒ ะฒัะต ะพั‚ั‡ะตั‚ั‹';
+       $plugin_lang['strnoreports'] = 'ะžั‚ั‡ะตั‚ะพะฒ ะฝะตั‚.';
+       $plugin_lang['strcreatereport'] = 'ะกะพะทะดะฐั‚ัŒ ะพั‚ั‡ะตั‚';
+       $plugin_lang['strreportdropped'] = 'ะžั‚ั‡ะตั‚ ัƒะฝะธั‡ั‚ะพะถะตะฝ.';
+       $plugin_lang['strreportdroppedbad'] = 'ะฃะฝะธั‡ั‚ะพะถะตะฝะธะต ะพั‚ั‡ะตั‚ะฐ ะฟั€ะตั€ะฒะฐะฝะพ.';
+       $plugin_lang['strconfdropreport'] = 'ะ’ั‹ ัƒะฒะตั€ะตะฝั‹, ั‡ั‚ะพ ั…ะพั‚ะธั‚ะต ัƒะฝะธั‡ั‚ะพะถะธั‚ัŒ ะพั‚ั‡ะตั‚ "%s"?';
+       $plugin_lang['strreportneedsname'] = 'ะ’ะฐะผ ะฝะตะพะฑั…ะพะดะธะผะพ ัƒะบะฐะทะฐั‚ัŒ ะธะผั ะพั‚ั‡ะตั‚ะฐ.';
+       $plugin_lang['strreportneedsdef'] = 'ะ’ะฐะผ ะฝะตะพะฑั…ะพะดะธะผะพ ัƒะบะฐะทะฐั‚ัŒ SQL-ะทะฐะฟั€ะพั ะดะปั ะ’ะฐัˆะตะณะพ ะพั‚ั‡ะตั‚ะฐ.';
+       $plugin_lang['strreportcreated'] = 'ะžั‚ั‡ะตั‚ ัะพั…ั€ะฐะฝะตะฝ.';
+       $plugin_lang['strreportcreatedbad'] = 'ะกะพั…ั€ะฐะฝะตะฝะธะต ะพั‚ั‡ะตั‚ะฐ ะฟั€ะตั€ะฒะฐะฝะพ.';
+?>
diff --git a/plugins/Report/lang/slovak.php b/plugins/Report/lang/slovak.php
new file mode 100644 (file)
index 0000000..fa55a36
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        *      Slovenska lokalizacia phpPgAdmin-u.
+        */
+
+       // Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Nebola vytvorenรฉ report databรกza. Preฤรญtaj si INSTALL sรบbor s pokynmi.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Report';
+       $plugin_lang['strreports'] = 'Reporty';
+       $plugin_lang['strshowallreports'] = 'Zobraziลฅ Vลกetky Reporty';
+       $plugin_lang['strnoreports'] = 'Nenรกjdenรฉ ลพiadne reporty.';
+       $plugin_lang['strcreatereport'] = 'Vytvoriลฅ Report';
+       $plugin_lang['strreportdropped'] = 'Report zmazanรฝ.';
+       $plugin_lang['strreportdroppedbad'] = 'Report nebol zmazanรฝ.';
+       $plugin_lang['strconfdropreport'] = 'Naozaj chceลก zmazaลฅ report "%s"?';
+       $plugin_lang['strreportneedsname'] = 'Musรญลก zadaลฅ nรกzov pre tvoj report.';
+       $plugin_lang['strreportneedsdef'] = 'Musรญลก zadaลฅ SQL dotaz pre tvoj report.';
+       $plugin_lang['strreportcreated'] = 'Report uloลพenรฝ.';
+       $plugin_lang['strreportcreatedbad'] = 'Report nebol uloลพenรฝ.';
+?>
diff --git a/plugins/Report/lang/spanish.php b/plugins/Report/lang/spanish.php
new file mode 100644 (file)
index 0000000..7499d2f
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+    /**
+     * Spanish language file.
+     */
+
+       // Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Aรบn no se ha creado  la base de datos para los reportes. Lea las instrucciones del archivo INSTALL.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Reporte';
+       $plugin_lang['strreports'] = 'Reportes';
+       $plugin_lang['strshowallreports'] = 'Mostrar todos los reportes';
+       $plugin_lang['strnoreports'] = 'No se encontrรณ el reporte.';
+       $plugin_lang['strcreatereport'] = 'Crear Reporte';
+       $plugin_lang['strreportdropped'] = 'Reporte eliminado.';
+       $plugin_lang['strreportdroppedbad'] = 'Fallรณ al eliminar el Reporte.';
+       $plugin_lang['strconfdropreport'] = 'ยฟEstรกs seguro que quiere eliminar el reporte "%s"?';
+       $plugin_lang['strreportneedsname'] = 'Debe especificar un nombre para el reporte.';
+       $plugin_lang['strreportneedsdef'] = 'Debe especificar un SQL para el reporte.';
+       $plugin_lang['strreportcreated'] = 'Reporte guardado.';
+       $plugin_lang['strreportcreatedbad'] = 'Fallรณ al guardar el reporte.';
+?>
diff --git a/plugins/Report/lang/swedish.php b/plugins/Report/lang/swedish.php
new file mode 100644 (file)
index 0000000..8936ea6
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+       /**
+        * Swedish language file.
+        */
+
+       // Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb'] = 'Du har inte skapat nรฅgon rapportdatabas. Lรคs filen INSTALL fรถr instruktioner.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Rapport';
+       $plugin_lang['strreports'] = 'Rapporter';
+       $plugin_lang['strshowallreports'] = 'Visa alla rapporter';
+       $plugin_lang['strtopbar'] = '%s kรถrs pรฅ %s:%s -- Du รคr inloggad som anvรคndare "%s"';
+       $plugin_lang['strtimefmt'] = 'jS M, Y g:iA';
+       $plugin_lang['strnoreports'] = 'Hittade inga rapporter.';
+       $plugin_lang['strcreatereport'] = 'Skapa rapport';
+       $plugin_lang['strreportdropped'] = 'Rapport skapad.';
+       $plugin_lang['strreportcreated'] = 'Rapport sparad.';
+       $plugin_lang['strreportneedsname'] = 'Du mรฅste namnge din rapport.';
+       $plugin_lang['strreportcreatedbad'] = 'Misslyckades att spara rapport.';
+       $plugin_lang['strreportdroppedbad'] = 'Misslyckades att skapa rapport.';
+       $plugin_lang['strconfdropreport'] = 'ร„r du sรคker pรฅ att du vill radera rapporten "%s"?';
+       $plugin_lang['strreportneedsdef'] = 'Du mรฅste ange din SQL-frรฅga.';
+?>
diff --git a/plugins/Report/lang/turkish.php b/plugins/Report/lang/turkish.php
new file mode 100644 (file)
index 0000000..278bd9f
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+       /**
+        * Turkish language file.
+        */
+
+       // Basic
+       $plugin_lang['strplugindescription'] = 'Report plugin';
+       $plugin_lang['strnoreportsdb']  =  'reports veritabanฤฑ yaratฤฑลŸmamฤฑลŸ. Yรถnergeler iรงin lรผtfen INSTALL dosyasฤฑnฤฑ okuyunuz.';
+
+       // Reports
+       $plugin_lang['strreport'] = 'Rapor';
+       $plugin_lang['strreports'] = 'Raporlar';
+       $plugin_lang['strshowallreports'] = 'Tรผm raporlarฤฑ gรถster';
+       $plugin_lang['strnoreports'] = 'Hiรงbir rapor bulunamadฤฑ';
+       $plugin_lang['strcreatereport'] = 'Rapor yaratฤฑldฤฑ.';
+       $plugin_lang['strreportdropped'] = 'Rapor silindi';
+       $plugin_lang['strreportdroppedbad'] = 'Rapor silme iลŸi baลŸarฤฑsฤฑz oldu.';
+       $plugin_lang['strconfdropreport'] = '"%s" raporunu silmek istediฤŸinize emin misiniz?';
+       $plugin_lang['strreportneedsname'] = 'Raporunuza bir ad vermelisiniz.';
+       $plugin_lang['strreportneedsdef'] = 'Raporunuz iรงin SQL sorgularฤฑ yazmalฤฑsฤฑnฤฑz.';
+       $plugin_lang['strreportcreated'] = 'Rapor kaydedildi.';
+       $plugin_lang['strreportcreatedbad'] = 'Rapor kaydetme baลŸarฤฑsฤฑz oldu.';
+?>
diff --git a/plugins/Report/lang/ukrainian.php b/plugins/Report/lang/ukrainian.php
new file mode 100644 (file)
index 0000000..1606047
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+        /**
+         * Ukrainian KOI8-U language file.
+         */
+
+        // Basic
+        $plugin_lang['strplugindescription'] = 'Report plugin';
+        $plugin_lang['strnoreportsdb'] = 'ะ’ะธ ะฝะต ัั‚ะฒะพั€ะธะปะธ ะฑะฐะทัƒ ะดะฐะฝะธั… ะทะฒโ••ั‚โ••ะฒ. ะงะธั‚ะฐะนั‚ะต ะฟะพััะฝะตะฝะฝั ะฒ ั„ะฐะนะปโ•• INSTALL.';
+
+        // Reports
+        $plugin_lang['strreport'] = 'ะ—ะฒโ••ั‚';
+        $plugin_lang['strreports'] = 'ะ—ะฒโ••ั‚ะธ';
+        $plugin_lang['strshowallreports'] = 'ะŸะพะบะฐะทะฐั‚ะธ ะฒัโ•• ะทะฒโ••ั‚ะธ';
+        $plugin_lang['strnoreports'] = 'ะ—ะฒโ••ั‚โ••ะฒ ะฝะตะผะฐโ•“.';
+        $plugin_lang['strcreatereport'] = 'ะกั‚ะฒะพั€ะธั‚ะธ ะทะฒโ••ั‚';
+        $plugin_lang['strreportdropped'] = 'ะ—ะฒโ••ั‚ ะฒะธะดะฐะปะตะฝะพ.';
+        $plugin_lang['strreportdroppedbad'] = 'ะ’ะธะดะฐะปะตะฝะฝั ะทะฒโ••ั‚ะฐ ะฟะตั€ะตั€ะฒะฐะฝะพ.';
+        $plugin_lang['strconfdropreport'] = 'ะ’ะธ ะฒะฟะตะฒะฝะตะฝโ••, ั‰ะพ ะฑะฐะถะฐโ•“ั‚ะตะต ะฒะธะดะฐะปะธั‚ะธ ะทะฒโ••ั‚ "%s"?';
+        $plugin_lang['strreportneedsname'] = 'ะ’ะฐะผ ะฝะตะพะฑั…โ••ะดะฝะพ ะฒะบะฐะทะฐั‚ะธ โ••ะผ"ั ะทะฒโ••ั‚ัƒ.';
+        $plugin_lang['strreportneedsdef'] = 'ะ’ะฐะผ ะฝะตะพะฑั…โ••ะดะฝะพ ะฒะบะฐะทะฐั‚ะธ SQL-ะทะฐะฟะธั‚ ะดะปั ะ’ะฐัˆะพะณะพ ะทะฒโ••ั‚ัƒ.';
+        $plugin_lang['strreportcreated'] = 'ะ—ะฒโ••ั‚ ะทะฑะตั€ะตะถะตะฝะพ.';
+        $plugin_lang['strreportcreatedbad'] = 'ะ—ะฑะตั€ะตะถะตะฝะฝั ะทะฒโ••ั‚ัƒ ะฟะตั€ะตั€ะฒะฐะฝะพ.';
+?>
diff --git a/plugins/Report/plugin.php b/plugins/Report/plugin.php
new file mode 100644 (file)
index 0000000..8af27c0
--- /dev/null
@@ -0,0 +1,774 @@
+<?php
+require_once('./classes/Plugin.php');
+require_once('./plugins/Report/classes/Reports.php');
+
+class Report extends Plugin {
+
+       /**
+        * Attributes
+        */
+       protected $name = 'Report';
+       protected $lang;
+       protected $conf = array();
+       protected $_reportsdb = null;
+
+       /**
+        * Constructor
+        * Call parent constructor, passing the language that will be used.
+        * @param $language Current phpPgAdmin language. If it was not found in the plugin, English will be used.
+        */
+       function __construct($language) {
+               global $data;
+
+               /* loads $this->lang and $this->conf */
+               parent::__construct($language);
+
+               /* default values */
+               if (! isset($this->conf['reports_db'])) {
+                       $this->conf['reports_db'] = 'phppgadmin';
+               }
+               if (! isset($this->conf['reports_schema'])) {
+                       $this->conf['reports_schema'] = 'public';
+               }
+               if (! isset($this->conf['reports_table'])) {
+                       $this->conf['reports_table'] = 'ppa_reports';
+               }
+               if (! isset($this->conf['owned_reports_only'])) {
+                       $this->conf['owned_reports_only'] = false;
+               }
+       }
+
+       function get_reportsdb() {
+               if ($this->_reportsdb === null) {
+                       $status = 0;
+                       $this->_reportsdb = new Reports($this->conf, $status);
+
+                       if ($status !== 0) {
+                               global $misc, $lang;
+                               $misc->printHeader($lang['strreports']);
+                               $misc->printBody();
+                               $misc->printTrail('server');
+                               $misc->printTabs('server','reports');
+                               $misc->printMsg($lang['strnoreportsdb']);
+                               $misc->printFooter();
+                               exit;
+                       }
+               }
+
+               return $this->_reportsdb;
+       }
+
+       /**
+        * This method returns the functions that will hook in the phpPgAdmin core.
+        * To do include a function just put in the $hooks array the follwing code:
+        * 'hook' => array('function1', 'function2').
+        *
+        * Example:
+        * $hooks = array(
+        *      'toplinks' => array('add_plugin_toplinks'),
+        *      'tabs' => array('add_tab_entry'),
+        *  'action_buttons' => array('add_more_an_entry')
+        * );
+        *
+        * @return $hooks
+        */
+       function get_hooks() {
+               $hooks = array(
+                       'tabs' => array('add_plugin_tabs'),
+                       'trail' => array('add_plugin_trail'),
+                       'navlinks' => array('add_plugin_navlinks')
+               );
+               return $hooks;
+       }
+
+       /**
+        * This method returns the functions that will be used as actions.
+        * To do include a function that will be used as action, just put in the $actions array the follwing code:
+        *
+        * $actions = array(
+        *      'show_page',
+        *      'show_error',
+        * );
+        *
+        * @return $actions
+        */
+       function get_actions() {
+               $actions = array(
+                       'save_edit',
+                       'edit',
+                       'properties',
+                       'save_create',
+                       'create',
+                       'drop',
+                       'confirm_drop',
+                       'execute',
+                       'default_action'
+               );
+               return $actions;
+       }
+
+       /**
+        * Add plugin in the tabs
+        * @param $plugin_functions_parameters
+        */
+       function add_plugin_tabs(&$plugin_functions_parameters) {
+               global $misc;
+
+               $tabs = &$plugin_functions_parameters['tabs'];
+
+               if ($plugin_functions_parameters['section'] == 'server') {
+                       $tabs['report_plugin'] = array (
+                               'title' => $this->lang['strplugindescription'],
+                               'url' => 'plugin.php',
+                               'urlvars' => array(
+                                       'subject' => 'server',
+                                       'action' => 'default_action',
+                                       'plugin' => $this->name
+                               ),
+                               'hide' => false,
+                               'icon' => $this->icon('Report')
+                       );
+               }
+
+               if ($plugin_functions_parameters['section'] == 'report') {
+                       $tabs['report_plugin'] = array (
+                               'title' => $this->lang['strplugindescription'],
+                               'url' => 'plugin.php',
+                               'urlvars' => array(
+                                       'subject' => 'server',
+                                       'action' => 'default_action',
+                                       'plugin' => $this->name
+                               ),
+                               'hide' => false,
+                               'icon' => $this->icon('Report')
+                       );
+               }
+       }
+
+       /**
+        * Add plugin in the trail
+        * @param $plugin_functions_parameters
+        */
+       function add_plugin_trail(&$plugin_functions_parameters) {
+               global $misc, $lang;
+               $trail = &$plugin_functions_parameters['trail'];
+               $done = false;
+               $subject = '';
+               if (isset($_REQUEST['subject'])) {
+                       $subject = $_REQUEST['subject'];
+               }
+
+               $action = '';
+               if (isset($_REQUEST['action'])) {
+                       $action = $_REQUEST['action'];
+               }
+
+               if (isset($_REQUEST['plugin']) and $_REQUEST['plugin'] == 'Report') {
+                       $url = array (
+                               'url' => 'plugin.php',
+                               'urlvars' => array (
+                                       'plugin' => $this->name,
+                                       'action' => 'default_action'
+                               )
+                       );
+                       $trail['report_plugin'] = array (
+                               'title' => $this->lang['strreport'],
+                               'text' => $this->lang['strreport'],
+                               'url'   => $misc->getActionUrl($url, $_REQUEST, null, false),
+                               'icon' => $this->icon('Reports')
+                       );
+               }
+
+               if (isset($_REQUEST['plugin'])
+                       and $_REQUEST['plugin'] == 'Report'
+                       and $action != 'default_action'
+                       and in_array($action, $this->get_actions())
+               ) {
+
+                       $url = array (
+                               'url' => 'plugin.php',
+                               'urlvars' => array (
+                                       'plugin' => $this->name,
+                                       'action' => 'properties',
+                                       'report_id' => field('report_id'),
+                               )
+                       );
+
+                       if (isset($_REQUEST['report']))
+                               $url['urlvars']['report'] = field('report');
+
+                       $trail['report_plugin_name'] = array (
+                               'title' => $this->lang['strreport'],
+                               'text' => $this->lang['strreport'],
+                               'url'   => $misc->getActionUrl($url, $_REQUEST, null, false),
+                               'icon' => $this->icon('Report')
+                       );
+
+                       if (isset($_REQUEST['report']))
+                               $trail['report_plugin_name']['text'] = $_REQUEST['report'];
+
+               }
+       }
+
+       /**
+        * Add plugin in the navlinks
+        * @param $plugin_functions_parameters
+        */
+       function add_plugin_navlinks(&$params) {
+               global $misc, $lang;
+
+               if (
+                       ($params['place'] == 'sql-form' or $params['place'] == 'display-browse')
+                       and (isset($_SESSION['sqlquery']) && isset($params['env']['rs']) && is_object($params['env']['rs']) && $params['env']['rs']->recordCount() > 0)
+               ) {
+                       switch ($params['place']) {
+                               case 'sql-form':
+                               case 'display-browse':
+                                       if ( ! (isset($_REQUEST['plugin']) && $_REQUEST['plugin'] == $this->name) )
+                                               $params['navlinks'][] = array (
+                                                       'attr'=> array (
+                                                               'href' => array (
+                                                                       'url' => 'plugin.php',
+                                                                       'urlvars' => array (
+                                                                               'plugin' => $this->name,
+                                                                               'action' => 'create',
+                                                                               'server' => field('server'),
+                                                                               'database' => field('database'),
+                                                                               'schema' => field('schema'),
+                                                                               'report_sql' => $_SESSION['sqlquery']
+                                                                       )
+                                                               )
+                                                       ),
+                                                       'content' => $this->lang['strcreatereport']
+                                               );
+                                       else
+                                               $params['navlinks'][] = array (
+                                                       'attr'=> array (
+                                                               'href' => array (
+                                                                       'url' => 'plugin.php',
+                                                                       'urlvars' => array (
+                                                                               'plugin' => $this->name,
+                                                                               'action' => 'edit',
+                                                                               'server' => field('server'),
+                                                                               'database' => field('database'),
+                                                                               // 'schema' => field('schema'),
+                                                                               'report_id' => field('report_id')
+                                                                       )
+                                                               )
+                                                       ),
+                                                       'content' => $lang['stredit']
+                                               );
+                                       break;
+                               // case 'display-browse':
+                               //      if ( ! (isset($_REQUEST['plugin']) && $_REQUEST['plugin'] == $this->name) )
+                               //              $params['navlinks'][] = array (
+                               //                      'attr'=> array (
+                               //                              'href' => array (
+                               //                                      'url' => 'plugin.php',
+                               //                                      'urlvars' => array (
+                               //                                              'plugin' => $this->name,
+                               //                                              'action' => 'create',
+                               //                                              'server' => field('server'),
+                               //                                              'database' => field('database'),
+                               //                                              'schema' => field('schema'),
+                               //                                              'report_sql' => field('query'),
+                               //                                              'paginate' => (isset($_REQUEST['paginate']) ? $_REQUEST['paginate'] : 'f')
+                               //                                      )
+                               //                              )
+                               //                      ),
+                               //                      'content' => $this->lang['strcreatereport']
+                               //              );
+                               //      else
+                               //              $params['navlinks'][] = array (
+                               //                      'attr'=> array (
+                               //                              'href' => array (
+                               //                                      'url' => 'plugin.php',
+                               //                                      'urlvars' => array (
+                               //                                              'plugin' => $this->name,
+                               //                                              'action' => 'edit',
+                               //                                              'server' => field('server'),
+                               //                                              'database' => field('database'),
+                               //                                              // 'schema' => field('schema'),
+                               //                                              'report_id' => field('report_id')
+                               //                                      )
+                               //                              )
+                               //                      ),
+                               //                      'content' => $lang['stredit']
+                               //              );
+                                       break;
+                       }
+               }
+       }
+
+       function get_subject_params() {
+               $vars = array();
+               
+               if (! isset($_REQUEST['action']))
+                       return $vars;
+
+               $action = $_REQUEST['action'];
+
+               switch ($action) {
+                       case 'execute':
+                               $vars = array(
+                                       'report_id' => $_REQUEST['report_id'],
+                                       'report' => $_REQUEST['report'],
+                                       'action' => 'properties' /*defaults to properties*/
+                               );
+                               if (isset($_REQUEST['back']))
+                                       $vars['action'] = $_REQUEST['back'];
+                       break;
+               }
+
+               return $vars;
+       }
+
+       function edit($msg = '') {
+               global $data, $misc, $lang;
+
+               $reportsdb = $this->get_reportsdb();
+
+               $misc->printHeader($this->lang['strreports']);
+               $misc->printBody();
+               $misc->printTrail('server');
+               $misc->printTabs('server', 'report_plugin');
+               $misc->printMsg($msg);
+
+               // If it's a first, load then get the data from the database
+               $report = $reportsdb->getReport($_REQUEST['report_id']);
+               
+               if ($_REQUEST['action'] == 'edit') {                    
+                       $_POST['report_name'] = $report->fields['report_name'];
+                       $_POST['db_name'] = $report->fields['db_name'];
+                       $_POST['descr'] = $report->fields['descr'];
+                       $_POST['report_sql'] = $report->fields['report_sql'];
+                       if ($report->fields['paginate'] == 't') {
+                               $_POST['paginate'] = true;
+                       }
+               }
+
+               // Get a list of available databases
+               $databases = $data->getDatabases();
+
+               $_REQUEST['report'] = $report->fields['report_name'];
+
+               echo "<form action=\"plugin.php?plugin={$this->name}\" method=\"post\">\n";
+               echo $misc->form;
+               echo "<table style=\"width: 100%\">\n";
+               echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
+               echo "<td class=\"data1\"><input name=\"report_name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
+                       htmlspecialchars($_POST['report_name']), "\" /></td></tr>\n";
+               echo "<tr><th class=\"data left required\">{$lang['strdatabase']}</th>\n";
+               echo "<td class=\"data1\"><select name=\"db_name\">\n";
+               while (!$databases->EOF) {
+                       $dbname = $databases->fields['datname'];
+                       echo "<option value=\"", htmlspecialchars($dbname), "\"",
+                       ($dbname == $_POST['db_name']) ? ' selected="selected"' : '', ">",
+                               htmlspecialchars($dbname), "</option>\n";
+                       $databases->moveNext();
+               }
+               echo "</select></td></tr>\n";
+               echo "<tr><th class=\"data left\">{$lang['strcomment']}</th>\n";
+               echo "<td class=\"data1\"><textarea style=\"width:100%;\" rows=\"5\" cols=\"50\" name=\"descr\">",
+                       htmlspecialchars($_POST['descr']), "</textarea></td></tr>\n";
+               echo "<tr><th class=\"data left required\">{$lang['strsql']}</th>\n";
+               echo "<td class=\"data1\"><textarea style=\"width:100%;\" rows=\"15\" cols=\"50\" name=\"report_sql\">",
+                       htmlspecialchars($_POST['report_sql']), "</textarea></td></tr>\n";
+               echo "</table>\n";
+               echo "<label for=\"paginate\"><input type=\"checkbox\" id=\"paginate\" name=\"paginate\"", (isset($_POST['paginate']) ? ' checked="checked"' : ''), " />&nbsp;{$lang['strpaginate']}</label>\n";
+               echo "<p><input type=\"hidden\" name=\"action\" value=\"save_edit\" />\n";
+               echo "<input type=\"submit\" value=\"{$lang['strsave']}\" />\n";
+               echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n";
+               echo "<input type=\"hidden\" name=\"report_id\" value=\"{$report->fields['report_id']}\" />\n";
+               echo "</form>\n";
+               $misc->printFooter();
+       }
+
+       /**
+        * Saves changes to a report
+        */
+       function save_edit() {
+               global $lang;
+
+               $reportsdb = $this->get_reportsdb();
+
+               if (isset($_REQUEST['cancel'])) {
+                       $this->default_action();
+                       exit;
+               }
+
+               if (!isset($_POST['report_name'])) $_POST['report_name'] = '';
+               if (!isset($_POST['db_name'])) $_POST['db_name'] = '';
+               if (!isset($_POST['descr'])) $_POST['descr'] = '';
+               if (!isset($_POST['report_sql'])) $_POST['report_sql'] = '';
+
+               // Check that they've given a name and a definition
+               if ($_POST['report_name'] == '') {
+                       $this->edit($this->lang['strreportneedsname']);
+               } elseif ($_POST['report_sql'] == '') {
+                       $this->edit($this->lang['strreportneedsdef']);
+               } else {
+                       $status = $reportsdb->alterReport($_POST['report_id'], $_POST['report_name'], $_POST['db_name'],
+                               $_POST['descr'], $_POST['report_sql'], isset($_POST['paginate']));
+                       if ($status == 0)
+                               $this->default_action($this->lang['strreportcreated']);
+                       else
+                               $this->edit($this->lang['strreportcreatedbad']);
+               }
+       }
+
+       /**
+        * Display read-only properties of a report
+        */
+       function properties($msg = '') {
+               global $data, $reportsdb, $misc;
+               global $lang;
+
+               $reportsdb = $this->get_reportsdb();
+               
+               $misc->printHeader($this->lang['strreports']);
+               $misc->printBody();
+               $misc->printTrail('server');
+               $misc->printTabs('server', 'report_plugin');
+               $misc->printMsg($msg);
+
+               $report = $reportsdb->getReport($_REQUEST['report_id']);
+
+               $_REQUEST['report'] = $report->fields['report_name'];
+
+               if ($report->recordCount() == 1) {
+                       echo "<table>\n";
+                       echo "<tr><th class=\"data left\">{$lang['strname']}</th>\n";
+                       echo "<td class=\"data1\">", $misc->printVal($report->fields['report_name']), "</td></tr>\n";
+                       echo "<tr><th class=\"data left\">{$lang['strdatabase']}</th>\n";
+                       echo "<td class=\"data1\">", $misc->printVal($report->fields['db_name']), "</td></tr>\n";
+                       echo "<tr><th class=\"data left\">{$lang['strcomment']}</th>\n";
+                       echo "<td class=\"data1\">", $misc->printVal($report->fields['descr']), "</td></tr>\n";
+                       echo "<tr><th class=\"data left\">{$lang['strpaginate']}</th>\n";
+                       echo "<td class=\"data1\">", $misc->printVal($report->fields['paginate'], 'yesno', array('align' => 'left')), "</td></tr>\n";
+                       echo "<tr><th class=\"data left\">{$lang['strsql']}</th>\n";
+                       echo "<td class=\"data1\">", $misc->printVal($report->fields['report_sql']), "</td></tr>\n";
+                       echo "</table>\n";
+               }
+               else echo "<p>{$lang['strinvalidparam']}</p>\n";
+
+               $urlvars = array (
+                       'plugin' => $this->name,
+                       'server' => $_REQUEST['server']
+               );
+               if (isset($_REQUEST['schema'])) $urlvars['schema'] = $_REQUEST['schema'];
+               if (isset($_REQUEST['schema'])) $urlvars['database'] = $_REQUEST['schema'];
+               
+               $navlinks = array (
+                       'showall' => array (
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'plugin.php',
+                                               'urlvars' => array_merge($urlvars, array('action' => 'default_action'))
+                                       )
+                               ),
+                               'content' => $this->lang['strshowallreports']
+                       ),
+                       'edit' => array (
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'plugin.php',
+                                               'urlvars' => array_merge($urlvars, array(
+                                                       'action' => 'edit',
+                                                       'report_id' => $report->fields['report_id'])
+                                               )
+                                       )
+                               ),
+                               'content' => $lang['stredit']
+                       ),
+                       'execute' => array (
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'plugin.php',
+                                               'urlvars' => array_merge($urlvars, array(
+                                                       'action' => 'execute',
+                                                       'report' => $report->fields['report_name'],
+                                                       'database' => $report->fields['db_name'],
+                                                       'report_id' => $report->fields['report_id'],
+                                                       'paginate' => $report->fields['paginate'],
+                                                       'nohistory' => 't',
+                                                       'return' => 'plugin',
+                                                       'back' => 'properties'
+                                               ))
+                                       )
+                               ),
+                               'content' => $lang['strexecute']
+                       )
+               );
+               $misc->printNavLinks($navlinks, 'reports-properties');
+       }
+
+       /**
+        * Displays a screen where they can enter a new report
+        */
+       function create($msg = '') {
+               global $data, $reportsdb, $misc;
+               global $lang;
+
+               $misc->printHeader($this->lang['strreports']);
+               $misc->printBody();
+               $misc->printTrail('server');
+               $misc->printTabs('server', 'report_plugin');
+               $misc->printMsg($msg);
+               
+               if (!isset($_REQUEST['report_name'])) $_REQUEST['report_name'] = '';
+               if (!isset($_REQUEST['db_name'])) $_REQUEST['db_name'] = '';
+               if (!isset($_REQUEST['descr'])) $_REQUEST['descr'] = '';
+               if (!isset($_REQUEST['report_sql'])) $_REQUEST['report_sql'] = '';
+
+               if (isset($_REQUEST['database'])) {
+                       $_REQUEST['db_name'] = $_REQUEST['database'];
+                       unset($_REQUEST['database']);
+                       $misc->setForm();
+               }
+               
+               $databases = $data->getDatabases();
+
+               echo "<form action=\"plugin.php?plugin={$this->name}\" method=\"post\">\n";
+               echo $misc->form;
+               echo "<table style=\"width: 100%\">\n";
+               echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
+               echo "<td class=\"data1\"><input name=\"report_name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
+                       htmlspecialchars($_REQUEST['report_name']), "\" /></td></tr>\n";
+               echo "<tr><th class=\"data left required\">{$lang['strdatabase']}</th>\n";
+               echo "<td class=\"data1\"><select name=\"db_name\">\n";
+               while (!$databases->EOF) {
+                       $dbname = $databases->fields['datname'];
+                       echo "<option value=\"", htmlspecialchars($dbname), "\"",
+                       ($dbname == $_REQUEST['db_name']) ? ' selected="selected"' : '', ">",
+                               htmlspecialchars($dbname), "</option>\n";
+                       $databases->moveNext();
+               }
+               echo "</select></td></tr>\n";
+               echo "<tr><th class=\"data left\">{$lang['strcomment']}</th>\n";
+               echo "<td class=\"data1\"><textarea style=\"width:100%;\" rows=\"5\" cols=\"50\" name=\"descr\">",
+                       htmlspecialchars($_REQUEST['descr']), "</textarea></td></tr>\n";
+               echo "<tr><th class=\"data left required\">{$lang['strsql']}</th>\n";
+               echo "<td class=\"data1\"><textarea style=\"width:100%;\" rows=\"15\" cols=\"50\" name=\"report_sql\">",
+                       htmlspecialchars($_REQUEST['report_sql']), "</textarea></td></tr>\n";
+               echo "</table>\n";
+               echo "<label for=\"paginate\"><input type=\"checkbox\" id=\"paginate\" name=\"paginate\"", (isset($_REQUEST['paginate']) ? ' checked="checked"' : ''), " />&nbsp;{$lang['strpaginate']}</label>\n";
+               echo "<p><input type=\"hidden\" name=\"action\" value=\"save_create\" />\n";
+               echo "<input type=\"submit\" value=\"{$lang['strsave']}\" />\n";
+               echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n";
+               echo "</form>\n";
+               $misc->printFooter();
+       }
+
+       /**
+        * Actually creates the new report in the database
+        */
+       function save_create() {
+               global $lang;
+
+               if (isset($_REQUEST['cancel'])) {
+                       $this->default_action();
+                       exit;
+               }
+
+               $reportsdb = $this->get_reportsdb();
+
+               if (!isset($_POST['report_name'])) $_POST['report_name'] = '';
+               if (!isset($_POST['db_name'])) $_POST['db_name'] = '';
+               if (!isset($_POST['descr'])) $_POST['descr'] = '';
+               if (!isset($_POST['report_sql'])) $_POST['report_sql'] = '';
+
+               // Check that they've given a name and a definition
+               if ($_POST['report_name'] == '') $this->create($this->lang['strreportneedsname']);
+               elseif ($_POST['report_sql'] == '') $this->create($this->lang['strreportneedsdef']);
+               else {
+                       $status = $reportsdb->createReport($_POST['report_name'], $_POST['db_name'],
+                                       $_POST['descr'], $_POST['report_sql'], isset($_POST['paginate']));
+                       if ($status == 0)
+                               $this->default_action($this->lang['strreportcreated']);
+                       else
+                               $this->create($this->lang['strreportcreatedbad']);
+               }
+       }
+
+       /**
+        * Show confirmation of drop and perform actual drop
+        */
+       function drop() {
+               global $reportsdb, $misc;
+               global $lang;
+
+               $confirm = false;
+               if (isset($_REQUEST['confirm'])) $confirm = true;
+
+               $reportsdb = $this->get_reportsdb();
+
+               $misc->printHeader($this->lang['strreports']);
+               $misc->printBody();
+               
+               if (isset($_REQUEST['cancel'])) {
+                       $this->default_action();
+                       exit;
+               }
+
+               if ($confirm) {
+                       // Fetch report from the database
+                       $report = $reportsdb->getReport($_REQUEST['report_id']);
+
+                       $_REQUEST['report'] = $report->fields['report_name'];
+                       $misc->printTrail('report');
+                       $misc->printTitle($lang['strdrop']);
+
+                       echo "<p>", sprintf($this->lang['strconfdropreport'], $misc->printVal($report->fields['report_name'])), "</p>\n";
+
+                       echo "<form action=\"plugin.php?plugin={$this->name}\" method=\"post\">\n";
+                       echo $misc->form;
+                       echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
+                       echo "<input type=\"hidden\" name=\"report_id\" value=\"", htmlspecialchars($_REQUEST['report_id']), "\" />\n";
+                       echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\" />\n";
+                       echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n";
+                       echo "</form>\n";
+               } else {
+                       $status = $reportsdb->dropReport($_POST['report_id']);
+                       if ($status == 0)
+                               $this->default_action($this->lang['strreportdropped']);
+                       else
+                               $this->default_action($this->lang['strreportdroppedbad']);
+               }
+
+               $misc->printFooter();
+       }
+
+       function execute() {
+               global $misc, $lang, $data;
+
+               $reportsdb = $this->get_reportsdb();
+
+               $report = $reportsdb->getReport($_REQUEST['report_id']);
+               
+               $_POST['query'] = $report->fields['report_sql'];
+
+               include('./sql.php');
+       }
+
+       /**
+        * Show default list of reports in the database
+        */
+       function default_action($msg = '') {
+               global $data, $misc, $lang;
+
+               $reportsdb = $this->get_reportsdb();
+
+               $misc->printHeader($this->lang['strreports']);
+               $misc->printBody();
+               $misc->printTrail('server');
+               $misc->printTabs('server', 'report_plugin');
+               $misc->printMsg($msg);
+               
+               $reports = $reportsdb->getReports();
+
+               $columns = array(
+                       'report' => array(
+                               'title' => $this->lang['strreport'],
+                               'field' => field('report_name'),
+                               'url'   => "plugin.php?plugin={$this->name}&amp;action=properties&amp;{$misc->href}&amp;",
+                               'vars'  => array(
+                                       'report_id' => 'report_id',
+                                       'report' => 'report_name'
+                               ),
+                       ),
+                       'database' => array(
+                               'title' => $lang['strdatabase'],
+                               'field' => field('db_name'),
+                       ),
+                       'created' => array(
+                               'title' => $lang['strcreated'],
+                               'field' => field('date_created'),
+                       ),
+                       'paginate' => array(
+                               'title' => $lang['strpaginate'],
+                               'field' => field('paginate'),
+                               'type' => 'yesno',
+                       ),
+                       'actions' => array(
+                               'title' => $lang['stractions'],
+                       ),
+                       'comment' => array(
+                               'title' => $lang['strcomment'],
+                               'field' => field('descr'),
+                       ),
+               );
+               
+               //$return_url = urlencode("plugin.php?plugin={$this->name}&amp;{$misc->href}");
+               $urlvars = $misc->getRequestVars();
+               
+               $actions = array(
+                       'run' => array (
+                               'content' => $lang['strexecute'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'plugin.php',
+                                               'urlvars' => array_merge($urlvars, array (
+                                                       'plugin' => $this->name,
+                                                       'action' => 'execute',
+                                                       'report' => field('report_name'),
+                                                       'database' => field('db_name'),
+                                                       'report_id' => field('report_id'),
+                                                       'paginate' => field('paginate'),
+                                                       'nohistory' => 't',
+                                                       'return' => 'plugin',
+                                                       'back' => 'default_action'
+                                               ))
+                                       )
+                               )
+                       ),
+                       'edit' => array (
+                               'content' => $lang['stredit'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'plugin.php',
+                                               'urlvars' => array_merge($urlvars, array (
+                                                       'plugin' => $this->name,
+                                                       'action' => 'edit',
+                                                       'report_id' => field('report_id'),
+                                               ))
+                                       )
+                               )
+                       ),
+                       'drop' => array(
+                               'content' => $lang['strdrop'],
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'plugin.php',
+                                               'urlvars' => array_merge($urlvars, array (
+                                                       'plugin' => $this->name,
+                                                       'action' => 'drop',
+                                                       'confirm' => 'true',
+                                                       'report_id' => field('report_id'),
+                                               ))
+                                       )
+                               )
+                       ),
+               );
+               
+               $misc->printTable($reports, $columns, $actions, 'reports-reports', $this->lang['strnoreports']);
+
+               $navlinks = array (
+                       array (
+                               'attr'=> array (
+                                       'href' => array (
+                                               'url' => 'plugin.php',
+                                               'urlvars' => array (
+                                                       'plugin' => $this->name, 
+                                                       'server' => field('server'),
+                                                       'action' => 'create')
+                                       )
+                               ),
+                               'content' => $this->lang['strcreatereport']
+                       )
+               );
+               $misc->printNavLinks($navlinks, 'reports-reports');
+               $misc->printFooter();
+       }
+}
+?>
diff --git a/plugins/Report/sql/reports-pgsql.sql b/plugins/Report/sql/reports-pgsql.sql
new file mode 100644 (file)
index 0000000..1272a76
--- /dev/null
@@ -0,0 +1,27 @@
+-- SQL script to create reports database for PostgreSQL
+-- 
+-- To run, type: psql template1 < reports-pgsql.sql
+--
+-- $Id: reports-pgsql.sql,v 1.4 2007/04/16 11:02:36 mr-russ Exp $
+
+CREATE DATABASE phppgadmin;
+
+\connect phppgadmin
+
+CREATE TABLE ppa_reports (
+       report_id SERIAL,
+       report_name varchar(255) NOT NULL,
+       db_name varchar(255) NOT NULL,
+       date_created date DEFAULT NOW() NOT NULL,
+       created_by varchar(255) NOT NULL,
+       descr text,
+       report_sql text NOT NULL,
+       paginate boolean NOT NULL,
+       PRIMARY KEY (report_id)
+);
+
+-- Allow everyone to do everything with reports.  This may
+-- or may not be what you want.
+GRANT SELECT,INSERT,UPDATE,DELETE ON ppa_reports TO PUBLIC;
+GRANT SELECT,UPDATE ON ppa_reports_report_id_seq TO PUBLIC;
+