add Dockerfile
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
|
||||
function addclient_kuri(){
|
||||
function addclient(){
|
||||
|
||||
$buys = db_get("SELECT `buy_id`, `buy_email`, `date_start` FROM `anbuy`");
|
||||
|
||||
@@ -51,7 +51,7 @@ function addclient_kuri(){
|
||||
}
|
||||
|
||||
|
||||
function addclientid_kuri(){
|
||||
function addclientid(){
|
||||
|
||||
$buys = db_get("SELECT `buy_id`, `buy_email` FROM `anbuy` WHERE `client_id` = 0");
|
||||
|
||||
@@ -82,42 +82,42 @@ function addcard($id, $date) {
|
||||
|
||||
function mybooks_kuri($clienthash, $page = 1){
|
||||
|
||||
$limit = 25;
|
||||
$client = api_client_kuri($clienthash);
|
||||
$baseurl = SITE."mybooks/$clienthash/";
|
||||
|
||||
if (!$client) {
|
||||
echo 'Пользователь не найден';
|
||||
return;
|
||||
}
|
||||
|
||||
$items = api_arch($page);
|
||||
|
||||
foreach ($items as $item){
|
||||
if ($item['price_id'] = 486){ //ищем подписку = доступ на весь архив
|
||||
$all = True;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
$items = clientbuys_kuri($client['client_id'], $page);
|
||||
$count = $items['count'];
|
||||
|
||||
if ($all){
|
||||
$books = api_arch($page);
|
||||
|
||||
if ($page > 1)
|
||||
$title = "Архив номеров - $page";
|
||||
else
|
||||
$title = "Архив номеров";
|
||||
|
||||
$tempcontent = VIEWPATH.'allbooks.phtml';
|
||||
include VIEWPATH.'layout.phtml';
|
||||
|
||||
if ($count > $limit){
|
||||
$pages = ceil($count / $limit);
|
||||
}
|
||||
|
||||
if ($page > 1) {
|
||||
$title = "Моя библиотека - страница $page";
|
||||
$prevpage = $page - 1 ;
|
||||
$prevurl = $baseurl.$prevpage;
|
||||
}
|
||||
else {
|
||||
$books = $items;
|
||||
}
|
||||
$title = "Моя библиотека";
|
||||
}
|
||||
|
||||
//$books = clientbooks_kuri($client['client_id']);
|
||||
|
||||
|
||||
if ($pages > $page){
|
||||
$nextpage = $page + 1;
|
||||
$nexturl = $baseurl.$nextpage;
|
||||
$endurl = $baseurl.$pages;
|
||||
}
|
||||
|
||||
$tempcontent = VIEWPATH.'allbooks.phtml';
|
||||
include VIEWPATH.'layout.phtml';
|
||||
|
||||
// print_r($books);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user