Beautified display of tables under Mozilla & NS6+ thanks to a fix from Detlev Stender
This commit is contained in:
@@ -179,35 +179,35 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
|
||||
$bgcolor = ($i++ % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $bgcolor; ?>">
|
||||
<td align="center">
|
||||
<tr>
|
||||
<td align="center" bgcolor="<?php echo $bgcolor; ?>">
|
||||
<input type="checkbox" name="selected_tbl[]" value="<?php echo urlencode($table); ?>" />
|
||||
</td>
|
||||
<td nowrap="nowrap">
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
|
||||
<b><?php echo htmlspecialchars($table); ?> </b>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&pos=0">
|
||||
<?php echo $strBrowse; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="tbl_select.php3?<?php echo $url_query; ?>">
|
||||
<?php echo $strSelect; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="tbl_change.php3?<?php echo $url_query; ?>">
|
||||
<?php echo $strInsert; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="tbl_properties.php3?<?php echo $url_query; ?>">
|
||||
<?php echo $strProperties; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="sql.php3?<?php echo $url_query; ?>&reload=1&sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
|
||||
onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')">
|
||||
<?php echo $strDrop; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('DELETE FROM ' . PMA_backquote($table)); ?>&zero_rows=<?php echo urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table))); ?>"
|
||||
onclick="return confirmLink(this, 'DELETE FROM <?php echo PMA_jsFormat($table); ?>')">
|
||||
<?php echo $strEmpty; ?></a>
|
||||
@@ -250,7 +250,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
|
||||
$unit = '';
|
||||
}
|
||||
?>
|
||||
<td align="right">
|
||||
<td align="right" bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php
|
||||
echo "\n" . ' ';
|
||||
if ($mergetable == TRUE) {
|
||||
@@ -260,14 +260,14 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td nowrap="nowrap">
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
|
||||
<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : ' '); ?>
|
||||
</td>
|
||||
<?php
|
||||
if ($cfgShowStats) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
|
||||
|
||||
<a href="tbl_properties.php3?<?php echo $url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a>
|
||||
</td>
|
||||
@@ -276,7 +276,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
|
||||
} // end if
|
||||
} else {
|
||||
?>
|
||||
<td colspan="3" align="center">
|
||||
<td colspan="3" align="center" bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php echo $strInUse . "\n"; ?>
|
||||
</td>
|
||||
<?php
|
||||
@@ -363,32 +363,32 @@ else {
|
||||
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $bgcolor; ?>">
|
||||
<td align="center">
|
||||
<tr>
|
||||
<td align="center" bgcolor="<?php echo $bgcolor; ?>">
|
||||
<input type="checkbox" name="selected_tbl[]" value="<?php echo urlencode($tables[$i]); ?>" />
|
||||
</td>
|
||||
<td class="data">
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" class="data">
|
||||
<b> <?php echo $tables[$i]; ?> </b>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($tables[$i])); ?>&pos=0"><?php echo $strBrowse; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="tbl_select.php3?<?php echo $url_query; ?>"><?php echo $strSelect; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="tbl_change.php3?<?php echo $url_query; ?>"><?php echo $strInsert; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="tbl_properties.php3?<?php echo $url_query; ?>"><?php echo $strProperties; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="sql.php3?<?php echo $url_query; ?>&reload=1&sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($tables[$i])); ?>&zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($tables[$i]))); ?>"><?php echo $strDrop; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('DELETE FROM ' . PMA_backquote($tables[$i])); ?>&zero_rows=<?php echo urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($tables[$i]))); ?>"><?php echo $strEmpty; ?></a>
|
||||
</td>
|
||||
<td align="right">
|
||||
<td align="right" bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php PMA_countRecords($db, $tables[$i]); echo "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -112,8 +112,8 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
|
||||
$bgcolor = ($i++ % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $bgcolor; ?>">
|
||||
<td nowrap="nowrap">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
|
||||
<b><?php echo htmlspecialchars($table); ?> </b>
|
||||
</td>
|
||||
<?php
|
||||
@@ -154,7 +154,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
|
||||
$unit = '';
|
||||
}
|
||||
?>
|
||||
<td align="right">
|
||||
<td align="right" bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php
|
||||
echo "\n" . ' ';
|
||||
if ($mergetable == TRUE) {
|
||||
@@ -164,14 +164,14 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td nowrap="nowrap">
|
||||
<td nowrap="nowrap" bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : ' '); ?>
|
||||
</td>
|
||||
<?php
|
||||
if ($cfgShowStats) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
|
||||
<?php echo $formated_size . ' ' . $unit . "\n"; ?>
|
||||
</td>
|
||||
<?php
|
||||
@@ -179,7 +179,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
|
||||
} // end if
|
||||
} else {
|
||||
?>
|
||||
<td colspan="3" align="center">
|
||||
<td colspan="3" align="center" bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php echo $strInUse . "\n"; ?>
|
||||
</td>
|
||||
<?php
|
||||
@@ -238,11 +238,11 @@ else {
|
||||
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $bgcolor = $cfgBgcolorTwo;
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $bgcolor; ?>">
|
||||
<td nowrap="nowrap">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
|
||||
<b><?php echo htmlspecialchars($tables[$i]); ?> </b>
|
||||
</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
|
||||
<?php PMA_countRecords($db, $tables[$i]); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -254,15 +254,15 @@ if ($num_dbs > 0) {
|
||||
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);
|
||||
|
||||
echo ' <tr bgcolor="'. $bgcolor . '">' . "\n";
|
||||
echo ' <td align="center">' . "\n";
|
||||
echo ' <tr>' . "\n";
|
||||
echo ' <td align="center" bgcolor="'. $bgcolor . '">' . "\n";
|
||||
echo ' <input type="checkbox" name="selected_db[]" value="' . urlencode($db_name) . '" /> ' . "\n";
|
||||
echo ' </td>' . "\n";
|
||||
echo ' <td> <a href="index.php3?lang=' . $lang . '&server=' . $server . '&db=' . urlencode($db_name) . '" target="_parent">' . htmlentities($db_name) . '</a> </td>' . "\n";
|
||||
echo ' <td align="right"> ' . $dbs_array[$db_name][0] . ' </td>' . "\n";
|
||||
echo ' <td align="right"> ' . $data_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $data_unit . ' </td>' . "\n";
|
||||
echo ' <td align="right"> ' . $idx_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $idx_unit . ' </td>' . "\n";
|
||||
echo ' <td align="right"> <b>' . $tot_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $tot_unit . '</b> </td>' . "\n";
|
||||
echo ' <td bgcolor="'. $bgcolor . '"> <a href="index.php3?lang=' . $lang . '&server=' . $server . '&db=' . urlencode($db_name) . '" target="_parent">' . htmlentities($db_name) . '</a> </td>' . "\n";
|
||||
echo ' <td align="right" bgcolor="'. $bgcolor . '"> ' . $dbs_array[$db_name][0] . ' </td>' . "\n";
|
||||
echo ' <td align="right" bgcolor="'. $bgcolor . '"> ' . $data_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $data_unit . ' </td>' . "\n";
|
||||
echo ' <td align="right" bgcolor="'. $bgcolor . '"> ' . $idx_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $idx_unit . ' </td>' . "\n";
|
||||
echo ' <td align="right" bgcolor="'. $bgcolor . '"> <b>' . $tot_size . '<bdo dir="' . $text_dir . '"> </bdo>' . $tot_unit . '</b> </td>' . "\n";
|
||||
echo ' </tr>' . "\n";
|
||||
|
||||
$i++;
|
||||
|
@@ -628,7 +628,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
||||
$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
|
||||
echo "\n";
|
||||
|
||||
@@ -731,7 +731,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
||||
if ($GLOBALS['cfgModifyDeleteAtLeft']) {
|
||||
if (!empty($edit_url)) {
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="<?php echo $edit_url; ?>">
|
||||
<?php echo $edit_str; ?></a>
|
||||
</td>
|
||||
@@ -740,7 +740,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
||||
if (!empty($del_url)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="<?php echo $del_url; ?>"
|
||||
<?php if (isset($js_conf)) echo 'onclick="return confirmLink(this, \'' . $js_conf . '\')"'; ?>>
|
||||
<?php echo $del_str; ?></a>
|
||||
@@ -757,11 +757,11 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
||||
if ($primary->numeric == 1) {
|
||||
if (!isset($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] != '') {
|
||||
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 {
|
||||
echo ' <td align="right" valign="top"> </td>' . "\n";
|
||||
echo ' <td align="right" valign="top" bgcolor="' . $bgcolor . '"> </td>' . "\n";
|
||||
}
|
||||
} else if ($GLOBALS['cfgShowBlob'] == FALSE && eregi('BLOB', $primary->type)) {
|
||||
// loic1 : mysql_fetch_fields returns BLOB in place of TEXT
|
||||
@@ -770,26 +770,26 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
||||
// fields.
|
||||
$field_flags = mysql_field_flags($dt_result, $i);
|
||||
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 {
|
||||
if (!isset($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] != '') {
|
||||
if (strlen($row[$primary->name]) > $GLOBALS['cfgLimitChars'] && ($dontlimitchars != 1)) {
|
||||
$row[$primary->name] = substr($row[$primary->name], 0, $GLOBALS['cfgLimitChars']) . '...';
|
||||
}
|
||||
// loic1: displays <cr>/<lf>
|
||||
$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 {
|
||||
echo ' <td valign="top"> </td>' . "\n";
|
||||
echo ' <td valign="top" bgcolor="' . $bgcolor . '"> </td>' . "\n";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!isset($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] != '') {
|
||||
// loic1: Cut text/blob fields even if $cfgShowBlob is true
|
||||
if (eregi('BLOB', $primary->type)) {
|
||||
@@ -810,9 +810,9 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
||||
else {
|
||||
$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 {
|
||||
echo ' <td valign="top"> </td>' . "\n";
|
||||
echo ' <td valign="top" bgcolor="' . $bgcolor . '"> </td>' . "\n";
|
||||
}
|
||||
}
|
||||
} // end for (2)
|
||||
@@ -821,7 +821,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
||||
if ($GLOBALS['cfgModifyDeleteAtRight']) {
|
||||
if (!empty($edit_url)) {
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="<?php echo $edit_url; ?>">
|
||||
<?php echo $edit_str; ?></a>
|
||||
</td>
|
||||
@@ -830,7 +830,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
||||
if (!empty($del_url)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="<?php echo $del_url; ?>"
|
||||
<?php if (isset($js_conf)) echo 'onclick="return confirmLink(this, \'' . $js_conf . '\')"'; ?>>
|
||||
<?php echo $del_str; ?></a>
|
||||
@@ -876,8 +876,9 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @see PMA_showMessage(), PMA_setDisplayMode(), PMA_displayTableNavigation(),
|
||||
* PMA_displayTableHeaders(), PMA_displayTableBody()
|
||||
* @see PMA_showMessage(), PMA_setDisplayMode(),
|
||||
* PMA_displayTableNavigation(), PMA_displayTableHeaders(),
|
||||
* PMA_displayTableBody()
|
||||
*/
|
||||
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
|
||||
|
||||
} $__PMA_DISPLAY_TBL_LIB__
|
||||
} // $__PMA_DISPLAY_TBL_LIB__
|
||||
?>
|
||||
|
@@ -293,3 +293,27 @@ function checkTransmitDump(theForm, theAction)
|
||||
|
||||
return true;
|
||||
} // 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
|
||||
|
@@ -159,8 +159,8 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
|
||||
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
|
||||
?>
|
||||
<tr bgcolor="<?php echo $bgcolor; ?>">
|
||||
<td align="center"><?php echo htmlspecialchars($field); ?></td>
|
||||
<tr>
|
||||
<td align="center" bgcolor="<?php echo $bgcolor; ?>"><?php echo htmlspecialchars($field); ?></td>
|
||||
<?php
|
||||
echo "\n";
|
||||
|
||||
@@ -190,7 +190,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
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
|
||||
echo "\n";
|
||||
|
||||
@@ -230,12 +230,12 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
if ((($cfgProtectBinary && $is_blob)
|
||||
|| ($cfgProtectBinary == 'all' && $is_binary))
|
||||
&& !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')) {
|
||||
echo ' <td align="center">--</td>' . "\n";
|
||||
echo ' <td align="center" bgcolor="'. $bgcolor . '">--</td>' . "\n";
|
||||
} else {
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<select name="funcs[<?php echo urlencode($field); ?>]">
|
||||
<option></option>
|
||||
<?php
|
||||
@@ -267,14 +267,14 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
// The value column (depends on type)
|
||||
if (strstr($row_table_def['True_Type'], 'text')) {
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?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>
|
||||
</td>
|
||||
<?php
|
||||
echo "\n";
|
||||
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')) {
|
||||
@@ -284,7 +284,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
$enum_cnt = count($enum);
|
||||
$seenchecked = 0;
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<input type="hidden" name="fields[<?php echo urlencode($field); ?>]" value="$enum$" />
|
||||
<?php
|
||||
echo "\n" . ' ' . $backup_field;
|
||||
@@ -376,7 +376,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
}
|
||||
$size = min(4, count($set));
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php echo $backup_field . "\n"; ?>
|
||||
<input type="hidden" name="fields[<?php echo urlencode($field); ?>]" value="$set$" />
|
||||
<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)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td align="center">
|
||||
<td align="center" bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php echo $strBinaryDoNotEdit . "\n"; ?>
|
||||
</td>
|
||||
<?php
|
||||
} else if ($is_blob) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?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>
|
||||
</td>
|
||||
@@ -427,7 +427,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?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; ?>" />
|
||||
</td>
|
||||
@@ -443,7 +443,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?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; ?>" />
|
||||
</td>
|
||||
|
@@ -336,10 +336,11 @@ else if (!defined('PMA_IDX_INCLUDED')
|
||||
} else {
|
||||
$sub_part = '';
|
||||
}
|
||||
$bgcolor = (($row_no % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo);
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo (($row_no % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo); ?>">
|
||||
<td>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<select name="column[]">
|
||||
<option value="--ignore--"<?php if ('--ignore--' == $selected) echo ' selected="selected"'; ?>>
|
||||
-- <?php echo $strIgnore; ?> --</option>
|
||||
@@ -357,7 +358,7 @@ else if (!defined('PMA_IDX_INCLUDED')
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<input type="text" size="5" name="sub_part[]"<?php echo $sub_part; ?> />
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -171,13 +171,13 @@ while ($row = mysql_fetch_array($result)) {
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $bgcolor; ?>">
|
||||
<td nowrap="nowrap"><?php echo $field_name; ?> </td>
|
||||
<td<?php echo $type_nowrap; ?>><?php echo $type; ?><bdo dir="ltr"></bdo></td>
|
||||
<td nowrap="nowrap"><?php echo $strAttribute; ?></td>
|
||||
<td><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?> </td>
|
||||
<td nowrap="nowrap"><?php if (isset($row['Default'])) echo $row['Default']; ?> </td>
|
||||
<td nowrap="nowrap"><?php echo $row['Extra']; ?> </td>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $field_name; ?> </td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"<?php echo $type_nowrap; ?>><?php echo $type; ?><bdo dir="ltr"></bdo></td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $strAttribute; ?></td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?> </td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php if (isset($row['Default'])) echo $row['Default']; ?> </td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $row['Extra']; ?> </td>
|
||||
</tr>
|
||||
<?php
|
||||
} // end while
|
||||
@@ -308,44 +308,44 @@ if ($cfgShowStats) {
|
||||
<th><?php echo $strType; ?></th>
|
||||
<th colspan="2" align="center"><?php echo $strUsage; ?></th>
|
||||
</tr>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strData); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $data_size; ?></td>
|
||||
<td><?php echo $data_unit; ?></td>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="padding-right: 10px"><?php echo ucfirst($strData); ?></td>
|
||||
<td align="right" bgcolor="<?php echo $cfgBgcolorTwo; ?>" nowrap="nowrap"><?php echo $data_size; ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>"><?php echo $data_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
if (isset($index_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strIndex); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $index_size; ?></td>
|
||||
<td><?php echo $index_unit; ?></td>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="padding-right: 10px"><?php echo ucfirst($strIndex); ?></td>
|
||||
<td align="right" bgcolor="<?php echo $cfgBgcolorTwo; ?>" nowrap="nowrap"><?php echo $index_size; ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>"><?php echo $index_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($free_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="color: #bb0000">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strOverhead); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $free_size; ?></td>
|
||||
<td><?php echo $free_unit; ?></td>
|
||||
<tr style="color: #bb0000">
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="padding-right: 10px"><?php echo ucfirst($strOverhead); ?></td>
|
||||
<td align="right" bgcolor="<?php echo $cfgBgcolorTwo; ?>" nowrap="nowrap"><?php echo $free_size; ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>"><?php echo $free_unit; ?></td>
|
||||
</tr>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorOne; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strEffective); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $effect_size; ?></td>
|
||||
<td><?php echo $effect_unit; ?></td>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $cfgBgcolorOne; ?>" style="padding-right: 10px"><?php echo ucfirst($strEffective); ?></td>
|
||||
<td align="right" bgcolor="<?php echo $cfgBgcolorOne; ?>" nowrap="nowrap"><?php echo $effect_size; ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorOne; ?>"><?php echo $effect_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($tot_size) && $mergetable == FALSE) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorOne; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strTotal); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $tot_size; ?></td>
|
||||
<td><?php echo $tot_unit; ?></td>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $cfgBgcolorOne; ?>" style="padding-right: 10px"><?php echo ucfirst($strTotal); ?></td>
|
||||
<td align="right" bgcolor="<?php echo $cfgBgcolorOne; ?>" nowrap="nowrap"><?php echo $tot_size; ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorOne; ?>"><?php echo $tot_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@@ -367,11 +367,12 @@ if ($cfgShowStats) {
|
||||
<?php
|
||||
$i = 0;
|
||||
if (isset($showtable['Row_format'])) {
|
||||
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strFormat); ?></td>
|
||||
<td align="<?php echo $cell_align_left; ?>" nowrap="nowrap">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strFormat); ?></td>
|
||||
<td align="<?php echo $cell_align_left; ?>" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
|
||||
<?php
|
||||
echo ' ';
|
||||
if ($showtable['Row_format'] == 'Fixed') {
|
||||
@@ -388,44 +389,48 @@ if ($cfgShowStats) {
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Rows'])) {
|
||||
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strRows); ?></td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strRows); ?></td>
|
||||
<td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
|
||||
<?php echo number_format($showtable['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) {
|
||||
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strRowLength); ?> ø</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strRowLength); ?> ø</td>
|
||||
<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"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) {
|
||||
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strRowSize); ?> ø</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strRowSize); ?> ø</td>
|
||||
<td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
|
||||
<?php echo $avg_size . ' ' . $avg_unit . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Auto_increment'])) {
|
||||
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strNext); ?> Autoindex</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strNext); ?> Autoindex</td>
|
||||
<td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
|
||||
<?php echo number_format($showtable['Auto_increment'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -57,8 +57,8 @@ for ($i = 0 ; $i < $num_fields; $i++) {
|
||||
}
|
||||
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
|
||||
?>
|
||||
<tr bgcolor="<?php echo $bgcolor;?>">
|
||||
<td>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php
|
||||
if ($is_backup) {
|
||||
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('"', '"', $row['Field']); ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<select name="field_type[]">
|
||||
<?php
|
||||
echo "\n";
|
||||
@@ -108,7 +108,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php
|
||||
if ($is_backup) {
|
||||
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('"', '"', $length); ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<select name="field_attribute[]">
|
||||
<?php
|
||||
echo "\n";
|
||||
@@ -147,7 +147,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<select name="field_null[]">
|
||||
<?php
|
||||
if (!isset($row) || empty($row['Null'])) {
|
||||
@@ -174,7 +174,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php
|
||||
if ($is_backup) {
|
||||
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('"', '"', $row['Default']); ?>" />
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<select name="field_extra[]">
|
||||
<?php
|
||||
if(!isset($row) || empty($row['Extra'])) {
|
||||
@@ -232,20 +232,20 @@ for ($i = 0 ; $i < $num_fields; $i++) {
|
||||
}
|
||||
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; ?> />
|
||||
</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; ?> />
|
||||
</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; ?> />
|
||||
</td>
|
||||
<?php
|
||||
if (PMA_MYSQL_INT_VERSION >= 32323) {
|
||||
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; ?> />
|
||||
</td>
|
||||
<?php
|
||||
|
@@ -295,21 +295,21 @@ while ($row = mysql_fetch_array($fields_rs)) {
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $bgcolor; ?>">
|
||||
<td align="center">
|
||||
<tr>
|
||||
<td align="center" bgcolor="<?php echo $bgcolor; ?>">
|
||||
<input type="checkbox" name="selected_fld[]" value="<?php echo urlencode($row['Field']); ?>" />
|
||||
</td>
|
||||
<td nowrap="nowrap"> <?php echo $field_name; ?> </td>
|
||||
<td<?php echo $type_nowrap; ?>><?php echo $type; ?><bdo dir="ltr"></bdo></td>
|
||||
<td nowrap="nowrap"><?php echo $strAttribute; ?></td>
|
||||
<td><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?> </td>
|
||||
<td nowrap="nowrap"><?php if (isset($row['Default'])) echo $row['Default']; ?> </td>
|
||||
<td nowrap="nowrap"><?php echo $row['Extra']; ?> </td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"> <?php echo $field_name; ?> </td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"<?php echo $type_nowrap; ?>><?php echo $type; ?><bdo dir="ltr"></bdo></td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $strAttribute; ?></td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?> </td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php if (isset($row['Default'])) echo $row['Default']; ?> </td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $row['Extra']; ?> </td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="tbl_alter.php3?<?php echo $url_query; ?>&field=<?php echo urlencode($row['Field']); ?>">
|
||||
<?php echo $strChange; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php
|
||||
// loic1: Drop field only if there is more than one field in the table
|
||||
if ($fields_cnt > 1) {
|
||||
@@ -325,16 +325,16 @@ while ($row = mysql_fetch_array($fields_rs)) {
|
||||
echo "\n";
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP PRIMARY KEY, ADD PRIMARY KEY(' . $primary . PMA_backquote($row['Field']) . ')'); ?>&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']); ?>)')">
|
||||
<?php echo $strPrimary; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD INDEX(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAnIndex ,htmlspecialchars($row['Field']))); ?>">
|
||||
<?php echo $strIndex; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD UNIQUE(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAnIndex , htmlspecialchars($row['Field']))); ?>">
|
||||
<?php echo $strUnique; ?></a>
|
||||
</td>
|
||||
@@ -342,7 +342,7 @@ while ($row = mysql_fetch_array($fields_rs)) {
|
||||
if (PMA_MYSQL_INT_VERSION >= 32323) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td nowrap="nowrap">
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
|
||||
<a href="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD FULLTEXT(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAnIndex , htmlspecialchars($row['Field']))); ?>">
|
||||
<?php echo $strIdxFulltext; ?></a>
|
||||
</td>
|
||||
@@ -482,44 +482,44 @@ if ($cfgShowStats) {
|
||||
<th><?php echo $strType; ?></th>
|
||||
<th colspan="2" align="center"><?php echo $strUsage; ?></th>
|
||||
</tr>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strData); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $data_size; ?></td>
|
||||
<td><?php echo $data_unit; ?></td>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="padding-right: 10px"><?php echo ucfirst($strData); ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>" align="right" nowrap="nowrap"><?php echo $data_size; ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>"><?php echo $data_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
if (isset($index_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strIndex); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $index_size; ?></td>
|
||||
<td><?php echo $index_unit; ?></td>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="padding-right: 10px"><?php echo ucfirst($strIndex); ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>" align="right" nowrap="nowrap"><?php echo $index_size; ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>"><?php echo $index_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($free_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="color: #bb0000">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strOverhead); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $free_size; ?></td>
|
||||
<td><?php echo $free_unit; ?></td>
|
||||
<tr style="color: #bb0000">
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="padding-right: 10px"><?php echo ucfirst($strOverhead); ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>" align="right" nowrap="nowrap"><?php echo $free_size; ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorTwo; ?>"><?php echo $free_unit; ?></td>
|
||||
</tr>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorOne; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strEffective); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $effect_size; ?></td>
|
||||
<td><?php echo $effect_unit; ?></td>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $cfgBgcolorOne; ?>" style="padding-right: 10px"><?php echo ucfirst($strEffective); ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorOne; ?>" align="right" nowrap="nowrap"><?php echo $effect_size; ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorOne; ?>"><?php echo $effect_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($tot_size) && $mergetable == FALSE) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorOne; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strTotal); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $tot_size; ?></td>
|
||||
<td><?php echo $tot_unit; ?></td>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $cfgBgcolorOne; ?>" style="padding-right: 10px"><?php echo ucfirst($strTotal); ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorOne; ?>" align="right" nowrap="nowrap"><?php echo $tot_size; ?></td>
|
||||
<td bgcolor="<?php echo $cfgBgcolorOne; ?>"><?php echo $tot_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@@ -551,11 +551,12 @@ if ($cfgShowStats) {
|
||||
<?php
|
||||
$i = 0;
|
||||
if (isset($showtable['Row_format'])) {
|
||||
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strFormat); ?></td>
|
||||
<td align="<?php echo $cell_align_left; ?>" nowrap="nowrap">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strFormat); ?></td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" align="<?php echo $cell_align_left; ?>" nowrap="nowrap">
|
||||
<?php
|
||||
echo ' ';
|
||||
if ($showtable['Row_format'] == 'Fixed') {
|
||||
@@ -574,44 +575,48 @@ if ($cfgShowStats) {
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Rows'])) {
|
||||
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strRows); ?></td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strRows); ?></td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" align="right" nowrap="nowrap">
|
||||
<?php echo number_format($showtable['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) {
|
||||
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strRowLength); ?> ø</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strRowLength); ?> ø</td>
|
||||
<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"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) {
|
||||
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strRowSize); ?> ø</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strRowSize); ?> ø</td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" align="right" nowrap="nowrap">
|
||||
<?php echo $avg_size . ' ' . $avg_unit . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Auto_increment'])) {
|
||||
$bgcolor = ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne);
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strNext); ?> Autoindex</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ucfirst($strNext); ?> Autoindex</td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>" align="right" nowrap="nowrap">
|
||||
<?php echo number_format($showtable['Auto_increment'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -123,13 +123,13 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
|
||||
. '&goto=user_details.php3';
|
||||
}
|
||||
?>
|
||||
<tr bgcolor="<?php echo $bgcolor; ?>">
|
||||
<tr>
|
||||
<?php
|
||||
if (!$dbcheck) {
|
||||
if ($priv) {
|
||||
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; ?>">
|
||||
<?php echo $GLOBALS['strRevokePriv']; ?></a>
|
||||
</td>
|
||||
@@ -138,7 +138,7 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
|
||||
if ($grantopt) {
|
||||
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; ?>">
|
||||
<?php echo $GLOBALS['strRevokeGrant']; ?></a>
|
||||
</td>
|
||||
@@ -148,7 +148,7 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
|
||||
if ($priv) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<a href="<?php echo $revoke_url; ?>">
|
||||
<?php echo $GLOBALS['strRevoke']; ?></a>
|
||||
</td>
|
||||
@@ -156,30 +156,30 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
|
||||
} else {
|
||||
echo "\n";
|
||||
?>
|
||||
<td> </td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"> </td>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<td><?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['Host']; ?></td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ($row['User']) ? $row['User'] : '<span style="color: #FF0000">' . $GLOBALS['strAny'] . '</span>'; ?></td>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<td><?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><?php echo ($priv != '') ? $priv : '<span style="color: #002E80">' . $GLOBALS['strNoPrivileges'] . '</span>'; ?></td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ($db == '*') ? '<span style="color: #002E80">' . $GLOBALS['strAll'] . '</span>' : $db; ?></td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ($table == '*') ? '<span style="color: #002E80">' . $GLOBALS['strAll'] . '</span>' : $table; ?></td>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo ($priv != '') ? $priv : '<span style="color: #002E80">' . $GLOBALS['strNoPrivileges'] . '</span>'; ?></td>
|
||||
<?php
|
||||
if (!$dbcheck) {
|
||||
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
|
||||
}
|
||||
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>
|
||||
<?php
|
||||
$i++;
|
||||
@@ -841,12 +841,12 @@ function PMA_tableUsers($host = FALSE, $user = FALSE)
|
||||
// }
|
||||
?>
|
||||
|
||||
<tr bgcolor="<?php echo $bgcolor;?>">
|
||||
<tr>
|
||||
<?php
|
||||
if (!$user) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor;?>">
|
||||
<a href="<?php echo $edit_url; ?>">
|
||||
<?php echo $GLOBALS['strEdit']; ?></a>
|
||||
</td>
|
||||
@@ -854,30 +854,30 @@ function PMA_tableUsers($host = FALSE, $user = FALSE)
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor;?>">
|
||||
<a href="<?php echo $delete_url; ?>">
|
||||
<?php echo $GLOBALS['strDelete']; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor;?>">
|
||||
<a href="<?php echo $check_url; ?>">
|
||||
<?php echo $GLOBALS['strGrants']; ?></a>
|
||||
</td>
|
||||
<!--
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor;?>">
|
||||
<a href="<?php echo (($check_url != '') ? $check_url : '#'); ?>">
|
||||
<?php echo $GLOBALS['strGrants']; ?></a>
|
||||
</td>
|
||||
//-->
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor;?>">
|
||||
<?php echo $row['Host'] . "\n"; ?>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor;?>">
|
||||
<?php echo (($row['User']) ? '<b>' . $row['User'] . '</b>' : '<span style="color: #FF0000">' . $GLOBALS['strAny'] . '</span>') . "\n"; ?>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor;?>">
|
||||
<?php echo (($row[$GLOBALS['password_field']]) ? $GLOBALS['strYes'] : '<span style="color: #FF0000">' . $GLOBALS['strNo'] . '</span>') . "\n"; ?>
|
||||
</td>
|
||||
<td>
|
||||
<td bgcolor="<?php echo $bgcolor;?>">
|
||||
<?php echo $strPriv . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user