Beautified display of tables under Mozilla & NS6+ thanks to a fix from Detlev Stender

This commit is contained in:
Loïc Chapeaux
2001-11-23 19:13:07 +00:00
parent 05fefd4211
commit dc91bc219a
11 changed files with 238 additions and 202 deletions

View File

@@ -179,35 +179,35 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
$bgcolor = ($i++ % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo; $bgcolor = ($i++ % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo $bgcolor; ?>"> <tr>
<td align="center"> <td align="center" bgcolor="<?php echo $bgcolor; ?>">
<input type="checkbox" name="selected_tbl[]" value="<?php echo urlencode($table); ?>" /> <input type="checkbox" name="selected_tbl[]" value="<?php echo urlencode($table); ?>" />
</td> </td>
<td nowrap="nowrap"> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
&nbsp;<b><?php echo htmlspecialchars($table); ?>&nbsp;</b>&nbsp; &nbsp;<b><?php echo htmlspecialchars($table); ?>&nbsp;</b>&nbsp;
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&amp;pos=0"> <a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&amp;pos=0">
<?php echo $strBrowse; ?></a> <?php echo $strBrowse; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="tbl_select.php3?<?php echo $url_query; ?>"> <a href="tbl_select.php3?<?php echo $url_query; ?>">
<?php echo $strSelect; ?></a> <?php echo $strSelect; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="tbl_change.php3?<?php echo $url_query; ?>"> <a href="tbl_change.php3?<?php echo $url_query; ?>">
<?php echo $strInsert; ?></a> <?php echo $strInsert; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="tbl_properties.php3?<?php echo $url_query; ?>"> <a href="tbl_properties.php3?<?php echo $url_query; ?>">
<?php echo $strProperties; ?></a> <?php echo $strProperties; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;reload=1&amp;sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>" <a href="sql.php3?<?php echo $url_query; ?>&amp;reload=1&amp;sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')"> onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')">
<?php echo $strDrop; ?></a> <?php echo $strDrop; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('DELETE FROM ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table))); ?>" <a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('DELETE FROM ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table))); ?>"
onclick="return confirmLink(this, 'DELETE FROM <?php echo PMA_jsFormat($table); ?>')"> onclick="return confirmLink(this, 'DELETE FROM <?php echo PMA_jsFormat($table); ?>')">
<?php echo $strEmpty; ?></a> <?php echo $strEmpty; ?></a>
@@ -250,7 +250,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
$unit = ''; $unit = '';
} }
?> ?>
<td align="right"> <td align="right" bgcolor="<?php echo $bgcolor; ?>">
<?php <?php
echo "\n" . ' '; echo "\n" . ' ';
if ($mergetable == TRUE) { if ($mergetable == TRUE) {
@@ -260,14 +260,14 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
} }
?> ?>
</td> </td>
<td nowrap="nowrap"> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
&nbsp;<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;'); ?>&nbsp; &nbsp;<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;'); ?>&nbsp;
</td> </td>
<?php <?php
if ($cfgShowStats) { if ($cfgShowStats) {
echo "\n"; echo "\n";
?> ?>
<td align="right" nowrap="nowrap"> <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
&nbsp;&nbsp; &nbsp;&nbsp;
<a href="tbl_properties.php3?<?php echo $url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a> <a href="tbl_properties.php3?<?php echo $url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a>
</td> </td>
@@ -276,7 +276,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
} // end if } // end if
} else { } else {
?> ?>
<td colspan="3" align="center"> <td colspan="3" align="center" bgcolor="<?php echo $bgcolor; ?>">
<?php echo $strInUse . "\n"; ?> <?php echo $strInUse . "\n"; ?>
</td> </td>
<?php <?php
@@ -363,32 +363,32 @@ else {
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo; $bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo $bgcolor; ?>"> <tr>
<td align="center"> <td align="center" bgcolor="<?php echo $bgcolor; ?>">
<input type="checkbox" name="selected_tbl[]" value="<?php echo urlencode($tables[$i]); ?>" /> <input type="checkbox" name="selected_tbl[]" value="<?php echo urlencode($tables[$i]); ?>" />
</td> </td>
<td class="data"> <td bgcolor="<?php echo $bgcolor; ?>" class="data">
<b>&nbsp;<?php echo $tables[$i]; ?>&nbsp;</b> <b>&nbsp;<?php echo $tables[$i]; ?>&nbsp;</b>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($tables[$i])); ?>&amp;pos=0"><?php echo $strBrowse; ?></a> <a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($tables[$i])); ?>&amp;pos=0"><?php echo $strBrowse; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="tbl_select.php3?<?php echo $url_query; ?>"><?php echo $strSelect; ?></a> <a href="tbl_select.php3?<?php echo $url_query; ?>"><?php echo $strSelect; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="tbl_change.php3?<?php echo $url_query; ?>"><?php echo $strInsert; ?></a> <a href="tbl_change.php3?<?php echo $url_query; ?>"><?php echo $strInsert; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="tbl_properties.php3?<?php echo $url_query; ?>"><?php echo $strProperties; ?></a> <a href="tbl_properties.php3?<?php echo $url_query; ?>"><?php echo $strProperties; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;reload=1&amp;sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($tables[$i])); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($tables[$i]))); ?>"><?php echo $strDrop; ?></a> <a href="sql.php3?<?php echo $url_query; ?>&amp;reload=1&amp;sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($tables[$i])); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($tables[$i]))); ?>"><?php echo $strDrop; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('DELETE FROM ' . PMA_backquote($tables[$i])); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($tables[$i]))); ?>"><?php echo $strEmpty; ?></a> <a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('DELETE FROM ' . PMA_backquote($tables[$i])); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($tables[$i]))); ?>"><?php echo $strEmpty; ?></a>
</td> </td>
<td align="right"> <td align="right" bgcolor="<?php echo $bgcolor; ?>">
<?php PMA_countRecords($db, $tables[$i]); echo "\n"; ?> <?php PMA_countRecords($db, $tables[$i]); echo "\n"; ?>
</td> </td>
</tr> </tr>

View File

