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

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