diff --git a/app/api/apicontent.php b/app/api/apicontent.php index 72622ce..2cae32f 100644 --- a/app/api/apicontent.php +++ b/app/api/apicontent.php @@ -5,9 +5,11 @@ function api_pricehash($hash){ $pricesql = " SELECT - `price_id`, `pricename`, `BeginDate`, `category_id`, `pages`, `pdf`, `html` + `price_id`, `pricename`, `BeginDate`, `category_id`, `pages`, `pdf`, `html`, `author` FROM - `price` + `price` + LEFT JOIN + price_authors ON price.priceauthor_id = price_authors.author_id WHERE `pricehash` = '$hash' LIMIT 1 diff --git a/app/routes/anpdf.php b/app/routes/anpdf.php index 204aefa..216c8d9 100644 --- a/app/routes/anpdf.php +++ b/app/routes/anpdf.php @@ -419,13 +419,18 @@ function readbook_kuri($hash, $page = 1){ $baseurl = SITE.'/readbook/'.$hash.'/'; $endurl = $baseurl.$count; - $nextpage = $page + 1; - $nexturl = $baseurl.$nextpage; + if ($page < $count) { + $nextpage = $page + 1; + $nexturl = $baseurl.$nextpage; + } - $prevpage = $page - 1; - $prevurl = $baseurl.$prevpage; + if ($page > 1) { + $prevpage = $page - 1; + $prevurl = $baseurl.$prevpage; + } $title = $price['pricename']; + $author = $price['author']; $tempcontent = VIEWPATH.'epub.phtml'; //подшаблон include VIEWPATH.'layout.phtml'; //центральный шаблон diff --git a/app/views/layout.phtml b/app/views/layout.phtml index 3a1c2e1..7401f34 100644 --- a/app/views/layout.phtml +++ b/app/views/layout.phtml @@ -66,6 +66,11 @@ _tmr.push({id: "1069168", type: "pageView", start: (new Date()).getTime()});
  • Моя библиотека
  • + +
  • + +
  • +