add app folder
This commit is contained in:
23
app/modules/anpdf/anpdf.php
Normal file
23
app/modules/anpdf/anpdf.php
Normal 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');
|
||||
|
||||
}
|
||||
35
app/modules/anpdf/anpdf.phtml
Normal file
35
app/modules/anpdf/anpdf.phtml
Normal 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>
|
||||
Reference in New Issue
Block a user