correct new pdf format

This commit is contained in:
arlemp@selectel.ru
2024-05-30 20:16:21 +03:00
parent 9cf60308fc
commit 1ceb7ee85c
5 changed files with 17 additions and 5 deletions

View File

@@ -207,6 +207,13 @@ function read_kuri($hash, $page = 0, $promo = 'full', $version = null){
$file = PDFSOURCE."${price['price_id']}.pdf";
$data = pdfs_init($file, $page);
if (!$data) {
$text = '<p>Книга временно недоступна. Просим прощение за неудобство</p>';
$tempcontent = $text; //подшаблон
include VIEWPATH.'layout.phtml'; //центральный шаблон
return;
}
if ($price['pages'] == 0){
$data['pages'] = pdfs_count($file);
$count = $data['pages'];