New URL and hidden input generating stuff.

This commit is contained in:
Michal Čihař
2003-01-08 13:50:30 +00:00
parent cbb9ea86d6
commit 1e8447e111
50 changed files with 229 additions and 559 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2003-01-08 Michal Cihar <nijel@users.sourceforge.net>
* libraries/url_generation.lib.php3, libraries/common.lib.php3: New URL
and hidden input generating stuff.
* almost all php3 files: Use new URL and hidden input generation stuff.
2003-01-08 Alexander M. Turek <rabus@users.sourceforge.net> 2003-01-08 Alexander M. Turek <rabus@users.sourceforge.net>
* lang/english-*.inc.php3: Fixed a typo. * lang/english-*.inc.php3: Fixed a typo.

View File

@@ -14,11 +14,7 @@ require('./header.inc.php3');
/** /**
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
*/ */
$err_url = 'main.php3' $err_url = 'main.php3?' . PMA_generate_common_url();
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server;
/** /**
* Ensures the db name is valid * Ensures the db name is valid

View File

@@ -21,18 +21,9 @@ require('./libraries/relation.lib.php3');
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
*/ */
if (isset($table)) { if (isset($table)) {
$err_url = 'tbl_properties.php3' $err_url = 'tbl_properties.php3?' . PMA_generate_common_url($db, $table);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table);
} else { } else {
$err_url = 'db_details.php3' $err_url = 'db_details.php3?' . PMA_generate_common_url($db);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db);
} }

View File

@@ -57,10 +57,7 @@ $auto_sel = ($cfg['TextareaAutoSelect'])
<form method="post" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; echo "\n"; ?> <form method="post" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; echo "\n"; ?>
onsubmit="return checkSqlQuery(this)"> onsubmit="return checkSqlQuery(this)">
<input type="hidden" name="is_js_confirmed" value="0" /> <input type="hidden" name="is_js_confirmed" value="0" />
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="pos" value="0" /> <input type="hidden" name="pos" value="0" />
<input type="hidden" name="goto" value="db_details.php3" /> <input type="hidden" name="goto" value="db_details.php3" />
<input type="hidden" name="zero_rows" value="<?php echo htmlspecialchars($strSuccess); ?>" /> <input type="hidden" name="zero_rows" value="<?php echo htmlspecialchars($strSuccess); ?>" />

View File

@@ -19,15 +19,8 @@ if (!defined('PMA_BOOKMARK_LIB_INCLUDED')) {
/** /**
* Defines the urls to return to in case of error in a sql statement * Defines the urls to return to in case of error in a sql statement
*/ */
$err_url_0 = 'main.php3' $err_url_0 = 'main.php3?' . PMA_generate_common_url();
. '?lang=' . $lang $err_url = $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db);
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server;
$err_url = $cfg['DefaultTabDatabase']
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db);
/** /**
@@ -40,7 +33,7 @@ if (!isset($is_db) || !$is_db) {
$is_db = @PMA_mysql_select_db($db); $is_db = @PMA_mysql_select_db($db);
} }
if (empty($db) || !$is_db) { if (empty($db) || !$is_db) {
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'); header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?' . PMA_generate_common_url() . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
exit(); exit();
} }
} // end if (ensures db exists) } // end if (ensures db exists)
@@ -54,7 +47,7 @@ if (!isset($message)) {
?> ?>
<script type="text/javascript" language="javascript1.2"> <script type="text/javascript" language="javascript1.2">
<!-- <!--
window.parent.frames['nav'].location.replace('./left.php3?lang=<?php echo $lang; ?> &convcharset=<?php echo $convcharset; ?>&server=<?php echo $server; ?>&db=<?php echo urlencode($db); ?>'); window.parent.frames['nav'].location.replace('./left.php3?<?php echo PMA_generate_common_url($db); ?>');
//--> //-->
</script> </script>
<?php <?php
@@ -67,9 +60,6 @@ window.parent.frames['nav'].location.replace('./left.php3?lang=<?php echo $lang;
/** /**
* Set parameters for links * Set parameters for links
*/ */
$url_query = 'lang=' . $lang $url_query = PMA_generate_common_url($db);
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db);
?> ?>

View File

