partial fix for posting SQL without javascript

This commit is contained in:
Michal Čihař
2003-04-28 14:10:13 +00:00
parent 9af23c8ec5
commit f9983af7db
2 changed files with 14 additions and 2 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2003-04-28 Michal Cihar <nijel@users.sourceforge.net>
* tbl_query_box.php3: Partial fix for #728935 (can not submit SQL without
javascript). But there are still problems without javascript.
2003-04-27 Marc Delisle <lem9@users.sourceforge.net>
### 2.5.0-rc2 released

View File

@@ -79,17 +79,25 @@ if ($cfg['QueryFrame'] && (!$cfg['QueryFrameJS'] && !$db || ($cfg['QueryFrameJS'
if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
?>
<script>
<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">');
//-->
</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">
</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">
<?php
}
?>
onsubmit="return checkSqlQuery(this)" name="sqlform">
<input type="hidden" name="is_js_confirmed" value="0" />
<?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="pos" value="0" />