diff options
author | xzilla | 2007-07-12 19:26:22 +0000 |
---|---|---|
committer | xzilla | 2007-07-12 19:26:22 +0000 |
commit | cf4fee1da4c15085c3d0524e3394ab43d17cc95d (patch) | |
tree | e3ddeff1d5a629ea10bfdcfa674f8f02b1bc2b26 | |
parent | 0bc705ea27793e7aecc592c14b491d54d3a033a8 (diff) |
remove PHP_SELF usage from HEAD
-rw-r--r-- | DEVELOPERS | 5 | ||||
-rw-r--r-- | aggregates.php | 29 | ||||
-rw-r--r-- | all_db.php | 26 | ||||
-rw-r--r-- | casts.php | 4 | ||||
-rw-r--r-- | classes/Misc.php | 12 | ||||
-rw-r--r-- | colproperties.php | 8 | ||||
-rw-r--r-- | constraints.php | 31 | ||||
-rw-r--r-- | conversions.php | 4 | ||||
-rwxr-xr-x | database.php | 41 | ||||
-rw-r--r-- | dataexport.php | 4 | ||||
-rw-r--r-- | display.php | 8 | ||||
-rw-r--r-- | domains.php | 44 | ||||
-rw-r--r-- | functions.php | 34 | ||||
-rw-r--r-- | groups.php | 32 | ||||
-rw-r--r-- | indexes.php | 24 | ||||
-rwxr-xr-x | intro.php | 4 | ||||
-rw-r--r-- | languages.php | 4 | ||||
-rw-r--r-- | libraries/lib.inc.php | 5 | ||||
-rwxr-xr-x | login.php | 6 | ||||
-rw-r--r-- | operators.php | 20 | ||||
-rwxr-xr-x | plugin_slony.php | 148 | ||||
-rw-r--r-- | privileges.php | 12 | ||||
-rw-r--r-- | redirect.php | 2 | ||||
-rw-r--r-- | reports.php | 31 | ||||
-rw-r--r-- | roles.php | 38 | ||||
-rw-r--r-- | rules.php | 15 | ||||
-rwxr-xr-x | schemas.php | 26 | ||||
-rw-r--r-- | sequences.php | 42 | ||||
-rw-r--r-- | servers.php | 6 | ||||
-rw-r--r-- | sqledit.php | 6 | ||||
-rw-r--r-- | tables.php | 52 | ||||
-rwxr-xr-x | tablespaces.php | 22 | ||||
-rw-r--r-- | tblproperties.php | 28 | ||||
-rw-r--r-- | triggers.php | 35 | ||||
-rw-r--r-- | types.php | 30 | ||||
-rw-r--r-- | users.php | 30 | ||||
-rwxr-xr-x | viewproperties.php | 20 | ||||
-rw-r--r-- | views.php | 33 |
38 files changed, 454 insertions, 467 deletions
@@ -75,7 +75,10 @@ odd characters in user input. Examine existing functions that do similar 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 diff --git a/aggregates.php b/aggregates.php index 5a4202dd..26df99a6 100644 --- a/aggregates.php +++ b/aggregates.php @@ -3,7 +3,7 @@ /** * Manage aggregates in a database * - * $Id: aggregates.php,v 1.21 2007/05/28 17:30:32 ioguix Exp $ + * $Id: aggregates.php,v 1.22 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -53,7 +53,7 @@ */ function doCreate($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if (!isset($_REQUEST['name'])) $_REQUEST['name'] = ''; if (!isset($_REQUEST['basetype'])) $_REQUEST['basetype'] = ''; @@ -68,7 +68,7 @@ $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=\"", @@ -132,13 +132,13 @@ */ function doAlter($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('aggregate'); $misc->printTitle($lang['stralter'], '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 @@ -177,7 +177,6 @@ function doDrop($confirm) { global $data, $misc; global $lang, $_reload_browser; - global $PHP_SELF; if ($confirm) { $misc->printTrail('aggregate'); @@ -185,7 +184,7 @@ 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"; // Show cascade drop option if supportd if ($data->hasDropBehavior()) { echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>\n"; @@ -214,7 +213,7 @@ */ function doProperties($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('aggregate'); $misc->printTitle($lang['strproperties'],'pg.aggregate'); @@ -247,12 +246,12 @@ } 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=\"?{$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=\"?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=\"?action=confirm_drop&{$misc->href}&aggrname=", urlencode($_REQUEST['aggrname']), "&aggrtype=", urlencode($_REQUEST['aggrtype']), "\">{$lang['strdrop']}</a></p>\n"; } @@ -262,7 +261,7 @@ */ function doDefault($msg = '') { global $data, $conf, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('schema'); $misc->printTabs('schema', 'aggregates'); @@ -301,12 +300,12 @@ $actions = array( 'alter' => array( 'title' => $lang['stralter'], - 'url' => "{$PHP_SELF}?action=alter&{$misc->href}&", + 'url' => "?action=alter&{$misc->href}&", 'vars' => array('aggrname' => 'proname', 'aggrtype' => 'proargtypes'), ), 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", + 'url' => "?action=confirm_drop&{$misc->href}&", 'vars' => array('aggrname' => 'proname', 'aggrtype' => 'proargtypes'), ) ); @@ -314,7 +313,7 @@ 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=\"?action=create&{$misc->href}\">{$lang['strcreateaggregate']}</a></p>\n"; } /** @@ -3,7 +3,7 @@ /** * Manage databases within a server * - * $Id: all_db.php,v 1.53 2007/05/28 17:30:32 ioguix Exp $ + * $Id: all_db.php,v 1.54 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -17,13 +17,13 @@ */ 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\">"; @@ -83,7 +83,7 @@ */ function doDrop($confirm) { global $data, $misc; - global $PHP_SELF, $lang, $_reload_drop_database; + global $lang, $_reload_drop_database; if (empty($_REQUEST['dropdatabase']) && empty($_REQUEST['ma'])) { doDefault($lang['strspecifydatabasetodrop']); @@ -95,7 +95,7 @@ $misc->printTrail('database'); $misc->printTitle($lang['strdrop'], 'pg.database.drop'); - echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; + echo "<form action=\"all_db.php\" method=\"post\">\n"; //If multi drop if (isset($_REQUEST['ma'])) { @@ -150,7 +150,7 @@ */ function doCreate($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('server'); $misc->printTitle($lang['strcreatedatabase'], 'pg.database.create'); @@ -170,7 +170,7 @@ // 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=\"", @@ -249,7 +249,7 @@ */ function doExport($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('server'); $misc->printTabs('server','export'); @@ -298,7 +298,7 @@ */ function doDefault($msg = '') { global $data, $conf, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('server'); $misc->printTabs('server','databases'); @@ -308,7 +308,7 @@ $multiactions = array( 'keycols' => array('database' => 'datname'), - 'url' => "{$PHP_SELF}", + 'url' => "", 'actions' => array( 'drop' => array( 'action' => 'confirm_drop', @@ -353,7 +353,7 @@ $actions = array( 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&subject=database&{$misc->href}&", + 'url' => "?action=confirm_drop&subject=database&{$misc->href}&", 'vars' => array('dropdatabase' => 'datname'), ), 'privileges' => array( @@ -365,7 +365,7 @@ if ($data->hasAlterDatabase() ) { $actions['alter'] = array( 'title' => $lang['stralter'], - 'url' => "{$PHP_SELF}?action=confirm_alter&subject=database&{$misc->href}&", + 'url' => "?action=confirm_alter&subject=database&{$misc->href}&", 'vars' => array('alterdatabase' => 'datname') ); } @@ -376,7 +376,7 @@ $misc->printTable($databases, $columns, $actions, $lang['strnodatabases'], null, $multiactions); - echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}\">{$lang['strcreatedatabase']}</a></p>\n"; + echo "<p><a class=\"navlink\" href=\"?action=create&{$misc->href}\">{$lang['strcreatedatabase']}</a></p>\n"; } @@ -3,7 +3,7 @@ /** * Manage casts in a database * - * $Id: casts.php,v 1.13 2007/05/28 17:30:32 ioguix Exp $ + * $Id: casts.php,v 1.14 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -17,7 +17,7 @@ */ function doDefault($msg = '') { global $data, $misc, $database; - global $PHP_SELF, $lang; + global $lang; function renderCastContext($val) { global $lang; diff --git a/classes/Misc.php b/classes/Misc.php index fab3b7ee..a3bcf0ad 100644 --- a/classes/Misc.php +++ b/classes/Misc.php @@ -2,7 +2,7 @@ /** * Class to hold various commonly used functions * - * $Id: Misc.php,v 1.153 2007/06/05 15:50:04 xzilla Exp $ + * $Id: Misc.php,v 1.154 2007/07/12 19:26:22 xzilla Exp $ */ class Misc { @@ -1531,14 +1531,15 @@ * $actions = array( * action_id => array( * 'title' => Action heading, - * 'url' => Static part of URL, + * 'url' => Static part of URL. Often we rely + * relative urls, usually '', or just a query string, * 'vars' => Associative array of (URL variable => field name), * ), ... * ); * @param $multiactions Actions to be provided to a series of items defined by checkboxes * $multiactions = array( * 'keycols' => array('table' => 'relname'), - * 'url' => "{$PHP_SELF}", + * 'url' => "", (See $actions['url']) * 'actions' => array( * 'empty' => array( * 'action' => 'confirm_empty', @@ -1560,6 +1561,9 @@ * It can return an array of actions specific to the row, * or if nothing is returned then the standard actions are used. * (see tblproperties.php and constraints.php for examples) + * The function must not must not store urls because + * they are relative and won't work out of context. + */ function printTable(&$tabledata, &$columns, &$actions, $nodata = null, $pre_fn = null, $multiactions = null) { global $data, $conf, $misc, $lang; @@ -1637,6 +1641,7 @@ } else { echo "<td class=\"opbutton{$id}\">"; echo "<a href=\"{$action['url']}"; + if ($action['url'] === '') echo '?'; $misc->printUrlVars($action['vars'], $tabledata->fields); echo "\">{$action['title']}</a></td>\n"; } @@ -1647,6 +1652,7 @@ if (array_key_exists($column['field'], $tabledata->fields)) { if (isset($column['url'])) { echo "<a href=\"{$column['url']}"; + if ($column['url'] === '') echo '?'; $misc->printUrlVars($column['vars'], $tabledata->fields); echo "\">"; } diff --git a/colproperties.php b/colproperties.php index 94f044ee..91034c53 100644 --- a/colproperties.php +++ b/colproperties.php @@ -22,7 +22,7 @@ */ function doProperties($msg = '') { global $data, $misc, $_reload_browser; - global $PHP_SELF, $lang; + global $lang; if (!isset($_REQUEST['stage'])) $_REQUEST['stage'] = 1; @@ -33,7 +33,7 @@ $misc->printMsg($msg); echo "<script src=\"tables.js\" type=\"text/javascript\"></script>"; - echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; + echo "<form action=\"colproperties.php\" method=\"post\">\n"; // Output table header echo "<table>\n"; @@ -183,7 +183,7 @@ */ function doDefault($msg = '', $isTable = true) { global $data, $conf, $misc, $tableName; - global $PHP_SELF, $lang; + global $lang; function attPre(&$rowdata) { global $data; @@ -247,7 +247,7 @@ 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=\"?action=properties&{$misc->href}&table=", urlencode($_REQUEST['table']), "&column=", urlencode($_REQUEST['column']) . "\">{$lang['stralter']}</a></li>\n"; /* Delete link */ diff --git a/constraints.php b/constraints.php index e5b5babe..de443bd2 100644 --- a/constraints.php +++ b/constraints.php @@ -3,7 +3,7 @@ /** * List constraints on a table * - * $Id: constraints.php,v 1.48 2007/07/10 09:04:20 soranzo Exp $ + * $Id: constraints.php,v 1.49 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -16,7 +16,7 @@ * Confirm and then actually add a FOREIGN KEY constraint */ function addForeignKey($stage, $msg = '') { - global $PHP_SELF, $data, $misc; + global $data, $misc; global $lang; if (!isset($_POST['name'])) $_POST['name'] = ''; @@ -73,7 +73,7 @@ $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>"; @@ -176,7 +176,7 @@ $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"; @@ -218,7 +218,7 @@ * Confirm and then actually add a PRIMARY KEY or UNIQUE constraint */ function addPrimaryOrUniqueKey($type, $confirm, $msg = '') { - global $PHP_SELF, $data, $misc; + global $data, $misc; global $lang; if (!isset($_POST['name'])) $_POST['name'] = ''; @@ -269,7 +269,7 @@ $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>"; @@ -344,7 +344,7 @@ * Confirm and then actually add a CHECK constraint */ function addCheck($confirm, $msg = '') { - global $PHP_SELF, $data, $misc; + global $data, $misc; global $lang; if (!isset($_POST['name'])) $_POST['name'] = ''; @@ -355,7 +355,7 @@ $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"; @@ -394,7 +394,7 @@ */ function doDrop($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('constraint'); @@ -403,7 +403,7 @@ 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"; @@ -431,7 +431,6 @@ */ function doDefault($msg = '') { global $data, $misc; - global $PHP_SELF; global $lang; function cnPre(&$rowdata) { @@ -468,7 +467,7 @@ $actions = array( 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'url' => "?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", 'vars' => array('constraint' => 'conname', 'type' => 'contype'), ), ); @@ -477,13 +476,13 @@ $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=\"?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=\"?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=\"?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=\"?action=add_foreign_key&{$misc->href}&table=", urlencode($_REQUEST['table']), "\">{$lang['straddfk']}</a></p>\n"; } diff --git a/conversions.php b/conversions.php index 7c22dd27..ea15a01d 100644 --- a/conversions.php +++ b/conversions.php @@ -3,7 +3,7 @@ /** * Manage conversions in a database * - * $Id: conversions.php,v 1.13 2007/05/28 17:30:32 ioguix Exp $ + * $Id: conversions.php,v 1.14 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -17,7 +17,7 @@ */ function doDefault($msg = '') { global $data, $conf, $misc, $database; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('schema'); $misc->printTabs('schema', 'conversions'); diff --git a/database.php b/database.php index 95ef3bb6..d0c3cd99 100755 --- a/database.php +++ b/database.php @@ -3,7 +3,7 @@ /** * Manage schemas within a database * - * $Id: database.php,v 1.98 2007/07/10 09:04:21 soranzo Exp $ + * $Id: database.php,v 1.99 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -33,7 +33,7 @@ * Searches for a named database object */ function doFind($confirm = true, $msg = '') { - global $PHP_SELF, $data, $misc; + global $data, $misc; global $lang, $conf; if (!isset($_GET['term'])) $_GET['term'] = ''; @@ -43,7 +43,7 @@ $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 @@ -329,7 +329,7 @@ */ function doExport($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('database'); $misc->printTabs('database','export'); @@ -381,7 +381,7 @@ * 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 @@ -410,7 +410,7 @@ * are running. */ function doProcesses($msg = '') { - global $PHP_SELF, $data, $misc; + global $data, $misc; global $lang; $misc->printTrail('database'); @@ -475,7 +475,7 @@ $actions = array( 'cancel' => array( 'title' => $lang['strcancel'], - 'url' => "{$PHP_SELF}?action=signal&signal=CANCEL&{$misc->href}&", + 'url' => "?action=signal&signal=CANCEL&{$misc->href}&", 'vars' => array('procpid' => 'procpid') ) ); @@ -492,7 +492,7 @@ * 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 @@ -538,7 +538,7 @@ * Allow database administration and tuning tasks */ function doAdmin($action = '', $msg = '') { - global $PHP_SELF, $data, $misc; + global $data, $misc; global $lang; switch ($action) { case 'vacuum': @@ -589,7 +589,7 @@ // Vacuum echo "<tr>\n"; echo "<td class=\"data1\" style=\"text-align: center; vertical-align: bottom\">\n"; - echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n"; + echo "<form action=\"database.php\" method=\"post\">\n"; echo "<p><input type=\"checkbox\" id=\"vacuum_analyze\" name=\"vacuum_analyze\" /><label for=\"vacuum_analyze\">{$lang['stranalyze']}</label>\n"; if ($data->hasFullVacuum()) { echo "<br /><input type=\"checkbox\" id=\"vacuum_full\" name=\"vacuum_full\" /><label for=\"vacuum_full\">{$lang['strfull']}</label>\n"; @@ -604,7 +604,7 @@ // Analyze if ($data->hasAnalyze()) { echo "<td class=\"data1\" style=\"text-align: center; vertical-align: bottom\">\n"; - echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n"; + echo "<form action=\"database.php\" method=\"post\">\n"; echo "<p><input type=\"hidden\" name=\"action\" value=\"analyze\" />\n"; echo $misc->form; echo "<input type=\"submit\" value=\"{$lang['stranalyze']}\" /></p>\n"; @@ -615,7 +615,7 @@ // Recluster if ($data->hasRecluster()){ echo "<td class=\"data1\" style=\"text-align: center; vertical-align: bottom\">\n"; - echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n"; + echo "<form action=\"database.php\" method=\"post\">\n"; echo "<p><input type=\"hidden\" name=\"action\" value=\"recluster\" />\n"; echo $misc->form; echo "<input type=\"submit\" value=\"{$lang['strclusterindex']}\" /></p>\n"; @@ -625,7 +625,7 @@ // Reindex echo "<td class=\"data1\" style=\"text-align: center; vertical-align: bottom\">\n"; - echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n"; + echo "<form action=\"database.php\" method=\"post\">\n"; echo "<p><input type=\"checkbox\" id=\"reindex_force\" name=\"reindex_force\" /><label for=\"reindex_force\">{$lang['strforce']}</label><br />\n"; echo "<input type=\"hidden\" name=\"action\" value=\"reindex\" />\n"; echo $misc->form; @@ -688,12 +688,12 @@ $actions = array( 'edit' => array( 'title' => $lang['stredit'], - 'url' => "{$PHP_SELF}?action=editautovac&schema=pg_catalog&{$misc->href}&", + 'url' => "?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' => "?action=delautovac&{$misc->href}&", 'vars' => array('key[vacrelid]' => 'vacrelid') ) ); @@ -711,7 +711,6 @@ function doEditAutovacuum($confirm, $msg = '') { global $data, $misc, $conf; global $lang; - global $PHP_SELF; $key = $_REQUEST['key']; @@ -723,7 +722,7 @@ $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) { @@ -811,7 +810,7 @@ * Delete rows from the autovacuum table */ function doDelAutovacuum($confirm) { - global $PHP_SELF, $data, $misc; + global $data, $misc; global $lang; if ($confirm) { @@ -821,7 +820,7 @@ 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"; @@ -845,7 +844,7 @@ * 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'] = ''; @@ -884,7 +883,7 @@ } function doTree() { - global $misc, $data, $lang, $PHP_SELF, $slony; + global $misc, $data, $lang, $slony; $reqvars = $misc->getRequestVars('database'); diff --git a/dataexport.php b/dataexport.php index 2afda3bd..acfd082f 100644 --- a/dataexport.php +++ b/dataexport.php @@ -4,7 +4,7 @@ * 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.25 2007/05/28 19:21:29 soranzo Exp $ + * $Id: dataexport.php,v 1.26 2007/07/12 19:26:22 xzilla Exp $ */ $extensions = array( @@ -307,7 +307,7 @@ $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 diff --git a/display.php b/display.php index a793d752..aa9a5443 100644 --- a/display.php +++ b/display.php @@ -9,7 +9,7 @@ * @param $return_desc The return link name * @param $page The current page * - * $Id: display.php,v 1.62 2007/05/28 17:30:32 ioguix Exp $ + * $Id: display.php,v 1.63 2007/07/12 19:26:22 xzilla Exp $ */ // Prevent timeouts on large exports (non-safe mode only) @@ -28,7 +28,6 @@ function doEditRow($confirm, $msg = '') { global $data, $misc, $conf; global $lang; - global $PHP_SELF; if (is_array($_REQUEST['key'])) $key = $_REQUEST['key']; @@ -62,7 +61,7 @@ $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) { @@ -205,7 +204,6 @@ function doDelRow($confirm) { global $data, $misc; global $lang; - global $PHP_SELF; if ($confirm) { $misc->printTrail($_REQUEST['subject']); @@ -213,7 +211,7 @@ 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'])) diff --git a/domains.php b/domains.php index 719c2ba5..d0f900ac 100644 --- a/domains.php +++ b/domains.php @@ -3,7 +3,7 @@ /** * Manage domains in a database * - * $Id: domains.php,v 1.30 2007/07/10 09:04:21 soranzo Exp $ + * $Id: domains.php,v 1.31 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -31,7 +31,7 @@ */ function doAlter($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('domain'); $misc->printTitle($lang['stralter'],'pg.domain.alter'); @@ -52,7 +52,7 @@ } // 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\" style=\"width: 70px\">{$lang['strname']}</th>\n"; echo "<td class=\"data1\">", $misc->printVal($domaindata->fields['domname']), "</td></tr>\n"; @@ -87,7 +87,7 @@ * Confirm and then actually add a CHECK constraint */ function addCheck($confirm, $msg = '') { - global $PHP_SELF, $data, $misc; + global $data, $misc; global $lang; if (!isset($_POST['name'])) $_POST['name'] = ''; @@ -98,7 +98,7 @@ $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"; @@ -137,7 +137,7 @@ */ function doDropConstraint($confirm, $msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('domain'); @@ -146,7 +146,7 @@ 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"; @@ -174,7 +174,7 @@ */ function doProperties($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('domain'); $misc->printTitle($lang['strproperties'],'pg.domain'); @@ -218,7 +218,7 @@ echo $misc->printVal($domaincons->fields['consrc']); echo "</td>"; echo "<td class=\"opbutton{$id}\">"; - echo "<a href=\"$PHP_SELF?action=confirm_drop_con&{$misc->href}&constraint=", urlencode($domaincons->fields['conname']), + echo "<a href=\"?action=confirm_drop_con&{$misc->href}&constraint=", urlencode($domaincons->fields['conname']), "&domain=", urlencode($_REQUEST['domain']), "&type=", urlencode($domaincons->fields['contype']), "\">{$lang['strdrop']}</a></td></tr>\n"; $domaincons->moveNext(); @@ -231,11 +231,11 @@ } 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=\"?{$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=\"?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=\"?action=alter&{$misc->href}&domain=", urlencode($_REQUEST['domain']), "\">{$lang['stralter']}</a>\n"; } echo "</p>\n"; @@ -246,14 +246,14 @@ */ 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"; // Show cascade drop option if supportd if ($data->hasDropBehavior()) { echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /><label for=\"cascade\">{$lang['strcascade']}</label></p>\n"; @@ -280,7 +280,7 @@ */ function doCreate($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if (!isset($_POST['domname'])) $_POST['domname'] = ''; if (!isset($_POST['domtype'])) $_POST['domtype'] = ''; @@ -295,7 +295,7 @@ $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\" style=\"width: 70px\">{$lang['strname']}</th>\n"; echo "<td class=\"data1\"><input name=\"domname\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", @@ -365,7 +365,7 @@ */ function doDefault($msg = '') { global $data, $conf, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('schema'); $misc->printTabs('schema','domains'); @@ -377,7 +377,7 @@ 'domain' => array( 'title' => $lang['strdomain'], 'field' => 'domname', - 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&", + 'url' => "?action=properties&{$misc->href}&", 'vars' => array('domain' => 'domname'), ), 'type' => array( @@ -410,19 +410,19 @@ $actions = array( 'alter' => array( 'title' => $lang['stralter'], - 'url' => "{$PHP_SELF}?action=alter&{$misc->href}&", + 'url' => "?action=alter&{$misc->href}&", 'vars' => array('domain' => 'domname'), ), 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", + 'url' => "?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=\"?action=create&{$misc->href}\">{$lang['strcreatedomain']}</a></p>\n"; } @@ -430,7 +430,7 @@ * Generate XML for the browser tree. */ function doTree() { - global $misc, $data, $PHP_SELF; + global $misc, $data; $domains = $data->getDomains(); diff --git a/functions.php b/functions.php index 67f5334a..48c6b417 100644 --- a/functions.php +++ b/functions.php @@ -3,7 +3,7 @@ /** * Manage functions in a database * - * $Id: functions.php,v 1.64 2007/05/28 17:30:32 ioguix Exp $ + * $Id: functions.php,v 1.65 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -44,7 +44,7 @@ */ function doEdit($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('function'); $misc->printTitle($lang['stralter'],'pg.function.alter'); @@ -83,7 +83,7 @@ } $func_full = $fndata->fields['proname'] . "(". $fndata->fields['proarguments'] .")"; - echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; + echo "<form action=\"functions.php\" method=\"post\">\n"; echo "<table style=\"width: 90%\">\n"; echo "<tr>\n"; echo "<th class=\"data required\">{$lang['strfunction']}</th>\n"; @@ -171,7 +171,7 @@ */ function doProperties($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('function'); $misc->printTitle($lang['strproperties'],'pg.function'); @@ -256,10 +256,10 @@ } 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=\"?{$misc->href}\">{$lang['strshowallfunctions']}</a> |\n"; + echo "<a class=\"navlink\" href=\"?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=\"?action=confirm_drop&{$misc->href}&function=", urlencode($func_full), "&function_oid=", $_REQUEST['function_oid'], "\">{$lang['strdrop']}</a>\n"; } @@ -268,7 +268,7 @@ */ function doDrop($confirm) { global $data, $misc; - global $PHP_SELF, $lang, $_reload_browser; + global $lang, $_reload_browser; if ($confirm) { $misc->printTrail('schema'); @@ -276,7 +276,7 @@ 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"; @@ -307,7 +307,7 @@ */ function doCreate($msg = '',$szJS="") { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('schema'); if (!isset($_POST['formFunction'])) $_POST['formFunction'] = ''; @@ -449,7 +449,7 @@ //]]> </script> "; - echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; + echo "<form action=\"functions.php\" method=\"post\">\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"; @@ -618,7 +618,7 @@ */ function doDefault($msg = '') { global $data, $conf, $misc, $func; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('schema'); $misc->printTabs('schema','functions'); @@ -659,12 +659,12 @@ $actions = array( 'alter' => array( 'title' => $lang['stralter'], - 'url' => "{$PHP_SELF}?action=edit&{$misc->href}&", + 'url' => "?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' => "?action=confirm_drop&{$misc->href}&", 'vars' => array('function' => 'proproto', 'function_oid' => 'prooid'), ), 'privileges' => array( @@ -680,9 +680,9 @@ $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=\"?action=create&{$misc->href}\">{$lang['strcreateplfunction']}</a> | "; + echo "<a class=\"navlink\" href=\"?action=create&language=internal&{$misc->href}\">{$lang['strcreateinternalfunction']}</a> | "; + echo "<a class=\"navlink\" href=\"?action=create&language=C&{$misc->href}\">{$lang['strcreatecfunction']}</a></p>\n"; } /** @@ -3,7 +3,7 @@ /** * Manage groups in a database cluster * - * $Id: groups.php,v 1.24 2007/05/28 17:30:32 ioguix Exp $ + * $Id: groups.php,v 1.25 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -17,7 +17,7 @@ */ function doAddMember() { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $status = $data->addGroupMember($_REQUEST['group'], $_REQUEST['user']); if ($status == 0) @@ -31,7 +31,7 @@ */ function doDropMember($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('group'); @@ -39,7 +39,7 @@ 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"; @@ -62,7 +62,7 @@ */ function doProperties($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if (!isset($_POST['user'])) $_POST['user'] = ''; @@ -80,7 +80,7 @@ while (!$groupdata->EOF) { $id = (($i % 2) == 0 ? '1' : '2'); echo "<tr><td class=\"data{$id}\">", $misc->printVal($groupdata->fields['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=\"?action=confirm_drop_member&{$misc->href}&group=", urlencode($_REQUEST['group']), "&user=", urlencode($groupdata->fields['usename']), "\">{$lang['strdrop']}</a></td>\n"; echo "</tr>\n"; $groupdata->moveNext(); @@ -90,7 +90,7 @@ 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->fields['usename']); @@ -105,7 +105,7 @@ 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=\"?{$misc->href}\">{$lang['strshowallgroups']}</a></p>\n"; } /** @@ -113,7 +113,7 @@ */ function doDrop($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('group'); @@ -121,7 +121,7 @@ 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"; @@ -143,7 +143,7 @@ */ 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(); @@ -155,7 +155,7 @@ $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"; @@ -207,7 +207,7 @@ */ function doDefault($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('server'); $misc->printTabs('server','groups'); @@ -219,7 +219,7 @@ 'group' => array( 'title' => $lang['strgroup'], 'field' => 'groname', - 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&", + 'url' => "?action=properties&{$misc->href}&", 'vars' => array('group' => 'groname'), ), 'actions' => array( @@ -230,14 +230,14 @@ $actions = array( 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", + 'url' => "?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=\"?action=create&{$misc->href}\">{$lang['strcreategroup']}</a></p>\n"; } diff --git a/indexes.php b/indexes.php index d17496cb..ae00bcf5 100644 --- a/indexes.php +++ b/indexes.php @@ -3,7 +3,7 @@ /** * List indexes on a table * - * $Id: indexes.php,v 1.41 2007/05/28 17:30:32 ioguix Exp $ + * $Id: indexes.php,v 1.42 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -17,7 +17,7 @@ */ function doClusterIndex($confirm) { global $data, $misc, $action; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { // Default analyze to on @@ -28,7 +28,7 @@ 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"; @@ -70,7 +70,7 @@ */ 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; @@ -107,7 +107,7 @@ $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"; @@ -202,7 +202,7 @@ */ function doDropIndex($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('index'); @@ -210,7 +210,7 @@ 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"; @@ -235,7 +235,7 @@ function doDefault($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; function indPre(&$rowdata, $actions) { global $data, $lang; @@ -288,17 +288,17 @@ $actions = array( 'cluster' => array( 'title' => $lang['strclusterindex'], - 'url' => "{$PHP_SELF}?action=confirm_cluster_index&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'url' => "?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' => "?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' => "?action=confirm_drop_index&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", 'vars' => array('index' => 'indname'), ), ); @@ -307,7 +307,7 @@ $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=\"?action=create_index&{$misc->href}&table=", urlencode($_REQUEST['table']), "\">{$lang['strcreateindex']}</a></p>\n"; } function doTree() { @@ -3,7 +3,7 @@ /** * Intro screen * - * $Id: intro.php,v 1.18 2007/05/28 19:21:29 soranzo Exp $ + * $Id: intro.php,v 1.19 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions (no db conn) @@ -19,7 +19,7 @@ <h1><?php echo "$appName $appVersion (PHP ". phpversion() .')' ?></h1> -<form method="get" action="<?php echo $PHP_SELF; ?>"> +<form method="get" action="intro.php"> <p><select name="language" onchange="this.form.submit()"> <?php $language = isset($_SESSION['webdbLanguage']) ? $_SESSION['webdbLanguage'] : 'english'; diff --git a/languages.php b/languages.php index d5322d18..9ec051cb 100644 --- a/languages.php +++ b/languages.php @@ -3,7 +3,7 @@ /** * Manage languages in a database * - * $Id: languages.php,v 1.11 2007/05/28 17:30:32 ioguix Exp $ + * $Id: languages.php,v 1.12 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -17,7 +17,7 @@ */ function doDefault($msg = '') { global $data, $misc, $database; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('database'); $misc->printTabs('database','languages'); diff --git a/libraries/lib.inc.php b/libraries/lib.inc.php index c20a97b7..5d90cab6 100644 --- a/libraries/lib.inc.php +++ b/libraries/lib.inc.php @@ -3,7 +3,7 @@ /** * Function library read in upon startup * - * $Id: lib.inc.php,v 1.117 2007/05/31 21:13:24 xzilla Exp $ + * $Id: lib.inc.php,v 1.118 2007/07/12 19:26:23 xzilla Exp $ */ include_once('./libraries/decorator.inc.php'); @@ -221,7 +221,4 @@ } } - // Prevent XSS attacks - $PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, $lang['appcharset']); - ?> @@ -3,7 +3,7 @@ /** * Login screen * - * $Id: login.php,v 1.36 2007/06/06 08:53:47 ioguix Exp $ + * $Id: login.php,v 1.37 2007/07/12 19:26:22 xzilla Exp $ */ global $conf; @@ -11,8 +11,6 @@ // 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'); @@ -26,7 +24,7 @@ $md5_server = md5($_REQUEST['server']); ?> -<form action="<?php echo $PHP_SELF ?>" method="post" name="login_form"> +<form action="redirect.php" method="post" name="login_form"> <?php if (!empty($_POST)) $vars =& $_POST; else $vars =& $_GET; diff --git a/operators.php b/operators.php index 918c9fee..61b1864e 100644 --- a/operators.php +++ b/operators.php @@ -3,7 +3,7 @@ /** * Manage operators in a database * - * $Id: operators.php,v 1.26 2007/05/28 17:30:32 ioguix Exp $ + * $Id: operators.php,v 1.27 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -17,7 +17,7 @@ */ function doProperties($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('operator'); $misc->printTitle($lang['strproperties'],'pg.operator'); @@ -56,7 +56,7 @@ echo "<td class=\"data1\">", $misc->printVal($oprdata->fields['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=\"?{$misc->href}\">{$lang['strshowalloperators']}</a></p>\n"; } else doDefault($lang['strinvalidparam']); @@ -67,7 +67,7 @@ */ function doDrop($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('operator'); @@ -75,7 +75,7 @@ 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"; // Show cascade drop option if supportd if ($data->hasDropBehavior()) { echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>\n"; @@ -103,7 +103,7 @@ */ function doDefault($msg = '') { global $data, $conf, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('schema'); $misc->printTabs('schema','operators'); @@ -115,7 +115,7 @@ 'operator' => array( 'title' => $lang['stroperator'], 'field' => 'oprname', - 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&", + 'url' => "?action=properties&{$misc->href}&", 'vars' => array('operator' => 'oprname', 'operator_oid' => 'oid'), ), 'leftarg' => array( @@ -142,21 +142,21 @@ $actions = array( 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", + 'url' => "?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=\"?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(); diff --git a/plugin_slony.php b/plugin_slony.php index 1993bcc5..ffb2c754 100755 --- a/plugin_slony.php +++ b/plugin_slony.php @@ -3,7 +3,7 @@ /** * Slony database tab plugin * - * $Id: plugin_slony.php,v 1.19 2007/05/28 17:30:32 ioguix Exp $ + * $Id: plugin_slony.php,v 1.20 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -31,7 +31,7 @@ * @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)) @@ -421,7 +421,7 @@ * Display the slony clusters (we only support one) */ function doClusters($msg = '') { - global $PHP_SELF, $slony, $misc; + global $slony, $misc; global $lang; $misc->printTrail('database'); @@ -457,7 +457,7 @@ $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=\"?action=create_cluster&{$misc->href}\">{$lang['strinitcluster']}</a></p>\n"; } } @@ -467,7 +467,7 @@ * 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'); @@ -501,7 +501,7 @@ */ function doCreateCluster($confirm, $msg = '') { global $data, $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { if (!isset($_POST['cluster'])) $_POST['cluster'] = ''; @@ -512,7 +512,7 @@ $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 "<table style=\"width: 100%\">\n"; echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strcluster']}</th>\n"; echo "\t\t<td class=\"data1\"><input name=\"cluster\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", @@ -555,7 +555,7 @@ */ function doDropCluster($confirm) { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('slony_cluster'); @@ -563,7 +563,7 @@ 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"; @@ -585,7 +585,7 @@ * List all the nodes */ function doNodes($msg = '') { - global $PHP_SELF, $slony, $misc; + global $slony, $misc; global $lang; $misc->printTrail('slony_cluster'); @@ -625,14 +625,14 @@ $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=\"?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'); @@ -660,7 +660,7 @@ } 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=\"?action=confirm_drop_node&{$misc->href}&no_id={$_REQUEST['no_id']}\">{$lang['strdrop']}</a></p>\n"; } /** @@ -668,7 +668,7 @@ */ function doCreateNode($confirm, $msg = '') { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { if (!isset($_POST['nodeid'])) $_POST['nodeid'] = ''; @@ -678,7 +678,7 @@ $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 style=\"width: 100%\">\n"; echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strid']}</th>\n"; @@ -711,7 +711,7 @@ */ function doDropNode($confirm) { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('slony_cluster'); @@ -719,7 +719,7 @@ 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; @@ -742,7 +742,7 @@ * List all the paths */ function doPaths($msg = '') { - global $PHP_SELF, $slony, $misc; + global $slony, $misc; global $lang; $misc->printTrail('database'); @@ -776,14 +776,14 @@ $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=\"?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'); @@ -811,7 +811,7 @@ } 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=\"?action=confirm_drop_path&{$misc->href}&no_id={$_REQUEST['no_id']}&path_id={$_REQUEST['path_id']}\">{$lang['strdrop']}</a></p>\n"; } /** @@ -819,7 +819,7 @@ */ function doCreatePath($confirm, $msg = '') { global $data, $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { if (!isset($_POST['pathserver'])) $_POST['pathserver'] = ''; @@ -833,7 +833,7 @@ $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 style=\"width: 100%\">\n"; echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strnodename']}</th>\n"; @@ -884,7 +884,7 @@ */ function doDropPath($confirm) { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('slony_cluster'); @@ -892,7 +892,7 @@ 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"; @@ -916,7 +916,7 @@ * List all the listens */ function doListens($msg = '') { - global $PHP_SELF, $slony, $misc; + global $slony, $misc; global $lang; $misc->printTrail('database'); @@ -951,14 +951,14 @@ $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=\"?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'); @@ -986,7 +986,7 @@ } 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->fields['li_origin']}\">{$lang['strdrop']}</a></p>\n"; + echo "<p><a class=\"navlink\" href=\"?action=confirm_drop_listen&{$misc->href}&no_id={$_REQUEST['no_id']}&listen_id={$_REQUEST['listen_id']}&origin_id={$listen->fields['li_origin']}\">{$lang['strdrop']}</a></p>\n"; } /** @@ -994,7 +994,7 @@ */ function doCreateListen($confirm, $msg = '') { global $data, $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { if (!isset($_POST['listenorigin'])) $_POST['listenorigin'] = ''; @@ -1007,7 +1007,7 @@ $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 style=\"width: 100%\">\n"; echo "\t<tr>\n\t\t<th class=\"data left required\">Origin</th>\n"; @@ -1051,7 +1051,7 @@ */ function doDropListen($confirm) { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('slony_cluster'); @@ -1059,7 +1059,7 @@ 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"; @@ -1084,7 +1084,7 @@ * List all the replication sets */ function doReplicationSets($msg = '') { - global $PHP_SELF, $slony, $misc; + global $slony, $misc; global $lang; $misc->printTrail('slony_cluster'); @@ -1144,14 +1144,14 @@ $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=\"?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'); @@ -1185,12 +1185,12 @@ } 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=\"?action=confirm_drop_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strdrop']}</a> |\n"; + echo "<a class=\"navlink\" href=\"?action=confirm_lock_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strlock']}</a> |\n"; + echo "<a class=\"navlink\" href=\"?action=confirm_unlock_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strunlock']}</a> |\n"; + echo "<a class=\"navlink\" href=\"?action=merge_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strmerge']}</a> |\n"; + echo "<a class=\"navlink\" href=\"?action=move_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strmove']}</a> |\n"; + echo "<a class=\"navlink\" href=\"?action=execute_set&{$misc->href}&set_id={$_REQUEST['set_id']}\">{$lang['strexecute']}</a></p>\n"; } /** @@ -1198,7 +1198,7 @@ */ function doCreateReplicationSet($confirm, $msg = '') { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { if (!isset($_POST['setid'])) $_POST['setid'] = ''; @@ -1208,7 +1208,7 @@ $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 style=\"width: 100%\">\n"; echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strid']}</th>\n"; @@ -1241,7 +1241,7 @@ */ function doDropReplicationSet($confirm) { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('slony_cluster'); @@ -1249,7 +1249,7 @@ 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; @@ -1271,7 +1271,7 @@ */ function doLockReplicationSet($confirm) { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('slony_cluster'); @@ -1279,7 +1279,7 @@ 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; @@ -1301,7 +1301,7 @@ */ function doUnlockReplicationSet($confirm) { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('slony_cluster'); @@ -1309,7 +1309,7 @@ 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; @@ -1331,7 +1331,7 @@ */ function doMergeReplicationSet($confirm, $msg = '') { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { if (!isset($_POST['target'])) $_POST['target'] = ''; @@ -1342,7 +1342,7 @@ $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"; @@ -1378,7 +1378,7 @@ */ function doMoveReplicationSet($confirm, $msg = '') { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { if (!isset($_POST['new_origin'])) $_POST['new_origin'] = ''; @@ -1390,7 +1390,7 @@ $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"; @@ -1427,7 +1427,7 @@ */ function doExecuteReplicationSet($confirm, $msg = '') { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { if (!isset($_POST['script'])) $_POST['script'] = ''; @@ -1438,7 +1438,7 @@ $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 @@ -1484,7 +1484,7 @@ * 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'); @@ -1538,7 +1538,7 @@ $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=\"?action=add_table&stage=1&set_id={$_REQUEST['set_id']}&{$misc->href}\">{$lang['straddtable']}</a></p>\n"; } /** @@ -1547,7 +1547,7 @@ */ function doAddTable($stage, $msg = '') { global $data, $slony, $misc; - global $PHP_SELF, $lang; + global $lang; switch ($stage) { case 1: @@ -1560,7 +1560,7 @@ $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 style=\"width: 100%\">\n"; echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strtable']}</th>\n"; @@ -1621,7 +1621,7 @@ $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) { @@ -1680,7 +1680,7 @@ */ function doMoveTable($stage, $msg = '') { global $data, $slony, $misc; - global $PHP_SELF, $lang; + global $lang; switch ($stage) { case 1: @@ -1692,7 +1692,7 @@ $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"; @@ -1732,7 +1732,7 @@ */ function doDropTable($confirm) { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('slony_cluster'); @@ -1741,7 +1741,7 @@ 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"; @@ -1765,7 +1765,7 @@ * 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'); @@ -1808,7 +1808,7 @@ $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=\"?action=add_sequence&stage=1&set_id={$_REQUEST['set_id']}&{$misc->href}\">{$lang['straddsequence']}</a></p>\n"; } /** @@ -1817,7 +1817,7 @@ */ function doAddSequence($stage, $msg = '') { global $data, $slony, $misc; - global $PHP_SELF, $lang; + global $lang; switch ($stage) { case 1: @@ -1830,7 +1830,7 @@ $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 style=\"width: 100%\">\n"; echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strsequence']}</th>\n"; @@ -1883,7 +1883,7 @@ */ function doDropSequence($confirm) { global $slony, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('slony_cluster'); @@ -1892,7 +1892,7 @@ 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"; @@ -1916,7 +1916,7 @@ */ function doMoveSequence($stage, $msg = '') { global $data, $slony, $misc; - global $PHP_SELF, $lang; + global $lang; switch ($stage) { case 1: @@ -1928,7 +1928,7 @@ $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"; @@ -1998,7 +1998,7 @@ * 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'); diff --git a/privileges.php b/privileges.php index baa6b6e8..b62e992a 100644 --- a/privileges.php +++ b/privileges.php @@ -3,7 +3,7 @@ /** * Manage privileges in a database * - * $Id: privileges.php,v 1.42 2007/05/28 17:30:32 ioguix Exp $ + * $Id: privileges.php,v 1.43 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -20,7 +20,7 @@ */ 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(); @@ -44,7 +44,7 @@ } $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"; @@ -137,7 +137,7 @@ */ function doDefault($msg = '') { global $data, $misc, $database; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail($_REQUEST['subject']); @@ -236,9 +236,9 @@ 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 = "?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 = "?action=alter&{$misc->href}&{$subject}={$object}&subject={$subject}&mode="; } echo "<p><a class=\"navlink\" href=\"{$alterurl}grant\">{$lang['strgrant']}</a> |\n"; diff --git a/redirect.php b/redirect.php index dfd9e949..002c0896 100644 --- a/redirect.php +++ b/redirect.php @@ -8,8 +8,6 @@ $url = parse_url($misc->getLastTabURL($subject)); - $PHP_SELF = $url['path']; - // Load query vars into superglobal arrays if (isset($url['query'])) { $vars = array(); diff --git a/reports.php b/reports.php index 909dc1b6..ca160f82 100644 --- a/reports.php +++ b/reports.php @@ -3,7 +3,7 @@ /** * List reports in a database * - * $Id: reports.php,v 1.29 2007/05/28 17:30:32 ioguix Exp $ + * $Id: reports.php,v 1.30 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -16,7 +16,7 @@ */ 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']); @@ -38,7 +38,7 @@ $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 style=\"width: 100%\">\n"; echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n"; @@ -98,7 +98,7 @@ */ function doProperties($msg = '') { global $data, $reportsdb, $misc; - global $PHP_SELF, $lang; + global $lang; $report = $reportsdb->getReport($_REQUEST['report_id']); @@ -121,8 +121,8 @@ } 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->fields['report_id']}\">{$lang['stredit']}</a></p>\n"; + echo "<p><a class=\"navlink\" href=\"?{$misc->href}\">{$lang['strshowallreports']}</a> |\n"; + echo "<a class=\"navlink\" href=\"?action=edit&{$misc->href}&report_id={$report->fields['report_id']}\">{$lang['stredit']}</a></p>\n"; } /** @@ -130,7 +130,7 @@ */ 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'] : ''); @@ -143,7 +143,7 @@ $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 style=\"width: 100%\">\n"; echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n"; @@ -203,7 +203,6 @@ function doDrop($confirm) { global $reportsdb, $misc; global $lang; - global $PHP_SELF; if ($confirm) { // Fetch report from the database @@ -215,7 +214,7 @@ echo "<p>", sprintf($lang['strconfdropreport'], $misc->printVal($report->fields['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"; @@ -238,7 +237,7 @@ */ function doDefault($msg = '') { global $data, $misc, $reportsdb; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('server'); $misc->printTabs('server','reports'); @@ -250,7 +249,7 @@ 'report' => array( 'title' => $lang['strreport'], 'field' => 'report_name', - 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&", + 'url' => "?action=properties&{$misc->href}&", 'vars' => array('report_id' => 'report_id'), ), 'database' => array( @@ -270,7 +269,7 @@ ), ); - $return_url = urlencode("{$PHP_SELF}?{$misc->href}"); + $return_url = urlencode("?{$misc->href}"); $actions = array( 'run' => array( @@ -280,19 +279,19 @@ ), 'edit' => array( 'title' => $lang['stredit'], - 'url' => "{$PHP_SELF}?action=edit&{$misc->href}&", + 'url' => "?action=edit&{$misc->href}&", 'vars' => array('report_id' => 'report_id'), ), 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", + 'url' => "?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=\"?action=create&{$misc->href}\">{$lang['strcreatereport']}</a></p>\n"; } $misc->printHeader($lang['strreports']); @@ -3,7 +3,7 @@ /** * Manage roles in a database cluster * - * $Id: roles.php,v 1.7 2007/05/28 17:30:32 ioguix Exp $ + * $Id: roles.php,v 1.8 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -17,7 +17,7 @@ */ 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'] = ''; @@ -32,7 +32,7 @@ $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 "<table>\n"; echo "\t<tr>\n\t\t<th class=\"data left required\" style=\"width: 130px\">{$lang['strname']}</th>\n"; echo "\t\t<td class=\"data1\"><input size=\"15\" maxlength=\"15\" name=\"formRolename\" value=\"", htmlspecialchars($_POST['formRolename']), "\" /></td>\n\t</tr>\n"; @@ -141,7 +141,7 @@ */ function doAlter($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('role'); $misc->printTitle($lang['stralter'],'pg.role.alter'); @@ -170,7 +170,7 @@ $_POST['formPassword'] = ''; } - echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; + echo "<form action=\"roles.php\" method=\"post\">\n"; echo "<table>\n"; echo "\t<tr>\n\t\t<th class=\"data left\" style=\"width: 130px\">{$lang['strname']}</th>\n"; echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"formNewRoleName\" size=\"15\" maxlength=\"15\" value=\"" . htmlspecialchars($_POST['formNewRoleName']) . "\" />" : $misc->printVal($roledata->fields['rolname'])), "</td>\n\t</tr>\n"; @@ -326,7 +326,7 @@ */ function doDrop($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('role'); @@ -334,7 +334,7 @@ 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 "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; echo "<input type=\"hidden\" name=\"rolename\" value=\"", htmlspecialchars($_REQUEST['rolename']), "\" />\n"; echo $misc->form; @@ -356,7 +356,7 @@ */ function doProperties($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('role'); $misc->printTitle($lang['strproperties'],'pg.role'); @@ -425,10 +425,10 @@ } 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=\"?{$misc->href}\">{$lang['strshowallroles']}</a> |\n"; + echo "<a class=\"navlink\" href=\"?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=\"?action=confirm_drop&{$misc->href}&rolename=", urlencode($_REQUEST['rolename']), "\">{$lang['strdrop']}</a>\n"; } @@ -440,7 +440,7 @@ */ function doAccount($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $server_info = $misc->getServerInfo(); @@ -478,7 +478,7 @@ } 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=\"?action=confchangepassword&{$misc->href}\">{$lang['strchangepassword']}</a></p>\n"; } /** @@ -486,7 +486,7 @@ */ function doChangePassword($confirm, $msg = '') { global $data, $misc; - global $PHP_SELF, $lang, $conf; + global $lang, $conf; $server_info = $misc->getServerInfo(); @@ -499,7 +499,7 @@ 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 "<table>\n"; echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strpassword']}</th>\n"; echo "\t\t<td><input type=\"password\" name=\"password\" size=\"32\" value=\"", @@ -536,7 +536,7 @@ */ function doDefault($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; function renderRoleConnLimit($val) { global $lang; @@ -606,19 +606,19 @@ $actions = array( 'alter' => array( 'title' => $lang['stralter'], - 'url' => "{$PHP_SELF}?action=alter&{$misc->href}&", + 'url' => "?action=alter&{$misc->href}&", 'vars' => array('rolename' => 'rolname'), ), 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", + 'url' => "?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=\"?action=create&{$misc->href}\">{$lang['strcreaterole']}</a></p>\n"; } @@ -3,7 +3,7 @@ /** * List rules on a table OR view * - * $Id: rules.php,v 1.30 2007/07/10 09:04:21 soranzo Exp $ + * $Id: rules.php,v 1.31 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -15,7 +15,7 @@ * Confirm and then actually create a rule */ function createRule($confirm, $msg = '') { - global $PHP_SELF, $data, $misc; + global $data, $misc; global $lang; if (!isset($_POST['name'])) $_POST['name'] = ''; @@ -29,7 +29,7 @@ $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=\"", @@ -86,7 +86,7 @@ */ function doDrop($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail($_REQUEST['subject']); @@ -95,7 +95,7 @@ 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']), @@ -125,7 +125,6 @@ */ function doDefault($msg = '') { global $data, $misc; - global $PHP_SELF; global $lang; $misc->printTrail($_REQUEST['subject']); @@ -154,14 +153,14 @@ $actions = array( 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&reltype={$subject}&{$subject}={$object}&subject=rule&", + 'url' => "?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=\"?action=create_rule&{$misc->href}&{$subject}={$object}&subject={$subject}\">{$lang['strcreaterule']}</a></p>\n"; } function doTree() { diff --git a/schemas.php b/schemas.php index 80b3f0f2..cf824d50 100755 --- a/schemas.php +++ b/schemas.php @@ -3,7 +3,7 @@ /** * Manage schemas in a database * - * $Id: schemas.php,v 1.16 2007/07/10 09:04:21 soranzo Exp $ + * $Id: schemas.php,v 1.17 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -17,7 +17,7 @@ */ function doDefault($msg = '') { global $data, $misc, $conf; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('database'); $misc->printTabs('database','schemas'); @@ -50,7 +50,7 @@ $actions = array( 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=drop&{$misc->href}&", + 'url' => "?action=drop&{$misc->href}&", 'vars' => array('schema' => 'nspname'), ), 'privileges' => array( @@ -60,14 +60,14 @@ ), 'alter' => array( 'title' => $lang['stralter'], - 'url' => "{$PHP_SELF}?action=alter&{$misc->href}&", + 'url' => "?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=\"?action=create&{$misc->href}\">{$lang['strcreateschema']}</a></p>\n"; } else { // If the database does not support schemas... echo "<p>{$lang['strnoschemas']}</p>\n"; @@ -79,7 +79,7 @@ */ function doCreate($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $server_info = $misc->getServerInfo(); @@ -95,7 +95,7 @@ $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 "<table style=\"width: 100%\">\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=\"", @@ -149,7 +149,7 @@ * TODO: permit changing owner */ function doAlter($msg = '') { - global $data, $misc,$PHP_SELF, $lang; + global $data, $misc, $lang; $misc->printTrail('schema'); $misc->printTitle($lang['stralter'],'pg.schema.alter'); @@ -161,7 +161,7 @@ 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"; @@ -191,7 +191,7 @@ * 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) @@ -204,7 +204,7 @@ * Show confirmation of drop and perform actual drop */ function doDrop($confirm) { - global $PHP_SELF, $data, $misc; + global $data, $misc; global $lang, $_reload_browser; if ($confirm) { @@ -213,7 +213,7 @@ 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"; // Show cascade drop option if supportd if ($data->hasDropBehavior()) { echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>\n"; @@ -242,7 +242,7 @@ * Generate XML for the browser tree. */ function doTree() { - global $misc, $data, $lang, $PHP_SELF, $slony; + global $misc, $data, $lang, $slony; $schemas = $data->getSchemas(); diff --git a/sequences.php b/sequences.php index 09effdcd..fa48e675 100644 --- a/sequences.php +++ b/sequences.php @@ -3,7 +3,7 @@ /** * Manage sequences in a database * - * $Id: sequences.php,v 1.40 2007/05/28 17:30:32 ioguix Exp $ + * $Id: sequences.php,v 1.41 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -17,7 +17,7 @@ */ function doDefault($msg = '') { global $data, $conf, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('schema'); $misc->printTabs('schema', 'sequences'); @@ -30,7 +30,7 @@ 'sequence' => array( 'title' => $lang['strsequence'], 'field' => 'seqname', - 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&", + 'url' => "?action=properties&{$misc->href}&", 'vars' => array('sequence' => 'seqname'), ), 'owner' => array( @@ -54,7 +54,7 @@ ), 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", + 'url' => "?action=confirm_drop&{$misc->href}&", 'vars' => array('sequence' => 'seqname'), ), 'privileges' => array( @@ -67,7 +67,7 @@ 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=\"?action=create&{$misc->href}\">{$lang['strcreatesequence']}</a></p>\n"; } /** @@ -101,7 +101,7 @@ * Display the properties of a sequence */ function doProperties($msg = '') { - global $data, $misc, $PHP_SELF; + global $data, $misc; global $lang; $misc->printTrail('sequence'); @@ -145,12 +145,12 @@ echo "</table>"; if ($data->hasAlterSequence()) { - echo "<p><a class=\"navlink\" href=\"{$PHP_SELF}?action=confirm_alter&{$misc->href}&sequence=", urlencode($sequence->fields['seqname']), "\">{$lang['stralter']}</a> |\n"; + echo "<p><a class=\"navlink\" href=\"?action=confirm_alter&{$misc->href}&sequence=", urlencode($sequence->fields['seqname']), "\">{$lang['stralter']}</a> |\n"; } - echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=confirm_setval&{$misc->href}&sequence=", urlencode($sequence->fields['seqname']), "\">{$lang['strsetval']}</a> |\n"; - echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=nextval&{$misc->href}&sequence=", urlencode($sequence->fields['seqname']), "\">{$lang['strnextval']}</a> |\n"; - echo "<a class=\"navlink\" href=\"{$PHP_SELF}?action=reset&{$misc->href}&sequence=", urlencode($sequence->fields['seqname']), "\">{$lang['strreset']}</a> |\n"; - echo "<a class=\"navlink\" href=\"{$PHP_SELF}?{$misc->href}\">{$lang['strshowallsequences']}</a></p>\n"; + echo "<a class=\"navlink\" href=\"?action=confirm_setval&{$misc->href}&sequence=", urlencode($sequence->fields['seqname']), "\">{$lang['strsetval']}</a> |\n"; + echo "<a class=\"navlink\" href=\"?action=nextval&{$misc->href}&sequence=", urlencode($sequence->fields['seqname']), "\">{$lang['strnextval']}</a> |\n"; + echo "<a class=\"navlink\" href=\"?action=reset&{$misc->href}&sequence=", urlencode($sequence->fields['seqname']), "\">{$lang['strreset']}</a> |\n"; + echo "<a class=\"navlink\" href=\"?{$misc->href}\">{$lang['strshowallsequences']}</a></p>\n"; } else echo "<p>{$lang['strnodata']}</p>\n"; } @@ -160,7 +160,7 @@ */ function doDrop($confirm, $msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('sequence'); @@ -169,7 +169,7 @@ 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"; // Show cascade drop option if supportd if ($data->hasDropBehavior()) { echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>\n"; @@ -195,7 +195,7 @@ */ function doCreateSequence($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if (!isset($_POST['formSequenceName'])) $_POST['formSequenceName'] = ''; if (!isset($_POST['formIncrement'])) $_POST['formIncrement'] = ''; @@ -208,7 +208,7 @@ $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"; @@ -274,7 +274,7 @@ */ function doReset() { global $data; - global $PHP_SELF, $lang; + global $lang; $status = $data->resetSequence($_REQUEST['sequence']); if ($status == 0) @@ -288,7 +288,7 @@ */ function doNextval() { global $data; - global $PHP_SELF, $lang; + global $lang; $status = $data->nextvalSequence($_REQUEST['sequence']); if ($status == 0) @@ -315,7 +315,7 @@ */ function doSetval($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('sequence'); $misc->printTitle($lang['strsetval'], 'pg.sequence'); @@ -325,7 +325,7 @@ $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\">"; @@ -361,7 +361,7 @@ */ function doAlter($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('sequence'); $misc->printTitle($lang['stralter'], 'pg.sequence.alter'); @@ -375,7 +375,7 @@ $sequence->fields['is_cycled'] = $data->phpBool($sequence->fields['is_cycled']); if ($sequence->fields['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['strstartvalue']}</th>\n"; diff --git a/servers.php b/servers.php index 53d59c65..347e15ad 100644 --- a/servers.php +++ b/servers.php @@ -3,7 +3,7 @@ /** * Manage servers * - * $Id: servers.php,v 1.8 2007/05/28 17:30:32 ioguix Exp $ + * $Id: servers.php,v 1.9 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -25,7 +25,7 @@ function doDefault($msg = '') { global $conf, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTabs('root','servers'); $misc->printMsg($msg); @@ -64,7 +64,7 @@ $actions = array( 'logout' => array( 'title' => $lang['strlogout'], - 'url' => "{$PHP_SELF}?action=logout&", + 'url' => "?action=logout&", 'vars' => array('logoutServer' => 'id'), ), ); diff --git a/sqledit.php b/sqledit.php index 6be582b5..17b78afd 100644 --- a/sqledit.php +++ b/sqledit.php @@ -3,7 +3,7 @@ /** * Alternative SQL editing window * - * $Id: sqledit.php,v 1.34 2007/05/28 17:30:32 ioguix Exp $ + * $Id: sqledit.php,v 1.35 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -82,7 +82,7 @@ * 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'] = ''; @@ -139,7 +139,7 @@ * 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'] = ''; @@ -3,7 +3,7 @@ /** * List tables in a database * - * $Id: tables.php,v 1.97 2007/05/28 17:30:32 ioguix Exp $ + * $Id: tables.php,v 1.98 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -16,7 +16,7 @@ */ function doCreate($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if (!isset($_REQUEST['stage'])) { $_REQUEST['stage'] = 1; @@ -38,7 +38,7 @@ $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=\"", @@ -104,7 +104,7 @@ $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"; @@ -242,7 +242,6 @@ function doSelectRows($confirm, $msg = '') { global $data, $misc, $_no_output; global $lang; - global $PHP_SELF; if ($confirm) { $misc->printTrail('table'); @@ -251,7 +250,7 @@ $attrs = $data->getTableAttributes($_REQUEST['table']); - echo "<form action=\"$PHP_SELF\" method=\"post\" id=\"selectform\">\n"; + echo "<form action=\"tables.php\" method=\"post\" id=\"selectform\">\n"; if ($attrs->recordCount() > 0) { // JavaScript for select all feature echo "<script type=\"text/javascript\">\n"; @@ -352,7 +351,6 @@ function doInsertRow($confirm, $msg = '') { global $data, $misc, $conf; global $lang; - global $PHP_SELF; $bAllowAC = ($conf['autocomplete'] != 'disable') ? TRUE : FALSE; @@ -380,7 +378,7 @@ } } - 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"; @@ -494,7 +492,6 @@ function doEmpty($confirm) { global $data, $misc; global $lang; - global $PHP_SELF; if (empty($_REQUEST['table']) && empty($_REQUEST['ma'])) { doDefault($lang['strspecifytabletoempty']); @@ -506,7 +503,7 @@ $misc->printTrail('schema'); $misc->printTitle($lang['strempty'],'pg.table.empty'); - echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; + echo "<form action=\"tables.php\" method=\"post\">\n"; foreach ($_REQUEST['ma'] as $v) { $a = unserialize(html_entity_decode($v)); echo "<p>", sprintf($lang['strconfemptytable'], $misc->printVal($a['table'])), "</p>\n"; @@ -519,7 +516,7 @@ 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=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n"; } // END not mutli empty @@ -558,7 +555,6 @@ function doDrop($confirm) { global $data, $misc; global $lang, $_reload_browser; - global $PHP_SELF; if (empty($_REQUEST['table']) && empty($_REQUEST['ma'])) { doDefault($lang['strspecifytabletodrop']); @@ -572,7 +568,7 @@ $misc->printTrail('schema'); $misc->printTitle($lang['strdrop'], 'pg.table.drop'); - echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; + echo "<form action=\"tables.php\" method=\"post\">\n"; foreach($_REQUEST['ma'] as $v) { $a = unserialize(html_entity_decode($v)); echo "<p>", sprintf($lang['strconfdroptable'], $misc->printVal($a['table'])), "</p>\n"; @@ -585,7 +581,7 @@ 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=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n"; }// END if multi drop @@ -634,7 +630,6 @@ function doVacuum($confirm) { global $data, $misc; global $lang, $_reload_browser; - global $PHP_SELF; if (empty($_REQUEST['table']) && empty($_REQUEST['ma'])) { doDefault($lang['strspecifytabletovacuum']); @@ -645,7 +640,7 @@ $misc->printTrail('schema'); $misc->printTitle($lang['strvacuum'], 'pg.vacuum'); - echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; + echo "<form action=\"tables.php\" method=\"post\">\n"; foreach($_REQUEST['ma'] as $v) { $a = unserialize(html_entity_decode($v)); echo "<p>", sprintf($lang['strconfvacuumtable'], $misc->printVal($a['table'])), "</p>\n"; @@ -658,7 +653,7 @@ 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=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n"; } echo "<input type=\"hidden\" name=\"action\" value=\"vacuum\" />\n"; @@ -707,7 +702,6 @@ function doAnalyze($confirm) { global $data, $misc; global $lang, $_reload_browser; - global $PHP_SELF; if (empty($_REQUEST['table']) && empty($_REQUEST['ma'])) { doDefault($lang['strspecifytabletoanalyze']); @@ -718,7 +712,7 @@ $misc->printTrail('schema'); $misc->printTitle($lang['stranalyze'], 'pg.analyze'); //TODO - echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; + echo "<form action=\"tables.php\" method=\"post\">\n"; foreach($_REQUEST['ma'] as $v) { $a = unserialize(html_entity_decode($v)); echo "<p>", sprintf($lang['strconfanalyzetable'], $misc->printVal($a['table'])), "</p>\n"; @@ -731,7 +725,7 @@ echo "<p>", sprintf($lang['strconfanalyzetable'], $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=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n"; } echo "<input type=\"hidden\" name=\"action\" value=\"analyze\" />\n"; @@ -775,7 +769,7 @@ */ function doDefault($msg = '') { global $data, $conf, $misc, $data; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('schema'); $misc->printTabs('schema','tables'); @@ -785,7 +779,7 @@ $multiactions = array( 'keycols' => array('table' => 'relname'), - 'url' => "{$PHP_SELF}", + 'url' => 'tables.php', 'actions' => array( 'analyze' => array( 'action' => 'confirm_analyze', @@ -843,32 +837,32 @@ ), 'select' => array( 'title' => $lang['strselect'], - 'url' => "{$PHP_SELF}?action=confselectrows&{$misc->href}&", + 'url' => "?action=confselectrows&{$misc->href}&", 'vars' => array('table' => 'relname'), ), 'insert' => array( 'title' => $lang['strinsert'], - 'url' => "{$PHP_SELF}?action=confinsertrow&{$misc->href}&", + 'url' => "?action=confinsertrow&{$misc->href}&", 'vars' => array('table' => 'relname'), ), 'empty' => array( 'title' => $lang['strempty'], - 'url' => "{$PHP_SELF}?action=confirm_empty&{$misc->href}&", + 'url' => "?action=confirm_empty&{$misc->href}&", 'vars' => array('table' => 'relname'), ), 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", + 'url' => "?action=confirm_drop&{$misc->href}&", 'vars' => array('table' => 'relname'), ), 'vacuum' => array( 'title' => $lang['strvacuum'], - 'url' => "{$PHP_SELF}?action=confirm_vacuum&{$misc->href}&", + 'url' => "?action=confirm_vacuum&{$misc->href}&", 'vars' => array('table' => 'relname'), ), 'analyze' => array( 'title' => $lang['stranalyze'], - 'url' => "{$PHP_SELF}?action=confirm_analyze&{$misc->href}&", + 'url' => "?action=confirm_analyze&{$misc->href}&", 'vars' => array('table' => 'relname'), ), ); @@ -878,7 +872,7 @@ $misc->printTable($tables, $columns, $actions, $lang['strnotables'], null, $multiactions); - echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}\">{$lang['strcreatetable']}</a></p>\n"; + echo "<p><a class=\"navlink\" href=\"?action=create&{$misc->href}\">{$lang['strcreatetable']}</a></p>\n"; } /** diff --git a/tablespaces.php b/tablespaces.php index 1b09b9ca..2902a71d 100755 --- a/tablespaces.php +++ b/tablespaces.php @@ -3,7 +3,7 @@ /** * Manage tablespaces in a database cluster * - * $Id: tablespaces.php,v 1.13 2007/05/28 17:30:32 ioguix Exp $ + * $Id: tablespaces.php,v 1.14 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -17,7 +17,7 @@ */ function doAlter($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('tablespace'); $misc->printTitle($lang['stralter'],'pg.tablespace.alter'); @@ -36,7 +36,7 @@ $_POST['comment'] = ($data->hasSharedComments()) ? $tablespace->fields['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"; @@ -97,7 +97,7 @@ */ function doDrop($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('tablespace'); @@ -105,7 +105,7 @@ 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"; @@ -127,7 +127,7 @@ */ function doCreate($msg = '') { global $data, $misc, $spcname; - global $PHP_SELF, $lang; + global $lang; $server_info = $misc->getServerInfo(); @@ -143,7 +143,7 @@ $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"; @@ -201,7 +201,7 @@ */ function doDefault($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('server'); $misc->printTabs('server','tablespaces'); @@ -239,12 +239,12 @@ $actions = array( 'alter' => array( 'title' => $lang['stralter'], - 'url' => "{$PHP_SELF}?action=edit&{$misc->href}&", + 'url' => "?action=edit&{$misc->href}&", 'vars' => array('tablespace' => 'spcname') ), 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", + 'url' => "?action=confirm_drop&{$misc->href}&", 'vars' => array('tablespace' => 'spcname') ), 'privileges' => array( @@ -256,7 +256,7 @@ $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=\"?action=create&{$misc->href}\">{$lang['strcreatetablespace']}</a></p>\n"; } diff --git a/tblproperties.php b/tblproperties.php index a1d9a8ce..d008f31e 100644 --- a/tblproperties.php +++ b/tblproperties.php @@ -3,7 +3,7 @@ /** * List tables in a database * - * $Id: tblproperties.php,v 1.81 2007/05/28 17:30:32 ioguix Exp $ + * $Id: tblproperties.php,v 1.82 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -43,7 +43,7 @@ */ function doAlter($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('table'); $misc->printTitle($lang['stralter'], 'pg.table.alter'); @@ -63,7 +63,7 @@ if (!isset($_POST['comment'])) $_POST['comment'] = $table->fields['relcomment']; if ($data->hasTablespaces() && !isset($_POST['tablespace'])) $_POST['tablespace'] = $table->fields['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\">"; @@ -117,7 +117,7 @@ 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']); @@ -175,7 +175,7 @@ function doImport($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('table'); $misc->printTabs('table','import'); @@ -220,7 +220,7 @@ */ function doAddColumn($msg = '') { global $data, $misc, $_reload_browser; - global $PHP_SELF, $lang; + global $lang; if (!isset($_REQUEST['stage'])) $_REQUEST['stage'] = 1; @@ -243,7 +243,7 @@ $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"; @@ -340,7 +340,7 @@ */ function doDrop($confirm) { global $data, $database, $misc, $_reload_browser; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('column'); @@ -350,7 +350,7 @@ $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"; @@ -420,7 +420,7 @@ */ function doDefault($msg = '') { global $data, $conf, $misc; - global $PHP_SELF, $lang; + global $lang; function attPre(&$rowdata, $actions) { global $data; @@ -487,7 +487,7 @@ ), 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'url' => "?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", 'vars' => array('column' => 'attname'), ), ); @@ -495,7 +495,7 @@ if (!$data->hasDropColumn()) unset($actions['drop']); $misc->printTable($attrs, $columns, $actions, null, 'attPre'); - + echo "<ul>\n"; echo "\t<li><a href=\"display.php?{$misc->href}&table=", urlencode($_REQUEST['table']), "&subject=table&return_url={$return_url}&return_desc=", urlencode($lang['strback']), "\">{$lang['strbrowse']}</a></li>\n"; @@ -503,8 +503,8 @@ 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"; } diff --git a/triggers.php b/triggers.php index b55e6950..f29ffc0f 100644 --- a/triggers.php +++ b/triggers.php @@ -3,7 +3,7 @@ /** * List triggers on a table * - * $Id: triggers.php,v 1.33 2007/05/28 17:30:32 ioguix Exp $ + * $Id: triggers.php,v 1.34 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -30,7 +30,7 @@ */ function doAlter($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('trigger'); $misc->printTitle($lang['stralter'],'pg.trigger.alter'); @@ -42,7 +42,7 @@ if (!isset($_POST['name'])) $_POST['name'] = $triggerdata->fields['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\">"; @@ -65,7 +65,7 @@ */ function doDrop($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('trigger'); @@ -74,7 +74,7 @@ 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"; @@ -102,7 +102,7 @@ */ function doEnable($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('trigger'); @@ -111,7 +111,7 @@ 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"; @@ -135,7 +135,7 @@ */ function doDisable($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('trigger'); @@ -144,7 +144,7 @@ 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"; @@ -168,7 +168,7 @@ */ function doCreate($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('table'); $misc->printTitle($lang['strcreatetrigger'],'pg.trigger.create'); @@ -200,7 +200,7 @@ $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"; @@ -236,7 +236,7 @@ */ function doSaveCreate() { global $data; - global $PHP_SELF, $lang; + global $lang; // Check that they've given a name and a definition @@ -262,7 +262,6 @@ */ function doDefault($msg = '') { global $data, $misc, $database; - global $PHP_SELF; global $lang; function tgPre(&$rowdata) { @@ -296,12 +295,12 @@ $actions = array( 'alter' => array( 'title' => $lang['stralter'], - 'url' => "{$PHP_SELF}?action=confirm_alter&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'url' => "?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' => "?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", 'vars' => array('trigger' => 'tgname'), ), ); @@ -309,13 +308,13 @@ 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' => "?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' => "?action=confirm_disable&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", 'vars' => array('trigger' => 'tgname'), ); } @@ -325,7 +324,7 @@ $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=\"?action=create&{$misc->href}&table=", urlencode($_REQUEST['table']), "\">{$lang['strcreatetrigger']}</a></p>\n"; } function doTree() { @@ -3,7 +3,7 @@ /** * Manage types in a database * - * $Id: types.php,v 1.36 2007/05/28 17:30:32 ioguix Exp $ + * $Id: types.php,v 1.37 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -17,7 +17,7 @@ */ function doProperties($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; // Get type (using base name) $typedata = $data->getType($_REQUEST['type']); @@ -75,7 +75,7 @@ echo "</table>\n"; } - echo "<p><a class=\"navlink\" href=\"$PHP_SELF?{$misc->href}\">{$lang['strshowalltypes']}</a></p>\n"; + echo "<p><a class=\"navlink\" href=\"?{$misc->href}\">{$lang['strshowalltypes']}</a></p>\n"; } else doDefault($lang['strinvalidparam']); } @@ -85,7 +85,7 @@ */ function doDrop($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('type'); @@ -93,7 +93,7 @@ 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"; // Show cascade drop option if supportd if ($data->hasDropBehavior()) { echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>\n"; @@ -120,7 +120,7 @@ */ 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'] = ''; @@ -133,7 +133,7 @@ $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=\"", @@ -176,7 +176,7 @@ $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"; @@ -268,7 +268,7 @@ */ function doCreate($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if (!isset($_POST['typname'])) $_POST['typname'] = ''; if (!isset($_POST['typin'])) $_POST['typin'] = ''; @@ -288,7 +288,7 @@ $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=\"", @@ -393,7 +393,7 @@ */ function doDefault($msg = '') { global $data, $conf, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('schema'); $misc->printTabs('schema','types'); @@ -405,7 +405,7 @@ 'type' => array( 'title' => $lang['strtype'], 'field' => 'typname', - 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&", + 'url' => "?action=properties&{$misc->href}&", 'vars' => array('type' => 'basename'), ), 'owner' => array( @@ -440,16 +440,16 @@ $actions = array( 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", + 'url' => "?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=\"?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=\"?action=create_comp&{$misc->href}\">{$lang['strcreatecomptype']}</a>"; echo "</p>\n"; } @@ -3,7 +3,7 @@ /** * Manage users in a database cluster * - * $Id: users.php,v 1.36 2007/05/28 17:30:32 ioguix Exp $ + * $Id: users.php,v 1.37 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -20,7 +20,7 @@ */ function doAccount($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $server_info = $misc->getServerInfo(); @@ -47,7 +47,7 @@ } 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=\"?action=confchangepassword&{$misc->href}\">{$lang['strchangepassword']}</a></p>\n"; } /** @@ -55,7 +55,7 @@ */ function doChangePassword($confirm, $msg = '') { global $data, $misc; - global $PHP_SELF, $lang, $conf; + global $lang, $conf; $server_info = $misc->getServerInfo(); @@ -68,7 +68,7 @@ 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 "<table>\n"; echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strpassword']}</th>\n"; echo "\t\t<td><input type=\"password\" name=\"password\" size=\"32\" value=\"", @@ -105,7 +105,7 @@ */ function doEdit($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('user'); $misc->printTitle($lang['stralter'],'pg.user.alter'); @@ -127,7 +127,7 @@ $_POST['formPassword'] = ''; } - echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; + echo "<form action=\"users.php\" method=\"post\">\n"; echo "<table>\n"; echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strusername']}</th>\n"; echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"newname\" size=\"15\" value=\"" . htmlspecialchars($_POST['newname']) . "\" />" : $misc->printVal($userdata->fields['usename'])), "</td>\n\t</tr>\n"; @@ -180,7 +180,7 @@ */ function doDrop($confirm) { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if ($confirm) { $misc->printTrail('user'); @@ -188,7 +188,7 @@ 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 "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; echo "<input type=\"hidden\" name=\"username\" value=\"", htmlspecialchars($_REQUEST['username']), "\" />\n"; echo $misc->form; @@ -210,7 +210,7 @@ */ 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'] = ''; @@ -221,7 +221,7 @@ $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 "<table>\n"; echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strusername']}</th>\n"; echo "\t\t<td class=\"data1\"><input size=\"15\" name=\"formUsername\" value=\"", htmlspecialchars($_POST['formUsername']), "\" /></td>\n\t</tr>\n"; @@ -272,7 +272,7 @@ */ function doDefault($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; function renderUseExpires($val) { global $lang; @@ -318,12 +318,12 @@ $actions = array( 'alter' => array( 'title' => $lang['stralter'], - 'url' => "{$PHP_SELF}?action=edit&{$misc->href}&", + 'url' => "?action=edit&{$misc->href}&", 'vars' => array('username' => 'usename'), ), 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", + 'url' => "?action=confirm_drop&{$misc->href}&", 'vars' => array('username' => 'usename'), ), ); @@ -332,7 +332,7 @@ $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=\"?action=create&{$misc->href}\">{$lang['strcreateuser']}</a></p>\n"; } diff --git a/viewproperties.php b/viewproperties.php index 18c52d5f..2e979278 100755 --- a/viewproperties.php +++ b/viewproperties.php @@ -3,7 +3,7 @@ /** * List views in a database * - * $Id: viewproperties.php,v 1.28 2007/05/28 17:30:32 ioguix Exp $ + * $Id: viewproperties.php,v 1.29 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -29,7 +29,7 @@ */ function doEdit($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('view'); $misc->printTitle($lang['stredit'],'pg.view.alter'); @@ -44,7 +44,7 @@ $_POST['formComment'] = $viewdata->fields['relcomment']; } - echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; + echo "<form action=\"viewproperties.php\" method=\"post\">\n"; echo "<table style=\"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\">", @@ -72,7 +72,7 @@ */ function doExport($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('view'); $misc->printTabs('view','export'); @@ -129,7 +129,7 @@ */ function doDefinition($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; // Get view $vdata = $data->getView($_REQUEST['view']); @@ -150,7 +150,7 @@ } 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=\"?action=edit&{$misc->href}&view=", urlencode($_REQUEST['view']), "\">{$lang['stralter']}</a></p>\n"; } @@ -159,7 +159,7 @@ */ function doProperties($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; if (!isset($_REQUEST['stage'])) $_REQUEST['stage'] = 1; @@ -171,7 +171,7 @@ $misc->printTitle($lang['stralter'],'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"; @@ -287,7 +287,7 @@ */ function doDefault($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; function attPre(&$rowdata) { global $data; @@ -332,7 +332,7 @@ $actions = array( 'alter' => array( 'title' => $lang['stralter'], - 'url' => "{$PHP_SELF}?action=properties&{$misc->href}&view=".urlencode($_REQUEST['view'])."&", + 'url' => "?action=properties&{$misc->href}&view=".urlencode($_REQUEST['view'])."&", 'vars' => array('column' => 'attname'), ), ); @@ -3,7 +3,7 @@ /** * Manage views in a database * - * $Id: views.php,v 1.70 2007/05/28 17:30:32 ioguix Exp $ + * $Id: views.php,v 1.71 2007/07/12 19:26:22 xzilla Exp $ */ // Include application functions @@ -19,7 +19,6 @@ function doSelectRows($confirm, $msg = '') { global $data, $misc, $_no_output; global $lang; - global $PHP_SELF; if ($confirm) { $misc->printTrail('view'); @@ -28,7 +27,7 @@ $attrs = $data->getTableAttributes($_REQUEST['view']); - echo "<form action=\"$PHP_SELF\" method=\"post\" id=\"selectform\">\n"; + echo "<form action=\"views.php\" method=\"post\" id=\"selectform\">\n"; if ($attrs->recordCount() > 0) { // JavaScript for select all feature echo "<script type=\"text/javascript\">\n"; @@ -128,7 +127,7 @@ */ function doDrop($confirm) { global $data, $misc; - global $PHP_SELF, $lang, $_reload_browser; + global $lang, $_reload_browser; if ($confirm) { $misc->printTrail('view'); @@ -136,7 +135,7 @@ 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; @@ -165,7 +164,7 @@ */ 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']); @@ -219,7 +218,7 @@ } 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"; @@ -309,7 +308,7 @@ */ function doWizardCreate($msg = '') { global $data, $misc; - global $PHP_SELF, $lang; + global $lang; $tables = $data->getTables(true); @@ -317,7 +316,7 @@ $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"; @@ -351,7 +350,7 @@ */ 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 '; @@ -361,7 +360,7 @@ $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 style=\"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=\"", @@ -537,7 +536,7 @@ */ function doDefault($msg = '') { global $data, $misc, $conf; - global $PHP_SELF, $lang; + global $lang; $misc->printTrail('schema'); $misc->printTabs('schema','views'); @@ -573,28 +572,28 @@ ), 'select' => array( 'title' => $lang['strselect'], - 'url' => "{$PHP_SELF}?action=confselectrows&{$misc->href}&", + 'url' => "?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' => "?action=confinsertrow&{$misc->href}&", // 'vars' => array('view' => 'relname'), // ), 'drop' => array( 'title' => $lang['strdrop'], - 'url' => "{$PHP_SELF}?action=confirm_drop&{$misc->href}&", + 'url' => "?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=\"?action=create&{$misc->href}\">{$lang['strcreateview']}</a> |\n"; + echo "<a class=\"navlink\" href=\"?action=wiz_create&{$misc->href}\">{$lang['strcreateviewwiz']}</a></p>\n"; } |