* optimized a bit the code of 'left.php3';
* selecting a database in light mode launches the database properties page at the main frame (both frames changes).
This commit is contained in:
@@ -5,6 +5,12 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-01-20 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
|
* left.php3:
|
||||||
|
- optimized the code a bit;
|
||||||
|
- selecting a database in light mode launches the database properties
|
||||||
|
page at the main frame (both frames changes).
|
||||||
|
|
||||||
2002-01-19 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2002-01-19 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* lang/*; libraries/common.lib.php3; Documentation.html: removed
|
* lang/*; libraries/common.lib.php3; Documentation.html: removed
|
||||||
trailing whitespaces and ensured compatibility with old releases.
|
trailing whitespaces and ensured compatibility with old releases.
|
||||||
|
52
left.php3
52
left.php3
@@ -24,16 +24,6 @@ if ($cfgOBGzip) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Findout if we want to display the standard left.php or the light version
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (isset($cfgLeftFrameLight) && $cfgLeftFrameLight) {
|
|
||||||
$lightMode = 1;
|
|
||||||
} else {
|
|
||||||
$lightMode = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the list and number of available databases.
|
* Get the list and number of available databases.
|
||||||
@@ -193,8 +183,9 @@ echo "\n";
|
|||||||
// In this case, the database should not be collapsible/expandable
|
// In this case, the database should not be collapsible/expandable
|
||||||
if ($num_dbs > 1) {
|
if ($num_dbs > 1) {
|
||||||
|
|
||||||
if ($lightMode) {
|
// Light mode -> beginning of the select combo for databases
|
||||||
echo ' <form action="left.php3" method="get" name="left" target="nav">' . "\n";
|
if ($cfgLeftFrameLight) {
|
||||||
|
echo ' <form method="post" action="index.php3" name="left" target="_parent">' . "\n";
|
||||||
echo ' <input type="hidden" name="lang" value="' . $lang . '" />' . "\n";
|
echo ' <input type="hidden" name="lang" value="' . $lang . '" />' . "\n";
|
||||||
echo ' <input type="hidden" name="server" value="' . $server . '" />' . "\n";
|
echo ' <input type="hidden" name="server" value="' . $server . '" />' . "\n";
|
||||||
echo ' <select name="db" onchange="this.form.submit()">' . "\n";
|
echo ' <select name="db" onchange="this.form.submit()">' . "\n";
|
||||||
@@ -234,7 +225,8 @@ if ($num_dbs > 1) {
|
|||||||
} // end while
|
} // end while
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
if ($lightMode == 0) {
|
// No light mode -> displays the expandible/collapsible db list
|
||||||
|
if ($cfgLeftFrameLight == FALSE) {
|
||||||
|
|
||||||
// Displays the database name
|
// Displays the database name
|
||||||
$on_mouse = (($cfgLeftPointerColor == '') ? '' : ' onmouseover="if (isDOM || isIE4) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftPointerColor . '\')}" onmouseout="if (isDOM || isIE4) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftBgColor . '\')}"');
|
$on_mouse = (($cfgLeftPointerColor == '') ? '' : ' onmouseover="if (isDOM || isIE4) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftPointerColor . '\')}" onmouseout="if (isDOM || isIE4) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftBgColor . '\')}"');
|
||||||
@@ -281,7 +273,11 @@ if ($num_dbs > 1) {
|
|||||||
<?php
|
<?php
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
} else { // lightMode == 1
|
}
|
||||||
|
|
||||||
|
// Light mode -> displays the select combo with databases names and the
|
||||||
|
// list of tables contained in the current database
|
||||||
|
else {
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
// Builds the databases' names list
|
// Builds the databases' names list
|
||||||
@@ -300,26 +296,23 @@ if ($num_dbs > 1) {
|
|||||||
$table_list = ' ' . $strNoTablesFound . "\n";
|
$table_list = ' ' . $strNoTablesFound . "\n";
|
||||||
}
|
}
|
||||||
$selected = ' selected="selected"';
|
$selected = ' selected="selected"';
|
||||||
|
|
||||||
$db_name = ' <nobr><a class="item" href="db_details.php3?' . $common_url_query .'">' . "\n";
|
|
||||||
$db_name .= ' <span class="heada">' . $db . '<bdo dir="' . $text_dir . '"> </bdo></span>' . "\n";
|
|
||||||
$db_name .= ' <span class="headaCnt">(' . $num_tables_disp . ')</span></a></nobr>' . "\n";
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$selected = '';
|
$selected = '';
|
||||||
}
|
} // end if... else...
|
||||||
|
|
||||||
if (!empty($num_tables)) {
|
if (!empty($num_tables)) {
|
||||||
echo ' <option value="' . urlencode($db) . '"' . $selected . '>' . $db . ' (' . $num_tables . ')</option>' . "\n";
|
echo ' <option value="' . urlencode($db) . '"' . $selected . '>' . $db . ' (' . $num_tables . ')</option>' . "\n";
|
||||||
} else {
|
} else {
|
||||||
echo ' <option value="' . urlencode($db) . '"' . $selected . '>' . $db . ' (-)</option>' . "\n";
|
echo ' <option value="' . urlencode($db) . '"' . $selected . '>' . $db . ' (-)</option>' . "\n";
|
||||||
}
|
} // end if... else...
|
||||||
|
|
||||||
} // if lightMode
|
} // end if light mode
|
||||||
|
|
||||||
} // end for $i (db list)
|
} // end for $i (db list)
|
||||||
|
|
||||||
if ($lightMode) {
|
// Light mode -> end of the select combo for databases and table list for
|
||||||
|
// the current database
|
||||||
|
if ($cfgLeftFrameLight) {
|
||||||
echo ' </select>' . "\n";
|
echo ' </select>' . "\n";
|
||||||
echo ' <noscript><input type="submit" name="Go" value="Go" /></noscript>' . "\n";
|
echo ' <noscript><input type="submit" name="Go" value="Go" /></noscript>' . "\n";
|
||||||
echo ' </form>' . "\n";
|
echo ' </form>' . "\n";
|
||||||
@@ -330,12 +323,15 @@ if ($num_dbs > 1) {
|
|||||||
|
|
||||||
// Displays the current database name and the list of tables it
|
// Displays the current database name and the list of tables it
|
||||||
// contains
|
// contains
|
||||||
echo $db_name;
|
|
||||||
echo ' <hr noshade="noshade" />' . "\n";
|
echo ' <hr noshade="noshade" />' . "\n";
|
||||||
echo $table_list;
|
echo $table_list;
|
||||||
echo ' <hr noshade="noshade" />' . "\n";
|
echo ' <hr noshade="noshade" />' . "\n";
|
||||||
|
|
||||||
} else { // lightmode == 0
|
}
|
||||||
|
|
||||||
|
// No light mode -> initialize some js variables for the
|
||||||
|
// expandible/collapsible stuff
|
||||||
|
else {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Arrange collapsible/expandable db list at startup -->
|
<!-- Arrange collapsible/expandable db list at startup -->
|
||||||
@@ -352,10 +348,11 @@ if ($num_dbs > 1) {
|
|||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
} // lightmode
|
} // end if... else... (light mode)
|
||||||
|
|
||||||
} // end if ($server > 1)
|
} // end if ($server > 1)
|
||||||
|
|
||||||
|
|
||||||
// Case where only one database has to be displayed
|
// Case where only one database has to be displayed
|
||||||
else if ($num_dbs == 1) {
|
else if ($num_dbs == 1) {
|
||||||
$db = $dblist[0];
|
$db = $dblist[0];
|
||||||
@@ -406,6 +403,9 @@ else if ($num_dbs == 1) {
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
} // end if ($num_dbs == 1)
|
} // end if ($num_dbs == 1)
|
||||||
|
|
||||||
|
|
||||||
|
// Case where no database has to be displayed
|
||||||
else {
|
else {
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo '<p>' . $strNoDatabases . '</p>';
|
echo '<p>' . $strNoDatabases . '</p>';
|
||||||
|
Reference in New Issue
Block a user