<!DOCTYPE html>
<html lang="ko">

<head>
    <?php $this->load->view('partial/head')?>
    <link rel="stylesheet" href="/ART/cmtv/css/default.css">
</head>

<body>
    <?php $this->load->view('partial/sidemenu')?>
    <?php $this->load->view('partial/header')?>
    <!-- //header -->
    <main>
        <section id="channel_tit">
            <div class="container">
                <div class="row">
                    <div class="channel_tit">
                        <div class="chinfo">
                            <div class="chimg">
                                <a href=""><img src="<?php echo imgSrc($editor->partner_img)?>" alt=""></a>
                            </div>
                            <div class="chtxt">
                                <h3><?php echo $editor->partner_name?></h3>
                                <p><?php echo $editor->partner_intro?></p>
                            </div>
                        </div>
                        <div class="chbtns">
                            <ul>
                                <li><a href="">홈페이지</a></li>
                                <li><a class="share_btn" href="#">공유</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

        </section>
        <section id="channel_tab">
            <div class="container">
                <div class="row">
                    <div class="channel_tab">
                        <ul>
                            <li>
                                <a
                                    href="/cmtv/channel/<?php echo cleanUrl($editor->partner_name)?>/<?php echo $editor->idx?>">홈</a>
                            </li>
                            <li class="current">
                                <a
                                    href="/cmtv/channel/<?php echo cleanUrl($editor->partner_name)?>/<?php echo $editor->idx?>/recent">동영상</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>
        <!-- video_listbox -->
        <section id="video_listbox">
            <div class="container">
                <div class="row">
                    <div class="video_listbox mt50 cm-tvmore-enabled" data-post-ids="<?php echo implode(',', $pageInitPostIds)?>" data-page-type="channel">
                        <div class="tit">
                            <h2>전체영상</h2>
                            <div class="fillter">
                                <span><a class="<?php echo $isLikesOrder ? '': 'select'?>"
                                        href="/cmtv/channel/<?php echo cleanUrl($editor->partner_name)?>/<?php echo $editor->idx?>/recent">최신순</a></span>
                                <span><a class="<?php echo $isLikesOrder ? 'select': ''?>"
                                        href="/cmtv/channel/<?php echo cleanUrl($editor->partner_name)?>/<?php echo $editor->idx?>/views">재생순</a></span>
                            </div>
                        </div>
                        <ul><?php foreach($posts as $post) { ?>
                            <li>
                                <div class="box"><a
                                        href="/cmtv/<?php echo $post->titleUrl ?>/<?php echo $post->idx ?>"><img
                                            src="<?php echo imgSrc($post->mainImg) ?>"></a></div>
                                <div class="txtbox">
                                    <dl>
                                        <dt><a
                                                href="/cmtv/<?php echo $post->titleUrl ?>/<?php echo $post->idx ?>"><?php echo $post->title?></a>
                                        </dt>
                                        <dd class="editor_txt"><a
                                                href="/cmtv/channel/<?php echo $post->editorNameUrl ?>/<?php echo $post->editorId ?>"><?php echo $post->editorName?></a>
                                        </dd>
                                    </dl>
                                    <span class="info">
                                        <span class="hit">조회수 <?php echo $post->views?>회</span>
                                        <span class="reple"><?php echo time_elapsed_string($post->reg_date) ?></span>
                                    </span>
                                </div>
                            </li><?php }?>
                        </ul>
                        <div class="more_btn"><a href="#" class="cm-tvmore-btn">더보기</a></div>
                    </div>
                </div>
            </div>

        </section>
        <!-- //video_listbox -->
    </main>
    <!-- footer -->
    <?php $this->load->view('partial/footer')?>
    <script src="/ART/cmtv/js/cmtv_slide.js"></script>
</body>

</html>