Открываем файл \includes\functions.php
Ищем строчку
Код: Выделить всё
// Common global functions
Код: Выделить всё
function get_dostup($up, $down, $skip=0, $bonus=0.000, $minratio=0)
{
//settype($up, 'integer');//Byte
//settype($down, 'integer');//Byte
settype($skip, 'integer');//Gb
$dostup=0;
if($skip && $down < $skip*1024*1024*1024)
{
$dostup='=)';
}
else if(!$up && !$down)
{
$dostup='=|';
}
else if(!$up && $down)
{
$dostup='=)';
}
else if(!$down && $up)
{
$dostup=number_format(($up / $minratio), 2, '.', '');
}
else
{
$dostup=number_format((($up / $minratio)-$down), 2, '.', '');
}
// if($bonus!=0.000 && !in_array($dostup, array('Inf.', 'Seed.', 'Leech.', 'None.')))
// {
// settype($bonus, 'float');
// $dostup=number_format(($dostup + ($up * $bonus)), 2, '.', '');
// }
if($dostup<0)
{
$dostup='=(';
return $dostup;
}
else
{
return get_formatted_filesize($dostup);
}
}
Код: Выделить всё
'U_TINFO_RATIO' => get_ratio($user->data['user_uploaded'], $user->data['user_downloaded'], $config['ppkbb_tcratio_start'], $user->data['user_bonus']),
Код: Выделить всё
'U_TINFO_DOSTUP' => get_dostup($user->data['user_uploaded'], $user->data['user_downloaded'], $config['ppkbb_tcratio_start'], $user->data['user_bonus'], 0.3),
Выводить в оверал_хеадере переменной {U_TINFO_DOSTUP}