View file loads/inc/rating.php

File size: 1.31Kb
<?
echo "<b>Понравилось?</b> <a href='?rating=up&amp;".url("d=$l&amp;f=$file")."'><font COLOR='#3FD300'>Да</font></a>|<a href='?rating=down&amp;".url("d=$l&amp;f=$file")."'><font COLOR='red'>Нет</font></a><br />";
echo "&raquo;Рейтинг: <b>".@mysql_result(mysql_query("SELECT `rating` FROM `loads_list` WHERE (`name` = '$file' AND `size` = '$size')"),0)."</b>";
$rating1 = mysql_result(mysql_query("SELECT `rating` FROM `loads_list` WHERE (`name` = '$file' AND `size` = '$size')"),0);
if ($rating1 == 0)
{
echo "(<font COLOR='#DCDCDC'>Нейтральный</font>)";
}
else
{
if ($rating1 > 0 and $rating1 <= 10)
{echo "(<font COLOR=''>Нормальный</font>)";}
else
{
if ($rating1 > 10 and $rating1 <= 25)
{
echo "(<font COLOR=''>Хороший</font>)";
}
else
{
if ($rating1 > 25 and $rating1 <= 50)
{
echo "(<font COLOR=''>Отличный</font>)";
}
else
{
if ($rating1 > 50)
{
echo "(<font COLOR='#FF3239'>Супер</font>)";
}
else
{
if ($rating1 < 0 and $rating1 > -25)
{
echo "(<font COLOR=''>Плохой</font>)";
}
else
{
echo "(<font COLOR='#E50000'>На удаление</font>)";
}
}
}
}
}
}
echo "<br/>";
echo "&raquo;Проголосовали:(<b>".@mysql_result(mysql_query("SELECT `ratingy` FROM `loads_list` WHERE (`name` = '$file' AND `size` = '$size')"),0)."</b>  чел.)<br />";
?>