Файл: public_html/modules/alliance/info.php
Строк: 92
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
include_once ($root.'/core/base.php');
falseauth();
$allianceId = fl($_GET['id']);
$allianceInfo = $db->query("SELECT * FROM `alliances` WHERE `id` = '".$allianceId."'");
if($allianceInfo->num_rows == 0) redirect('/alliance', 'Альянс не найден!');
$allianceInfo = $allianceInfo->fetch_object();
$header = "Альянс ".$allianceInfo->name;
include_once ($root.'/core/head.php');
$allianceRanks = [null, 'Унтер-офицер', 'Младший офицер', 'Старший офицер', 'Генерал', 'Глава'];
echo'
<div class="index-alliance">
<div class="clan-info">
<table>
<tr>
<td class="clan-infor">
<h4 class="info-clan-stat">Уровень<br>
<small><strong><big>'.$allianceInfo->level.'</big></strong><small>
</h4>
</td>
<td class="clan-infor">
<img src="/images/aliance.png" width="125px" alt="">
</td>
<td class="clan-infor">
<h4 class="info-clan-stat">Опыт<br>
<small><strong><big>'.$allianceInfo->exp.'</big></strong><small>
</h4>
</td>
</table><big>
<center>
'.$allianceInfo->name.'<br>
<small>'.$allianceInfo->description.'</small><br>
</center></big></br>
</div>
</div>
<div class = "line"></div>
';
$count = $db -> query("SELECT * FROM `alliance_members` WHERE `alliance` = '".$allianceId."'") -> num_rows;
$k_page = k_page($count,10);
$page = page($k_page);
$start = 10*$page-10;
$sql = $db -> query("SELECT * FROM `alliance_members` WHERE `alliance` = '".$allianceId."' ORDER BY `rank` DESC LIMIT $start, 10");
echo '<div class="b"><center>Участники альянса ['.$count.' чел.]</center></div><div class = "line"></div>';
while($q = $sql->fetch_object())
{
echo"<div class = 'ram-two'><div class = 'rang-".$q->rank."'>";
$us_info = $db->query("SELECT * FROM `users` WHERE `id` = '".$q->user."'")->fetch_object();
echo' <img src="/images/users.png" width="35px"> '.who($q->user).', '.$us_info->level.' ур.,<br>';
echo '</div></div></div>';
}
if($count >= 10) echo str('/alliance/info/'.$allianceId.'/?', $k_page, $page);
echo'<center><div class="menu"><div class="menu-link"><table>';
echo'<td class="menu-link">';
echo'<a href="/alliance/forum/'.$allianceId.'"><img src="/images/all-f-min.jpg" width="35" height="35" alt=""><br> Форум альянса </a>';
echo'</td></tr></table></div></div></center>';
include_once ($root.'/core/foot.php');