<?php
$_CONF['title']='Топ-20 сайтов';
include '../header/config.inc.php';
include '../header/function.inc.php';
include '../header/header.inc.php';
include '../header/connect.inc.php';
include '../header/click-club.class.php';
If (!isset($_GET['log'])) define("anybody","true");
include '../header/enter.inc.php';
include '../ban.php';
If ($_enter){mysql_query("update `".prefix."users` set `mesto`='Смотрит ТОП-20 сайтов', `online`='".time()."' where `id` = '".$_USER['id']."';");}
else {echo '<div class="menuindex"><font color="#FF0000"><b>Вы не авторизированы!</b></font><br/> [ <a href="/enter.php?mode=enter">Войти</a> | <a href="/reg.php">Регистрация</a>]</div>';}
echo '<div class="downsw"><b>Топ-20 сайтов по переходам</b></div>';
$view = mysql_query("SELECT * FROM `".prefix."url` ORDER BY `perehod` DESC LIMIT 20");
while ($top=mysql_fetch_array($view)){
$url = $top['url'];
$name = $top['nazv'];
$cnt = $top['perehod'];
$i++;
echo '<div class="menuindex"><b>['.$i.']</b> <a href="/redir.php?url=http://'.$url.'"><b>'.$name.'</b></a> ('.$cnt.')</div>';
}
include "../header/end.inc.php";
?>