<?
include '../config.php';
include '../func.php';

head();
aut();
ban();
////////////////////////////////////////
mysql_query("UPDATE `profile` SET `online` = 'fo' WHERE `id` = '".$id_session."'");

$id = num($_GET['id']);
$user = mysql_fetch_assoc(mysql_query("SELECT * FROM `profile` WHERE `id` = '".$id."'"));

echo head . "<b>".$user['login']."</b> в группах:" . div . katalog;   

$result = mysql_query("SELECT * FROM clans_user WHERE `user` = '".$user['id']."'");
while($clan = mysql_fetch_assoc($result)){
$clan_info = mysql_fetch_assoc(mysql_query("SELECT * FROM `clans` WHERE `id` = '".$clan['clan']."'"));
if ( $clan_info['user'] == $user['id'] ) $st = '<b>[Лидер]</b>'; else $st = '';
echo "<img src=\"../style/img/dot.gif\" alt=\"\" /> <a href=\"view.php?id=".$clan_info['id']."\">".$clan_info['name']."</a> ".$st."<br/ >";   
}

/////////////////////////////////////////

navig();
foot();
?>