@@ -112,8 +112,8 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
$bgcolor = ($i++ % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo; $bgcolor = ($i++ % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo $bgcolor; ?>"> <tr>
<td nowrap="nowrap"> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
&nbsp;<b><?php echo htmlspecialchars($table); ?>&nbsp;</b>&nbsp; &nbsp;<b><?php echo htmlspecialchars($table); ?>&nbsp;</b>&nbsp;
</td> </td>
<?php <?php
@@ -154,7 +154,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
$unit = ''; $unit = '';
} }
?> ?>
<td align="right"> <td align="right" bgcolor="<?php echo $bgcolor; ?>">
<?php <?php
echo "\n" . ' '; echo "\n" . ' ';
if ($mergetable == TRUE) { if ($mergetable == TRUE) {
@@ -164,14 +164,14 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
} }
?> ?>
</td> </td>
<td nowrap="nowrap"> <td nowrap="nowrap" bgcolor="<?php echo $bgcolor; ?>">
&nbsp;<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;'); ?>&nbsp; &nbsp;<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;'); ?>&nbsp;
</td> </td>
<?php <?php
if ($cfgShowStats) { if ($cfgShowStats) {
echo "\n"; echo "\n";
?> ?>
<td align="right" nowrap="nowrap"> <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
&nbsp;<?php echo $formated_size . ' ' . $unit . "\n"; ?> &nbsp;<?php echo $formated_size . ' ' . $unit . "\n"; ?>
</td> </td>
<?php <?php
@@ -179,7 +179,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
} // end if } // end if
} else { } else {
?> ?>
<td colspan="3" align="center"> <td colspan="3" align="center" bgcolor="<?php echo $bgcolor; ?>">
<?php echo $strInUse . "\n"; ?> <?php echo $strInUse . "\n"; ?>
</td> </td>
<?php <?php
@@ -238,11 +238,11 @@ else {
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $bgcolor = $cfgBgcolorTwo; $bgcolor = ($i % 2) ? $cfgBgcolorOne : $bgcolor = $cfgBgcolorTwo;
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo $bgcolor; ?>"> <tr>
<td nowrap="nowrap"> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
<b><?php echo htmlspecialchars($tables[$i]); ?>&nbsp;</b> <b><?php echo htmlspecialchars($tables[$i]); ?>&nbsp;</b>
</td> </td>
<td align="right" nowrap="nowrap"> <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
&nbsp;<?php PMA_countRecords($db, $tables[$i]); ?> &nbsp;<?php PMA_countRecords($db, $tables[$i]); ?>
</td> </td>
</tr> </tr>

View File

@@ -254,15 +254,15 @@ if ($num_dbs > 0) {
list($idx_size, $idx_unit) = PMA_formatByteDown($dbs_array[$db_name][2], 3, 1); list($idx_size, $idx_unit) = PMA_formatByteDown($dbs_array[$db_name][2], 3, 1);
list($tot_size, $tot_unit) = PMA_formatByteDown($dbs_array[$db_name][3], 3, 1); list($tot_size, $tot_unit) = PMA_formatByteDown($dbs_array[$db_name][3], 3, 1);
echo ' <tr bgcolor="'. $bgcolor . '">' . "\n"; echo ' <tr>' . "\n";
echo ' <td align="center">' . "\n"; echo ' <td align="center" bgcolor="'. $bgcolor . '">' . "\n";
echo ' &nbsp;<input type="checkbox" name="selected_db[]" value="' . urlencode($db_name) . '" />&nbsp;' . "\n"; echo ' &nbsp;<input type="checkbox" name="selected_db[]" value="' . urlencode($db_name) . '" />&nbsp;' . "\n";
echo ' </td>' . "\n"; echo ' </td>' . "\n";
echo ' <td>&nbsp;<a href="index.php3?lang=' . $lang . '&amp;server=' . $server . '&amp;db=' . urlencode($db_name) . '" target="_parent">' . htmlentities($db_name) . '</a>&nbsp;</td>' . "\n"; echo ' <td bgcolor="'. $bgcolor . '">&nbsp;<a href="index.php3?lang=' . $lang . '&amp;server=' . $server . '&amp;db=' . urlencode($db_name) . '" target="_parent">' . htmlentities($db_name) . '</a>&nbsp;</td>' . "\n";
echo ' <td align="right">&nbsp;' . $dbs_array[$db_name][0] . '&nbsp;</td>' . "\n"; echo ' <td align="right" bgcolor="'. $bgcolor . '">&nbsp;' . $dbs_array[$db_name][0] . '&nbsp;</td>' . "\n";
echo ' <td align="right">&nbsp;' . $data_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $data_unit . '&nbsp;</td>' . "\n"; echo ' <td align="right" bgcolor="'. $bgcolor . '">&nbsp;' . $data_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $data_unit . '&nbsp;</td>' . "\n";
echo ' <td align="right">&nbsp;' . $idx_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $idx_unit . '&nbsp;</td>' . "\n"; echo ' <td align="right" bgcolor="'. $bgcolor . '">&nbsp;' . $idx_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $idx_unit . '&nbsp;</td>' . "\n";
echo ' <td align="right">&nbsp;<b>' . $tot_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $tot_unit . '</b>&nbsp;</td>' . "\n"; echo ' <td align="right" bgcolor="'. $bgcolor . '">&nbsp;<b>' . $tot_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $tot_unit . '</b>&nbsp;</td>' . "\n";
echo ' </tr>' . "\n"; echo ' </tr>' . "\n";
$i++; $i++;

View File

@@ -47,7 +47,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
* *
* @access private * @access private
* *
* @see PMA_displayTable() * @see PMA_displayTable()
*/ */
function PMA_setDisplayMode(&$the_disp_mode, &$the_total) function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
{ {
@@ -186,7 +186,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
* *
* @access private * @access private
* *
* @see PMA_displayTable() * @see PMA_displayTable()
*/ */
function PMA_displayTableNavigation($pos_next, $pos_prev, $encoded_query) function PMA_displayTableNavigation($pos_next, $pos_prev, $encoded_query)
{ {
@@ -376,7 +376,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
* *
* @access private * @access private
* *
* @see PMA_displayTable() * @see PMA_displayTable()
*/ */
function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $encoded_query = '') function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $encoded_query = '')
{ {
@@ -593,7 +593,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
* *
* @access private * @access private
* *
* @see PMA_displayTable() * @see PMA_displayTable()
*/ */
function PMA_displayTableBody(&$dt_result, &$is_display) function PMA_displayTableBody(&$dt_result, &$is_display)
{ {
@@ -628,7 +628,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
$bgcolor = ($foo % 2) ? $GLOBALS['cfgBgcolorOne'] : $GLOBALS['cfgBgcolorTwo']; $bgcolor = ($foo % 2) ? $GLOBALS['cfgBgcolorOne'] : $GLOBALS['cfgBgcolorTwo'];
?> ?>
<tr bgcolor="<?php echo $bgcolor; ?>" onmouseover="if (typeof(this.style) != 'undefined') this.style.backgroundColor = '<?php echo $GLOBALS['cfgPointerColor']; ?>'" onmouseout="if (typeof(this.style) != 'undefined') this.style.backgroundColor = ''"> <tr onmouseover="setPointer(this, '<?php echo $GLOBALS['cfgPointerColor']; ?>')" onmouseout="setPointer(this, '<?php echo $bgcolor; ?>')">
<?php <?php
echo "\n"; echo "\n";
@@ -731,7 +731,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
if ($GLOBALS['cfgModifyDeleteAtLeft']) { if ($GLOBALS['cfgModifyDeleteAtLeft']) {
if (!empty($edit_url)) { if (!empty($edit_url)) {
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="<?php echo $edit_url; ?>"> <a href="<?php echo $edit_url; ?>">
<?php echo $edit_str; ?></a> <?php echo $edit_str; ?></a>
</td> </td>
@@ -740,7 +740,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
if (!empty($del_url)) { if (!empty($del_url)) {
echo "\n"; echo "\n";
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="<?php echo $del_url; ?>" <a href="<?php echo $del_url; ?>"
<?php if (isset($js_conf)) echo 'onclick="return confirmLink(this, \'' . $js_conf . '\')"'; ?>> <?php if (isset($js_conf)) echo 'onclick="return confirmLink(this, \'' . $js_conf . '\')"'; ?>>
<?php echo $del_str; ?></a> <?php echo $del_str; ?></a>
@@ -757,11 +757,11 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
if ($primary->numeric == 1) { if ($primary->numeric == 1) {
if (!isset($row[$primary->name]) if (!isset($row[$primary->name])
|| (function_exists('is_null') && is_null($row[$primary->name]))) { || (function_exists('is_null') && is_null($row[$primary->name]))) {
echo ' <td align="right" valign="top"><i>NULL</i></td>' . "\n"; echo ' <td align="right" valign="top" bgcolor="' . $bgcolor . '"><i>NULL</i></td>' . "\n";
} else if ($row[$i] != '') { } else if ($row[$i] != '') {
echo ' <td align="right" valign="top">' . $row[$primary->name] . '</td>' . "\n"; echo ' <td align="right" valign="top" bgcolor="' . $bgcolor . '">' . $row[$primary->name] . '</td>' . "\n";
} else { } else {
echo ' <td align="right" valign="top">&nbsp;</td>' . "\n"; echo ' <td align="right" valign="top" bgcolor="' . $bgcolor . '">&nbsp;</td>' . "\n";
} }
} else if ($GLOBALS['cfgShowBlob'] == FALSE && eregi('BLOB', $primary->type)) { } else if ($GLOBALS['cfgShowBlob'] == FALSE && eregi('BLOB', $primary->type)) {
// loic1 : mysql_fetch_fields returns BLOB in place of TEXT // loic1 : mysql_fetch_fields returns BLOB in place of TEXT
@@ -770,26 +770,26 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
// fields. // fields.
$field_flags = mysql_field_flags($dt_result, $i); $field_flags = mysql_field_flags($dt_result, $i);
if (eregi('BINARY', $field_flags)) { if (eregi('BINARY', $field_flags)) {
echo ' <td align="center" valign="top">[BLOB]</td>' . "\n"; echo ' <td align="center" valign="top" bgcolor="' . $bgcolor . '">[BLOB]</td>' . "\n";
} else { } else {
if (!isset($row[$primary->name]) if (!isset($row[$primary->name])
|| (function_exists('is_null') && is_null($row[$primary->name]))) { || (function_exists('is_null') && is_null($row[$primary->name]))) {
echo ' <td valign="top"><i>NULL</i></td>' . "\n"; echo ' <td valign="top" bgcolor="' . $bgcolor . '"><i>NULL</i></td>' . "\n";
} else if ($row[$primary->name] != '') { } else if ($row[$primary->name] != '') {
if (strlen($row[$primary->name]) > $GLOBALS['cfgLimitChars'] && ($dontlimitchars != 1)) { if (strlen($row[$primary->name]) > $GLOBALS['cfgLimitChars'] && ($dontlimitchars != 1)) {
$row[$primary->name] = substr($row[$primary->name], 0, $GLOBALS['cfgLimitChars']) . '...'; $row[$primary->name] = substr($row[$primary->name], 0, $GLOBALS['cfgLimitChars']) . '...';
} }
// loic1: displays <cr>/<lf> // loic1: displays <cr>/<lf>
$row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$primary->name])); $row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$primary->name]));
echo ' <td valign="top">' . $row[$primary->name] . '</td>' . "\n"; echo ' <td valign="top" bgcolor="' . $bgcolor . '">' . $row[$primary->name] . '</td>' . "\n";
} else { } else {
echo ' <td valign="top">&nbsp;</td>' . "\n"; echo ' <td valign="top" bgcolor="' . $bgcolor . '">&nbsp;</td>' . "\n";
} }
} }
} else { } else {
if (!isset($row[$primary->name]) if (!isset($row[$primary->name])
|| (function_exists('is_null') && is_null($row[$primary->name]))) { || (function_exists('is_null') && is_null($row[$primary->name]))) {
echo ' <td valign="top"><i>NULL</i></td>' . "\n"; echo ' <td valign="top" bgcolor="' . $bgcolor . '"><i>NULL</i></td>' . "\n";
} else if ($row[$primary->name] != '') { } else if ($row[$primary->name] != '') {
// loic1: Cut text/blob fields even if $cfgShowBlob is true // loic1: Cut text/blob fields even if $cfgShowBlob is true
if (eregi('BLOB', $primary->type)) { if (eregi('BLOB', $primary->type)) {
@@ -810,9 +810,9 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
else { else {
$row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$primary->name])); $row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$primary->name]));
} }
echo ' <td valign="top">' . $row[$primary->name] . '</td>' . "\n"; echo ' <td valign="top" bgcolor="' . $bgcolor . '">' . $row[$primary->name] . '</td>' . "\n";
} else { } else {
echo ' <td valign="top">&nbsp;</td>' . "\n"; echo ' <td valign="top" bgcolor="' . $bgcolor . '">&nbsp;</td>' . "\n";
} }
} }
} // end for (2) } // end for (2)
@@ -821,7 +821,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
if ($GLOBALS['cfgModifyDeleteAtRight']) { if ($GLOBALS['cfgModifyDeleteAtRight']) {
if (!empty($edit_url)) { if (!empty($edit_url)) {
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="<?php echo $edit_url; ?>"> <a href="<?php echo $edit_url; ?>">
<?php echo $edit_str; ?></a> <?php echo $edit_str; ?></a>
</td> </td>
@@ -830,7 +830,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
if (!empty($del_url)) { if (!empty($del_url)) {
echo "\n"; echo "\n";
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="<?php echo $del_url; ?>" <a href="<?php echo $del_url; ?>"
<?php if (isset($js_conf)) echo 'onclick="return confirmLink(this, \'' . $js_conf . '\')"'; ?>> <?php if (isset($js_conf)) echo 'onclick="return confirmLink(this, \'' . $js_conf . '\')"'; ?>>
<?php echo $del_str; ?></a> <?php echo $del_str; ?></a>
@@ -876,8 +876,9 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
* *
* @access private * @access private
* *
* @see PMA_showMessage(), PMA_setDisplayMode(), PMA_displayTableNavigation(), * @see PMA_showMessage(), PMA_setDisplayMode(),
* PMA_displayTableHeaders(), PMA_displayTableBody() * PMA_displayTableNavigation(), PMA_displayTableHeaders(),
* PMA_displayTableBody()
*/ */
function PMA_displayTable(&$dt_result, &$the_disp_mode) function PMA_displayTable(&$dt_result, &$the_disp_mode)
{ {
@@ -974,5 +975,5 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
} }
} // end of the 'PMA_displayTable()' function } // end of the 'PMA_displayTable()' function
} $__PMA_DISPLAY_TBL_LIB__ } // $__PMA_DISPLAY_TBL_LIB__
?> ?>

View File

@@ -293,3 +293,27 @@ function checkTransmitDump(theForm, theAction)
return true; return true;
} // end of the 'checkTransmitDump()' function } // end of the 'checkTransmitDump()' function
/**
* Displays an confirmation box beforme to submit a "DROP/DELETE/ALTER" query.
* This function is called while clicking links
*
* @param object the link
* @param object the sql query to submit
*
* @return boolean whether pointer is set or not
*/
function setPointer(theRow, thePointerColor)
{
if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
return false;
}
var row_cells_cnt = theRow.cells.length;
for (var c = 0; c < row_cells_cnt; c++) {
theRow.cells[c].bgColor = thePointerColor;
}
return true;
} // end of the 'setPointer()' function

View File

@@ -159,8 +159,8 @@ for ($i = 0; $i < $fields_cnt; $i++) {
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo; $bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
?> ?>
<tr bgcolor="<?php echo $bgcolor; ?>"> <tr>
<td align="center"><?php echo htmlspecialchars($field); ?></td> <td align="center" bgcolor="<?php echo $bgcolor; ?>"><?php echo htmlspecialchars($field); ?></td>
<?php <?php
echo "\n"; echo "\n";
@@ -190,7 +190,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
break; break;
} }
?> ?>
<td align="center"<?php echo $type_nowrap; ?>><?php echo $type; ?></td> <td align="center" bgcolor="<?php echo $bgcolor; ?>"<?php echo $type_nowrap; ?>><?php echo $type; ?></td>
<?php <?php
echo "\n"; echo "\n";
@@ -230,12 +230,12 @@ for ($i = 0; $i < $fields_cnt; $i++) {
if ((($cfgProtectBinary && $is_blob) if ((($cfgProtectBinary && $is_blob)
|| ($cfgProtectBinary == 'all' && $is_binary)) || ($cfgProtectBinary == 'all' && $is_binary))
&& !empty($data)) { && !empty($data)) {
echo ' <td align="center">' . $strBinary . '</td>' . "\n"; echo ' <td align="center" bgcolor="'. $bgcolor . '">' . $strBinary . '</td>' . "\n";
} else if (strstr($row_table_def['True_Type'], 'enum') || strstr($row_table_def['True_Type'], 'set')) { } else if (strstr($row_table_def['True_Type'], 'enum') || strstr($row_table_def['True_Type'], 'set')) {
echo ' <td align="center">--</td>' . "\n"; echo ' <td align="center" bgcolor="'. $bgcolor . '">--</td>' . "\n";
} else { } else {
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<select name="funcs[<?php echo urlencode($field); ?>]"> <select name="funcs[<?php echo urlencode($field); ?>]">
<option></option> <option></option>
<?php <?php
@@ -267,14 +267,14 @@ for ($i = 0; $i < $fields_cnt; $i++) {
// The value column (depends on type) // The value column (depends on type)
if (strstr($row_table_def['True_Type'], 'text')) { if (strstr($row_table_def['True_Type'], 'text')) {
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<?php echo $backup_field . "\n"; ?> <?php echo $backup_field . "\n"; ?>
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"><?php echo $special_chars; ?></textarea> <textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"><?php echo $special_chars; ?></textarea>
</td> </td>
<?php <?php
echo "\n"; echo "\n";
if (strlen($special_chars) > 32000) { if (strlen($special_chars) > 32000) {
echo ' <td>' . $strTextAreaLength . '</td>' . "\n"; echo ' <td bgcolor="' . $bgcolor . '">' . $strTextAreaLength . '</td>' . "\n";
} }
} }
else if (strstr($row_table_def['True_Type'], 'enum')) { else if (strstr($row_table_def['True_Type'], 'enum')) {
@@ -284,7 +284,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
$enum_cnt = count($enum); $enum_cnt = count($enum);
$seenchecked = 0; $seenchecked = 0;
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<input type="hidden" name="fields[<?php echo urlencode($field); ?>]" value="$enum$" /> <input type="hidden" name="fields[<?php echo urlencode($field); ?>]" value="$enum$" />
<?php <?php
echo "\n" . ' ' . $backup_field; echo "\n" . ' ' . $backup_field;
@@ -376,7 +376,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
} }
$size = min(4, count($set)); $size = min(4, count($set));
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<?php echo $backup_field . "\n"; ?> <?php echo $backup_field . "\n"; ?>
<input type="hidden" name="fields[<?php echo urlencode($field); ?>]" value="$set$" /> <input type="hidden" name="fields[<?php echo urlencode($field); ?>]" value="$set$" />
<select name="field_<?php echo md5($field); ?>[]" size="<?php echo $size; ?>" multiple="multiple"> <select name="field_<?php echo md5($field); ?>[]" size="<?php echo $size; ?>" multiple="multiple">
@@ -406,14 +406,14 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|| ($cfgProtectBinary == 'all' && $is_binary)) { || ($cfgProtectBinary == 'all' && $is_binary)) {
echo "\n"; echo "\n";
?> ?>
<td align="center"> <td align="center" bgcolor="<?php echo $bgcolor; ?>">
<?php echo $strBinaryDoNotEdit . "\n"; ?> <?php echo $strBinaryDoNotEdit . "\n"; ?>
</td> </td>
<?php <?php
} else if ($is_blob) { } else if ($is_blob) {
echo "\n"; echo "\n";
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<?php echo $backup_field . "\n"; ?> <?php echo $backup_field . "\n"; ?>
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"><?php echo $special_chars; ?></textarea> <textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"><?php echo $special_chars; ?></textarea>
</td> </td>
@@ -427,7 +427,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
} }
echo "\n"; echo "\n";
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<?php echo $backup_field . "\n"; ?> <?php echo $backup_field . "\n"; ?>
<input type="text" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>" maxlength="<?php echo $maxlength; ?>" /> <input type="text" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>" maxlength="<?php echo $maxlength; ?>" />
</td> </td>
@@ -443,7 +443,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
} }
echo "\n"; echo "\n";
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<?php echo $backup_field . "\n"; ?> <?php echo $backup_field . "\n"; ?>
<input type="text" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>" maxlength="<?php echo $maxlength; ?>" /> <input type="text" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>" maxlength="<?php echo $maxlength; ?>" />
</td> </td>

View File

@@ -336,10 +336,11 @@ else if (!defined('PMA_IDX_INCLUDED')
} else { } else {
$sub_part = ''; $sub_part = '';
} }
$bgcolor = (($row_no % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo);
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo (($row_no % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo); ?>"> <tr>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<select name="column[]"> <select name="column[]">
<option value="--ignore--"<?php if ('--ignore--' == $selected) echo ' selected="selected"'; ?>> <option value="--ignore--"<?php if ('--ignore--' == $selected) echo ' selected="selected"'; ?>>
-- <?php echo $strIgnore; ?> --</option> -- <?php echo $strIgnore; ?> --</option>
@@ -357,7 +358,7 @@ else if (!defined('PMA_IDX_INCLUDED')
?> ?>
</select> </select>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<input type="text" size="5" name="sub_part[]"<?php echo $sub_part; ?> /> <input type="text" size="5" name="sub_part[]"<?php echo $sub_part; ?> />
</td> </td>
</tr> </tr>

View File

@@ -171,13 +171,13 @@ while ($row = mysql_fetch_array($result)) {
} }
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo $bgcolor; ?>"> <tr>
<td nowrap="nowrap"><?php echo $field_name; ?>&nbsp;</td> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $field_name; ?>&nbsp;</td>
<td<?php echo $type_nowrap; ?>><?php echo $type; ?><bdo dir="ltr"></bdo></td> <td bgcolor="<?php echo $bgcolor; ?>"<?php echo $type_nowrap; ?>><?php echo $type; ?><bdo dir="ltr"></bdo></td>
<td nowrap="nowrap"><?php echo $strAttribute; ?></td> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $strAttribute; ?></td>
<td><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?>&nbsp;</td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?>&nbsp;</td>
<td nowrap="nowrap"><?php if (isset($row['Default'])) echo $row['Default']; ?>&nbsp;</td> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php if (isset($row['Default'])) echo $row['Default']; ?>&nbsp;</td>
<td nowrap="nowrap"><?php echo $row['Extra']; ?>&nbsp;</td> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $row['Extra']; ?>&nbsp;</td>
</tr> </tr>
<?php <?php
} // end while } // end while
@@ -308,44 +308,44 @@ if ($cfgShowStats) {
<th><?php echo $strType; ?></th> <th><?php echo $strType; ?></th>
<th colspan="2" align="center"><?php echo $strUsage; ?></th> <th colspan="2" align="center"><?php echo $strUsage; ?></th>
</tr> </tr>
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>"> <tr>
<td style="padding-right: 10px"><?php echo ucfirst($strData); ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="padding-right: 10px"><?php echo ucfirst($strData); ?></td>
<td align="right" nowrap="nowrap"><?php echo $data_size; ?></td> <td align="right" bgcolor="<?php echo $cfgBgcolorTwo; ?>" nowrap="nowrap"><?php echo $data_size; ?></td>
<td><?php echo $data_unit; ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>"><?php echo $data_unit; ?></td>
</tr> </tr>
<?php <?php
if (isset($index_size)) { if (isset($index_size)) {
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>"> <tr>
<td style="padding-right: 10px"><?php echo ucfirst($strIndex); ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="padding-right: 10px"><?php echo ucfirst($strIndex); ?></td>
<td align="right" nowrap="nowrap"><?php echo $index_size; ?></td> <td align="right" bgcolor="<?php echo $cfgBgcolorTwo; ?>" nowrap="nowrap"><?php echo $index_size; ?></td>
<td><?php echo $index_unit; ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>"><?php echo $index_unit; ?></td>
</tr> </tr>
<?php <?php
} }
if (isset($free_size)) { if (isset($free_size)) {
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="color: #bb0000"> <tr style="color: #bb0000">
<td style="padding-right: 10px"><?php echo ucfirst($strOverhead); ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="padding-right: 10px"><?php echo ucfirst($strOverhead); ?></td>
<td align="right" nowrap="nowrap"><?php echo $free_size; ?></td> <td align="right" bgcolor="<?php echo $cfgBgcolorTwo; ?>" nowrap="nowrap"><?php echo $free_size; ?></td>
<td><?php echo $free_unit; ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>"><?php echo $free_unit; ?></td>
</tr> </tr>
<tr bgcolor="<?php echo $cfgBgcolorOne; ?>"> <tr>
<td style="padding-right: 10px"><?php echo ucfirst($strEffective); ?></td> <td bgcolor="<?php echo $cfgBgcolorOne; ?>" style="padding-right: 10px"><?php echo ucfirst($strEffective); ?></td>
<td align="right" nowrap="nowrap"><?php echo $effect_size; ?></td> <td align="right" bgcolor="<?php echo $cfgBgcolorOne; ?>" nowrap="nowrap"><?php echo $effect_size; ?></td>
<td><?php echo $effect_unit; ?></td> <td bgcolor="<?php echo $cfgBgcolorOne; ?>"><?php echo $effect_unit; ?></td>
</tr> </tr>
<?php <?php
} }
if (isset($tot_size) && $mergetable == FALSE) { if (isset($tot_size) && $mergetable == FALSE) {
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo $cfgBgcolorOne; ?>"> <tr>
<td style="padding-right: 10px"><?php echo ucfirst($strTotal); ?></td> <td bgcolor="<?php echo $cfgBgcolorOne; ?>" style="padding-right: 10px"><?php echo ucfirst($strTotal); ?></td>
<td align="right" nowrap="nowrap"><?php echo $tot_size; ?></td> <td align="right" bgcolor="<?php echo $cfgBgcolorOne; ?>" nowrap="nowrap"><?php echo $tot_size; ?></td>
<td><?php echo $tot_unit; ?></td> <td bgcolor="<?php echo $cfgBgcolorOne; ?>"><?php echo $tot_unit; ?></td>
</tr> </tr>
<?php <?php
} }
@@ -367,11 +367,12 @@ if ($cfgShowStats) {
<?php <?php
$i = 0; $i = 0;
if (isset($showtable['Row_format'])) { if (isset($showtable['Row_format'])) {
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>"> <tr>
<td><?php echo ucfirst($strFormat); ?></td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strFormat); ?></td>
<td align="<?php echo $cell_align_left; ?>" nowrap="nowrap"> <td align="<?php echo $cell_align_left; ?>" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
<?php <?php
echo ' '; echo ' ';
if ($showtable['Row_format'] == 'Fixed') { if ($showtable['Row_format'] == 'Fixed') {
@@ -388,44 +389,48 @@ if ($cfgShowStats) {
<?php <?php
} }
if (isset($showtable['Rows'])) { if (isset($showtable['Rows'])) {
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>"> <tr>
<td><?php echo ucfirst($strRows); ?></td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strRows); ?></td>
<td align="right" nowrap="nowrap"> <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
<?php echo number_format($showtable['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?> <?php echo number_format($showtable['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
</td> </td>
</tr> </tr>
<?php <?php
} }
if (isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) { if (isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) {
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>"> <tr>
<td><?php echo ucfirst($strRowLength); ?>&nbsp;&oslash;</td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strRowLength); ?>&nbsp;&oslash;</td>
<td align="right" nowrap="nowrap"> <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
<?php echo number_format($showtable['Avg_row_length'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?> <?php echo number_format($showtable['Avg_row_length'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
</td> </td>
</tr> </tr>
<?php <?php
} }
if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) { if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) {
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>"> <tr>
<td><?php echo ucfirst($strRowSize); ?>&nbsp;&oslash;</td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strRowSize); ?>&nbsp;&oslash;</td>
<td align="right" nowrap="nowrap"> <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
<?php echo $avg_size . ' ' . $avg_unit . "\n"; ?> <?php echo $avg_size . ' ' . $avg_unit . "\n"; ?>
</td> </td>
</tr> </tr>
<?php <?php
} }
if (isset($showtable['Auto_increment'])) { if (isset($showtable['Auto_increment'])) {
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>"> <tr>
<td><?php echo ucfirst($strNext); ?>&nbsp;Autoindex</td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strNext); ?>&nbsp;Autoindex</td>
<td align="right" nowrap="nowrap"> <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
<?php echo number_format($showtable['Auto_increment'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?> <?php echo number_format($showtable['Auto_increment'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
</td> </td>
</tr> </tr>

View File

@@ -57,8 +57,8 @@ for ($i = 0 ; $i < $num_fields; $i++) {
} }
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo; $bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
?> ?>
<tr bgcolor="<?php echo $bgcolor;?>"> <tr>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<?php <?php
if ($is_backup) { if ($is_backup) {
echo "\n"; echo "\n";
@@ -70,7 +70,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
?> ?>
<input type="text" name="field_name[]" size="10" value="<?php if (isset($row) && isset($row['Field'])) echo str_replace('"', '&quot;', $row['Field']); ?>" /> <input type="text" name="field_name[]" size="10" value="<?php if (isset($row) && isset($row['Field'])) echo str_replace('"', '&quot;', $row['Field']); ?>" />
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<select name="field_type[]"> <select name="field_type[]">
<?php <?php
echo "\n"; echo "\n";
@@ -108,7 +108,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
?> ?>
</select> </select>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<?php <?php
if ($is_backup) { if ($is_backup) {
echo "\n"; echo "\n";
@@ -120,7 +120,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
?> ?>
<input type="text" name="field_length[]" size="8" value="<?php echo str_replace('"', '&quot;', $length); ?>" /> <input type="text" name="field_length[]" size="8" value="<?php echo str_replace('"', '&quot;', $length); ?>" />
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<select name="field_attribute[]"> <select name="field_attribute[]">
<?php <?php
echo "\n"; echo "\n";
@@ -147,7 +147,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
?> ?>
</select> </select>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<select name="field_null[]"> <select name="field_null[]">
<?php <?php
if (!isset($row) || empty($row['Null'])) { if (!isset($row) || empty($row['Null'])) {
@@ -174,7 +174,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
} }
echo "\n"; echo "\n";
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<?php <?php
if ($is_backup) { if ($is_backup) {
echo "\n"; echo "\n";
@@ -186,7 +186,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
?> ?>
<input type="text" name="field_default[]" size="8" value="<?php if(isset($row) && isset($row['Default'])) echo str_replace('"', '&quot;', $row['Default']); ?>" /> <input type="text" name="field_default[]" size="8" value="<?php if(isset($row) && isset($row['Default'])) echo str_replace('"', '&quot;', $row['Default']); ?>" />
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<select name="field_extra[]"> <select name="field_extra[]">
<?php <?php
if(!isset($row) || empty($row['Extra'])) { if(!isset($row) || empty($row['Extra'])) {
@@ -232,20 +232,20 @@ for ($i = 0 ; $i < $num_fields; $i++) {
} }
echo "\n"; echo "\n";
?> ?>
<td align="center"> <td align="center" bgcolor="<?php echo $bgcolor; ?>">
<input type="checkbox" name="field_primary[]" value="<?php echo $i; ?>"<?php echo $checked_primary; ?> /> <input type="checkbox" name="field_primary[]" value="<?php echo $i; ?>"<?php echo $checked_primary; ?> />
</td> </td>
<td align="center"> <td align="center" bgcolor="<?php echo $bgcolor; ?>">
<input type="checkbox" name="field_index[]" value="<?php echo $i; ?>"<?php echo $checked_index; ?> /> <input type="checkbox" name="field_index[]" value="<?php echo $i; ?>"<?php echo $checked_index; ?> />
</td> </td>
<td align="center"> <td align="center" bgcolor="<?php echo $bgcolor; ?>">
<input type="checkbox" name="field_unique[]" value="<?php echo $i; ?>"<?php echo $checked_unique; ?> /> <input type="checkbox" name="field_unique[]" value="<?php echo $i; ?>"<?php echo $checked_unique; ?> />
</td> </td>
<?php <?php
if (PMA_MYSQL_INT_VERSION >= 32323) { if (PMA_MYSQL_INT_VERSION >= 32323) {
echo "\n"; echo "\n";
?> ?>
<td nowrap="nowrap"> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
<input type="checkbox" name="field_fulltext[]" value="<?php echo $i; ?>"<?php echo $checked_fulltext; ?> /> <input type="checkbox" name="field_fulltext[]" value="<?php echo $i; ?>"<?php echo $checked_fulltext; ?> />
</td> </td>
<?php <?php

View File

@@ -295,21 +295,21 @@ while ($row = mysql_fetch_array($fields_rs)) {
} }
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo $bgcolor; ?>"> <tr>
<td align="center"> <td align="center" bgcolor="<?php echo $bgcolor; ?>">
<input type="checkbox" name="selected_fld[]" value="<?php echo urlencode($row['Field']); ?>" /> <input type="checkbox" name="selected_fld[]" value="<?php echo urlencode($row['Field']); ?>" />
</td> </td>
<td nowrap="nowrap">&nbsp;<?php echo $field_name; ?>&nbsp;</td> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">&nbsp;<?php echo $field_name; ?>&nbsp;</td>
<td<?php echo $type_nowrap; ?>><?php echo $type; ?><bdo dir="ltr"></bdo></td> <td bgcolor="<?php echo $bgcolor; ?>"<?php echo $type_nowrap; ?>><?php echo $type; ?><bdo dir="ltr"></bdo></td>
<td nowrap="nowrap"><?php echo $strAttribute; ?></td> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $strAttribute; ?></td>
<td><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?>&nbsp;</td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?>&nbsp;</td>
<td nowrap="nowrap"><?php if (isset($row['Default'])) echo $row['Default']; ?>&nbsp;</td> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php if (isset($row['Default'])) echo $row['Default']; ?>&nbsp;</td>
<td nowrap="nowrap"><?php echo $row['Extra']; ?>&nbsp;</td> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $row['Extra']; ?>&nbsp;</td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="tbl_alter.php3?<?php echo $url_query; ?>&amp;field=<?php echo urlencode($row['Field']); ?>"> <a href="tbl_alter.php3?<?php echo $url_query; ?>&amp;field=<?php echo urlencode($row['Field']); ?>">
<?php echo $strChange; ?></a> <?php echo $strChange; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<?php <?php
// loic1: Drop field only if there is more than one field in the table // loic1: Drop field only if there is more than one field in the table
if ($fields_cnt > 1) { if ($fields_cnt > 1) {
@@ -325,16 +325,16 @@ while ($row = mysql_fetch_array($fields_rs)) {
echo "\n"; echo "\n";
?> ?>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP PRIMARY KEY, ADD PRIMARY KEY(' . $primary . PMA_backquote($row['Field']) . ')'); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strAPrimaryKey, htmlspecialchars($row['Field']))); ?>" <a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP PRIMARY KEY, ADD PRIMARY KEY(' . $primary . PMA_backquote($row['Field']) . ')'); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strAPrimaryKey, htmlspecialchars($row['Field']))); ?>"
onclick="return confirmLink(this, 'ALTER TABLE <?php echo PMA_jsFormat($table); ?> DROP PRIMARY KEY, ADD PRIMARY KEY(<?php echo PMA_jsFormat($row['Field']); ?>)')"> onclick="return confirmLink(this, 'ALTER TABLE <?php echo PMA_jsFormat($table); ?> DROP PRIMARY KEY, ADD PRIMARY KEY(<?php echo PMA_jsFormat($row['Field']); ?>)')">
<?php echo $strPrimary; ?></a> <?php echo $strPrimary; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD INDEX(' . PMA_backquote($row['Field']) . ')'); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strAnIndex ,htmlspecialchars($row['Field']))); ?>"> <a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD INDEX(' . PMA_backquote($row['Field']) . ')'); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strAnIndex ,htmlspecialchars($row['Field']))); ?>">
<?php echo $strIndex; ?></a> <?php echo $strIndex; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD UNIQUE(' . PMA_backquote($row['Field']) . ')'); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strAnIndex , htmlspecialchars($row['Field']))); ?>"> <a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD UNIQUE(' . PMA_backquote($row['Field']) . ')'); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strAnIndex , htmlspecialchars($row['Field']))); ?>">
<?php echo $strUnique; ?></a> <?php echo $strUnique; ?></a>
</td> </td>
@@ -342,7 +342,7 @@ while ($row = mysql_fetch_array($fields_rs)) {
if (PMA_MYSQL_INT_VERSION >= 32323) { if (PMA_MYSQL_INT_VERSION >= 32323) {
echo "\n"; echo "\n";
?> ?>
<td nowrap="nowrap"> <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
<a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD FULLTEXT(' . PMA_backquote($row['Field']) . ')'); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strAnIndex , htmlspecialchars($row['Field']))); ?>"> <a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD FULLTEXT(' . PMA_backquote($row['Field']) . ')'); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strAnIndex , htmlspecialchars($row['Field']))); ?>">
<?php echo $strIdxFulltext; ?></a> <?php echo $strIdxFulltext; ?></a>
</td> </td>
@@ -482,44 +482,44 @@ if ($cfgShowStats) {
<th><?php echo $strType; ?></th> <th><?php echo $strType; ?></th>
<th colspan="2" align="center"><?php echo $strUsage; ?></th> <th colspan="2" align="center"><?php echo $strUsage; ?></th>
</tr> </tr>
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>"> <tr>
<td style="padding-right: 10px"><?php echo ucfirst($strData); ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="padding-right: 10px"><?php echo ucfirst($strData); ?></td>
<td align="right" nowrap="nowrap"><?php echo $data_size; ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>" align="right" nowrap="nowrap"><?php echo $data_size; ?></td>
<td><?php echo $data_unit; ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>"><?php echo $data_unit; ?></td>
</tr> </tr>
<?php <?php
if (isset($index_size)) { if (isset($index_size)) {
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>"> <tr>
<td style="padding-right: 10px"><?php echo ucfirst($strIndex); ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="padding-right: 10px"><?php echo ucfirst($strIndex); ?></td>
<td align="right" nowrap="nowrap"><?php echo $index_size; ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>" align="right" nowrap="nowrap"><?php echo $index_size; ?></td>
<td><?php echo $index_unit; ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>"><?php echo $index_unit; ?></td>
</tr> </tr>
<?php <?php
} }
if (isset($free_size)) { if (isset($free_size)) {
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="color: #bb0000"> <tr style="color: #bb0000">
<td style="padding-right: 10px"><?php echo ucfirst($strOverhead); ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="padding-right: 10px"><?php echo ucfirst($strOverhead); ?></td>
<td align="right" nowrap="nowrap"><?php echo $free_size; ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>" align="right" nowrap="nowrap"><?php echo $free_size; ?></td>
<td><?php echo $free_unit; ?></td> <td bgcolor="<?php echo $cfgBgcolorTwo; ?>"><?php echo $free_unit; ?></td>
</tr> </tr>
<tr bgcolor="<?php echo $cfgBgcolorOne; ?>"> <tr>
<td style="padding-right: 10px"><?php echo ucfirst($strEffective); ?></td> <td bgcolor="<?php echo $cfgBgcolorOne; ?>" style="padding-right: 10px"><?php echo ucfirst($strEffective); ?></td>
<td align="right" nowrap="nowrap"><?php echo $effect_size; ?></td> <td bgcolor="<?php echo $cfgBgcolorOne; ?>" align="right" nowrap="nowrap"><?php echo $effect_size; ?></td>
<td><?php echo $effect_unit; ?></td> <td bgcolor="<?php echo $cfgBgcolorOne; ?>"><?php echo $effect_unit; ?></td>
</tr> </tr>
<?php <?php
} }
if (isset($tot_size) && $mergetable == FALSE) { if (isset($tot_size) && $mergetable == FALSE) {
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo $cfgBgcolorOne; ?>"> <tr>
<td style="padding-right: 10px"><?php echo ucfirst($strTotal); ?></td> <td bgcolor="<?php echo $cfgBgcolorOne; ?>" style="padding-right: 10px"><?php echo ucfirst($strTotal); ?></td>
<td align="right" nowrap="nowrap"><?php echo $tot_size; ?></td> <td bgcolor="<?php echo $cfgBgcolorOne; ?>" align="right" nowrap="nowrap"><?php echo $tot_size; ?></td>
<td><?php echo $tot_unit; ?></td> <td bgcolor="<?php echo $cfgBgcolorOne; ?>"><?php echo $tot_unit; ?></td>
</tr> </tr>
<?php <?php
} }
@@ -551,11 +551,12 @@ if ($cfgShowStats) {
<?php <?php
$i = 0; $i = 0;
if (isset($showtable['Row_format'])) { if (isset($showtable['Row_format'])) {
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>"> <tr>
<td><?php echo ucfirst($strFormat); ?></td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strFormat); ?></td>
<td align="<?php echo $cell_align_left; ?>" nowrap="nowrap"> <td bgcolor="<?php echo $bgcolor; ?>" align="<?php echo $cell_align_left; ?>" nowrap="nowrap">
<?php <?php
echo ' '; echo ' ';
if ($showtable['Row_format'] == 'Fixed') { if ($showtable['Row_format'] == 'Fixed') {
@@ -574,44 +575,48 @@ if ($cfgShowStats) {
<?php <?php
} }
if (isset($showtable['Rows'])) { if (isset($showtable['Rows'])) {
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>"> <tr>
<td><?php echo ucfirst($strRows); ?></td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strRows); ?></td>
<td align="right" nowrap="nowrap"> <td bgcolor="<?php echo $bgcolor; ?>" align="right" nowrap="nowrap">
<?php echo number_format($showtable['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?> <?php echo number_format($showtable['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
</td> </td>
</tr> </tr>
<?php <?php
} }
if (isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) { if (isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) {
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>"> <tr>
<td><?php echo ucfirst($strRowLength); ?>&nbsp;&oslash;</td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strRowLength); ?>&nbsp;&oslash;</td>
<td align="right" nowrap="nowrap"> <td bgcolor="<?php echo $bgcolor; ?>" align="right" nowrap="nowrap">
<?php echo number_format($showtable['Avg_row_length'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?> <?php echo number_format($showtable['Avg_row_length'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
</td> </td>
</tr> </tr>
<?php <?php
} }
if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) { if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) {
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>"> <tr>
<td><?php echo ucfirst($strRowSize); ?>&nbsp;&oslash;</td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strRowSize); ?>&nbsp;&oslash;</td>
<td align="right" nowrap="nowrap"> <td bgcolor="<?php echo $bgcolor; ?>" align="right" nowrap="nowrap">
<?php echo $avg_size . ' ' . $avg_unit . "\n"; ?> <?php echo $avg_size . ' ' . $avg_unit . "\n"; ?>
</td> </td>
</tr> </tr>
<?php <?php
} }
if (isset($showtable['Auto_increment'])) { if (isset($showtable['Auto_increment'])) {
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
echo "\n"; echo "\n";
?> ?>
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>"> <tr>
<td><?php echo ucfirst($strNext); ?>&nbsp;Autoindex</td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strNext); ?>&nbsp;Autoindex</td>
<td align="right" nowrap="nowrap"> <td bgcolor="<?php echo $bgcolor; ?>" align="right" nowrap="nowrap">
<?php echo number_format($showtable['Auto_increment'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?> <?php echo number_format($showtable['Auto_increment'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
</td> </td>
</tr> </tr>

View File

@@ -123,13 +123,13 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
. '&amp;goto=user_details.php3'; . '&amp;goto=user_details.php3';
} }
?> ?>
<tr bgcolor="<?php echo $bgcolor; ?>"> <tr>
<?php <?php
if (!$dbcheck) { if (!$dbcheck) {
if ($priv) { if ($priv) {
echo "\n"; echo "\n";
?> ?>
<td<?php if (!$grantopt) echo ' colspan="2"'; ?>> <td<?php if (!$grantopt) echo ' colspan="2"'; ?> bgcolor="<?php echo $bgcolor; ?>">
<a href="<?php echo $revoke_url; ?>"> <a href="<?php echo $revoke_url; ?>">
<?php echo $GLOBALS['strRevokePriv']; ?></a> <?php echo $GLOBALS['strRevokePriv']; ?></a>
</td> </td>
@@ -138,7 +138,7 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
if ($grantopt) { if ($grantopt) {
echo "\n"; echo "\n";
?> ?>
<td<?php if (!$priv) echo ' colspan="2"'; ?>> <td<?php if (!$priv) echo ' colspan="2"'; ?> bgcolor="<?php echo $bgcolor; ?>">
<a href="<?php echo $revoke_grant_url; ?>"> <a href="<?php echo $revoke_grant_url; ?>">
<?php echo $GLOBALS['strRevokeGrant']; ?></a> <?php echo $GLOBALS['strRevokeGrant']; ?></a>
</td> </td>
@@ -148,7 +148,7 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
if ($priv) { if ($priv) {
echo "\n"; echo "\n";
?> ?>
<td> <td bgcolor="<?php echo $bgcolor; ?>">
<a href="<?php echo $revoke_url; ?>"> <a href="<?php echo $revoke_url; ?>">
<?php echo $GLOBALS['strRevoke']; ?></a> <?php echo $GLOBALS['strRevoke']; ?></a>
</td> </td>
@@ -156,30 +156,30 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
} else { } else {
echo "\n"; echo "\n";
?> ?>
<td>&nbsp;</td> <td bgcolor="<?php echo $bgcolor; ?>">&nbsp;</td>
<?php <?php
} }
echo "\n"; echo "\n";
?> ?>
<td><?php echo $row['Host']; ?></td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo $row['Host']; ?></td>
<td><?php echo ($row['User']) ? $row['User'] : '<span style="color: #FF0000">' . $GLOBALS['strAny'] . '</span>'; ?></td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ($row['User']) ? $row['User'] : '<span style="color: #FF0000">' . $GLOBALS['strAny'] . '</span>'; ?></td>
<?php <?php
} }
echo "\n"; echo "\n";
?> ?>
<td><?php echo ($db == '*') ? '<span style="color: #002E80">' . $GLOBALS['strAll'] . '</span>' : $db; ?></td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ($db == '*') ? '<span style="color: #002E80">' . $GLOBALS['strAll'] . '</span>' : $db; ?></td>
<td><?php echo ($table == '*') ? '<span style="color: #002E80">' . $GLOBALS['strAll'] . '</span>' : $table; ?></td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ($table == '*') ? '<span style="color: #002E80">' . $GLOBALS['strAll'] . '</span>' : $table; ?></td>
<td><?php echo ($priv != '') ? $priv : '<span style="color: #002E80">' . $GLOBALS['strNoPrivileges'] . '</span>'; ?></td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ($priv != '') ? $priv : '<span style="color: #002E80">' . $GLOBALS['strNoPrivileges'] . '</span>'; ?></td>
<?php <?php
if (!$dbcheck) { if (!$dbcheck) {
echo "\n"; echo "\n";
?> ?>
<td><?php echo ($grantopt) ? $GLOBALS['strYes'] : $GLOBALS['strNo']; ?></td> <td bgcolor="<?php echo $bgcolor; ?>"><?php echo ($grantopt) ? $GLOBALS['strYes'] : $GLOBALS['strNo']; ?></td>
<?php <?php
} }
echo "\n"; echo "\n";
?> ?>
<!-- Debug <td><?php echo $usr_row[0] ?></td> Debug --> <!-- Debug <td bgcolor="<?php echo $bgcolor; ?>"><?php echo $usr_row[0] ?></td> Debug -->
</tr> </tr>
<?php <?php
$i++; $i++;
@@ -841,12 +841,12 @@ function PMA_tableUsers($host = FALSE, $user = FALSE)
// } // }
?> ?>
<tr bgcolor="<?php echo $bgcolor;?>"> <tr>
<?php <?php
if (!$user) { if (!$user) {
echo "\n"; echo "\n";
?> ?>
<td> <td bgcolor="<?php echo $bgcolor;?>">
<a href="<?php echo $edit_url; ?>"> <a href="<?php echo $edit_url; ?>">
<?php echo $GLOBALS['strEdit']; ?></a> <?php echo $GLOBALS['strEdit']; ?></a>
</td> </td>
@@ -854,30 +854,30 @@ function PMA_tableUsers($host = FALSE, $user = FALSE)
} }
echo "\n"; echo "\n";
?> ?>
<td> <td bgcolor="<?php echo $bgcolor;?>">
<a href="<?php echo $delete_url; ?>"> <a href="<?php echo $delete_url; ?>">
<?php echo $GLOBALS['strDelete']; ?></a> <?php echo $GLOBALS['strDelete']; ?></a>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor;?>">
<a href="<?php echo $check_url; ?>"> <a href="<?php echo $check_url; ?>">
<?php echo $GLOBALS['strGrants']; ?></a> <?php echo $GLOBALS['strGrants']; ?></a>
</td> </td>
<!-- <!--
<td> <td bgcolor="<?php echo $bgcolor;?>">
<a href="<?php echo (($check_url != '') ? $check_url : '#'); ?>"> <a href="<?php echo (($check_url != '') ? $check_url : '#'); ?>">
<?php echo $GLOBALS['strGrants']; ?></a> <?php echo $GLOBALS['strGrants']; ?></a>
</td> </td>
//--> //-->
<td> <td bgcolor="<?php echo $bgcolor;?>">
<?php echo $row['Host'] . "\n"; ?> <?php echo $row['Host'] . "\n"; ?>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor;?>">
<?php echo (($row['User']) ? '<b>' . $row['User'] . '</b>' : '<span style="color: #FF0000">' . $GLOBALS['strAny'] . '</span>') . "\n"; ?> <?php echo (($row['User']) ? '<b>' . $row['User'] . '</b>' : '<span style="color: #FF0000">' . $GLOBALS['strAny'] . '</span>') . "\n"; ?>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor;?>">
<?php echo (($row[$GLOBALS['password_field']]) ? $GLOBALS['strYes'] : '<span style="color: #FF0000">' . $GLOBALS['strNo'] . '</span>') . "\n"; ?> <?php echo (($row[$GLOBALS['password_field']]) ? $GLOBALS['strYes'] : '<span style="color: #FF0000">' . $GLOBALS['strNo'] . '</span>') . "\n"; ?>
</td> </td>
<td> <td bgcolor="<?php echo $bgcolor;?>">
<?php echo $strPriv . "\n"; ?> <?php echo $strPriv . "\n"; ?>
</td> </td>
</tr> </tr>