From 567772d79b1ba25e0fd85b35cb61890d314e2af1 Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Sun, 24 May 2020 21:58:32 +0300 Subject: [PATCH] add bookmark in text book --- app/routes/anpdf.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/routes/anpdf.php b/app/routes/anpdf.php index 538bb47..d24e14a 100644 --- a/app/routes/anpdf.php +++ b/app/routes/anpdf.php @@ -402,6 +402,18 @@ function readbook_kuri($hash, $page = 1){ return 'page not found'; } + $bookmark = bookmark_get($hash); + + if ($page == 0){ //  не читал ли ранее + $page = 1; //если нет страницы то первая + if ($bookmark !== false and $bookmark > 1){ + return readbook_kuri($hash, $bookmark); + } + } + + //устанавливаем закладку + bookmark_set($hash, $page); + $htmlfile = HTMLSOURCE.$price['price_id'].'.'.$price['html']; $limit = 4000;