* patch #501282 - JavaScript strict warnings

* fix a js bug
* use localized strings
This commit is contained in:
Loïc Chapeaux
2002-01-19 23:21:59 +00:00
parent c357aa9976
commit ae334f43a5

View File

@@ -194,13 +194,13 @@ echo "\n";
if ($num_dbs > 1) {
if ($lightMode) {
echo '<form action="left.php3" method="get" name="left" target="nav">';
echo '<input type="hidden" name="lang" value="' . $lang . '">';
echo '<input type="hidden" name="server" value="' . $server . '">';
echo '<select name="db" onchange="this.form.submit();">';
echo '<option value=""></option>';
$table_list = "";
$db_name = "";
echo ' <form action="left.php3" method="get" name="left" target="nav">' . "\n";
echo ' <input type="hidden" name="lang" value="' . $lang . '" />' . "\n";
echo ' <input type="hidden" name="server" value="' . $server . '" />' . "\n";
echo ' <select name="db" onchange="this.form.submit()">' . "\n";
echo ' <option value=""></option>' . "\n";
$table_list = '';
$db_name = '';
}
$selected_db = 0;
@@ -245,7 +245,7 @@ if ($lightMode == 0) {
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;}">
<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>
<?php
} else {
@@ -282,60 +282,60 @@ if ($lightMode == 0) {
echo "\n";
} else { // lightMode == 1
// Displays the database name
echo "\n";
// Builds the databases' names list
if (!empty($db_start) && $db == $db_start) {
// Displays the list of tables from the current database
// Gets the list of tables from the current database
for ($j = 0; $j < $num_tables; $j++) {
$table = mysql_tablename($tables, $j);
$table_list .= '<nobr><img src="images/spacer.gif" border="0" width="9" height="9" alt="" />';
$table_list .= '<a target="phpmain" href="sql.php3?' . $common_url_query . '&amp;table=' . urlencode($table) . '&amp;sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($table)) . '&amp;pos=0&amp;goto=tbl_properties.php3">';
$table_list .= '<img src="images/browse.gif" border="0" alt="' . $strBrowse . ': ' . $table . '" /></a>';
$table_list .= '<bdo dir="' . $text_dir . '">&nbsp;</bdo>';
$table_list .= '<nobr><a class="tblItem" title="' . str_replace('"', '&quot;', $tooltip[$table]) . '" target="phpmain" href="tbl_properties.php3?' . $common_url_query . '&amp;table=' . urlencode($table) . '">' . $table . '</a></nobr><br />' . "\n";
$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 . '&amp;table=' . urlencode($table) . '&amp;sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($table)) . '&amp;pos=0&amp;goto=tbl_properties.php3">' . "\n";
$table_list .= ' <img src="images/browse.gif" border="0" alt="' . $strBrowse . ': ' . $table . '" /></a><bdo dir="' . $text_dir . '">&nbsp;</bdo>' . "\n";
$table_list .= ' <a class="tblItem" title="' . str_replace('"', '&quot;', $tooltip[$table]) . '" target="phpmain" href="tbl_properties.php3?' . $common_url_query . '&amp;table=' . urlencode($table) . '">' . $table . '</a></nobr><br />' . "\n";
} // end for $j (tables 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 .= '<span class="heada">' . $db . '<bdo dir="' . $text_dir . '">&nbsp;&nbsp;</bdo></span>';
$db_name .= '<span class="headaCnt">(' . $num_tables_disp . ')</span></a></nobr>';
$db_name = ' <nobr><a class="item" href="db_details.php3?' . $common_url_query .'">' . "\n";
$db_name .= ' <span class="heada">' . $db . '<bdo dir="' . $text_dir . '">&nbsp;&nbsp;</bdo></span>' . "\n";
$db_name .= ' <span class="headaCnt">(' . $num_tables_disp . ')</span></a></nobr>' . "\n";
} else {
$selected = '';
}
if (!empty($num_tables)) {
echo "<option value=\"" . urlencode($db) . "\"$selected>$db ($num_tables)</option>";
echo ' <option value="' . urlencode($db) . '"' . $selected . '>' . $db . ' (' . $num_tables . ')</option>' . "\n";
} else {
echo "<option value=\"" . urlencode($db) . "\"$selected>$db (-)</option>";
echo ' <option value="' . urlencode($db) . '"' . $selected . '>' . $db . ' (-)</option>' . "\n";
}
} // if lightMode
} // end for $t (db list)
} // end for $i (db list)
if ($lightMode) {
echo '</select>';
echo '<noscript><input type="submit" name="Go" value="Go"></noscript>';
echo '</form>';
echo ' </select>' . "\n";
echo ' <noscript><input type="submit" name="Go" value="Go" /></noscript>' . "\n";
echo ' </form>' . "\n";
if (!$table_list) {
$table_list = "please select a db";
$table_list = ' ' . $strSelectADb . "\n";
}
echo "$db_name<hr noshade>$table_list<hr noshade>";
// Displays the current database name and the list of tables it
// contains
echo $db_name;
echo ' <hr noshade="noshade" />' . "\n";
echo $table_list;
echo ' <hr noshade="noshade" />' . "\n";
} else { // lightmode == 0
?>
<!-- Arrange collapsible/expandable db list at startup -->
@@ -347,15 +347,13 @@ if ($lightMode) {
nsShowAll();
nsArrangeList();
}
expandedDb = '<?php echo (empty($selected_db)) ? '' : 'el' . $selected_db . 'Child'; ?>';
var expandedDb = '<?php echo (empty($selected_db)) ? '' : 'el' . $selected_db . 'Child'; ?>';
//-->
</script>
<?php
} // lightmode
} // end if ($server > 1)
// Case where only one database has to be displayed