<?
require_once '../core/system.php';
require_once 'sys.php';
echo only_reg();
if (isset($_GET['id']) && mysql_result(mysql_query("SELECT Count(*) FROM `clans` WHERE `id` = '$get_id'"),0) == true) {
$clan = mysql_fetch_assoc(mysql_query("SELECT * FROM `clans` WHERE `id` = '$get_id' LIMIT 1"));
}else{
header('Location: /');
exit();
}
if ($user['clan_id'] == $clan['id']) {
mysql_query("update `user` set `clan_jornal` ='0'  where `id`= '$user[id]'");
}
$header = 'История клана "'.$clan[name].'"';
require_once '../core/head.php';

echo '<div class="block_zero">';
$k_post = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `jr_rekrut` WHERE `clan_id` = '".$clan['id']."'"), 0);
    
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
    

$q = mysql_query("SELECT *, DATE_FORMAT(date, '%d.%m %H:%i') AS `date1` FROM `jr_rekrut` WHERE `clan_id` = '".$clan['id']."' ORDER BY `id` DESC LIMIT $start, $set[p_str]");
while($rowu = mysql_fetch_assoc($q)) {
    echo $rowu[text].', <span class="dgreen small">'.$rowu['date1'].'</span><br /><p>';
}
echo '</div>';
    
if ($k_page>1){
    echo "<div class='dot-line'></div>";
    str('?id='.$clan['id'].'&amp;',$k_page,$page);
}
echo '<div class="mini-line"></div><div class="player menuList">
<li><a href="/clan/clan?id='.$clan['id'].'"><img src="/images/icon/arrow.png" />Назад в клан</a></li>
</div>';

include '../core/foot.php';