<?
$cmTv_list[0]=$arr_tv_talkshow;
$cmTv_list[1]=$arr_tv_testimony;
$cmTv_list[2]=$arr_tv_gospel;
$cmTv_list[3]=$arr_tv_praise;
?>
<div class="cmTv">
        <div class="titleBox">
        <h2><a href="/cmtv">크로스맵 <span>TV</span></a></h2>
          <ul class="cmTv-nav">
            <li><a href="#">토크쇼</a></li>
            <li><a href="#">간증</a></li>
            <li><a href="#">말씀</a></li>
            <li><a href="#">찬양</a></li>
          </ul>
            </ul>
        <div class="arrow"> 
            <span class="current-index">1</span>/<span class="count">5</span>
        </div>
        </div>
        <div class="thumbBox">
          <div class="cmTv-slider">
        <? foreach($cmTv_list as $val){?>
            <div>
                <div class="thumbMain">
                    <a href="<?if(isset($val[0]['idx'])==TRUE) echo '/web/life/life_view/'.$val[0]['idx'];?>">
                        <img src="<? if(isset($val[0]['main_img'])==TRUE) echo $val[0]['main_img'];?>">
                    </a>
                    <div class="des">
                        <p><a href="<?if(isset($val[0]['idx'])==TRUE) echo '/web/life/life_view/'.$val[0]['idx'];?>">
                            <? if(isset($val[0]['title'])==TRUE) echo $val[0]['title']?>
                        </a></p>
                    </div>
                </div>
                <ul>
                    <?for($i=1;$i<count($val);$i++){?>
                    <li>
                        <a href="<?if(isset($val[$i]['idx'])==TRUE) echo '/web/life/life_view/'.$val[$i]['idx'];?>">
                            <img src="<? if(isset($val[$i]['main_img'])==TRUE) echo $val[$i]['main_img'];?>">
                        </a>
                        <div class="des">
                            <?/*<p><a href="#"><? if(isset($val['title'])==TRUE) echo mb_strimwidth($val['title'],0,25,'..','utf-8');?></a></p>*/?>
                            <p><a href="<?if(isset($val[$i]['idx'])==TRUE) echo '/web/life/life_view/'.$val[$i]['idx'];?>">
                                <? if(isset($val[$i]['title'])==TRUE) echo $val[$i]['title']?>
                            </a></p>
                        </div>
                    </li>
                    <?}?>
                </ul>
            </div>
        <?}?>
          </div>
          <div class="cmTv-controls">
            <div class="arrowPrev"><i class="fas fa-chevron-left"></i></div>
            <div class="arrowNext"><i class="fas fa-chevron-right"></i></div>
          </div>
        </div>
      </div>