Файл: _modules/friends/request/index.php
Строк: 37
<?php
# mark core v1.0
# author Drk in
# date 24.10.19
# core
require_once ( $_SERVER['DOCUMENT_ROOT']."/_core/system.php" );
# user
system::access(true);
# meta
$title = 'Заявки в друзья :: '.domain;
require_once ( head );
echo '
<div style="margin: 5px;">
<div class="grid fights-link">
<div class="six columns ln">
<a href="/friends">Друзья</a>
</div>
<div class="six columns">
<a href="/friends/request">Заявки</a>
</div>
</div>
</div>
'.system::dis().'
';
$cn = DB :: $dbh -> querySingle("SELECT count(id) FROM friends_rq WHERE data = ?;", array($user['id']));
if ($cn == 0)echo '<div class="dialog"><h1 class="pda">КПК</h1><p>› Cписок заявок в друзья пуст<br></p></div>';
$page = new page($cn);
$limit = $cn > $page -> elements ? $page -> limit : null;
$query = DB :: $dbh -> query("SELECT id FROM friends_rq WHERE data = ? ORDER BY id {$limit}", array($user['id']));
while ($act = $query -> fetch()):
$act = cache_friends_rq::get($act['id']);
$data = cache_user::get($act['user']);
echo '
<div class="dialog">
<div style="padding-right: 7px;float: left;margin-top: 5px;">
'.user::min_ava($data['ava']).'
</div><div style="overflow: hidden;">
<h1 class="chat">'.user::chat($act['user']).'</h1></div>
<span style="font-size: 10px;">
<a href="/friends/yes/'.$act['id'].'">Принять</a> <br>
<a href="/friends/no/'.$act['id'].'">Отклонить</a>
</span>
</div>
';
endwhile;
$page -> get('?');
echo '<div class="line"></div>';
# foot
require_once ( foot );
?>