pursuit the "stay on the sub-pages as long as needed" work

This commit is contained in:
Loïc Chapeaux
2002-05-03 13:44:12 +00:00
parent 41b4af4517
commit c73b0a952b
4 changed files with 29 additions and 32 deletions

View File

@@ -13,6 +13,8 @@ $Source$
- messages are now displayed if a query had been submitted to change some - messages are now displayed if a query had been submitted to change some
options or to sort the table; options or to sort the table;
- pursuit the "stay on the sub-pages as long as needed" work. - pursuit the "stay on the sub-pages as long as needed" work.
* db_details.php3; db_details_export.php3; db_details_strucuture.php3:
pursuit the "stay on the sub-pages as long as needed" work.
2002-05-02 Lo<4C>c Chapeaux <lolo@phpheaven.net> 2002-05-02 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* lang/*.inc.php3: cleanup. * lang/*.inc.php3: cleanup.

View File

@@ -2,16 +2,16 @@
/* $Id$ */ /* $Id$ */
/**
* Runs common work
*/
require('./db_details_common.php3'); require('./db_details_common.php3');
$url_query .= '&amp;goto=db_details.php3';
/** /**
* Database work * Database work
*/ */
$url_query = 'lang=' . $lang
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;goto=db_details.php3';
if (isset($show_query) && $show_query == 'y') { if (isset($show_query) && $show_query == 'y') {
// This script has been called by read_dump.php3 // This script has been called by read_dump.php3
if (isset($sql_query_cpy)) { if (isset($sql_query_cpy)) {

View File

@@ -5,8 +5,9 @@
/** /**
* Gets some core libraries * Gets some core libraries
*/ */
$sub_part = '_export'; $sub_part = '_export';
require('./db_details_common.php3'); require('./db_details_common.php3');
$url_query .= '&amp;goto=db_details_export.php3';
require('./db_details_db_info.php3'); require('./db_details_db_info.php3');

View File

@@ -3,10 +3,12 @@
/** /**
* Prepares the tables list * Prepares the tables list if the user where not redirected to this script
* because there is no table in the database ($is_info is TRUE)
*/ */
if (empty($is_info)) { if (empty($is_info)) {
include('./db_details_common.php3'); include('./db_details_common.php3');
$url_query .= '&amp;goto=db_details_structure.php3';
//Drop/delete multiple tables if required //Drop/delete multiple tables if required
if ((!empty($submit_mult) && isset($selected_tbl)) if ((!empty($submit_mult) && isset($selected_tbl))
@@ -59,19 +61,15 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
</tr> </tr>
<?php <?php
$i = $sum_entries = $sum_size = 0; $i = $sum_entries = $sum_size = 0;
$checked = (!empty($checkall) ? ' checked="checked"' : ''); $checked = (!empty($checkall) ? ' checked="checked"' : '');
while (list($keyname, $sts_data) = each($tables)) { while (list($keyname, $sts_data) = each($tables)) {
$table = $sts_data['Name']; $table = $sts_data['Name'];
$table_encoded = urlencode($table); $table_encoded = urlencode($table);
$table_name = htmlspecialchars($table); $table_name = htmlspecialchars($table);
// Sets parameters for links // Sets parameters for links
$url_query = 'lang=' . $lang $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
. '&amp;server=' . $server $bgcolor = ($i++ % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
. '&amp;db=' . urlencode($db)
. '&amp;table=' . $table_encoded
. '&amp;goto=db_details_structure.php3';
$bgcolor = ($i++ % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
echo "\n"; echo "\n";
?> ?>
<tr> <tr>
@@ -84,7 +82,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<?php <?php
if (!empty($sts_data['Rows'])) { if (!empty($sts_data['Rows'])) {
echo '<a href="sql.php3?' . $url_query . '&amp;sql_query=' echo '<a href="sql.php3?' . $tbl_url_query . '&amp;sql_query='
. urlencode('SELECT * FROM ' . PMA_backquote($table)) . urlencode('SELECT * FROM ' . PMA_backquote($table))
. '&amp;pos=0">' . $strBrowse . '</a>'; . '&amp;pos=0">' . $strBrowse . '</a>';
} else { } else {
@@ -95,7 +93,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<?php <?php
if (!empty($sts_data['Rows'])) { if (!empty($sts_data['Rows'])) {
echo '<a href="tbl_select.php3?' . $url_query . '">' echo '<a href="tbl_select.php3?' . $tbl_url_query . '">'
. $strSelect . '</a>'; . $strSelect . '</a>';
} else { } else {
echo $strSelect; echo $strSelect;
@@ -103,22 +101,22 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
?> ?>
</td> </td>
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="tbl_change.php3?<?php echo $url_query; ?>"> <a href="tbl_change.php3?<?php echo $tbl_url_query; ?>">
<?php echo $strInsert; ?></a> <?php echo $strInsert; ?></a>
</td> </td>
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="tbl_properties.php3?<?php echo $url_query; ?>"> <a href="tbl_properties.php3?<?php echo $tbl_url_query; ?>">
<?php echo $strProperties; ?></a> <?php echo $strProperties; ?></a>
</td> </td>
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;reload=1&amp;sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>" <a href="sql.php3?<?php echo $tbl_url_query; ?>&amp;reload=1&amp;sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')"> onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')">
<?php echo $strDrop; ?></a> <?php echo $strDrop; ?></a>
</td> </td>
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<?php <?php
if (!empty($sts_data['Rows'])) { if (!empty($sts_data['Rows'])) {
echo '<a href="sql.php3?' . $url_query echo '<a href="sql.php3?' . $tbl_url_query
. '&amp;sql_query='; . '&amp;sql_query=';
if (PMA_MYSQL_INT_VERSION >= 40000) { if (PMA_MYSQL_INT_VERSION >= 40000) {
echo urlencode('TRUNCATE ' . PMA_backquote($table)) echo urlencode('TRUNCATE ' . PMA_backquote($table))
@@ -199,7 +197,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
?> ?>
<td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"> <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
&nbsp;&nbsp; &nbsp;&nbsp;
<a href="tbl_properties.php3?<?php echo $url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a> <a href="tbl_properties.php3?<?php echo $tbl_url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a>
</td> </td>
<?php <?php
echo "\n"; echo "\n";
@@ -324,12 +322,8 @@ else {
$table_name = htmlspecialchars($table); $table_name = htmlspecialchars($table);
// Sets parameters for links // Sets parameters for links
$url_query = 'lang=' . $lang $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
. '&amp;server=' . $server $bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
. '&amp;db=' . urlencode($db)
. '&amp;table=' . $table_encoded
. '&amp;goto=db_details_structure.php3';
$bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
echo "\n"; echo "\n";
?> ?>
<tr> <tr>
@@ -340,22 +334,22 @@ else {
<b>&nbsp;<label for="checkbox_tbl_<?php echo $i; ?>"><?php echo $table_name; ?></label>&nbsp;</b> <b>&nbsp;<label for="checkbox_tbl_<?php echo $i; ?>"><?php echo $table_name; ?></label>&nbsp;</b>
</td> </td>
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&amp;pos=0"><?php echo $strBrowse; ?></a> <a href="sql.php3?<?php echo $tbl_url_query; ?>&amp;sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&amp;pos=0"><?php echo $strBrowse; ?></a>
</td> </td>
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="tbl_select.php3?<?php echo $url_query; ?>"><?php echo $strSelect; ?></a> <a href="tbl_select.php3?<?php echo $tbl_url_query; ?>"><?php echo $strSelect; ?></a>
</td> </td>
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="tbl_change.php3?<?php echo $url_query; ?>"><?php echo $strInsert; ?></a> <a href="tbl_change.php3?<?php echo $tbl_url_query; ?>"><?php echo $strInsert; ?></a>
</td> </td>
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="tbl_properties.php3?<?php echo $url_query; ?>"><?php echo $strProperties; ?></a> <a href="tbl_properties.php3?<?php echo $tbl_url_query; ?>"><?php echo $strProperties; ?></a>
</td> </td>
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;reload=1&amp;sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, $table_name)); ?>"><?php echo $strDrop; ?></a> <a href="sql.php3?<?php echo $tbl_url_query; ?>&amp;reload=1&amp;sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, $table_name)); ?>"><?php echo $strDrop; ?></a>
</td> </td>
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('DELETE FROM ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenEmptied, $table_name)); ?>"><?php echo $strEmpty; ?></a> <a href="sql.php3?<?php echo $tbl_url_query; ?>&amp;sql_query=<?php echo urlencode('DELETE FROM ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenEmptied, $table_name)); ?>"><?php echo $strEmpty; ?></a>
</td> </td>
<td align="right" bgcolor="<?php echo $bgcolor; ?>"> <td align="right" bgcolor="<?php echo $bgcolor; ?>">
<?php PMA_countRecords($db, $table); echo "\n"; ?> <?php PMA_countRecords($db, $table); echo "\n"; ?>