Вход Регистрация
Файл: vitaliy_nosov/public_html/game/clan/myclan.php
Строк: 106
<?php
require_once ('../../config/func.php');
$title 'Мой клан';
require_once (
'../../config/header.php');
auth();
if(
$user['clan'] == 0){
header('Location: /clan/');
exit();
}
$clan mysql_fetch_assoc(mysql_query("SELECT * FROM `clan` 
WHERE `id` = '"
.$user['clan']."'"));
$has mysql_result(mysql_query("SELECT COUNT(*) FROM `clan_inv` WHERE `clan` = '".$clan['id']."'"), 0);
$lider mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `clan` = '".$clan['id']."' and `clan_dol` = 3"));
if(
$lider['online'] > time() - 60$onlines9 'user.png';
if(
$lider['online'] < time() - 60$onlines9 'user_off.png';
if (isset(
$user) && isset($_GET['exit'])){
if(
$user['clan_dol'] != 3){
mysql_query("UPDATE `user` SET `clan` = 0, `clan_dol` = 0 WHERE `id` = '".$user['id']."'");
echo 
err('<div class="block center">Вы вышли из клана</div>');
exit();
}else{
header('Location: /my_clan/?ex');
exit();
}
}
if (isset(
$user) && isset($_GET['ex'])){
if(
$user['clan_dol'] != 3){
header('Location: /my_clan/?exit');
exit();
}
mysql_query("UPDATE `user` SET `clan` = 0, `clan_dol` = 0 WHERE `clan` = '".$clan[    'id']."'");
mysql_query("DELETE FROM `clan` where `id` = '".$clan['id']."'");
}
echo 
'
<div class="block">
Название: '
.$clan['name'].' </br>
Золото: <img src="/style/gold.png"> '
.$clan['gold'].'</br>
Монеты: <img src="/style/silver.png"> '
.$clan['cristal'].'</br>
Защита: <img src="/style/zahita.png"> '
.$clan['min_def'].'/'.$clan['def'].'</br>
Лидер: <a href="/pers/'
.$lider['id'].'/"><img src="/style/'.$onlines9.'"> <font color="'.$lider['color'].'">'.$lider['login'].' </a></font></br>';
if(!empty(
$clan['opis'])){
echo 
' Описание: '.$clan['opis'].'</br></div>';
}
if(
$user['clan_dol'] == 3){
echo 
'<div class="list"><li><a href="/clan/inv/"><img src="/style/home.png"> Заявки</a></li><li><a href="/clan/buil/"><img src="/style/home.png"> Строения</a></li> <li><a href="/clan/kick/"><img src="/style/home.png"> Исключение</a></li<</div> ';
}
echo 
' <div class="list"><li><a href="/clan/kazna/"><img src="/style/home.png"> Казна</a></li>';
if(
$user['clan_dol'] == 3){
echo 
' <li><a href="/clan/work/"><img src="/style/home.png"> Рабочие ('.$clan['work'].')</a></li>';
}
if(
$user['clan_dol'] == 3){
echo 
'<li><a href="/clan/def/"><img src="/style/home.png"> Защита</a></li>';
}
echo 
'<li><a href="/clan/log/"><img src="/style/home.png"> Журнал</a></li> <li><a href="/clan/chat/"><img src="/style/home.png"> Чат</a></li> ';
echo 
'<li><a href="?exit"><img src="/style/home.png"> Покинуть клан</a></li></div> ';
echo 
' <div class="block center"> Состав клана</div>';
$q mysql_query("SELECT * FROM `user` WHERE `clan` = '".$user['clan']."' ORDER BY `clan_dol`");
while(
$spis mysql_fetch_assoc($q)) {
if(
$spis['online'] > time() - 60$onlinese 'user.png';
if(
$spis['online'] < time() - 60$onlinese 'user_off.png';
echo 
' <div class="list"><li><a href="/pers/'.$spis['id'].'/"> <img src="/style/'.$onlinese.'"> <font color="'.$spis['color'].'">'.$spis['login'].'</a></font></li></div>';
}
require_once (
'../../config/footer.php');
?>
Онлайн: 0
Реклама