Файл: EasyHost v2.0/system/htdocs/manager/usage/days.pl
Строк: 18
<?php
my @time = localtime();
$time[5] += 1900;
$time[4]++;
$time[4] = '0'.$time[4] if ($time[4] < 10);
$time[3] = '0'.$time[3] if ($time[3] < 10);
$date = $time[5].$time[4];
my $highest = $system->db->selectrow_array('SELECT MAX(bytes) FROM transfer WHERE id = ? AND date_online >= '.$date.'01 AND date_online <= '.$date.'31 GROUP BY id',undef,$login->user->id);
for (my $day = 1; $day <= $time[3]; $day++)
{
$day = '0'.$day if (length $day == 1);
my $amount = $login->user->transfer($date.$day);
my $percent = ($highest > 0) ? EasyHost::Format->number($amount->bytes / $highest * 100) : '1.00';
$percent = '1.00' if ($percent < 1);
$percemt = '100.00' if ($percent > 100);
?>