correct new pdf format

This commit is contained in:
arlemp@selectel.ru
2024-05-30 20:16:21 +03:00
parent 9cf60308fc
commit 1ceb7ee85c
5 changed files with 17 additions and 5 deletions

View File

@@ -207,6 +207,13 @@ function read_kuri($hash, $page = 0, $promo = 'full', $version = null){
$file = PDFSOURCE."${price['price_id']}.pdf"; $file = PDFSOURCE."${price['price_id']}.pdf";
$data = pdfs_init($file, $page); $data = pdfs_init($file, $page);
if (!$data) {
$text = '<p>Книга временно недоступна. Просим прощение за неудобство</p>';
$tempcontent = $text; //подшаблон
include VIEWPATH.'layout.phtml'; //центральный шаблон
return;
}
if ($price['pages'] == 0){ if ($price['pages'] == 0){
$data['pages'] = pdfs_count($file); $data['pages'] = pdfs_count($file);
$count = $data['pages']; $count = $data['pages'];

View File

@@ -188,7 +188,7 @@ function checkout_kuri($priceslug, $delivery_id = 1){
#создаем заказ #создаем заказ
if ($add_order){ if ($add_order){
$add['buy_status'] = 0; $add['buy_status'] = 0;
$add['mail_status'] = 0; $add['mail_status'] = 0;
$add['number_id'] = $price_id['price_id']; $add['number_id'] = $price_id['price_id'];
@@ -246,7 +246,7 @@ function checkout_kuri($priceslug, $delivery_id = 1){
Наименование: {$price_id['pricename']}<br> Наименование: {$price_id['pricename']}<br>
Цена: {$price_id['offline_price']}<br> Цена: {$price_id['offline_price']}<br>
Кол-во: $count<br> Кол-во: $count<br>
Доставка: {$delivery_id['delivery']}<br> Доставка: {$delivery['delivery']}<br>
Сумма заказа: $price руб.<br> Сумма заказа: $price руб.<br>
Оплата: при получении<br> Оплата: при получении<br>
E-mail: {$add['buy_email']}<br> E-mail: {$add['buy_email']}<br>

View File

@@ -34,8 +34,6 @@
<?else:?> <?else:?>
<?if ($book['date_subscript'] !== '0000-00-00 00:00:00'):?> <?if ($book['date_subscript'] !== '0000-00-00 00:00:00'):?>
<p>в подписке с <?=date('d.m.Y', strtotime($book['date_subscript']))?> <p>в подписке с <?=date('d.m.Y', strtotime($book['date_subscript']))?>
<?else:?>
<p>Скоро в подписке
<?endif?> <?endif?>
<?if (SUBSTATUS == 0):?> <?if (SUBSTATUS == 0):?>
<strong><a href="https://argumenti.ru/klan_landing">за 540 рублей в год</a></strong> <strong><a href="https://argumenti.ru/klan_landing">за 540 рублей в год</a></strong>

View File

@@ -100,7 +100,11 @@ else {
</div> </div>
<?if (isset($tempcontent)) <?if (isset($tempcontent))
include($tempcontent);
if (file_exists($tempcontent))
include($tempcontent);
else
echo $tempcontent;
?> ?>
<p style="margin-top:10px;background: white;border: 1px solid #dcdcdc;padding: 10px;font-size: .8em;line-height: 17px;">Распространение электронной версии еженедельника «Аргументы недели» осуществляется учредителем - ООО «Издательство «Аргументы недели», юр.адрес: 119002,ул.Арбат, д.29,1-й эт, пом.IV.ком.2, ОГРН 1207700354223</p> <p style="margin-top:10px;background: white;border: 1px solid #dcdcdc;padding: 10px;font-size: .8em;line-height: 17px;">Распространение электронной версии еженедельника «Аргументы недели» осуществляется учредителем - ООО «Издательство «Аргументы недели», юр.адрес: 119002,ул.Арбат, д.29,1-й эт, пом.IV.ком.2, ОГРН 1207700354223</p>

View File

@@ -3,4 +3,7 @@
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/root PATH=/bin:/sbin:/usr/bin:/usr/sbin:/root
PATH=$PATH:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin PATH=$PATH:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
#bash /home/arlemp/vhosts/anpdf/scripts/push_mail.sh
docker exec arlemp_pdftk_1 php /vhosts/anpdf/app/index.php sendstatus docker exec arlemp_pdftk_1 php /vhosts/anpdf/app/index.php sendstatus
docker exec arlemp_pdftk_1 php /vhosts/anpdf/app/index.php addhash