no downloads books

This commit is contained in:
Andrey Kuvshinov
2020-05-16 18:51:50 +03:00
parent 003d8d3c2b
commit 77040f8247
2 changed files with 19 additions and 3 deletions

View File

@@ -176,7 +176,17 @@ function promo_kuri($hash, $page = 0, $promo = true){
# test url http://klan.dv/promo/bac343b41b357fdc8243373a429caa62 (742.pdf source)
$price = db_get("SELECT `price_id`, `pricename`, `BeginDate` FROM `price` WHERE `pricehash` = '$hash' LIMIT 1");
$pricesql = "
SELECT
`price_id`, `pricename`, `BeginDate`, `category_id`
FROM
`price`
WHERE
`pricehash` = '$hash'
LIMIT 1
";
$price = db_get($pricesql);
if (!isset($price['price_id'])){
header("HTTP/1.0 404 Not Found");
@@ -214,7 +224,10 @@ function promo_kuri($hash, $page = 0, $promo = true){
else {
$filedown = True;
$baseurl = "/read/$hash/";
}
}
if ($price['category_id'] == 3)
$filedown = False;
$endurl = "$baseurl$count";

View File

@@ -15,7 +15,10 @@
<?if ($promo):?>
<a href="https://argumenti.ru/robomail/486?utm_source=argumenti.ru&utm_medium=subscript&utm_campaign=promo">Получайте «Газету на @email»</a>
<?else:?>
<a href="<?=$fullpdf?>"><?=$downtitle?></a><span id="downarrow"></span> <span id="downarrow">Приятного чтения ↓</span>
<?if ($filedown):?>
<a href="<?=$fullpdf?>"><?=$downtitle?></a><span id="downarrow"></span>
<?endif?>
<span id="downarrow">Приятного чтения ↓</span>
<?endif?>
</p>