Файл: Dvig/gorod/top.php
Строк: 19
<?php
####################
## Автор - USER-X ##
## Copyright 2013 ##
## xcms.mcdir.ru ##
####################
define('xcms_pro', 1);
$path = '../';
$title='Топ 10';
include_once ($path . 'core/core.php');
include_once ($path . 'core/head.php');
#########
echo'<div id="razd">'.$title.'</div>';
$total = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `users`"), 0); //Подсчет общего числа записей
if ($total){
$tops = mysql_query( "SELECT * FROM `users` ORDER BY `gorod_money` DESC LIMIT $set[p_str] " ) ;
$i = '0';
while($top = mysql_fetch_assoc($tops)){
$i++;
echo'<div id="body"><table><tr>
<td><img src="' . $host . '/avatar/small/'.$top['id'].'.png" /></td><td></td>
<td><strong><b>'.$i.'.</b> <a href="' . $host . '/' . $top['id'] . '">' . $top['login'] .
'</a></strong><br /><font color="green">'.$top['gorod_money'].' руб.</font></td></tr>
</table></div>';}}else{echo'<div id="error">Юзеров еще нет</div>';}
echo'<a id="nav" href="index.php">Назад</a>';
include_once ($path . 'core/foot.php');
?>