add download page only

This commit is contained in:
Andrey Kuvshinov
2020-04-23 23:18:00 +03:00
parent 80cd77fe7a
commit a2b98d3a99
2 changed files with 14 additions and 1 deletions

View File

@@ -52,8 +52,21 @@ function read_kuri($hash, $page = 1, $scale = 1.5, $promo = false){
}
if (file_exists($pgfile)){
$pdfile = '/pages/'.$hash.'/'.$hash.'-'.$page.'.pdf';
if ($page > 1){
$fullpdf = $pdfile;
$downtitle = 'Если, по какой-то причине у вас не загрузилась страница ниже, то нажмите сюда, чтобы скачать pdf';
}
else {
$downtitle = 'Если, по какой-то причине у вас не загрузилась издание ниже, то нажмите сюда, чтобы скачать pdf';
}
$pagenum = 1;
}
elseif (file_exists($cachefile)){

View File

@@ -87,7 +87,7 @@ _tmr.push({id: "1069168", type: "pageView", start: (new Date()).getTime()});
</div>
<p id="downloadtitle">
<?if ($filedown):?>
<a href="<?=$fullpdf?>">Если, по какой-то причине у вас не загрузилась газета ниже, то нажмите сюда, чтобы скачать pdf</a><span id="downarrow"></span>
<a href="<?=$fullpdf?>"><?=$downtitle?></a><span id="downarrow"></span>
<?else:?>
<a href="https://argumenti.ru/robomail/486?utm_source=argumenti.ru&utm_medium=subscript&utm_campaign=promo">Получайте «Газету на @email»</a>
<?endif?>