<?
define('PROTECTOR', 1);

$headmod = 'clan';//фикс. места

$textl='Клан';
include('files/path.php');
include($path.'files/db.php');
include($path.'files/auth.php');
include($path.'files/func.php');
include($path.'files/core.php');
include($path.'files/head.php');
include($path.'files/zag.php');
if(empty($_GET[id])){echo"Невыбран клан"; include($path.'files/down.php'); exit;}
$req = mysql_query("SELECT * FROM `clan` where `id`='$_GET[id]'");
$avto=mysql_num_rows($req);
if($avto>=1){
$clan = mysql_fetch_array($req);
$req = mysql_query("SELECT usr FROM `users` where `clan`='$clan[lider]'");
////////////////////////////
$kk=mysql_num_rows($req);
}else{
echo"Невыбран клан";include($path.'files/down.php'); exit;
}
switch($_GET[mod]){

default:
echo"Название: <b>$clan[name]</b><br/>";
echo"Описание клана: <b>$clan[desk]</b><br/>";
if(!empty($clan[emblema])){
echo"Эмблема: <img src=\"pic/clan/$clan[emblema]\" alt=\"clan\"/><br/>";
}
echo"Бойцов: $kk<br/>";
echo"Лидер: <a href=\"search.php?nick=$clan[lider]&amp;go=go\">$clan[lider]</a><br/>";
echo"<b>Список бойцов</b>:";
$req = mysql_query("SELECT clan,usr,lvl FROM `users` where `clan`='$clan[lider]' and `usr`!='$clan[lider]' ORDER BY lvl DESC");
////////////////////////////
$avto=mysql_num_rows($req);
$i=1;
if($avto>=1){
While($cl = mysql_fetch_array($req))
{
echo"<br/>$i. <a href=\"search.php?nick=$cl[usr]&amp;go=go\">$cl[usr]</a> [$cl[lvl] уровень]";
$i++;
}
}else{
echo"<br/>$i. <a href=\"search.php?nick=$clan[lider]&amp;go=go\">$clan[lider]</a>";
}
break;
}

include($path.'files/down.php');
?>
