add author

This commit is contained in:
Andrey Kuvshinov
2020-05-24 21:40:42 +03:00
parent 11e6f2ce8f
commit 637ef12d6d
3 changed files with 18 additions and 6 deletions

View File

@@ -5,9 +5,11 @@ function api_pricehash($hash){
$pricesql = "
SELECT
`price_id`, `pricename`, `BeginDate`, `category_id`, `pages`, `pdf`, `html`
`price_id`, `pricename`, `BeginDate`, `category_id`, `pages`, `pdf`, `html`, `author`
FROM
`price`
LEFT JOIN
price_authors ON price.priceauthor_id = price_authors.author_id
WHERE
`pricehash` = '$hash'
LIMIT 1

View File

@@ -419,13 +419,18 @@ function readbook_kuri($hash, $page = 1){
$baseurl = SITE.'/readbook/'.$hash.'/';
$endurl = $baseurl.$count;
if ($page < $count) {
$nextpage = $page + 1;
$nexturl = $baseurl.$nextpage;
}
if ($page > 1) {
$prevpage = $page - 1;
$prevurl = $baseurl.$prevpage;
}
$title = $price['pricename'];
$author = $price['author'];
$tempcontent = VIEWPATH.'epub.phtml'; //подшаблон
include VIEWPATH.'layout.phtml'; //центральный шаблон

View File

@@ -66,6 +66,11 @@ _tmr.push({id: "1069168", type: "pageView", start: (new Date()).getTime()});
<li class="header-div<?if ($type == 'mybooks'):?> mob-hidden<?endif?>">
<a href="<?=SITE?>mybooks">Моя библиотека</a>
</li>
<?if ($author !== ''):?>
<li class="header-div">
<?=$author?>
</li>
<?endif?>
<?if ($title !== '' and $title !== 'Моя библиотека'):?>
<li>
<i style="float:left" class="fas fa-arrow-right"></i>