getPageId(); $address = $Page-> getPageURL($idd); $galleryid = Tools_Http::Get('gid',true); $imgindex= Tools_Http::Get('img',true); $Gallery = new WorksGallery(); $type = isset($_GET['gallery']) ? 'gallery' : ''; if(!$galleryid) $galleryid = 85; function show_galleries($galleries) { global $Gallery,$DB,$type,$L; $Gallery = new WorksGallery(); $DB = Core_Database::getInstance(); ob_start(); ?>
getRow('goods_cars',$gall['car_make']); $thumb = '/images/cars/'.$make['icon']; } else { $images = $Gallery -> getImages($gall['id'], 1); if (!empty($images)) { $count = count($images); $thumb = $images[0]['picture_2']; } else { if($gall['icon']) $thumb = $dest = '/images/worksgallery/'.$gall['icon']; else $thumb=''; } } $style= 'width:140px'; if($thumb && file_exists($_SERVER['DOCUMENT_ROOT'].$thumb)) { $size = getimagesize($_SERVER['DOCUMENT_ROOT'].$thumb); if($size[0]>$size[1]) { $style='width:140px'; } if($size[0]<$size[1] || $size[0]==$size[1] ) { $style='height:120px'; } } $link = '?'.Tools_Http::replaceUrl($_GET, 'gid', $gall['id']); $data=explode(' ',$gall['created']); if(!$type) $link .=$gall['type']=='gallery' ? '&gallery' : ''; if ($thumb) { ?>

StrT('worksgallery','title', $gall['id'], $gall['title'])?>

getGallery($gid); if ($gallery['parentid'] > 0) { $galleryid = $gid; } } */ if ($galleryid) { $gallery = $Gallery -> getGallery($galleryid,$type); $images = $Gallery->getImages($galleryid,-1,$type); if(empty($images)){ ?>
getGalleryListFront($galleryid); echo show_galleries($galleries); } else { $gallery_name = $Gallery->getGalleryName($galleryid,$type); $gallery_name = $L->StrT('worksgallery','title', $galleryid, $gallery_name); if($gallery['parentid']) $gallery_parent_name = $Gallery->getGalleryName($gallery['parentid'],$type); else $gallery_parent_name=''; $gallery_parent_name = $L->StrT('worksgallery','title', $galleryid, $gallery_parent_name); ?>
 
getGalleryListFront(); if (!empty($galleries)) { ?>
getImages($gid,'-1',$type); ?>