1. Список говнокодов пользователя a_lebedev

    Всего: 1

  2. PHP / Говнокод #6816

    +157

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 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

    Функция, кстати называется GetOneBlock )))

    a_lebedev, 02 Июня 2011

    Комментарии (15)