Choosing not to execute a drop statement leads now to the calling script
This commit is contained in:
@@ -309,7 +309,12 @@ $url_query = 'lang=' . $lang
|
||||
. '&db=' . urlencode($db)
|
||||
. '&goto=db_details.php3';
|
||||
if (isset($show_query) && $show_query == 'y') {
|
||||
if (get_magic_quotes_gpc()) {
|
||||
// This script has been called by db_readdump.php3
|
||||
if (isset($sql_query_cpy)) {
|
||||
$query_to_display = $sql_query_cpy;
|
||||
}
|
||||
// Other cases
|
||||
else if (get_magic_quotes_gpc()) {
|
||||
$query_to_display = stripslashes($sql_query);
|
||||
}
|
||||
else {
|
||||
@@ -534,7 +539,7 @@ echo ' ' . ' <input type="submit" value="' . $strGo . '" />' . "\n";
|
||||
|
||||
<!-- Drop table -->
|
||||
<li>
|
||||
<a href="sql.php3?server=<?php echo $server; ?>&lang=<?php echo $lang; ?>&db=<?php echo $db; ?>&sql_query=<?php echo urlencode('DROP DATABASE ' . backquote($db)); ?>&zero_rows=<?php echo urlencode($strDatabase . ' ' . htmlspecialchars(backquote($db)) . ' ' . $strHasBeenDropped); ?>&goto=main.php3&reload=true">
|
||||
<a href="sql.php3?server=<?php echo $server; ?>&lang=<?php echo $lang; ?>&db=<?php echo $db; ?>&sql_query=<?php echo urlencode('DROP DATABASE ' . backquote($db)); ?>&zero_rows=<?php echo urlencode($strDatabase . ' ' . htmlspecialchars(backquote($db)) . ' ' . $strHasBeenDropped); ?>&goto=main.php3&back=db_details.php3&reload=true">
|
||||
<?php echo $strDropDB . ' ' . htmlspecialchars($db); ?></a>
|
||||
<?php echo show_docu('manual_Reference.html#DROP_DATABASE') . "\n"; ?>
|
||||
</li>
|
||||
|
@@ -60,7 +60,8 @@ A:hover.nav {font-family: <?php echo $right_font_family; ?>; color: #FF0000}
|
||||
<?php
|
||||
if (isset($db)) {
|
||||
echo '<h1> ' . $strDatabase . ' ' . htmlspecialchars($db);
|
||||
if (isset($table) && !isset($btnDrop)) {
|
||||
if (!empty($table)
|
||||
&& (!isset($btnDrop) || $btnDrop == $strNo)) {
|
||||
echo ' - ' . $strTable . ' ' . htmlspecialchars($table);
|
||||
}
|
||||
echo '</h1>' . "\n";
|
||||
|
12
sql.php3
12
sql.php3
@@ -35,9 +35,18 @@ if (isset($btnDrop) || isset($navig)) {
|
||||
* Go back to further page if table should not be dropped
|
||||
*/
|
||||
if (isset($goto) && $goto == 'sql.php3') {
|
||||
$goto = "sql.php3?server=$server&lang=$lang&db=$db&table=$table&pos=$pos&sql_query=" . urlencode($sql_query);
|
||||
$goto = 'sql.php3'
|
||||
. '?lang=' . $lang
|
||||
. '&server=' . urlencode($server)
|
||||
. '&db=' . urlencode($db)
|
||||
. '&table=' . urlencode($table)
|
||||
. '&pos=' . $pos
|
||||
. '&sql_query=' . urlencode($sql_query);
|
||||
}
|
||||
if (isset($btnDrop) && $btnDrop == $strNo) {
|
||||
if (!empty($back)) {
|
||||
$goto = $back;
|
||||
}
|
||||
if (file_exists('./' . $goto)) {
|
||||
include('./' . ereg_replace('\.\.*', '.', $goto));
|
||||
} else {
|
||||
@@ -78,6 +87,7 @@ if ($do_confirm) {
|
||||
<input type="hidden" name="zero_rows" value="<?php echo isset($zero_rows) ? $zero_rows : ''; ?>" />
|
||||
<input type="hidden" name="table" value="<?php echo isset($table) ? $table : ''; ?>" />
|
||||
<input type="hidden" name="goto" value="<?php echo isset($goto) ? $goto : ''; ?>" />
|
||||
<input type="hidden" name="back" value="<?php echo isset($back) ? $back : ''; ?>" />
|
||||
<input type="hidden" name="reload" value="<?php echo isset($reload) ? $reload : ''; ?>" />
|
||||
<input type="hidden" name="show_query" value="<?php echo isset($show_query) ? $show_query : ''; ?>" />
|
||||
<input type="submit" name="btnDrop" value="<?php echo $strYes; ?>" />
|
||||
|
@@ -973,7 +973,7 @@ else { // MySQL < 3.23
|
||||
|
||||
<!-- Deletes the table -->
|
||||
<li>
|
||||
<a href="sql.php3?<?php echo ereg_replace('tbl_properties.php3$', 'db_details.php3', $url_query); ?>&reload=true&sql_query=<?php echo urlencode('DROP TABLE ' . backquote($table)); ?>&zero_rows=<?php echo urlencode($strTable . ' ' . htmlspecialchars($table) . ' ' . $strHasBeenDropped); ?>">
|
||||
<a href="sql.php3?<?php echo ereg_replace('tbl_properties.php3$', 'db_details.php3', $url_query); ?>&back=tbl_properties.php3&reload=true&sql_query=<?php echo urlencode('DROP TABLE ' . backquote($table)); ?>&zero_rows=<?php echo urlencode($strTable . ' ' . htmlspecialchars($table) . ' ' . $strHasBeenDropped); ?>">
|
||||
<?php echo $strDrop . ' ' . htmlspecialchars($table); ?></a>
|
||||
</li>
|
||||
|
||||
|
Reference in New Issue
Block a user