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;