}else
die( "Unable to get database size<br />" . $result->getMessage() );
- return $this->human_file_size( $database_size );
+ return Utils::Get_Human_Size( $database_size );
} // end function GetDbSize()
public function Get_Nb_Clients()
$media['expire'] = 'N/A';
}
// Media used bytes in a human format
- $media['volbytes'] = $this->human_file_size( $media['volbytes'] );
+ $media['volbytes'] = Utils::Get_Human_Size( $media['volbytes'] );
} else {
$media['lastwritten'] = "N/A";
$media['expire'] = "N/A";
$day = date( "D d", strtotime($end_date) );
if( isset( $tmp['stored_bytes'] ) ) {
- $hbytes = $this->human_file_size( $tmp['stored_bytes'], 3, 'GB');
+ $hbytes = Utils::Get_Human_Size( $tmp['stored_bytes'], 3, 'GB' );
$hbytes = explode( " ", $hbytes );
$stored_bytes = $hbytes[0];
}
$day = date( "D d", strtotime($end_date) );
if( isset( $tmp['stored_bytes'] ) ) {
- $hbytes = $this->human_file_size( $tmp['stored_bytes'], 3, 'GB');
+ $hbytes = Utils::Get_Human_Size( $tmp['stored_bytes'], 3, 'GB' );
$hbytes = explode( " ", $hbytes );
$stored_bytes = $hbytes[0];
}
// Overall stored bytes
$result = $dbSql->GetStoredBytes( ALL );
-$dbSql->tpl->assign('stored_bytes', $dbSql->human_file_size($result['stored_bytes']) );
+$dbSql->tpl->assign('stored_bytes', Utils::Get_Human_Size( $result['stored_bytes'] ) );
// Total stored bytes since last 24 hours
$result = $dbSql->GetStoredBytes( LAST_DAY );
-$dbSql->tpl->assign('bytes_last', $dbSql->human_file_size($result['stored_bytes']) );
+$dbSql->tpl->assign('bytes_last', Utils::Get_Human_Size( $result['stored_bytes'] ) );
// Total stored files since last 24 hours
$files_last = $dbSql->GetStoredFiles( LAST_DAY );
$job['Level'] = $job_level[ $job['Level'] ];
// Job Size
- $job['JobBytes'] = $dbSql->human_file_size( $job['JobBytes'] );
+ $job['JobBytes'] = Utils::Get_Human_Size( $job['JobBytes'] );
array_push( $last_jobs, $job);
}
$files = $dbSql->CalculateFilesPeriod($_GET['server'],$dbSql->StartDate,$dbSql->EndDate);
$smarty->assign('startperiod',$dbSql->StartDate);
$smarty->assign('endperiod',$dbSql->EndDate);
-$smarty->assign('bytesperiod',$dbSql->human_file_size( $bytes ) );
+$smarty->assign( 'bytesperiod', Utils::Get_Human_Size( $bytes ) );
$smarty->assign('filesperiod',$files);
// Array with jobs data
$tdate = explode (":",$tmp['elapsed']); // Temporal "workaround" ;) Fix later
if ( $tdate[0] > 300000 )
$tmp['elapsed'] = "00:00:00";
- $tmp['JobBytes'] = $dbSql->human_file_size( $tmp['JobBytes'] );
+ $tmp['JobBytes'] = Utils::Get_Human_Size( $tmp['JobBytes'] );
array_push($a_jobs,$tmp);
}
$smarty->assign('jobs',$a_jobs);