Commit d67c2e84 authored by Zéfling's avatar Zéfling
Browse files

Répétition

parent 8bfd092f
......@@ -212,20 +212,21 @@ function diff_temp (array $tab) {
function taille ($taille, $nombre = 5) {
if ($taille < 1024) {
$p = 1024;
if ($taille < $p) {
$taille .= ' o';
} else if ($taille < 1024*1024) {
$taille = ($taille/1024);
} else if ($taille < $p*$p) {
$taille = ($taille/$p);
$taille = substr($taille, 0, $nombre);
if (substr($taille, -1, 1) == '.') $taille = substr($taille, 0, -1);
$taille .= ' Kio';
} else if ($taille < 1024*1024*1024) {
$taille = ($taille/(1024*1024));
} else if ($taille < $p*$p*$p) {
$taille = ($taille/($p*$p));
$taille = substr($taille, 0, $nombre);
if (substr($taille, -1, 1) == '.') $taille = substr($taille, 0, 1);
$taille .= ' Mio';
} else {
$taille = ($taille/(1024*1024*1024));
$taille = ($taille/($p*$p*$p));
$taille = substr($taille, 0, $nombre);
if (substr($taille, -1, 1) == '.') $taille = substr($taille, 0, 1);
$taille .= ' Gio';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment