<?php
$t = 'Модерация заказов';
require_once '../../wcore/core.php';
require_once '../../wcore/head.php';
iank(3);
$cat = !isset($_GET['cat'])?:antixs($_GET['cat']);
$k_post = _mc('orders',"WHERE `status` = 1");
$k_page = k_page($k_post, 10);
$page = page($k_page);
$start = 10*$page-10;
$_tmp = mysqli_query($mysqli,"SELECT * FROM `orders` WHERE `status` = 1 ORDER BY `oid` DESC LIMIT $start, 10") or die("Ошибка запроса: ".mysqli_error($mysqli));
while ($list = mysqli_fetch_assoc($_tmp)){
    $data[] = [
        'id'        =>  $list['oid'],
        'name'      =>  $list['nametar'],
        'user'      =>  acc($list['uid']),
        'status'    =>  $lang['ord_status_'.$list['status']],
        'time'      =>  ptime($list['time'])
    ];
}
$data = !isset($data)?NULL:$data;
echo $twig->render('admin_moder_orders.tpl', [
    'lang'  =>  $lang,
    'data'  =>  $data,
    'count' =>  $k_post,

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