Bug #728935 // See discussion on Mailinglist about QueryFramesJS set to true
and having JS deactivated.
This commit is contained in:
@@ -5,6 +5,14 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2003-04-28 Garvin Hicking <me@supergarv.de>
|
||||
* index.php3, queryframe.php3, tbl_query_box.php3, querywindow.php3:
|
||||
Even more issues when QueryFrameJS is set to true, but JS is not
|
||||
activated. Haven't ever thought this would be necessary. ;)
|
||||
I tested everything with QueryFrame/QueryFrameJS set to true/false
|
||||
with and without JavaScript enabled, and got everything working.
|
||||
Please verify for yourselves! :)
|
||||
|
||||
2003-04-28 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* lang/polish: update, thanks to Jakub Wilk
|
||||
|
||||
|
36
index.php3
36
index.php3
@@ -49,12 +49,8 @@ if ($cfg['QueryHistoryDB'] && $cfgRelation['historywork']) {
|
||||
PMA_purgeHistory($cfg['Server']['user']);
|
||||
}
|
||||
|
||||
if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
|
||||
$phpmain_hash = md5($cfg['PmaAbsoluteUri'] . time());
|
||||
} else {
|
||||
$phpmain_hash = md5($cfg['PmaAbsoluteUri']);
|
||||
}
|
||||
|
||||
$phpmain_hash = md5($cfg['PmaAbsoluteUri']);
|
||||
$phpmain_hash_js = time();
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
||||
@@ -66,14 +62,30 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
|
||||
</head>
|
||||
|
||||
<frameset cols="<?php echo $cfg['LeftWidth']; ?>,*" rows="*">
|
||||
<?php if ($cfg['QueryFrame']) {?>
|
||||
<?php if ($cfg['QueryFrame']) { ?>
|
||||
<frameset rows="*, 50" framespacing="0" frameborder="0" border="0">
|
||||
<?php } ?>
|
||||
<frame src="left.php3?<?php echo $url_query; ?>&hash=<?php echo $phpmain_hash; ?>" name="nav" frameborder="0" />
|
||||
<?php if ($cfg['QueryFrame']) { ?>
|
||||
<frame src="queryframe.php3?<?php echo $url_query; ?>&hash=<?php echo $phpmain_hash; ?>" name="queryframe" frameborder="0" />
|
||||
<?php
|
||||
if ($cfg['QueryFrameJS']) {?>
|
||||
<script type="text/javascript">
|
||||
document.writeln('<frame src="left.php3?<?php echo $url_query; ?>&hash=<?php echo $phpmain_hash . $phpmain_hash_js; ?>" name="nav" frameborder="0" />');
|
||||
documkent.writeln('<frame src="queryframe.php3?<?php echo $url_query; ?>&hash=<?php echo $phpmain_hash . $phpmain_hash_js; ?>" name="queryframe" frameborder="0" />');
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<?php } ?>
|
||||
<frame src="left.php3?<?php echo $url_query; ?>&hash=<?php echo $phpmain_hash; ?>" name="nav" frameborder="0" />
|
||||
<frame src="queryframe.php3?<?php echo $url_query; ?>&hash=<?php echo $phpmain_hash; ?>" name="queryframe" frameborder="0" />
|
||||
<?php if ($cfg['QueryFrameJS']) { ?>
|
||||
</noscript>
|
||||
<?php } ?>
|
||||
</frameset>
|
||||
<?php } ?>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<frame src="left.php3?<?php echo $url_query; ?>&hash=<?php echo $phpmain_hash; ?>" name="nav" frameborder="0" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<frame src="<?php echo (empty($db)) ? 'main.php3' : $cfg['DefaultTabDatabase']; ?>?<?php echo $url_query; ?>" name="phpmain<?php echo $phpmain_hash; ?>" frameborder="1" />
|
||||
|
||||
<noframes>
|
||||
|
@@ -96,7 +96,12 @@ if ($cfg['QueryFrameJS']) {
|
||||
}
|
||||
?>
|
||||
<center>
|
||||
<a href="<?php echo $href; ?>" <?php echo $target . ' ' . $onclick; ?>><?php echo $strQueryFrame; ?></a>
|
||||
<script type="text/javascript">
|
||||
document.writeln('<a href="<?php echo $href; ?>" <?php echo $target . ' ' . $onclick; ?>><?php echo $strQueryFrame; ?></a>');
|
||||
</script>
|
||||
<noscript>
|
||||
<a href="<?php echo $href; ?>&no_js=true" <?php echo $target . ' ' . $onclick; ?> target="phpmain<?php echo $hash; ?>"><?php echo $strQueryFrame; ?></a>
|
||||
</noscript>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
|
@@ -92,7 +92,7 @@ var confirmMsg = '<?php echo(($GLOBALS['cfg']['Confirm']) ? str_replace('\'', '
|
||||
<body bgcolor="<?php echo ($cfg['QueryFrameJS'] ? $cfg['LeftBgColor'] : $cfg['RightBgColor']); ?>">
|
||||
|
||||
<?php
|
||||
if ($cfg['QueryFrameJS']) {
|
||||
if ($cfg['QueryFrameJS'] && !isset($no_js)) {
|
||||
$querydisplay_tab = (isset($querydisplay_tab) ? $querydisplay_tab : $cfg['QueryWindowDefTab']);
|
||||
|
||||
if ($cfg['LightTabs']) {
|
||||
|
@@ -81,20 +81,16 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
document.writeln('<form method="post" target="phpmain' + <?php echo ((isset($is_inside_querywindow) && $is_inside_querywindow == TRUE) ? 'opener.' : ''); ?>top.frames.nav.document.hashform.hash.value + '" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; ?>');
|
||||
|
||||
document.writeln('onsubmit="return checkSqlQuery(this)" name="sqlform">');
|
||||
document.writeln('<form method="post" target="phpmain' + <?php echo ((isset($is_inside_querywindow) && $is_inside_querywindow == TRUE) ? 'opener.' : ''); ?>top.frames.nav.document.hashform.hash.value + '" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; ?> onsubmit="return checkSqlQuery(this)" name="sqlform">');
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<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">
|
||||
<form method="post" target="phpmain<?php echo md5($cfg['PmaAbsoluteUri']); ?>" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; ?> onsubmit="return checkSqlQuery(this)" name="sqlform">
|
||||
</noscript>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<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">
|
||||
<form method="post" target="phpmain<?php echo md5($cfg['PmaAbsoluteUri']); ?>" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; ?> onsubmit="return checkSqlQuery(this)" name="sqlform">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -300,19 +296,25 @@ if (!isset($is_inside_querywindow) ||
|
||||
if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
|
||||
?>
|
||||
|
||||
<script>
|
||||
document.writeln('<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\' + opener.top.frames.nav.document.hashform.hash.value + \'.location.href = \'' . $ldi_target . '\'; return false;"' : ''); ?>><?php echo $strInsertTextfiles; ?></a></div>');
|
||||
<script type="text/javascript">
|
||||
document.writeln('<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\' + opener.top.frames.nav.document.hashform.hash.value + \'.location.href = \\\'' . $ldi_target . '\\\'; return false;"' : ''); ?>><?php echo $strInsertTextfiles; ?></a></div>');
|
||||
</script>
|
||||
|
||||
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
||||
<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>
|
||||
<script type="text/javascript">
|
||||
document.writeln('<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>');
|
||||
</script>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<noscript>
|
||||
<div style="margin-bottom: 10px"><a href="<?php echo $ldi_target; ?>"><?php echo $strInsertTextfiles; ?></a></div>
|
||||
</noscript>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
|
Reference in New Issue
Block a user