Файл: DARK WARS/dark_war/clans/demand/index.php
Строк: 28
<?php
include_once '../../start.php';
$doc = new document();
$doc->title('Вступление в клан.');
$id = (int)$_GET['id'];
//Проверка пользователя $player->id в клане $id
$count_us = mysql_result(mysql_query("SELECT COUNT(*) FROM `dark_war_clans_us` WHERE `id_clan` = '$id' AND `id_player` = '{$player->id}' "),0);
$doc->assign('post', $dispatch);
$dispatch = array();
if ($count_us) {
$dispatch[] = array ('title' => 'Вы в клане', 'img' => '/dark_war/all_img/clans/menu/board.png', 'ico_size' => 32);
}else{
mysql_query("INSERT INTO dark_war_clan_demand (id_player,id_clans) VALUES ('{$player->id}','$id')");
$mail = mysql_fetch_assoc(mysql_query("SELECT id_player FROM `dark_war_clans_us` WHERE id_clan='$id' AND admin='2'"));
$dispatch[] = array ('title' => '<b>Заявка подана.</b>', 'img' => '/dark_war/all_img/clans/menu/board.png', 'ico_size' => 32);
}
$dispatch[] = array ('title' => 'Участники', 'img' => '/dark_war/all_img/clans/menu/board.png', 'link' => 'users.php?id='.$id.'', 'ico_size' => 32);
//Шаблон страницы
$doc->assign('post', $dispatch);
$doc->display('view_list_plus_img.tpl');
?>