rewritten so it becomes as far as possible xhtml1.0 compliant
This commit is contained in:
197
left.php3
197
left.php3
@@ -1,98 +1,152 @@
|
|||||||
<?php
|
<?php
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
// Get the db name that may have been required for startup
|
|
||||||
|
/**
|
||||||
|
* Gets the variables sent to this script, retains the db name that may have
|
||||||
|
* been defined as startup option and include a core library
|
||||||
|
*/
|
||||||
require('./grab_globals.inc.php3');
|
require('./grab_globals.inc.php3');
|
||||||
if (!empty($db)) $db_start = $db;
|
if (!empty($db)) {
|
||||||
|
$db_start = $db;
|
||||||
|
}
|
||||||
|
require('./lib.inc.php3');
|
||||||
|
|
||||||
require("./lib.inc.php3");
|
|
||||||
|
/**
|
||||||
|
* Send http headers
|
||||||
|
*/
|
||||||
|
// Don't use cache (required for Opera)
|
||||||
|
$now = gmdate('D, d M Y H:i:s') . ' GMT';
|
||||||
|
header('Expires: ' . $now);
|
||||||
|
header('Last-Modified: ' . $now);
|
||||||
|
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
|
||||||
|
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
|
||||||
|
header('Pragma: no-cache'); // HTTP/1.0
|
||||||
|
// Define the charset to be used
|
||||||
header('Content-Type: text/html; charset=' . $charset);
|
header('Content-Type: text/html; charset=' . $charset);
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays the frame
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>phpMyAdmin</title>
|
<title>phpMyAdmin</title>
|
||||||
<base target="phpmain" />
|
<base target="phpmain" />
|
||||||
<!-- Collapsible tables list -->
|
<!-- Collapsible tables list scripts -->
|
||||||
<script type="text/javascript" language="javascript1.2">
|
<script type="text/javascript" language="javascript1.2">
|
||||||
<!--
|
<!--
|
||||||
var isDOM = (typeof(document.getElementsByTagName) != 'undefined') ? 1 : 0;
|
var isDOM = (typeof(document.getElementsByTagName) != 'undefined') ? 1 : 0;
|
||||||
var isIE4 = ((typeof(document.all) != 'undefined') && (parseInt(navigator.appVersion) >= 4)) ? 1 : 0;
|
var isIE4 = ((typeof(document.all) != 'undefined') && (parseInt(navigator.appVersion) >= 4)) ? 1 : 0;
|
||||||
var isNS4 = (typeof(document.layers) != 'undefined') ? 1 : 0;
|
var isNS4 = (typeof(document.layers) != 'undefined') ? 1 : 0;
|
||||||
var capable = (isDOM || isIE4 || isNS4) ? 1 : 0;
|
var capable = (isDOM || isIE4 || isNS4) ? 1 : 0;
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
<script src="left.js" type="text/javascript" language="javascript1.2"></script>
|
<script src="left.js" type="text/javascript" language="javascript1.2"></script>
|
||||||
<style type="text/css">
|
<?php
|
||||||
<!--
|
// Hard coded font name and size depends on charset. This is a temporary and
|
||||||
body { font-family: Arial, Helvetica, sans-serif; font-size: 10pt}
|
// uggly fix
|
||||||
//-->
|
if ($charset == 'iso-8859-1') {
|
||||||
</style>
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
<!--
|
||||||
|
body {font-family: Arial, Helvetica, sans-serif; font-size: 10pt}
|
||||||
|
//-->
|
||||||
|
</style>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body bgcolor="#D0DCE0">
|
<body bgcolor="#D0DCE0">
|
||||||
<DIV ID="el1Parent" CLASS="parent">
|
<!-- Link to the welcome page -->
|
||||||
<A class="item" HREF="main.php3?server=<?php echo $server; ?>&lang=<?php echo $lang; ?>">
|
<div id="el1Parent" class="parent">
|
||||||
<FONT color="black" class="heada">
|
<a class="item" href="main.php3?server=<?php echo $server; ?>&lang=<?php echo $lang; ?>">
|
||||||
<?php echo $strHome;?> </FONT></A>
|
<font color="black" class="heada"><?php echo $strHome; ?></font></a>
|
||||||
</DIV>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Databases and tables list -->
|
||||||
<?php
|
<?php
|
||||||
$selected_db = 0;
|
$selected_db = 0;
|
||||||
// Don't display database info if $server==0 (no server selected)
|
// Don't display database info if $server==0 (no server selected)
|
||||||
// This is the case when there are multiple servers and
|
// This is the case when there are multiple servers and
|
||||||
// '$cfgServerDefault = 0' is set. In that case, we want the welcome
|
// '$cfgServerDefault = 0' is set. In that case, we want the welcome
|
||||||
// to appear with no database info displayed.
|
// to appear with no database info displayed.
|
||||||
if($server > 0)
|
if ($server > 0) {
|
||||||
{
|
// Get db list
|
||||||
if(empty($dblist))
|
if (empty($dblist)) {
|
||||||
{
|
$dbs = mysql_list_dbs();
|
||||||
$dbs = mysql_list_dbs();
|
|
||||||
$num_dbs = mysql_numrows($dbs);
|
$num_dbs = mysql_numrows($dbs);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$num_dbs = count($dblist);
|
$num_dbs = count($dblist);
|
||||||
}
|
}
|
||||||
|
|
||||||
for($i=0; $i<$num_dbs; $i++)
|
// Get table list per db
|
||||||
{
|
for ($i = 0; $i < $num_dbs; $i++) {
|
||||||
if (empty($dblist))
|
if (empty($dblist)) {
|
||||||
$db = mysql_dbname($dbs, $i);
|
$db = mysql_dbname($dbs, $i);
|
||||||
else
|
} else {
|
||||||
$db = $dblist[$i];
|
$db = $dblist[$i];
|
||||||
|
}
|
||||||
$j = $i + 2;
|
$j = $i + 2;
|
||||||
if (!empty($db_start) && $db == $db_start) $selected_db = $j;
|
if (!empty($db_start) && $db == $db_start) {
|
||||||
// few changes, staybyte
|
$selected_db = $j;
|
||||||
$tables = mysql_list_tables($db);
|
}
|
||||||
$num_tables = @mysql_numrows($tables);
|
$tables = mysql_list_tables($db);
|
||||||
?>
|
$num_tables = @mysql_numrows($tables);
|
||||||
<div ID="el<?php echo $j;?>Parent" CLASS="parent">
|
$common_url_query = "server=$server&lang=$lang&db=$db";
|
||||||
<?php
|
|
||||||
if (!empty($num_tables)){
|
echo "\n";
|
||||||
?><a class="item" HREF="db_details.php3?server=<?php echo $server;?>&lang=<?php echo $lang;?>&db=<?php echo $db;?>" onClick="expandBase('el<?php echo $j;?>', true); return false;">
|
echo ' <div id="el' . $j . 'Parent" class="parent">';
|
||||||
<img NAME="imEx" SRC="images/plus.gif" BORDER="0" ALT="+" width="9" height="9" ID="el<?php echo $j;?>Img"></a><?php
|
|
||||||
}
|
if (!empty($num_tables)) {
|
||||||
else echo "<img NAME=\"imEx\" SRC=\"images/minus.gif\" width=9 height=9>\n";
|
echo "\n";
|
||||||
|
?>
|
||||||
|
<a class="item" href="db_details.php3?<?php echo $common_url_query; ?>" onclick="expandBase('el<?php echo $j; ?>', true); return false;">
|
||||||
|
<img name="imEx" id="el<?php echo $j; ?>Img" src="images/plus.gif" border="0" width="9" height="9" alt="+" /></a>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
|
<img name="imEx" src="images/minus.gif" border="0" width="9" height="9" />
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<a class="item" HREF="db_details.php3?server=<?php echo $server;?>&lang=<?php echo $lang;?>&db=<?php echo $db;?>" onClick="expandBase('el<?php echo $j;?>', false);">
|
<a class="item" href="db_details.php3?<?php echo $common_url_query; ?>" onclick="expandBase('el<?php echo $j; ?>', false);">
|
||||||
<font color="black" class="heada">
|
<font color="black" class="heada"><?php echo $db; ?></font></a>
|
||||||
<?php echo $db;?>
|
</div>
|
||||||
</font></a>
|
<div id="el<?php echo $j;?>Child" class="child">
|
||||||
</div>
|
|
||||||
<div ID="el<?php echo $j;?>Child" CLASS="child">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
for($j=0; $j<$num_tables; $j++)
|
|
||||||
{
|
|
||||||
$table = mysql_tablename($tables, $j);
|
|
||||||
?>
|
|
||||||
<nobr> <a target="phpmain" href="sql.php3?server=<?php echo $server;?>&lang=<?php echo $lang;?>&db=<?php echo $db;?>&table=<?php echo urlencode($table);?>&sql_query=<?php echo urlencode("SELECT * FROM $table");?>&pos=0&goto=tbl_properties.php3"><img src="images/browse.gif" border="0" alt="<?php echo $strBrowse.": ".$table;?>"></a> <a class="item" target="phpmain" HREF="tbl_properties.php3?server=<?php echo $server;?>&lang=<?php echo $lang;?>&db=<?php echo $db;?>&table=<?php echo urlencode($table);?>"><?php echo $table;?></a></nobr><br>
|
|
||||||
<?php
|
<?php
|
||||||
}
|
for ($j = 0; $j < $num_tables; $j++) {
|
||||||
|
$table = mysql_tablename($tables, $j);
|
||||||
echo "</div>\n";
|
echo "\n";
|
||||||
}
|
?>
|
||||||
|
<nobr>
|
||||||
|
<img src="images/spacer.gif" border="0" width="9" height="9" alt="" />
|
||||||
|
<a target="phpmain" href="sql.php3?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>&sql_query=<?php echo urlencode("SELECT * FROM $table"); ?>&pos=0&goto=tbl_properties.php3">
|
||||||
|
<img src="images/browse.gif" border="0" alt="<?php echo "$strBrowse: $table"; ?>" /></a>
|
||||||
|
<a class="item" target="phpmain" href="tbl_properties.php3?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>">
|
||||||
|
<?php echo $table; ?></a>
|
||||||
|
</nobr><br />
|
||||||
|
<?php
|
||||||
|
} // end for $j (tables list)
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
echo "\n";
|
||||||
|
} // end for $t (db list)
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Arrange collapsible/expandable db list at startup -->
|
||||||
<script type="text/javascript" language="javascript1.2">
|
<script type="text/javascript" language="javascript1.2">
|
||||||
<!--
|
<!--
|
||||||
if (isNS4) {
|
if (isNS4) {
|
||||||
@@ -105,7 +159,8 @@ if($server > 0)
|
|||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
} // end if ($server > 0)
|
||||||
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user