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