--- /dev/null
+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.
--- /dev/null
+<?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));
+ }
+
+ }
+?>
--- /dev/null
+<?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;
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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'] = 'ูู
ูุชู
ุญูุธ ุงูุชูุฑูุฑุ ููุฏ ูุดูุช ุนู
ููุฉ ุงูุญูุธ.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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'] = 'ๅจๅญๆฅ่กจๅคฑ่ดฅ';
+?>
--- /dev/null
+<?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'] = '็กๆณๅฒๅญๅ ฑ่กจใ';
+?>
--- /dev/null
+<?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
--- /dev/null
+<?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'] = 'ๅ ฑ่กจๅฒๅญๅทฒๅคฑๆใ';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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'] = 'ฮ ฮฑฯฮฟฮธฮฎฮบฮตฯ
ฯฮท ฯฮทฯ ฮฑฮฝฮฑฯฮฟฯฮฌฯ ฮฑฯฮญฯฯ
ฯฮต.';
+
+?>
--- /dev/null
+<?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'] = 'ืืื ืืชื ืืืื ืฉืืจืฆืื ื ืืืืืง ืืช ืืืื "%s"l?';
+ $plugin_lang['strreportneedsname'] = 'ืืชื ืืืื ืืฆืืื ืฉื ืืืื.';
+ $plugin_lang['strreportneedsdef'] = 'ืืชื ืืืื ืืชืช SQL ืืืื.';
+ $plugin_lang['strreportcreated'] = 'ืืื ื ืฉืืจ.';
+ $plugin_lang['strreportcreatedbad'] = 'ืฉืืืจืช ืืื ื ืืฉืื.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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'] = 'ใฌใใผใใฎไฟๅญใซๅคฑๆใใพใใใ';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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'] = 'ัะฏะจะฒะกะฎะฅะฎะฉะฅ ะฏะดะพะฅะดะก ะฐะฒะฅะฒะทะกะฎะฏ.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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ฤ.';
+?>
--- /dev/null
+<?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'] = 'ะกะพั
ัะฐะฝะตะฝะธะต ะพััะตัะฐ ะฟัะตัะฒะฐะฝะพ.';
+?>
--- /dev/null
+<?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รฝ.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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.';
+?>
--- /dev/null
+<?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'] = 'ะะฑะตัะตะถะตะฝะฝั ะทะฒโัั ะฟะตัะตัะฒะฐะฝะพ.';
+?>
--- /dev/null
+<?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"' : ''), " /> {$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"' : ''), " /> {$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}&action=properties&{$misc->href}&",
+ '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}&{$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();
+ }
+}
+?>
--- /dev/null
+-- 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;
+