<?php
/*Онлайн игра Football Manager под DCMS версии 6.6.4

 *ВНИМАНИЕ!!! Данный скрипт нельзя распространять, нельзя продавать, менять и т.д.

 *Автор скрипта: Doctor

 *Тех поддержка: 

 *icq: 624552318

 *e-mail: dudringvala@yahoo.com

 *skype: isevgio

 */
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_coach`"), 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_coach` ORDER BY `level` DESC LIMIT $start, $set[p_str]");
while ($f = mysql_fetch_array($q))
{
$b = mysql_fetch_array(mysql_query("SELECT * FROM `fm_club` WHERE `id` = '$f[id_club]' LIMIT 1"));
$a = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$b[id_user]' LIMIT 1"));
if($num==1){
echo "<div class='frends'>";
$num=0;}
else{
echo "<div class='frends2'>";
$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='coach.php?id=$a[id]'>$f[name]</a> ($f[level])\n";
echo "<a href='/info.php?id=$a[id]'>$a[nick]</a> &#187; <a href='coach.php?id=$a[id]'>$f[name]</a> ($f[level])\n";
echo "</div>";

}


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

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

?>
