60 lines
1.2 KiB
PHP
60 lines
1.2 KiB
PHP
<?php
|
|
|
|
|
|
ini_set('display_errors','off');
|
|
error_reporting(E_ALL);
|
|
|
|
function anpromo_kuri($page = 1, $scale = 2){
|
|
|
|
// $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');
|
|
|
|
}
|
|
|
|
|
|
function read_kuri($hash, $page = 1, $scale = 2){
|
|
|
|
$price = db_get("SELECT `price_id`, `pricename` FROM `price` WHERE `pricehash` = '$hash' LIMIT 1");
|
|
|
|
if (!isset($price['price_id'])){
|
|
header("HTTP/1.0 404 Not Found");
|
|
echo "file not found";
|
|
return False;
|
|
}
|
|
|
|
$id = $price['price_id'];
|
|
$pdfile = "/file/$hash";
|
|
$maxpage = 32;
|
|
$title = $price['pricename'];
|
|
$filedown = True;
|
|
|
|
$baseurl = "/read/$hash/";
|
|
|
|
if ($page < $maxpage){
|
|
$nextpage = $page + 1;
|
|
$nexturl = "$baseurl$nextpage";
|
|
}
|
|
|
|
if ($page > 1) {
|
|
$prevpage = $page - 1;
|
|
$prevurl = "$baseurl$prevpage";
|
|
}
|
|
|
|
include ('anpdf.phtml');
|
|
|
|
|
|
} |