From 092981e02ba9f855b435290ea7ad84804db4c785 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Fri, 18 Apr 2003 16:11:58 +0000 Subject: [PATCH] Bug #723713 --- ChangeLog | 5 +++++ index.php3 | 2 +- left.php3 | 19 ++++++++++--------- libraries/display_tbl.lib.php3 | 2 +- queryframe.php3 | 2 +- tbl_query_box.php3 | 4 ++-- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 050a595a83..5619350cc4 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-04-18 Garvin Hicking + * left.php3, index.php3, tbl_query_box.php3, + libraries/display_tbl.lib.php3, queryframe.php3: + Fixed Bug #723713 + 2003-04-18 Marc Delisle * Documentation.html: faq about double auth windows * lang/ukrainian: update, thanks to Markijan Baran diff --git a/index.php3 b/index.php3 index 0edca34b11..895cbdbd34 100755 --- a/index.php3 +++ b/index.php3 @@ -67,7 +67,7 @@ if ($cfg['QueryHistoryDB'] && $cfgRelation['historywork']) { - + <body bgcolor="#FFFFFF"> diff --git a/left.php3 b/left.php3 index 8f7ecf75bc..4e762e924c 100755 --- a/left.php3 +++ b/left.php3 @@ -60,7 +60,7 @@ PMA_setFontSizes(); <head> <title>phpMyAdmin</title> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" /> - <base<?php if (!empty($cfg['PmaAbsoluteUri'])) echo ' href="' . $cfg['PmaAbsoluteUri'] . '"'; ?> target="phpmain" /> + <base<?php if (!empty($cfg['PmaAbsoluteUri'])) echo ' href="' . $cfg['PmaAbsoluteUri'] . '"'; ?> target="phpmain<?php echo md5($cfg['PmaAbsoluteUri']); ?>" /> <?php // Expandable/collapsible databases list is only used if there is more than one // database to display @@ -252,9 +252,10 @@ if ($num_dbs > 1) { $book_sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], '\'' . PMA_sqlAddslashes($table) . '\'', 'label'); ?> <nobr><img src="images/spacer.gif" border="0" width="9" height="9" alt="" /> - <a target="phpmain" href="sql.php3?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>&amp;sql_query=<?php echo (isset($book_sql_query) && $book_sql_query != FALSE ? urlencode($book_sql_query) : urlencode('SELECT * FROM ' . PMA_backquote($table))); ?>&amp;pos=0&amp;goto=<?php echo $cfg['DefaultTabTable']; ?>" title="<?php echo $strBrowse . ': ' . htmlspecialchars($url_title); ?>"> + <a target="phpmain<?php echo md5($cfg['PmaAbsoluteUri']); ?>" href="sql.php3?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>&amp;sql_query=<?php echo (isset($book_sql_query) && $book_sql_query != FALSE ? urlencode($book_sql_query) : urlencode('SELECT * FROM ' . PMA_backquote($table))); ?>&amp;pos=0&amp;goto=<?php echo $cfg['DefaultTabTable']; ?>" title="<?php echo $strBrowse . ': ' . htmlspecialchars($url_title); ?>"> <img src="images/browse.png" width="8" height="8" border="0" alt="<?php echo $strBrowse . ': ' . $url_title; ?>" /></a><bdo dir="<?php echo $text_dir; ?>">&nbsp;</bdo> - <a class="tblItem" id="tbl_<?php echo md5($table); ?>" title="<?php echo htmlspecialchars($url_title); ?>" target="phpmain" href="<?php echo $cfg['DefaultTabTable']; ?>?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>"> + <a class="tblItem" id="tbl_<?php echo md5($table); ?>" title="<?php echo htmlspecialchars($url_title); ?>" +target="phpmain<?php echo md5($cfg['PmaAbsoluteUri']); ?>" href="<?php echo $cfg['DefaultTabTable']; ?>?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>"> <?php echo ($alias != '' && $cfg['ShowTooltipAliasTB'] ? $alias : htmlspecialchars($table)); ?></a></nobr><br /> <?php } // end for $t (tables list) @@ -285,12 +286,12 @@ if ($num_dbs > 1) { $book_sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], '\'' . PMA_sqlAddslashes($table) . '\'', 'label'); - $table_list .= ' <nobr><a target="phpmain" href="sql.php3?' . $common_url_query . '&amp;table=' . urlencode($table) . '&amp;sql_query=' . (isset($book_sql_query) && $book_sql_query != FALSE ? urlencode($book_sql_query) : urlencode('SELECT * FROM ' . PMA_backquote($table))) . '&amp;pos=0&amp;goto=' . $cfg['DefaultTabTable'] . '">' . "\n"; + $table_list .= ' <nobr><a target="phpmain' . md5($cfg['PmaAbsoluteUri']) . '" href="sql.php3?' . $common_url_query . '&amp;table=' . urlencode($table) . '&amp;sql_query=' . (isset($book_sql_query) && $book_sql_query != FALSE ? urlencode($book_sql_query) : urlencode('SELECT * FROM ' . PMA_backquote($table))) . '&amp;pos=0&amp;goto=' . $cfg['DefaultTabTable'] . '">' . "\n"; $table_list .= ' <img src="images/browse.png" width="8" height="8" border="0" alt="' . $strBrowse . ': ' . $url_title . '" title="' . $strBrowse . ': ' . htmlspecialchars($url_title) . '" /></a><bdo dir="' . $text_dir . '">&nbsp;</bdo>' . "\n"; if (PMA_USR_BROWSER_AGENT == 'IE') { - $table_list .= ' <span class="tblItem"><a class="tblItem" id="tbl_' . md5($table) . '" title="' . htmlspecialchars($url_title) . '" target="phpmain" href="' . $cfg['DefaultTabTable'] . '?' . $common_url_query . '&amp;table=' . urlencode($table) . '">' . ($alias != '' && $cfg['ShowTooltipAliasTB'] ? $alias : htmlspecialchars($table)) . '</a></span></nobr><br />' . "\n"; + $table_list .= ' <span class="tblItem"><a class="tblItem" id="tbl_' . md5($table) . '" title="' . htmlspecialchars($url_title) . '" target="phpmain' . md5($cfg['PmaAbsoluteUri']) . '" href="' . $cfg['DefaultTabTable'] . '?' . $common_url_query . '&amp;table=' . urlencode($table) . '">' . ($alias != '' && $cfg['ShowTooltipAliasTB'] ? $alias : htmlspecialchars($table)) . '</a></span></nobr><br />' . "\n"; } else { - $table_list .= ' <a class="tblItem" id="tbl_' . md5($table) . '" title="' . htmlspecialchars($url_title) . '" target="phpmain" href="' . $cfg['DefaultTabTable'] . '?' . $common_url_query . '&amp;table=' . urlencode($table) . '">' . ($alias != '' && $cfg['ShowTooltipAliasTB'] ? $alias : htmlspecialchars($table)) . '</a></nobr><br />' . "\n"; + $table_list .= ' <a class="tblItem" id="tbl_' . md5($table) . '" title="' . htmlspecialchars($url_title) . '" target="phpmain' . md5($cfg['PmaAbsoluteUri']) . '" href="' . $cfg['DefaultTabTable'] . '?' . $common_url_query . '&amp;table=' . urlencode($table) . '">' . ($alias != '' && $cfg['ShowTooltipAliasTB'] ? $alias : htmlspecialchars($table)) . '</a></nobr><br />' . "\n"; } } // end for $t (tables list) @@ -300,7 +301,7 @@ if ($num_dbs > 1) { } $selected = ' selected="selected"'; - $table_list_header .= ' <a class="item" target="phpmain" href="' . $cfg['DefaultTabDatabase'] . '?' . $common_url_query . '">' . "\n"; + $table_list_header .= ' <a class="item" target="phpmain' . md5($cfg['PmaAbsoluteUri']) . '" href="' . $cfg['DefaultTabDatabase'] . '?' . $common_url_query . '">' . "\n"; $table_list_header .= ' <span class="heada"><b>' . ($db_tooltip != '' && $cfg['ShowTooltipAliasTB'] ? htmlspecialchars($db_tooltip) : htmlspecialchars($db)) . '</b><bdo dir="' . $text_dir . '">&nbsp;&nbsp;</bdo></span></a><br />' . "\n\n"; } else { $selected = ''; @@ -417,9 +418,9 @@ else if ($num_dbs == 1) { echo "\n"; ?> - <nobr><a target="phpmain" href="sql.php3?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>&amp;sql_query=<?php echo (isset($book_sql_query) && $book_sql_query != FALSE ? urlencode($book_sql_query) : urlencode('SELECT * FROM ' . PMA_backquote($table))); ?>&amp;pos=0&amp;goto=<?php echo $cfg['DefaultTabTable']; ?>" title="<?php echo $strBrowse . ': ' . htmlspecialchars($table); ?>"> + <nobr><a target="phpmain<?php echo md5($cfg['PmaAbsoluteUri']); ?>" href="sql.php3?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>&amp;sql_query=<?php echo (isset($book_sql_query) && $book_sql_query != FALSE ? urlencode($book_sql_query) : urlencode('SELECT * FROM ' . PMA_backquote($table))); ?>&amp;pos=0&amp;goto=<?php echo $cfg['DefaultTabTable']; ?>" title="<?php echo $strBrowse . ': ' . htmlspecialchars($table); ?>"> <img src="images/browse.png" width="8" height="8" border="0" alt="<?php echo $strBrowse . ': ' . htmlspecialchars($table); ?>" /></a><bdo dir="<?php echo $text_dir; ?>">&nbsp;</bdo> - <a class="tblItem" id="tbl_<?php echo md5($table); ?>" title="<?php echo $url_title; ?>" target="phpmain" href="<?php echo $cfg['DefaultTabTable']; ?>?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>"> + <a class="tblItem" id="tbl_<?php echo md5($table); ?>" title="<?php echo $url_title; ?>" target="phpmain<?php echo md5($cfg['PmaAbsoluteUri']); ?>" href="<?php echo $cfg['DefaultTabTable']; ?>?<?php echo $common_url_query; ?>&amp;table=<?php echo urlencode($table); ?>"> <?php echo ($alias != '' && $cfg['ShowTooltipAliasTB'] ? $alias : htmlspecialchars($table)); ?></a></nobr><br /> <?php } // end for $j (tables list) diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index 7246d68ddb..fd91ae247b 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -1001,7 +1001,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) { } // end if (1.2.1) if ($table == $GLOBALS['cfg']['Bookmark']['table'] && $db == $GLOBALS['cfg']['Bookmark']['db']) { - $bookmark_go = '<form method="post" target="phpmain" action="read_dump.php3">' + $bookmark_go = '<form method="post" target="phpmain' . md5($GLOBALS['cfg']['PmaAbsoluteUri']) . '" action="read_dump.php3">' . PMA_generate_common_hidden_inputs($row['dbase'], '') . '<input type="hidden" name="id_bookmark" value="' . $row['id'] . '" />' . '<input type="hidden" name="action_bookmark" value="0" />' diff --git a/queryframe.php3 b/queryframe.php3 index 0fdc413eaf..9f312a2ac4 100644 --- a/queryframe.php3 +++ b/queryframe.php3 @@ -91,7 +91,7 @@ if ($cfg['QueryFrameJS']) { $onclick = 'onClick="javascript:open_querywindow(this.href); return false;"'; } else { $href = $anchor; - $target = 'target="phpmain"'; + $target = 'target="phpmain' . md5($cfg['PmaAbsoluteUri']) . '"'; $onclick = ''; } ?> diff --git a/tbl_query_box.php3 b/tbl_query_box.php3 index a0cf9c7159..b29cce696f 100755 --- a/tbl_query_box.php3 +++ b/tbl_query_box.php3 @@ -78,7 +78,7 @@ if ($cfg['QueryFrame'] && (!$cfg['QueryFrameJS'] || ($cfg['QueryFrameJS'] && !$d } ?> - <form method="post" target="phpmain" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; echo "\n"; ?> + <form method="post" target="phpmain<?php echo md5($cfg['PmaAbsoluteUri']); ?>" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; echo "\n"; ?> onsubmit="return checkSqlQuery(this)" name="sqlform"> <input type="hidden" name="is_js_confirmed" value="0" /> <?php echo PMA_generate_common_hidden_inputs($db, $table); ?> @@ -278,7 +278,7 @@ if (!isset($is_inside_querywindow) || <!-- Insert a text file --> <br /><br /> <li> - <div style="margin-bottom: 10px"><a href="<?php echo (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE ? '#' : $ldi_target); ?>" <?php echo (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE ? 'onclick="opener.top.frames.phpmain.location.href = \'' . $ldi_target . '\'; return false;"' : ''); ?>><?php echo $strInsertTextfiles; ?></a></div> + <div style="margin-bottom: 10px"><a href="<?php echo (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE ? '#' : $ldi_target); ?>" <?php echo (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE ? 'onclick="opener.top.frames.phpmain' . md5($cfg['PmaAbsoluteUri']) . '.location.href = \'' . $ldi_target . '\'; return false;"' : ''); ?>><?php echo $strInsertTextfiles; ?></a></div> </li> <?php } -- 2.11.4.GIT