- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
$blocks = $this->dsp->db->select_array("select distinct B.*, BS.ALIGN_, BS.ORDER_, BS.PARAM_, BS.HTML_CLASS as HTML_CLASS, BS.HTML_TYPE as HTML_TYPE, SC.SYS_CLASS_FILE, SC.SYS_CLASS_VARNAME, SC.SYS_CLASS_CLASSNAME,BS.EXCLUSION, BS.ID
from BLOCKS_SECTION BS
inner join BLOCKS B on (BS.BLOCKS_ID=B.BLOCKS_ID and B.STATUS=1)
left join SYS_CLASS SC ON SC.SYS_CLASS_ID=B.SYS_CLASS_ID
where $add and SITE_ID=? and B.BLOCKS_ID=? order by BS.EXCLUSION desc, BS.ORDER_",$site_id,$call_id);
$arr_block_id = array();
while (!empty($blocks)) {
foreach ($blocks as $idx => $block) {
if($block['EXCLUSION']){
if(!in_array($block['BLOCKS_ID'],$arr_block_id)) array_push($arr_block_id,$block['BLOCKS_ID']);
}else{
if(!in_array($block['BLOCKS_ID'],$arr_block_id) or $block['ID'])
$ret .= $this->CallPrepareBlock($VARS,$VARS_init,$block);
}
unset($blocks[$idx]);
} // foreach
} // while