<?php
require_once('../classes/body.class.php');
require_once('../classes/db.class.php');
require_once('../classes/system.class.php');
$title= new Body;
$title->SetTitle('Биллинг - История операций');
$title->GetHeader();
if ($b == false) {
header('location: /');
die();
}
echo'<div class="tile"><div class="t-header th-alt bg-teal"><div class="th-title"><i class="zmdi zmdi-widgets"></i><a href="/"style="text-decoration:none; color:white;"> Главная</a> :: <a href="/billing"style="text-decoration:none; color:white;">Биллинг</a> :: История операций</div></div></div>';
$look = DB::$dbs->querySingle("SELECT COUNT(id) FROM billing_hist WHERE user_id = ?", [$b['id']]);
$num = 10;
$k_page = k_page($look, $num);
$page = page($k_page);
$start = $num*$page-$num;
$sql = DB::$dbs->query("SELECT * FROM billing_hist WHERE user_id = ? ORDER BY id DESC LIMIT $start,$num", [$b['id']]);
if ($sql -> rowCount() == 0) {
err('Пусто');
} else {
while($a = $sql->fetch()) {
echo '<div class="list-group-item media"><img src="/assets/images/wmd.gif" alt="" /> '.text($a['text']).' ('.vr($a['time']).')</div>';
}
}
if ($k_page > 1) {
str('?',$k_page,$page);
}
$title->GetMenu();
$title->GetFooter();
?>