correct helper picbook
This commit is contained in:
@@ -21,7 +21,9 @@ function bookid_kuri($slug) {
|
|||||||
|
|
||||||
if (isset($book['price_id'])){
|
if (isset($book['price_id'])){
|
||||||
|
|
||||||
$book['pic'] = IMGSRV."price/300x470/{$book['price_id']}.{$book['priceimg']}";
|
//$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']['pdf'] = SITE.'read/'.$book['pricehash'];
|
||||||
$book['links']['text'] = SITE.'readtext/'.$book['pricehash'];
|
$book['links']['text'] = SITE.'readtext/'.$book['pricehash'];
|
||||||
$file = PDFSOURCE.$book['price_id'].'.pdf';
|
$file = PDFSOURCE.$book['price_id'].'.pdf';
|
||||||
|
|||||||
@@ -5,6 +5,16 @@
|
|||||||
|
|
||||||
function picbook($item, $width, $height) {
|
function picbook($item, $width, $height) {
|
||||||
|
|
||||||
return IMGSRV.'price/'.$width.'x'.$height.'/'.$item['price_id'].'.'.$item['priceimg'];
|
$id = $item['price_id'];
|
||||||
|
$img = $item['priceimg'];
|
||||||
|
|
||||||
|
if (in_array($img, array('jpg', 'jpeg', 'gif', 'png', 'JPG'))){
|
||||||
|
$fileimg = $id . '.' . $img;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$fileimg = $img;
|
||||||
|
|
||||||
|
|
||||||
|
return IMGSRV.'price/'.$width.'x'.$height.'/'.$fileimg;
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user