things to yours to get yours right.
When writing data to the display, you should always urlencode() variables in
-HREFs and htmlspecialchars() variables in forms.
+HREFs and htmlspecialchars() variables in forms. Rather than use action=""
+attributes in HTML form elements use action="thisformname.php". This
+ensures that browsers remove query strings when expanding the given
+relative URL into a full URL.
When working with CVS, always make sure to do a 'cvs update' both before you
start; so you have the latest code to work with; and also again before you
$rs = $class->getResults();
if (is_object($rs) && $rs->recordCount() > 0) {
while (!$rs->EOF) {
- echo $rs->fields['field'];
+ echo $rs->f['field'];
$rs->moveNext();
}
}
phpPgAdmin History
------------------
+Version 4.1.3-rc-1
+-------------
+
+Bugs
+* Eliminate use of $_SERVER['PHP_SELF']. This fixes a regression in 4.1.2 for
+ non-mainstream locales (including SQL_ASCII)
+* Validate client supplied server against entries in config.inc.php
+
Version 4.1.2
-------------
-------------
Bugs
-* Fix problem where failed update would report as duplicate update error and fail to return edit screen
+* Fix problem where failed update would report as duplicate update error and
+ fail to return edit screen
* Fix error when using $conf[owned_only] on 8.1 & 8.2
* Fix error displaying schema names for parents of inherited tables
* Clean up non-standard escape warnings for PostgreSQL 8.2
/**
* Manage aggregates in a database
*
- * $Id: aggregates.php,v 1.15.2.1 2007/05/28 17:21:55 ioguix Exp $
+ * $Id: aggregates.php,v 1.15.2.2 2007/07/09 14:55:21 xzilla Exp $
*/
// Include application functions
*/
function doCreate($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_REQUEST['name'])) $_REQUEST['name'] = '';
if (!isset($_REQUEST['basetype'])) $_REQUEST['basetype'] = '';
$misc->printTitle($lang['strcreateaggregate'], 'pg.aggregate.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"aggregates.php\" method=\"post\">\n";
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n";
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
*/
function doAlter($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('aggregate');
$misc->printTitle($lang['stralteraggregate'], 'pg.aggregate.alter');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"aggregates.php\" method=\"post\">\n";
$aggrdata = $data->getAggregate($_REQUEST['aggrname'], $_REQUEST['aggrtype']);
if($aggrdata->recordCount() > 0 ) {
// Output table header
function doDrop($confirm) {
global $data, $misc;
global $lang, $_reload_browser;
- global $PHP_SELF;
if ($confirm) {
$misc->printTrail('aggregate');
echo "<p>", sprintf($lang['strconfdropaggregate'], htmlspecialchars($_REQUEST['aggrname'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"aggregates.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"aggrname\" value=\"", htmlspecialchars($_REQUEST['aggrname']), "\" />\n";
echo "<input type=\"hidden\" name=\"aggrtype\" value=\"", htmlspecialchars($_REQUEST['aggrtype']), "\" />\n";
*/
function doProperties($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('aggregate');
$misc->printTitle($lang['strproperties'],'pg.aggregate');
}
else echo "<p>{$lang['strnodata']}</p>\n";
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?{$misc->href}\">{$lang['straggrshowall']}</a> |\n";
+ echo "<p><a class=\"navlink\" href=\"aggregates.php?{$misc->href}\">{$lang['straggrshowall']}</a> |\n";
if ($data->hasAlterAggregate()) {
- echo "<a class=\"navlink\" href=\"$PHP_SELF?action=alter&{$misc->href}&aggrname=",
+ echo "<a class=\"navlink\" href=\"aggregates.php?action=alter&{$misc->href}&aggrname=",
urlencode($_REQUEST['aggrname']), "&aggrtype=", urlencode($_REQUEST['aggrtype']), "\">{$lang['stralter']}</a> |\n";
}
- echo "<a class=\"navlink\" href=\"$PHP_SELF?action=confirm_drop&{$misc->href}&aggrname=",
+ echo "<a class=\"navlink\" href=\"aggregates.php?action=confirm_drop&{$misc->href}&aggrname=",
urlencode($_REQUEST['aggrname']), "&aggrtype=", urlencode($_REQUEST['aggrtype']), "\">{$lang['strdrop']}</a>\n";
}
*/
function doDefault($msg = '') {
global $data, $conf, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('schema');
$misc->printTabs('schema', 'aggregates');
),
'alter' => array(
'title' => $lang['stralter'],
- 'url' => "{$PHP_SELF}?action=alter&{$misc->href}&",
+ 'url' => "aggregates.php?action=alter&{$misc->href}&",
'vars' => array('aggrname' => 'proname', 'aggrtype' => 'proargtypes'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "aggregates.php?action=confirm_drop&{$misc->href}&",
'vars' => array('aggrname' => 'proname', 'aggrtype' => 'proargtypes'),
)
);
if (!$data->hasAlterAggregate()) unset($actions['alter']);
$misc->printTable($aggregates, $columns, $actions, $lang['strnoaggregates']);
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}\">{$lang['strcreateaggregate']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"aggregates.php?action=create&{$misc->href}\">{$lang['strcreateaggregate']}</a></p>\n";
}
/**
/**
* Manage databases within a server
*
- * $Id: all_db.php,v 1.45.2.1 2007/05/28 17:21:55 ioguix Exp $
+ * $Id: all_db.php,v 1.45.2.2 2007/07/09 14:55:21 xzilla Exp $
*/
// Include application functions
*/
function doAlter($confirm) {
global $data, $misc, $_reload_browser;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('database');
$misc->printTitle($lang['stralter'], 'pg.database.alter');
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"all_db.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
echo "<td class=\"data1\">";
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang, $_reload_drop_database;
+ global $lang, $_reload_drop_database;
if ($confirm) {
$misc->printTrail('database');
$misc->printTitle($lang['strdrop'], 'pg.database.drop');
echo "<p>", sprintf($lang['strconfdropdatabase'], $misc->printVal($_REQUEST['dropdatabase'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"all_db.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo $misc->form;
echo "<input type=\"hidden\" name=\"dropdatabase\" value=\"", htmlspecialchars($_REQUEST['dropdatabase']), "\" />\n";
*/
function doCreate($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('server');
$misc->printTitle($lang['strcreatedatabase'], 'pg.database.create');
// Fetch all tablespaces from the database
if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces();
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"all_db.php\" method=\"post\">\n";
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n";
echo "\t\t<td class=\"data1\"><input name=\"formName\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
*/
function doExport($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('server');
$misc->printTabs('server','export');
*/
function doDefault($msg = '') {
global $data, $conf, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('server');
$misc->printTabs('server','databases');
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&subject=database&{$misc->href}&",
+ 'url' => "all_db.php?action=confirm_drop&subject=database&{$misc->href}&",
'vars' => array('dropdatabase' => 'datname'),
),
'privileges' => array(
if ($data->hasAlterDatabase() ) {
$actions['alter'] = array(
'title' => $lang['stralter'],
- 'url' => "{$PHP_SELF}?action=confirm_alter&subject=database&{$misc->href}&",
+ 'url' => "all_db.php?action=confirm_alter&subject=database&{$misc->href}&",
'vars' => array('alterdatabase' => 'datname')
);
}
$misc->printTable($databases, $columns, $actions, $lang['strnodatabases']);
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}\">{$lang['strcreatedatabase']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"all_db.php?action=create&{$misc->href}\">{$lang['strcreatedatabase']}</a></p>\n";
}
/**
* Manage casts in a database
*
- * $Id: casts.php,v 1.12.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: casts.php,v 1.12.2.2 2007/07/09 14:55:21 xzilla Exp $
*/
// Include application functions
*/
function doDefault($msg = '') {
global $data, $misc, $database;
- global $PHP_SELF, $lang;
+ global $lang;
function renderCastContext($val) {
global $lang;
/**
* Class to hold various commonly used functions
*
- * $Id: Misc.php,v 1.138 2007/01/10 01:56:06 soranzo Exp $
+ * $Id: Misc.php,v 1.137.2.1 2007/07/09 14:55:23 xzilla Exp $
*/
class Misc {
* $columns = array(
* column_id => array(
* 'title' => Column heading,
- * 'field' => Field name for $tabledata->fields[...],
+ * 'field' => Field name for $tabledata->f[...],
* 'help' => Help page for this column,
* ), ...
* );
*/
function printTable(&$tabledata, &$columns, &$actions, $nodata = null, $pre_fn = null) {
global $data, $conf, $misc;
- global $PHP_SELF;
if ($tabledata->recordCount() > 0) {
} else {
echo "<td class=\"opbutton{$id}\">";
echo "<a href=\"{$action['url']}";
- $misc->printUrlVars($action['vars'], $tabledata->fields);
+ $misc->printUrlVars($action['vars'], $tabledata->f);
echo "\">{$action['title']}</a></td>";
}
}
break;
default;
echo "<td class=\"data{$id}\">";
- if (array_key_exists($column['field'], $tabledata->fields)) {
+ if (isset($tabledata->f[$column['field']])) {
if (isset($column['url'])) {
echo "<a href=\"{$column['url']}";
- $misc->printUrlVars($column['vars'], $tabledata->fields);
+ $misc->printUrlVars($column['vars'], $tabledata->f);
echo "\">";
}
$type = isset($column['type']) ? $column['type'] : null;
$params = isset($column['params']) ? $column['params'] : array();
- echo $misc->printVal($tabledata->fields[$column['field']], $type, $params);
+ echo $misc->printVal($tabledata->f[$column['field']], $type, $params);
}
if (isset($column['url'])) echo "</a>";
if ($treedata->recordCount() > 0) {
while (!$treedata->EOF) {
- $rec =& $treedata->fields;
+ $rec =& $treedata->f;
echo "<tree";
echo value_xml_attr('text', $attrs['text'], $rec);
}
/**
- * Get information on a server.
+ * Validate and retreive information on a server
* If the parameter isn't supplied then the currently
* connected server is returned.
* @param $server_id A server identifier (host:port)
* @return An associative array of server properties
*/
function getServerInfo($server_id = null) {
- global $conf, $_reload_browser;
+ global $conf, $_reload_browser, $lang;
if ($server_id === null && isset($_REQUEST['server']))
$server_id = $_REQUEST['server'];
return $info;
}
}
-
- return null;
+
+ if ($server_id === null){
+ return null;
+ } else {
+ // Unable to find a matching server, are we being hacked?
+ echo $lang['strinvalidserverparam'];
+ exit;
+ };
}
/**
*/
function doProperties($msg = '') {
global $data, $misc, $_reload_browser;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_REQUEST['stage'])) $_REQUEST['stage'] = 1;
$misc->printTitle($lang['straltercolumn'], 'pg.column.alter');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"colproperties.php\" method=\"post\">\n";
// Output table header
echo "<table>\n";
*/
function doDefault($msg = '', $isTable = true) {
global $data, $conf, $misc, $tableName;
- global $PHP_SELF, $lang;
+ global $lang;
function attPre(&$rowdata) {
global $data;
urlencode("SELECT {$_REQUEST['column']}, count(*) AS \"count\" FROM $tableName GROUP BY {$_REQUEST['column']} ORDER BY {$_REQUEST['column']}") , "\">{$lang['strbrowse']}</a></li>\n";
/* Edit link */
- echo "\t<li><a href=\"{$PHP_SELF}?action=properties&{$misc->href}&table=", urlencode($_REQUEST['table']),
+ echo "\t<li><a href=\"colproperties.php?action=properties&{$misc->href}&table=", urlencode($_REQUEST['table']),
"&column=", urlencode($_REQUEST['column']) . "\">{$lang['stralter']}</a></li>\n";
/* Delete link */
/**
* List constraints on a table
*
- * $Id: constraints.php,v 1.43.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: constraints.php,v 1.43.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
* Confirm and then actually add a FOREIGN KEY constraint
*/
function addForeignKey($stage, $msg = '') {
- global $PHP_SELF, $data, $data, $misc;
+ global $data, $data, $misc;
global $lang;
if (!isset($_POST['name'])) $_POST['name'] = '';
$buttonRemove->set_attribute('onclick', 'buttonPressed(this);');
$buttonRemove->set_attribute('type', 'button');
- echo "<form onsubmit=\"doSelectAll();\" name=\"formIndex\" action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form onsubmit=\"doSelectAll();\" name=\"formIndex\" action=\"constraints.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data\" colspan=\"3\">{$lang['strfktarget']}</th></tr>";
$buttonRemove->set_attribute('onclick', 'buttonPressed(this);');
$buttonRemove->set_attribute('type', 'button');
- echo "<form onsubmit=\"doSelectAll();\" name=\"formIndex\" action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form onsubmit=\"doSelectAll();\" name=\"formIndex\" action=\"constraints.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data\" colspan=\"3\">{$lang['strname']}</th></tr>\n";
* Confirm and then actually add a PRIMARY KEY or UNIQUE constraint
*/
function addPrimaryOrUniqueKey($type, $confirm, $msg = '') {
- global $PHP_SELF, $data, $data, $misc;
+ global $data, $data, $misc;
global $lang;
if (!isset($_POST['name'])) $_POST['name'] = '';
$buttonRemove->set_attribute('onclick', 'buttonPressed(this);');
$buttonRemove->set_attribute('type', 'button');
- echo "<form onsubmit=\"doSelectAll();\" name=\"formIndex\" action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form onsubmit=\"doSelectAll();\" name=\"formIndex\" action=\"constraints.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data\" colspan=\"3\">{$lang['strname']}</th></tr>";
* Confirm and then actually add a CHECK constraint
*/
function addCheck($confirm, $msg = '') {
- global $PHP_SELF, $data, $data, $misc;
+ global $data, $data, $misc;
global $lang;
if (!isset($_POST['name'])) $_POST['name'] = '';
$misc->printTitle($lang['straddcheck'],'pg.constraint.check');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"constraints.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data\">{$lang['strname']}</th>\n";
echo "<th class=\"data required\">{$lang['strdefinition']}</th></tr>\n";
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('constraint');
echo "<p>", sprintf($lang['strconfdropconstraint'], $misc->printVal($_REQUEST['constraint']),
$misc->printVal($_REQUEST['table'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"constraints.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
echo "<input type=\"hidden\" name=\"constraint\" value=\"", htmlspecialchars($_REQUEST['constraint']), "\" />\n";
*/
function doDefault($msg = '') {
global $data, $misc;
- global $PHP_SELF;
global $lang;
function cnPre(&$rowdata) {
$actions = array(
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
+ 'url' => "constraints.php?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
'vars' => array('constraint' => 'conname', 'type' => 'contype'),
),
);
$misc->printTable($constraints, $columns, $actions, $lang['strnoconstraints'], 'cnPre');
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=add_check&{$misc->href}&table=", urlencode($_REQUEST['table']),
+ echo "<p><a class=\"navlink\" href=\"constraints.php?action=add_check&{$misc->href}&table=", urlencode($_REQUEST['table']),
"\">{$lang['straddcheck']}</a> |\n";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=add_unique_key&{$misc->href}&table=", urlencode($_REQUEST['table']),
+ echo "<a class=\"navlink\" href=\"constraints.php?action=add_unique_key&{$misc->href}&table=", urlencode($_REQUEST['table']),
"\">{$lang['stradduniq']}</a> |\n";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=add_primary_key&{$misc->href}&table=", urlencode($_REQUEST['table']),
+ echo "<a class=\"navlink\" href=\"constraints.php?action=add_primary_key&{$misc->href}&table=", urlencode($_REQUEST['table']),
"\">{$lang['straddpk']}</a> |\n";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=add_foreign_key&{$misc->href}&table=", urlencode($_REQUEST['table']),
+ echo "<a class=\"navlink\" href=\"constraints.php?action=add_foreign_key&{$misc->href}&table=", urlencode($_REQUEST['table']),
"\">{$lang['straddfk']}</a></p>\n";
}
/**
* Manage conversions in a database
*
- * $Id: conversions.php,v 1.12.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: conversions.php,v 1.12.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doDefault($msg = '') {
global $data, $conf, $misc, $database;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('schema');
$misc->printTabs('schema', 'conversions');
/**
* Manage schemas within a database
*
- * $Id: database.php,v 1.88.2.2 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: database.php,v 1.88.2.3 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
* Searches for a named database object
*/
function doFind($confirm = true, $msg = '') {
- global $PHP_SELF, $data, $data, $misc;
+ global $data, $data, $misc;
global $lang, $conf;
if (!isset($_GET['term'])) $_GET['term'] = '';
$misc->printTabs('database','find');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"get\">\n";
+ echo "<form action=\"database.php\" method=\"get\">\n";
echo "<p><input name=\"term\" value=\"", htmlspecialchars($_GET['term']),
"\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" />\n";
// Output list of filters. This is complex due to all the 'has' and 'conf' feature possibilities
*/
function doExport($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('database');
$misc->printTabs('database','export');
* Show the current status of all database variables
*/
function doVariables() {
- global $PHP_SELF, $data, $misc;
+ global $data, $misc;
global $lang;
// Fetch the variables from the database
* are running.
*/
function doProcesses($msg = '') {
- global $PHP_SELF, $data, $misc;
+ global $data, $misc;
global $lang;
$misc->printTrail('database');
$actions = array(
'cancel' => array(
'title' => $lang['strcancel'],
- 'url' => "{$PHP_SELF}?action=signal&signal=CANCEL&{$misc->href}&",
+ 'url' => "database.php?action=signal&signal=CANCEL&{$misc->href}&",
'vars' => array('procpid' => 'procpid')
)
);
* Show the existing table locks in the current database
*/
function doLocks() {
- global $PHP_SELF, $data, $misc;
+ global $data, $misc;
global $lang;
// Get the info from the pg_locks view
* Allow database administration and tuning tasks
*/
function doAdmin($action = '', $msg = '') {
- global $PHP_SELF, $data, $misc;
+ global $data, $misc;
global $lang;
switch ($action) {
case 'vacuum':
// Vacuum
echo "<tr>\n";
echo "<td class=\"data1\" align=\"center\" valign=\"bottom\">\n";
- echo "<form name=\"adminfrm\" id=\"adminfrm\" action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<form name=\"adminfrm\" id=\"adminfrm\" action=\"database.php\" method=\"post\">\n";
echo "<input type=\"checkbox\" id=\"vacuum_analyze\" name=\"vacuum_analyze\" /><label for=\"vacuum_analyze\">{$lang['stranalyze']}</label><br />\n";
if ($data->hasFullVacuum()) {
echo "<input type=\"checkbox\" id=\"vacuum_full\" name=\"vacuum_full\" /><label for=\"vacuum_full\">{$lang['strfull']}</label><br />\n";
// Analyze
echo "<td class=\"data1\" align=\"center\" valign=\"bottom\">\n";
- echo "<form name=\"adminfrm\" id=\"adminfrm\" action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<form name=\"adminfrm\" id=\"adminfrm\" action=\"database.php\" method=\"post\">\n";
echo "<input type=\"submit\" value=\"{$lang['stranalyze']}\" />\n";
echo "<input type=\"hidden\" name=\"action\" value=\"analyze\" />\n";
echo $misc->form;
// Recluster
if ($data->hasRecluster()){
echo "<td class=\"data1\" align=\"center\" valign=\"bottom\">\n";
- echo "<form name=\"adminfrm\" id=\"adminfrm\" action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<form name=\"adminfrm\" id=\"adminfrm\" action=\"database.php\" method=\"post\">\n";
echo "<input type=\"submit\" value=\"{$lang['strclusterindex']}\" />\n";
echo "<input type=\"hidden\" name=\"action\" value=\"recluster\" />\n";
echo $misc->form;
// Reindex
echo "<td class=\"data1\" align=\"center\" valign=\"bottom\">\n";
- echo "<form name=\"adminfrm\" id=\"adminfrm\" action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<form name=\"adminfrm\" id=\"adminfrm\" action=\"database.php\" method=\"post\">\n";
echo "<input type=\"checkbox\" id=\"reindex_force\" name=\"reindex_force\" /><label for=\"reindex_force\">{$lang['strforce']}</label><br />\n";
echo "<input type=\"submit\" value=\"{$lang['strreindex']}\" />\n";
echo "<input type=\"hidden\" name=\"action\" value=\"reindex\" />\n";
$actions = array(
'edit' => array(
'title' => $lang['stredit'],
- 'url' => "{$PHP_SELF}?action=editautovac&schema=pg_catalog&{$misc->href}&",
+ 'url' => "database.php?action=editautovac&schema=pg_catalog&{$misc->href}&",
'vars' => array('key[vacrelid]' => 'vacrelid')
),
'delete' => array(
'title' => $lang['strdelete'],
- 'url' => "{$PHP_SELF}?action=delautovac&{$misc->href}&",
+ 'url' => "database.php?action=delautovac&{$misc->href}&",
'vars' => array('key[vacrelid]' => 'vacrelid')
)
);
function doEditAutovacuum($confirm, $msg = '') {
global $data, $misc, $conf;
global $lang;
- global $PHP_SELF;
$key = $_REQUEST['key'];
$attrs = $data->getTableAttributes('pg_autovacuum');
$rs = $data->browseRow('pg_autovacuum', $key);
- echo "<form action=\"$PHP_SELF\" method=\"post\" id=\"ac_form\">\n";
+ echo "<form action=\"database.php\" method=\"post\" id=\"ac_form\">\n";
$elements = 0;
$error = true;
if ($rs->recordCount() == 1 && $attrs->recordCount() > 0) {
* Delete rows from the autovacuum table
*/
function doDelAutovacuum($confirm) {
- global $PHP_SELF, $data, $misc;
+ global $data, $misc;
global $lang;
if ($confirm) {
echo "<p>{$lang['strconfdeleterow']}</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"database.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"confdelautovac\" />\n";
echo $misc->form;
echo "<input type=\"hidden\" name=\"table\" value=\"pg_autovacuum\" />\n";
* Allow execution of arbitrary SQL statements on a database
*/
function doSQL() {
- global $PHP_SELF, $data, $misc;
+ global $data, $misc;
global $lang;
if (!isset($_REQUEST['query'])) $_REQUEST['query'] = '';
}
function doTree() {
- global $misc, $data, $lang, $PHP_SELF, $slony;
+ global $misc, $data, $lang, $slony;
$reqvars = $misc->getRequestVars('database');
* Does an export to the screen or as a download. This checks to
* see if they have pg_dump set up, and will use it if possible.
*
- * $Id: dataexport.php,v 1.23.2.1 2007/05/28 19:30:17 soranzo Exp $
+ * $Id: dataexport.php,v 1.23.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
$extensions = array(
$misc->printTitle($lang['strexport']);
if (isset($msg)) $misc->printMsg($msg);
- echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<form action=\"dataexport.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data\">{$lang['strformat']}:</th><td><select name=\"d_format\">\n";
// COPY and SQL require a table
* @param $return_desc The return link name
* @param $page The current page
*
- * $Id: display.php,v 1.55.2.2 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: display.php,v 1.55.2.3 2007/07/09 14:55:22 xzilla Exp $
*/
// Prevent timeouts on large exports (non-safe mode only)
function doEditRow($confirm, $msg = '') {
global $data, $misc, $conf;
global $lang;
- global $PHP_SELF;
if (is_array($_REQUEST['key']))
$key = $_REQUEST['key'];
$attrs = $data->getTableAttributes($_REQUEST['table']);
$rs = $data->browseRow($_REQUEST['table'], $key);
- echo "<form action=\"$PHP_SELF\" method=\"post\" id=\"ac_form\">\n";
+ echo "<form action=\"display.php\" method=\"post\" id=\"ac_form\">\n";
$elements = 0;
$error = true;
if ($rs->recordCount() == 1 && $attrs->recordCount() > 0) {
function doDelRow($confirm) {
global $data, $misc;
global $lang;
- global $PHP_SELF;
if ($confirm) {
$misc->printTrail($_REQUEST['subject']);
echo "<p>{$lang['strconfdeleterow']}</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"display.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"delrow\" />\n";
echo $misc->form;
if (isset($_REQUEST['table']))
/**
* Manage domains in a database
*
- * $Id: domains.php,v 1.24.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: domains.php,v 1.24.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doAlter($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('domain');
$misc->printTitle($lang['stralter'],'pg.domain.alter');
}
// Display domain info
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"domains.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data left required\" width=\"70\">{$lang['strname']}</th>\n";
echo "<td class=\"data1\">", $misc->printVal($domaindata->f['domname']), "</td></tr>\n";
* Confirm and then actually add a CHECK constraint
*/
function addCheck($confirm, $msg = '') {
- global $PHP_SELF, $data, $data, $misc;
+ global $data, $data, $misc;
global $lang;
if (!isset($_POST['name'])) $_POST['name'] = '';
$misc->printTitle($lang['straddcheck'],'pg.constraint.check');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"domains.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data\">{$lang['strname']}</th>\n";
echo "<th class=\"data required\">{$lang['strdefinition']}</th></tr>\n";
*/
function doDropConstraint($confirm, $msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('domain');
echo "<p>", sprintf($lang['strconfdropconstraint'], $misc->printVal($_REQUEST['constraint']),
$misc->printVal($_REQUEST['domain'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"domains.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop_con\" />\n";
echo "<input type=\"hidden\" name=\"domain\" value=\"", htmlspecialchars($_REQUEST['domain']), "\" />\n";
echo "<input type=\"hidden\" name=\"constraint\" value=\"", htmlspecialchars($_REQUEST['constraint']), "\" />\n";
*/
function doProperties($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('domain');
$misc->printTitle($lang['strproperties'],'pg.domain');
echo $misc->printVal($domaincons->f['consrc']);
echo "</td>";
echo "<td class=\"opbutton{$id}\">";
- echo "<a href=\"$PHP_SELF?action=confirm_drop_con&{$misc->href}&constraint=", urlencode($domaincons->f['conname']),
+ echo "<a href=\"domains.php?action=confirm_drop_con&{$misc->href}&constraint=", urlencode($domaincons->f['conname']),
"&domain=", urlencode($_REQUEST['domain']), "&type=", urlencode($domaincons->f['contype']), "\">{$lang['strdrop']}</a></td></tr>\n";
$domaincons->moveNext();
}
else echo "<p>{$lang['strnodata']}</p>\n";
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?{$misc->href}\">{$lang['strshowalldomains']}</a>\n";
+ echo "<p><a class=\"navlink\" href=\"domains.php?{$misc->href}\">{$lang['strshowalldomains']}</a>\n";
if ($data->hasDomainConstraints()) {
- echo "| <a class=\"navlink\" href=\"{$PHP_SELF}?action=add_check&{$misc->href}&domain=", urlencode($_REQUEST['domain']),
+ echo "| <a class=\"navlink\" href=\"domains.php?action=add_check&{$misc->href}&domain=", urlencode($_REQUEST['domain']),
"\">{$lang['straddcheck']}</a>\n";
- echo "| <a class=\"navlink\" href=\"$PHP_SELF?action=alter&{$misc->href}&domain=",
+ echo "| <a class=\"navlink\" href=\"domains.php?action=alter&{$misc->href}&domain=",
urlencode($_REQUEST['domain']), "\">{$lang['stralter']}</a>\n";
}
echo "</p>\n";
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('domain');
$misc->printTitle($lang['strdrop'],'pg.domain.drop');
echo "<p>", sprintf($lang['strconfdropdomain'], $misc->printVal($_REQUEST['domain'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"domains.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"domain\" value=\"", htmlspecialchars($_REQUEST['domain']), "\" />\n";
echo $misc->form;
*/
function doCreate($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_POST['domname'])) $_POST['domname'] = '';
if (!isset($_POST['domtype'])) $_POST['domtype'] = '';
$misc->printTitle($lang['strcreatedomain'],'pg.domain.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"domains.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data left required\" width=\"70\">{$lang['strname']}</th>\n";
echo "<td class=\"data1\"><input name=\"domname\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
*/
function doDefault($msg = '') {
global $data, $conf, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('schema');
$misc->printTabs('schema','domains');
$actions = array(
'properties' => array(
'title' => $lang['strproperties'],
- 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&",
+ 'url' => "domains.php?action=properties&{$misc->href}&",
'vars' => array('domain' => 'domname'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "domains.php?action=confirm_drop&{$misc->href}&",
'vars' => array('domain' => 'domname'),
),
);
$misc->printTable($domains, $columns, $actions, $lang['strnodomains']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create&{$misc->href}\">{$lang['strcreatedomain']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"domains.php?action=create&{$misc->href}\">{$lang['strcreatedomain']}</a></p>\n";
}
* Generate XML for the browser tree.
*/
function doTree() {
- global $misc, $data, $PHP_SELF;
+ global $misc, $data;
$domains = $data->getDomains();
/**
* Manage functions in a database
*
- * $Id: functions.php,v 1.56.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: functions.php,v 1.56.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doEdit($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('function');
$misc->printTitle($lang['stralter'],'pg.function.alter');
}
$func_full = $fndata->f['proname'] . "(". $fndata->f['proarguments'] .")";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"functions.php\" method=\"post\">\n";
echo "<table width=\"90%\">\n";
echo "<tr>\n";
echo "<th class=\"data required\">{$lang['strfunction']}</th>\n";
*/
function doProperties($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('function');
$misc->printTitle($lang['strproperties'],'pg.function');
}
else echo "<p>{$lang['strnodata']}</p>\n";
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?{$misc->href}\">{$lang['strshowallfunctions']}</a> |\n";
- echo "<a class=\"navlink\" href=\"$PHP_SELF?action=edit&{$misc->href}&function=",
+ echo "<p><a class=\"navlink\" href=\"functions.php?{$misc->href}\">{$lang['strshowallfunctions']}</a> |\n";
+ echo "<a class=\"navlink\" href=\"functions.php?action=edit&{$misc->href}&function=",
urlencode($_REQUEST['function']), "&function_oid=", urlencode($_REQUEST['function_oid']), "\">{$lang['stralter']}</a> |\n";
- echo "<a class=\"navlink\" href=\"$PHP_SELF?action=confirm_drop&{$misc->href}&function=",
+ echo "<a class=\"navlink\" href=\"functions.php?action=confirm_drop&{$misc->href}&function=",
urlencode($func_full), "&function_oid=", $_REQUEST['function_oid'], "\">{$lang['strdrop']}</a>\n";
}
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('schema');
echo "<p>", sprintf($lang['strconfdropfunction'], $misc->printVal($_REQUEST['function'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"functions.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"function\" value=\"", htmlspecialchars($_REQUEST['function']), "\" />\n";
echo "<input type=\"hidden\" name=\"function_oid\" value=\"", htmlspecialchars($_REQUEST['function_oid']), "\" />\n";
*/
function doCreate($msg = '',$szJS="") {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('schema');
if (!isset($_POST['formFunction'])) $_POST['formFunction'] = '';
var g_lang_strarglower = \"". addslashes($lang["strarglower"]) ."\";
</script>
";
- echo "<form action=\"$PHP_SELF\" method=post><input type=\"hidden\" name=\"formEmptyArgs\" id=\"formEmptyArgs\" value=\"1\" />\n";
+ echo "<form action=\"functions.php\" method=post><input type=\"hidden\" name=\"formEmptyArgs\" id=\"formEmptyArgs\" value=\"1\" />\n";
echo "<table><tbody id=\"args_table\">\n";
echo "<tr><th class=\"data required\">{$lang['strname']}</th>\n";
echo "<th class=\"data required\" colspan=\"2\">{$lang['strreturns']}</th>\n";
*/
function doDefault($msg = '') {
global $data, $conf, $misc, $func;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('schema');
$misc->printTabs('schema','functions');
),
'alter' => array(
'title' => $lang['stralter'],
- 'url' => "{$PHP_SELF}?action=edit&{$misc->href}&",
+ 'url' => "functions.php?action=edit&{$misc->href}&",
'vars' => array('function' => 'proproto', 'function_oid' => 'prooid'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "functions.php?action=confirm_drop&{$misc->href}&",
'vars' => array('function' => 'proproto', 'function_oid' => 'prooid'),
),
'privileges' => array(
$misc->printTable($funcs, $columns, $actions, $lang['strnofunctions']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create&{$misc->href}\">{$lang['strcreateplfunction']}</a> | ";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=create&language=internal&{$misc->href}\">{$lang['strcreateinternalfunction']}</a> | ";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=create&language=C&{$misc->href}\">{$lang['strcreatecfunction']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"functions.php?action=create&{$misc->href}\">{$lang['strcreateplfunction']}</a> | ";
+ echo "<a class=\"navlink\" href=\"functions.php?action=create&language=internal&{$misc->href}\">{$lang['strcreateinternalfunction']}</a> | ";
+ echo "<a class=\"navlink\" href=\"functions.php?action=create&language=C&{$misc->href}\">{$lang['strcreatecfunction']}</a></p>\n";
}
/**
/**
* Manage groups in a database cluster
*
- * $Id: groups.php,v 1.21.4.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: groups.php,v 1.21.4.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doAddMember() {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$status = $data->addGroupMember($_REQUEST['group'], $_REQUEST['user']);
if ($status == 0)
*/
function doDropMember($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('group');
echo "<p>", sprintf($lang['strconfdropmember'], $misc->printVal($_REQUEST['user']), $misc->printVal($_REQUEST['group'])), "</p>\n";
- echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<form action=\"groups.php\" method=\"post\">\n";
echo $misc->form;
echo "<input type=\"hidden\" name=\"action\" value=\"drop_member\" />\n";
echo "<input type=\"hidden\" name=\"group\" value=\"", htmlspecialchars($_REQUEST['group']), "\" />\n";
*/
function doProperties($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_POST['user'])) $_POST['user'] = '';
while (!$groupdata->EOF) {
$id = (($i % 2) == 0 ? '1' : '2');
echo "<tr><td class=\"data{$id}\">", $misc->printVal($groupdata->f['usename']), "</td>\n";
- echo "<td class=\"opbutton{$id}\"><a href=\"$PHP_SELF?action=confirm_drop_member&{$misc->href}&group=",
+ echo "<td class=\"opbutton{$id}\"><a href=\"groups.php?action=confirm_drop_member&{$misc->href}&group=",
urlencode($_REQUEST['group']), "&user=", urlencode($groupdata->f['usename']), "\">{$lang['strdrop']}</a></td>\n";
echo "</tr>\n";
$groupdata->moveNext();
else echo "<p>{$lang['strnousers']}</p>\n";
// Display form for adding a user to the group
- echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<form action=\"groups.php\" method=\"post\">\n";
echo "<select name=\"user\">";
while (!$users->EOF) {
$uname = $misc->printVal($users->f['usename']);
echo "<input type=\"hidden\" name=\"action\" value=\"add_member\" />\n";
echo "</form>\n";
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?{$misc->href}\">{$lang['strshowallgroups']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"groups.php?{$misc->href}\">{$lang['strshowallgroups']}</a></p>\n";
}
/**
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('group');
echo "<p>", sprintf($lang['strconfdropgroup'], $misc->printVal($_REQUEST['group'])), "</p>\n";
- echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<form action=\"groups.php\" method=\"post\">\n";
echo $misc->form;
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"group\" value=\"", htmlspecialchars($_REQUEST['group']), "\" />\n";
*/
function doCreate($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_POST['name'])) $_POST['name'] = '';
if (!isset($_POST['members'])) $_POST['members'] = array();
$misc->printTitle($lang['strcreategroup'],'pg.group.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n";
*/
function doDefault($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('server');
$misc->printTabs('server','groups');
$actions = array(
'properties' => array(
'title' => $lang['strproperties'],
- 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&",
+ 'url' => "groups.php?action=properties&{$misc->href}&",
'vars' => array('group' => 'groname'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "groups.php?action=confirm_drop&{$misc->href}&",
'vars' => array('group' => 'groname'),
),
);
$misc->printTable($groups, $columns, $actions, $lang['strnogroups']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create&{$misc->href}\">{$lang['strcreategroup']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"groups.php?action=create&{$misc->href}\">{$lang['strcreategroup']}</a></p>\n";
}
/**
* List indexes on a table
*
- * $Id: indexes.php,v 1.38.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: indexes.php,v 1.38.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doClusterIndex($confirm) {
global $data, $misc, $action;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
// Default analyze to on
echo "<p>", sprintf($lang['strconfcluster'], $misc->printVal($_REQUEST['index'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"indexes.php\" method=\"post\">\n";
echo "<p><input type=\"checkbox\" id=\"analyze\" name=\"analyze\"", (isset($_REQUEST['analyze']) ? ' checked="checked"' : ''), " /><label for=\"analyze\">{$lang['stranalyze']}</label></p>\n";
echo "<input type=\"hidden\" name=\"action\" value=\"cluster_index\" />\n";
echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
*/
function doCreateIndex($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_POST['formIndexName'])) $_POST['formIndexName'] = '';
if (!isset($_POST['formIndexType'])) $_POST['formIndexType'] = null;
$buttonRemove->set_attribute("onclick", "buttonPressed(this);");
$buttonRemove->set_attribute("type", "button");
- echo "<form onsubmit=\"doSelectAll();\" name=\"formIndex\" action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form onsubmit=\"doSelectAll();\" name=\"formIndex\" action=\"indexes.php\" method=\"post\">\n";
echo "<table>\n";
*/
function doDropIndex($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('index');
echo "<p>", sprintf($lang['strconfdropindex'], $misc->printVal($_REQUEST['index'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"indexes.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop_index\" />\n";
echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
echo "<input type=\"hidden\" name=\"index\" value=\"", htmlspecialchars($_REQUEST['index']), "\" />\n";
function doDefault($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
function indPre(&$rowdata, $actions) {
global $data, $lang;
$actions = array(
'cluster' => array(
'title' => $lang['strclusterindex'],
- 'url' => "{$PHP_SELF}?action=confirm_cluster_index&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
+ 'url' => "indexes.php?action=confirm_cluster_index&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
'vars' => array('index' => 'indname'),
),
'reindex' => array(
'title' => $lang['strreindex'],
- 'url' => "{$PHP_SELF}?action=reindex&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
+ 'url' => "indexes.php?action=reindex&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
'vars' => array('index' => 'indname'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop_index&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
+ 'url' => "indexes.php?action=confirm_drop_index&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
'vars' => array('index' => 'indname'),
),
);
$misc->printTable($indexes, $columns, $actions, $lang['strnoindexes'], 'indPre');
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create_index&{$misc->href}&table=", urlencode($_REQUEST['table']), "\">{$lang['strcreateindex']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"indexes.php?action=create_index&{$misc->href}&table=", urlencode($_REQUEST['table']), "\">{$lang['strcreateindex']}</a></p>\n";
}
$misc->printHeader($lang['strindexes'], "<script src=\"indexes.js\" type=\"text/javascript\"></script>");
/**
* Intro screen
*
- * $Id: intro.php,v 1.15.6.1 2007/05/28 19:30:17 soranzo Exp $
+ * $Id: intro.php,v 1.15.6.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions (no db conn)
<h1><?php echo "$appName $appVersion (PHP ". phpversion() .')' ?></h1>
-<form method="get" action="<?php echo $PHP_SELF; ?>">
+<form method="get" action="intro.php">
<label>
<select name="language" onchange="this.form.submit()">
<?php
* English language file for phpPgAdmin. Use this as a basis
* for new translations.
*
- * $Id: english.php,v 1.198.2.2 2007/01/21 21:25:24 xzilla Exp $
+ * $Id: english.php,v 1.198.2.3 2007/07/09 14:55:23 xzilla Exp $
*/
// Language and character set
$lang['strimporterrorline-badcolumnnum'] = 'Import error on line %s: Line does not possess the correct number of columns.';
$lang['strimporterror-uploadedfile'] = 'Import error: File could not be uploaded to the server';
$lang['strcannotdumponwindows'] = 'Dumping of complex table and schema names on Windows is not supported.';
+ $lang['strinvalidserverparam'] = 'Attempt to connect with invalid server parameter, possibly someone is trying to hack your system.';
// Tables
$lang['strtable'] = 'Table';
* French Language file for phpPgAdmin.
*
- * $Id: french.php,v 1.19.2.1 2007/01/20 18:35:43 xzilla Exp $
+ * $Id: french.php,v 1.19.2.2 2007/07/09 14:55:23 xzilla Exp $
*/
// Language and character set
$lang['strimporterrorline-badcolumnnum'] = 'Erreur d\'importation sur la ligne %s : la ligne ne possède pas le bon nombre de colonnes.';
$lang['strimporterror-uploadedfile'] = 'Erreur d\'importation : le fichier n\'a pas pû être récupéré sur le serveur.';
$lang['strcannotdumponwindows'] = 'La sauvegarde de table complexe et des noms de schémas n\'est pas supporté sur Windows.';
+ $lang['strinvalidserverparam'] = 'Tentative de connexion avec un server invalide, il est possible que quelqu\'un essai de pirater votre système.';
// Tables
$lang['strtable'] = 'Table';
* English language file for phpPgAdmin. Use this as a basis
* for new translations.
*
- * $Id: english.php,v 1.151.2.2 2007/01/21 21:25:24 xzilla Exp $
+ * $Id: english.php,v 1.151.2.3 2007/07/09 14:55:23 xzilla Exp $
*/
// Language and character set
$lang['strimporterrorline-badcolumnnum'] = 'Import error on line %s: Line does not possess the correct number of columns.';
$lang['strimporterror-uploadedfile'] = 'Import error: File could not be uploaded to the server';
$lang['strcannotdumponwindows'] = 'Dumping of complex table and schema names on Windows is not supported.';
+ $lang['strinvalidserverparam'] = 'Attempt to connect with invalid server parameter, possibly someone is trying to hack your system.';
// Tables
$lang['strtable'] = 'Table';
* French Language file for phpPgAdmin.
*
- * $Id: french.php,v 1.18.2.1 2007/01/20 18:35:43 xzilla Exp $
+ * $Id: french.php,v 1.18.2.2 2007/07/09 14:55:23 xzilla Exp $
*/
// Language and character set
$lang['strimporterrorline-badcolumnnum'] = 'Erreur d\'importation sur la ligne %s : la ligne ne possède pas le bon nombre de colonnes.';
$lang['strimporterror-uploadedfile'] = 'Erreur d\'importation : le fichier n\'a pas pû être récupéré sur le serveur.';
$lang['strcannotdumponwindows'] = 'La sauvegarde de table complexe et des noms de schémas n\'est pas supporté sur Windows.';
+ $lang['strinvalidserverparam'] = 'Tentative de connexion avec un server invalide, il est possible que quelqu\'un essai de pirater votre système.';
// Tables
$lang['strtable'] = 'Table';
* Spanish language file for phpPgAdmin.
*
- * $Id: spanish.php,v 1.36.2.2 2007/01/21 21:25:24 xzilla Exp $
+ * $Id: spanish.php,v 1.36.2.3 2007/07/09 14:55:23 xzilla Exp $
*/
// Language and character set
$lang['strimporterrorline-badcolumnnum'] = 'Error de importación en la línea %s: La línea no posee la cantidad de columnas correctas.';
$lang['strimporterror-uploadedfile'] = 'Error de importación: No se ha podido subir el archivo al servidor';
$lang['strcannotdumponwindows'] = 'Vuelco de datos con nombres complejos de tablas y esquemas no esta soportado en Windows.';
+ $lang['strinvalidserverparam'] = 'Tentativa de conectar con parámetro inválido del servidor. ¿Alguien está intentando posiblemente cortar tu sistema?';
// Tables
$lang['strtable'] = 'Tabla';
* Spanish language file for phpPgAdmin.
*
- * $Id: spanish.php,v 1.35.2.2 2007/01/21 21:25:24 xzilla Exp $
+ * $Id: spanish.php,v 1.35.2.3 2007/07/09 14:55:23 xzilla Exp $
*/
// Language and character set
$lang['strimporterrorline-badcolumnnum'] = 'Error de importación en la lÃnea %s: La lÃnea no posee la cantidad de columnas correctas.';
$lang['strimporterror-uploadedfile'] = 'Error de importación: No se ha podido subir el archivo al servidor';
$lang['strcannotdumponwindows'] = 'Vuelco de datos con nombres complejos de tablas y esquemas no esta soportado en Windows.';
+ $lang['strinvalidserverparam'] = 'Tentativa de conectar con parámetro inválido del servidor. ¿Alguien está intentando posiblemente cortar tu sistema?';
// Tables
$lang['strtable'] = 'Tabla';
/**
* Manage languages in a database
*
- * $Id: languages.php,v 1.10.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: languages.php,v 1.10.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doDefault($msg = '') {
global $data, $misc, $database;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('database');
$misc->printTabs('database','languages');
/**
* Function library read in upon startup
*
- * $Id: lib.inc.php,v 1.111.2.5 2007/06/01 12:34:16 xzilla Exp $
+ * $Id: lib.inc.php,v 1.111.2.6 2007/07/09 14:55:23 xzilla Exp $
*/
include_once('./libraries/decorator.inc.php');
$appName = 'phpPgAdmin';
// Application version
- $appVersion = '4.1.2';
+ $appVersion = '4.1.3-rc-1';
// PostgreSQL and PHP minimum version
$postgresqlMinVer = '7.0';
}
}
- // Prevent XSS attacks
- $PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, $lang['appcharset']);
-
?>
/**
* Login screen
*
- * $Id: login.php,v 1.32.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: login.php,v 1.32.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
global $conf;
// Check to see if the configuration file exists, if not, explain
require_once('./libraries/lib.inc.php');
- global $PHP_SELF;
-
$misc->printHeader($lang['strlogin']);
$misc->printBody();
$misc->printTrail('root');
if (isset($msg)) $misc->printMsg($msg);
?>
-<form action="<?php echo $PHP_SELF ?>" method="post" name="login_form">
+<form action="" method="post" name="login_form">
<?php
if (!empty($_POST)) $vars =& $_POST;
else $vars =& $_GET;
/**
* Manage operators in a database
*
- * $Id: operators.php,v 1.22.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: operators.php,v 1.22.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doProperties($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('operator');
$misc->printTitle($lang['strproperties'],'pg.operator');
echo "<td class=\"data1\">", $misc->printVal($oprdata->f['oprgtcmpop']), "</td></tr>\n";
echo "</table>\n";
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?{$misc->href}\">{$lang['strshowalloperators']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"operators.php?{$misc->href}\">{$lang['strshowalloperators']}</a></p>\n";
}
else
doDefault($lang['strinvalidparam']);
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('operator');
echo "<p>", sprintf($lang['strconfdropoperator'], $misc->printVal($_REQUEST['operator'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"operators.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"operator\" value=\"", htmlspecialchars($_REQUEST['operator']), "\" />\n";
echo "<input type=\"hidden\" name=\"operator_oid\" value=\"", htmlspecialchars($_REQUEST['operator_oid']), "\" />\n";
*/
function doDefault($msg = '') {
global $data, $conf, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('schema');
$misc->printTabs('schema','operators');
$actions = array(
'properties' => array(
'title' => $lang['strproperties'],
- 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&",
+ 'url' => "operators.php?action=properties&{$misc->href}&",
'vars' => array('operator' => 'oprname', 'operator_oid' => 'oid'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "operators.php?action=confirm_drop&{$misc->href}&",
'vars' => array('operator' => 'oprname', 'operator_oid' => 'oid'),
),
);
$misc->printTable($operators, $columns, $actions, $lang['strnooperators']);
-// echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}\">{$lang['strcreateoperator']}</a></p>\n";
+// echo "<p><a class=\"navlink\" href=\"operators.php?action=create&{$misc->href}\">{$lang['strcreateoperator']}</a></p>\n";
}
/**
* Generate XML for the browser tree.
*/
function doTree() {
- global $misc, $data, $PHP_SELF;
+ global $misc, $data;
$operators = $data->getOperators();
/**
* Slony database tab plugin
*
- * $Id: plugin_slony.php,v 1.12.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: plugin_slony.php,v 1.12.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
* @param string $subject The tree node to return
*/
function doTree($subject) {
- global $misc, $data, $lang, $PHP_SELF, $slony;
+ global $misc, $data, $lang, $slony;
$reqvars = $misc->getRequestVars('database');
if (isset($slony))
* Display the slony clusters (we only support one)
*/
function doClusters($msg = '') {
- global $PHP_SELF, $slony, $misc;
+ global $slony, $misc;
global $lang;
$misc->printTrail('database');
$misc->printTable($clusters, $columns, $actions, $lang['strnoclusters']);
if ($clusters->recordCount() == 0) {
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create_cluster&{$misc->href}\">{$lang['strinitcluster']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"plugin_slony.php?action=create_cluster&{$misc->href}\">{$lang['strinitcluster']}</a></p>\n";
}
}
* Display the properties of a slony cluster
*/
function doCluster($msg = '') {
- global $data, $slony, $misc, $PHP_SELF;
+ global $data, $slony, $misc;
global $lang;
$misc->printTrail('slony_cluster');
*/
function doCreateCluster($confirm, $msg = '') {
global $data, $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
if (!isset($_POST['cluster'])) $_POST['cluster'] = '';
$misc->printTitle($lang['strinitcluster']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<table width=\"100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strcluster']}</th>\n";
*/
function doDropCluster($confirm) {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('slony_cluster');
echo "<p>", sprintf($lang['strconfdropcluster'], $misc->printVal($slony->slony_cluster)), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop_cluster\" />\n";
echo $misc->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\" />\n";
* List all the nodes
*/
function doNodes($msg = '') {
- global $PHP_SELF, $slony, $misc;
+ global $slony, $misc;
global $lang;
$misc->printTrail('slony_cluster');
$misc->printTable($nodes, $columns, $actions, $lang['strnonodes']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create_node&{$misc->href}\">{$lang['strcreatenode']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"plugin_slony.php?action=create_node&{$misc->href}\">{$lang['strcreatenode']}</a></p>\n";
}
/**
* Display the properties of a node
*/
function doNode($msg = '') {
- global $data, $slony, $misc, $PHP_SELF;
+ global $data, $slony, $misc;
global $lang;
$misc->printTrail('slony_node');
}
else echo "<p>{$lang['strnodata']}</p>\n";
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=confirm_drop_node&{$misc->href}&no_id={$_REQUEST['no_id']}\">{$lang['strdrop']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"plugin_slony.php?action=confirm_drop_node&{$misc->href}&no_id={$_REQUEST['no_id']}\">{$lang['strdrop']}</a></p>\n";
}
/**
*/
function doCreateNode($confirm, $msg = '') {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
if (!isset($_POST['nodeid'])) $_POST['nodeid'] = '';
$misc->printTitle($lang['strcreatenode']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<table width=\"100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strid']}</th>\n";
*/
function doDropNode($confirm) {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('slony_cluster');
echo "<p>", sprintf($lang['strconfdropnode'], $misc->printVal($_REQUEST['no_id'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop_node\" />\n";
echo "<input type=\"hidden\" name=\"no_id\" value=\"", htmlspecialchars($_REQUEST['no_id']), "\" />\n";
echo $misc->form;
* List all the paths
*/
function doPaths($msg = '') {
- global $PHP_SELF, $slony, $misc;
+ global $slony, $misc;
global $lang;
$misc->printTrail('database');
$misc->printTable($paths, $columns, $actions, $lang['strnopaths']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create_path&{$misc->href}&no_id={$_REQUEST['no_id']}\">{$lang['strcreatepath']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"plugin_slony.php?action=create_path&{$misc->href}&no_id={$_REQUEST['no_id']}\">{$lang['strcreatepath']}</a></p>\n";
}
/**
* Display the properties of a path
*/
function doPath($msg = '') {
- global $data, $slony, $misc, $PHP_SELF;
+ global $data, $slony, $misc;
global $lang;
$misc->printTrail('slony_path');
}
else echo "<p>{$lang['strnodata']}</p>\n";
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=confirm_drop_path&{$misc->href}&no_id={$_REQUEST['no_id']}&path_id={$_REQUEST['path_id']}\">{$lang['strdrop']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"plugin_slony.php?action=confirm_drop_path&{$misc->href}&no_id={$_REQUEST['no_id']}&path_id={$_REQUEST['path_id']}\">{$lang['strdrop']}</a></p>\n";
}
/**
*/
function doCreatePath($confirm, $msg = '') {
global $data, $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
if (!isset($_POST['pathserver'])) $_POST['pathserver'] = '';
$misc->printTitle($lang['strcreatepath']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<table width=\"100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strnodename']}</th>\n";
*/
function doDropPath($confirm) {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('slony_cluster');
echo "<p>", sprintf($lang['strconfdroppath'], $misc->printVal($_REQUEST['path_id'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop_path\" />\n";
echo "<input type=\"hidden\" name=\"no_id\" value=\"", htmlspecialchars($_REQUEST['no_id']), "\" />\n";
echo "<input type=\"hidden\" name=\"path_id\" value=\"", htmlspecialchars($_REQUEST['path_id']), "\" />\n";
* List all the listens
*/
function doListens($msg = '') {
- global $PHP_SELF, $slony, $misc;
+ global $slony, $misc;
global $lang;
$misc->printTrail('database');
$misc->printTable($listens, $columns, $actions, $lang['strnolistens']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create_listen&{$misc->href}&no_id={$_REQUEST['no_id']}\">{$lang['strcreatelisten']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"plugin_slony.php?action=create_listen&{$misc->href}&no_id={$_REQUEST['no_id']}\">{$lang['strcreatelisten']}</a></p>\n";
}
/**
* Display the properties of a listen
*/
function doListen($msg = '') {
- global $data, $slony, $misc, $PHP_SELF;
+ global $data, $slony, $misc;
global $lang;
$misc->printTrail('slony_path');
}
else echo "<p>{$lang['strnodata']}</p>\n";
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=confirm_drop_listen&{$misc->href}&no_id={$_REQUEST['no_id']}&listen_id={$_REQUEST['listen_id']}&origin_id={$listen->f['li_origin']}\">{$lang['strdrop']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"plugin_slony.php?action=confirm_drop_listen&{$misc->href}&no_id={$_REQUEST['no_id']}&listen_id={$_REQUEST['listen_id']}&origin_id={$listen->f['li_origin']}\">{$lang['strdrop']}</a></p>\n";
}
/**
*/
function doCreateListen($confirm, $msg = '') {
global $data, $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
if (!isset($_POST['listenorigin'])) $_POST['listenorigin'] = '';
$misc->printTitle($lang['strcreatelisten']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<table width=\"100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">Origin</th>\n";
*/
function doDropListen($confirm) {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('slony_cluster');
echo "<p>", sprintf($lang['strconfdroplisten'], $misc->printVal($_REQUEST['listen_id'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop_listen\" />\n";
echo "<input type=\"hidden\" name=\"no_id\" value=\"", htmlspecialchars($_REQUEST['no_id']), "\" />\n";
echo "<input type=\"hidden\" name=\"listen_id\" value=\"", htmlspecialchars($_REQUEST['listen_id']), "\" />\n";
* List all the replication sets
*/
function doReplicationSets($msg = '') {
- global $PHP_SELF, $slony, $misc;
+ global $slony, $misc;
global $lang;
$misc->printTrail('slony_cluster');
$misc->printTable($sets, $columns, $actions, $lang['strnorepsets']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create_set&{$misc->href}\">{$lang['strcreaterepset']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"plugin_slony.php?action=create_set&{$misc->href}\">{$lang['strcreaterepset']}</a></p>\n";
}
/**
* Display the properties of a replication set
*/
function doReplicationSet($msg = '') {
- global $data, $slony, $misc, $PHP_SELF;
+ global $data, $slony, $misc;
global $lang;
$misc->printTrail('slony_set');
}
else echo "<p>{$lang['strnodata']}</p>\n";
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=confirm_drop_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strdrop']}</a> |\n";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=confirm_lock_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strlock']}</a> |\n";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=confirm_unlock_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strunlock']}</a> |\n";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=merge_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strmerge']}</a> |\n";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=move_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strmove']}</a> |\n";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=execute_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strexecute']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"plugin_slony.php?action=confirm_drop_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strdrop']}</a> |\n";
+ echo "<a class=\"navlink\" href=\"plugin_slony.php?action=confirm_lock_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strlock']}</a> |\n";
+ echo "<a class=\"navlink\" href=\"plugin_slony.php?action=confirm_unlock_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strunlock']}</a> |\n";
+ echo "<a class=\"navlink\" href=\"plugin_slony.php?action=merge_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strmerge']}</a> |\n";
+ echo "<a class=\"navlink\" href=\"plugin_slony.php?action=move_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strmove']}</a> |\n";
+ echo "<a class=\"navlink\" href=\"plugin_slony.php?action=execute_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strexecute']}</a></p>\n";
}
/**
*/
function doCreateReplicationSet($confirm, $msg = '') {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
if (!isset($_POST['setid'])) $_POST['setid'] = '';
$misc->printTitle($lang['strcreaterepset']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<table width=\"100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strid']}</th>\n";
*/
function doDropReplicationSet($confirm) {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('slony_cluster');
echo "<p>", sprintf($lang['strconfdroprepset'], $misc->printVal($_REQUEST['set_id'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop_set\" />\n";
echo "<input type=\"hidden\" name=\"set_id\" value=\"", htmlspecialchars($_REQUEST['set_id']), "\" />\n";
echo $misc->form;
*/
function doLockReplicationSet($confirm) {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('slony_cluster');
echo "<p>", sprintf($lang['strconflockrepset'], $misc->printVal($_REQUEST['set_id'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"lock_set\" />\n";
echo "<input type=\"hidden\" name=\"set_id\" value=\"", htmlspecialchars($_REQUEST['set_id']), "\" />\n";
echo $misc->form;
*/
function doUnlockReplicationSet($confirm) {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('slony_cluster');
echo "<p>", sprintf($lang['strconfunlockrepset'], $misc->printVal($_REQUEST['set_id'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"unlock_set\" />\n";
echo "<input type=\"hidden\" name=\"set_id\" value=\"", htmlspecialchars($_REQUEST['set_id']), "\" />\n";
echo $misc->form;
*/
function doMergeReplicationSet($confirm, $msg = '') {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
if (!isset($_POST['target'])) $_POST['target'] = '';
$misc->printTitle($lang['strmerge']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strmergeinto']}</th>\n";
*/
function doMoveReplicationSet($confirm, $msg = '') {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
if (!isset($_POST['new_origin'])) $_POST['new_origin'] = '';
$misc->printTitle($lang['strmove']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strneworigin']}</th>\n";
*/
function doExecuteReplicationSet($confirm, $msg = '') {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
if (!isset($_POST['script'])) $_POST['script'] = '';
$misc->printTitle($lang['strexecute']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
/* Slony 1.1 only
* List all the tables in a replication set
*/
function doTables($msg = '') {
- global $PHP_SELF, $data, $slony, $misc;
+ global $data, $slony, $misc;
global $lang;
$misc->printTrail('database');
$misc->printTable($tables, $columns, $actions, $lang['strnotables']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=add_table&stage=1&set_id={$_REQUEST['set_id']}&{$misc->href}\">{$lang['straddtable']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"plugin_slony.php?action=add_table&stage=1&set_id={$_REQUEST['set_id']}&{$misc->href}\">{$lang['straddtable']}</a></p>\n";
}
/**
*/
function doAddTable($stage, $msg = '') {
global $data, $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
switch ($stage) {
case 1:
$misc->printTitle($lang['straddtable']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<table width=\"100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strtable']}</th>\n";
$misc->printTitle($lang['straddtable']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
if ($indexes->recordCount() > 1) {
*/
function doMoveTable($stage, $msg = '') {
global $data, $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
switch ($stage) {
case 1:
$misc->printTitle($lang['strmove']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strnewrepset']}</th>\n";
*/
function doRemoveTable($confirm) {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('slony_cluster');
echo "<p>", sprintf($lang['strconfremovetablefromrepset'],
$misc->printVal($_REQUEST['qualname']), $misc->printVal($_REQUEST['set_id'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop_table\" />\n";
echo "<input type=\"hidden\" name=\"set_id\" value=\"", htmlspecialchars($_REQUEST['set_id']), "\" />\n";
echo "<input type=\"hidden\" name=\"tab_id\" value=\"", htmlspecialchars($_REQUEST['tab_id']), "\" />\n";
* List all the sequences in a replication set
*/
function doSequences($msg = '') {
- global $PHP_SELF, $data, $slony, $misc;
+ global $data, $slony, $misc;
global $lang;
$misc->printTrail('database');
$misc->printTable($sequences, $columns, $actions, $lang['strnosequences']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=add_sequence&stage=1&set_id={$_REQUEST['set_id']}&{$misc->href}\">{$lang['straddsequence']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"plugin_slony.php?action=add_sequence&stage=1&set_id={$_REQUEST['set_id']}&{$misc->href}\">{$lang['straddsequence']}</a></p>\n";
}
/**
*/
function doAddSequence($stage, $msg = '') {
global $data, $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
switch ($stage) {
case 1:
$misc->printTitle($lang['straddsequence']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<table width=\"100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strsequence']}</th>\n";
*/
function doRemoveSequence($confirm) {
global $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('slony_cluster');
echo "<p>", sprintf($lang['strconfremovesequencefromrepset'],
$misc->printVal($_REQUEST['qualname']), $misc->printVal($_REQUEST['set_id'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop_sequence\" />\n";
echo "<input type=\"hidden\" name=\"set_id\" value=\"", htmlspecialchars($_REQUEST['set_id']), "\" />\n";
echo "<input type=\"hidden\" name=\"seq_id\" value=\"", htmlspecialchars($_REQUEST['seq_id']), "\" />\n";
*/
function doMoveSequence($stage, $msg = '') {
global $data, $slony, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
switch ($stage) {
case 1:
$misc->printTitle($lang['strmove']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"plugin_slony.php\" method=\"post\">\n";
echo $misc->form;
echo "<sequence>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strnewrepset']}</th>\n";
* Display the properties of a subscription
*/
function doSubscription($msg = '') {
- global $data, $slony, $misc, $PHP_SELF;
+ global $data, $slony, $misc;
global $lang;
$misc->printTrail('slony_subscription');
/**
* Manage privileges in a database
*
- * $Id: privileges.php,v 1.39.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: privileges.php,v 1.39.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doAlter($confirm, $mode, $msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_REQUEST['username'])) $_REQUEST['username'] = array();
if (!isset($_REQUEST['groupname'])) $_REQUEST['groupname'] = array();
}
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"privileges.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data left\">{$lang['strusers']}</th>\n";
echo "<td class=\"data1\"><select name=\"username[]\" multiple=\"multiple\" size=\"", min(6, $users->recordCount()), "\">\n";
*/
function doDefault($msg = '') {
global $data, $misc, $database;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail($_REQUEST['subject']);
if ($_REQUEST['subject'] == 'function') {
$objectoid = $_REQUEST[$_REQUEST['subject'].'_oid'];
- $alterurl = "{$PHP_SELF}?action=alter&{$misc->href}&{$subject}={$object}&{$subject}_oid=$objectoid&subject={$subject}&mode=";
+ $alterurl = "privileges.php?action=alter&{$misc->href}&{$subject}={$object}&{$subject}_oid=$objectoid&subject={$subject}&mode=";
} else {
- $alterurl = "{$PHP_SELF}?action=alter&{$misc->href}&{$subject}={$object}&subject={$subject}&mode=";
+ $alterurl = "privileges.php?action=alter&{$misc->href}&{$subject}={$object}&subject={$subject}&mode=";
}
echo "<p><a class=\"navlink\" href=\"{$alterurl}grant\">{$lang['strgrant']}</a> |\n";
$url = parse_url($misc->getLastTabURL($subject));
- $PHP_SELF = $url['path'];
-
// Load query vars into superglobal arrays
if (isset($url['query'])) {
$vars = array();
/**
* List reports in a database
*
- * $Id: reports.php,v 1.22.4.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: reports.php,v 1.22.4.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doEdit($msg = '') {
global $data, $reportsdb, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
// If it's a first, load then get the data from the database
$report = $reportsdb->getReport($_REQUEST['report_id']);
$misc->printTitle($lang['stredit']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"reports.php\" method=\"post\">\n";
echo $misc->form;
echo "<table width=\"100%\">\n";
echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
*/
function doProperties($msg = '') {
global $data, $reportsdb, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$report = $reportsdb->getReport($_REQUEST['report_id']);
}
else echo "<p>{$lang['strinvalidparam']}</p>\n";
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?{$misc->href}\">{$lang['strshowallreports']}</a> |\n";
- echo "<a class=\"navlink\" href=\"$PHP_SELF?action=edit&{$misc->href}&report_id={$report->f['report_id']}\">{$lang['stredit']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"reports.php?{$misc->href}\">{$lang['strshowallreports']}</a> |\n";
+ echo "<a class=\"navlink\" href=\"reports.php?action=edit&{$misc->href}&report_id={$report->f['report_id']}\">{$lang['stredit']}</a></p>\n";
}
/**
*/
function doCreate($msg = '') {
global $data, $reportsdb, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_REQUEST['report_name'])) $_REQUEST['report_name'] = '';
if (!isset($_REQUEST['db_name'])) $_REQUEST['db_name'] = (isset($_REQUEST['database']) ? $_REQUEST['database'] : '');
$misc->printTitle($lang['strcreatereport']);
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"reports.php\" method=\"post\">\n";
echo $misc->form;
echo "<table width=\"100%\">\n";
echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
function doDrop($confirm) {
global $reportsdb, $misc;
global $lang;
- global $PHP_SELF;
if ($confirm) {
// Fetch report from the database
echo "<p>", sprintf($lang['strconfdropreport'], $misc->printVal($report->f['report_name'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"reports.php\" 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";
*/
function doDefault($msg = '') {
global $data, $misc, $reportsdb;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('server');
$misc->printTabs('server','reports');
),
);
- $return_url = urlencode("{$PHP_SELF}?{$misc->href}");
+ $return_url = urlencode("reports.php?{$misc->href}");
$actions = array(
'properties' => array(
'title' => $lang['strproperties'],
- 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&",
+ 'url' => "reports.php?action=properties&{$misc->href}&",
'vars' => array('report_id' => 'report_id'),
),
'run' => array(
),
'edit' => array(
'title' => $lang['stredit'],
- 'url' => "{$PHP_SELF}?action=edit&{$misc->href}&",
+ 'url' => "reports.php?action=edit&{$misc->href}&",
'vars' => array('report_id' => 'report_id'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "reports.php?action=confirm_drop&{$misc->href}&",
'vars' => array('report_id' => 'report_id'),
),
);
$misc->printTable($reports, $columns, $actions, $lang['strnoreports']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create&{$misc->href}\">{$lang['strcreatereport']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"reports.php?action=create&{$misc->href}\">{$lang['strcreatereport']}</a></p>\n";
}
$misc->printHeader($lang['strreports']);
*/
function doCreate($msg = '') {
global $data, $misc, $username;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_POST['formRolename'])) $_POST['formRolename'] = '';
if (!isset($_POST['formPassword'])) $_POST['formPassword'] = '';
$misc->printTitle($lang['strcreaterole'],'pg.role.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"roles.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\" width=\"130\">{$lang['strrolename']}</th>\n";
*/
function doAlter($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('role');
$misc->printTitle($lang['stralterrole'],'pg.role.alter');
$_POST['formPassword'] = '';
}
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"roles.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left\" width=\"130\">{$lang['strrolename']}</th>\n";
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('role');
echo "<p>", sprintf($lang['strconfdroprole'], $misc->printVal($_REQUEST['rolename'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"roles.php\" method=\"post\">\n";
echo $misc->form;
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"rolename\" value=\"", htmlspecialchars($_REQUEST['rolename']), "\" />\n";
*/
function doProperties($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('role');
$misc->printTitle($lang['strproperties'],'pg.role');
}
else echo "<p>{$lang['strnodata']}</p>\n";
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?{$misc->href}\">{$lang['strshowallroles']}</a> |\n";
- echo "<a class=\"navlink\" href=\"$PHP_SELF?action=alter&{$misc->href}&rolename=",
+ echo "<p><a class=\"navlink\" href=\"roles.php?{$misc->href}\">{$lang['strshowallroles']}</a> |\n";
+ echo "<a class=\"navlink\" href=\"roles.php?action=alter&{$misc->href}&rolename=",
urlencode($_REQUEST['rolename']), "\">{$lang['stralter']}</a> |\n";
- echo "<a class=\"navlink\" href=\"$PHP_SELF?action=confirm_drop&{$misc->href}&rolename=",
+ echo "<a class=\"navlink\" href=\"roles.php?action=confirm_drop&{$misc->href}&rolename=",
urlencode($_REQUEST['rolename']), "\">{$lang['strdrop']}</a>\n";
}
*/
function doAccount($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$server_info = $misc->getServerInfo();
}
else echo "<p>{$lang['strnodata']}</p>\n";
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=confchangepassword&{$misc->href}\">{$lang['strchangepassword']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"roles.php?action=confchangepassword&{$misc->href}\">{$lang['strchangepassword']}</a></p>\n";
}
/**
*/
function doChangePassword($confirm, $msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang, $conf;
+ global $lang, $conf;
$server_info = $misc->getServerInfo();
if (!isset($_POST['password'])) $_POST['password'] = '';
if (!isset($_POST['confirm'])) $_POST['confirm'] = '';
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"roles.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strpassword']}</th>\n";
*/
function doDefault($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
function renderRoleConnLimit($val) {
return $val == '-1' ? 'No limit' : htmlspecialchars($val);
),
'alter' => array(
'title' => $lang['stralter'],
- 'url' => "{$PHP_SELF}?action=alter&{$misc->href}&",
+ 'url' => "roles.php?action=alter&{$misc->href}&",
'vars' => array('rolename' => 'rolname'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "roles.php?action=confirm_drop&{$misc->href}&",
'vars' => array('rolename' => 'rolname'),
),
);
$misc->printTable($roles, $columns, $actions, $lang['strnoroles']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create&{$misc->href}\">{$lang['strcreaterole']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"roles.php?action=create&{$misc->href}\">{$lang['strcreaterole']}</a></p>\n";
}
/**
* List rules on a table OR view
*
- * $Id: rules.php,v 1.27.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: rules.php,v 1.27.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
* Confirm and then actually create a rule
*/
function createRule($confirm, $msg = '') {
- global $PHP_SELF, $data, $data, $misc;
+ global $data, $data, $misc;
global $lang;
if (!isset($_POST['name'])) $_POST['name'] = '';
$misc->printTitle($lang['strcreaterule'],'pg.rule.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"rules.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
echo "<td class=\"data1\"><input name=\"name\" size=\"16\" maxlength=\"{$data->_maxNameLen}\" value=\"",
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail($_REQUEST['subject']);
echo "<p>", sprintf($lang['strconfdroprule'], $misc->printVal($_REQUEST['rule']),
$misc->printVal($_REQUEST[$_REQUEST['reltype']])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"rules.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"subject\" value=\"", htmlspecialchars($_REQUEST['reltype']), "\" />\n";
echo "<input type=\"hidden\" name=\"", htmlspecialchars($_REQUEST['reltype']),
*/
function doDefault($msg = '') {
global $data, $misc;
- global $PHP_SELF;
global $lang;
$misc->printTrail($_REQUEST['subject']);
$actions = array(
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&reltype={$subject}&{$subject}={$object}&subject=rule&",
+ 'url' => "rules.php?action=confirm_drop&{$misc->href}&reltype={$subject}&{$subject}={$object}&subject=rule&",
'vars' => array('rule' => 'rulename'),
),
);
$misc->printTable($rules, $columns, $actions, $lang['strnorules']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create_rule&{$misc->href}&{$subject}={$object}&subject={$subject}\">{$lang['strcreaterule']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"rules.php?action=create_rule&{$misc->href}&{$subject}={$object}&subject={$subject}\">{$lang['strcreaterule']}</a></p>\n";
}
// Different header if we're view rules or table rules
/**
* Manage schemas in a database
*
- * $Id: schemas.php,v 1.8.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: schemas.php,v 1.8.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doDefault($msg = '') {
global $data, $misc, $conf;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('database');
$misc->printTabs('database','schemas');
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=drop&{$misc->href}&",
+ 'url' => "schemas.php?action=drop&{$misc->href}&",
'vars' => array('schema' => 'nspname'),
),
'privileges' => array(
),
'alter' => array(
'title' => $lang['stralter'],
- 'url' => "{$PHP_SELF}?action=alter&{$misc->href}&",
+ 'url' => "schemas.php?action=alter&{$misc->href}&",
'vars' => array('schema' => 'nspname'),
),
);
$misc->printTable($schemas, $columns, $actions, $lang['strnoschemas']);
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}\">{$lang['strcreateschema']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"schemas.php?action=create&{$misc->href}\">{$lang['strcreateschema']}</a></p>\n";
} else {
// If the database does not support schemas...
echo "<p>{$lang['strnoschemas']}</p>\n";
*/
function doCreate($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$server_info = $misc->getServerInfo();
$misc->printTitle($lang['strcreateschema'],'pg.schema.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"schemas.php\" method=\"post\">\n";
echo $misc->form;
echo "<table width=\"100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n";
* TODO: permit changing name, owner
*/
function doAlter($msg = '') {
- global $data, $misc,$PHP_SELF, $lang;
+ global $data, $misc, $lang;
$misc->printTrail('schema');
$misc->printTitle($lang['stralter'],'pg.schema.alter');
if (!isset($_POST['schema'])) $_POST['schema'] = $_REQUEST['schema'];
if (!isset($_POST['name'])) $_POST['name'] = $_REQUEST['schema'];
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"schemas.php\" method=\"post\">\n";
echo "<table>\n";
echo "\t<tr>\n";
* Save the form submission containing changes to a schema
*/
function doSaveAlter($msg = '') {
- global $data, $misc,$PHP_SELF, $lang;
+ global $data, $misc, $lang;
$status = $data->updateSchema($_POST['schema'], $_POST['comment'], $_POST['name']);
if ($status == 0)
* Show confirmation of drop and perform actual drop
*/
function doDrop($confirm) {
- global $PHP_SELF, $data, $data, $misc;
+ global $data, $data, $misc;
global $lang, $_reload_browser;
if ($confirm) {
echo "<p>", sprintf($lang['strconfdropschema'], $misc->printVal($_REQUEST['schema'])), "</p>\n";
- echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<form action=\"schemas.php\" method=\"post\">\n";
echo $misc->form;
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"database\" value=\"", htmlspecialchars($_REQUEST['database']), "\" />\n";
* Generate XML for the browser tree.
*/
function doTree() {
- global $misc, $data, $lang, $PHP_SELF, $slony;
+ global $misc, $data, $lang, $slony;
$schemas = $data->getSchemas();
/**
* Manage sequences in a database
*
- * $Id: sequences.php,v 1.36.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: sequences.php,v 1.36.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doDefault($msg = '') {
global $data, $conf, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('schema');
$misc->printTabs('schema', 'sequences');
$actions = array(
'properties' => array(
'title' => $lang['strproperties'],
- 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&",
+ 'url' => "sequences.php?action=properties&{$misc->href}&",
'vars' => array('sequence' => 'seqname'),
),
'alter' => array(
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "sequences.php?action=confirm_drop&{$misc->href}&",
'vars' => array('sequence' => 'seqname'),
),
'privileges' => array(
if (!$data->hasAlterSequence()) unset($actions['alter']);
$misc->printTable($sequences, $columns, $actions, $lang['strnosequences']);
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}\">{$lang['strcreatesequence']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"sequences.php?action=create&{$misc->href}\">{$lang['strcreatesequence']}</a></p>\n";
}
/**
* Display the properties of a sequence
*/
function doProperties($msg = '') {
- global $data, $misc, $PHP_SELF;
+ global $data, $misc;
global $lang;
$misc->printTrail('sequence');
echo "</table>";
if ($data->hasAlterSequence()) {
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=confirm_alter&{$misc->href}&sequence=", urlencode($sequence->f['seqname']), "\">{$lang['straltersequence']}</a> |\n";
+ echo "<p><a class=\"navlink\" href=\"sequences.php?action=confirm_alter&{$misc->href}&sequence=", urlencode($sequence->f['seqname']), "\">{$lang['straltersequence']}</a> |\n";
}
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=confirm_setval&{$misc->href}&sequence=", urlencode($sequence->f['seqname']), "\">{$lang['strsetval']}</a> |\n";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=nextval&{$misc->href}&sequence=", urlencode($sequence->f['seqname']), "\">{$lang['strnextval']}</a> |\n";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=reset&{$misc->href}&sequence=", urlencode($sequence->f['seqname']), "\">{$lang['strreset']}</a> |\n";
- echo "<a class=\"navlink\" href=\"{$PHP_SELF}?{$misc->href}\">{$lang['strshowallsequences']}</a></p>\n";
+ echo "<a class=\"navlink\" href=\"sequences.php?action=confirm_setval&{$misc->href}&sequence=", urlencode($sequence->f['seqname']), "\">{$lang['strsetval']}</a> |\n";
+ echo "<a class=\"navlink\" href=\"sequences.php?action=nextval&{$misc->href}&sequence=", urlencode($sequence->f['seqname']), "\">{$lang['strnextval']}</a> |\n";
+ echo "<a class=\"navlink\" href=\"sequences.php?action=reset&{$misc->href}&sequence=", urlencode($sequence->f['seqname']), "\">{$lang['strreset']}</a> |\n";
+ echo "<a class=\"navlink\" href=\"sequences.php?{$misc->href}\">{$lang['strshowallsequences']}</a></p>\n";
}
else echo "<p>{$lang['strnodata']}</p>\n";
}
*/
function doDrop($confirm, $msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('sequence');
echo "<p>", sprintf($lang['strconfdropsequence'], $misc->printVal($_REQUEST['sequence'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"sequences.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"sequence\" value=\"", htmlspecialchars($_REQUEST['sequence']), "\" />\n";
echo $misc->form;
*/
function doCreateSequence($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_POST['formSequenceName'])) $_POST['formSequenceName'] = '';
if (!isset($_POST['formIncrement'])) $_POST['formIncrement'] = '';
$misc->printTitle($lang['strcreatesequence'],'pg.sequence.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"sequences.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
*/
function doReset() {
global $data;
- global $PHP_SELF, $lang;
+ global $lang;
$status = $data->resetSequence($_REQUEST['sequence']);
if ($status == 0)
*/
function doNextval() {
global $data;
- global $PHP_SELF, $lang;
+ global $lang;
$status = $data->nextvalSequence($_REQUEST['sequence']);
if ($status == 0)
*/
function doSetval($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('sequence');
$misc->printTitle($lang['strsetval'], 'pg.sequence');
$sequence = $data->getSequence($_REQUEST['sequence']);
if (is_object($sequence) && $sequence->recordCount() > 0) {
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"sequences.php\" method=\"post\">\n";
echo "<table border=\"0\">";
echo "<tr><th class=\"data left required\">{$lang['strlastvalue']}</th>\n";
echo "<td class=\"data1\">";
*/
function doAlter($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('sequence');
$misc->printTitle($lang['stralter'], 'pg.sequence.alter');
$sequence->f['is_cycled'] = $data->phpBool($sequence->f['is_cycled']);
if ($sequence->f['is_cycled']) $_POST['formCycledValue'] = 'on';
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"sequences.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data left\">{$lang['strincrementby']}</th>\n";
/**
* Manage servers
*
- * $Id: servers.php,v 1.5.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: servers.php,v 1.5.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
function doDefault($msg = '') {
global $conf, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTabs('root','servers');
$misc->printMsg($msg);
),
'logout' => array(
'title' => $lang['strlogout'],
- 'url' => "{$PHP_SELF}?action=logout&",
+ 'url' => "servers.php?action=logout&",
'vars' => array('logoutServer' => 'id'),
),
);
/**
* Alternative SQL editing window
*
- * $Id: sqledit.php,v 1.30.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: sqledit.php,v 1.30.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
* Searches for a named database object
*/
function doFind() {
- global $PHP_SELF, $data, $misc;
+ global $data, $misc;
global $lang, $conf;
if (!isset($_GET['term'])) $_GET['term'] = '';
* Allow execution of arbitrary SQL statements on a database
*/
function doDefault() {
- global $PHP_SELF, $data, $misc;
+ global $data, $misc;
global $lang, $conf;
if (!isset($_REQUEST['query'])) $_REQUEST['query'] = '';
/**
* List tables in a database
*
- * $Id: tables.php,v 1.82.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: tables.php,v 1.82.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doCreate($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_REQUEST['stage'])) {
$_REQUEST['stage'] = 1;
$misc->printTitle($lang['strcreatetable'], 'pg.table.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"tables.php\" method=\"post\">\n";
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n";
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
$misc->printMsg($msg);
echo "<script src=\"tables.js\" type=\"text/javascript\"></script>";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"tables.php\" method=\"post\">\n";
// Output table header
echo "<table>\n";
function doSelectRows($confirm, $msg = '') {
global $data, $misc, $_no_output;
global $lang;
- global $PHP_SELF;
if ($confirm) {
$misc->printTrail('table');
$attrs = $data->getTableAttributes($_REQUEST['table']);
- echo "<form action=\"$PHP_SELF\" method=\"post\" name=\"selectform\">\n";
+ echo "<form action=\"tables.php\" method=\"post\" name=\"selectform\">\n";
if ($attrs->recordCount() > 0) {
// JavaScript for select all feature
echo "<script type=\"text/javascript\">\n";
function doInsertRow($confirm, $msg = '') {
global $data, $misc, $conf;
global $lang;
- global $PHP_SELF;
$bAllowAC = ($conf["autocomplete"]!='disable') ? TRUE : FALSE ;
}
}
- echo "<form action=\"$PHP_SELF\" method=\"post\" id=\"ac_form\">\n";
+ echo "<form action=\"tables.php\" method=\"post\" id=\"ac_form\">\n";
if ($attrs->recordCount() > 0) {
echo "<table>\n";
function doEmpty($confirm) {
global $data, $misc;
global $lang;
- global $PHP_SELF;
if ($confirm) {
$misc->printTrail('table');
echo "<p>", sprintf($lang['strconfemptytable'], $misc->printVal($_REQUEST['table'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"tables.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"empty\" />\n";
echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
echo $misc->form;
function doDrop($confirm) {
global $data, $misc;
global $lang, $_reload_browser;
- global $PHP_SELF;
if ($confirm) {
$misc->printTrail('table');
echo "<p>", sprintf($lang['strconfdroptable'], $misc->printVal($_REQUEST['table'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"tables.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
echo $misc->form;
function doVacuum($confirm) {
global $data, $misc;
global $lang, $_reload_browser;
- global $PHP_SELF;
if ($confirm) {
$misc->printTrail('table');
echo "<p>", sprintf($lang['strconfvacuumtable'], $misc->printVal($_REQUEST['table'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"tables.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"vacuum\" />\n";
echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
echo $misc->form;
*/
function doDefault($msg = '') {
global $data, $conf, $misc, $data;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('schema');
$misc->printTabs('schema','tables');
),
'select' => array(
'title' => $lang['strselect'],
- 'url' => "{$PHP_SELF}?action=confselectrows&{$misc->href}&",
+ 'url' => "tables.php?action=confselectrows&{$misc->href}&",
'vars' => array('table' => 'relname'),
),
'insert' => array(
'title' => $lang['strinsert'],
- 'url' => "{$PHP_SELF}?action=confinsertrow&{$misc->href}&",
+ 'url' => "tables.php?action=confinsertrow&{$misc->href}&",
'vars' => array('table' => 'relname'),
),
'empty' => array(
'title' => $lang['strempty'],
- 'url' => "{$PHP_SELF}?action=confirm_empty&{$misc->href}&",
+ 'url' => "tables.php?action=confirm_empty&{$misc->href}&",
'vars' => array('table' => 'relname'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "tables.php?action=confirm_drop&{$misc->href}&",
'vars' => array('table' => 'relname'),
),
'vacuum' => array(
'title' => $lang['strvacuum'],
- 'url' => "{$PHP_SELF}?action=confirm_vacuum&{$misc->href}&",
+ 'url' => "tables.php?action=confirm_vacuum&{$misc->href}&",
'vars' => array('table' => 'relname'),
),
);
$misc->printTable($tables, $columns, $actions, $lang['strnotables']);
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}\">{$lang['strcreatetable']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"tables.php?action=create&{$misc->href}\">{$lang['strcreatetable']}</a></p>\n";
}
/**
/**
* Manage tablespaces in a database cluster
*
- * $Id: tablespaces.php,v 1.10.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: tablespaces.php,v 1.10.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doAlter($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('tablespace');
$misc->printTitle($lang['stralter'],'pg.tablespace.alter');
$_POST['comment'] = ($data->hasSharedComments()) ? $tablespace->f['spccomment'] : '';
}
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"tablespaces.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('tablespace');
echo "<p>", sprintf($lang['strconfdroptablespace'], $misc->printVal($_REQUEST['tablespace'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"tablespaces.php\" method=\"post\">\n";
echo $misc->form;
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"tablespace\" value=\"", htmlspecialchars($_REQUEST['tablespace']), "\" />\n";
*/
function doCreate($msg = '') {
global $data, $misc, $spcname;
- global $PHP_SELF, $lang;
+ global $lang;
$server_info = $misc->getServerInfo();
$misc->printTitle($lang['strcreatetablespace'],'pg.tablespace.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"tablespaces.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n";
*/
function doDefault($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('server');
$misc->printTabs('server','tablespaces');
$actions = array(
'alter' => array(
'title' => $lang['stralter'],
- 'url' => "{$PHP_SELF}?action=edit&{$misc->href}&",
+ 'url' => "tablespaces.php?action=edit&{$misc->href}&",
'vars' => array('tablespace' => 'spcname')
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "tablespaces.php?action=confirm_drop&{$misc->href}&",
'vars' => array('tablespace' => 'spcname')
),
'privileges' => array(
$misc->printTable($tablespaces, $columns, $actions, $lang['strnotablespaces']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create&{$misc->href}\">{$lang['strcreatetablespace']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"tablespaces.php?action=create&{$misc->href}\">{$lang['strcreatetablespace']}</a></p>\n";
}
/**
* List tables in a database
*
- * $Id: tblproperties.php,v 1.72.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: tblproperties.php,v 1.72.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doAlter($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('table');
$misc->printTitle($lang['stralter'], 'pg.table.alter');
if (!isset($_POST['comment'])) $_POST['comment'] = $table->f['relcomment'];
if ($data->hasTablespaces() && !isset($_POST['tablespace'])) $_POST['tablespace'] = $table->f['tablespace'];
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"tblproperties.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
echo "<td class=\"data1\">";
function doExport($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
// Determine whether or not the table has an object ID
$hasID = $data->hasObjectID($_REQUEST['table']);
function doImport($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('table');
$misc->printTabs('table','import');
*/
function doAddColumn($msg = '') {
global $data, $misc, $_reload_browser;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_REQUEST['stage'])) $_REQUEST['stage'] = 1;
$misc->printTitle($lang['straddcolumn'], 'pg.column.add');
$misc->printMsg($msg);
echo "<script src=\"tables.js\" type=\"text/javascript\"></script>";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"tblproperties.php\" method=\"post\">\n";
// Output table header
echo "<table>\n";
*/
function doProperties($msg = '') {
global $data, $misc, $_reload_browser;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_REQUEST['stage'])) $_REQUEST['stage'] = 1;
$misc->printMsg($msg);
echo "<script src=\"tables.js\" type=\"text/javascript\"></script>";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"tblproperties.php\" method=\"post\">\n";
// Output table header
echo "<table>\n";
htmlspecialchars($_REQUEST['field']), "\" /></td>";
// Column type
+ $escaped_predef_types = array(); // the JS escaped array elements
if ($data->hasAlterColumnType()) {
// Fetch all available types
$types = $data->getTypes(true, false, true);
echo "<option value=\"[]\"", ($_REQUEST['array'] == '[]') ? ' selected="selected"' : '', ">[ ]</option>\n";
echo "</select>";
$predefined_size_types = array_intersect($data->predefined_size_types,array_keys($types_for_js));
- $escaped_predef_types = array(); // the JS escaped array elements
foreach($predefined_size_types as $value) {
$escaped_predef_types[] = "'{$value}'";
}
*/
function doDrop($confirm) {
global $data, $database, $misc, $_reload_browser;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('column');
$misc->printVal($_REQUEST['table'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"tblproperties.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
echo "<input type=\"hidden\" name=\"column\" value=\"", htmlspecialchars($_REQUEST['column']), "\" />\n";
*/
function doDefault($msg = '') {
global $data, $conf, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
function attPre(&$rowdata) {
global $data;
),
'alter' => array(
'title' => $lang['stralter'],
- 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
+ 'url' => "tableproperties.php?action=properties&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
'vars' => array('column' => 'attname'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
+ 'url' => "tblproperties.php?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
'vars' => array('column' => 'attname'),
),
);
echo "\t<li><a href=\"tables.php?action=confinsertrow&{$misc->href}&table=", urlencode($_REQUEST['table']),"\">{$lang['strinsert']}</a></li>\n";
echo "\t<li><a href=\"tables.php?action=confirm_empty&{$misc->href}&table=", urlencode($_REQUEST['table']),"\">{$lang['strempty']}</a></li>\n";
echo "\t<li><a href=\"tables.php?action=confirm_drop&{$misc->href}&table=", urlencode($_REQUEST['table']),"\">{$lang['strdrop']}</a></li>\n";
- echo "\t<li><a href=\"{$PHP_SELF}?action=add_column&{$misc->href}&table=", urlencode($_REQUEST['table']),"\">{$lang['straddcolumn']}</a></li>\n";
- echo "\t<li><a href=\"{$PHP_SELF}?action=confirm_alter&{$misc->href}&table=", urlencode($_REQUEST['table']),"\">{$lang['stralter']}</a></li>\n";
+ echo "\t<li><a href=\"tblproperties.php?action=add_column&{$misc->href}&table=", urlencode($_REQUEST['table']),"\">{$lang['straddcolumn']}</a></li>\n";
+ echo "\t<li><a href=\"tblproperties.php?action=confirm_alter&{$misc->href}&table=", urlencode($_REQUEST['table']),"\">{$lang['stralter']}</a></li>\n";
echo "</ul>\n";
}
/**
* List triggers on a table
*
- * $Id: triggers.php,v 1.30.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: triggers.php,v 1.30.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doAlter($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('trigger');
$misc->printTitle($lang['stralter'],'pg.trigger.alter');
if (!isset($_POST['name'])) $_POST['name'] = $triggerdata->f['tgname'];
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"triggers.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data\">{$lang['strname']}</th>\n";
echo "<td class=\"data1\">";
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('trigger');
echo "<p>", sprintf($lang['strconfdroptrigger'], $misc->printVal($_REQUEST['trigger']),
$misc->printVal($_REQUEST['table'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"triggers.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
echo "<input type=\"hidden\" name=\"trigger\" value=\"", htmlspecialchars($_REQUEST['trigger']), "\" />\n";
*/
function doEnable($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('trigger');
echo "<p>", sprintf($lang['strconfenabletrigger'], $misc->printVal($_REQUEST['trigger']),
$misc->printVal($_REQUEST['table'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"triggers.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"enable\" />\n";
echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
echo "<input type=\"hidden\" name=\"trigger\" value=\"", htmlspecialchars($_REQUEST['trigger']), "\" />\n";
*/
function doDisable($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('trigger');
echo "<p>", sprintf($lang['strconfdisabletrigger'], $misc->printVal($_REQUEST['trigger']),
$misc->printVal($_REQUEST['table'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"triggers.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"disable\" />\n";
echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
echo "<input type=\"hidden\" name=\"trigger\" value=\"", htmlspecialchars($_REQUEST['trigger']), "\" />\n";
*/
function doCreate($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('table');
$misc->printTitle($lang['strcreatetrigger'],'pg.trigger.create');
$sel3 = new XHTML_Select('formFrequency');
$sel3->set_data($data->triggerFrequency);
- echo "<form action=\"$PHP_SELF\" method=\"POST\">\n";
+ echo "<form action=\"triggers.php\" method=\"POST\">\n";
echo "<table>\n";
echo "<tr>\n";
echo " <th class=\"data\">{$lang['strname']}</th>\n";
*/
function doSaveCreate() {
global $data;
- global $PHP_SELF, $lang;
+ global $lang;
// Check that they've given a name and a definition
*/
function doDefault($msg = '') {
global $data, $misc, $database;
- global $PHP_SELF;
global $lang;
function tgPre(&$rowdata) {
$actions = array(
'alter' => array(
'title' => $lang['stralter'],
- 'url' => "{$PHP_SELF}?action=confirm_alter&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
+ 'url' => "triggers.php?action=confirm_alter&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
'vars' => array('trigger' => 'tgname'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
+ 'url' => "triggers.php?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
'vars' => array('trigger' => 'tgname'),
),
);
if(!$data->phpBool($triggers->fields["tgenabled"])) {
$actions['enable'] = array(
'title' => $lang['strenable'],
- 'url' => "{$PHP_SELF}?action=confirm_enable&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
+ 'url' => "triggers.php?action=confirm_enable&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
'vars' => array('trigger' => 'tgname'),
);
} else {
$actions['disable'] = array(
'title' => $lang['strdisable'],
- 'url' => "{$PHP_SELF}?action=confirm_disable&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
+ 'url' => "triggers.php?action=confirm_disable&{$misc->href}&table=".urlencode($_REQUEST['table'])."&",
'vars' => array('trigger' => 'tgname'),
);
}
$misc->printTable($triggers, $columns, $actions, $lang['strnotriggers'], 'tgPre');
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}&table=", urlencode($_REQUEST['table']), "\">{$lang['strcreatetrigger']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"triggers.php?action=create&{$misc->href}&table=", urlencode($_REQUEST['table']), "\">{$lang['strcreatetrigger']}</a></p>\n";
}
$misc->printHeader($lang['strtables'] . ' - ' . $_REQUEST['table'] . ' - ' . $lang['strtriggers']);
/**
* Manage types in a database
*
- * $Id: types.php,v 1.31.2.1 2007/05/28 17:21:56 ioguix Exp $
+ * $Id: types.php,v 1.31.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doProperties($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
// Get type (using base name)
$typedata = $data->getType($_REQUEST['type']);
echo "</table>\n";
}
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?{$misc->href}\">{$lang['strshowalltypes']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"types.php?{$misc->href}\">{$lang['strshowalltypes']}</a></p>\n";
} else
doDefault($lang['strinvalidparam']);
}
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('type');
echo "<p>", sprintf($lang['strconfdroptype'], $misc->printVal($_REQUEST['type'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"types.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"type\" value=\"", htmlspecialchars($_REQUEST['type']), "\" />\n";
echo $misc->form;
*/
function doCreateComposite($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_REQUEST['stage'])) $_REQUEST['stage'] = 1;
if (!isset($_REQUEST['name'])) $_REQUEST['name'] = '';
$misc->printTitle($lang['strcreatecomptype'], 'pg.type.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"types.php\" method=\"post\">\n";
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n";
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
$misc->printTitle($lang['strcreatecomptype'], 'pg.type.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"types.php\" method=\"post\">\n";
// Output table header
echo "<table>\n";
*/
function doCreate($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_POST['typname'])) $_POST['typname'] = '';
if (!isset($_POST['typin'])) $_POST['typin'] = '';
$misc->printTitle($lang['strcreatetype'], 'pg.type.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"types.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
echo "<td class=\"data1\"><input name=\"typname\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
*/
function doDefault($msg = '') {
global $data, $conf, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('schema');
$misc->printTabs('schema','types');
$actions = array(
'properties' => array(
'title' => $lang['strproperties'],
- 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&",
+ 'url' => "types.php?action=properties&{$misc->href}&",
'vars' => array('type' => 'basename'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "types.php?action=confirm_drop&{$misc->href}&",
'vars' => array('type' => 'basename'),
),
);
$misc->printTable($types, $columns, $actions, $lang['strnotypes']);
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}\">{$lang['strcreatetype']}</a>";
+ echo "<p><a class=\"navlink\" href=\"types.php?action=create&{$misc->href}\">{$lang['strcreatetype']}</a>";
if ($data->hasCompositeTypes())
- echo "\n| <a class=\"navlink\" href=\"$PHP_SELF?action=create_comp&{$misc->href}\">{$lang['strcreatecomptype']}</a>";
+ echo "\n| <a class=\"navlink\" href=\"types.php?action=create_comp&{$misc->href}\">{$lang['strcreatecomptype']}</a>";
echo "</p>\n";
}
/**
* Manage users in a database cluster
*
- * $Id: users.php,v 1.32.2.1 2007/05/28 17:21:57 ioguix Exp $
+ * $Id: users.php,v 1.32.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doAccount($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$server_info = $misc->getServerInfo();
}
else echo "<p>{$lang['strnodata']}</p>\n";
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=confchangepassword&{$misc->href}\">{$lang['strchangepassword']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"users.php?action=confchangepassword&{$misc->href}\">{$lang['strchangepassword']}</a></p>\n";
}
/**
*/
function doChangePassword($confirm, $msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang, $conf;
+ global $lang, $conf;
$server_info = $misc->getServerInfo();
if (!isset($_POST['password'])) $_POST['password'] = '';
if (!isset($_POST['confirm'])) $_POST['confirm'] = '';
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"users.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strpassword']}</th>\n";
*/
function doEdit($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('user');
$misc->printTitle($lang['stralter'],'pg.user.alter');
$_POST['formPassword'] = '';
}
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"users.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strusername']}</th>\n";
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if ($confirm) {
$misc->printTrail('user');
echo "<p>", sprintf($lang['strconfdropuser'], $misc->printVal($_REQUEST['username'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"users.php\" method=\"post\">\n";
echo $misc->form;
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"username\" value=\"", htmlspecialchars($_REQUEST['username']), "\" />\n";
*/
function doCreate($msg = '') {
global $data, $misc, $username;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_POST['formUsername'])) $_POST['formUsername'] = '';
if (!isset($_POST['formPassword'])) $_POST['formPassword'] = '';
$misc->printTitle($lang['strcreateuser'],'pg.user.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"users.php\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strusername']}</th>\n";
*/
function doDefault($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
function renderUseExpires($val) {
return $val == 'infinity' ? '' : htmlspecialchars($val);
$actions = array(
'alter' => array(
'title' => $lang['stralter'],
- 'url' => "{$PHP_SELF}?action=edit&{$misc->href}&",
+ 'url' => "users.php?action=edit&{$misc->href}&",
'vars' => array('username' => 'usename'),
),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "users.php?action=confirm_drop&{$misc->href}&",
'vars' => array('username' => 'usename'),
),
);
$misc->printTable($users, $columns, $actions, $lang['strnousers']);
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=create&{$misc->href}\">{$lang['strcreateuser']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"users.php?action=create&{$misc->href}\">{$lang['strcreateuser']}</a></p>\n";
}
/**
* List views in a database
*
- * $Id: viewproperties.php,v 1.21.2.1 2007/05/28 17:21:57 ioguix Exp $
+ * $Id: viewproperties.php,v 1.21.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
*/
function doEdit($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('view');
$misc->printTitle($lang['stredit'],'pg.view.alter');
$_POST['formComment'] = $viewdata->f['relcomment'];
}
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"viewproperties.php\" method=\"post\">\n";
echo "<table width=\"100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strdefinition']}</th>\n";
echo "\t\t<td class=\"data1\"><textarea style=\"width: 100%;\" rows=\"20\" cols=\"50\" name=\"formDefinition\" wrap=\"virtual\">",
*/
function doExport($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('view');
$misc->printTabs('view','export');
*/
function doDefinition($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
// Get view
$vdata = $data->getView($_REQUEST['view']);
}
else echo "<p>{$lang['strnodata']}</p>\n";
- echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=edit&{$misc->href}&view=",
+ echo "<p><a class=\"navlink\" href=\"viewproperties.php?action=edit&{$misc->href}&view=",
urlencode($_REQUEST['view']), "\">{$lang['stralter']}</a></p>\n";
}
*/
function doProperties($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_REQUEST['stage'])) $_REQUEST['stage'] = 1;
$misc->printTitle($lang['straltercolumn'],'pg.column.alter');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"viewproperties.php\" method=\"post\">\n";
// Output view header
echo "<table>\n";
*/
function doDefault($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
function attPre(&$rowdata) {
global $data;
$actions = array(
'alter' => array(
'title' => $lang['stralter'],
- 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&view=".urlencode($_REQUEST['view'])."&",
+ 'url' => "viewproperties.php?action=properties&{$misc->href}&view=".urlencode($_REQUEST['view'])."&",
'vars' => array('column' => 'attname'),
),
);
/**
* Manage views in a database
*
- * $Id: views.php,v 1.60.2.1 2007/05/28 17:21:57 ioguix Exp $
+ * $Id: views.php,v 1.60.2.2 2007/07/09 14:55:22 xzilla Exp $
*/
// Include application functions
function doSelectRows($confirm, $msg = '') {
global $data, $misc, $_no_output;
global $lang;
- global $PHP_SELF;
if ($confirm) {
$misc->printTrail('view');
$attrs = $data->getTableAttributes($_REQUEST['view']);
- echo "<form action=\"$PHP_SELF\" method=\"post\" name=\"selectform\">\n";
+ echo "<form action=\"views.php\" method=\"post\" name=\"selectform\">\n";
if ($attrs->recordCount() > 0) {
// JavaScript for select all feature
echo "<script type=\"text/javascript\">\n";
*/
function doDrop($confirm) {
global $data, $misc;
- global $PHP_SELF, $lang, $_reload_browser;
+ global $lang, $_reload_browser;
if ($confirm) {
$misc->printTrail('view');
echo "<p>", sprintf($lang['strconfdropview'], $misc->printVal($_REQUEST['view'])), "</p>\n";
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"views.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
echo "<input type=\"hidden\" name=\"view\" value=\"", htmlspecialchars($_REQUEST['view']), "\" />\n";
echo $misc->form;
*/
function doSetParamsCreate($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
// Check that they've chosen tables for the view definition
if (!isset($_POST['formTables']) ) doWizardCreate($lang['strviewneedsdef']);
}
asort($arrFields);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"views.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data\">{$lang['strviewname']}</th></tr>";
echo "<tr>\n<td class=\"data1\">\n";
*/
function doWizardCreate($msg = '') {
global $data, $misc;
- global $PHP_SELF, $lang;
+ global $lang;
$tables = $data->getTables(true);
$misc->printTitle($lang['strcreateviewwiz'], 'pg.view.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"views.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data\">{$lang['strtables']}</th></tr>";
echo "<tr>\n<td class=\"data1\">\n";
*/
function doCreate($msg = '') {
global $data, $misc, $conf;
- global $PHP_SELF, $lang;
+ global $lang;
if (!isset($_REQUEST['formView'])) $_REQUEST['formView'] = '';
if (!isset($_REQUEST['formDefinition'])) $_REQUEST['formDefinition'] = 'SELECT ';
$misc->printTitle($lang['strcreateview'], 'pg.view.create');
$misc->printMsg($msg);
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+ echo "<form action=\"views.php\" method=\"post\">\n";
echo "<table width=\"100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n";
echo "\t<td class=\"data1\"><input name=\"formView\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
*/
function doDefault($msg = '') {
global $data, $misc, $conf;
- global $PHP_SELF, $lang;
+ global $lang;
$misc->printTrail('schema');
$misc->printTabs('schema','views');
),
'select' => array(
'title' => $lang['strselect'],
- 'url' => "{$PHP_SELF}?action=confselectrows&{$misc->href}&",
+ 'url' => "views.php?action=confselectrows&{$misc->href}&",
'vars' => array('view' => 'relname'),
),
// Insert is possible if the relevant rule for the view has been created.
// 'insert' => array(
// 'title' => $lang['strinsert'],
-// 'url' => "{$PHP_SELF}?action=confinsertrow&{$misc->href}&",
+// 'url' => "views.php?action=confinsertrow&{$misc->href}&",
// 'vars' => array('view' => 'relname'),
// ),
'drop' => array(
'title' => $lang['strdrop'],
- 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&",
+ 'url' => "views.php?action=confirm_drop&{$misc->href}&",
'vars' => array('view' => 'relname'),
),
);
$misc->printTable($views, $columns, $actions, $lang['strnoviews']);
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}\">{$lang['strcreateview']}</a> |\n";
- echo "<a class=\"navlink\" href=\"$PHP_SELF?action=wiz_create&{$misc->href}\">{$lang['strcreateviewwiz']}</a></p>\n";
+ echo "<p><a class=\"navlink\" href=\"views.php?action=create&{$misc->href}\">{$lang['strcreateview']}</a> |\n";
+ echo "<a class=\"navlink\" href=\"views.php?action=wiz_create&{$misc->href}\">{$lang['strcreateviewwiz']}</a></p>\n";
}