This commit is contained in:
Your Name
2022-12-04 16:45:00 +03:00
parent eefad1904e
commit 62fa3ea592
7 changed files with 52 additions and 13 deletions

View File

@@ -14,6 +14,7 @@ function bookid_kuri($slug) {
`categoryslug`,
price.category_id AS category_id,
`BeginDate`,
`date_subscript`,
`priceanons`,
`priceimg`,
`pricehash`,
@@ -48,7 +49,6 @@ function bookid_kuri($slug) {
//$book['pic'] = IMGSRV."price/300x470/{$book['price_id']}.{$book['priceimg']}";
$book['pic'] = picbook($book, 300, 470);
$book['links']['pdf'] = SITE.'read/'.$book['pricehash'];
$book['links']['text'] = SITE.'readtext/'.$book['pricehash'];
$file = PDFSOURCE.$book['price_id'].'.pdf';

View File

@@ -4,7 +4,6 @@ ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
error_reporting(E_ALL);
if (isset($_SERVER['HTTP_HOST']))
define('SITE', 'https://'.$_SERVER['HTTP_HOST'].'/');
@@ -80,9 +79,17 @@ set('noreply',
]);
db_config('argumentiru', 'mysql:host=mysql;dbname=argumentiru', 'newser', 'Chjk90yuiREY');
db_config('reader', 'mysql:host=mysql;dbname=argumentiru', 'reader', 'ghjyjkUIOhg56Fh');
db_config('chitatel', 'mysql:host=mysql;dbname=argumentiru', 'chitatel', 'hjYu78kl*90Uio');
db_config('klan', 'mysql:host=mysql;dbname=argumentiru', 'klan', 'zpFGhyuRty765Jk');
if ( $_SERVER['HTTP_HOST'] == 'vklan.argumenti.ru') {
db_config('argumentiru', 'mysql:host=mysql;dbname=argumentiru', 'root', '234ASasdYa56UIkol');
db_config('reader', 'mysql:host=mysql;dbname=argumentiru', 'root', '234ASasdYa56UIkol');
db_config('chitatel', 'mysql:host=mysql;dbname=argumentiru', 'root', '234ASasdYa56UIkol');
db_config('klan', 'mysql:host=mysql;dbname=argumentiru', 'root', '234ASasdYa56UIkol');
}
else {
db_config('argumentiru', 'mysql:host=mysql;dbname=argumentiru', 'newser', 'Chjk90yuiREY');
db_config('reader', 'mysql:host=mysql;dbname=argumentiru', 'reader', 'ghjyjkUIOhg56Fh');
db_config('chitatel', 'mysql:host=mysql;dbname=argumentiru', 'chitatel', 'hjYu78kl*90Uio');
db_config('klan', 'mysql:host=mysql;dbname=argumentiru', 'klan', 'zpFGhyuRty765Jk');
}
// GRANT ALL PRIVILEGES ON argumentiru.* TO 'hitatel'@'%' IDENTIFIED BY 'hjYu78kl*90Uio'

View File

@@ -60,7 +60,15 @@ function category_kuri($category = '', $filter = 'all', $page = 1){
$filter = "category_id = 1";
}
elseif ($category == 'knigi') {
$filter = "category_id = 3";
if (SUBSTATUS == 1) {
$filter = "category_id = 3 AND sub = 1";
}
else {
$filter = "category_id = 3";
}
}
elseif($category == 'soon'){
$filter = "sub = 0";
}
$cats = api_cats();
@@ -93,6 +101,10 @@ function category_kuri($category = '', $filter = 'all', $page = 1){
if (isset($cats[$category])){
$breadcrumbs['page'] = $pagetitle;
}
else {
$pagetitle = 'Скоро в подписке';
$breadcrumbs['page'] = $pagetitle;
}
$tempcontent = VIEWPATH.'books.phtml';
include VIEWPATH.'layout.phtml';

0
app/routes/report.php Normal file
View File

View File

@@ -17,7 +17,7 @@
</p>
<?endif?>
<?=$book['priceanons']?>
<?if ($buy_status):?>
<?if ($buy_status): // если книжка куплена?>
<p class="price"><a href="<?=$book['links']['pdf']?>">Читать PDF</a></p>
<!-- <p><a href="<?=$book['links']['text']?>">Читать текст</a></p> -->
<?if ($book['category_id'] == 1):?>
@@ -31,7 +31,18 @@
<?if ($book['sub'] == 1):?>
<p class="price"><a href="<?=$link_subscript?>">Доступ к библиотеке за 490 руб. в год</a></p>
<p>Или <strong><a href="https://klan.argumenti.ru/login">войдите</a></strong> в личный кабинет если покупка уже оформлена</p>
<?endif?>
<?else:?>
<?if ($book['date_subscript'] !== '0000-00-00 00:00:00'):?>
<p>в подписке с <?=date('d.m.Y', strtotime($book['date_subscript']))?>
<?else:?>
<p>Скоро в подписке
<?endif?>
<?if (SUBSTATUS == 0):?>
<strong><a href="https://argumenti.ru/klan_landing">за 490 рублей в год</a></strong>
<?endif?>
</p>
<?endif?>
<?if ($book['offline_price'] > 0 && $book['pieces'] > 0):?>
<p class="price"><a href="<?=$link_offline?>">Бумажная за <?=$book['offline_price']?> руб.</a></p>
<?endif?>

View File

@@ -1,9 +1,12 @@
<?if($category == 'knigi'):?>
<ul id="book-menu">
<?foreach ($parts as $part):?>
<li<?if($part['partalias'] == $slug):?> style="background: #69c;"<?endif?>><a href="/knigi/<?=$part['partalias']?>"><?=$part['partname']?></a></li>
<li<?if($part['partalias'] == $slug):?> style="background: #69c;"<?endif?>><a href="/knigi/<?=$part['partalias']?>"><?=$part['partname']?></a></li>
<?endforeach?>
<li><a href="/category/knigi">Все книги</a></li>
<?if (SUBSTATUS == 1):?>
<li><a href="/category/soon">Скоро в подписке</a></li>
<?endif?>
</ul>
<?endif?>
<div class="lib_container">
@@ -24,9 +27,15 @@
<p class="book_mini_title">
<a href="<?=$link?>"><?=$book['pricename']?></a>
</p>
<p class="price">
<a href="<?=$link?>">Читать ></a>
</p>
<?if (SUBSTATUS == 1 AND $book['sub'] == 0):?>
<p class="price">
<a href="<?=$link?>">Скоро в подписке</a>
</p>
<?else:?>
<p class="price">
<a href="<?=$link?>">Читать ></a>
</p>
<?endif?>
</a>
</div>

View File