ble.".idf AND kcms_unic_furl.deleted = 0 AND kcms_unic_furl.published = 1 ".$filter); $arr_id = explode(',',$arr_info[0]['dbFilter']); $arr_temp = array(); $i=0; foreach($arr_id as $val1) { foreach($arr_item as $key=>$val2) { if($val1 == $val2['idf']) { $arr_temp[$i] = $arr_item[$key]; $i++; break; } } } $arr_item = $arr_temp; } else { $filter =''; $sort = ' ORDER BY '.$arr_info[0]['dbSort'].' '.$arr_info[0]['dbSortType']; $limit = ' LIMIT 0,'.$arr_info[0]['dbCount']; $arr_item = DbSimple::Result(" SELECT kcms_unic_furl.*,".$contentTable.".* FROM kcms_unic_furl,".$contentTable." WHERE kcms_unic_furl.furl != '".$module."' AND kcms_unic_furl.idf = ".$contentTable.".idf AND kcms_unic_furl.deleted = 0 AND kcms_unic_furl.published = 1 ".$sort.$limit); } $filter = ''; //echo Db::$log; foreach($arr_item as $key=>$value) { if($value['images'] !='') { $arr_img = explode("#",trim($value['images'],"#")); $filter .= $arr_img[0].','; } } $arr_files = DbSimple::Result(" SELECT * FROM kcms_files WHERE kcms_files.deleted = 0 AND kcms_files.idFile IN(".trim($filter,',').")"); if(!empty($arr_files)) { foreach($arr_item as $key=>$value) { $arr_img = explode("#",trim($value['images'],"#")); foreach($arr_files as $key1=>$value1) if($value1['idFile'] == $arr_img[0]) $arr_item[$key]['images'] = $value1; } } if(!empty($arr_item)) { $tpl = new Templater('modules/'.$module."/internal/".$arr_info[0]['tpl']); $tpl->AssignArray($arr_item); $tpl->Assign('h1',$arr_info[0]['h1']); $tpl->Assign('furl',$arr_info[0]['furl']); $tpl->Load(); } } } ?>