add page book

This commit is contained in:
Your Name
2021-01-13 21:09:17 +03:00
parent ed4e7b81df
commit 96a1540ef7
5 changed files with 58 additions and 1 deletions

26
app/api/book.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
/**
*
*/
function bookid_kuri($hash) {
$query = "SELECT `price_id`, `pricename`, `BeginDate`, `priceanons`, `priceimg`, `pricehash` FROM `price` WHERE `pricehash` = '$hash' LIMIT 1";
$book = dbl_get($query);
if (isset($book['price_id'])){
$book['pic'] = IMGSRV."price/180x280/{$book['price_id']}.{$book['priceimg']}";
$book['links']['pdf'] = SITE.'read/'.$book['pricehash'];
$book['links']['text'] = SITE.'readtext/'.$book['pricehash'];
$book['links']['download'] = SITE.'pub/files/pdf/'.$book['pricehash'].'.pdf';
return $book;
}
}