diff --git a/app/routes/anpdf.php b/app/routes/anpdf.php index a6fdea4..5819a1b 100644 --- a/app/routes/anpdf.php +++ b/app/routes/anpdf.php @@ -136,7 +136,10 @@ function promo_kuri($hash, $page = 1, $scale = 2, $promo = false){ $id = $price['price_id']; $pdfile = "/file/$hash"; $maxpage = 32; - $title = $price['pricename']; + if ($page > 1) + $title = $price['pricename']."- $page"; + else + $title = $price['pricename']; if (!$promo) $filedown = False; diff --git a/app/routes/client.php b/app/routes/client.php index 55c4c1f..d13273a 100644 --- a/app/routes/client.php +++ b/app/routes/client.php @@ -89,8 +89,31 @@ function mybooks_kuri($clienthash, $page = 1){ return; } - $result = api_arch($page); - print_r($result); + $items = api_arch($page); + + foreach ($items as $item){ + if ($item['price_id'] = 486){ //ищем подписку = доступ на весь архив + $all = True; + break; + } + + } + + if ($all){ + $books = api_arch($page); + + if ($page > 1) + $title = "Архив номеров - $page"; + else + $title = "Архив номеров"; + + $tempcontent = VIEWPATH.'allbooks.phtml'; + include VIEWPATH.'layout.phtml'; + + } + else { + $books = $items; + } //$books = clientbooks_kuri($client['client_id']);