|

require_once('common.inc.php');
$share_link = urlencode($domain_link.'products_detail.php?id='.$id);
$sql = "SELECT * FROM `node` where `status` = '1' AND `type` = 'book' AND `id` = '".$id."' LIMIT 0,1";
$row=$db->getrow($sql);
$price = str_replace('$','',$row['price']);
$sql_publisher = "SELECT `id`,`name` FROM `publication` where `id` = '".$row['publisher']."' LIMIT 0,1";
$row_publisher=$db->getrow($sql_publisher);
$sql_tag = "SELECT `id`,`name` FROM `tag` where `id` = '".$row['tag']."' LIMIT 0,1";
$row_tag=$db->getrow($sql_tag);
$photo = get_attachment("node",$row['id'],"cover");
if(file_exists("./".$photo["path"].'original/'.$photo["file_name"])){
$img = '';
} else {
if($row['cover']!=0&&$row['cover']!='')
{
$sql_cover = "SELECT * FROM `file_managed` WHERE `fid` = '".$row['cover']."' AND `status` = '1' LIMIT 0,1";
$row_cover = $db->getrow($sql_cover);
if($row_cover['filename']!=''){
if( file_exists('./upload/products/original/'.$row_cover['filename'])){
$img = '
';
} else {
$img = '
|
