Files
cm-web-legacy/application/views/m/cmtv/channel_recommend.php
2020-06-10 06:19:03 +09:00

88 lines
2.5 KiB
PHP
Executable File

<?
$page_title = $page_title_1;
$page_title_link = '#';
require_once(APPPATH."/views/m/common/light_header.php");?>
<div class="channel_cont channel_cont_fixed">
<div class="wrap">
<div id="channel_list">
<?
foreach ($channel as $val1) {
$style = 'display:block;';
$class = 'bgb3';
$style .= 'margin-bottom: 0 !important;';
$class = '';
$class .= ' channel_page' . 1;
?>
<div class="channel_boxs <?=$class?>" style="margin-top:10px;<?=$style?>">
<div class="channel_detail_box">
<div class="channel_detail fl">
<div class="channel_profile">
<div onclick="location.href='/m/life/channel/<?= $val1['idx'] ?>'"
style="cursor:pointer;border-radius: 50px;width:50px;height:50px;background:url('<?= $val1['channel_icon'] ?>') no-repeat center; background-size:cover;"></div>
</div>
<div style="padding-top:7px;"><a href="/m/life/channel/<?= $val1['idx'] ?>"><span
class="chinfo"><?= $val1['channel_name'] ?></span></a>
<p><span class="beachblue"><?=number_format($val1['channel_article_count'])?></span>
stories</p></a></div>
</div>
<div class="fr" style="margin-top:15px !important; margin-right:10px;">
<button type="button" class="btn btn-success br20"
onclick="location.href='/m/life/channel/<?= $val1['idx'] ?>'">더보기 <img
src="/img/web/img_down.png" style="padding-top:8px;"></button>
</div>
</div>
<? if(count($val1['data'])<5) {
$j =0;
foreach ($val1['data'] as $val2) {
if($j >2 )break;
$head_title = '';
if ($val2['head_title'] != '') $head_title = '<span class="beachblue">[' . $val2['head_title'] . ']</span> ';
$title = $head_title . $val2['title'];
$title_txt = mb_strimwidth($title, '0', '90', '..', 'utf-8');
?>
<div class="channel_con">
<a href="/m/life/life_view/<?= $val2['idx'] ?>"><img src="<?= $val2['main_img'] ?>" class="art-img"></a>
<p class="chtitle"><a href="/m/life/life_view/<?= $val2['idx'] ?>"><?= $title_txt ?></a>
<a href="/m/life/editor/<?= $val2['partner_idx'] ?>"><?= $val2['editor_name'] ?></a></span></p>
</div>
<?
}
}
?>
</div>
<?
}
?>
</div>
</div>
</div>
<script>
var channel_page = 2;
function channel_list_more() {
$(".channel_page" + channel_page).show();
}
</script>