<?
if($result_code == '0000') {
    echo '0000|||||';
    if(count($list) > 0) {

        $i = 1;
        $row_count = count($list);
        foreach ($list as $val) {
            $head_title = '';
            if($val['head_title'] != '')    $head_title = '<span class="beachblue">['.$val['head_title'].']</span> ';
            $title = $head_title.$val['title'];

            $title_txt = mb_strimwidth($title, '0', '90', '..', 'utf-8');

            if($i%4==1) echo '<div class="channel_boxs" style="margin-bottom: 0 !important;">';

    ?>
            <div class="channel_con">
                <div class="art-img" onclick="location.href='/m/life/life_view/<?=$val['idx']?>'" style="border-top-left-radius: 5px;border-top-right-radius: 5px;cursor:pointer;width:309.39px;height:200.3px;background:url('<?=$val['main_img']?>') no-repeat center; background-size:cover;"></div>
                <p class="chtitle" style="height:56px"><a href="/m/life/life_view/<?=$val['idx']?>"><?=$title_txt?></a></p>
            </div>
    <?

            if($i%4==0 || $row_count==$i) echo '</div>';

            $i++;
        }
    }
    


    echo '|||||'.$total_count.'|||||'.$more_list;

} else {
    echo $result_code.'|||||글가져오기에 실패했습니다.';

}
?>
