add static pdf file

This commit is contained in:
Andrey Kuvshinov
2020-04-09 00:00:18 +03:00
parent c01b7ab374
commit 0a06b7595d
2 changed files with 11 additions and 3 deletions

View File

@@ -40,9 +40,18 @@ function read_kuri($hash, $page = 1, $scale = 1.5, $promo = false){
return False; return False;
} }
$namefile = $price['pricehash'].'.pdf';
$cachefile = PDFDIR.$namefile;
if (file_exists($cachefile)){
$pdfile = '/'.$namefile;
}
else {
$pdfile = '/file/'.$hash;
}
$id = $price['price_id']; $id = $price['price_id'];
$pdfile = "/file/$hash"; $maxpage = 24;
$maxpage = 32;
$title = $price['pricename']; $title = $price['pricename'];
if (!$promo) if (!$promo)

View File

@@ -18,7 +18,6 @@ function anfilename($id){
function file_kuri($hash) { function file_kuri($hash) {