* db_details.php3, db_stats.php3, main.php3, sql.php3
tbl_change.php3, tbl_query_box.php3, user_details.php3 libraries/common.lib.php3: - changed show_query to use 1/0 instead of 'y'/'n' * sql.php3, libraries/common.lib.php3: - Improved logic of edit, show_as_php, explain and validator in the SQL query box
This commit is contained in:
42
ChangeLog
42
ChangeLog
@@ -24,6 +24,13 @@ $Source$
|
|||||||
* ChangeLog:
|
* ChangeLog:
|
||||||
- Neatened Changelog to general follow a format
|
- Neatened Changelog to general follow a format
|
||||||
- (* <filename>: <details>)
|
- (* <filename>: <details>)
|
||||||
|
* db_details.php3, db_stats.php3, main.php3, sql.php3
|
||||||
|
tbl_change.php3, tbl_query_box.php3, user_details.php3
|
||||||
|
libraries/common.lib.php3:
|
||||||
|
- changed show_query to use 1/0 instead of 'y'/'n'
|
||||||
|
* sql.php3, libraries/common.lib.php3:
|
||||||
|
- Improved logic of edit, show_as_php, explain and validator
|
||||||
|
in the SQL query box
|
||||||
|
|
||||||
2002-08-02 Robin Johnson <robbat2@users.sourceforge.net>
|
2002-08-02 Robin Johnson <robbat2@users.sourceforge.net>
|
||||||
* libraries/defines*:
|
* libraries/defines*:
|
||||||
@@ -107,7 +114,7 @@ $Source$
|
|||||||
* lang/italian: update, thanks to Pietro Danesi
|
* lang/italian: update, thanks to Pietro Danesi
|
||||||
* lang/lithuanian: update, thanks to Vilius Zigmantas
|
* lang/lithuanian: update, thanks to Vilius Zigmantas
|
||||||
* lang/dutch: update, thanks to Ivo Teel.
|
* lang/dutch: update, thanks to Ivo Teel.
|
||||||
* :2.3.0-rc4 released
|
2.3.0-rc4 released
|
||||||
|
|
||||||
2002-07-27 Marc Delisle <lem9@users.sourceforge.net>
|
2002-07-27 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* lang/italian: update, thanks to Pietro Danesi
|
* lang/italian: update, thanks to Pietro Danesi
|
||||||
@@ -126,8 +133,8 @@ $Source$
|
|||||||
|
|
||||||
2002-07-25 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2002-07-25 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* libraries/sqlparser.lib.php3:
|
* libraries/sqlparser.lib.php3:
|
||||||
- PHP3 parse errors fixed;
|
- PHP3 parse errors fixed;
|
||||||
- coding standards.
|
- coding standards.
|
||||||
* pdf_schema.php3; lang/*: translated a string.
|
* pdf_schema.php3; lang/*: translated a string.
|
||||||
* header.inc.php3, lines 155-156: better "fix" against bug
|
* header.inc.php3, lines 155-156: better "fix" against bug
|
||||||
#585094 (Runtime Error on Line 62).
|
#585094 (Runtime Error on Line 62).
|
||||||
@@ -258,8 +265,8 @@ $Source$
|
|||||||
* lang/sync_lang.sh: support for multiple convertors (recode added),
|
* lang/sync_lang.sh: support for multiple convertors (recode added),
|
||||||
thanks to Michal Cihar
|
thanks to Michal Cihar
|
||||||
* lang/spanish update:
|
* lang/spanish update:
|
||||||
- thanks to Daniel Hinostroza
|
- thanks to Daniel Hinostroza
|
||||||
- (Daniel.Hinostroza at grunenthal.com.ec)
|
- (Daniel.Hinostroza at grunenthal.com.ec)
|
||||||
* lang/swedish: updates: thanks to Bj<42>rn T. Hallberg
|
* lang/swedish: updates: thanks to Bj<42>rn T. Hallberg
|
||||||
* lang/indonesian: updates, thanks to Rachim Tamsjadi.
|
* lang/indonesian: updates, thanks to Rachim Tamsjadi.
|
||||||
* lang/japanese*: updates, thanks to Yukihiro Kawada
|
* lang/japanese*: updates, thanks to Yukihiro Kawada
|
||||||
@@ -300,8 +307,8 @@ $Source$
|
|||||||
|
|
||||||
2002-07-15 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-07-15 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* libraries/config_import.lib.php3:
|
* libraries/config_import.lib.php3:
|
||||||
- Removed a comment and
|
- Removed a comment and
|
||||||
- Changed the default value for $cfg['AllowAnywhereRecoding'] into FALSE.
|
- Changed the default value for $cfg['AllowAnywhereRecoding'] into FALSE.
|
||||||
* header.inc.php3: Better fix against bug #571409, thanks to Lo<4C>c.
|
* header.inc.php3: Better fix against bug #571409, thanks to Lo<4C>c.
|
||||||
* libraries/common.lib.php3: Coding standards.
|
* libraries/common.lib.php3: Coding standards.
|
||||||
|
|
||||||
@@ -321,7 +328,7 @@ $Source$
|
|||||||
* Documentation.html, db_details_exports.php3, tbl_properties_export.php3:
|
* Documentation.html, db_details_exports.php3, tbl_properties_export.php3:
|
||||||
add a link to a new faq entry explaining some dump options
|
add a link to a new faq entry explaining some dump options
|
||||||
* libraries/relation.lib.php3: bug 575868 Unitialized string offset
|
* libraries/relation.lib.php3: bug 575868 Unitialized string offset
|
||||||
* 2.3.0-rc3 released
|
2.3.0-rc3 released
|
||||||
|
|
||||||
2002-07-14 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-07-14 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* config.inc.php3, libraries/common.lib.php3: Fixed bug #576018.
|
* config.inc.php3, libraries/common.lib.php3: Fixed bug #576018.
|
||||||
@@ -451,7 +458,7 @@ $Source$
|
|||||||
|
|
||||||
2002-06-30 Marc Delisle <lem9@users.sourceforge.net>
|
2002-06-30 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* user_details.php3: fix the tooltip
|
* user_details.php3: fix the tooltip
|
||||||
* 2.3.0-rc2 released
|
2.3.0-rc2 released
|
||||||
|
|
||||||
2002-06-30 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-06-30 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* user_details.php3: Added a tooltip for the new documenation link.
|
* user_details.php3: Added a tooltip for the new documenation link.
|
||||||
@@ -529,13 +536,14 @@ $Source$
|
|||||||
* lang/portuguese.inc.php3 updates: thanks to Lopo Pizarro
|
* lang/portuguese.inc.php3 updates: thanks to Lopo Pizarro
|
||||||
|
|
||||||
2002-06-23 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-06-23 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* Revised some files in /lang/:
|
Revised some files in /lang/:
|
||||||
- chinese_*.inc.php3, estonian.inc.php3, finnish.inc.php3:
|
* chinese_*.inc.php3, estonian.inc.php3, finnish.inc.php3:
|
||||||
Reordered Strings.
|
- Reordered Strings.
|
||||||
- arabic.inc.php3, brazilian_portuguese.inc.php3, bulgarian_*.php3,
|
* arabic.inc.php3, brazilian_portuguese.inc.php3, bulgarian_*.php3,
|
||||||
croatian-*.php3, danish.inc.php3, korean.inc.php3, russian_*.inc.php3,
|
croatian-*.php3, danish.inc.php3, korean.inc.php3, russian_*.inc.php3,
|
||||||
serbian-win1250.inc.php3: Synchronized the untranslated string
|
serbian-win1250.inc.php3:
|
||||||
$strSplitWordsWithSpace with the English translation.
|
- Synchronized the untranslated string
|
||||||
|
$strSplitWordsWithSpace with the English translation.
|
||||||
|
|
||||||
2002-06-23 Olivier L. M<>ller <om@omnis.ch>
|
2002-06-23 Olivier L. M<>ller <om@omnis.ch>
|
||||||
* db_stats.php3: Fixed warning from mysql_free_result.
|
* db_stats.php3: Fixed warning from mysql_free_result.
|
||||||
@@ -1344,7 +1352,7 @@ $Source$
|
|||||||
authentication mode with IIS.
|
authentication mode with IIS.
|
||||||
|
|
||||||
2002-04-21 Marc Delisle <lem9@users.sourceforge.net>
|
2002-04-21 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* ### 2.2.6 released ###
|
### 2.2.6 released ###
|
||||||
|
|
||||||
|
|
||||||
--- Older ChangeLogs can be found on our project website ---
|
--- Older ChangeLogs can be found on our project website ---
|
||||||
|
@@ -11,7 +11,7 @@ $url_query .= '&goto=db_details.php3';
|
|||||||
/**
|
/**
|
||||||
* Database work
|
* Database work
|
||||||
*/
|
*/
|
||||||
if (isset($show_query) && $show_query == 'y') {
|
if (isset($show_query) && $show_query == '1') {
|
||||||
// This script has been called by read_dump.php3
|
// This script has been called by read_dump.php3
|
||||||
if (isset($sql_query_cpy)) {
|
if (isset($sql_query_cpy)) {
|
||||||
$query_to_display = $sql_query_cpy;
|
$query_to_display = $sql_query_cpy;
|
||||||
@@ -65,7 +65,7 @@ $is_upload = (PMA_PHP_INT_VERSION >= 40000 && function_exists('ini_get'))
|
|||||||
onfocus="if (typeof(document.layers) == 'undefined' || typeof(textarea_selected) == 'undefined') {textarea_selected = 1; this.form.elements['sql_query'].select();}">
|
onfocus="if (typeof(document.layers) == 'undefined' || typeof(textarea_selected) == 'undefined') {textarea_selected = 1; this.form.elements['sql_query'].select();}">
|
||||||
<?php echo ((!empty($query_to_display)) ? htmlspecialchars($query_to_display) : ''); ?>
|
<?php echo ((!empty($query_to_display)) ? htmlspecialchars($query_to_display) : ''); ?>
|
||||||
</textarea><br />
|
</textarea><br />
|
||||||
<input type="checkbox" name="show_query" value="y" id="checkbox_show_query" checked="checked" />
|
<input type="checkbox" name="show_query" value="1" id="checkbox_show_query" checked="checked" />
|
||||||
<label for="checkbox_show_query"><?php echo $strShowThisQuery; ?></label><br />
|
<label for="checkbox_show_query"><?php echo $strShowThisQuery; ?></label><br />
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
@@ -31,7 +31,7 @@ if ((!empty($submit_mult) && isset($selected_db))
|
|||||||
. '&convcharset=' . $convcharset
|
. '&convcharset=' . $convcharset
|
||||||
. '&server=' . $server;
|
. '&server=' . $server;
|
||||||
$action = 'db_stats.php3';
|
$action = 'db_stats.php3';
|
||||||
$show_query = 'y';
|
$show_query = '1';
|
||||||
include('./mult_submits.inc.php3');
|
include('./mult_submits.inc.php3');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -329,7 +329,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
|||||||
echo ' ' . $GLOBALS['strSQLQuery'] . ' : ' . "\n";
|
echo ' ' . $GLOBALS['strSQLQuery'] . ' : ' . "\n";
|
||||||
if ($is_modify_link) {
|
if ($is_modify_link) {
|
||||||
echo ' ['
|
echo ' ['
|
||||||
. '<a href="db_details.php3?lang=' . $GLOBALS['lang'] . '&convcharset=' . $GLOBALS['convcharset'] . '&server=' . urlencode($GLOBALS['server']) . '&db=' . urlencode($GLOBALS['db']) . '&sql_query=' . urlencode($the_query) . '&show_query=y">' . $GLOBALS['strEdit'] . '</a>'
|
. '<a href="db_details.php3?lang=' . $GLOBALS['lang'] . '&convcharset=' . $GLOBALS['convcharset'] . '&server=' . urlencode($GLOBALS['server']) . '&db=' . urlencode($GLOBALS['db']) . '&sql_query=' . urlencode($the_query) . '&show_query=1">' . $GLOBALS['strEdit'] . '</a>'
|
||||||
. ']' . "\n";
|
. ']' . "\n";
|
||||||
} // end if
|
} // end if
|
||||||
echo '</p>' . "\n"
|
echo '</p>' . "\n"
|
||||||
@@ -1113,12 +1113,15 @@ if (typeof(document.getElementById) != 'undefined'
|
|||||||
// The nl2br function isn't used because its result isn't a valid
|
// The nl2br function isn't used because its result isn't a valid
|
||||||
// xhtml1.0 statement before php4.0.5 ("<br>" and not "<br />")
|
// xhtml1.0 statement before php4.0.5 ("<br>" and not "<br />")
|
||||||
// If we want to show some sql code it is easiest to create it here
|
// If we want to show some sql code it is easiest to create it here
|
||||||
|
/* SQL-Parser-Analyzer */
|
||||||
$sqlnr = 1;
|
$sqlnr = 1;
|
||||||
if (!empty($GLOBALS['show_as_php'])) {
|
if (!empty($GLOBALS['show_as_php'])) {
|
||||||
$new_line = '";<br />' . "\n" . ' $sql .= "';
|
$new_line = '";<br />' . "\n" . ' $sql .= "';
|
||||||
}
|
}
|
||||||
if (isset($new_line)) {
|
if (isset($new_line)) {
|
||||||
|
/* SQL-Parser-Analyzer */
|
||||||
$query_base = htmlspecialchars($GLOBALS['sql_query']);
|
$query_base = htmlspecialchars($GLOBALS['sql_query']);
|
||||||
|
/* SQL-Parser-Analyzer */
|
||||||
$query_base = ereg_replace("((\015\012)|(\015)|(\012))+", $new_line, $query_base);
|
$query_base = ereg_replace("((\015\012)|(\015)|(\012))+", $new_line, $query_base);
|
||||||
} else {
|
} else {
|
||||||
$query_base = $GLOBALS['sql_query'];
|
$query_base = $GLOBALS['sql_query'];
|
||||||
@@ -1133,99 +1136,98 @@ if (typeof(document.getElementById) != 'undefined'
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prepares links that may be displayed to edit/explain the query
|
// Prepares links that may be displayed to edit/explain the query
|
||||||
if (!isset($GLOBALS['show_query']) || $GLOBALS['show_query'] != 'y') {
|
|
||||||
if (!isset($GLOBALS['goto'])) {
|
|
||||||
$edit_target = (isset($GLOBALS['table'])) ? 'tbl_properties.php3' : 'db_details.php3';
|
|
||||||
} else if ($GLOBALS['goto'] != 'main.php3') {
|
|
||||||
$edit_target = $GLOBALS['goto'];
|
|
||||||
} else {
|
|
||||||
$edit_target = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($cfg['SQLQuery']['Edit'])
|
|
||||||
&& $cfg['SQLQuery']['Edit'] == TRUE) {
|
|
||||||
if ($edit_target == 'tbl_properties.php3') {
|
|
||||||
$edit_link = '<a href="tbl_properties.php3'
|
|
||||||
. $url_qpart
|
|
||||||
. '&sql_query=' . urlencode($GLOBALS['sql_query']) . '&show_query=y#querybox">' . $GLOBALS['strEdit'] . '</a>';
|
|
||||||
} else if ($edit_target != '') {
|
|
||||||
$edit_link = '<a href="db_details.php3'
|
|
||||||
. $url_qpart
|
|
||||||
. '&sql_query=' . urlencode($GLOBALS['sql_query']) . '&show_query=y#querybox">' . $GLOBALS['strEdit'] . '</a>';
|
|
||||||
}
|
|
||||||
$edit_link = ' [' . $edit_link . ']';
|
|
||||||
} else {
|
|
||||||
$edit_link = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Want to have the query explained (Mike Beck 2002-05-22)
|
|
||||||
// but only explain a SELECT (that has not been explained)
|
|
||||||
/* SQL-Parser-Analyzer */
|
|
||||||
if (isset($cfg['SQLQuery']['Explain'])
|
|
||||||
&& $cfg['SQLQuery']['Explain'] == TRUE) {
|
|
||||||
|
|
||||||
// Detect if we are validating as well
|
if (!isset($GLOBALS['goto'])) {
|
||||||
// To preserve the validate uRL data
|
$edit_target = (isset($GLOBALS['table'])) ? 'tbl_properties.php3' : 'db_details.php3';
|
||||||
if (!empty($GLOBALS['validatequery'])) {
|
} else if ($GLOBALS['goto'] != 'main.php3') {
|
||||||
$explain_link_validate = '&validatequery=1';
|
$edit_target = $GLOBALS['goto'];
|
||||||
} else {
|
} else {
|
||||||
$explain_link_validate = '';
|
$edit_target = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($cfg['SQLQuery']['Edit'])
|
||||||
|
&& ($cfg['SQLQuery']['Edit'] == TRUE )
|
||||||
|
&& (!empty($edit_target))) {
|
||||||
|
|
||||||
|
$edit_link = ' [<a href="'
|
||||||
|
. $edit_target
|
||||||
|
. $url_qpart
|
||||||
|
. '&sql_query=' . urlencode($GLOBALS['sql_query']) . '&show_query=1#querybox">' . $GLOBALS['strEdit'] . '</a>]';
|
||||||
|
} else {
|
||||||
|
$edit_link = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Want to have the query explained (Mike Beck 2002-05-22)
|
||||||
|
// but only explain a SELECT (that has not been explained)
|
||||||
|
/* SQL-Parser-Analyzer */
|
||||||
|
if (isset($cfg['SQLQuery']['Explain'])
|
||||||
|
&& $cfg['SQLQuery']['Explain'] == TRUE) {
|
||||||
|
|
||||||
|
// Detect if we are validating as well
|
||||||
|
// To preserve the validate uRL data
|
||||||
|
if (!empty($GLOBALS['validatequery'])) {
|
||||||
|
$explain_link_validate = '&validatequery=1';
|
||||||
|
} else {
|
||||||
|
$explain_link_validate = '';
|
||||||
|
}
|
||||||
|
|
||||||
$explain_link = ' [<a href="sql.php3'
|
$explain_link = ' [<a href="sql.php3'
|
||||||
. $url_qpart
|
. $url_qpart
|
||||||
. $explain_link_validate
|
. $explain_link_validate
|
||||||
. '&sql_query=';
|
. '&sql_query=';
|
||||||
|
|
||||||
if (eregi('^SELECT[[:space:]]+', $GLOBALS['sql_query'])) {
|
if (eregi('^SELECT[[:space:]]+', $GLOBALS['sql_query'])) {
|
||||||
$explain_link .= urlencode('EXPLAIN ' . $GLOBALS['sql_query']) . '">' . $GLOBALS['strExplain'];
|
$explain_link .= urlencode('EXPLAIN ' . $GLOBALS['sql_query']) . '">' . $GLOBALS['strExplain'];
|
||||||
} else if (eregi('^EXPLAIN[[:space:]]+SELECT[[:space:]]+', $GLOBALS['sql_query'])) {
|
} else if (eregi('^EXPLAIN[[:space:]]+SELECT[[:space:]]+', $GLOBALS['sql_query'])) {
|
||||||
$explain_link .= substr($GLOBALS['sql_query'],8) . '">' . $GLOBALS['strNoExplain'];
|
$explain_link .= substr($GLOBALS['sql_query'],8) . '">' . $GLOBALS['strNoExplain'];
|
||||||
} else {
|
|
||||||
$explain_link = '';
|
|
||||||
}
|
|
||||||
if(!empty($explain_link)) {
|
|
||||||
$explain_link .= '</a>]';
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$explain_link = '';
|
$explain_link = '';
|
||||||
}
|
}
|
||||||
|
if(!empty($explain_link)) {
|
||||||
|
$explain_link .= '</a>]';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$explain_link = '';
|
||||||
|
} //show explain
|
||||||
|
|
||||||
// Also we would like to get the SQL formed in some nice
|
// Also we would like to get the SQL formed in some nice
|
||||||
// php-code (Mike Beck 2002-05-22)
|
// php-code (Mike Beck 2002-05-22)
|
||||||
if (isset($cfg['SQLQuery']['ShowAsPHP'])
|
if (isset($cfg['SQLQuery']['ShowAsPHP'])
|
||||||
&& $cfg['SQLQuery']['ShowAsPHP'] == TRUE) {
|
&& $cfg['SQLQuery']['ShowAsPHP'] == TRUE) {
|
||||||
if (!empty($GLOBALS['show_as_php'])) {
|
$php_link = ' [<a href="sql.php3'
|
||||||
$php_link = '<a href="sql.php3'
|
. $url_qpart
|
||||||
. $url_qpart
|
. '&show_query=1'
|
||||||
. '&sql_query=' . urlencode($GLOBALS['sql_query']) . '&show_as_php=0">' . $GLOBALS['strNoPhp'] . '</a>';
|
. '&sql_query=' . urlencode($GLOBALS['sql_query'])
|
||||||
} else {
|
. '&show_as_php=';
|
||||||
$php_link = '<a href="sql.php3'
|
|
||||||
. $url_qpart
|
|
||||||
. '&sql_query=' . urlencode($GLOBALS['sql_query']) . '&show_as_php=1">' . $GLOBALS['strPhp'] . '</a>';
|
|
||||||
}
|
|
||||||
$php_link = ' [' . $php_link . ']';
|
|
||||||
} else {
|
|
||||||
$php_link = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($cfg['SQLValidator']['use'])
|
if (!empty($GLOBALS['show_as_php'])) {
|
||||||
&& $cfg['SQLValidator']['use'] == TRUE
|
$php_link .= '0">' . $GLOBALS['strNoPhp'];
|
||||||
&& isset($cfg['SQLQuery']['Validate'])
|
|
||||||
&& $cfg['SQLQuery']['Validate'] == TRUE) {
|
|
||||||
$validate_link = ' [<a href="sql.php3'
|
|
||||||
. $url_qpart
|
|
||||||
. '&sql_query=' . urlencode($GLOBALS['sql_query']) . '&validatequery=';
|
|
||||||
if (!empty($GLOBALS['validatequery'])) {
|
|
||||||
$validate_link .= '0">' . $GLOBALS['strNoValidateSQL'] ;
|
|
||||||
} else {
|
|
||||||
$validate_link .= '1">'. $GLOBALS['strValidateSQL'] ;
|
|
||||||
}
|
|
||||||
$validate_link .= '</a>]';
|
|
||||||
} else {
|
} else {
|
||||||
$validate_link = '';
|
$php_link .= '1">' . $GLOBALS['strPhp'];
|
||||||
}
|
}
|
||||||
} // end if (prepare links)
|
$php_link .= '</a>]';
|
||||||
|
} else {
|
||||||
|
$php_link = '';
|
||||||
|
} //show as php
|
||||||
|
|
||||||
|
if (isset($cfg['SQLValidator']['use'])
|
||||||
|
&& $cfg['SQLValidator']['use'] == TRUE
|
||||||
|
&& isset($cfg['SQLQuery']['Validate'])
|
||||||
|
&& $cfg['SQLQuery']['Validate'] == TRUE) {
|
||||||
|
$validate_link = ' [<a href="sql.php3'
|
||||||
|
. $url_qpart
|
||||||
|
. '&show_query=1'
|
||||||
|
. '&sql_query=' . urlencode($GLOBALS['sql_query'])
|
||||||
|
. '&validatequery=';
|
||||||
|
if (!empty($GLOBALS['validatequery'])) {
|
||||||
|
$validate_link .= '0">' . $GLOBALS['strNoValidateSQL'] ;
|
||||||
|
} else {
|
||||||
|
$validate_link .= '1">'. $GLOBALS['strValidateSQL'] ;
|
||||||
|
}
|
||||||
|
$validate_link .= '</a>]';
|
||||||
|
} else {
|
||||||
|
$validate_link = '';
|
||||||
|
} //validator
|
||||||
|
|
||||||
// Displays the message
|
// Displays the message
|
||||||
echo ' ' . $GLOBALS['strSQLQuery'] . ' :';
|
echo ' ' . $GLOBALS['strSQLQuery'] . ' :';
|
||||||
|
@@ -23,7 +23,7 @@ if (isset($db)) {
|
|||||||
if (isset($table)) {
|
if (isset($table)) {
|
||||||
unset($table);
|
unset($table);
|
||||||
}
|
}
|
||||||
$show_query = 'y';
|
$show_query = '1';
|
||||||
require('./header.inc.php3');
|
require('./header.inc.php3');
|
||||||
if (isset($message)) {
|
if (isset($message)) {
|
||||||
PMA_showMessage($message);
|
PMA_showMessage($message);
|
||||||
|
2
sql.php3
2
sql.php3
@@ -341,7 +341,7 @@ else {
|
|||||||
$error = PMA_mysql_error();
|
$error = PMA_mysql_error();
|
||||||
include('./header.inc.php3');
|
include('./header.inc.php3');
|
||||||
$full_err_url = (ereg('^(db_details|tbl_properties)', $err_url))
|
$full_err_url = (ereg('^(db_details|tbl_properties)', $err_url))
|
||||||
? $err_url . '&show_query=y&sql_query=' . urlencode($sql_query)
|
? $err_url . '&show_query=1&sql_query=' . urlencode($sql_query)
|
||||||
: $err_url;
|
: $err_url;
|
||||||
PMA_mysqlDie($error, $full_sql_query, '', $full_err_url);
|
PMA_mysqlDie($error, $full_sql_query, '', $full_err_url);
|
||||||
}
|
}
|
||||||
|
@@ -22,10 +22,10 @@ if (!empty($message)) {
|
|||||||
. '&server=' . $server
|
. '&server=' . $server
|
||||||
. '&db=' . urlencode($db)
|
. '&db=' . urlencode($db)
|
||||||
. '&table=' . urlencode($table)
|
. '&table=' . urlencode($table)
|
||||||
. '&$show_query=y'
|
. '&$show_query=1'
|
||||||
. '&sql_query=' . urlencode($disp_query);
|
. '&sql_query=' . urlencode($disp_query);
|
||||||
} else {
|
} else {
|
||||||
$show_query = 'y';
|
$show_query = '1';
|
||||||
}
|
}
|
||||||
if (isset($sql_query)) {
|
if (isset($sql_query)) {
|
||||||
$sql_query_cpy = $sql_query;
|
$sql_query_cpy = $sql_query;
|
||||||
@@ -112,7 +112,7 @@ if (isset($primary_key)) {
|
|||||||
. '&server=' . $server
|
. '&server=' . $server
|
||||||
. '&db=' . urlencode($db)
|
. '&db=' . urlencode($db)
|
||||||
. '&table=' . urlencode($table)
|
. '&table=' . urlencode($table)
|
||||||
. '&$show_query=y'
|
. '&$show_query=1'
|
||||||
. '&sql_query=' . urlencode($local_query);
|
. '&sql_query=' . urlencode($local_query);
|
||||||
if (isset($sql_query)) {
|
if (isset($sql_query)) {
|
||||||
$sql_query_cpy = $sql_query;
|
$sql_query_cpy = $sql_query;
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
/**
|
/**
|
||||||
* Defines the query to be displayed in the query textarea
|
* Defines the query to be displayed in the query textarea
|
||||||
*/
|
*/
|
||||||
if (isset($show_query) && $show_query == 'y') {
|
if (isset($show_query) && $show_query == '1') {
|
||||||
// This script has been called by read_dump.php3
|
// This script has been called by read_dump.php3
|
||||||
if (isset($sql_query_cpy)) {
|
if (isset($sql_query_cpy)) {
|
||||||
$query_to_display = $sql_query_cpy;
|
$query_to_display = $sql_query_cpy;
|
||||||
@@ -85,7 +85,7 @@ for ($i = 0 ; $i < $fields_cnt; $i++) {
|
|||||||
onfocus="if (typeof(document.layers) == 'undefined' || typeof(textarea_selected) == 'undefined') {textarea_selected = 1; this.form.elements['sql_query'].select();}">
|
onfocus="if (typeof(document.layers) == 'undefined' || typeof(textarea_selected) == 'undefined') {textarea_selected = 1; this.form.elements['sql_query'].select();}">
|
||||||
<?php echo ((!empty($query_to_display)) ? htmlspecialchars($query_to_display) : 'SELECT * FROM ' . PMA_backquote($table) . ' WHERE 1'); ?>
|
<?php echo ((!empty($query_to_display)) ? htmlspecialchars($query_to_display) : 'SELECT * FROM ' . PMA_backquote($table) . ' WHERE 1'); ?>
|
||||||
</textarea><br />
|
</textarea><br />
|
||||||
<input type="checkbox" name="show_query" value="y" id="checkbox_show_query" checked="checked" />
|
<input type="checkbox" name="show_query" value="1" id="checkbox_show_query" checked="checked" />
|
||||||
<label for="checkbox_show_query"><?php echo $strShowThisQuery; ?></label><br />
|
<label for="checkbox_show_query"><?php echo $strShowThisQuery; ?></label><br />
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
@@ -1036,7 +1036,7 @@ if (!isset($submit_updProfile)) {
|
|||||||
echo '</h1>';
|
echo '</h1>';
|
||||||
}
|
}
|
||||||
if (isset($message)) {
|
if (isset($message)) {
|
||||||
$show_query = 'y';
|
$show_query = '1';
|
||||||
PMA_showMessage($message);
|
PMA_showMessage($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1104,7 +1104,7 @@ else if (isset($delete) && $delete
|
|||||||
|
|
||||||
// Adds an user
|
// Adds an user
|
||||||
else if (isset($submit_addUser)) {
|
else if (isset($submit_addUser)) {
|
||||||
$show_query = 'y';
|
$show_query = '1';
|
||||||
if (!isset($host) || $host == '') {
|
if (!isset($host) || $host == '') {
|
||||||
$host = '%';
|
$host = '%';
|
||||||
}
|
}
|
||||||
@@ -1159,7 +1159,7 @@ else if (isset($submit_addUser)) {
|
|||||||
|
|
||||||
// Updates the profile of an user
|
// Updates the profile of an user
|
||||||
else if (isset($submit_updProfile)) {
|
else if (isset($submit_updProfile)) {
|
||||||
$show_query = 'y';
|
$show_query = '1';
|
||||||
$edit = TRUE;
|
$edit = TRUE;
|
||||||
if (!isset($host) || $host == '') {
|
if (!isset($host) || $host == '') {
|
||||||
$host = '%';
|
$host = '%';
|
||||||
@@ -1262,7 +1262,7 @@ else if (isset($submit_updProfile)) {
|
|||||||
|
|
||||||
// Changes the privileges of an user
|
// Changes the privileges of an user
|
||||||
else if (isset($submit_chgPriv)) {
|
else if (isset($submit_chgPriv)) {
|
||||||
$show_query = 'y';
|
$show_query = '1';
|
||||||
$edit = TRUE;
|
$edit = TRUE;
|
||||||
if (!isset($host) || $host == '') {
|
if (!isset($host) || $host == '') {
|
||||||
$host = '%';
|
$host = '%';
|
||||||
@@ -1293,7 +1293,7 @@ else if (isset($submit_chgPriv)) {
|
|||||||
|
|
||||||
// Revoke/Grant privileges
|
// Revoke/Grant privileges
|
||||||
else if (isset($grants) && $grants) {
|
else if (isset($grants) && $grants) {
|
||||||
$show_query = 'y';
|
$show_query = '1';
|
||||||
if (!isset($host) || $host == '') {
|
if (!isset($host) || $host == '') {
|
||||||
$host = '%';
|
$host = '%';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user