';
foreach ($items as $item) {
$thumb = $products->getThumbnail($item['id'],'t');
$bigpic = $products->getThumbnail($item['id'],'');
$link = $products -> getLink($item['id']);
$title= htmlspecialchars($item['title']);
$link = $products -> getLink($item['id']);
$html .= '
';
}
$html .= '
';
}
return $html;
}
public static function partnersBoxDefault2(array $items, $open=false) {
$html='';
$products = new Partners();
$L = Core_Language::getInstance();
if (!empty($items)) {
//print_r($items);
$html .= '';
foreach ($items as $item) {
$thumb = $products->getThumbnail($item['id'],'t');
$bigpic = $products->getThumbnail($item['id'],'');
$link = $products -> getLink($item['id']);
$title= htmlspecialchars($item['title']);
$link = $products -> getLink($item['id']);
$html .= '
';
}
$html .= '
';
}
return $html;
}
public static function videoBoxDefault(array $items, $open=false) {
$html='';
$products = new Video();
$L = Core_Language::getInstance();
if (!empty($items)) {
//print_r($items);
$html .= '';
$vid = new Projects_Video();
foreach ($items as $item) {
$all_vids = $vid->getVideos($item['id']);
$images = $products -> getImages($item['id']);
$photos ='';
if (!empty($images) && count($images)>1) {
$photos .= '
';
$i=0;
foreach ($images as $img) {
$i++;
if(!$open && $i>6) continue;
$img['picture'] = htmlspecialchars($img['picture']);
$photos .= '
';
}
}
$photos .= '
';
$videos ='';
$vids = array();
foreach ($all_vids as $video) {
if(!$open && !$video['isthumb'])
continue;
$vids[]=$video;
}
if (!empty($vids)) {
$videos .= '
';
$i=0;
foreach ($vids as $video) {
$videos .= $video['embed2'].'
';
}
$videos .= '
';
}
$title= htmlspecialchars($item['title']);
$link = $products -> getLink($item['id']);
$short_description = strip_tags($L->StrT('projects','descr', $item['id'], ''));
$item['short_desc'] = strlen($short_description)>520 ? mb_substr(strip_tags($short_description),0,520,'UTF8').'...' : $short_description;
$thumb_small = '
.')
';
$thumb_large = '
.')
';
$html .= '
';
if($show_description) {
if(!$open) $html .= '
'.$thumb_small.$item['short_desc'].'
';
else
$html .= '
'.$thumb_large. $L->StrT('projects','descr', $item['id'], '').'
';
}
if(!empty($vids)) {
$html .= '
';
$html .= ''.$videos.'';
$html .= ''.$photos.'';
$html .='
';
$html .='
';
} else {
$html .= '
'.$photos.'';
}
if(!$open) $html .='
';
$html .='
';
}
$html .= '
';
}
return $html;
}
public static function projectShortBoxDefault(array $all_items,$gallery=false,$thumb=true,$go_link='') {
$html='';
$items = $all_items;
$products = new Projects();
$L = Core_Language::getInstance();
if (!empty($items)) {
$all_link = '/projects/'.$go_link;
$html .= '';
foreach ($items as $item) {
if($gallery) {
$images = $products -> getImages($item['id']);
$photos ='';
if (!empty($images) && count($images)>1) {
$photos .= '
';
$i=0;
foreach ($images as $img) {
$i++;
if($i>5) continue;
$img['picture'] = htmlspecialchars($img['picture']);
$photos .= '
';
}
}
$photos .= '
';
}
$title= htmlspecialchars($item['title']);
$link = $products -> getLink($item['id']);
$short_description = strip_tags($L->StrT('projects','descr', $item['id'], $item['descr']));
$item['short_desc'] = strlen($short_description)>520 ? mb_substr(strip_tags($short_description),0,520,'UTF8').'...' : $short_description;
$thumb_small = '';
$html .= '
';
$html .= '
';
$html .= '
';
}
//$html .='
';
$html .= '
';
}
return $html;
}
public static function blogShortBoxDefault(array $all_items,$gallery=false,$thumb=true,$go_link='') {
$html='';
$items = $all_items;
$products = new Projects();
$L = Core_Language::getInstance();
if (!empty($items)) {
$link_base = '/blog/';
$html .= '';
foreach ($items as $item) {
$title= htmlspecialchars($item['title']);
$html .= '
';
$html .= '
';
$html .= '
'.$item['title'].'';
$html .= '
';
if($thumb) $html .= '

';
$html .='
';
$html .= ' '.$item['short_desc'].'
';
$html .= '';
//$html .= '
'.$item['human_date'].'
';
$html .= '
';
$html .='
';
$html .= '
';
$html .= '
';
}
$html .= '
';
}
return $html;
}
public static function blogBoxDefault($item) {
$html='';
$L = Core_Language::getInstance();
if (!empty($item)) {
$html .= '';
$title= htmlspecialchars($item['title']);
$html .= '
';
$html .= '
';
$html .= '
'.$item['title'].'
';
$html .= '
';
if($item['image']) $html .= '

';
$html .='
';
$html .= ' '.$item['text'].'
';
$html .= '';
//$html .= '
'.$item['human_date'].'
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
}
return $html;
}
public static function reviewsBoxDefault(array $items) {
$html='';
$products = new Reviews();
$L = Core_Language::getInstance();
if (!empty($items)) {
//$all_link = '/reviews/'.$go_link;
$html .= '';
foreach ($items as $item) {
$title= htmlspecialchars($item['title']);
//$short_description = strip_tags($L->StrT('content','descr', $item['id'], $item['descr']));
//$item['short_desc'] = strlen($short_description)>520 ? mb_substr(strip_tags($short_description),0,520,'UTF8').'...' : $short_description;
$thumb_small = '';
$html .= '
';
$html .= '
';
$html .= '
';
//if($thumb) $html .= '
.')
';
$html .='
';
$html .= ''.$item['title'].'';
$html .= $item['descr'];
$html .= '';
//$html .= '
'.$item['human_date'].'
';
$html .= '
';
$html .= '
';
$html .= '
';
}
// $html .='
';
$html .= '
';
}
return $html;
}
static function show_work_galleries($galleries,$type=1) {
global $L;
$Gallery = new WorksGallery();
//$DB = Core_Database::getInstance();
ob_start();
?>
foreach ($galleries as $gall) {
$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) {
?>
if($gall['images']) { ?>
=$gall['images']?>
} ?>