<?php
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/user.php';
$set['title']='FM Клубы';
include_once '../../sys/inc/thead.php';
title();
err();
aut();
include_once 'online.php';

$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `fm_club`"), 0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
if ($k_post==0)echo '<div class="menu">Нет клубов!</div>';
$q = mysql_query("SELECT * FROM `fm_club` ORDER BY `level` DESC LIMIT $start, $set[p_str]");
while ($f = mysql_fetch_array($q))
{
$a = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$f[id_user]' LIMIT 1"));
if($num==1){
echo "<div class='f1'>";
$num=0;}
else{
echo "<div class='f2'>";
$num=1;}
//echo "".online($a['id'])."\n";
//echo "<a href='/info.php?id=$a[id]'><span style=\"color:$a[ncolor]\">$a[nick]</span></a> &#187; <a href='club.php?id=$a[id]'>$f[name]</a> ($f[level])\n";
echo "<a href='/info.php?id=$a[id]'>$a[nick]</a> &#187; <a href='club.php?id=$a[id]'>$f[name]</a> ($f[level])\n";

echo "</div>";

}


if ($k_page>1)str("clubs.php?",$k_page,$page); // Вывод страниц
echo "<div class='foot'>";
echo "&#171; <a href='index.php'>Назад</a><br/>";
echo "</div>";

include_once '../../sys/inc/tfoot.php';

?>
