diff --git a/db_details.php3 b/db_details.php3 index 348a743a3..235d52352 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -129,42 +129,44 @@ else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) { 0) { - list($formated_size, $unit) = format_byte_down($tblsize, 3, 1); - } else { - list($formated_size, $unit) = format_byte_down($tblsize, 3, 0); + $mergetable = FALSE; + if (isset($sts_data['Type']) && $sts_data['Type'] == 'MRG_MyISAM') { + $mergetable = TRUE; + } + if (isset($sts_data['Rows'])) { + if ($mergetable == FALSE) { + $tblsize = $sts_data['Data_length'] + $sts_data['Index_length']; + $sum_size += $tblsize; + $sum_entries += $sts_data['Rows']; + if ($tblsize > 0) { + list($formated_size, $unit) = format_byte_down($tblsize, 3, 1); + } else { + list($formated_size, $unit) = format_byte_down($tblsize, 3, 0); + } + } + // MyISAM MERGE Table + else if ($mergetable == TRUE) { + $formated_size = ' - '; + $unit = ''; + } + else { + $formated_size = 'unknown'; + $unit = ''; } - } - else if ($mergetable == true) // MyISAM MERGE Table - { - $formated_size=" - "; - $unit=""; - } - else - { - $formated_size="unknown"; - $unit=""; - } ?> - "; - echo number_format($sts_data['Rows'], 0, $number_decimal_separator, - $number_thousands_separator) . "\n"; - if ($mergetable == true) echo ""; - ?> + ' . number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . '' . "\n"; + } else { + echo number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; + } + ?>    - + phpMyAdmin - - + diff --git a/main.php3 b/main.php3 index c9db54d86..5b648fb00 100755 --- a/main.php3 +++ b/main.php3 @@ -119,9 +119,9 @@ if ($server > 0 { // Get user's rights if (empty($cfgServer['port'])) { - $stdlink = mysql_connect($cfgServer['host'], $cfgServer['stduser'], $cfgServer['stdpass']); + $stdlink = mysql_connect($cfgServer['host'], $cfgServer['stduser'], $cfgServer['stdpass']); } else { - $stdlink = mysql_connect($cfgServer['host'] . ':' . $cfgServer['port'], $cfgServer['stduser'], $cfgServer['stdpass']); + $stdlink = mysql_connect($cfgServer['host'] . ':' . $cfgServer['port'], $cfgServer['stduser'], $cfgServer['stdpass']); } // Does user have global Create priv? $rs_usr = mysql_query('SELECT * FROM mysql.user WHERE User = \'' . sql_addslashes($cfgServer['user']) . '\'', $stdlink); @@ -134,18 +134,14 @@ if ($server > 0 // find, in most cases it's probably the one he just dropped :) // (Note: we only get here after a browser reload, I don't know why) if (!$create) { - - if (empty($cfgServer['port'])) { - $userlink = mysql_connect($cfgServer['host'], $cfgServer['user'], - $cfgServer['password']) or mysql_die(); - } else { - $userlink = mysql_connect($cfgServer['host'].":". - $cfgServer['port'], $cfgServer['user'], - $cfgServer['password']) or mysql_die(); - } + if (empty($cfgServer['port'])) { + $userlink = mysql_connect($cfgServer['host'], $cfgServer['user'], $cfgServer['password']) or mysql_die(); + } else { + $userlink = mysql_connect($cfgServer['host'] . ':' . $cfgServer['port'], $cfgServer['user'], $cfgServer['password']) or mysql_die(); + } $rs_usr = mysql_query('SELECT Db FROM mysql.db WHERE User = \'' . sql_addslashes($cfgServer['user']) . '\'', $stdlink); while ($row = mysql_fetch_array($rs_usr)) { - if (!mysql_select_db($row['Db'],$userlink)) { + if (!mysql_select_db($row['Db'], $userlink)) { $db_to_create = $row['Db']; $create = TRUE; break; @@ -228,7 +224,7 @@ if ($server > 0 echo "\n"; } // end of 2.1 (AdvAuth case) - // 2.2. No authentification + // 2.2. No authentication else { ?> diff --git a/ob_lib.inc.php3 b/ob_lib.inc.php3 index bccdbdc45..03455d02f 100644 --- a/ob_lib.inc.php3 +++ b/ob_lib.inc.php3 @@ -1,9 +1,9 @@ diff --git a/tbl_change.php3 b/tbl_change.php3 index f80b1565d..2a6b8587b 100755 --- a/tbl_change.php3 +++ b/tbl_change.php3 @@ -1,5 +1,5 @@ // We don't want binary data to be destroyed - // Note: from the MySQL manual: "BINARY doesn't affect how the column - // is stored or retrieved" so it does not mean that the contents - // is binary + // Note: from the MySQL manual: "BINARY doesn't affect how the column is + // stored or retrieved" so it does not mean that the contents is + // binary //if ((strstr($row_table_def['Type'], 'blob') || strstr($row_table_def['Type'], 'binary')) - //if (strstr($row_table_def['Type'], 'blob') - if (strstr($row_table_def['True_Type'], 'blob') + // && !empty($data)) { + if (strstr($row_table_def['True_Type'], 'blob') && !empty($data) - && $cfgProtectBlob==TRUE) { + && $cfgProtectBlob == TRUE) { echo ' ' . $strBinary . '' . "\n"; } else { ?> - + - + ' .htmlspecialchars($set[$j]) . '' . "\n"; + echo '>' . htmlspecialchars($set[$j]) . '' . "\n"; } // end for ?> @@ -208,8 +209,8 @@ for ($i = 0; $i < mysql_num_rows($table_def); $i++) { echo ' // We don't want binary data destroyed - else if (strstr($row_table_def['Type'], 'blob') - && !empty($data)) { - if ($cfgProtectBlob==TRUE) { - echo "\n"; - ?> - - - - - - - - - + + + + + + + + + 40) ? 40 : $len); echo "\n"; diff --git a/tbl_properties.php3 b/tbl_properties.php3 index 459b3e537..586543608 100755 --- a/tbl_properties.php3 +++ b/tbl_properties.php3 @@ -266,21 +266,23 @@ if ($index_count > 0) { ?> = 3.23 && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_type != "INNODB" && isset($showtable)) { +if (MYSQL_MAJOR_VERSION >= 3.23 && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_type != 'INNODB' && isset($showtable)) { // Gets some sizes - $mergetable=false; - if (isset($showtable['Type']) && $showtable['Type']=="MRG_MyISAM") $mergetable=true; - list($data_size, $data_unit) = format_byte_down($showtable['Data_length']); - - if ($mergetable==false) list($index_size, $index_unit) = format_byte_down($showtable['Index_length']); - - if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) { - list($free_size, $free_unit) = format_byte_down($showtable['Data_free']); + $mergetable = FALSE; + if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') { + $mergetable = TRUE; } - list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']); - list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']); + list($data_size, $data_unit) = format_byte_down($showtable['Data_length']); + if ($mergetable == FALSE) { + list($index_size, $index_unit) = format_byte_down($showtable['Index_length']); + } + if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) { + list($free_size, $free_unit) = format_byte_down($showtable['Data_free']); + } + list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']); + list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']); if (isset($showtable['Rows']) && $showtable['Rows']>0) { - list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1); + list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1); } // Displays them @@ -304,17 +306,18 @@ if (MYSQL_MAJOR_VERSION >= 3.23 && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_type + ?> - + - @@ -328,17 +331,16 @@ if (MYSQL_MAJOR_VERSION >= 3.23 && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_type + if (isset($tot_size) && $mergetable == FALSE) { + echo "\n"; + ?> - = 3.23 && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_type ?> - + = 3.23 && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_type ?>  ø - + 0 && $mergetable==false) { + if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) { echo (++$i%2) ? ' ' : ' '; @@ -437,7 +439,7 @@ if (MYSQL_MAJOR_VERSION >= 3.23 && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_type ?>  Autoindex - + @@ -431,8 +431,9 @@ for ($y = 0; $y <= $row; $y++) { continue; } - - if (isset($AndOrRow[$y])) $curAndOrRow[$w] = $AndOrRow[$y]; + if (isset($AndOrRow[$y])) { + $curAndOrRow[$w] = $AndOrRow[$y]; + } if (isset($AndOrRow[$y]) && $AndOrRow[$y] == 'and') { $chk['and'] = ' checked="checked"'; $chk['or'] = ''; @@ -494,20 +495,23 @@ for ($y = 0; $y <= $row; $y++) { if (!isset(${$or})) { ${$or} = ''; } - if (isset(${$or}[$x])){ - if (get_magic_quotes_gpc()) { - $stripped_or = stripslashes(${$or}[$x]); - } else { - $stripped_or = ${$or}[$x]; - } - } - else $stripped_or=""; + if (isset(${$or}[$x])) { + if (get_magic_quotes_gpc()) { + $stripped_or = stripslashes(${$or}[$x]); + } else { + $stripped_or = ${$or}[$x]; + } + } else { + $stripped_or = ''; + } ?> 40) ? 40 : $fields_len[$i]); ?> - 40) - ? 40 : $fields_len[$i]); - ?> - + @@ -152,8 +147,7 @@ else { $cmp = ''; } } // end if - $sql_query .= ' AND ' . backquote(urldecode($names[$i])) - . ' ' . "$cmp $quot$fields[$i]$quot"; + $sql_query .= ' AND ' . backquote(urldecode($names[$i])) . " $cmp $quot$fields[$i]$quot"; } // end if } // end for } // end if