* patch #501282 - JavaScript strict warnings
* fix a js bug * use localized strings
This commit is contained in:
168
left.php3
168
left.php3
@@ -194,13 +194,13 @@ echo "\n";
|
|||||||
if ($num_dbs > 1) {
|
if ($num_dbs > 1) {
|
||||||
|
|
||||||
if ($lightMode) {
|
if ($lightMode) {
|
||||||
echo '<form action="left.php3" method="get" name="left" target="nav">';
|
echo ' <form action="left.php3" method="get" name="left" target="nav">' . "\n";
|
||||||
echo '<input type="hidden" name="lang" value="' . $lang . '">';
|
echo ' <input type="hidden" name="lang" value="' . $lang . '" />' . "\n";
|
||||||
echo '<input type="hidden" name="server" value="' . $server . '">';
|
echo ' <input type="hidden" name="server" value="' . $server . '" />' . "\n";
|
||||||
echo '<select name="db" onchange="this.form.submit();">';
|
echo ' <select name="db" onchange="this.form.submit()">' . "\n";
|
||||||
echo '<option value=""></option>';
|
echo ' <option value=""></option>' . "\n";
|
||||||
$table_list = "";
|
$table_list = '';
|
||||||
$db_name = "";
|
$db_name = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$selected_db = 0;
|
$selected_db = 0;
|
||||||
@@ -234,109 +234,109 @@ if ($num_dbs > 1) {
|
|||||||
} // end while
|
} // end while
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
if ($lightMode == 0) {
|
if ($lightMode == 0) {
|
||||||
|
|
||||||
// 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 . '\')}"');
|
||||||
|
|
||||||
echo "\n";
|
|
||||||
echo ' <div id="el' . $j . 'Parent" class="parent"' . $on_mouse . '>';
|
|
||||||
|
|
||||||
if (!empty($num_tables)) {
|
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
echo ' <div id="el' . $j . 'Parent" class="parent"' . $on_mouse . '>';
|
||||||
<nobr><a class="item" href="db_details.php3?<?php echo $common_url_query; ?>" onclick="if (capable) {expandBase('el<?php echo $j; ?>', true); return false;}">
|
|
||||||
|
if (!empty($num_tables)) {
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
|
<nobr><a class="item" href="db_details.php3?<?php echo $common_url_query; ?>" onclick="if (capable) {expandBase('el<?php echo $j; ?>', true); return false}; else {return true}">
|
||||||
<img name="imEx" id="el<?php echo $j; ?>Img" src="images/plus.gif" border="0" width="9" height="9" alt="+" /></a>
|
<img name="imEx" id="el<?php echo $j; ?>Img" src="images/plus.gif" border="0" width="9" height="9" alt="+" /></a>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
|
<nobr><img name="imEx" src="images/minus.gif" border="0" width="9" height="9" />
|
||||||
|
<?php
|
||||||
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<nobr><img name="imEx" src="images/minus.gif" border="0" width="9" height="9" />
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
echo "\n";
|
|
||||||
?>
|
|
||||||
<a class="item" href="db_details.php3?<?php echo $common_url_query; ?>" onclick="if (capable) {expandBase('el<?php echo $j; ?>', false)}">
|
<a class="item" href="db_details.php3?<?php echo $common_url_query; ?>" onclick="if (capable) {expandBase('el<?php echo $j; ?>', false)}">
|
||||||
<span class="heada"><?php echo $db; ?><bdo dir="<?php echo($text_dir); ?>"> </bdo></span><span class="headaCnt">(<?php echo $num_tables_disp; ?>)</span></a></nobr>
|
<span class="heada"><?php echo $db; ?><bdo dir="<?php echo($text_dir); ?>"> </bdo></span><span class="headaCnt">(<?php echo $num_tables_disp; ?>)</span></a></nobr>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="el<?php echo $j;?>Child" class="child" style="margin-bottom: 5px"<?php echo $on_mouse; ?>>
|
<div id="el<?php echo $j;?>Child" class="child" style="margin-bottom: 5px"<?php echo $on_mouse; ?>>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Displays the list of tables from the current database
|
// Displays the list of tables from the current database
|
||||||
for ($j = 0; $j < $num_tables; $j++) {
|
for ($j = 0; $j < $num_tables; $j++) {
|
||||||
$table = mysql_tablename($tables, $j);
|
$table = mysql_tablename($tables, $j);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<nobr><img src="images/spacer.gif" border="0" width="9" height="9" alt="" />
|
<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 ' . PMA_backquote($table)); ?>&pos=0&goto=tbl_properties.php3">
|
<a target="phpmain" href="sql.php3?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>&sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&pos=0&goto=tbl_properties.php3">
|
||||||
<img src="images/browse.gif" border="0" alt="<?php echo "$strBrowse: $table"; ?>" /></a><bdo dir="<?php echo $text_dir; ?>"> </bdo>
|
<img src="images/browse.gif" border="0" alt="<?php echo "$strBrowse: $table"; ?>" /></a><bdo dir="<?php echo $text_dir; ?>"> </bdo>
|
||||||
<a class="tblItem" title="<?php echo str_replace('"', '"', $tooltip[$table]); ?>" target="phpmain" href="tbl_properties.php3?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>">
|
<a class="tblItem" title="<?php echo str_replace('"', '"', $tooltip[$table]); ?>" target="phpmain" href="tbl_properties.php3?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>">
|
||||||
<?php echo $table; ?></a></nobr><br />
|
<?php echo $table; ?></a></nobr><br />
|
||||||
<?php
|
<?php
|
||||||
} // end for $j (tables list)
|
} // end for $j (tables list)
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
} else { // lightMode == 1
|
} else { // lightMode == 1
|
||||||
|
echo "\n";
|
||||||
|
|
||||||
// Displays the database name
|
// Builds the databases' names list
|
||||||
echo "\n";
|
if (!empty($db_start) && $db == $db_start) {
|
||||||
|
// Gets the list of tables from the current database
|
||||||
if (!empty($db_start) && $db == $db_start) {
|
|
||||||
// Displays the list of tables from the current database
|
|
||||||
for ($j = 0; $j < $num_tables; $j++) {
|
for ($j = 0; $j < $num_tables; $j++) {
|
||||||
$table = mysql_tablename($tables, $j);
|
$table = mysql_tablename($tables, $j);
|
||||||
$table_list .= '<nobr><img src="images/spacer.gif" border="0" width="9" height="9" alt="" />';
|
$table_list .= ' <nobr><img src="images/spacer.gif" border="0" width="9" height="9" alt="" />' . "\n";
|
||||||
$table_list .= '<a target="phpmain" href="sql.php3?' . $common_url_query . '&table=' . urlencode($table) . '&sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($table)) . '&pos=0&goto=tbl_properties.php3">';
|
$table_list .= ' <a target="phpmain" href="sql.php3?' . $common_url_query . '&table=' . urlencode($table) . '&sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($table)) . '&pos=0&goto=tbl_properties.php3">' . "\n";
|
||||||
$table_list .= '<img src="images/browse.gif" border="0" alt="' . $strBrowse . ': ' . $table . '" /></a>';
|
$table_list .= ' <img src="images/browse.gif" border="0" alt="' . $strBrowse . ': ' . $table . '" /></a><bdo dir="' . $text_dir . '"> </bdo>' . "\n";
|
||||||
$table_list .= '<bdo dir="' . $text_dir . '"> </bdo>';
|
$table_list .= ' <a class="tblItem" title="' . str_replace('"', '"', $tooltip[$table]) . '" target="phpmain" href="tbl_properties.php3?' . $common_url_query . '&table=' . urlencode($table) . '">' . $table . '</a></nobr><br />' . "\n";
|
||||||
$table_list .= '<nobr><a class="tblItem" title="' . str_replace('"', '"', $tooltip[$table]) . '" target="phpmain" href="tbl_properties.php3?' . $common_url_query . '&table=' . urlencode($table) . '">' . $table . '</a></nobr><br />' . "\n";
|
|
||||||
|
|
||||||
} // end for $j (tables list)
|
} // end for $j (tables list)
|
||||||
|
|
||||||
if (!$table_list) {
|
if (!$table_list) {
|
||||||
$table_list = "no tables in this db";
|
$table_list = ' ' . $strNoTablesFound . "\n";
|
||||||
}
|
}
|
||||||
$selected = ' SELECTED';
|
$selected = ' selected="selected"';
|
||||||
|
|
||||||
$db_name = '<a class="item" href="db_details.php3?' . $common_url_query .'">';
|
$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>';
|
$db_name .= ' <span class="heada">' . $db . '<bdo dir="' . $text_dir . '"> </bdo></span>' . "\n";
|
||||||
$db_name .= '<span class="headaCnt">(' . $num_tables_disp . ')</span></a></nobr>';
|
$db_name .= ' <span class="headaCnt">(' . $num_tables_disp . ')</span></a></nobr>' . "\n";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$selected = '';
|
$selected = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($num_tables)) {
|
||||||
|
echo ' <option value="' . urlencode($db) . '"' . $selected . '>' . $db . ' (' . $num_tables . ')</option>' . "\n";
|
||||||
|
} else {
|
||||||
|
echo ' <option value="' . urlencode($db) . '"' . $selected . '>' . $db . ' (-)</option>' . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
} // if lightMode
|
||||||
|
|
||||||
|
} // end for $i (db list)
|
||||||
|
|
||||||
|
if ($lightMode) {
|
||||||
|
echo ' </select>' . "\n";
|
||||||
|
echo ' <noscript><input type="submit" name="Go" value="Go" /></noscript>' . "\n";
|
||||||
|
echo ' </form>' . "\n";
|
||||||
|
|
||||||
|
if (!$table_list) {
|
||||||
|
$table_list = ' ' . $strSelectADb . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($num_tables)) {
|
// Displays the current database name and the list of tables it
|
||||||
echo "<option value=\"" . urlencode($db) . "\"$selected>$db ($num_tables)</option>";
|
// contains
|
||||||
} else {
|
echo $db_name;
|
||||||
echo "<option value=\"" . urlencode($db) . "\"$selected>$db (-)</option>";
|
echo ' <hr noshade="noshade" />' . "\n";
|
||||||
}
|
echo $table_list;
|
||||||
|
echo ' <hr noshade="noshade" />' . "\n";
|
||||||
|
|
||||||
} // if lightMode
|
} else { // lightmode == 0
|
||||||
|
?>
|
||||||
} // end for $t (db list)
|
|
||||||
|
|
||||||
|
|
||||||
if ($lightMode) {
|
|
||||||
|
|
||||||
echo '</select>';
|
|
||||||
echo '<noscript><input type="submit" name="Go" value="Go"></noscript>';
|
|
||||||
echo '</form>';
|
|
||||||
|
|
||||||
if (!$table_list) {
|
|
||||||
$table_list = "please select a db";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "$db_name<hr noshade>$table_list<hr noshade>";
|
|
||||||
|
|
||||||
} else { // lightmode == 0
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- Arrange collapsible/expandable db list at startup -->
|
<!-- Arrange collapsible/expandable db list at startup -->
|
||||||
<script type="text/javascript" language="javascript1.2">
|
<script type="text/javascript" language="javascript1.2">
|
||||||
@@ -347,14 +347,12 @@ if ($lightMode) {
|
|||||||
nsShowAll();
|
nsShowAll();
|
||||||
nsArrangeList();
|
nsArrangeList();
|
||||||
}
|
}
|
||||||
expandedDb = '<?php echo (empty($selected_db)) ? '' : 'el' . $selected_db . 'Child'; ?>';
|
var expandedDb = '<?php echo (empty($selected_db)) ? '' : 'el' . $selected_db . 'Child'; ?>';
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
} // lightmode
|
|
||||||
|
|
||||||
|
|
||||||
|
} // lightmode
|
||||||
|
|
||||||
} // end if ($server > 1)
|
} // end if ($server > 1)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user