the rating not working it shows only half star all the time[/b]
PHP Code:
////// RATING ///////
function rating($uid)
{
$info = mysql_fetch_array(mysql_query("SELECT plusses, gplus, shouts, chmsgs FROM ibwf_users WHERE id='".$uid."'"));
$pl = $info[0];
$gp = $info[1];
$sh = $info[2];
$ch = $info[3];
$infototal = ($pl + $gp + $sh + $ch);
if($infototal<10)
{
return "<img src=\"images/empty.gif\" alt=\"\"/>";
}
else if($infototal<350)
{
return "<img src=\"images/half.gif\" alt=\"\"/>";
}
else if($infototal<1000)
{
return "<img src=\"images/one.gif\" alt=\"\"/>";
}
else if($infototal<2500)
{
return "<img src=\"images/onehalf.gif\" alt=\"\"/>";
}
else if($infototal<6500)
{
return "<img src=\"images/two.gif\" alt=\"\"/>";
}
else if($infototal<15000)
{
return "<img src=\"images/twohalf.gif\" alt=\"\"/>";
}
else if($infototal<37000)
{
return "<img src=\"images/three.gif\" alt=\"\"/>";
}
else if($infototal<85000)
{
return "<img src=\"images/threehalf.gif\" alt=\"\"/>";
}
else if($infototal<190000)
{
return "<img src=\"images/four.gif\" alt=\"\"/>";
}
else if($infototal<420000)
{
return "<img src=\"images/fourhalf.gif\" alt=\"\"/>";
}
else if($infototal<900000)
{
return "<img src=\"images/five.gif\" alt=\"\"/>";
}
else if($infototal<1700000)
{
return "<img src=\"images/fivehalf.gif\" alt=\"\"/>";
}
else if($infototal<3300000)
{
return "<img src=\"images/six.gif\" alt=\"\"/>";
}
else if($infototal<7000000)
{
return "<img src=\"images/sixhalf.gif\" alt=\"\"/>";
}
else
{
return "<img src=\"images/seven.gif\" alt=\"\"/>";
}
}
PHP Code:
echo "Rating: ";
echo rating($who);
cos plusses>=posts ;)
Leave a comment: