add app folder

This commit is contained in:
Andrey Kuvshinov
2020-04-01 21:26:25 +03:00
parent 67c28f6b97
commit eee8dfbee6
11 changed files with 56 additions and 136 deletions

View File

@@ -0,0 +1,23 @@
<?php
function anpromo_kuri($page = 1, $scale = 1.5){
// $pdfile = 'https://argumenti.ru/templinks/md5files/f9598f88e667146d50d106eeedbd74c1.pdf';
$pdfile = '/pub/files/promo.pdf';
$maxpage = 32;
$title = 'Аргументы Недели 12(706)';
if ($page < $maxpage){
$nextpage = $page + 1;
$nexturl = "/anpromo/$nextpage";
}
if ($page > 1) {
$prevpage = $page - 1;
$prevurl = "/anpromo/$prevpage";
}
include ('anpdf.phtml');
}

View File

@@ -0,0 +1,35 @@
<html>
<head>
<title><?=$title?></title>
<script src="//mozilla.github.io/pdf.js/build/pdf.js"></script>
</head>
<body>
<h1><?=$title?></h1>
<canvas id="the-canvas"></canvas>
<div id="pdf-nav">
<?if (isset($prevurl)):?>
<a href="<?=$prevurl?>"><=Предыдущая страница<a/>
<?endif?>
<?if (isset($nexturl)):?>
<a href="<?=$nexturl?>">Следующая страница=><a/>
<?endif?>
<a href="https://argumenti.ru/robomail/486">Получайте газету на email</a>
</div>
<script>
var url = '<?=$pdfile?>';
var scale = <?=$scale?>;
var pageNumber = <?=$page?>;
</script>
<script src="/pub/scripts/anpdf.js"></script>
</body>
</html>