add pdfserver

This commit is contained in:
Andrey Kuvshinov
2020-05-08 21:23:23 +03:00
parent 797ebaa707
commit b384213308
6 changed files with 96 additions and 9 deletions

View File

@@ -3,21 +3,33 @@
function anpromo_kuri($page = 1, $scale = 1){
// $pdfile = 'https://argumenti.ru/templinks/md5files/f9598f88e667146d50d106eeedbd74c1.pdf';
$pdfile = '/pub/files/pdf/promo.pdf';
$namefile = 'promo.pdf';
$title = 'Номер 12(706)';
$baseurl = '/';
$newcurr = strtotime('2006-05-12');
$file = SITEPATH.'pub/files/pdf/promo.pdf';
$data = pdfs_init($file);
$pdfile = $data['pdfpgurl'];
$fullpdf = $data['pdfurl'];
$nextpage = $page + 1;
if (file_exists(SITEPATH.$pdfile)){
$filedown = True;
if ($data['count'] > $nextpage){
$nexturl = "$baseurl$nextpage";
}
else {
$nexturl = '';
}
if ($page > 1) {
$prevpage = $page - 1;
$prevurl = "$baseurl$prevpage";
}
$downtitle = 'Если по какой-то причине у вас не загрузилась страница ниже, то нажмите сюда, чтобы скачать pdf';
$baseurl = "/anpromo/";
$pagenum = 1;
@@ -30,7 +42,6 @@ function anpromo_kuri($page = 1, $scale = 1){
function read_kuri($hash, $page = 1, $scale = 1, $promo = false){
$price = db_get("SELECT `price_id`, `pricename`, `BeginDate` FROM `price` WHERE `pricehash` = '$hash' LIMIT 1");
@@ -47,8 +58,6 @@ function read_kuri($hash, $page = 1, $scale = 1, $promo = false){
$cachefile = PDFDIR.$namefile;
$newcurr = strtotime($price['BeginDate']);
if (file_exists($cachefile)){
$fullpdf = '/pdf/'.$namefile;