$sql_poster = $db->query( "SELECT images, news_id FROM " . PREFIX . "_images where news_id = '{$row['id']}' LIMIT 2" );
$poster = $db->get_row($sql_poster);
if ($poster['images'] != "") {
$emgs = explode('|||',$poster['images']);
$scrsList = explode('|',$emgs);
$scrs = '';
$cntscrs = 90;
$ai = 0;
foreach ($scrsList[1] as $scr){
$ai++;
$scr = trim($scr);
$poster_temp = explode("/",$scr);
$poster_name = $poster_temp[1];
$poster_data = substr($scr,0,8);
if ($ai<=$cntscrs) {
$scrs .= '
<a data-fancybox="gallery" class="swiper-slide" href="'. $config ['http_home_url'] . 'uploads/posts/'.$poster_data.''.$poster_name.'">
<div class="swiper-slide ssr" style="background-image:url('. $config ['http_home_url'] . 'uploads/posts/'.$poster_data.''.$poster_name.')"></div>
</a>
'; } else {$scrs .= '';}
}
unset($scrsList[1]);
if (!empty($poster['images'])) {$scrall= $scrs;}
$tpl->set ( '{poster}', $scrall);
} else $tpl->set ( '{poster}', "" );
$.fancybox.open({
hideScrollbar: true,
touch: false,
autoFocus: false,
keyboard: false,
type: 'ajax',
src: dle_root + 'engine/ajax/controller.php',
ajax: {
settings: {
type: 'GET',
dataType: 'html',
data: {
mod: 'fullstory',
newsId: $data.afsId,
preset: $data.afsPreset ? $data.afsPreset : '',
template: $data.afsTemplate ? $data.afsTemplate : ''
}
}
}
});