<?
function medal($user=NULL)
{
$ank = mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id`='".$user."'"));
if ($ank['rating']>=0 && $ank['rating']<=50){echo "<img src='/style/medal/1_0.png' alt=''/>";}
if ($ank['rating']>=51 && $ank['rating']<=60){echo "<img src='/style/medal/1.png' alt=''/>";}
if ($ank['rating']>=61 && $ank['rating']<=100){echo "<img src='/style/medal/1.png' alt=''/> <img src='/style/medal/2_0.png' alt=''/>";}
if ($ank['rating']>=101 && $ank['rating']<=130){echo "<img src='/style/medal/1.png' alt=''/> <img src='/style/medal/2.png' alt=''/>";}
if ($ank['rating']>=131 && $ank['rating']<=150){echo "<img src='/style/medal/1.png' alt=''/> <img src='/style/medal/2.png' alt=''/> <img src='/style/medal/3_0.png' alt=''/>";}
if ($ank['rating']>=151 && $ank['rating']<=99999999999999999){echo "<img src='/style/medal/1.png' alt=''/> <img src='/style/medal/2.png' alt=''/> <img src='/style/medal/3.png' alt=''/>";}
}
?>