correct helper picbook

This commit is contained in:
Name
2021-06-16 16:05:30 +03:00
parent 98d9351efe
commit fe4db1b3e0
2 changed files with 14 additions and 2 deletions

View File

@@ -5,6 +5,16 @@
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;
}