<?php
$t = 'Логи средств';
require_once '../../wcore/core.php';
require_once '../../wcore/head.php';
iank(2);
$cat = !isset($_GET['cat'])?:antixs($_GET['cat']);

$k_post = _mc('bill_pays');
$k_page = k_page($k_post, 10);
$page = page($k_page);
$start = 10*$page-10;
$_tmp = mysqli_query($mysqli,"SELECT *  FROM `bill_pays` ORDER BY `id` DESC LIMIT $start, 10") or die("Ошибка запроса: ".mysqli_error($mysqli));
while ($list = mysqli_fetch_assoc($_tmp)){

    $data[] = [
        'id'        =>  $list['id'],
        'time'      =>  ptime($list['time']),
        'user'      =>  acc($list['user_id']),
        'amount'    =>  $list['amount'],
        'payment'    => $list['payment'],
        'time_pay'    =>  $list['time_pay']==0?0:ptime($list['time_pay']),
        ];
}
$data = !isset($data)?NULL:$data;
echo $twig->render('admin_bill_pays.tpl', [
    'lang'  =>  $lang,
    'data'  =>  $data,
    'count' =>  $k_post,

]);
if ($k_page > 1){str(('?'),$k_page,$page);}
require_once '../../wcore/foot.php';
?>