syncronize id and name attribute for frame tags but keep IE sending querywindow form to the correct window (bug #1374757, #1364470, #1297985)

This commit is contained in:
Sebastian Mendel
2005-12-07 22:59:37 +00:00
parent 59361bb98f
commit 8444d62a58
3 changed files with 9 additions and 12 deletions

View File

@@ -6,7 +6,6 @@
*
* @uses libraries/common.lib.php global fnctions
* @uses libraries/relation.lib.php table relations
* @uses $_SESSION['window_name_hash'] to set it
* @uses $GLOBALS['strNoFrames']
* @uses $GLOBALS['cfg']['QueryHistoryDB']
* @uses $GLOBALS['cfg']['Server']['user']
@@ -41,9 +40,6 @@ require_once('./libraries/common.lib.php');
*/
require_once('./libraries/relation.lib.php');
// hash for the window names, against window hijacking
$_SESSION['window_name_hash'] = time();
// free the session file, for the other frames to be loaded
session_write_close();
@@ -143,12 +139,12 @@ header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
</script>
</head>
<frameset cols="<?php echo $GLOBALS['cfg']['LeftWidth']; ?>,*" rows="*" id="mainFrameset">
<frame frameborder="0" id="leftFrame"
<frame frameborder="0" id="frame_navigation"
src="left.php<?php echo $url_query; ?>"
name="nav<?php echo $_SESSION['window_name_hash']; ?>" />
<frame frameborder="0" id="rightFrame"
name="frame_navigation" />
<frame frameborder="0" id="frame_content"
src="<?php echo $main_target; ?>"
name="phpmain<?php echo $_SESSION['window_name_hash']; ?>" />
name="frame_content" />
<noframes>
<body>
<p><?php echo $GLOBALS['strNoFrames']; ?></p>

View File

@@ -74,7 +74,7 @@ echo "<?xml version=\"1.0\" encoding=\"" . $GLOBALS['charset'] . "\"?".">";
<meta http-equiv="Content-Type"
content="text/html; charset=<?php echo $charset; ?>" />
<base href="<?php echo $GLOBALS['cfg']['PmaAbsoluteUri']; ?>"
target="phpmain<?php echo $_SESSION['window_name_hash']; ?>" />
target="frame_content" />
<link rel="stylesheet" type="text/css"
href="./css/phpmyadmin.css.php?<?php echo PMA_generate_common_url( '', '' ); ?>&amp;js_frame=left" />
<script type="text/javascript" language="javascript">

View File

@@ -101,10 +101,11 @@ function PMA_sqlQueryForm( $query = true, $display_tab = false ) {
// start output
if ( $is_querywindow ) {
?>
<form method="post" id="sqlqueryform"
target="phpmain<?php echo md5( $GLOBALS['cfg']['PmaAbsoluteUri'] ); ?>"
<form method="post" id="sqlqueryform" target="frame_content"
action="import.php"<?php echo $enctype; ?> name="sqlform"
onsubmit="this.target=window.opener.frames[1].name;
onsubmit="save_name = window.opener.parent.frames[1].name;
window.opener.parent.frames[1].name = save_name + '<?php echo time(); ?>';
this.target = window.opener.parent.frames[1].name;
return checkSqlQuery( this );" >
<?php
} else {