Файл: impwar.tk/search_clan.php
Строк: 79
<?php
require_once('conf/dbc.php');
require_once('conf/session_start.php');
if ((!isset($_SESSION['id'])) or(!isset($_SESSION['nick']))) { ?> <!--1390114136--> <script type="text/javascript">document.location.href ="login.php"</script> <?php exit(); }
$page_title = 'Поиск отряда';
require_once('conf/head.php');
require_once('conf/top.php');
echo '<br/><center><p class="name2">Поиск отряда</p></center>';
if ((!isset($_SESSION['id']))
and (!isset($_SESSION['nick']))) {header('location: /');}$clan_id = $_SESSION['clan_id'];
if(!isset($_POST['name'])){
echo'<form action="?" method="post"><span class="bonus"><i><b>Введите название отряда</i></b></span><br/><input type="text" name="name" value=""/><br/><input type="submit" value="Поиск"/></form>';
}else{
$us=$dbc->query("SELECT `name`,`clan_id` ,`gruppa` FROM`clans` WHERE`name`='".$dbc->escape_string(htmlentities($_POST['name'],ENT_QUOTES,'UTF-8'))."'")->fetch_assoc();
if ($us['gruppa'] == 'svoboda') {if ($razn_last_act < 300 ) {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="н"/><?php } else {?><img src="img/ico/svobodaon.png" width="12" height="12" alt="н"/><?php }}
if ($us['gruppa'] == 'dolg') {if ($razn_last_act < 300 ) {?><img src="img/ico/dolgon.png" width="12" height="12" alt="н"/><?php } else {?><img src="img/ico/dolgon.png" width="12" height="12" alt="н"/><?php }}
if ($us['gruppa'] == 'naemniki') {if ($razn_last_act < 300 ) {?><img src="img/ico/odinochkion.png" width="12" height="12" alt="н"/><?php } else {?><img src="img/ico/odinochkion.png" width="12" height="12" alt="н"/><?php }}
if(strlen($us['name'])>1){
echo'<a style="text-decoration:none;" href="company.php?company_id='.$us['clan_id'].'">'.$us['name'].'</a>
<p class="zx"></p>
<a href="/search_clan.php" class="menu" ><img src="img/reload.gif" width="15" height="15"/>Назад</a>';
unset($_POST['name']);}else{echo'<span class="red">Такого отряда не существует</span><p class="zx"></p><a href="/search_clan.php" class="menu" ><img src="img/reload.gif" width="15" height="15"/>Назад</a>';}
}
require_once('conf/navig.php');
require_once('conf/foot.php');
mysqli_close($dbc);
?>
</body>
</html>