add filter years

This commit is contained in:
Andrey Kuvshinov
2020-05-16 14:53:38 +03:00
parent 7c840c1388
commit 9fcca9efbe
6 changed files with 108 additions and 23 deletions

View File

@@ -80,7 +80,8 @@ function addcard($id, $date) {
}
function mybooks_kuri($page = 1){
function mybooks_kuri($category = 'gazeta', $filter = 'all', $page = 1){
$login = check_login_kuri();
@@ -89,17 +90,22 @@ function mybooks_kuri($page = 1){
header('Location: '.SITE.'login');
exit;
}
if ($category == 'gazeta')
$category_id = 1;
elseif ($category == 'books')
$category_id = 3;
$limit = 25;
$client = api_client_kuri($login['clienthash']);
$baseurl = SITE."mybooks/";
$baseurl = SITE.'mybooks/'.$category.'/'.$filter.'/';
if (!$client) {
echo 'Пользователь не найден';
return;
}
$items = clientbuys_kuri($client['client_id'], $page, $client['clientgroup_id']);
$items = clientbuys_kuri($client['client_id'], $page, $category_id, $client['clientgroup_id'], $filter);
$count = $items['count'];
if ($count > $limit){