From 174fe4316a91ce8cab0757b8ed64664c493ca0e6 Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Tue, 7 Apr 2020 19:05:45 +0300 Subject: [PATCH] add read --- app/modules/anpdf/anpdf.phtml | 6 +++++- app/routes/price.php | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/modules/anpdf/anpdf.phtml b/app/modules/anpdf/anpdf.phtml index 9feaee6..c11e53c 100644 --- a/app/modules/anpdf/anpdf.phtml +++ b/app/modules/anpdf/anpdf.phtml @@ -90,7 +90,11 @@ _tmr.push({id: "1069168", type: "pageView", start: (new Date()).getTime()});

- Получайте «Газету на @email» + + Скачать на устройство + + Получайте «Газету на @email» +

diff --git a/app/routes/price.php b/app/routes/price.php index f3ddff7..d961c21 100644 --- a/app/routes/price.php +++ b/app/routes/price.php @@ -11,6 +11,13 @@ function priceid_kuri($id){ } +function anfilename($id){ + + return "/vhosts/an/httpdocs/pub/files/pdf/pdf/$id.pdf"; +} + + + function file_kuri($hash) { @@ -23,7 +30,7 @@ function file_kuri($hash) { } $id = $price['price_id']; - $pdfile = "/vhosts/an/httpdocs/pub/files/pdf/pdf/$id.pdf"; + $pdfile = anfilename($id); $request = $_SERVER['REQUEST_URI']; $filename = basename($request);