<?
echo '<table cellpadding="0" cellspacing="0">';
echo '<tbody>';
echo '<tr> ';
$pol1=mysql_query("SELECT * FROM `user` WHERE `pol`  = '0' ORDER BY `rating` DESC LIMIT 1");
while ($post = mysql_fetch_array($pol1))
{
echo "<form method='post' enctype='multipart/form-data' action='?$passgen'>\n";
echo "<table class='post'>\n";
echo "   <tr>\n";
echo "  <td class='icon48' rowspan='2'>\n";
avatar2($post['id']);
echo "  </td>\n";
echo "  <td class='anput'>\n";
echo " ".online($post['id'])."";
echo " <a href='/info.php?id=$post[id]'><span style=\"color:$post[ncolor]\">$post[nick]</span></a>";
if (isset($user) && $user['id']!=$ank['id'])echo " <a href=\"/mail.php?id=$post[id]\"><img src='/img/mail.gif' alt='' class='icon'/></a><br />\n";

echo "Рейтинг: <font color='red'>$post[rating]</font> %<br/>";
if($post['rating']>=0 && $post['rating']<=20)echo "<img src='/stars/rank1.gif'></img><br />"; 
if($post['rating']>=21 && $post['rating']<=40)echo "<img src='/stars/rank2.gif'></img><br />";
if($post['rating']>=41 && $post['rating']<=60)echo "<img src='/stars/rank3.gif'></img><br />";
if($post['rating']>=61 && $post['rating']<=80)echo "<img src='/stars/rank4.gif'></img><br />";
if($post['rating']>=81 && $post['rating']<=100)echo "<img src='/stars/rank5.gif'></img><br />";
if($post['rating']>=101 && $post['rating']<=120)echo "<img src='/stars/rank6.gif'></img><br />";
if($post['rating']>=121 && $post['rating']<=140)echo "<img src='/stars/rank7.gif'></img><br />";
if($post['rating']>=141 && $post['rating']<=160)echo "<img src='/stars/rank8.gif'></img><br />";
if($post['rating']>=161 && $post['rating']<=180)echo "<img src='/stars/rank9.gif'></img><br />";
if($post['rating']>=181 && $post['rating']<=1000)echo "<img src='/stars/rank10.gif'></img><br />";

}
echo "  </td>\n";
echo "   </tr>\n";
echo "   <tr>\n";
//echo "  <td class='anput'>\n";

echo "</table>\n";
echo "</form>\n";
echo '<table cellpadding="0" cellspacing="0">';
$pol1=mysql_query("SELECT * FROM `user` WHERE `pol` = '1' ORDER BY `rating` DESC LIMIT 1");
while ($post = mysql_fetch_array($pol1))
{
echo "<form method='post' enctype='multipart/form-data' action='?$passgen'>\n";
echo "<table class='post'>\n";
echo "   <tr>\n";
echo "  <td class='icon48' rowspan='2'>\n";
avatar2($post['id']);
echo "  </td>\n";
echo "  <td class='anput'>\n";
echo " ".online($post['id'])."";
echo " <a href='/info.php?id=$post[id]'><span style=\"color:$post[ncolor]\">$post[nick]</span></a>";
if (isset($user) && $user['id']!=$ank['id'])echo " <a href=\"/mail.php?id=$post[id]\"><img src='/img/mail.gif' alt='' class='icon'/></a><br />\n";

//echo "<img src='polosar.php?rat=".(int)$post["rating"]."<br />";
echo "Рейтинг: <font color='red'>$post[rating]</font> %<br/>";
if($post['rating']>=0 && $post['rating']<=20)echo "<img src='/stars/rank1.gif'></img><br />"; 
if($post['rating']>=21 && $post['rating']<=40)echo "<img src='/stars/rank2.gif'></img><br />";
if($post['rating']>=41 && $post['rating']<=60)echo "<img src='/stars/rank3.gif'></img><br />";
if($post['rating']>=61 && $post['rating']<=80)echo "<img src='/stars/rank4.gif'></img><br />";
if($post['rating']>=81 && $post['rating']<=100)echo "<img src='/stars/rank5.gif'></img><br />";
if($post['rating']>=101 && $post['rating']<=120)echo "<img src='/stars/rank6.gif'></img><br />";
if($post['rating']>=121 && $post['rating']<=140)echo "<img src='/stars/rank7.gif'></img><br />";
if($post['rating']>=141 && $post['rating']<=160)echo "<img src='/stars/rank8.gif'></img><br />";
if($post['rating']>=161 && $post['rating']<=180)echo "<img src='/stars/rank9.gif'></img><br />";
if($post['rating']>=181 && $post['rating']<=1000)echo "<img src='/stars/rank10.gif'></img><br />";

}
echo "  </td>\n";
echo "   </tr>\n";
echo "   <tr>\n";
//echo "  <td class='anput'>\n";

echo "</table>\n";
echo "</form>\n";
?>
