From aeec939585ca2ce0364b128e29865902167b3e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Mon, 18 Jun 2001 22:03:14 +0000 Subject: [PATCH] A perticular db could be displayed as the first page (feature #432402) --- ChangeLog | 5 +++++ index.php3 | 6 ++++-- left.js | 12 +++++++++--- left.php3 | 9 ++++++++- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0190dc1c..428d0ff75 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,11 @@ $Source$ * The 'bkg.gif' was somewhat corrupted (it caused some annoying problems with NS4+). Fixed thanks to Laurent Hass. * Added Japanese and Korean translation from Sakamoto + * index.php3, line 3: get the vars sent to this script whatever is the + status of the register globals directive. + * index.php3, left.php3 & left.js: a perticular database could be displayed + as the first page, instead of the main.php3 thanks to Kristof Hamann + (feature #432402). 2001-06-17 Robin Johnson * Fixed the ' - - + + <body bgcolor="#FFFFFF"> diff --git a/left.js b/left.js index 2f363a6b3..d46df8db5 100644 --- a/left.js +++ b/left.js @@ -141,7 +141,9 @@ function initIt() var tempColl = document.getElementsByTagName('DIV'); var tempCollCnt = tempColl.length; for (var i = 0; i < tempCollCnt; i++) { - if (tempColl[i].className == 'child') + if (tempColl[i].id == expandedDb) + tempColl[i].style.display = 'block'; + else if (tempColl[i].className == 'child') tempColl[i].style.display = 'none'; } } // end of the DOM case @@ -149,7 +151,9 @@ function initIt() tempColl = document.all.tags('DIV'); var tempCollCnt = tempColl.length; for (var i = 0; i < tempCollCnt; i++) { - if (tempColl(i).className == 'child') + if (tempColl(i).id == expandedDb) + tempColl(i).style.display = 'block'; + else if (tempColl(i).className == 'child') tempColl(i).style.display = 'none'; } } // end of the IE4 case @@ -157,7 +161,9 @@ function initIt() var theLayers = document.layers; var layersCnt = theLayers.length; for (var i = 0; i < layersCnt; i++) { - if (theLayers[i].id.indexOf('Child') != -1) + if (theLayers[i].id == expandedDb) + theLayers[i].visibility = 'show'; + else if (theLayers[i].id.indexOf('Child') != -1) theLayers[i].visibility = 'hide'; else theLayers[i].visibility = 'show'; diff --git a/left.php3 b/left.php3 index c9d6949e3..c0b4f2e22 100755 --- a/left.php3 +++ b/left.php3 @@ -1,6 +1,10 @@ <?php /* $Id$ */ +// Get the db name that may have been required for startup +require('./grab_globals.inc.php3'); +if (!empty($db)) $db_start = $db; + require("./lib.inc.php3"); header('Content-Type: text/html; charset=' . $charset); ?> @@ -33,6 +37,7 @@ body { font-family: Arial, Helvetica, sans-serif; font-size: 10pt} <?php echo $strHome;?> </FONT></A> </DIV> <?php +$selected_db = 0; // Don't display database info if $server==0 (no server selected) // This is the case when there are multiple servers and // '$cfgServerDefault = 0' is set. In that case, we want the welcome @@ -55,7 +60,8 @@ if($server > 0) $db = mysql_dbname($dbs, $i); else $db = $dblist[$i]; - $j = $i + 2; + $j = $i + 2; + if (!empty($db_start) && $db == $db_start) $selected_db = $j; // few changes, staybyte $tables = mysql_list_tables($db); $num_tables = @mysql_numrows($tables); @@ -95,6 +101,7 @@ if($server > 0) nsShowAll(); nsArrangeList(); } + expandedDb = '<?php echo (empty($selected_db)) ? '' : 'el' . $selected_db . 'Child'; ?>'; //--> </script> <?php