Optimization
This commit is contained in:
@@ -6,8 +6,10 @@ $Id$
|
||||
$Source$
|
||||
|
||||
2002-05-25 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||
* libraries/common.lib.php3: fixed a PHP3 bug, warnings and coding
|
||||
standards.
|
||||
* libraries/common.lib.php3:
|
||||
- fixed a PHP3 bug and warnings;
|
||||
- optimized a bit;
|
||||
- coding standards.
|
||||
* lang/english.inc.php3; lang/french.inc.php3: sorted.
|
||||
* header.inc.php3: enforce relative url in CSS.
|
||||
* tbl_relation.php3:
|
||||
|
@@ -921,6 +921,12 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
</tr>
|
||||
<?php
|
||||
if ($GLOBALS['cfg']['ShowSQL'] == TRUE && !empty($GLOBALS['sql_query'])) {
|
||||
// Basic url query part
|
||||
$url_qpart = '?lang=' . $GLOBALS['lang']
|
||||
. '&server=' . $GLOBALS['server']
|
||||
. ((!empty($GLOBALS['db'])) ? '&db=' . urlencode($GLOBALS['db']) : '')
|
||||
. ((!empty($GLOBALS['table'])) ? '&table=' . urlencode($GLOBALS['table']) : '');
|
||||
|
||||
echo "\n";
|
||||
?>
|
||||
<tr>
|
||||
@@ -953,15 +959,19 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
$edit_target = '';
|
||||
}
|
||||
if ($edit_target == 'tbl_properties.php3') {
|
||||
$edit_link = '<a href="tbl_properties.php3?lang=' . $GLOBALS['lang'] . '&server=' . $GLOBALS['server'] . '&db=' . urlencode($GLOBALS['db']) . '&table=' . urlencode($GLOBALS['table']) . '&sql_query=' . urlencode($GLOBALS['sql_query']) . '&show_query=y#querybox">' . $GLOBALS['strEdit'] . '</a>';
|
||||
$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?lang=' . $GLOBALS['lang'] . '&server=' . $GLOBALS['server'] . '&db=' . urlencode($GLOBALS['db']) . '&sql_query=' . urlencode($GLOBALS['sql_query']) . '&show_query=y#querybox">' . $GLOBALS['strEdit'] . '</a>';
|
||||
$edit_link = '<a href="db_details.php3'
|
||||
. $url_qpart
|
||||
. '&sql_query=' . urlencode($GLOBALS['sql_query']) . '&show_query=y#querybox">' . $GLOBALS['strEdit'] . '</a>';
|
||||
}
|
||||
// Want to have the query explained (Mike Beck 2002-05-22)
|
||||
// but do not explain an explain (lem9)
|
||||
if (!eregi('^EXPLAIN[[:space:]]+', $GLOBALS['sql_query'])) {
|
||||
$explain_link = '[<a href="sql.php3?lang=' . $GLOBALS['lang'] . '&server=' . $GLOBALS['server'] . '&db=' . urlencode($GLOBALS['db'])
|
||||
. (!empty($GLOBALS['table']) ? '&table=' . urlencode($GLOBALS['table']) : '')
|
||||
$explain_link = '[<a href="sql.php3'
|
||||
. $url_qpart
|
||||
. '&sql_query=' . urlencode('EXPLAIN '.$GLOBALS['sql_query']) . '">' . $GLOBALS['strExplain'] . '</a>] ';
|
||||
} else {
|
||||
$explain_link = '';
|
||||
@@ -969,15 +979,15 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
// Also we would like to get the SQL formed in some nice
|
||||
// php-code (Mike Beck 2002-05-22)
|
||||
if (!empty($GLOBALS['show_as_php'])) {
|
||||
$php_link = '<a href="sql.php3?lang=' . $GLOBALS['lang'] . '&server=' . $GLOBALS['server'] . '&db=' . urlencode($GLOBALS['db'])
|
||||
. (!empty($GLOBALS['table']) ? '&table=' . urlencode($GLOBALS['table']) : '')
|
||||
$php_link = '<a href="sql.php3'
|
||||
. $url_qpart
|
||||
. '&sql_query=' . urlencode($GLOBALS['sql_query']) . '&show_as_php=0">' . $GLOBALS['strNoPhp'] . '</a>';
|
||||
} else {
|
||||
$php_link = '<a href="sql.php3?lang=' . $GLOBALS['lang'] . '&server=' . $GLOBALS['server'] . '&db=' . urlencode($GLOBALS['db'])
|
||||
. (!empty($GLOBALS['table']) ? '&table=' . urlencode($GLOBALS['table']) : '')
|
||||
$php_link = '<a href="sql.php3'
|
||||
. $url_qpart
|
||||
. '&sql_query=' . urlencode($GLOBALS['sql_query']) . '&show_as_php=1">' . $GLOBALS['strPhp'] . '</a>';
|
||||
}
|
||||
}
|
||||
} // end if (prepare links)
|
||||
|
||||
// Displays the message
|
||||
echo ' ' . $GLOBALS['strSQLQuery'] . ' :';
|
||||
|
Reference in New Issue
Block a user