Файл: tankon.mobi/tanks/adm_clan.php
Строк: 109
<?
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';
include_once '../sys/inc/thead.php';
title();aut();
echo '<link rel="stylesheet" href="style.css" type="text/css" />';
include_once 'function.php';
if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
$ank=get_user($ank['id']);
if(mysql_result(mysql_query("SELECT COUNT(`id`) FROM `collective_user` WHERE `id_user` = '$ank[id]' AND `id_collective`='$mc[id]'"),0)!=0){
$uctu=mysql_fetch_array(mysql_query("SELECT * FROM `collective_user` WHERE `id_user` = '$ank[id]'"));
if ($mcu['status']<=2 && $user['id']!=$ank['id'] && $uctu['status']!=1){
if(isset($_GET['1'])){
mysql_query("UPDATE `collective_user` SET `status` = '2' WHERE `id_user` = '$ank[id]'");
header ("Location: /profile?id=".$ank['id']."");
}
elseif(isset($_GET['2'])){
mysql_query("UPDATE `collective_user` SET `status` = '3' WHERE `id_user` = '$ank[id]'");
header ("Location: /profile?id=".$ank['id']."");
}
elseif(isset($_GET['3'])){
mysql_query("UPDATE `collective_user` SET `status` = '4' WHERE `id_user` = '$ank[id]'");
header ("Location: /profile?id=".$ank['id']."");
}
elseif(isset($_GET['4'])){
mysql_query("UPDATE `collective_user` SET `status` = '5' WHERE `id_user` = '$ank[id]'");
header ("Location: /profile?id=".$ank['id']."");
}
elseif(isset($_GET['5']) && $mcu['status']<2){
echo'<div class="bot"><table><tbody><tr><td class="w50 pr1">
<a class="simple-but border" href="/adm_clan?id='.$ank['id'].'&5&ok"><span>
<span>Отдать</span></span></a></td>
<td class="w50 pl1"><a class="simple-but border" href="/profile?id='.$ank['id'].'">
<span><span>Нет, не надо</span></span></a></td></tr></tbody></table></div>';
if(isset($_GET['ok']) && $mcu['status']<2){
mysql_query("UPDATE `collective_user` SET `status` = '2' WHERE `id_user` = '$tanks_code[id]'");
mysql_query("UPDATE `collective_user` SET `status` = '1' WHERE `id_user` = '$ank[id]'");
header ("Location: /profile?id=".$ank['id']."");}
}
echo '<div class="trnt-blocks"><div class="wrap-content">';
echo'<div class="white bold medium cntr">Танкист: '.$ank['nick'].'</div>';
echo '</div><div class="clrb"></div></div>';
echo '<a href="/adm_clan?id='.$ank['id'].'&1"><div class="trnt-block p5" style="margin-bottom:5px">Заместитель командира</div></a>';
echo '<a href="/adm_clan?id='.$ank['id'].'&2"><div class="trnt-block p5" style="margin-bottom:5px">Вербовщик</div></a>';
echo '<a href="/adm_clan?id='.$ank['id'].'&3"><div class="trnt-block p5" style="margin-bottom:5px">Солдат</div></a>';
echo '<a href="/adm_clan?id='.$ank['id'].'&4"><div class="trnt-block p5" style="margin-bottom:5px">Новобранец</div></a>';
if($mcu['status']<2){
echo '<a href="/adm_clan?id='.$ank['id'].'&5"><div class="trnt-block p5" style="margin-bottom:5px">Передать клан</div></a>';
}}else {header ("Location:/");}}
echo'<a class="simple-but gray mb10" href="profile?id='.$ank['id'].'"><span><span>Назад в профиль</span></span></a></div>';
include_once 'foots.php';
?>