'. It will give you a report about
+ which strings are missing from your language file and which need to be
+ deleted.
+
+Thank you for your contribution! You have just made phpPgAdmin accessible
+to thousands more users!
diff --git a/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/admin.php b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/admin.php
new file mode 100644
index 00000000..a8740a28
--- /dev/null
+++ b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/admin.php
@@ -0,0 +1,753 @@
+printTrail('schema');
+ $misc->printTitle($lang['strclusterindex'], 'pg.index.cluster');
+
+ echo "\n";
+ } // END single cluster
+ else {
+ //If multi table cluster
+ if ($type == 'table') { // cluster one or more table
+ if (is_array($_REQUEST['table'])) {
+ $msg='';
+ foreach($_REQUEST['table'] as $o) {
+ $status = $data->clusterIndex($o);
+ if ($status == 0)
+ $msg.= sprintf('%s: %s ', htmlentities($o, ENT_QUOTES, 'UTF-8'), $lang['strclusteredgood']);
+ else {
+ doDefault($type, sprintf('%s%s: %s ', $msg, htmlentities($o, ENT_QUOTES, 'UTF-8'), $lang['strclusteredbad']));
+ return;
+ }
+ }
+ // Everything went fine, back to the Default page....
+ doDefault($msg);
+ }
+ else {
+ $status = $data->clusterIndex($_REQUEST['object']);
+ if ($status == 0) {
+ doAdmin($type, $lang['strclusteredgood']);
+ }
+ else
+ doAdmin($type, $lang['strclusteredbad']);
+ }
+ }
+ else { // Cluster all tables in database
+ $status = $data->clusterIndex();
+ if ($status == 0) {
+ doAdmin($type, $lang['strclusteredgood']);
+ }
+ else
+ doAdmin($type, $lang['strclusteredbad']);
+ }
+ }
+ }
+
+ /**
+ * Show confirmation of reindex and perform reindex
+ */
+ function doReindex($type, $confirm=false) {
+ global $script, $data, $misc, $lang, $_reload_browser;
+
+ if (($type == 'table') && empty($_REQUEST['table']) && empty($_REQUEST['ma'])) {
+ doDefault($lang['strspecifytabletoreindex']);
+ return;
+ }
+
+ if ($confirm) {
+ if (isset($_REQUEST['ma'])) {
+ $misc->printTrail('schema');
+ $misc->printTitle($lang['strreindex'], 'pg.reindex');
+
+ echo "\n";
+ } // END single reindex
+ else {
+ //If multi table reindex
+ if (($type == 'table') && is_array($_REQUEST['table'])) {
+ $msg='';
+ foreach($_REQUEST['table'] as $o) {
+ $status = $data->reindex(strtoupper($type), $o, isset($_REQUEST['reindex_force']));
+ if ($status == 0)
+ $msg.= sprintf('%s: %s ', htmlentities($o, ENT_QUOTES, 'UTF-8'), $lang['strreindexgood']);
+ else {
+ doDefault($type, sprintf('%s%s: %s ', $msg, htmlentities($o, ENT_QUOTES, 'UTF-8'), $lang['strreindexbad']));
+ return;
+ }
+ }
+ // Everything went fine, back to the Default page....
+ $_reload_browser = true;
+ doDefault($msg);
+ }
+ else {
+ $status = $data->reindex(strtoupper($type), $_REQUEST['object'], isset($_REQUEST['reindex_force']));
+ if ($status == 0) {
+ $_reload_browser = true;
+ doAdmin($type, $lang['strreindexgood']);
+ }
+ else
+ doAdmin($type, $lang['strreindexbad']);
+ }
+ }
+ }
+
+ /**
+ * Show confirmation of analyze and perform analyze
+ */
+ function doAnalyze($type, $confirm=false) {
+ global $script, $data, $misc, $lang, $_reload_browser;
+
+ if (($type == 'table') && empty($_REQUEST['table']) && empty($_REQUEST['ma'])) {
+ doDefault($lang['strspecifytabletoanalyze']);
+ return;
+ }
+
+ if ($confirm) {
+ if (isset($_REQUEST['ma'])) {
+ $misc->printTrail('schema');
+ $misc->printTitle($lang['stranalyze'], 'pg.analyze');
+
+ echo "\n";
+ } // END single analyze
+ else {
+ //If multi table analyze
+ if (($type == 'table') && is_array($_REQUEST['table'])) {
+ $msg='';
+ foreach($_REQUEST['table'] as $o) {
+ $status = $data->analyzeDB($o);
+ if ($status == 0)
+ $msg.= sprintf('%s: %s ', htmlentities($o, ENT_QUOTES, 'UTF-8'), $lang['stranalyzegood']);
+ else {
+ doDefault($type, sprintf('%s%s: %s ', $msg, htmlentities($o, ENT_QUOTES, 'UTF-8'), $lang['stranalyzebad']));
+ return;
+ }
+ }
+ // Everything went fine, back to the Default page....
+ $_reload_browser = true;
+ doDefault($msg);
+ }
+ else {
+ //we must pass table here. When empty, analyze the whole db
+ $status = $data->analyzeDB($_REQUEST['table']);
+ if ($status == 0) {
+ $_reload_browser = true;
+ doAdmin($type, $lang['stranalyzegood']);
+ }
+ else
+ doAdmin($type, $lang['stranalyzebad']);
+ }
+ }
+ }
+
+ /**
+ * Show confirmation of vacuum and perform actual vacuum
+ */
+ function doVacuum($type, $confirm = false) {
+ global $script, $data, $misc, $lang, $_reload_browser;
+
+ if (($type == 'table') && empty($_REQUEST['table']) && empty($_REQUEST['ma'])) {
+ doDefault($lang['strspecifytabletovacuum']);
+ return;
+ }
+
+ if ($confirm) {
+ if (isset($_REQUEST['ma'])) {
+ $misc->printTrail('schema');
+ $misc->printTitle($lang['strvacuum'], 'pg.vacuum');
+
+ echo "\n";
+ } // END single vacuum
+ else {
+ //If multi drop
+ if (is_array($_REQUEST['table'])) {
+ $msg='';
+ foreach($_REQUEST['table'] as $t) {
+ $status = $data->vacuumDB($t, isset($_REQUEST['vacuum_analyze']), isset($_REQUEST['vacuum_full']), isset($_REQUEST['vacuum_freeze']));
+ if ($status == 0)
+ $msg.= sprintf('%s: %s ', htmlentities($t, ENT_QUOTES, 'UTF-8'), $lang['strvacuumgood']);
+ else {
+ doDefault($type, sprintf('%s%s: %s ', $msg, htmlentities($t, ENT_QUOTES, 'UTF-8'), $lang['strvacuumbad']));
+ return;
+ }
+ }
+ // Everything went fine, back to the Default page....
+ $_reload_browser = true;
+ doDefault($msg);
+ }
+ else {
+ //we must pass table here. When empty, vacuum the whole db
+ $status = $data->vacuumDB($_REQUEST['table'], isset($_REQUEST['vacuum_analyze']), isset($_REQUEST['vacuum_full']), isset($_REQUEST['vacuum_freeze']));
+ if ($status == 0) {
+ $_reload_browser = true;
+ doAdmin($type, $lang['strvacuumgood']);
+ }
+ else
+ doAdmin($type, $lang['strvacuumbad']);
+ }
+ }
+ }
+
+ /**
+ * Add or Edit autovacuum params and save them
+ */
+ function doEditAutovacuum($type, $confirm, $msg='') {
+ global $script, $data, $misc, $lang;
+
+ if (empty($_REQUEST['table'])) {
+ doAdmin($type, '', $lang['strspecifyeditvacuumtable']);
+ return;
+ }
+
+ $script = ($type == 'database')? 'database.php' : 'tables.php';
+
+ if ($confirm) {
+ $misc->printTrail($type);
+ $misc->printTitle(sprintf($lang['streditvacuumtable'], $misc->printVal($_REQUEST['table'])));
+ $misc->printMsg(sprintf($msg, $misc->printVal($_REQUEST['table'])));
+
+ if (empty($_REQUEST['table'])) {
+ doAdmin($type, '', $lang['strspecifyeditvacuumtable']);
+ return;
+ }
+
+ $old_val = $data->getTableAutovacuum($_REQUEST['table']);
+ $defaults = $data->getAutovacuum();
+ $old_val = $old_val->fields;
+
+ if (isset($old_val['autovacuum_enabled']) and ($old_val['autovacuum_enabled'] == 'off')) {
+ $enabled = '';
+ $disabled = 'checked="checked"';
+ }
+ else {
+ $enabled = 'checked="checked"';
+ $disabled = '';
+ }
+
+ if (!isset($old_val['autovacuum_vacuum_threshold'])) $old_val['autovacuum_vacuum_threshold'] = '';
+ if (!isset($old_val['autovacuum_vacuum_scale_factor'])) $old_val['autovacuum_vacuum_scale_factor'] = '';
+ if (!isset($old_val['autovacuum_analyze_threshold'])) $old_val['autovacuum_analyze_threshold'] = '';
+ if (!isset($old_val['autovacuum_analyze_scale_factor'])) $old_val['autovacuum_analyze_scale_factor'] = '';
+ if (!isset($old_val['autovacuum_vacuum_cost_delay'])) $old_val['autovacuum_vacuum_cost_delay'] = '';
+ if (!isset($old_val['autovacuum_vacuum_cost_limit'])) $old_val['autovacuum_vacuum_cost_limit'] = '';
+
+ echo "\n";
+ }
+ else {
+ $status = $data->saveAutovacuum($_REQUEST['table'], $_POST['autovacuum_enabled'], $_POST['autovacuum_vacuum_threshold'],
+ $_POST['autovacuum_vacuum_scale_factor'], $_POST['autovacuum_analyze_threshold'], $_POST['autovacuum_analyze_scale_factor'],
+ $_POST['autovacuum_vacuum_cost_delay'], $_POST['autovacuum_vacuum_cost_limit']);
+
+ if ($status == 0)
+ doAdmin($type, '', sprintf($lang['strsetvacuumtablesaved'], $_REQUEST['table']));
+ else
+ doEditAutovacuum($type, true, $lang['strsetvacuumtablefail']);
+ }
+ }
+
+ /**
+ * confirm drop autovacuum params for a table and drop it
+ */
+ function doDropAutovacuum($type, $confirm) {
+ global $script, $data, $misc, $lang;
+
+ if (empty($_REQUEST['table'])) {
+ doAdmin($type, '', $lang['strspecifydelvacuumtable']);
+ return;
+ }
+
+ if ($confirm) {
+ $misc->printTrail($type);
+ $misc->printTabs($type,'admin');
+
+ $script = ($type == 'database')? 'database.php' : 'tables.php';
+
+ printf("{$lang['strdelvacuumtable']}
\n",
+ $misc->printVal("\"{$_GET['schema']}\".\"{$_GET['table']}\""));
+
+ echo "\n";
+
+ echo "\n";
+ }
+ else {
+
+ $status = $data->dropAutovacuum($_POST['table']);
+
+ if ($status == 0) {
+ doAdmin($type, '', sprintf($lang['strvacuumtablereset'], $misc->printVal($_POST['table'])));
+ }
+ else
+ doAdmin($type, '', sprintf($lang['strdelvacuumtablefail'], $misc->printVal($_POST['table'])));
+ }
+ }
+
+ /**
+ * database/table administration and tuning tasks
+ *
+ * $Id: admin.php
+ */
+
+ function doAdmin($type, $msg = '') {
+ global $script, $data, $misc, $lang;
+
+ $misc->printTrail($type);
+ $misc->printTabs($type,'admin');
+ $misc->printMsg($msg);
+
+ if ($type == 'database')
+ printf("{$lang['stradminondatabase']}
\n", $misc->printVal($_REQUEST['object']));
+ else
+ printf("{$lang['stradminontable']}
\n", $misc->printVal($_REQUEST['object']));
+
+ echo "\n";
+ echo "\n";
+ echo "";
+ $misc->printHelp($lang['strvacuum'],'pg.admin.vacuum')." \n";
+ echo "";
+ echo "";
+ $misc->printHelp($lang['stranalyze'],'pg.admin.analyze');
+ echo " ";
+ if ($data->hasRecluster()){
+ echo "";
+ $misc->printHelp($lang['strclusterindex'],'pg.index.cluster');
+ echo " ";
+ }
+ echo "";
+ $misc->printHelp($lang['strreindex'],'pg.index.reindex');
+ echo " ";
+ echo " ";
+
+ // Vacuum
+ echo "\n";
+ echo "\n";
+ echo "\n";
+ echo " \n";
+
+ // Analyze
+ echo "\n";
+ echo "\n";
+ echo " \n";
+
+ // Cluster
+ if ($data->hasRecluster()){
+ $disabled = '';
+ echo "\n";
+ echo "\n";
+ echo " \n";
+ }
+
+ // Reindex
+ echo "\n";
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo "
\n";
+
+ // Autovacuum
+ if($data->hasAutovacuum()) {
+ // get defaults values for autovacuum
+ $defaults = $data->getAutovacuum();
+ // Fetch the autovacuum properties from the database or table if != ''
+ if ($type == 'table') $autovac = $data->getTableAutovacuum($_REQUEST['table']);
+ else $autovac = $data->getTableAutovacuum();
+
+ echo "{$lang['strvacuumpertable']} ";
+ echo '' . (($defaults['autovacuum'] == 'on') ? $lang['strturnedon'] : $lang['strturnedoff'] ) . '
';
+ echo "{$lang['strnotdefaultinred']}
";
+
+ function enlight($f, $p) {
+ if ( isset($f[$p[0]]) and ($f[$p[0]] != $p[1]))
+ return "". htmlspecialchars($f[$p[0]]) ." ";
+ return htmlspecialchars($p[1]);
+ }
+
+ $columns = array(
+ 'namespace' => array(
+ 'title' => $lang['strschema'],
+ 'field' => field('nspname'),
+ 'url' => "redirect.php?subject=schema&{$misc->href}&",
+ 'vars' => array('schema' => 'nspname'),
+ ),
+ 'relname' => array(
+ 'title' => $lang['strtable'],
+ 'field' => field('relname'),
+ 'url' => "redirect.php?subject=table&{$misc->href}&",
+ 'vars' => array('table' => 'relname', 'schema' => 'nspname'),
+ ),
+ 'autovacuum_enabled' => array(
+ 'title' => $lang['strenabled'],
+ 'field' => callback('enlight', array('autovacuum_enabled', $defaults['autovacuum'])),
+ 'type' => 'verbatim'
+ ),
+ 'autovacuum_vacuum_threshold' => array(
+ 'title' => $lang['strvacuumbasethreshold'],
+ 'field' => callback('enlight', array('autovacuum_vacuum_threshold', $defaults['autovacuum_vacuum_threshold'])),
+ 'type' => 'verbatim'
+ ),
+ 'autovacuum_vacuum_scale_factor' => array(
+ 'title' => $lang['strvacuumscalefactor'],
+ 'field' => callback('enlight', array('autovacuum_vacuum_scale_factor', $defaults['autovacuum_vacuum_scale_factor'])),
+ 'type' => 'verbatim'
+ ),
+ 'autovacuum_analyze_threshold' => array(
+ 'title' => $lang['stranalybasethreshold'],
+ 'field' => callback('enlight', array('autovacuum_analyze_threshold', $defaults['autovacuum_analyze_threshold'])),
+ 'type' => 'verbatim'
+ ),
+ 'autovacuum_analyze_scale_factor' => array(
+ 'title' => $lang['stranalyzescalefactor'],
+ 'field' => callback('enlight', array('autovacuum_analyze_scale_factor', $defaults['autovacuum_analyze_scale_factor'])),
+ 'type' => 'verbatim'
+ ),
+ 'autovacuum_vacuum_cost_delay' => array(
+ 'title' => $lang['strvacuumcostdelay'],
+ 'field' => concat(callback('enlight', array('autovacuum_vacuum_cost_delay', $defaults['autovacuum_vacuum_cost_delay'])), 'ms'),
+ 'type' => 'verbatim'
+ ),
+ 'autovacuum_vacuum_cost_limit' => array(
+ 'title' => $lang['strvacuumcostlimit'],
+ 'field' => callback('enlight', array('autovacuum_vacuum_cost_limit', $defaults['autovacuum_vacuum_cost_limit'])),
+ 'type' => 'verbatim'
+ ),
+ );
+
+ // Maybe we need to check permissions here?
+ $columns['actions'] = array('title' => $lang['stractions']);
+
+ $actions = array(
+ 'edit' => array(
+ 'content' => $lang['stredit'],
+ 'attr'=> array (
+ 'href' => array (
+ 'url' => $script,
+ 'urlvars' => array (
+ 'subject' => $type,
+ 'action' => 'confeditautovac',
+ 'schema' => field('nspname'),
+ 'table' => field('relname')
+ )
+ )
+ )
+ ),
+ 'delete' => array(
+ 'content' => $lang['strdelete'],
+ 'attr'=> array (
+ 'href' => array (
+ 'url' => $script,
+ 'urlvars' => array (
+ 'subject' => $type,
+ 'action' => 'confdelautovac',
+ 'schema' => field('nspname'),
+ 'table' => field('relname')
+ )
+ )
+ )
+ )
+ );
+
+ if ($type == 'table') {
+ unset($actions['edit']['vars']['schema'],
+ $actions['delete']['vars']['schema'],
+ $columns['namespace'],
+ $columns['relname']
+ );
+ }
+
+ $misc->printTable($autovac, $columns, $actions, 'admin-admin', $lang['strnovacuumconf']);
+
+ if (($type == 'table') and ($autovac->recordCount() == 0)) {
+ echo " ";
+ echo "href}&table=", htmlspecialchars($_REQUEST['table'])
+ ,"\">{$lang['straddvacuumtable']} ";
+ }
+ }
+ }
+
+ function adminActions($action, $type) {
+ global $script;
+
+ if ($type == 'database') {
+ $_REQUEST['object'] = $_REQUEST['database'];
+ $script = 'database.php';
+ }
+ else {
+ // $_REQUEST['table'] is no set if we are in the schema page
+ $_REQUEST['object'] = (isset($_REQUEST['table']) ? $_REQUEST['table']:'');
+ $script = 'tables.php';
+ }
+
+ switch ($action) {
+ case 'confirm_cluster':
+ doCluster($type, true);
+ break;
+ case 'confirm_reindex':
+ doReindex($type, true);
+ break;
+ case 'confirm_analyze':
+ doAnalyze($type, true);
+ break;
+ case 'confirm_vacuum':
+ doVacuum($type, true);
+ break;
+ case 'cluster':
+ if (isset($_POST['cluster'])) doCluster($type);
+ // if multi-action from table canceled: back to the schema default page
+ else if (($type == 'table') && is_array($_REQUEST['object']) ) doDefault();
+ else doAdmin($type);
+ break;
+ case 'reindex':
+ if (isset($_POST['reindex'])) doReindex($type);
+ // if multi-action from table canceled: back to the schema default page
+ else if (($type == 'table') && is_array($_REQUEST['object']) ) doDefault();
+ else doAdmin($type);
+ break;
+ case 'analyze':
+ if (isset($_POST['analyze'])) doAnalyze($type);
+ // if multi-action from table canceled: back to the schema default page
+ else if (($type == 'table') && is_array($_REQUEST['object']) ) doDefault();
+ else doAdmin($type);
+ break;
+ case 'vacuum':
+ if (isset($_POST['vacuum'])) doVacuum($type);
+ // if multi-action from table canceled: back to the schema default page
+ else if (($type == 'table') && is_array($_REQUEST['object']) ) doDefault();
+ else doAdmin($type);
+ break;
+ case 'admin':
+ doAdmin($type);
+ break;
+ case 'confeditautovac':
+ doEditAutovacuum($type, true);
+ break;
+ case 'confdelautovac':
+ doDropAutovacuum($type, true);
+ break;
+ case 'confaddautovac':
+ doAddAutovacuum(true);
+ break;
+ case 'editautovac':
+ if (isset($_POST['save'])) doEditAutovacuum($type, false);
+ else doAdmin($type);
+ break;
+ case 'delautovac':
+ doDropAutovacuum($type, false);
+ break;
+ default:
+ return false;
+ }
+ return true;
+ }
+
+?>
diff --git a/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/aggregates.php b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/aggregates.php
new file mode 100644
index 00000000..5356e02c
--- /dev/null
+++ b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/aggregates.php
@@ -0,0 +1,462 @@
+createAggregate($_REQUEST['name'], $_REQUEST['basetype'], $_REQUEST['sfunc'], $_REQUEST['stype'],
+ $_REQUEST['ffunc'], $_REQUEST['initcond'], $_REQUEST['sortop'], $_REQUEST['aggrcomment']);
+
+ if ($status == 0) {
+ $_reload_browser = true;
+ doDefault($lang['straggrcreated']);
+ }
+ else {
+ doCreate($lang['straggrcreatedbad']);
+ }
+ }
+
+ /**
+ * Displays a screen for create a new aggregate function
+ */
+ function doCreate($msg = '') {
+ global $data, $misc;
+ global $lang;
+
+ if (!isset($_REQUEST['name'])) $_REQUEST['name'] = '';
+ if (!isset($_REQUEST['basetype'])) $_REQUEST['basetype'] = '';
+ if (!isset($_REQUEST['sfunc'])) $_REQUEST['sfunc'] = '';
+ if (!isset($_REQUEST['stype'])) $_REQUEST['stype'] = '';
+ if (!isset($_REQUEST['ffunc'])) $_REQUEST['ffunc'] = '';
+ if (!isset($_REQUEST['initcond'])) $_REQUEST['initcond'] = '';
+ if (!isset($_REQUEST['sortop'])) $_REQUEST['sortop'] = '';
+ if (!isset($_REQUEST['aggrcomment'])) $_REQUEST['aggrcomment'] = '';
+
+ $misc->printTrail('schema');
+ $misc->printTitle($lang['strcreateaggregate'], 'pg.aggregate.create');
+ $misc->printMsg($msg);
+
+ echo "\n";
+ }
+
+ /**
+ * Function to save after altering an aggregate
+ */
+ function doSaveAlter() {
+ global $data, $lang;
+
+ // Check inputs
+ if (trim($_REQUEST['aggrname']) == '') {
+ doAlter($lang['straggrneedsname']);
+ return;
+ }
+
+ $status = $data->alterAggregate($_REQUEST['aggrname'], $_REQUEST['aggrtype'], $_REQUEST['aggrowner'],
+ $_REQUEST['aggrschema'], $_REQUEST['aggrcomment'], $_REQUEST['newaggrname'], $_REQUEST['newaggrowner'],
+ $_REQUEST['newaggrschema'], $_REQUEST['newaggrcomment']);
+ if ($status == 0)
+ doDefault($lang['straggraltered']);
+ else {
+ doAlter($lang['straggralteredbad']);
+ return;
+ }
+ }
+
+
+ /**
+ * Function to allow editing an aggregate function
+ */
+ function doAlter($msg = '') {
+ global $data, $misc;
+ global $lang;
+
+ $misc->printTrail('aggregate');
+ $misc->printTitle($lang['stralter'], 'pg.aggregate.alter');
+ $misc->printMsg($msg);
+
+ echo "\n";
+ $aggrdata = $data->getAggregate($_REQUEST['aggrname'], $_REQUEST['aggrtype']);
+ if($aggrdata->recordCount() > 0 ) {
+ // Output table header
+ echo "\n";
+ echo " \n";
+ echo $misc->form;
+ echo " \n";
+ echo " \n";
+ echo " fields['usename']), "\" />\n";
+ echo " \n";
+ echo " fields['aggrcomment']), "\" />\n";
+ echo " \n";
+ echo "
\n";
+ } else {
+ echo "{$lang['strnodata']}
\n";
+ echo " \n";
+ }
+ echo " \n";
+ }
+
+ /**
+ * Show confirmation of drop and perform actual drop of the aggregate function selected
+ */
+ function doDrop($confirm) {
+ global $data, $misc;
+ global $lang, $_reload_browser;
+
+ if ($confirm) {
+ $misc->printTrail('aggregate');
+ $misc->printTitle($lang['strdrop'], 'pg.aggregate.drop');
+
+ echo "", sprintf($lang['strconfdropaggregate'], htmlspecialchars($_REQUEST['aggrname'])), "
\n";
+
+ echo "\n";
+ echo " {$lang['strcascade']}
\n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo $misc->form;
+ echo " \n";
+ echo "
\n";
+ echo " \n";
+ }
+ else {
+ $status = $data->dropAggregate($_POST['aggrname'], $_POST['aggrtype'], isset($_POST['cascade']));
+ if ($status == 0) {
+ $_reload_browser = true;
+ doDefault($lang['straggregatedropped']);
+ }
+ else
+ doDefault($lang['straggregatedroppedbad']);
+ }
+ }
+
+ /**
+ * Show the properties of an aggregate
+ */
+ function doProperties($msg = '') {
+ global $data, $misc;
+ global $lang;
+
+ $misc->printTrail('aggregate');
+ $misc->printTitle($lang['strproperties'],'pg.aggregate');
+ $misc->printMsg($msg);
+
+ $aggrdata = $data->getAggregate($_REQUEST['aggrname'], $_REQUEST['aggrtype']);
+
+ if($aggrdata->recordCount() > 0 ) {
+ // Display aggregate's info
+ echo "\n";
+ echo "\n\t{$lang['strname']} \n";
+ echo "\t", htmlspecialchars($_REQUEST['aggrname']), " \n \n";
+ echo "\n\t{$lang['straggrbasetype']} \n";
+ echo "\t", htmlspecialchars($_REQUEST['aggrtype']), " \n \n";
+ echo "\n\t{$lang['straggrsfunc']} \n";
+ echo "\t", htmlspecialchars($aggrdata->fields['aggtransfn']), " \n \n";
+ echo "\n\t{$lang['straggrstype']} \n";
+ echo "\t", htmlspecialchars($aggrdata->fields['aggstype']), " \n \n";
+ echo "\n\t{$lang['straggrffunc']} \n";
+ echo "\t", htmlspecialchars($aggrdata->fields['aggfinalfn']), " \n \n";
+ echo "\n\t{$lang['straggrinitcond']} \n";
+ echo "\t", htmlspecialchars($aggrdata->fields['agginitval']), " \n \n";
+ if($data->hasAggregateSortOp()) {
+ echo "\n\t{$lang['straggrsortop']} \n";
+ echo "\t", htmlspecialchars($aggrdata->fields['aggsortop']), " \n \n";
+ }
+ echo "\n\t{$lang['strowner']} \n";
+ echo "\t", htmlspecialchars($aggrdata->fields['usename']), " \n \n";
+ echo "\n\t{$lang['strcomment']} \n";
+ echo "\t", $misc->printVal($aggrdata->fields['aggrcomment']), " \n \n";
+ echo "
\n";
+ }
+ else echo "{$lang['strnodata']}
\n";
+
+ $navlinks = array (
+ 'showall' => array (
+ 'attr'=> array (
+ 'href' => array (
+ 'url' => 'aggregates.php',
+ 'urlvars' => array (
+ 'server' => $_REQUEST['server'],
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema']
+ )
+ )
+ ),
+ 'content' => $lang['straggrshowall']
+ )
+ );
+
+ if ($data->hasAlterAggregate()) {
+ $navlinks['alter'] = array (
+ 'attr'=> array (
+ 'href' => array (
+ 'url' => 'aggregates.php',
+ 'urlvars' => array (
+ 'action' => 'alter',
+ 'server' => $_REQUEST['server'],
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema'],
+ 'aggrname' => $_REQUEST['aggrname'],
+ 'aggrtype' => $_REQUEST['aggrtype']
+ )
+ )
+ ),
+ 'content' => $lang['stralter']
+ );
+ }
+
+ $navlinks['drop'] = array (
+ 'attr'=> array (
+ 'href' => array (
+ 'url' => 'aggregates.php',
+ 'urlvars' => array (
+ 'action' => 'confirm_drop',
+ 'server' => $_REQUEST['server'],
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema'],
+ 'aggrname' => $_REQUEST['aggrname'],
+ 'aggrtype' => $_REQUEST['aggrtype']
+ )
+ )
+ ),
+ 'content' => $lang['strdrop']
+ );
+
+ $misc->printNavLinks($navlinks, 'aggregates-properties', get_defined_vars());
+ }
+
+
+ /**
+ * Show default list of aggregate functions in the database
+ */
+ function doDefault($msg = '') {
+ global $data, $conf, $misc;
+ global $lang;
+
+ $misc->printTrail('schema');
+ $misc->printTabs('schema', 'aggregates');
+ $misc->printMsg($msg);
+
+ $aggregates = $data->getAggregates();
+
+ $columns = array(
+ 'aggrname' => array(
+ 'title' => $lang['strname'],
+ 'field' => field('proname'),
+ 'url' => "redirect.php?subject=aggregate&action=properties&{$misc->href}&",
+ 'vars' => array('aggrname' => 'proname', 'aggrtype' => 'proargtypes'),
+ ),
+ 'aggrtype' => array(
+ 'title' => $lang['strtype'],
+ 'field' => field('proargtypes'),
+ ),
+ 'aggrtransfn' => array(
+ 'title' => $lang['straggrsfunc'],
+ 'field' => field('aggtransfn'),
+ ),
+ 'owner' => array(
+ 'title' => $lang['strowner'],
+ 'field' => field('usename'),
+ ),
+ 'actions' => array(
+ 'title' => $lang['stractions'],
+ ),
+ 'comment' => array(
+ 'title' => $lang['strcomment'],
+ 'field' => field('aggrcomment'),
+ ),
+ );
+
+ $actions = array(
+ 'alter' => array(
+ 'content' => $lang['stralter'],
+ 'attr'=> array (
+ 'href' => array (
+ 'url' => 'aggregates.php',
+ 'urlvars' => array (
+ 'action' => 'alter',
+ 'aggrname' => field('proname'),
+ 'aggrtype' => field('proargtypes')
+ )
+ )
+ )
+ ),
+ 'drop' => array(
+ 'content' => $lang['strdrop'],
+ 'attr'=> array (
+ 'href' => array (
+ 'url' => 'aggregates.php',
+ 'urlvars' => array (
+ 'action' => 'confirm_drop',
+ 'aggrname' => field('proname'),
+ 'aggrtype' => field('proargtypes')
+ )
+ )
+ )
+ )
+ );
+
+ if (!$data->hasAlterAggregate()) unset($actions['alter']);
+ $misc->printTable($aggregates, $columns, $actions, 'aggregates-aggregates', $lang['strnoaggregates']);
+
+ $navlinks = array (
+ 'create' => array (
+ 'attr'=> array (
+ 'href' => array (
+ 'url' => 'aggregates.php',
+ 'urlvars' => array (
+ 'action' => 'create',
+ 'server' => $_REQUEST['server'],
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema'],
+ )
+ )
+ ),
+ 'content' => $lang['strcreateaggregate']
+ )
+ );
+ $misc->printNavLinks($navlinks, 'aggregates-aggregates', get_defined_vars());
+ }
+
+ /**
+ * Generate XML for the browser tree.
+ */
+ function doTree() {
+ global $misc, $data;
+
+ $aggregates = $data->getAggregates();
+
+ $proto = concat(field('proname'), ' (', field('proargtypes'), ')');
+ $reqvars = $misc->getRequestVars('aggregate');
+
+ $attrs = array(
+ 'text' => $proto,
+ 'icon' => 'Aggregate',
+ 'toolTip' => field('aggcomment'),
+ 'action' => url('redirect.php',
+ $reqvars,
+ array(
+ 'action' => 'properties',
+ 'aggrname' => field('proname'),
+ 'aggrtype' => field('proargtypes')
+ )
+ )
+ );
+
+ $misc->printTree($aggregates, $attrs, 'aggregates');
+ exit;
+ }
+
+ if ($action == 'tree') doTree();
+
+ $misc->printHeader($lang['straggregates']);
+ $misc->printBody();
+
+ switch ($action) {
+ case 'create':
+ doCreate();
+ break;
+ case 'save_create':
+ if (isset($_POST['cancel'])) doDefault();
+ else doSaveCreate();
+ break;
+ case 'alter':
+ doAlter();
+ break;
+ case 'save_alter':
+ if (isset($_POST['alter'])) doSaveAlter();
+ else doProperties();
+ break;
+ case 'drop':
+ if (isset($_POST['drop'])) doDrop(false);
+ else doDefault();
+ break;
+ case 'confirm_drop':
+ doDrop(true);
+ break;
+ default:
+ doDefault();
+ break;
+ case 'properties':
+ doProperties();
+ break;
+ }
+
+ $misc->printFooter();
+
+?>
diff --git a/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/ajax-ac-insert.php b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/ajax-ac-insert.php
new file mode 100644
index 00000000..20afbc75
--- /dev/null
+++ b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/ajax-ac-insert.php
@@ -0,0 +1,92 @@
+ $v) {
+ $fkeynames[$k] = html_entity_decode($v, ENT_QUOTES);
+ }
+
+ $keyspos = array_combine($fkeynames, $_POST['keys']);
+
+ $f_schema = html_entity_decode($_POST['f_schema'], ENT_QUOTES);
+ $data->fieldClean($f_schema);
+ $f_table = html_entity_decode($_POST['f_table'], ENT_QUOTES);
+ $data->fieldClean($f_table);
+ $f_attname = $fkeynames[$_POST['fattpos'][0]];
+ $data->fieldClean($f_attname);
+
+ $q = "SELECT *
+ FROM \"{$f_schema}\".\"{$f_table}\"
+ WHERE \"{$f_attname}\"::text LIKE '{$_POST['fvalue']}%'
+ ORDER BY \"{$f_attname}\" LIMIT 12 {$offset};";
+
+ $res = $data->selectSet($q);
+
+ if (!$res->EOF) {
+ echo "";
+ echo '';
+ foreach (array_keys($res->fields) as $h) {
+ echo '';
+
+ if (in_array($h, $fkeynames))
+ echo ' ';
+
+ echo htmlentities($h, ENT_QUOTES, 'UTF-8'), ' ';
+
+ }
+ echo " \n";
+ $i=0;
+ while ((!$res->EOF) && ($i < 11)) {
+ $j=0;
+ echo "";
+ foreach ($res->fields as $n => $v) {
+ $finfo = $res->fetchField($j++);
+ if (in_array($n, $fkeynames))
+ echo "",
+ $misc->printVal($v, $finfo->type, array('clip' => 'collapsed')),
+ " ";
+ else
+ echo "",
+ $misc->printVal($v, $finfo->type, array('clip' => 'collapsed')),
+ " ";
+ }
+ echo " \n";
+ $i++;
+ $res->moveNext();
+ }
+ echo "
\n";
+
+ $page_tests='';
+
+ $js = "";
+ }
+ else {
+ printf("{$lang['strnofkref']}
", "\"{$_POST['f_schema']}\".\"{$_POST['f_table']}\".\"{$fkeynames[$_POST['fattpos']]}\"");
+
+ if ($_POST['offset'])
+ echo "Prev << ";
+ }
+?>
diff --git a/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/all_db.php b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/all_db.php
new file mode 100644
index 00000000..181263ec
--- /dev/null
+++ b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/all_db.php
@@ -0,0 +1,532 @@
+printTrail('database');
+ $misc->printTitle($lang['stralter'], 'pg.database.alter');
+
+ echo "\n";
+ echo "\n";
+ echo " \n";
+ echo $misc->form;
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ }
+ else {
+ if (!isset($_POST['owner'])) $_POST['owner'] = '';
+ if (!isset($_POST['dbcomment'])) $_POST['dbcomment'] = '';
+ if ($data->alterDatabase($_POST['oldname'], $_POST['newname'], $_POST['owner'], $_POST['dbcomment']) == 0) {
+ $_reload_browser = true;
+ doDefault($lang['strdatabasealtered']);
+ }
+ else
+ doDefault($lang['strdatabasealteredbad']);
+ }
+ }
+
+ /**
+ * Show confirmation of drop and perform actual drop
+ */
+ function doDrop($confirm) {
+ global $data, $misc;
+ global $lang, $_reload_drop_database;
+
+ if (empty($_REQUEST['dropdatabase']) && empty($_REQUEST['ma'])) {
+ doDefault($lang['strspecifydatabasetodrop']);
+ exit();
+ }
+
+ if ($confirm) {
+
+ $misc->printTrail('database');
+ $misc->printTitle($lang['strdrop'], 'pg.database.drop');
+
+ echo "\n";
+ //If multi drop
+ if (isset($_REQUEST['ma'])) {
+
+ foreach($_REQUEST['ma'] as $v) {
+ $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES));
+ echo "", sprintf($lang['strconfdropdatabase'], $misc->printVal($a['database'])), "
\n";
+ printf(' ', htmlspecialchars($a['database']));
+ }
+
+ } else {
+ echo "", sprintf($lang['strconfdropdatabase'], $misc->printVal($_REQUEST['dropdatabase'])), "
\n";
+ echo " \n";
+ }// END if multi drop
+
+ echo " \n";
+ echo $misc->form;
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ } // END confirm
+ else {
+ //If multi drop
+ if (is_array($_REQUEST['dropdatabase'])) {
+ $msg = '';
+ foreach($_REQUEST['dropdatabase'] as $d) {
+ $status = $data->dropDatabase($d);
+ if ($status == 0)
+ $msg.= sprintf('%s: %s ', htmlentities($d, ENT_QUOTES, 'UTF-8'), $lang['strdatabasedropped']);
+ else {
+ doDefault(sprintf('%s%s: %s ', $msg, htmlentities($d, ENT_QUOTES, 'UTF-8'), $lang['strdatabasedroppedbad']));
+ return;
+ }
+ }// Everything went fine, back to Default page...
+ $_reload_drop_database = true;
+ doDefault($msg);
+ } else {
+ $status = $data->dropDatabase($_POST['dropdatabase']);
+ if ($status == 0) {
+ $_reload_drop_database = true;
+ doDefault($lang['strdatabasedropped']);
+ }
+ else
+ doDefault($lang['strdatabasedroppedbad']);
+ }
+ }//END DROP
+ }// END FUNCTION
+
+
+ /**
+ * Displays a screen where they can enter a new database
+ */
+ function doCreate($msg = '') {
+ global $data, $misc;
+ global $lang;
+
+ $misc->printTrail('server');
+ $misc->printTitle($lang['strcreatedatabase'], 'pg.database.create');
+ $misc->printMsg($msg);
+
+ if (!isset($_POST['formName'])) $_POST['formName'] = '';
+ // Default encoding is that in language file
+ if (!isset($_POST['formEncoding'])) {
+ $_POST['formEncoding'] = '';
+ }
+ if (!isset($_POST['formTemplate'])) $_POST['formTemplate'] = 'template1';
+ if (!isset($_POST['formSpc'])) $_POST['formSpc'] = '';
+ if (!isset($_POST['formComment'])) $_POST['formComment'] = '';
+
+ // Fetch a list of databases in the cluster
+ $templatedbs = $data->getDatabases(false);
+
+ // Fetch all tablespaces from the database
+ if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces();
+
+ echo "\n";
+ echo "\n";
+ echo " \n";
+ echo $misc->form;
+ echo " \n";
+ echo "
\n";
+ echo " \n";
+ }
+
+ /**
+ * Actually creates the new view in the database
+ */
+ function doSaveCreate() {
+ global $data, $lang, $_reload_browser;
+
+ // Default tablespace to null if it isn't set
+ if (!isset($_POST['formSpc'])) $_POST['formSpc'] = null;
+
+ // Default comment to blank if it isn't set
+ if (!isset($_POST['formComment'])) $_POST['formComment'] = null;
+
+ // Default collate to blank if it isn't set
+ if (!isset($_POST['formCollate'])) $_POST['formCollate'] = null;
+
+ // Default ctype to blank if it isn't set
+ if (!isset($_POST['formCType'])) $_POST['formCType'] = null;
+
+ // Check that they've given a name and a definition
+ if ($_POST['formName'] == '') doCreate($lang['strdatabaseneedsname']);
+ else {
+ $status = $data->createDatabase($_POST['formName'], $_POST['formEncoding'], $_POST['formSpc'],
+ $_POST['formComment'], $_POST['formTemplate'], $_POST['formCollate'], $_POST['formCType']);
+ if ($status == 0) {
+ $_reload_browser = true;
+ doDefault($lang['strdatabasecreated']);
+ }
+ else
+ doCreate($lang['strdatabasecreatedbad']);
+ }
+ }
+
+ /**
+ * Displays options for cluster download
+ */
+ function doExport($msg = '') {
+ global $data, $misc;
+ global $lang;
+
+ $misc->printTrail('server');
+ $misc->printTabs('server','export');
+ $misc->printMsg($msg);
+
+ echo "\n";
+ echo "\n";
+
+ echo "{$lang['stroptions']} \n";
+ echo "{$lang['strshow']} \n";
+ echo "{$lang['strdownload']}
\n";
+
+ echo " \n";
+ echo " \n";
+ echo $misc->form;
+ echo "
\n";
+ echo " \n";
+ }
+
+ /**
+ * Show default list of databases in the server
+ */
+ function doDefault($msg = '') {
+ global $data, $conf, $misc;
+ global $lang;
+
+ $misc->printTrail('server');
+ $misc->printTabs('server','databases');
+ $misc->printMsg($msg);
+
+ $databases = $data->getDatabases();
+
+ $columns = array(
+ 'database' => array(
+ 'title' => $lang['strdatabase'],
+ 'field' => field('datname'),
+ 'url' => "redirect.php?subject=database&{$misc->href}&",
+ 'vars' => array('database' => 'datname'),
+ ),
+ 'owner' => array(
+ 'title' => $lang['strowner'],
+ 'field' => field('datowner'),
+ ),
+ 'encoding' => array(
+ 'title' => $lang['strencoding'],
+ 'field' => field('datencoding'),
+ ),
+ 'lc_collate' => array(
+ 'title' => $lang['strcollation'],
+ 'field' => field('datcollate'),
+ ),
+ 'lc_ctype' => array(
+ 'title' => $lang['strctype'],
+ 'field' => field('datctype'),
+ ),
+ 'tablespace' => array(
+ 'title' => $lang['strtablespace'],
+ 'field' => field('tablespace'),
+ ),
+ 'dbsize' => array(
+ 'title' => $lang['strsize'],
+ 'field' => field('dbsize'),
+ 'type' => 'prettysize',
+ ),
+ 'actions' => array(
+ 'title' => $lang['stractions'],
+ ),
+ 'comment' => array(
+ 'title' => $lang['strcomment'],
+ 'field' => field('datcomment'),
+ ),
+ );
+
+ $actions = array(
+ 'multiactions' => array(
+ 'keycols' => array('database' => 'datname'),
+ 'url' => 'all_db.php',
+ 'default' => null,
+ ),
+ 'drop' => array(
+ 'content' => $lang['strdrop'],
+ 'attr'=> array (
+ 'href' => array (
+ 'url' => 'all_db.php',
+ 'urlvars' => array (
+ 'subject' => 'database',
+ 'action' => 'confirm_drop',
+ 'dropdatabase' => field('datname')
+ )
+ )
+ ),
+ 'multiaction' => 'confirm_drop',
+ ),
+ 'privileges' => array(
+ 'content' => $lang['strprivileges'],
+ 'attr'=> array (
+ 'href' => array (
+ 'url' => 'privileges.php',
+ 'urlvars' => array (
+ 'subject' => 'database',
+ 'database' => field('datname')
+ )
+ )
+ )
+ )
+ );
+ if ($data->hasAlterDatabase() ) {
+ $actions['alter'] = array(
+ 'content' => $lang['stralter'],
+ 'attr'=> array (
+ 'href' => array (
+ 'url' => 'all_db.php',
+ 'urlvars' => array (
+ 'subject' => 'database',
+ 'action' => 'confirm_alter',
+ 'alterdatabase' => field('datname')
+ )
+ )
+ )
+ );
+ }
+
+ if (!$data->hasTablespaces()) unset($columns['tablespace']);
+ if (!$data->hasServerAdminFuncs()) unset($columns['dbsize']);
+ if (!$data->hasDatabaseCollation()) unset($columns['lc_collate'], $columns['lc_ctype']);
+ if (!isset($data->privlist['database'])) unset($actions['privileges']);
+
+ $misc->printTable($databases, $columns, $actions, 'all_db-databases', $lang['strnodatabases']);
+
+ $navlinks = array (
+ 'create' => array (
+ 'attr'=> array (
+ 'href' => array (
+ 'url' => 'all_db.php',
+ 'urlvars' => array (
+ 'action' => 'create',
+ 'server' => $_REQUEST['server']
+ )
+ )
+ ),
+ 'content' => $lang['strcreatedatabase']
+ )
+ );
+ $misc->printNavLinks($navlinks, 'all_db-databases', get_defined_vars());
+ }
+
+ function doTree() {
+ global $misc, $data, $lang;
+
+ $databases = $data->getDatabases();
+
+ $reqvars = $misc->getRequestVars('database');
+
+ $attrs = array(
+ 'text' => field('datname'),
+ 'icon' => 'Database',
+ 'toolTip'=> field('datcomment'),
+ 'action' => url('redirect.php',
+ $reqvars,
+ array('database' => field('datname'))
+ ),
+ 'branch' => url('database.php',
+ $reqvars,
+ array(
+ 'action' => 'tree',
+ 'database' => field('datname')
+ )
+ ),
+ );
+
+ $misc->printTree($databases, $attrs, 'databases');
+ exit;
+ }
+
+ if ($action == 'tree') doTree();
+
+ $misc->printHeader($lang['strdatabases']);
+ $misc->printBody();
+
+ switch ($action) {
+ case 'export':
+ doExport();
+ break;
+ case 'save_create':
+ if (isset($_POST['cancel'])) doDefault();
+ else doSaveCreate();
+ break;
+ case 'create':
+ doCreate();
+ break;
+ case 'drop':
+ if (isset($_REQUEST['drop'])) doDrop(false);
+ else doDefault();
+ break;
+ case 'confirm_drop':
+ doDrop(true);
+ break;
+ case 'alter':
+ if (isset($_POST['oldname']) && isset($_POST['newname']) && !isset($_POST['cancel']) ) doAlter(false);
+ else doDefault();
+ break;
+ case 'confirm_alter':
+ doAlter(true);
+ break;
+ default:
+ doDefault();
+ break;
+ }
+
+ $misc->printFooter();
+
+?>
diff --git a/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/browser.php b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/browser.php
new file mode 100644
index 00000000..3b7a5480
--- /dev/null
+++ b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/browser.php
@@ -0,0 +1,84 @@
+printHeader('', '
+
+
+ ');
+
+ $misc->printBody('browser');
+ echo "\n";
+?>
+
+
+
+
+
+\n";
+ $misc->printFooter();
+
+?>
diff --git a/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/casts.php b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/casts.php
new file mode 100644
index 00000000..2be86b4f
--- /dev/null
+++ b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/casts.php
@@ -0,0 +1,103 @@
+printTrail('database');
+ $misc->printTabs('database','casts');
+ $misc->printMsg($msg);
+
+ $casts = $data->getCasts();
+
+ $columns = array(
+ 'source_type' => array(
+ 'title' => $lang['strsourcetype'],
+ 'field' => field('castsource'),
+ ),
+ 'target_type' => array(
+ 'title' => $lang['strtargettype'],
+ 'field' => field('casttarget'),
+ ),
+ 'function' => array(
+ 'title' => $lang['strfunction'],
+ 'field' => field('castfunc'),
+ 'params'=> array('null' => $lang['strbinarycompat']),
+ ),
+ 'implicit' => array(
+ 'title' => $lang['strimplicit'],
+ 'field' => field('castcontext'),
+ 'type' => 'callback',
+ 'params'=> array('function' => 'renderCastContext', 'align' => 'center'),
+ ),
+ 'comment' => array(
+ 'title' => $lang['strcomment'],
+ 'field' => field('castcomment'),
+ ),
+ );
+
+ $actions = array();
+
+ $misc->printTable($casts, $columns, $actions, 'casts-casts', $lang['strnocasts']);
+ }
+
+ /**
+ * Generate XML for the browser tree.
+ */
+ function doTree() {
+ global $misc, $data;
+
+ $casts = $data->getCasts();
+
+ $proto = concat(field('castsource'), ' AS ', field('casttarget'));
+
+ $attrs = array(
+ 'text' => $proto,
+ 'icon' => 'Cast'
+ );
+
+ $misc->printTree($casts, $attrs, 'casts');
+ exit;
+ }
+
+ if ($action == 'tree') doTree();
+
+ $misc->printHeader($lang['strcasts']);
+ $misc->printBody();
+
+ switch ($action) {
+ case 'tree':
+ doTree();
+ break;
+ default:
+ doDefault();
+ break;
+ }
+
+ $misc->printFooter();
+
+?>
diff --git a/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/classes/ArrayRecordSet.php b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/classes/ArrayRecordSet.php
new file mode 100644
index 00000000..b2a37547
--- /dev/null
+++ b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/classes/ArrayRecordSet.php
@@ -0,0 +1,32 @@
+_array = $data;
+ $this->_count = count($this->_array);
+ $this->fields = reset($this->_array);
+ if ($this->fields === false) $this->EOF = true;
+ }
+
+ function recordCount() {
+ return $this->_count;
+ }
+
+ function moveNext() {
+ $this->fields = next($this->_array);
+ if ($this->fields === false) $this->EOF = true;
+ }
+}
+
+?>
diff --git a/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/classes/Gui.php b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/classes/Gui.php
new file mode 100644
index 00000000..6d0fe215
--- /dev/null
+++ b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/classes/Gui.php
@@ -0,0 +1,48 @@
+ Value
+ * @param $szName string to specify the name of the form element
+ * @param (optional) $bBlankEntry bool to specify whether or not we want a blank selection
+ * @param (optional) $szDefault string to specify the default VALUE selected
+ * @param (optional) $bMultiple bool to specify whether or not we want a multi select combo box
+ * @param (optional) $iSize int to specify the size IF a multi select combo
+ * @return string with the generated HTML select box
+ */
+ function printCombo(&$arrOptions, $szName, $bBlankEntry = true, $szDefault = '', $bMultiple = false, $iSize = 10) {
+ $htmlOut = '';
+ if ($bMultiple) // If multiple select combo
+ $htmlOut .= "
\n";
+ else
+ $htmlOut .= "\n";
+ if ($bBlankEntry)
+ $htmlOut .= " \n";
+
+ foreach ($arrOptions as $curKey => $curVal) {
+ $curVal = htmlspecialchars($curVal);
+ $curKey = htmlspecialchars($curKey);
+ if ($curVal == $szDefault) {
+ $htmlOut .= "$curKey \n";
+ }
+ else {
+ $htmlOut .= "$curKey \n";
+ }
+ }
+ $htmlOut .= " \n";
+
+ return $htmlOut;
+ }
+ }
+?>
diff --git a/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/classes/Misc.php b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/classes/Misc.php
new file mode 100644
index 00000000..6714bb48
--- /dev/null
+++ b/.devilbox/www/htdocs/vendor/phppgadmin-5.6.0/classes/Misc.php
@@ -0,0 +1,2655 @@
+getServerInfo();
+ return !empty($info[$all ? 'pg_dumpall_path' : 'pg_dump_path']);
+ }
+
+ /**
+ * Sets the href tracking variable
+ */
+ function setHREF() {
+ $this->href = $this->getHREF();
+ }
+
+ /**
+ * Get a href query string, excluding objects below the given object type (inclusive)
+ */
+ function getHREF($exclude_from = null) {
+ $href = '';
+ if (isset($_REQUEST['server']) && $exclude_from != 'server') {
+ $href .= 'server=' . urlencode($_REQUEST['server']);
+ if (isset($_REQUEST['database']) && $exclude_from != 'database') {
+ $href .= '&database=' . urlencode($_REQUEST['database']);
+ if (isset($_REQUEST['schema']) && $exclude_from != 'schema') {
+ $href .= '&schema=' . urlencode($_REQUEST['schema']);
+ }
+ }
+ }
+ return htmlentities($href);
+ }
+
+ function getSubjectParams($subject) {
+ global $plugin_manager;
+
+ $vars = array();
+
+ switch($subject) {
+ case 'root':
+ $vars = array (
+ 'params' => array(
+ 'subject' => 'root'
+ )
+ );
+ break;
+ case 'server':
+ $vars = array ('params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'server'
+ ));
+ break;
+ case 'role':
+ $vars = array('params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'role',
+ 'action' => 'properties',
+ 'rolename' => $_REQUEST['rolename']
+ ));
+ break;
+ case 'database':
+ $vars = array('params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'database',
+ 'database' => $_REQUEST['database'],
+ ));
+ break;
+ case 'schema':
+ $vars = array('params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'schema',
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema']
+ ));
+ break;
+ case 'table':
+ $vars = array('params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'table',
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema'],
+ 'table' => $_REQUEST['table']
+ ));
+ break;
+ case 'selectrows':
+ $vars = array(
+ 'url' => 'tables.php',
+ 'params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'table',
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema'],
+ 'table' => $_REQUEST['table'],
+ 'action' => 'confselectrows'
+ ));
+ break;
+ case 'view':
+ $vars = array('params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'view',
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema'],
+ 'view' => $_REQUEST['view']
+ ));
+ break;
+ case 'fulltext':
+ case 'ftscfg':
+ $vars = array('params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'fulltext',
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema'],
+ 'action' => 'viewconfig',
+ 'ftscfg' => $_REQUEST['ftscfg']
+ ));
+ break;
+ case 'function':
+ $vars = array('params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'function',
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema'],
+ 'function' => $_REQUEST['function'],
+ 'function_oid' => $_REQUEST['function_oid']
+ ));
+ break;
+ case 'aggregate':
+ $vars = array('params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'aggregate',
+ 'action' => 'properties',
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema'],
+ 'aggrname' => $_REQUEST['aggrname'],
+ 'aggrtype' => $_REQUEST['aggrtype']
+ ));
+ break;
+ case 'column':
+ if (isset($_REQUEST['table']))
+ $vars = array('params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'column',
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema'],
+ 'table' => $_REQUEST['table'],
+ 'column' => $_REQUEST['column']
+ ));
+ else
+ $vars = array('params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'column',
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema'],
+ 'view' => $_REQUEST['view'],
+ 'column' => $_REQUEST['column']
+ ));
+ break;
+ case 'plugin':
+ $vars = array(
+ 'url' => 'plugin.php',
+ 'params' => array(
+ 'server' => $_REQUEST['server'],
+ 'subject' => 'plugin',
+ 'plugin' => $_REQUEST['plugin'],
+ ));
+
+ if (!is_null($plugin_manager->getPlugin($_REQUEST['plugin'])))
+ $vars['params'] = array_merge($vars['params'], $plugin_manager->getPlugin($_REQUEST['plugin'])->get_subject_params());
+ break;
+ default:
+ return false;
+ }
+
+ if (!isset($vars['url']))
+ $vars['url'] = 'redirect.php';
+
+ return $vars;
+ }
+
+ function getHREFSubject($subject) {
+ $vars = $this->getSubjectParams($subject);
+ return "{$vars['url']}?". http_build_query($vars['params'], '', '&');
+ }
+
+ /**
+ * Sets the form tracking variable
+ */
+ function setForm() {
+ $this->form = '';
+ if (isset($_REQUEST['server'])) {
+ $this->form .= " \n";
+ if (isset($_REQUEST['database'])) {
+ $this->form .= " \n";
+ if (isset($_REQUEST['schema'])) {
+ $this->form .= " \n";
+ }
+ }
+ }
+ }
+
+ /**
+ * Render a value into HTML using formatting rules specified
+ * by a type name and parameters.
+ *
+ * @param $str The string to change
+ *
+ * @param $type Field type (optional), this may be an internal PostgreSQL type, or:
+ * yesno - same as bool, but renders as 'Yes' or 'No'.
+ * pre - render in a block.
+ * nbsp - replace all spaces with 's
+ * verbatim - render exactly as supplied, no escaping what-so-ever.
+ * callback - render using a callback function supplied in the 'function' param.
+ *
+ * @param $params Type parameters (optional), known parameters:
+ * null - string to display if $str is null, or set to TRUE to use a default 'NULL' string,
+ * otherwise nothing is rendered.
+ * clip - if true, clip the value to a fixed length, and append an ellipsis...
+ * cliplen - the maximum length when clip is enabled (defaults to $conf['max_chars'])
+ * ellipsis - the string to append to a clipped value (defaults to $lang['strellipsis'])
+ * tag - an HTML element name to surround the value.
+ * class - a class attribute to apply to any surrounding HTML element.
+ * align - an align attribute ('left','right','center' etc.)
+ * true - (type='bool') the representation of true.
+ * false - (type='bool') the representation of false.
+ * function - (type='callback') a function name, accepts args ($str, $params) and returns a rendering.
+ * lineno - prefix each line with a line number.
+ * map - an associative array.
+ *
+ * @return The HTML rendered value
+ */
+ function printVal($str, $type = null, $params = array()) {
+ global $lang, $conf, $data;
+
+ // Shortcircuit for a NULL value
+ if (is_null($str))
+ return isset($params['null'])
+ ? ($params['null'] === true ? 'NULL ' : $params['null'])
+ : '';
+
+ if (isset($params['map']) && isset($params['map'][$str])) $str = $params['map'][$str];
+
+ // Clip the value if the 'clip' parameter is true.
+ if (isset($params['clip']) && $params['clip'] === true) {
+ $maxlen = isset($params['cliplen']) && is_integer($params['cliplen']) ? $params['cliplen'] : $conf['max_chars'];
+ $ellipsis = isset($params['ellipsis']) ? $params['ellipsis'] : $lang['strellipsis'];
+ if (strlen($str) > $maxlen) {
+ $str = substr($str, 0, $maxlen-1) . $ellipsis;
+ }
+ }
+
+ $out = '';
+
+ switch ($type) {
+ case 'int2':
+ case 'int4':
+ case 'int8':
+ case 'float4':
+ case 'float8':
+ case 'money':
+ case 'numeric':
+ case 'oid':
+ case 'xid':
+ case 'cid':
+ case 'tid':
+ $align = 'right';
+ $out = nl2br(htmlspecialchars($str));
+ break;
+ case 'yesno':
+ if (!isset($params['true'])) $params['true'] = $lang['stryes'];
+ if (!isset($params['false'])) $params['false'] = $lang['strno'];
+ // No break - fall through to boolean case.
+ case 'bool':
+ case 'boolean':
+ if (is_bool($str)) $str = $str ? 't' : 'f';
+ switch ($str) {
+ case 't':
+ $out = (isset($params['true']) ? $params['true'] : $lang['strtrue']);
+ $align = 'center';
+ break;
+ case 'f':
+ $out = (isset($params['false']) ? $params['false'] : $lang['strfalse']);
+ $align = 'center';
+ break;
+ default:
+ $out = htmlspecialchars($str);
+ }
+ break;
+ case 'bytea':
+ $tag = 'div';
+ $class = 'pre';
+ $out = $data->escapeBytea($str);
+ break;
+ case 'errormsg':
+ $tag = 'pre';
+ $class = 'error';
+ $out = htmlspecialchars($str);
+ break;
+ case 'pre':
+ $tag = 'pre';
+ $out = htmlspecialchars($str);
+ break;
+ case 'prenoescape':
+ $tag = 'pre';
+ $out = $str;
+ break;
+ case 'nbsp':
+ $out = nl2br(str_replace(' ', ' ', htmlspecialchars($str)));
+ break;
+ case 'verbatim':
+ $out = $str;
+ break;
+ case 'callback':
+ $out = $params['function']($str, $params);
+ break;
+ case 'prettysize':
+ if ($str == -1)
+ $out = $lang['strnoaccess'];
+ else
+ {
+ $limit = 10 * 1024;
+ $mult = 1;
+ if ($str < $limit * $mult)
+ $out = $str.' '.$lang['strbytes'];
+ else
+ {
+ $mult *= 1024;
+ if ($str < $limit * $mult)
+ $out = floor(($str + $mult / 2) / $mult).' '.$lang['strkb'];
+ else
+ {
+ $mult *= 1024;
+ if ($str < $limit * $mult)
+ $out = floor(($str + $mult / 2) / $mult).' '.$lang['strmb'];
+ else
+ {
+ $mult *= 1024;
+ if ($str < $limit * $mult)
+ $out = floor(($str + $mult / 2) / $mult).' '.$lang['strgb'];
+ else
+ {
+ $mult *= 1024;
+ if ($str < $limit * $mult)
+ $out = floor(($str + $mult / 2) / $mult).' '.$lang['strtb'];
+ }
+ }
+ }
+ }
+ }
+ break;
+ default:
+ // If the string contains at least one instance of >1 space in a row, a tab
+ // character, a space at the start of a line, or a space at the start of
+ // the whole string then render within a pre-formatted element ().
+ if (preg_match('/(^ | |\t|\n )/m', $str)) {
+ $tag = 'pre';
+ $class = 'data';
+ $out = htmlspecialchars($str);
+ } else {
+ $out = nl2br(htmlspecialchars($str));
+ }
+ }
+
+ if (isset($params['class'])) $class = $params['class'];
+ if (isset($params['align'])) $align = $params['align'];
+
+ if (!isset($tag) && (isset($class) || isset($align))) $tag = 'div';
+
+ if (isset($tag)) {
+ $alignattr = isset($align) ? " style=\"text-align: {$align}\"" : '';
+ $classattr = isset($class) ? " class=\"{$class}\"" : '';
+ $out = "<{$tag}{$alignattr}{$classattr}>{$out}{$tag}>";
+ }
+
+ // Add line numbers if 'lineno' param is true
+ if (isset($params['lineno']) && $params['lineno'] === true) {
+ $lines = explode("\n", $str);
+ $num = count($lines);
+ if ($num > 0) {
+ $temp = " \n";
+ for ($i = 1; $i <= $num; $i++) {
+ $temp .= $i . "\n";
+ }
+ $temp .= " {$out}
\n";
+ $out = $temp;
+ }
+ unset($lines);
+ }
+
+ return $out;
+ }
+
+ /**
+ * A function to recursively strip slashes. Used to
+ * enforce magic_quotes_gpc being off.
+ * @param &var The variable to strip
+ */
+ function stripVar(&$var) {
+ if (is_array($var)) {
+ foreach($var as $k => $v) {
+ $this->stripVar($var[$k]);
+
+ /* magic_quotes_gpc escape keys as well ...*/
+ if (is_string($k)) {
+ $ek = stripslashes($k);
+ if ($ek !== $k) {
+ $var[$ek] = $var[$k];
+ unset($var[$k]);
+ }
+ }
+ }
+ }
+ else
+ $var = stripslashes($var);
+ }
+
+ /**
+ * Print out the page heading and help link
+ * @param $title Title, already escaped
+ * @param $help (optional) The identifier for the help link
+ */
+ function printTitle($title, $help = null) {
+ global $data, $lang;
+
+ echo "";
+ $this->printHelp($title, $help);
+ echo " \n";
+ }
+
+ /**
+ * Print out a message
+ * @param $msg The message to print
+ */
+ function printMsg($msg) {
+ if ($msg != '') echo "{$msg}
\n";
+ }
+
+ /**
+ * Creates a database accessor
+ */
+ function getDatabaseAccessor($database, $server_id = null) {
+ global $lang, $conf, $misc, $_connection;
+
+ $server_info = $this->getServerInfo($server_id);
+
+ // Perform extra security checks if this config option is set
+ if ($conf['extra_login_security']) {
+ // Disallowed logins if extra_login_security is enabled.
+ // These must be lowercase.
+ $bad_usernames = array('pgsql', 'postgres', 'root', 'administrator');
+
+ $username = strtolower($server_info['username']);
+
+ if ($server_info['password'] == '' || in_array($username, $bad_usernames)) {
+ unset($_SESSION['webdbLogin'][$_REQUEST['server']]);
+ $msg = $lang['strlogindisallowed'];
+ include('./login.php');
+ exit;
+ }
+ }
+
+ // Create the connection object and make the connection
+ $_connection = new Connection(
+ $server_info['host'],
+ $server_info['port'],
+ $server_info['sslmode'],
+ $server_info['username'],
+ $server_info['password'],
+ $database
+ );
+
+ // Get the name of the database driver we need to use.
+ // The description of the server is returned in $platform.
+ $_type = $_connection->getDriver($platform);
+ if ($_type === null) {
+ printf($lang['strpostgresqlversionnotsupported'], $postgresqlMinVer);
+ exit;
+ }
+ $this->setServerInfo('platform', $platform, $server_id);
+ $this->setServerInfo('pgVersion', $_connection->conn->pgVersion, $server_id);
+
+ // Create a database wrapper class for easy manipulation of the
+ // connection.
+ include_once('./classes/database/' . $_type . '.php');
+ $data = new $_type($_connection->conn);
+ $data->platform = $_connection->platform;
+
+ /* we work on UTF-8 only encoding */
+ $data->execute("SET client_encoding TO 'UTF-8'");
+
+ if ($data->hasByteaHexDefault()) {
+ $data->execute("SET bytea_output TO escape");
+ }
+
+ return $data;
+ }
+
+
+ /**
+ * Prints the page header. If global variable $_no_output is
+ * set then no header is drawn.
+ * @param $title The title of the page
+ * @param $script script tag
+ */
+ function printHeader($title = '', $script = null, $frameset = false) {
+ global $appName, $lang, $_no_output, $conf, $plugin_manager;
+
+ if (!isset($_no_output)) {
+ header("Content-Type: text/html; charset=utf-8");
+ // Send XHTML headers, or regular XHTML strict headers
+ echo "\n";
+ if ($frameset == true) {
+ echo "\n";
+ } else if (isset($conf['use_xhtml_strict']) && $conf['use_xhtml_strict']) {
+ echo "\n";
+ } else {
+ echo "\n";
+ }
+ echo "\n";
+
+ echo "\n";
+ echo " \n";
+ // Theme
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo "";
+ echo "\n";
+ echo "", htmlspecialchars($appName);
+ if ($title != '') echo htmlspecialchars(" - {$title}");
+ echo " \n";
+
+ if ($script) echo "{$script}\n";
+
+ $plugins_head = array();
+ $_params = array('heads' => &$plugins_head);
+
+ $plugin_manager->do_hook('head', $_params);
+
+ foreach($plugins_head as $tag) {
+ echo $tag;
+ }
+
+ echo "\n";
+ }
+ }
+
+ /**
+ * Prints the page footer
+ * @param $doBody True to output body tag, false otherwise
+ */
+ function printFooter($doBody = true) {
+ global $_reload_browser, $_reload_drop_database;
+ global $lang, $_no_bottom_link;
+
+ if ($doBody) {
+ if (isset($_reload_browser)) $this->printReload(false);
+ elseif (isset($_reload_drop_database)) $this->printReload(true);
+ if (!isset($_no_bottom_link))
+ echo "".$lang['strgotoppage']." ";
+
+ echo "\n";
+ }
+ echo "