Файл: vsime.com/system/functions/show_akt_rating.php
Строк: 69
<?
function show_akt_rating($user_id, $add_show=0)
{
global $user, $time;
$ank = profile($user_id);
if ($ank != NULL)
{
$ank['akt_rating_nt'] = $ank['akt_rating_time'] - $time;
$ank['akt_rating'] = sprintf("%01.2f", $ank['akt_rating']);
$ank['akt_rating_add'] = sprintf("%01.2f", $ank['akt_rating_add']);
if ($ank['akt_rating_add'] < 0)$ank['akt_rating_add'] = " (<span style='color: red;'>$ank[akt_rating_add]</span>)";
elseif ($ank['akt_rating_add'] > 0)$ank['akt_rating_add'] = " (<span style='color: green;'>+$ank[akt_rating_add]</span>)";
elseif ($ank['akt_rating_add'] == 0)$ank['akt_rating_add'] = " (<span style='color: grey;'>$ank[akt_rating_add]</span>)";
if ((isset($user) && $user['level']>=3 || $ank['id']==$user['id']) && $ank['akt_rating_nt'] > 3600)$ank['akt_rating_add'] = $ank['akt_rating_add'];
else $ank['akt_rating_add'] = NULL;
if ($add_show == 0)$ank['akt_rating_add'] = NULL;
$ank['akt_rating'] = "$ank[akt_rating]$ank[akt_rating_add]";
} else {
$ank['akt_rating'] = "0.00";
}
return $ank['akt_rating'];
}
?>