Файл: core/formatfilesize.php
Строк: 15
<?php
function formatfilesize( $data ) {
if( $data < 1024 ) {
return $data . " bytes";
}else if( $data < 1024000 ) {
return round( ( $data / 1024 ), 1 ) . " KB";
}
else {
return round( ( $data / 1024000 ), 1 ) . " MB";}
}
$db = mysql_connect ("localhost","newvisiti","1032kxFm");
mysql_select_db("newvisiti",$db);
$result = mysql_query( "SHOW TABLE STATUS" );
$dbsize = 0;
while( $row = mysql_fetch_array( $result ) ) {
$dbsize += $row[ "Data_length" ] + $row[ "Index_length" ];
}
?>