<?php
require '../system/start.php';
require '../system/functions.php';
reg();
$str['mesto'] = 'Рейтинг умных';
$str['block'] = $set['site'].' / Рейтинг умных';
include '../style/'.$style.'/head.php';

echo '<div class="where"><img src="../style/' . $style . '/ico/vote.gif">Рейтинг умных</div>';

$r = mysql_query("SELECT * FROM `users` ORDER by `chat_vict` DESC LIMIT 10");
$n = 1;
while ($e = mysql_fetch_assoc($r)) {
	echo ($i % 2) ? '<div class="forum2">' : '<div class="forum1">';
	              if ($e['gender'] == 1)
			$pol = '<img class="ico" src="../style/'.$style.'/ico/m.png" alt="" />';
		if ($e['gender'] == 2)
			$pol = '<img class="ico" src="../style/'.$style.'/ico/w.png" alt="" />';
	echo $n . ').'; 
              echo $pol.'<a href="../pages/anketa.php?login=' . $e['login'] . '">' . $e['login'] . '</a> [' . $e['chat_vict'] . ']';
	echo '</div>';
	$i++;
	$n++;
}

include '../style/'.$style.'/foot.php';
?>