日期:2014-05-17 浏览次数:20491 次
if($server > 0) { if(empty($dblist)) { $dbs = mysql_list_dbs(); $num_dbs = mysql_numrows($dbs); } else { $num_dbs = count($dblist); } for($i=0; $i<$num_dbs; $i++) { if (empty($dblist)) $db = mysql_dbname($dbs, $i); else $db = $dblist[$i]; $j = $i + 2; ?> <div ID="el<?php echo $j;?>Parent" CLASS="parent"> <a class="item" HREF="db_details.php?server=<?php echo $server;?>&db=<?php echo $db;?>" onClick="expandIt('el<?php echo $j;?>'); return false;"> <img NAME="imEx" SRC="images/plus.gif" BORDER="0" ALT="+" width="9" height="9" ID="el<?php echo $j;?>Img"></a> <a class="item" HREF="db_details.php?server=<?php echo $server;?>&db=<?php echo $db;?>" onClick="expandIt('el<?php echo $j;?>');"> <font color="black" class="heada"> <?php echo $db;?> </font></a> </div> <div ID="el<?php echo $j;?>Child" CLASS="child"> <?php $tables = mysql_list_tables($db); $num_tables = @mysql_numrows($tables); for($j=0; $j<$num_tables; $j++) { $table = mysql_tablename($tables, $j); ?> <nobr> <a target="phpmain" href="sql.php?server=<?php echo $server;?>&db=<?php echo $db;?>&table=<?php echo urlencode($table);?>&sql_query=<?php echo urlencode("SELECT * FROM $table");?>&pos=0&goto=tbl_properties.php"><img src="images/browse.gif" border="0" alt="<?php echo $strBrowse.": ".$table;?>"></a> <a class="item" target="phpmain" HREF="tbl_properties.php?server=<?php echo $server;?>&db=<?php echo $db;?>&table=<?php echo urlencode($table);?>"><?php echo $table;?></a></nobr><br> <?php