Файл: slando.icu/modules/flot/log.php
Строк: 47
<?php
$mem_start = memory_get_usage();
require '../../system/func_for_game2.inc.php';
require '../../system/smiles.inc.php';
$clan=mysqli_fetch_array(mysqli_query($link,"SELECT * FROM `clans` WHERE `id`='".num($user['clan'])."'"));
if($clan['id']>0){
head2('Журнал');
$in_game = time() -70;
$log=mysqli_query($link,"SELECT * FROM `logi_user` WHERE `id_user`= '".num($user['id'])."' and `date` >= '$in_game' and `tip`='2' order by `id` desc LIMIT 3 ");
if(mysqli_num_rows($log)>0){
echo'<div class="block5">';
while($r = mysqli_fetch_array($log))
{
echo'<div class="clrt11">'.$r['log'].'</div>';
}
echo'</div>';
}
if (isset($_GET['t'])) {$tip=num($_GET['t']);} else {$tip=1;}
echo'<div class="block1">';
echo'<table class="center">
<tr><td><a class="tab" href="/flot/log">Основное</a></td><td><a class="tab" href="/flot/log?t=2">Форт</a></td><td><a class="tab" href="/flot/log?t=3">Разное</a></td></tr></table>';
$kol_na_str=10;
$total = mysqli_num_rows(mysqli_query($link,"select id from `clans_log` where `id_clan`='".num($clan['id'])."' and `tip`='$tip'"));
$count_pages = ceil($total/$kol_na_str);
$page = (isset($_GET['page']) and is_numeric($_GET['page']) and $_GET['page']>1 and $_GET['page']<=$count_pages) ? $_GET['page'] : 1;
$start = $page*$kol_na_str-$kol_na_str;
$query = mysqli_query($link,"SELECT * FROM `clans_log` WHERE `id_clan`='".num($clan['id'])."' and `tip`='$tip' order by `id` desc limit ".$start.",".$kol_na_str);
while($r = mysqli_fetch_array($query))
{
echo'<div class="razriv7"></div>
<div class="block4 left"><div class="clrt7 left">'.date("d.m.Y",num($r['date'])).'</div>
<div class="clrt11">'.bbcode(nl2br(smile(vivod($r['log'])))).'</div>
</div>';
}
navi($page, $count_pages, '/flot/log?t='.$tip.'&page=');
echo'<a class="ssilki3" href="/flot/view">Назад</a>';
}else{
go("/flot");}
foot();
?>