From 5da486bbad9ae7ae0927dbaff4acfd0987492ac7 Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Sat, 16 May 2020 01:20:36 +0300 Subject: [PATCH] add select page --- app/pub/css/an.css | 7 +++++++ app/pub/scripts/anviewer.js | 13 +++++++++++++ app/routes/anpdf.php | 3 ++- app/views/anpdf2.phtml | 15 ++++++++++++--- app/views/layout.phtml | 4 ++-- 5 files changed, 36 insertions(+), 6 deletions(-) diff --git a/app/pub/css/an.css b/app/pub/css/an.css index 512a451..c76cea9 100644 --- a/app/pub/css/an.css +++ b/app/pub/css/an.css @@ -231,6 +231,13 @@ input[type="email"],input[type="password"]{ margin-top: 5%; font-size: 1.2em; } + + +#pages{ + font-size: 150%; +} + + @media screen and (max-width: 1000px) { header .lite-logo { width: 30%; diff --git a/app/pub/scripts/anviewer.js b/app/pub/scripts/anviewer.js index ffca8ee..76a198a 100644 --- a/app/pub/scripts/anviewer.js +++ b/app/pub/scripts/anviewer.js @@ -169,4 +169,17 @@ function startpdfviewer(newcurr){ } +function changepage(){ + + var e = document.getElementById("pages"); + var currpage = e.options[e.selectedIndex].value; + var newpage = baseurl + currpage; + + location.href = newpage; + + return true; + +} + + diff --git a/app/routes/anpdf.php b/app/routes/anpdf.php index 2dff9e8..4e6e55a 100644 --- a/app/routes/anpdf.php +++ b/app/routes/anpdf.php @@ -10,6 +10,7 @@ function anpromo_kuri($page = 1, $scale = 1){ $file = SITEPATH.'pub/files/source/742.pdf'; $data = pdfs_init($file, $page); + $count = $data['count']; $pdfile = SITE.$data['pdfpgurl']; @@ -32,7 +33,7 @@ function anpromo_kuri($page = 1, $scale = 1){ $prevurl = "$baseurl$prevpage"; } - $downtitle = 'Если по какой-то причине у вас не загрузилась страница ниже, то нажмите сюда, чтобы скачать pdf'; + $downtitle = 'Скачать в PDF формате'; $tempcontent = VIEWPATH.'anpdf2.phtml'; //подшаблон diff --git a/app/views/anpdf2.phtml b/app/views/anpdf2.phtml index 220dee5..82ec788 100644 --- a/app/views/anpdf2.phtml +++ b/app/views/anpdf2.phtml @@ -2,6 +2,7 @@ var pdfDoc = null, pageNum = , scale = 1, + baseurl ='', url = '', pageRendering = false, pageNumPending = null, @@ -14,7 +15,7 @@ Получайте «Газету на @email» - + Приятного чтения ↓

@@ -42,8 +43,16 @@ - -
+ + +
+ +
diff --git a/app/views/layout.phtml b/app/views/layout.phtml index 1b83539..05ce688 100644 --- a/app/views/layout.phtml +++ b/app/views/layout.phtml @@ -3,8 +3,8 @@ Еженедельник Аргументы Недели - <?=$title?> "> - - + +