@@ -68,11 +68,8 @@ echo "\n";
<?php <?php
if ($num_tables > 1) { if ($num_tables > 1) {
$checkall_url = 'db_details_export.php3' $checkall_url = 'db_details_export.php3?'
. '?lang=' . $lang . PMA_generate_common_url($db)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;goto=db_details_export.php3'; . '&amp;goto=db_details_export.php3';
?> ?>
<br /> <br />
@@ -191,9 +188,7 @@ if (function_exists('PMA_set_enc_form')) {
</td> </td>
</tr> </tr>
</table> </table>
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="lang" value="<?php echo $lang;?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db);?>" />
</form> </form>
<a href="./Documentation.html#faqexport" target="documentation"><?php echo $strDocu; ?></a> <a href="./Documentation.html#faqexport" target="documentation"><?php echo $strDocu; ?></a>

View File

@@ -123,9 +123,7 @@ if (empty($DOCUMENT_ROOT)) {
?> ?>
<form method="post" action="db_details_importdocsql.php3"> <form method="post" action="db_details_importdocsql.php3">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="submit_show" value="true" /> <input type="hidden" name="submit_show" value="true" />
<input type="hidden" name="do" value="import" /> <input type="hidden" name="do" value="import" />
<b>Please enter absolute path on webserver to docSQL Directory:</b> <b>Please enter absolute path on webserver to docSQL Directory:</b>

View File

@@ -685,9 +685,7 @@ $w--;
<tr align="center" valign="top"> <tr align="center" valign="top">
<td> <td>
<input type="submit" name="modify" value="<?php echo $strUpdateQuery; ?>" /> <input type="submit" name="modify" value="<?php echo $strUpdateQuery; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs(); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
</td> </td>
</tr> </tr>
<!-- Executes a query --> <!-- Executes a query -->

View File

@@ -50,10 +50,7 @@ if ($num_tables == 0) {
else if (PMA_MYSQL_INT_VERSION >= 32303) { else if (PMA_MYSQL_INT_VERSION >= 32303) {
?> ?>
<form method="post" action="db_details_structure.php3" name="tablesForm"> <form method="post" action="db_details_structure.php3" name="tablesForm">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<table border="<?php echo $cfg['Border']; ?>"> <table border="<?php echo $cfg['Border']; ?>">
<tr> <tr>
@@ -270,11 +267,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
<?php <?php
// Check all tables url // Check all tables url
$checkall_url = 'db_details_structure.php3' $checkall_url = 'db_details_structure.php3?' . PMA_generate_common_url($db);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db);
echo "\n"; echo "\n";
?> ?>
<tr> <tr>
@@ -326,10 +319,7 @@ else {
echo "\n"; echo "\n";
?> ?>
<form action="db_details_structure.php3"> <form action="db_details_structure.php3">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<table border="<?php echo $cfg['Border']; ?>"> <table border="<?php echo $cfg['Border']; ?>">
<tr> <tr>
@@ -385,11 +375,7 @@ else {
echo "\n"; echo "\n";
// Check all tables url // Check all tables url
$checkall_url = 'db_details_structure.php3' $checkall_url = 'db_details_structure.php3?' . PMA_generate_common_url($db);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db);
?> ?>
<tr> <tr>
<td colspan="9"> <td colspan="9">
@@ -448,10 +434,7 @@ if ($num_tables > 0) {
<li> <li>
<form method="post" action="tbl_create.php3" <form method="post" action="tbl_create.php3"
onsubmit="return (emptyFormElements(this, 'table') && checkFormElementInRange(this, 'num_fields', 1))"> onsubmit="return (emptyFormElements(this, 'table') && checkFormElementInRange(this, 'num_fields', 1))">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<?php <?php
echo ' ' . sprintf($strCreateNewTable, htmlspecialchars($db)) . '&nbsp;:<br />' . "\n"; echo ' ' . sprintf($strCreateNewTable, htmlspecialchars($db)) . '&nbsp;:<br />' . "\n";
echo ' ' . $strName . '&nbsp;:&nbsp;' . "\n"; echo ' ' . $strName . '&nbsp;:&nbsp;' . "\n";
@@ -496,10 +479,7 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) {
?> ?>
<li> <li>
<form method="post" action="pdf_schema.php3"> <form method="post" action="pdf_schema.php3">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<?php echo $strDisplayPDF; ?>&nbsp;:<br /> <?php echo $strDisplayPDF; ?>&nbsp;:<br />
<?php echo $strPageNumber; ?>&nbsp; <?php echo $strPageNumber; ?>&nbsp;
<select name="pdf_page_number"> <select name="pdf_page_number">

View File

@@ -13,11 +13,7 @@ require('./header.inc.php3');
/** /**
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
*/ */
$err_url = 'db_details.php3' $err_url = 'db_details.php3?' . PMA_generate_common_url($db);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db);
/** /**

View File

@@ -190,12 +190,8 @@ if (isset($submit_search)) {
<br /> <br />
<?php <?php
$url_sql_query = 'lang=' . $lang $url_sql_query = PMA_generate_common_url($db)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;goto=db_details.php3' . '&amp;goto=db_details.php3'
. '&amp;db=' . urlencode($db)
// . '&amp;table=' . urlencode($table)
. '&amp;pos=0' . '&amp;pos=0'
. '&amp;is_js_confirmed=0'; . '&amp;is_js_confirmed=0';
@@ -307,10 +303,7 @@ if (empty($search_option)) {
<a name="db_search"></a> <a name="db_search"></a>
<form method="post" action="db_search.php3" name="db_search"> <form method="post" action="db_search.php3" name="db_search">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" />
<table> <table>
<tr> <tr>

View File

@@ -26,10 +26,7 @@ if (!@PMA_mysql_query('USE mysql', $userlink)) {
*/ */
if ((!empty($submit_mult) && isset($selected_db)) if ((!empty($submit_mult) && isset($selected_db))
|| isset($mult_btn)) { || isset($mult_btn)) {
$err_url = 'db_stats.php3' $err_url = 'db_stats.php3?' . PMA_generate_common_url();
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server;
$action = 'db_stats.php3'; $action = 'db_stats.php3';
$show_query = '1'; $show_query = '1';
include('./mult_submits.inc.php3'); include('./mult_submits.inc.php3');
@@ -83,7 +80,7 @@ function PMA_dbCmp($a, $b)
if ($server > 0) { if ($server > 0) {
// Get the valid databases list // Get the valid databases list
$num_dbs = count($dblist); $num_dbs = count($dblist);
$dbs = @mysql_list_dbs() or PMA_mysqlDie('', 'mysql_list_dbs()', '', 'main.php3?lang' . $lang . '&amp;server=' . $server); $dbs = @mysql_list_dbs() or PMA_mysqlDie('', 'mysql_list_dbs()', '', 'main.php3?' . PMA_generate_common_url());
if ($dbs) { if ($dbs) {
while ($a_db = PMA_mysql_fetch_object($dbs)) { while ($a_db = PMA_mysql_fetch_object($dbs)) {
if (!$num_dbs) { if (!$num_dbs) {
@@ -144,7 +141,7 @@ if ($server > 0) {
*/ */
if ($num_dbs > 0) { if ($num_dbs > 0) {
// Defines the urls used to sort the table // Defines the urls used to sort the table
$common_url = 'db_stats.php3?lang=' . $lang . '&amp;convcharset=' . $convcharset . '&amp;server=' . $server; $common_url = 'db_stats.php3?' . PMA_generate_common_url();
if (empty($sort_by)) { if (empty($sort_by)) {
$sort_by = 'db_name'; $sort_by = 'db_name';
$sort_order = 'asc'; $sort_order = 'asc';
@@ -185,9 +182,7 @@ if ($num_dbs > 0) {
} }
?> ?>
<form action="db_stats.php3" name="dbStatsForm"> <form action="db_stats.php3" name="dbStatsForm">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs(); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<table align="center" border="<?php echo $cfg['Border']; ?>"> <table align="center" border="<?php echo $cfg['Border']; ?>">
<tr> <tr>
@@ -271,10 +266,8 @@ if ($num_dbs > 0) {
reset($dbs_array); reset($dbs_array);
// Check/unchek all databases url // Check/unchek all databases url
$checkall_url = 'db_stats.php3' $checkall_url = 'db_stats.php3?'
. '?lang=' . $lang . PMA_generate_common_url()
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. (empty($sort_by) ? '' : '&amp;sort_by=' . $sort_by) . (empty($sort_by) ? '' : '&amp;sort_by=' . $sort_by)
. (empty($sort_order) ? '' : '&amp;sort_order=' . $sort_order); . (empty($sort_order) ? '' : '&amp;sort_order=' . $sort_order);
$do_check = (empty($checkall)) $do_check = (empty($checkall))
@@ -294,7 +287,7 @@ if ($num_dbs > 0) {
echo ' <td align="center" bgcolor="'. $bgcolor . '">' . "\n"; echo ' <td align="center" bgcolor="'. $bgcolor . '">' . "\n";
echo ' &nbsp;<input type="checkbox" name="selected_db[]" value="' . urlencode($db_name) . '"' . $do_check . ' />&nbsp;' . "\n"; echo ' &nbsp;<input type="checkbox" name="selected_db[]" value="' . urlencode($db_name) . '"' . $do_check . ' />&nbsp;' . "\n";
echo ' </td>' . "\n"; echo ' </td>' . "\n";
echo ' <td bgcolor="'. $bgcolor . '">&nbsp;<a href="index.php3?lang=' . $lang . '&amp;convcharset=' . $convcharset . '&amp;server=' . $server . '&amp;db=' . urlencode($db_name) . '" target="_parent">' . htmlspecialchars($db_name) . '</a>&nbsp;</td>' . "\n"; echo ' <td bgcolor="'. $bgcolor . '">&nbsp;<a href="index.php3?' . PMA_generate_common_url($db_name) . '" target="_parent">' . htmlspecialchars($db_name) . '</a>&nbsp;</td>' . "\n";
echo ' <td align="right" bgcolor="'. $bgcolor . '">&nbsp;' . $dbs_array[$db_name][0] . '&nbsp;</td>' . "\n"; echo ' <td align="right" bgcolor="'. $bgcolor . '">&nbsp;' . $dbs_array[$db_name][0] . '&nbsp;</td>' . "\n";
echo ' <td align="right" bgcolor="'. $bgcolor . '">&nbsp;' . $data_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $data_unit . '&nbsp;</td>' . "\n"; echo ' <td align="right" bgcolor="'. $bgcolor . '">&nbsp;' . $data_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $data_unit . '&nbsp;</td>' . "\n";
echo ' <td align="right" bgcolor="'. $bgcolor . '">&nbsp;' . $idx_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $idx_unit . '&nbsp;</td>' . "\n"; echo ' <td align="right" bgcolor="'. $bgcolor . '">&nbsp;' . $idx_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $idx_unit . '&nbsp;</td>' . "\n";

View File

@@ -249,9 +249,7 @@ if (!defined('PMA_DISPLAY_HEADING')) {
define('PMA_DISPLAY_HEADING', 1); define('PMA_DISPLAY_HEADING', 1);
} }
if (PMA_DISPLAY_HEADING) { if (PMA_DISPLAY_HEADING) {
$header_url_qry = '?lang=' . urlencode($GLOBALS['lang']) $header_url_qry = '?' . PMA_generate_common_url();
. '&amp;convcharset=' . $GLOBALS['convcharset']
. '&amp;server=' . $GLOBALS['server'];
echo '<h1>' . "\n"; echo '<h1>' . "\n";
$server_info = (!empty($cfg['Server']['verbose']) $server_info = (!empty($cfg['Server']['verbose'])
? $cfg['Server']['verbose'] ? $cfg['Server']['verbose']

View File

@@ -38,10 +38,7 @@ if (isset($lightm_db)) {
$db = urldecode($lightm_db); $db = urldecode($lightm_db);
unset($lightm_db); unset($lightm_db);
} }
$url_query = 'lang=' . $lang $url_query = PMA_generate_common_url(isset($db) ? $db : '');
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. (empty($db) ? '' : '&amp;db=' . urlencode($db));
header('Content-Type: text/html; charset=' . $GLOBALS['charset']); header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
?> ?>

View File

@@ -102,11 +102,7 @@ if (function_exists('PMA_set_enc_form')) {
</tr> </tr>
<tr> <tr>
<td colspan="3" align="center"> <td colspan="3" align="center">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<input type="hidden" name="zero_rows" value="<?php echo $strTheContent; ?>" /> <input type="hidden" name="zero_rows" value="<?php echo $strTheContent; ?>" />
<input type="hidden" name="goto" value="tbl_properties.php3" /> <input type="hidden" name="goto" value="tbl_properties.php3" />
<input type="hidden" name="back" value="ldi_table.php3" /> <input type="hidden" name="back" value="ldi_table.php3" />

View File

@@ -179,7 +179,7 @@ echo "\n";
?> ?>
<!-- Link to the welcome page --> <!-- Link to the welcome page -->
<div id="el1Parent" class="parent" style="margin-bottom: 5px"> <div id="el1Parent" class="parent" style="margin-bottom: 5px">
<nobr><a class="item" href="main.php3?lang=<?php echo $lang; ?>&amp;convcharset=<?php echo $convcharset; ?>&amp;server=<?php echo $server; ?>"><span class="heada"><b><?php echo $strHome; ?></b></span></a></nobr> <nobr><a class="item" href="main.php3?<?php echo PMA_generate_common_url(); ?>"><span class="heada"><b><?php echo $strHome; ?></b></span></a></nobr>
</div> </div>
@@ -198,9 +198,7 @@ if ($num_dbs > 1) {
// Light mode -> beginning of the select combo for databases // Light mode -> beginning of the select combo for databases
if ($cfg['LeftFrameLight']) { if ($cfg['LeftFrameLight']) {
echo ' <form method="post" action="index.php3" name="left" target="_parent">' . "\n"; echo ' <form method="post" action="index.php3" name="left" target="_parent">' . "\n";
echo ' <input type="hidden" name="lang" value="' . $lang . '" />' . "\n"; echo PMA_generate_common_hidden_inputs();
echo ' <input type="hidden" name="convcharset" value="' . $convcharset . '" />' . "\n";
echo ' <input type="hidden" name="server" value="' . $server . '" />' . "\n";
echo ' <select name="lightm_db" onchange="this.form.submit()">' . "\n"; echo ' <select name="lightm_db" onchange="this.form.submit()">' . "\n";
echo ' <option value="">(' . $strDatabases . ') ...</option>' . "\n"; echo ' <option value="">(' . $strDatabases . ') ...</option>' . "\n";
$table_list = ''; $table_list = '';
@@ -219,10 +217,7 @@ if ($num_dbs > 1) {
} }
$tables = @PMA_mysql_list_tables($db); $tables = @PMA_mysql_list_tables($db);
$num_tables = ($tables) ? @mysql_numrows($tables) : 0; $num_tables = ($tables) ? @mysql_numrows($tables) : 0;
$common_url_query = 'lang=' . $lang $common_url_query = PMA_generate_common_url($db);
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db);
if ($num_tables) { if ($num_tables) {
$num_tables_disp = $num_tables; $num_tables_disp = $num_tables;
} else { } else {
@@ -386,9 +381,7 @@ else if ($num_dbs == 1) {
$db = $dblist[0]; $db = $dblist[0];
$tables = @PMA_mysql_list_tables($db); $tables = @PMA_mysql_list_tables($db);
$num_tables = ($tables) ? @mysql_numrows($tables) : 0; $num_tables = ($tables) ? @mysql_numrows($tables) : 0;
$common_url_query = 'lang=' . $lang $common_url_query = PMA_generate_common_url($db);
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db);
if ($num_tables) { if ($num_tables) {
$num_tables_disp = $num_tables; $num_tables_disp = $num_tables;
} else { } else {

View File

@@ -417,10 +417,10 @@ if (uname.value == '') {
} }
} // end if } // end if
if (!empty($GLOBALS['SERVER_SOFTWARE']) && $GLOBALS['SERVER_SOFTWARE'] == 'Microsoft-IIS/5.0') { if (!empty($GLOBALS['SERVER_SOFTWARE']) && $GLOBALS['SERVER_SOFTWARE'] == 'Microsoft-IIS/5.0') {
header('Refresh: 0; url=' . $cfg['PmaAbsoluteUri'] . 'index.php3?lang=' . $GLOBALS['lang'] . '&server=' . $server); header('Refresh: 0; url=' . $cfg['PmaAbsoluteUri'] . 'index.php3?' . PMA_generate_common_url());
} }
else { else {
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'index.php3?lang=' . $GLOBALS['lang'] . '&server=' . $server); header('Location: ' . $cfg['PmaAbsoluteUri'] . 'index.php3?' . PMA_generate_common_url());
} }
exit(); exit();
} // end if } // end if

View File

@@ -190,6 +190,11 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
$cfg['OBGzip'] = FALSE; $cfg['OBGzip'] = FALSE;
} }
/**
* Include URL/hidden inputs generating.
*/
include('./libraries/url_generating.lib.php3');
/** /**
* Loads the mysql extensions if it is not loaded yet * Loads the mysql extensions if it is not loaded yet
@@ -333,7 +338,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
echo ' ' . $GLOBALS['strSQLQuery'] . '&nbsp;:&nbsp;' . "\n"; echo ' ' . $GLOBALS['strSQLQuery'] . '&nbsp;:&nbsp;' . "\n";
if ($is_modify_link && isset($db)) { if ($is_modify_link && isset($db)) {
echo ' [' echo ' ['
. '<a href="db_details.php3?lang=' . $GLOBALS['lang'] . '&amp;convcharset=' . $GLOBALS['convcharset'] . '&amp;server=' . urlencode($GLOBALS['server']) . '&amp;db=' . urlencode($GLOBALS['db']) . '&amp;sql_query=' . urlencode($the_query) . '&amp;show_query=1">' . $GLOBALS['strEdit'] . '</a>' . '<a href="db_details.php3?' . PMA_generate_common_url($GLOBALS['db']) . '&amp;sql_query=' . urlencode($the_query) . '&amp;show_query=1">' . $GLOBALS['strEdit'] . '</a>'
. ']' . "\n"; . ']' . "\n";
} // end if } // end if
echo '</p>' . "\n" echo '</p>' . "\n"
@@ -1061,11 +1066,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
// Reloads the navigation frame via JavaScript if required // Reloads the navigation frame via JavaScript if required
if (isset($GLOBALS['reload']) && $GLOBALS['reload']) { if (isset($GLOBALS['reload']) && $GLOBALS['reload']) {
echo "\n"; echo "\n";
$reload_url = './left.php3' $reload_url = './left.php3?' . PMA_generate_common_url($GLOBALS['db']);
. '?lang=' . $GLOBALS['lang']
. '&convcharset=' . $GLOBALS['convcharset']
. '&server=' . $GLOBALS['server']
. ((!empty($GLOBALS['db'])) ? '&db=' . urlencode($GLOBALS['db']) : '');
?> ?>
<script type="text/javascript" language="javascript1.2"> <script type="text/javascript" language="javascript1.2">
<!-- <!--
@@ -1135,12 +1136,7 @@ if (typeof(document.getElementById) != 'undefined'
<?php <?php
if ($cfg['ShowSQL'] == TRUE && !empty($GLOBALS['sql_query'])) { if ($cfg['ShowSQL'] == TRUE && !empty($GLOBALS['sql_query'])) {
// Basic url query part // Basic url query part
$url_qpart = '?convcharset=' . $GLOBALS['convcharset'] $url_qpart = '?' . PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']);
. '&amp;lang=' . $GLOBALS['lang']
. '&amp;server=' . $GLOBALS['server']
. ((!empty($GLOBALS['db'])) ? '&amp;db=' . urlencode($GLOBALS['db']) : '')
. ((!empty($GLOBALS['table'])) ? '&amp;table=' . urlencode($GLOBALS['table']) : '');
echo "\n"; echo "\n";
?> ?>
<tr> <tr>

View File

@@ -13,7 +13,7 @@ if (!isset($is_db) || !$is_db) {
$is_db = @PMA_mysql_select_db($db); $is_db = @PMA_mysql_select_db($db);
} }
if (empty($db) || !$is_db) { if (empty($db) || !$is_db) {
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'); header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?' . PMA_generate_common_url() . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
exit(); exit();
} }
} // end if (ensures db exists) } // end if (ensures db exists)
@@ -24,7 +24,7 @@ if (!isset($is_table) || !$is_table) {
} }
if (empty($table) if (empty($table)
|| !($is_table && @mysql_numrows($is_table))) { || !($is_table && @mysql_numrows($is_table))) {
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'db_details.php3?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server . '&db=' . urlencode($db) . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'); header('Location: ' . $cfg['PmaAbsoluteUri'] . 'db_details.php3?' . PMA_generate_common_url($db) . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
exit(); exit();
} else if (isset($is_table)) { } else if (isset($is_table)) {
mysql_free_result($is_table); mysql_free_result($is_table);

View File

@@ -238,11 +238,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
?> ?>
<td> <td>
<form action="sql.php3" method="post"> <form action="sql.php3" method="post">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" />
<input type="hidden" name="table" value="<?php echo $table; ?>" />
<input type="hidden" name="sql_query" value="<?php echo $encoded_query; ?>" /> <input type="hidden" name="sql_query" value="<?php echo $encoded_query; ?>" />
<input type="hidden" name="pos" value="0" /> <input type="hidden" name="pos" value="0" />
<input type="hidden" name="session_max_rows" value="<?php echo $session_max_rows; ?>" /> <input type="hidden" name="session_max_rows" value="<?php echo $session_max_rows; ?>" />
@@ -255,11 +251,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
</td> </td>
<td> <td>
<form action="sql.php3" method="post"> <form action="sql.php3" method="post">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" />
<input type="hidden" name="table" value="<?php echo $table; ?>" />
<input type="hidden" name="sql_query" value="<?php echo $encoded_query; ?>" /> <input type="hidden" name="sql_query" value="<?php echo $encoded_query; ?>" />
<input type="hidden" name="pos" value="<?php echo $pos_prev; ?>" /> <input type="hidden" name="pos" value="<?php echo $pos_prev; ?>" />
<input type="hidden" name="session_max_rows" value="<?php echo $session_max_rows; ?>" /> <input type="hidden" name="session_max_rows" value="<?php echo $session_max_rows; ?>" />
@@ -280,11 +272,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
<td align="center"> <td align="center">
<form action="sql.php3" method="post" <form action="sql.php3" method="post"
onsubmit="return (checkFormElementInRange(this, 'session_max_rows', 1) && checkFormElementInRange(this, 'pos', 0, <?php echo $unlim_num_rows - 1; ?>))"> onsubmit="return (checkFormElementInRange(this, 'session_max_rows', 1) && checkFormElementInRange(this, 'pos', 0, <?php echo $unlim_num_rows - 1; ?>))">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" />
<input type="hidden" name="table" value="<?php echo $table; ?>" />
<input type="hidden" name="sql_query" value="<?php echo $encoded_query; ?>" /> <input type="hidden" name="sql_query" value="<?php echo $encoded_query; ?>" />
<input type="hidden" name="goto" value="<?php echo $goto; ?>" /> <input type="hidden" name="goto" value="<?php echo $goto; ?>" />
<input type="hidden" name="dontlimitchars" value="<?php echo $dontlimitchars; ?>" /> <input type="hidden" name="dontlimitchars" value="<?php echo $dontlimitchars; ?>" />
@@ -329,11 +317,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
?> ?>
<td> <td>
<form action="sql.php3" method="post"> <form action="sql.php3" method="post">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" />
<input type="hidden" name="table" value="<?php echo $table; ?>" />
<input type="hidden" name="sql_query" value="<?php echo $encoded_query; ?>" /> <input type="hidden" name="sql_query" value="<?php echo $encoded_query; ?>" />
<input type="hidden" name="pos" value="<?php echo $pos_next; ?>" /> <input type="hidden" name="pos" value="<?php echo $pos_next; ?>" />
<input type="hidden" name="session_max_rows" value="<?php echo $session_max_rows; ?>" /> <input type="hidden" name="session_max_rows" value="<?php echo $session_max_rows; ?>" />
@@ -347,11 +331,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
<td> <td>
<form action="sql.php3" method="post" <form action="sql.php3" method="post"
onsubmit="return <?php echo (($pos + $session_max_rows < $unlim_num_rows && $num_rows >= $session_max_rows) ? 'true' : 'false'); ?>"> onsubmit="return <?php echo (($pos + $session_max_rows < $unlim_num_rows && $num_rows >= $session_max_rows) ? 'true' : 'false'); ?>">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" />
<input type="hidden" name="table" value="<?php echo $table; ?>" />
<input type="hidden" name="sql_query" value="<?php echo $encoded_query; ?>" /> <input type="hidden" name="sql_query" value="<?php echo $encoded_query; ?>" />
<input type="hidden" name="pos" value="<?php echo $unlim_num_rows - $session_max_rows; ?>" /> <input type="hidden" name="pos" value="<?php echo $unlim_num_rows - $session_max_rows; ?>" />
<input type="hidden" name="session_max_rows" value="<?php echo $session_max_rows; ?>" /> <input type="hidden" name="session_max_rows" value="<?php echo $session_max_rows; ?>" />
@@ -374,11 +354,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
</td> </td>
<td> <td>
<form action="sql.php3" method="post"> <form action="sql.php3" method="post">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" />
<input type="hidden" name="table" value="<?php echo $table; ?>" />
<input type="hidden" name="sql_query" value="<?php echo $encoded_query; ?>" /> <input type="hidden" name="sql_query" value="<?php echo $encoded_query; ?>" />
<input type="hidden" name="pos" value="0" /> <input type="hidden" name="pos" value="0" />
<input type="hidden" name="session_max_rows" value="all" /> <input type="hidden" name="session_max_rows" value="all" />
@@ -460,12 +436,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
? ' rowspan="2"' ? ' rowspan="2"'
: ''; : '';
} }
$text_url = 'sql.php3' $text_url = 'sql.php3?'
. '?lang=' . $lang . PMA_generate_common_url($db, $table)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table)
. '&amp;sql_query=' . urlencode($sql_query) . '&amp;sql_query=' . urlencode($sql_query)
. '&amp;pos=' . $pos . '&amp;pos=' . $pos
. '&amp;session_max_rows=' . $session_max_rows . '&amp;session_max_rows=' . $session_max_rows
@@ -634,11 +606,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
} else { } else {
$sorted_sql_query = $unsorted_sql_query . $sort_order; $sorted_sql_query = $unsorted_sql_query . $sort_order;
} }
$url_query = 'lang=' . $lang $url_query = PMA_generate_common_url($db, $table)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table)
. '&amp;pos=' . $pos . '&amp;pos=' . $pos
. '&amp;session_max_rows=' . $session_max_rows . '&amp;session_max_rows=' . $session_max_rows
. '&amp;disp_direction=' . $disp_direction . '&amp;disp_direction=' . $disp_direction
@@ -914,11 +882,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
} // end if (1.1) } // end if (1.1)
// 1.2 Defines the urls for the modify/delete link(s) // 1.2 Defines the urls for the modify/delete link(s)
$url_query = 'lang=' . $lang $url_query = PMA_generate_common_url($db, $table)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table)
. '&amp;pos=' . $pos . '&amp;pos=' . $pos
. '&amp;session_max_rows=' . $session_max_rows . '&amp;session_max_rows=' . $session_max_rows
. '&amp;disp_direction=' . $disp_direction . '&amp;disp_direction=' . $disp_direction
@@ -963,11 +927,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
. '?' . str_replace('&amp;', '&', $url_query) . '?' . str_replace('&amp;', '&', $url_query)
. '&sql_query=' . urlencode($sql_query) . '&sql_query=' . urlencode($sql_query)
. '&goto=main.php3'; . '&goto=main.php3';
$del_url = 'sql.php3' $del_url = 'sql.php3?'
. '?lang=' . $lang . PMA_generate_common_url('mysql')
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=mysql'
. '&amp;sql_query=' . urlencode('KILL ' . $row['Id']) . '&amp;sql_query=' . urlencode('KILL ' . $row['Id'])
. '&amp;goto=' . urlencode($lnk_goto); . '&amp;goto=' . urlencode($lnk_goto);
$js_conf = 'KILL ' . $row['Id']; $js_conf = 'KILL ' . $row['Id'];
@@ -1051,9 +1012,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
$title = (!empty($dispval))? ' title="' . htmlspecialchars($dispval) . '"' : ''; $title = (!empty($dispval))? ' title="' . htmlspecialchars($dispval) . '"' : '';
$vertical_display['data'][$row_no][$i] .= '<a href="sql.php3?' $vertical_display['data'][$row_no][$i] .= '<a href="sql.php3?'
. 'lang=' . $lang . '&amp;server=' . $server . PMA_generate_common_url($db, $map[$meta->name][0])
. '&amp;convcharset=' . $convcharset
. '&amp;db=' . urlencode($db) . '&amp;table=' . urlencode($map[$meta->name][0])
. '&amp;pos=0&amp;session_max_rows=' . $session_max_rows . '&amp;dontlimitchars=' . $dontlimitchars . '&amp;pos=0&amp;session_max_rows=' . $session_max_rows . '&amp;dontlimitchars=' . $dontlimitchars
. '&amp;sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($map[$meta->name][0]) . ' WHERE ' . PMA_backquote($map[$meta->name][1]) . ' = ' . $row[$pointer]) . '"' . $title . '>' . '&amp;sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($map[$meta->name][0]) . ' WHERE ' . PMA_backquote($map[$meta->name][1]) . ' = ' . $row[$pointer]) . '"' . $title . '>'
. $row[$pointer] . '</a>'; . $row[$pointer] . '</a>';
@@ -1162,9 +1121,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
$title = (!empty($dispval))? ' title="' . htmlspecialchars($dispval) . '"' : ''; $title = (!empty($dispval))? ' title="' . htmlspecialchars($dispval) . '"' : '';
$vertical_display['data'][$row_no][$i] .= '<a href="sql.php3?' $vertical_display['data'][$row_no][$i] .= '<a href="sql.php3?'
. 'lang=' . $lang . '&amp;convcharset=' . $convcharset . PMA_generate_common_url($db, $map[$meta->name][0])
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db) . '&amp;table=' . urlencode($map[$meta->name][0])
. '&amp;pos=0&amp;session_max_rows=' . $session_max_rows . '&amp;dontlimitchars=' . $dontlimitchars . '&amp;pos=0&amp;session_max_rows=' . $session_max_rows . '&amp;dontlimitchars=' . $dontlimitchars
. '&amp;sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($map[$meta->name][0]) . ' WHERE ' . PMA_backquote($map[$meta->name][1]) . ' = \'' . PMA_sqlAddslashes($relation_id) . '\'') . '"' . $title . '>' . '&amp;sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($map[$meta->name][0]) . ' WHERE ' . PMA_backquote($map[$meta->name][1]) . ' = \'' . PMA_sqlAddslashes($relation_id) . '\'') . '"' . $title . '>'
. $row[$pointer] . '</a>'; . $row[$pointer] . '</a>';

View File

@@ -0,0 +1,46 @@
<?php
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:
/**
* URL/hidden inputs generating.
*/
if (!defined('PMA_URL_GENERATION_LIB_INCLUDED')){
define('PMA_URL_GENERATION_LIB_INCLUDED', 1);
function PMA_generate_common_hidden_inputs ($db = '', $table = '')
{
global $lang, $convcharset, $server;
global $cfg, $allow_recoding;
$result = '<input type="hidden" name="lang" value="' . $lang . '" />' . "\n" .
'<input type="hidden" name="server" value="' . $server . '" />' . "\n";
if (isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding)
$result .= '<input type="hidden" name="convcharset" value="' . $convcharset . '" />' . "\n";
if (!empty($db))
$result .= '<input type="hidden" name="db" value="'.htmlspecialchars($db).'" />';
if (!empty($table))
$result .= '<input type="hidden" name="table" value="'.htmlspecialchars($table).'" />';
return $result;
}
function PMA_generate_common_url ($db = '', $table = '')
{
global $lang, $convcharset, $server;
global $cfg, $allow_recoding;
$result = 'lang=' . $lang
. '&amp;server=' . $server;
if (isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding)
$result .= '&amp;convcharset=' . $convcharset;
if (!empty($db))
$result .= '&amp;db='.urlencode($db);
if (!empty($table))
$result .= '&amp;table='.urlencode($table);
return $result;
}
}
?>

View File

@@ -43,7 +43,7 @@ else if (isset($reload) && $reload) {
?> ?>
<script type="text/javascript" language="javascript1.2"> <script type="text/javascript" language="javascript1.2">
<!-- <!--
window.parent.frames['nav'].location.replace('./left.php3?lang=<?php echo $lang; ?>&convcharset=<?php echo $convcharset; ?>&server=<?php echo $server; ?>'); window.parent.frames['nav'].location.replace('./left.php3?<?php echo PMA_generate_common_url(); ?>');
//--> //-->
</script> </script>
<?php <?php
@@ -92,7 +92,7 @@ if ($server > 0) {
* Reload mysql (flush privileges) * Reload mysql (flush privileges)
*/ */
if (($server > 0) && isset($mode) && ($mode == 'reload')) { if (($server > 0) && isset($mode) && ($mode == 'reload')) {
$result = PMA_mysql_query('FLUSH PRIVILEGES'); // Debug: or PMA_mysqlDie('', 'FLUSH PRIVILEGES', FALSE, 'main.php3?lang=' . $lang . '&amp;server=' . $server); $result = PMA_mysql_query('FLUSH PRIVILEGES'); // Debug: or PMA_mysqlDie('', 'FLUSH PRIVILEGES', FALSE, 'main.php3?' . PMA_generate_common_url());
echo '<p><b>'; echo '<p><b>';
if ($result != 0) { if ($result != 0) {
echo $strMySQLReloaded; echo $strMySQLReloaded;
@@ -270,7 +270,7 @@ if ($server > 0) {
$db_to_create = ''; $db_to_create = '';
} }
$common_url_query = 'lang=' . $lang . '&amp;convcharset=' . $convcharset . '&amp;server=' . $server; $common_url_query = PMA_generate_common_url();
if ($is_superuser) { if ($is_superuser) {
$cfg['ShowMysqlInfo'] = TRUE; $cfg['ShowMysqlInfo'] = TRUE;
@@ -304,9 +304,7 @@ if ($server > 0) {
<td> <td>
<form method="post" action="db_create.php3"> <form method="post" action="db_create.php3">
<?php echo $strCreateNewDatabase . '&nbsp;' . PMA_showMySQLDocu('Reference', 'CREATE_DATABASE'); ?><br /> <?php echo $strCreateNewDatabase . '&nbsp;' . PMA_showMySQLDocu('Reference', 'CREATE_DATABASE'); ?><br />
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs(); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="reload" value="1" /> <input type="hidden" name="reload" value="1" />
<input type="text" name="db" value="<?php echo $db_to_create; ?>" maxlength="64" class="textfield" /> <input type="text" name="db" value="<?php echo $db_to_create; ?>" maxlength="64" class="textfield" />
<input type="submit" value="<?php echo $strCreate; ?>" /> <input type="submit" value="<?php echo $strCreate; ?>" />

View File

@@ -107,16 +107,12 @@ if (!empty($submit_mult) && !empty($what)) {
echo '<tt>' . $full_query . '</tt>&nbsp;?<br/>' . "\n"; echo '<tt>' . $full_query . '</tt>&nbsp;?<br/>' . "\n";
?> ?>
<form action="<?php echo $action; ?>" method="post"> <form action="<?php echo $action; ?>" method="post">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<?php <?php
echo "\n"; echo "\n";
if (strpos(' ' . $action, 'db_details') == 1) { if (strpos(' ' . $action, 'db_details') == 1) {
echo ' <input type="hidden" name="db" value="' . htmlspecialchars($db) . '" />' . "\n"; echo PMA_generate_common_hidden_inputs($db);
} else if (strpos(' ' . $action, 'tbl_properties') == 1) { } else if (strpos(' ' . $action, 'tbl_properties') == 1) {
echo ' <input type="hidden" name="db" value="' . htmlspecialchars($db) . '" />' . "\n"; echo PMA_generate_common_hidden_inputs($db,$table);
echo ' <input type="hidden" name="table" value="' . htmlspecialchars($table) . '" />' . "\n";
} }
for ($i = 0; $i < $selected_cnt; $i++) { for ($i = 0; $i < $selected_cnt; $i++) {
echo ' <input type="hidden" name="selected[]" value="' . htmlspecialchars($selected[$i]) . '" />' . "\n"; echo ' <input type="hidden" name="selected[]" value="' . htmlspecialchars($selected[$i]) . '" />' . "\n";

View File

@@ -120,11 +120,7 @@ if ($cfgRelation['pdfwork']) {
?> ?>
<form method="post" action="pdf_pages.php3" name="selpage"> <form method="post" action="pdf_pages.php3" name="selpage">
<?php echo $strChoosePage . "\n"; ?> <?php echo $strChoosePage . "\n"; ?>
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<input type="hidden" name="do" value="choosepage" /> <input type="hidden" name="do" value="choosepage" />
<select name="chpage" onchange="this.form.submit()"> <select name="chpage" onchange="this.form.submit()">
<?php <?php
@@ -149,11 +145,7 @@ if ($cfgRelation['pdfwork']) {
?> ?>
<form method="post" action="pdf_pages.php3" name="crpage"> <form method="post" action="pdf_pages.php3" name="crpage">
<?php echo $strCreatePage . "\n"; ?> <?php echo $strCreatePage . "\n"; ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<input type="hidden" name="do" value="createpage" /> <input type="hidden" name="do" value="createpage" />
<input type="text" name="newpage" size="20" maxlength="50" /> <input type="text" name="newpage" size="20" maxlength="50" />
<input type="submit" value="<?php echo $strGo; ?>" /> <input type="submit" value="<?php echo $strGo; ?>" />
@@ -168,11 +160,7 @@ if ($cfgRelation['pdfwork']) {
<h2><?php echo $strSelectTables ;?></h2> <h2><?php echo $strSelectTables ;?></h2>
<form method="post" action="pdf_pages.php3" name="edcoord"> <form method="post" action="pdf_pages.php3" name="edcoord">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<input type="hidden" name="chpage" value="<?php echo $chpage; ?>" /> <input type="hidden" name="chpage" value="<?php echo $chpage; ?>" />
<input type="hidden" name="do" value="edcoord" /> <input type="hidden" name="do" value="edcoord" />
<table border="0"> <table border="0">
@@ -261,10 +249,7 @@ if ($cfgRelation['pdfwork']) {
if (isset($do) && ($do == 'edcoord' || $do == 'choosepage')) { if (isset($do) && ($do == 'edcoord' || $do == 'choosepage')) {
?> ?>
<form method="post" action="pdf_schema.php3"> <form method="post" action="pdf_schema.php3">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="pdf_page_number" value="<?php echo $chpage; ?>" /> <input type="hidden" name="pdf_page_number" value="<?php echo $chpage; ?>" />
<?php echo $strDisplayPDF; ?>&nbsp;:<br /> <?php echo $strDisplayPDF; ?>&nbsp;:<br />
<input type="checkbox" name="show_grid" id="show_grid_opt" /> <input type="checkbox" name="show_grid" id="show_grid_opt" />

View File

@@ -296,11 +296,7 @@ class PMA_PDF extends FPDF
echo ' ' . $error_message . "\n"; echo ' ' . $error_message . "\n";
echo '</p>' . "\n"; echo '</p>' . "\n";
echo '<a href="db_details_structure.php3' echo '<a href="db_details_structure.php3?' . PMA_generate_common_url($db)
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '">' . $GLOBALS['strBack'] . '</a>'; . '">' . $GLOBALS['strBack'] . '</a>';
echo "\n"; echo "\n";

View File

@@ -237,10 +237,7 @@ if (!isset($goto)
$goto = 'db_details.php3'; $goto = 'db_details.php3';
} }
$err_url = $goto $err_url = $goto
. '?lang=' . $lang . '?' . PMA_generate_common_url($db)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. (($goto == 'tbl_properties.php3') ? '&amp;table=' . urlencode($table) : ''); . (($goto == 'tbl_properties.php3') ? '&amp;table=' . urlencode($table) : '');

View File

@@ -25,9 +25,7 @@ if (isset($table)) {
/** /**
* Set parameters for links * Set parameters for links
*/ */
$url_query = 'lang=' . $lang $url_query = PMA_generate_common_url();
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server;
/** /**
* Defines the urls to return to in case of error in a sql statement * Defines the urls to return to in case of error in a sql statement

View File

@@ -590,11 +590,9 @@ if (empty($adduser)) {
. ' Please run the script <tt>mysql_fix_privilege_tables</tt> that should be included in your MySQL server distribution to solve this problem!' . "\n" . ' Please run the script <tt>mysql_fix_privilege_tables</tt> that should be included in your MySQL server distribution to solve this problem!' . "\n"
. '</div><br />' . "\n"; . '</div><br />' . "\n";
} }
echo '<form name="usersForm" action="server_privileges.php3" method="post" />' . "\n" echo '<form name="usersForm" action="server_privileges.php3" method="post" />' . "\n";
. ' <input type="hidden" name="lang" value="' . $lang . '" />' . "\n" echo PMA_generate_common_hidden_inputs();
. ' <input type="hidden" name="convcharset" value="' . $convcharset . '" />' . "\n" echo ' <table border="0">' . "\n"
. ' <input type="hidden" name="server" value="' . $server . '" />' . "\n"
. ' <table border="0">' . "\n"
. ' <tr>' . "\n" . ' <tr>' . "\n"
. ' <th></th>' . "\n" . ' <th></th>' . "\n"
. ' <th>&nbsp;' . $strUser . '&nbsp;</th>' . "\n" . ' <th>&nbsp;' . $strUser . '&nbsp;</th>' . "\n"
@@ -688,11 +686,9 @@ if (empty($adduser)) {
unset($res); unset($res);
echo '<ul>' . "\n" echo '<ul>' . "\n"
. ' <li>' . "\n" . ' <li>' . "\n"
. ' <form action="server_privileges.php3" method="post">' . "\n" . ' <form action="server_privileges.php3" method="post">' . "\n";
. ' <input type="hidden" name="lang" value="' . $lang . '" />' . "\n" echo PMA_generate_common_hidden_inputs();
. ' <input type="hidden" name="convcharset" value="' . $convcharset . '" />' . "\n" echo ' <input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n";
. ' <input type="hidden" name="server" value="' . $server . '" />' . "\n"
. ' <input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n";
if ($hostname != '%') { if ($hostname != '%') {
echo ' <input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n"; echo ' <input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n";
} }
@@ -803,11 +799,9 @@ if (empty($adduser)) {
unset($row); unset($row);
echo ' <tr>' . "\n" echo ' <tr>' . "\n"
. ' <td colspan="' .(PMA_MYSQL_INT_VERSION >= 32211 ? '5' : '4') . '">' . "\n" . ' <td colspan="' .(PMA_MYSQL_INT_VERSION >= 32211 ? '5' : '4') . '">' . "\n"
. ' <form action="server_privileges.php3" method="post">' . "\n" . ' <form action="server_privileges.php3" method="post">' . "\n";
. ' <input type="hidden" name="lang" value="' . $lang . '" />' . "\n" echo PMA_generate_common_hidden_inputs();
. ' <input type="hidden" name="convcharset" value="' . $convcharset . '" />' . "\n" echo ' <input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n";
. ' <input type="hidden" name="server" value="' . $server . '" />' . "\n"
. ' <input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n";
if ($hostname != '%') { if ($hostname != '%') {
echo ' <input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n"; echo ' <input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n";
} }
@@ -828,11 +822,9 @@ if (empty($adduser)) {
} }
if (empty($dbname)) { if (empty($dbname)) {
echo ' <li>' . "\n" echo ' <li>' . "\n"
. ' <form action="server_privileges.php3" method="post" onsubmit="checkPassword(this);">' . "\n" . ' <form action="server_privileges.php3" method="post" onsubmit="checkPassword(this);">' . "\n";
. ' <input type="hidden" name="lang" value="' . $lang . '" />' . "\n" echo PMA_generate_common_hidden_inputs();
. ' <input type="hidden" name="convcharset" value="' . $convcharset . '" />' . "\n" echo ' <input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n";
. ' <input type="hidden" name="server" value="' . $server . '" />' . "\n"
. ' <input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n";
if ($hostname != '%') { if ($hostname != '%') {
echo ' <input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n"; echo ' <input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n";
} }
@@ -870,11 +862,9 @@ if (empty($adduser)) {
echo '<h2>' . "\n" echo '<h2>' . "\n"
. ' ' . $strAddUser . "\n" . ' ' . $strAddUser . "\n"
. '</h2>' . "\n" . '</h2>' . "\n"
. '<form action="server_privileges.php3" method="post" onsubmit="return checkAddUser(this);">' . "\n" . '<form action="server_privileges.php3" method="post" onsubmit="return checkAddUser(this);">' . "\n";
. ' <input type="hidden" name="lang" value="' . $lang . '" />' . "\n" echo PMA_generate_common_hidden_inputs();
. ' <input type="hidden" name="convcharset" value="' . $convcharset . '" />' . "\n" echo ' <table border="0">' . "\n"
. ' <input type="hidden" name="server" value="' . $server . '" />' . "\n"
. ' <table border="0">' . "\n"
. ' <tr>' . "\n" . ' <tr>' . "\n"
. ' <th colspan="3">' . "\n" . ' <th colspan="3">' . "\n"
. ' ' . $strLoginInformation . "\n" . ' ' . $strLoginInformation . "\n"

View File

@@ -27,10 +27,7 @@ if (empty($goto)) {
} // end if } // end if
if (!isset($err_url)) { if (!isset($err_url)) {
$err_url = (!empty($back) ? $back : $goto) $err_url = (!empty($back) ? $back : $goto)
. '?lang=' . $lang . '?' . PMA_generate_common_url(isset($db) ? $db : '')
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. (isset($db) ? '&amp;db=' . urlencode($db) : '')
. ((strpos(' ' . $goto, 'db_details') != 1 && isset($table)) ? '&amp;table=' . urlencode($table) : ''); . ((strpos(' ' . $goto, 'db_details') != 1 && isset($table)) ? '&amp;table=' . urlencode($table) : '');
} // end if } // end if
@@ -123,12 +120,8 @@ if ($is_select) {
* Sets or modifies the $goto variable if required * Sets or modifies the $goto variable if required
*/ */
if ($goto == 'sql.php3') { if ($goto == 'sql.php3') {
$goto = 'sql.php3' $goto = 'sql.php3?'
. '?lang=' . $lang . PMA_generate_common_url($db, $table)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table)
. '&amp;pos=' . $pos . '&amp;pos=' . $pos
. '&amp;sql_query=' . urlencode($sql_query); . '&amp;sql_query=' . urlencode($sql_query);
} // end if } // end if
@@ -182,11 +175,7 @@ if ($do_confirm) {
echo '<tt>' . htmlspecialchars($stripped_sql_query) . '</tt>&nbsp;?<br/>' . "\n"; echo '<tt>' . htmlspecialchars($stripped_sql_query) . '</tt>&nbsp;?<br/>' . "\n";
?> ?>
<form action="sql.php3" method="post"> <form action="sql.php3" method="post">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo isset($table) ? htmlspecialchars($table) : ''; ?>" />
<input type="hidden" name="sql_query" value="<?php echo urlencode(addslashes($sql_query)); ?>" /> <input type="hidden" name="sql_query" value="<?php echo urlencode(addslashes($sql_query)); ?>" />
<input type="hidden" name="zero_rows" value="<?php echo isset($zero_rows) ? $zero_rows : ''; ?>" /> <input type="hidden" name="zero_rows" value="<?php echo isset($zero_rows) ? $zero_rows : ''; ?>" />
<input type="hidden" name="goto" value="<?php echo $goto; ?>" /> <input type="hidden" name="goto" value="<?php echo $goto; ?>" />
@@ -508,23 +497,16 @@ else {
// Displays "Insert a new row" link if required // Displays "Insert a new row" link if required
if ($disp_mode[6] == '1') { if ($disp_mode[6] == '1') {
$lnk_goto = 'sql.php3' $lnk_goto = 'sql.php3?'
. '?lang=' . $lang . PMA_generate_common_url($db, $table)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table)
. '&amp;pos=' . $pos . '&amp;pos=' . $pos
. '&amp;session_max_rows=' . $session_max_rows . '&amp;session_max_rows=' . $session_max_rows
. '&amp;disp_direction=' . $disp_direction . '&amp;disp_direction=' . $disp_direction
. '&amp;repeat_cells=' . $repeat_cells . '&amp;repeat_cells=' . $repeat_cells
. '&amp;dontlimitchars=' . $dontlimitchars . '&amp;dontlimitchars=' . $dontlimitchars
. '&amp;sql_query=' . urlencode($sql_query); . '&amp;sql_query=' . urlencode($sql_query);
$url_query = '?lang=' . $lang $url_query = '?'
. '&amp;convcharset=' . $convcharset . PMA_generate_common_url($db, $table)
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table)
. '&amp;pos=' . $pos . '&amp;pos=' . $pos
. '&amp;session_max_rows=' . $session_max_rows . '&amp;session_max_rows=' . $session_max_rows
. '&amp;disp_direction=' . $disp_direction . '&amp;disp_direction=' . $disp_direction
@@ -543,11 +525,8 @@ else {
// Displays "printable view" link if required // Displays "printable view" link if required
if ($disp_mode[9] == '1') { if ($disp_mode[9] == '1') {
$url_query = '?lang=' . $lang $url_query = '?'
. '&amp;convcharset=' . $convcharset . PMA_generate_common_url($db, $table)
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table)
. '&amp;pos=' . $pos . '&amp;pos=' . $pos
. '&amp;session_max_rows=' . $session_max_rows . '&amp;session_max_rows=' . $session_max_rows
. '&amp;disp_direction=' . $disp_direction . '&amp;disp_direction=' . $disp_direction
@@ -568,12 +547,8 @@ else {
&& !empty($sql_query)) { && !empty($sql_query)) {
echo "\n"; echo "\n";
$goto = 'sql.php3' $goto = 'sql.php3?'
. '?lang=' . $lang . PMA_generate_common_url($db, $table)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table)
. '&amp;pos=' . $pos . '&amp;pos=' . $pos
. '&amp;session_max_rows=' . $session_max_rows . '&amp;session_max_rows=' . $session_max_rows
. '&amp;disp_direction=' . $disp_direction . '&amp;disp_direction=' . $disp_direction
@@ -592,7 +567,7 @@ else {
?> ?>
<br /><br /> <br /><br />
<?php echo $strBookmarkLabel; ?>&nbsp;: <?php echo $strBookmarkLabel; ?>&nbsp;:
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs(); ?>
<input type="hidden" name="goto" value="<?php echo $goto; ?>" /> <input type="hidden" name="goto" value="<?php echo $goto; ?>" />
<input type="hidden" name="fields[dbase]" value="<?php echo htmlspecialchars($db); ?>" /> <input type="hidden" name="fields[dbase]" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="fields[user]" value="<?php echo $cfg['Bookmark']['user']; ?>" /> <input type="hidden" name="fields[user]" value="<?php echo $cfg['Bookmark']['user']; ?>" />

View File

@@ -16,12 +16,7 @@ require('./header.inc.php3');
/** /**
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
*/ */
$err_url = 'tbl_properties.php3' $err_url = 'tbl_properties.php3?' . PMA_generate_common_url($db, $table);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table);
/** /**

View File

@@ -18,12 +18,7 @@ if (!isset($submit_mult)) {
/** /**
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
*/ */
$err_url = 'tbl_properties_structure.php3' $err_url = 'tbl_properties_structure.php3?' . PMA_generate_common_url($db, $table);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table);
/** /**

View File

@@ -18,12 +18,8 @@ require('./libraries/relation.lib.php3'); // foreign keys
if (!empty($message)) { if (!empty($message)) {
if (isset($goto)) { if (isset($goto)) {
$goto_cpy = $goto; $goto_cpy = $goto;
$goto = 'tbl_properties.php3' $goto = 'tbl_properties.php3?'
. '?lang=' . $lang . PMA_generate_common_url($db, $table)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table)
. '&amp;$show_query=1' . '&amp;$show_query=1'
. '&amp;sql_query=' . urlencode($disp_query); . '&amp;sql_query=' . urlencode($disp_query);
} else { } else {
@@ -66,11 +62,8 @@ if (!isset($goto)) {
if (!ereg('^(db_details|tbl_properties|tbl_select)', $goto)) { if (!ereg('^(db_details|tbl_properties|tbl_select)', $goto)) {
$err_url = $goto; $err_url = $goto;
} else { } else {
$err_url = $goto $err_url = $goto . '?'
. '?lang=' . $lang . PMA_generate_common_url($db)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
//. (($goto == 'tbl_properties.php3') ? '&amp;table=' . urlencode($table) : ''); //. (($goto == 'tbl_properties.php3') ? '&amp;table=' . urlencode($table) : '');
. ((ereg('^(tbl_properties|tbl_select)', $goto)) ? '&amp;table=' . urlencode($table) : ''); . ((ereg('^(tbl_properties|tbl_select)', $goto)) ? '&amp;table=' . urlencode($table) : '');
} }
@@ -85,11 +78,7 @@ require('./libraries/db_table_exists.lib.php3');
/** /**
* Sets parameters for links and displays top menu * Sets parameters for links and displays top menu
*/ */
$url_query = 'lang=' . $lang $url_query = PMA_generate_common_url($db, $table)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table)
. '&amp;goto=tbl_properties.php3'; . '&amp;goto=tbl_properties.php3';
require('./tbl_properties_table_info.php3'); require('./tbl_properties_table_info.php3');
@@ -110,12 +99,8 @@ if (isset($primary_key)) {
unset($row); unset($row);
unset($primary_key); unset($primary_key);
$goto_cpy = $goto; $goto_cpy = $goto;
$goto = 'tbl_properties.php3' $goto = 'tbl_properties.php3?'
. '?lang=' . $lang . PMA_generate_common_url($db, $table)
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table)
. '&amp;$show_query=1' . '&amp;$show_query=1'
. '&amp;sql_query=' . urlencode($local_query); . '&amp;sql_query=' . urlencode($local_query);
if (isset($sql_query)) { if (isset($sql_query)) {
@@ -159,11 +144,7 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5)
<!-- Change table properties form --> <!-- Change table properties form -->
<form method="post" action="tbl_replace.php3" name="insertForm"> <form method="post" action="tbl_replace.php3" name="insertForm">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo $table; ?>" />
<input type="hidden" name="goto" value="<?php echo $goto; ?>" /> <input type="hidden" name="goto" value="<?php echo $goto; ?>" />
<input type="hidden" name="pos" value="<?php echo isset($pos) ? $pos : 0; ?>" /> <input type="hidden" name="pos" value="<?php echo isset($pos) ? $pos : 0; ?>" />
<input type="hidden" name="session_max_rows" value="<?php echo isset($session_max_rows) ? $session_max_rows : ''; ?>" /> <input type="hidden" name="session_max_rows" value="<?php echo isset($session_max_rows) ? $session_max_rows : ''; ?>" />

View File

@@ -16,12 +16,7 @@ require('./header.inc.php3');
/** /**
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
*/ */
$err_url = 'tbl_properties.php3' $err_url = 'tbl_properties.php3?' . PMA_generate_common_url($db, $table);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table);
/** /**

View File

@@ -67,12 +67,7 @@ require('./libraries/zip.lib.php3');
/** /**
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
*/ */
$err_url = 'tbl_properties.php3' $err_url = 'tbl_properties.php3?' . PMA_generate_common_url($db, isset($table) ? $table : '');
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. (isset($table) ? '&amp;table=' . urlencode($table) : '');
/** /**

View File

@@ -40,7 +40,7 @@ if (!defined('PMA_IDX_INCLUDED')) {
$is_db = @PMA_mysql_select_db($db); $is_db = @PMA_mysql_select_db($db);
} }
if (empty($db) || !$is_db) { if (empty($db) || !$is_db) {
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'); header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?' . PMA_generate_common_url() . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
exit(); exit();
} }
// Not a valid table name -> back to the default db_details sub-page // Not a valid table name -> back to the default db_details sub-page
@@ -49,7 +49,7 @@ if (!defined('PMA_IDX_INCLUDED')) {
} }
if (empty($table) if (empty($table)
|| !($is_table && @mysql_numrows($is_table))) { || !($is_table && @mysql_numrows($is_table))) {
header('Location: ' . $cfg['PmaAbsoluteUri'] . $cfg['DefaultTabDatabase'] . '?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server .'&db=' . urlencode($db) . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'); header('Location: ' . $cfg['PmaAbsoluteUri'] . $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db) . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
exit(); exit();
} else if (isset($is_table)) { } else if (isset($is_table)) {
mysql_free_result($is_table); mysql_free_result($is_table);
@@ -65,11 +65,7 @@ if (!defined('PMA_IDX_INCLUDED')) {
* Gets fields and indexes informations * Gets fields and indexes informations
*/ */
if (defined('PMA_IDX_INCLUDED')) { if (defined('PMA_IDX_INCLUDED')) {
$err_url_0 = 'db_details.php3' $err_url_0 = 'db_details.php3?' . PMA_generate_common_url($db);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db);
} }
// Gets table keys and store them in arrays // Gets table keys and store them in arrays
@@ -167,12 +163,7 @@ if (get_magic_quotes_gpc()) {
if (!defined('PMA_IDX_INCLUDED') if (!defined('PMA_IDX_INCLUDED')
&& (isset($index) && isset($do_save_data))) { && (isset($index) && isset($do_save_data))) {
$err_url = 'tbl_indexes.php3' $err_url = 'tbl_indexes.php3?' . PMA_generate_common_url($db, $table);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table);
if (empty($old_index)) { if (empty($old_index)) {
$err_url .= '&amp;create_index=1&amp;idx_num_fields=' . $idx_num_fields; $err_url .= '&amp;create_index=1&amp;idx_num_fields=' . $idx_num_fields;
} else { } else {
@@ -306,11 +297,7 @@ else if (!defined('PMA_IDX_INCLUDED')
<!-- Build index form --> <!-- Build index form -->
<form action="tbl_indexes.php3" method="post" name="index_frm" <form action="tbl_indexes.php3" method="post" name="index_frm"
onsubmit="if (typeof(this.elements['index'].disabled) != 'undefined') {this.elements['index'].disabled = false}"> onsubmit="if (typeof(this.elements['index'].disabled) != 'undefined') {this.elements['index'].disabled = false}">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<?php <?php
if (isset($create_index)) { if (isset($create_index)) {
echo '<input type="hidden" name="create_index" value="1" />'; echo '<input type="hidden" name="create_index" value="1" />';
@@ -424,11 +411,7 @@ else if (!defined('PMA_IDX_INCLUDED')
?> ?>
<!-- Indexes form --> <!-- Indexes form -->
<form action="tbl_indexes.php3" method="post"> <form action="tbl_indexes.php3" method="post">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<?php <?php
echo "\n"; echo "\n";
echo ' ' . $strIndexes . '&nbsp;:' . "\n"; echo ' ' . $strIndexes . '&nbsp;:' . "\n";

View File

@@ -34,12 +34,7 @@ require('./libraries/common.lib.php3');
/** /**
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
*/ */
$err_url = 'tbl_properties.php3' $err_url = 'tbl_properties.ph3?' . PMA_generate_common_url($db, $table);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table);
/** /**

View File

@@ -22,18 +22,9 @@ $cfgRelation = PMA_getRelationsParam();
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
*/ */
if (isset($table)) { if (isset($table)) {
$err_url = 'tbl_properties.php3' $err_url = 'tbl_properties.php3?' . PMA_generate_common_url($db, $table);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table);
} else { } else {
$err_url = 'db_details.php3' $err_url = 'db_details.php3?' . PMA_generate_common_url($db);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db);
} }

View File

@@ -5,12 +5,8 @@
?> ?>
<form method="post" action="<?php echo $action; ?>"> <form method="post" action="<?php echo $action; ?>">
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<?php <?php
echo PMA_generate_common_hidden_inputs($db, $table);
if ($action == 'tbl_create.php3') { if ($action == 'tbl_create.php3') {
?> ?>
<input type="hidden" name="reload" value="1" /> <input type="hidden" name="reload" value="1" />

View File

@@ -20,17 +20,8 @@ if (!defined('PMA_BOOKMARK_LIB_INCLUDED')) {
/** /**
* Defines the urls to return to in case of error in a sql statement * Defines the urls to return to in case of error in a sql statement
*/ */
$err_url_0 = $cfg['DefaultTabDatabase'] $err_url_0 = $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db);
. '?lang=' . $lang $err_url = $cfg['DefaultTabTable'] . '?' . PMA_generate_common_url($db, $table);
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db);
$err_url = $cfg['DefaultTabTable']
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table);
/** /**
@@ -53,10 +44,6 @@ if (!isset($message)) {
/** /**
* Set parameters for links * Set parameters for links
*/ */
$url_query = 'lang=' . $lang $url_query = PMA_generate_common_url($db, $table);
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table);
?> ?>

View File

@@ -17,11 +17,7 @@ require('./tbl_properties_table_info.php3');
</p> </p>
<form method="post" action="tbl_dump.php3" name="tbl_dump"> <form method="post" action="tbl_dump.php3" name="tbl_dump">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<table cellpadding="5" border="2" align="center"> <table cellpadding="5" border="2" align="center">
<tr> <tr>

View File

@@ -58,11 +58,7 @@ if (PMA_MYSQL_INT_VERSION >= 32334) {
<!-- Order the table --> <!-- Order the table -->
<li> <li>
<form method="post" action="tbl_properties_operations.php3"> <form method="post" action="tbl_properties_operations.php3">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<?php echo $strAlterOrderBy; ?>&nbsp;: <?php echo $strAlterOrderBy; ?>&nbsp;:
<select name="order_field" style="vertical-align: middle"> <select name="order_field" style="vertical-align: middle">
<?php <?php
@@ -88,11 +84,7 @@ echo "\n";
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<form method="post" action="tbl_rename.php3" <form method="post" action="tbl_rename.php3"
onsubmit="return emptyFormElements(this, 'new_name')"> onsubmit="return emptyFormElements(this, 'new_name')">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<input type="hidden" name="reload" value="1" /> <input type="hidden" name="reload" value="1" />
<?php echo $strRenameTable; ?>&nbsp;: <?php echo $strRenameTable; ?>&nbsp;:
<input type="text" size="20" name="new_name" value="<?php echo htmlspecialchars($table); ?>" class="textfield" onfocus="this.select()" />&nbsp; <input type="text" size="20" name="new_name" value="<?php echo htmlspecialchars($table); ?>" class="textfield" onfocus="this.select()" />&nbsp;
@@ -109,11 +101,7 @@ echo "\n";
<td valign="top"> <td valign="top">
<form method="post" action="tbl_move_copy.php3" <form method="post" action="tbl_move_copy.php3"
onsubmit="return emptyFormElements(this, 'new_name')"> onsubmit="return emptyFormElements(this, 'new_name')">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<input type="hidden" name="reload" value="1" /> <input type="hidden" name="reload" value="1" />
<input type="hidden" name="what" value="data" /> <input type="hidden" name="what" value="data" />
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
@@ -128,7 +116,7 @@ echo "\n";
<option value=""></option> <option value=""></option>
<?php <?php
// The function used below is defined in "common.lib.php3" // The function used below is defined in "common.lib.php3"
PMA_availableDatabases('main.php3?lang=' . $lang . '&amp;server=' . $server); PMA_availableDatabases('main.php3?' . PMA_generate_common_url());
for ($i = 0; $i < $num_dbs; $i++) { for ($i = 0; $i < $num_dbs; $i++) {
echo ' '; echo ' ';
echo '<option value="' . str_replace('"', '&quot;', $dblist[$i]) . '">' . htmlspecialchars($dblist[$i]) . '</option>'; echo '<option value="' . str_replace('"', '&quot;', $dblist[$i]) . '">' . htmlspecialchars($dblist[$i]) . '</option>';
@@ -152,11 +140,7 @@ for ($i = 0; $i < $num_dbs; $i++) {
<td valign="top"> <td valign="top">
<form method="post" action="tbl_move_copy.php3" <form method="post" action="tbl_move_copy.php3"
onsubmit="return emptyFormElements(this, 'new_name')"> onsubmit="return emptyFormElements(this, 'new_name')">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<input type="hidden" name="reload" value="1" /> <input type="hidden" name="reload" value="1" />
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<tr> <tr>

View File

@@ -58,10 +58,7 @@ if (PMA_MYSQL_INT_VERSION >= 32322) {
<!-- Table comments --> <!-- Table comments -->
<li> <li>
<form method="post" action="tbl_properties_options.php3"> <form method="post" action="tbl_properties_options.php3">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<?php echo $strTableComments; ?>&nbsp;:&nbsp; <?php echo $strTableComments; ?>&nbsp;:&nbsp;
<input type="hidden" name="prev_comment" value="<?php echo urlencode($show_comment); ?>" />&nbsp; <input type="hidden" name="prev_comment" value="<?php echo urlencode($show_comment); ?>" />&nbsp;
<input type="text" name="comment" maxlength="60" size="30" value="<?php echo htmlspecialchars($show_comment); ?>" class="textfield" style="vertical-align: middle" onfocus="this.select()" />&nbsp; <input type="text" name="comment" maxlength="60" size="30" value="<?php echo htmlspecialchars($show_comment); ?>" class="textfield" style="vertical-align: middle" onfocus="this.select()" />&nbsp;
@@ -108,10 +105,7 @@ if (PMA_MYSQL_INT_VERSION >= 32322) {
?> ?>
<li> <li>
<form method="post" action="tbl_properties_options.php3"> <form method="post" action="tbl_properties_options.php3">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<?php echo $strTableType; ?>&nbsp;:&nbsp; <?php echo $strTableType; ?>&nbsp;:&nbsp;
<select name="tbl_type" style="vertical-align: middle"> <select name="tbl_type" style="vertical-align: middle">
<option value="MYISAM"<?php if ($tbl_type == 'MYISAM') echo ' selected="selected"'; ?>>MyISAM</option> <option value="MYISAM"<?php if ($tbl_type == 'MYISAM') echo ' selected="selected"'; ?>>MyISAM</option>
@@ -154,10 +148,7 @@ if (PMA_MYSQL_INT_VERSION >= 32322) {
<tr> <tr>
<td valign="top"> <td valign="top">
<form method="post" action="tbl_properties_options.php3"> <form method="post" action="tbl_properties_options.php3">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<tr> <tr>

View File

@@ -57,10 +57,7 @@ $fields_cnt = mysql_num_rows($fields_rs);
<!-- TABLE INFORMATIONS --> <!-- TABLE INFORMATIONS -->
<form action="tbl_properties_structure.php3"> <form action="tbl_properties_structure.php3">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<table border="<?php echo $cfg['Border']; ?>"> <table border="<?php echo $cfg['Border']; ?>">
<tr> <tr>
@@ -503,10 +500,7 @@ echo "\n";
<li> <li>
<form method="post" action="tbl_addfield.php3" <form method="post" action="tbl_addfield.php3"
onsubmit="return checkFormElementInRange(this, 'num_fields', 1)"> onsubmit="return checkFormElementInRange(this, 'num_fields', 1)">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<?php echo $strAddNewField; ?>&nbsp;: <?php echo $strAddNewField; ?>&nbsp;:
<input type="text" name="num_fields" size="2" maxlength="2" value="1" class="textfield" style="vertical-align: middle" onfocus="this.select()" /> <input type="text" name="num_fields" size="2" maxlength="2" value="1" class="textfield" style="vertical-align: middle" onfocus="this.select()" />
<select name="after_field" style="vertical-align: middle"> <select name="after_field" style="vertical-align: middle">

View File

@@ -63,11 +63,7 @@ $auto_sel = ($cfg['TextareaAutoSelect'])
<form method="post" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; echo "\n"; ?> <form method="post" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; echo "\n"; ?>
onsubmit="return checkSqlQuery(this)" name="sqlform"> onsubmit="return checkSqlQuery(this)" name="sqlform">
<input type="hidden" name="is_js_confirmed" value="0" /> <input type="hidden" name="is_js_confirmed" value="0" />
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<input type="hidden" name="pos" value="0" /> <input type="hidden" name="pos" value="0" />
<input type="hidden" name="goto" value="<?php echo $goto; ?>" /> <input type="hidden" name="goto" value="<?php echo $goto; ?>" />
<input type="hidden" name="zero_rows" value="<?php echo $strSuccess; ?>" /> <input type="hidden" name="zero_rows" value="<?php echo $strSuccess; ?>" />

View File

@@ -214,10 +214,7 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) {
?> ?>
<form method="post" action="tbl_relation.php3"> <form method="post" action="tbl_relation.php3">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<input type="hidden" name="submit_rel" value="true" /> <input type="hidden" name="submit_rel" value="true" />
<table> <table>
@@ -289,10 +286,7 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) {
echo "\n"; echo "\n";
?> ?>
<form method="post" action="tbl_relation.php3"> <form method="post" action="tbl_relation.php3">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<input type="hidden" name="submit_show" value="true" /> <input type="hidden" name="submit_show" value="true" />
<p><?php echo $strChangeDisplay; ?></p> <p><?php echo $strChangeDisplay; ?></p>
@@ -326,10 +320,7 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) {
echo "\n"; echo "\n";
?> ?>
<form method="post" action="tbl_relation.php3"> <form method="post" action="tbl_relation.php3">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<input type="hidden" name="submit_comm" value="true" /> <input type="hidden" name="submit_comm" value="true" />
<table> <table>

View File

@@ -14,12 +14,7 @@ require('./libraries/common.lib.php3');
/** /**
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
*/ */
$err_url = 'tbl_properties.php3' $err_url = 'tbl_properties.php3?' . PMA_generate_common_url($db, $table);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table);
/** /**

View File

@@ -22,12 +22,8 @@ if (!isset($dontlimitchars)) {
} }
$is_gotofile = FALSE; $is_gotofile = FALSE;
if (isset($after_insert) && $after_insert == 'new_insert') { if (isset($after_insert) && $after_insert == 'new_insert') {
$goto = 'tbl_change.php3' $goto = 'tbl_change.php3?'
. '?lang=' . $lang . PMA_generate_common_url($db, $table)
. '&convcharset=' . $convcharset
. '&server=' . $server
. '&db=' . urlencode($db)
. '&table=' . urlencode($table)
. '&goto=' . urlencode($goto) . '&goto=' . urlencode($goto)
. '&pos=' . $pos . '&pos=' . $pos
. '&session_max_rows=' . $session_max_rows . '&session_max_rows=' . $session_max_rows
@@ -37,11 +33,7 @@ if (isset($after_insert) && $after_insert == 'new_insert') {
. (empty($sql_query) ? '' : '&sql_query=' . urlencode($sql_query)); . (empty($sql_query) ? '' : '&sql_query=' . urlencode($sql_query));
} else if ($goto == 'sql.php3') { } else if ($goto == 'sql.php3') {
$goto = 'sql.php3?' $goto = 'sql.php3?'
. 'lang=' . $lang . PMA_generate_common_url($db, $table)
. '&convcharset=' . $convcharset
. '&server=' . $server
. '&db=' . urlencode($db)
. '&table=' . urlencode($table)
. '&pos=' . $pos . '&pos=' . $pos
. '&session_max_rows=' . $session_max_rows . '&session_max_rows=' . $session_max_rows
. '&disp_direction=' . $disp_direction . '&disp_direction=' . $disp_direction

View File

@@ -33,12 +33,7 @@ if (!isset($param) || $param[0] == '') {
$goto = $cfg['DefaultTabTable']; $goto = $cfg['DefaultTabTable'];
} }
// Defines the url to return to in case of error in the next sql statement // Defines the url to return to in case of error in the next sql statement
$err_url = $goto $err_url = $goto . '?' . PMA_generate_common_url($db, $table);
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table);
// Gets the list and number of fields // Gets the list and number of fields
$local_query = 'SHOW FIELDS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($db); $local_query = 'SHOW FIELDS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($db);
@@ -74,11 +69,7 @@ if (!isset($param) || $param[0] == '') {
$foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE); $foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE);
?> ?>
<form method="post" action="tbl_select.php3"> <form method="post" action="tbl_select.php3">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
<input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
<input type="hidden" name="goto" value="<?php echo $goto; ?>" /> <input type="hidden" name="goto" value="<?php echo $goto; ?>" />
<input type="hidden" name="back" value="tbl_select.php3" /> <input type="hidden" name="back" value="tbl_select.php3" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

View File

@@ -13,13 +13,7 @@ require('./libraries/common.lib.php3');
/** /**
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
*/ */
$err_url = 'user_details.php3' $err_url = 'user_details.php3?' . PMA_generate_common_url('mysql', 'user');
. '?lang=' . $lang
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server
. '&amp;db=mysql'
. '&amp;table=user';
/** /**
* Displays the table of grants for an user * Displays the table of grants for an user
@@ -72,7 +66,7 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
echo "\n"; echo "\n";
// 2. Table body // 2. Table body
$url_query = 'lang=' . $lang . '&amp;convcharset=' . $convcharset . '&amp;server=' . $server . '&amp;db=mysql&amp;table=user'; $url_query = PMA_generate_common_url('mysql', 'user');
while ($row = (is_array($host_db_result) ? $host_db_result : PMA_mysql_fetch_array($host_db_result))) { while ($row = (is_array($host_db_result) ? $host_db_result : PMA_mysql_fetch_array($host_db_result))) {
$local_query = 'SHOW GRANTS FOR \'' . $row['User'] . '\'@\'' . $row['Host'] . '\''; $local_query = 'SHOW GRANTS FOR \'' . $row['User'] . '\'@\'' . $row['Host'] . '\'';
@@ -346,7 +340,7 @@ function PMA_normalOperations()
<li> <li>
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<a href="user_details.php3?lang=<?php echo $lang; ?>&amp;convcharset=<?php echo $convcharset; ?>&amp;server=<?php echo $server; ?>&amp;db=mysql&amp;table=user&amp;mode=reload"> <a href="user_details.php3?<?php echo PMA_generate_common_url('mysql', 'user'); ?>&amp;mode=reload">
<?php echo $GLOBALS['strReloadMySQL']; ?></a>&nbsp; <?php echo $GLOBALS['strReloadMySQL']; ?></a>&nbsp;
<?php echo PMA_showMySQLDocu('MySQL_Database_Administration.', 'FLUSH') . "\n"; ?> <?php echo PMA_showMySQLDocu('MySQL_Database_Administration.', 'FLUSH') . "\n"; ?>
</div> </div>
@@ -371,9 +365,7 @@ function PMA_normalOperations()
} // end if } // end if
?> ?>
</select> </select>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs(); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="check" value="1" /> <input type="hidden" name="check" value="1" />
<input type="submit" value="<?php echo $GLOBALS['strGo']; ?>" /> <input type="submit" value="<?php echo $GLOBALS['strGo']; ?>" />
</td> </td>
@@ -443,9 +435,7 @@ function PMA_normalOperations()
echo "\n"; echo "\n";
PMA_tablePrivileges('addUserForm'); PMA_tablePrivileges('addUserForm');
?> ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs(); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="submit" name="submit_addUser" value="<?php echo $GLOBALS['strGo']; ?>" /> <input type="submit" name="submit_addUser" value="<?php echo $GLOBALS['strGo']; ?>" />
</form> </form>
</li> </li>
@@ -485,16 +475,14 @@ function PMA_grantOperations($grants)
<li> <li>
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<a href="user_details.php3?lang=<?php echo $lang; ?>&amp;convcharset=<?php echo $convcharset; ?>&amp;server=<?php echo $server; ?>&amp;db=mysql&amp;table=user"> <a href="user_details.php3?<?php echo PMA_generate_common_url('mysql', 'user'); ?>">
<?php echo $GLOBALS['strBack']; ?></a> <?php echo $GLOBALS['strBack']; ?></a>
</div> </div>
</li> </li>
<li> <li>
<form action="user_details.php3" method="post" name="userGrants"> <form action="user_details.php3" method="post" name="userGrants">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs(); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="grants" value="1" /> <input type="hidden" name="grants" value="1" />
<input type="hidden" name="host" value="<?php echo str_replace('"', '&quot;', $host); ?>" /> <input type="hidden" name="host" value="<?php echo str_replace('"', '&quot;', $host); ?>" />
<input type="hidden" name="pma_user" value="<?php echo str_replace('"', '&quot;', $pma_user); ?>" /> <input type="hidden" name="pma_user" value="<?php echo str_replace('"', '&quot;', $pma_user); ?>" />
@@ -686,7 +674,7 @@ function PMA_editOperations($host, $user)
<li> <li>
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<a href="user_details.php3?lang=<?php echo $lang; ?>&amp;convcharset=<?php echo $convcharset; ?>&amp;server=<?php echo $server; ?>&amp;db=mysql&amp;table=user"> <a href="user_details.php3?<?php echo PMA_generate_common_url('mysql', 'user'); ?>">
<?php echo $GLOBALS['strBack']; ?></a> <?php echo $GLOBALS['strBack']; ?></a>
</div> </div>
</li> </li>
@@ -751,9 +739,7 @@ function PMA_editOperations($host, $user)
</td> </td>
</tr> </tr>
</table> </table>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs(); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="host" value="<?php echo str_replace('"', '&quot;', $host); ?>" /> <input type="hidden" name="host" value="<?php echo str_replace('"', '&quot;', $host); ?>" />
<input type="hidden" name="pma_user" value="<?php echo str_replace('"', '&quot;', $user); ?>" /> <input type="hidden" name="pma_user" value="<?php echo str_replace('"', '&quot;', $user); ?>" />
<input type="submit" name="submit_updProfile" value="<?php echo $GLOBALS['strGo']; ?>" /> <input type="submit" name="submit_updProfile" value="<?php echo $GLOBALS['strGo']; ?>" />
@@ -767,9 +753,7 @@ function PMA_editOperations($host, $user)
PMA_tablePrivileges('privForm', $row); PMA_tablePrivileges('privForm', $row);
echo "\n"; echo "\n";
?> ?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs(); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="host" value="<?php echo str_replace('"', '&quot;', $host); ?>" /> <input type="hidden" name="host" value="<?php echo str_replace('"', '&quot;', $host); ?>" />
<input type="hidden" name="pma_user" value="<?php echo str_replace('"', '&quot;', $user); ?>" /> <input type="hidden" name="pma_user" value="<?php echo str_replace('"', '&quot;', $user); ?>" />
<input type="submit" name="submit_chgPriv" value="<?php echo $GLOBALS['strGo']; ?>" /> <input type="submit" name="submit_chgPriv" value="<?php echo $GLOBALS['strGo']; ?>" />
@@ -879,17 +863,17 @@ function PMA_tableUsers($host = FALSE, $user = FALSE)
$strPriv = '<span style="color: #002E80">' . $GLOBALS['strNoPrivileges'] . '</span>'; $strPriv = '<span style="color: #002E80">' . $GLOBALS['strNoPrivileges'] . '</span>';
} }
$query = 'lang=' . $lang . '&amp;server=' . $server . '&amp;db=mysql&amp;table=user&amp;convcharset=' . $convcharset; $query = PMA_generate_common_url('mysql', 'user');
if (!$user) { if (!$user) {
$edit_url = 'user_details.php3' $edit_url = 'user_details.php3?'
. '?lang=' . $lang . '&amp;convcharset=' . $convcharset . '&amp;server=' . $server . PMA_generate_common_url()
. '&amp;edit=1&amp;host=' . urlencode($row['Host']) . '&amp;pma_user=' . urlencode($row['User']); . '&amp;edit=1&amp;host=' . urlencode($row['Host']) . '&amp;pma_user=' . urlencode($row['User']);
} }
$delete_url = 'user_details.php3' $delete_url = 'user_details.php3?'
. '?' . $query . $query
. '&amp;delete=1&amp;confirm=1&amp;delete_host=' . urlencode($row['Host']) . '&amp;delete_user=' . urlencode($row['User']); . '&amp;delete=1&amp;confirm=1&amp;delete_host=' . urlencode($row['Host']) . '&amp;delete_user=' . urlencode($row['User']);
$check_url = 'user_details.php3' $check_url = 'user_details.php3?'
. '?lang=' . $lang . '&amp;convcharset=' . $convcharset . '&amp;server=' . $server . PMA_generate_common_url()
. '&amp;grants=1&amp;host=' . urlencode($row['Host']) . '&amp;pma_user=' . urlencode($row['User']); . '&amp;grants=1&amp;host=' . urlencode($row['Host']) . '&amp;pma_user=' . urlencode($row['User']);
?> ?>
@@ -972,11 +956,7 @@ function PMA_confirm($the_host, $the_user) {
echo 'DELETE FROM mysql.user WHERE Host = \'' . $the_host . '\' AND User = \'' . $the_user . '\'' . '<br />' . "\n"; echo 'DELETE FROM mysql.user WHERE Host = \'' . $the_host . '\' AND User = \'' . $the_user . '\'' . '<br />' . "\n";
?> ?>
<form action="user_details.php3" method="post"> <form action="user_details.php3" method="post">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs('mysql', 'user'); ?>
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="mysql" />
<input type="hidden" name="table" value="user" />
<input type="hidden" name="delete" value="<?php echo(isset($GLOBALS['delete']) ? '1' : '0'); ?>" /> <input type="hidden" name="delete" value="<?php echo(isset($GLOBALS['delete']) ? '1' : '0'); ?>" />
<input type="hidden" name="delete_host" value="<?php echo str_replace('"', '&quot;', $the_host); ?>" /> <input type="hidden" name="delete_host" value="<?php echo str_replace('"', '&quot;', $the_host); ?>" />
<input type="hidden" name="delete_user" value="<?php echo str_replace('"', '&quot;', $the_user); ?>" /> <input type="hidden" name="delete_user" value="<?php echo str_replace('"', '&quot;', $the_user); ?>" />
@@ -1501,7 +1481,7 @@ else if (isset($check) && $check) {
?> ?>
<ul> <ul>
<li> <li>
<a href="user_details.php3?lang=<?php echo $lang;?>&amp;convcharset=<?php echo $convcharset; ?>&amp;server=<?php echo $server; ?>&amp;db=mysql&amp;table=user"> <a href="user_details.php3?<?php echo PMA_generate_common_url('mysql', 'user'); ?>">
<?php echo $strBack; ?></a> <?php echo $strBack; ?></a>
</li> </li>
</ul> </ul>

View File

@@ -50,9 +50,7 @@ if (isset($nopass)) {
} }
// Defines the url to return to in case of error in the sql statement // Defines the url to return to in case of error in the sql statement
$common_url_query = 'lang=' . $lang $common_url_query = PMA_generate_common_url();
. '&amp;convcharset=' . $convcharset
. '&amp;server=' . $server;
$err_url = 'user_password.php3?' . $common_url_query; $err_url = 'user_password.php3?' . $common_url_query;
@@ -107,8 +105,7 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5)
// Displays the form // Displays the form
?> ?>
<form method="post" action="./user_password.php3" name="chgPassword" onsubmit="return checkPassword(this)"> <form method="post" action="./user_password.php3" name="chgPassword" onsubmit="return checkPassword(this)">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <?php echo PMA_generate_common_hidden_inputs(); ?>
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<table border="0"> <table border="0">
<tr> <tr>
<td colspan="2"> <td colspan="2">