first commit
This commit is contained in:
121
application/views/web/life/category.php
Executable file
121
application/views/web/life/category.php
Executable file
@@ -0,0 +1,121 @@
|
||||
<script src="/js/web/swiper.min.js"></script>
|
||||
<link rel="stylesheet" href="/js/web/swiper.min.css">
|
||||
|
||||
|
||||
<div class="channel_contents3" style="min-height:600px">
|
||||
<div class="wrap">
|
||||
<div class="channel_top" style="text-align:center;">
|
||||
<button type="button" class="btn btn-default br20" onclick="location.href='/web/life/channel_recommend'" style="padding:10px 40px;font-size: 19px; font-weight: 200 !important;">추천채널 </button>
|
||||
<button type="button" class="btn btn-default_bb br20" onclick="location.href='/web/life/category'" style="padding:10px 40px;font-size: 19px; font-weight: 200 !important;">카테고리 </button>
|
||||
</div>
|
||||
<div class="channel_category bgb3">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper" style="padding-bottom: 10px;">
|
||||
<? foreach ($arr_category as $key=>$val) {
|
||||
$category_name_txt = mb_strimwidth($val['category_name'], '0', '10', '..', 'utf-8');
|
||||
?>
|
||||
<div class="swiper-slide"><a href="/web/life/category/<?=$val['idx']?>" <? if($category_idx==$val['idx']) { echo 'class="current"';}?>><?=$category_name_txt?></a></div>
|
||||
<? }?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="channel_tit">
|
||||
<?=$category_name?> <span class="beachblue"><?=number_format($total_count)?></span>
|
||||
<span class="fr art_bt" style="margin-top:-5px;">
|
||||
<button type="button" onclick="location.href='/web/life/category/<?=$category_idx?>?search_sort=1'" class="btn <? if($search_sort=='1') { echo 'btn-default_bb'; } else { echo 'btn-default';}?> br20" >최신순</button>
|
||||
<button type="button" onclick="location.href='/web/life/category/<?=$category_idx?>?search_sort=2'" class="btn <? if($search_sort=='2') { echo 'btn-default_bb'; } else { echo 'btn-default';}?> br20">인기순</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="editor_list">
|
||||
|
||||
<? $i=1;
|
||||
$editor_count = count($list);
|
||||
if($editor_count == 0) echo '<div style="height:100px; text-align:center; padding-top:30px">등록된 에디터가 없습니다.</div>';
|
||||
foreach ($list as $val) {
|
||||
if($i%4==1) echo '<div class="channel_boxs">';
|
||||
|
||||
|
||||
?>
|
||||
<div class="bk_con" onclick="location.href='/web/life/editor/<?=$val['idx']?>'" style="cursor: pointer">
|
||||
<span class="shadow"></span>
|
||||
<div class="art-img" onclick="location.href='/web/life/editor/<?=$val['idx']?>'" style="border-radius: 5px;cursor:pointer;width:173px;height:246px;background:url('<?=$val['main_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
<p class="chn_tit"><a href="/web/life/editor/<?=$val['idx']?>"><?=$val['partner_name']?></a></p>
|
||||
<p class="chn_bar"> <img src="/img/web/bg_bar.gif"></p>
|
||||
<p class="chn_reply"><span class="beachblue" style="font-size:18px;"><a href="/web/life/editor/<?=$val['idx']?>"><?=number_format($val['article_count'])?></a></span><span style="font-size:14px;"> 개 글</span></p>
|
||||
</div>
|
||||
|
||||
|
||||
<?
|
||||
|
||||
if($i%4==0 || $editor_count==$i) echo '</div>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$more_btn_style = 'style="display:none"';
|
||||
if($editor_count < $total_count) {
|
||||
$more_btn_style = 'style="display:block"';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="channel_bottom2" <?=$more_btn_style?> id="editor_more_btn">
|
||||
<button type="button" class="btn btn-default br20" onclick="category_list_more();" style="width: 110px;height: 35px;">더보기 </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var swiper = new Swiper('.swiper-container', {
|
||||
slidesPerView: 7,
|
||||
spaceBetween: 0,
|
||||
initialSlide: "<?=$swiper_page?>"
|
||||
});
|
||||
|
||||
|
||||
var page = 2;
|
||||
function category_list_more(){
|
||||
var form_data = {
|
||||
"sort" : "<?=$search_sort?>",
|
||||
"page" : page,
|
||||
"category_idx" : "<?=$category_idx?>"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/life/editor_list_more',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'HTML',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml=='') return false;
|
||||
var arrHtml = rtnHtml.split("|||||");
|
||||
if(arrHtml[0].trim()=='0000') {
|
||||
$("#editor_list").append(arrHtml[1]);
|
||||
if (arrHtml[3] == "N") {
|
||||
$("#editor_more_btn").hide();
|
||||
} else {
|
||||
$("#editor_more_btn").show();
|
||||
}
|
||||
page++;
|
||||
|
||||
} else {
|
||||
alert(arrHtml[1]);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('리스트 가져오기에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
126
application/views/web/life/channel.php
Executable file
126
application/views/web/life/channel.php
Executable file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
$channel_name = $result['channel_name'];
|
||||
$channel_main_img = $result['main_img'];
|
||||
$channel_idx = $result['idx'];
|
||||
$category_idx = $result['category_idx'];
|
||||
$category_name = $result['category_name'];
|
||||
$channel_intro = $result['channel_intro'];
|
||||
$channel_icon = $result['channel_icon'];
|
||||
$content_type = '3';
|
||||
|
||||
include_once('life_header_inc.php'); ?>
|
||||
|
||||
<div class="channel_contents2">
|
||||
<div class="wrap">
|
||||
<div class="channel_top">
|
||||
<span class="fl">전체글 수 <span class="beachblue"><?= number_format($total_count) ?></span></span>
|
||||
<span class="fr">
|
||||
<button type="button" onclick="location.href='/web/life/channel/<?= $channel_idx ?>?search_sort=1'" class="btn
|
||||
<? if ($search_sort == '1') {
|
||||
echo 'btn-default_bb';
|
||||
} else {
|
||||
echo 'btn-default';
|
||||
} ?> br20">최신순</button>
|
||||
<button type="button" onclick="location.href='/web/life/channel/<?= $channel_idx ?>?search_sort=2'" class="btn
|
||||
<? if ($search_sort == '2') {
|
||||
echo 'btn-default_bb';
|
||||
} else {
|
||||
echo 'btn-default';
|
||||
} ?> br20">인기순</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="channel_boxs" id="life_list" style="margin-bottom: 0 !important;">
|
||||
<? $i = 1;
|
||||
foreach ($list as $val) {
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '90', '..', 'utf-8');
|
||||
|
||||
$channel_article_style = '';
|
||||
if ($i == count($list)) {
|
||||
$channel_article_style = 'style="border-bottom:0 !important"';
|
||||
}
|
||||
?>
|
||||
<div class="channel_cont" <?= $channel_article_style ?>>
|
||||
<div class="channel_photo" onclick="location.href='/web/life/life_view/<?= $val['idx'] ?>'" style="cursor:pointer;width:234px;height:151px;background:url('<?= $val['main_img'] ?>') no-repeat center; background-size:cover;"></div>
|
||||
<p class="chtitle2"><a href="/web/life/life_view/<?= $val['idx'] ?>"><?= $title_txt ?></a></p>
|
||||
<p><img src="/img/web/img_heart.gif"><span class="like"><?= number_format($val['like_count']) ?></span><span class="chname pdl25"><a href="/web/life/editor/<?= $val['partner_idx'] ?>"><?= $val['editor_name'] ?></a></span></p>
|
||||
</div>
|
||||
<? $i++;
|
||||
} ?>
|
||||
</div>
|
||||
<?
|
||||
$life_more_btn_style = 'display:none;';
|
||||
if ($total_count > count($list)) {
|
||||
$life_more_btn_style = 'display:block;';
|
||||
}
|
||||
?>
|
||||
<div class="channel_bottom">
|
||||
<button type="button" class="btn btn-default br20" id="life_more_btn" onclick="channel_list_more();" style="width:18%;margin-left: 41%;<?= $life_more_btn_style ?>">더보기 </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var form_data = {
|
||||
"sort": "<?= $search_sort ?>",
|
||||
"page": 2,
|
||||
"channel_idx": "<?= $channel_idx ?>",
|
||||
"ready": true,
|
||||
"lastScroll": 0
|
||||
};
|
||||
|
||||
$(window).on('scroll', function() {
|
||||
var h = window.innerHeight + window.scrollY;
|
||||
if (form_data.lastScroll < h && ((h >= document.body.offsetHeight - 60 && h < document.body.offsetHeight - 40) || h == document.body.offsetHeight)) {
|
||||
channel_list_more();
|
||||
}
|
||||
form_data.lastScroll = h;
|
||||
});
|
||||
|
||||
|
||||
|
||||
function channel_list_more() {
|
||||
if (form_data.ready) {
|
||||
form_data.ready = false;
|
||||
$.ajax({
|
||||
url: '/web/life/life_list_more',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'HTML',
|
||||
data: form_data,
|
||||
success: function(rtnHtml) {
|
||||
form_data.ready = true;
|
||||
if (rtnHtml == '') return false;
|
||||
var arrHtml = rtnHtml.split("|||||");
|
||||
if (arrHtml[0].trim() == '0000') {
|
||||
$("#life_list").children('.channel_cont').last().removeAttr("style");
|
||||
$("#life_list").append(arrHtml[1]);
|
||||
|
||||
if (arrHtml[3] == "N") {
|
||||
$("#life_more_btn").hide();
|
||||
} else {
|
||||
$("#life_more_btn").show();
|
||||
}
|
||||
form_data.page++;
|
||||
|
||||
} else {
|
||||
form_data.ready = false;
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function(rtnHtml) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="//wcs.naver.net/wcslog.js"></script>
|
||||
<script type="text/javascript">
|
||||
if (!wcs_add) var wcs_add = {};
|
||||
wcs_add["wa"] = "2ee4bea3106352";
|
||||
wcs_do();
|
||||
</script>
|
||||
109
application/views/web/life/channel_recommend.php
Executable file
109
application/views/web/life/channel_recommend.php
Executable file
@@ -0,0 +1,109 @@
|
||||
<div class="channel_contents">
|
||||
<div class="wrap">
|
||||
<div class="channel_top" style="text-align:center; margin-bottom:0 !important;">
|
||||
<button type="button" class="btn btn-default_bb br20" style="padding:10px 40px;font-size: 19px; font-weight: 200 !important;">추천채널 </button>
|
||||
<button type="button" class="btn btn-default br20" onclick="location.href='/web/life/category'" style="padding:10px 40px;font-size: 19px; font-weight: 200 !important;">카테고리 </button>
|
||||
</div>
|
||||
<div id="channel_list">
|
||||
<?
|
||||
$i=1;
|
||||
$etc_section_count = count($arr_etc_section);
|
||||
$etc_section_page = ceil($etc_section_count/3);
|
||||
foreach ($arr_etc_section as $val1) {
|
||||
|
||||
$curr_page = ceil($i/3);
|
||||
|
||||
$style = 'style="display:block;"';
|
||||
if($i > 3) $style = 'style="display:none;"';
|
||||
|
||||
|
||||
$class = 'bgb3';
|
||||
if($etc_section_count < 3 || $i%3==0) {
|
||||
$style.= 'margin-bottom: 0 !important;';
|
||||
$class = '';
|
||||
}
|
||||
|
||||
$class.= ' channel_page'.$curr_page;
|
||||
|
||||
?>
|
||||
<div class="channel_boxs <?=$class?>" <?=$style?>>
|
||||
<div class="channel_detail_box">
|
||||
<div class="channel_detail fl">
|
||||
<div class="channel_profile"><div onclick="location.href='/web/life/channel/<?=$val1['channel_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="/web/life/channel/<?=$val1['channel_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; margin-right:10px;" >
|
||||
<span class="delivery"><?=number_format($val1['delivery_count'])?>명에게 배달중</span>
|
||||
<button type="button" class="btn btn-success br20" onclick="location.href='/web/life/channel/<?=$val1['channel_idx']?>'" >더보기 <img src="/img/web/img_down.png" style="padding-top:8px;"></button>
|
||||
</div>
|
||||
</div>
|
||||
<? if(isset($arr_etc_section_detail[$val1['idx']])==true) {
|
||||
foreach ($arr_etc_section_detail[$val1['idx']] as $val2) {
|
||||
|
||||
$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">
|
||||
<div class="art-img" onclick="location.href='/web/life/life_view/<?=$val2['content_idx']?>'" style="border-top-left-radius: 5px;border-top-right-radius: 5px;cursor:pointer;width:309.39px;height:200.3px;background:url('<?=$val2['main_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
<p class="chtitle" style="height:57px"><a href="/web/life/life_view/<?=$val2['content_idx']?>"><?=$title_txt?></a><span class="c_name"><a href="/web/life/editor/<?=$val2['partner_idx']?>"><?=$val2['editor_name']?></a></span></p>
|
||||
</div>
|
||||
|
||||
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?
|
||||
$i++;
|
||||
|
||||
|
||||
}
|
||||
$more_btn_style = 'style="display:none;';
|
||||
if($etc_section_count > 3) {
|
||||
$more_btn_style = 'style="display:block;"';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="channel_bottom" <?=$more_btn_style?> id="life_more_btn">
|
||||
<button type="button" onclick="channel_list_more();" class="btn btn-default br20">더보기 </button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var channel_page = 2;
|
||||
function channel_list_more(){
|
||||
$(".channel_page"+channel_page).show();
|
||||
console.log($("#channel_list").children('.channel_page'+(channel_page-1)).last());
|
||||
$("#channel_list").children('.channel_page'+(channel_page-1)).last().removeAttr("style");
|
||||
$("#channel_list").children('.channel_page'+(channel_page-1)).last().addClass("bgb3");
|
||||
|
||||
if("<?=$curr_page?>" == channel_page) {
|
||||
$("#life_more_btn").hide();
|
||||
} else {
|
||||
channel_page++;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
113
application/views/web/life/editor.php
Executable file
113
application/views/web/life/editor.php
Executable file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
$partner_idx = $result['idx'];
|
||||
$editor_name = $result['partner_name'];
|
||||
$editor_main_img = $result['main_img'];
|
||||
$editor_intro = $result['partner_intro'];
|
||||
$partner_img = $result['partner_img'];
|
||||
$category_idx = $result['category_idx'];
|
||||
$category_name = $result['category_name'];
|
||||
$channel_idx = $result['channel_idx'];
|
||||
$channel_name = $result['channel_name'];
|
||||
$sns_id1 = $result['sns_id1'];
|
||||
$sns_id2 = $result['sns_id2'];
|
||||
$sns_id3 = $result['sns_id3'];
|
||||
$sns_id4 = $result['sns_id4'];
|
||||
$sns_id5 = $result['sns_id5'];
|
||||
|
||||
|
||||
|
||||
|
||||
$content_type = '3';
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<? include_once ('life_header_inc.php');?>
|
||||
|
||||
<div class="channel_contents">
|
||||
<div class="wrap" style="margin-top:70px;">
|
||||
<div class="channel_top bgb3">
|
||||
<span class="fl art_no">전체글 수 <span class="beachblue"><?=number_format($total_count)?></span></span>
|
||||
<span class="fr art_bt">
|
||||
<button type="button" onclick="location.href='/web/life/editor/<?=$partner_idx?>?search_sort=1'" class="btn <? if($search_sort=='1') { echo 'btn-default_bb'; } else { echo 'btn-default';}?> br20" >최신순</button>
|
||||
<button type="button" onclick="location.href='/web/life/editor/<?=$partner_idx?>?search_sort=2'" class="btn <? if($search_sort=='2') { echo 'btn-default_bb'; } else { echo 'btn-default';}?> br20">인기순</button>
|
||||
</span>
|
||||
</div>
|
||||
<div id="life_list">
|
||||
<?
|
||||
$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='/web/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="/web/life/life_view/<?=$val['idx']?>"><?=$title_txt?></a></p>
|
||||
</div>
|
||||
<?
|
||||
|
||||
if($i%4==0 || $row_count==$i) echo '</div>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$life_more_btn_style = 'style="display:none;"';
|
||||
if($total_count > $row_count) {
|
||||
$life_more_btn_style = 'style="display:block;"';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="channel_bottom">
|
||||
<button type="button" class="btn btn-default br20" id="life_more_btn" onclick="editor_list_more();" <?=$life_more_btn_style?>>더보기 </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var life_page = 2;
|
||||
function editor_list_more(){
|
||||
var form_data = {
|
||||
"sort" : "<?=$search_sort?>",
|
||||
"page" : life_page,
|
||||
"partner_idx" : "<?=$partner_idx?>"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/life/life_list_more',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'HTML',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml=='') return false;
|
||||
var arrHtml = rtnHtml.split("|||||");
|
||||
if(arrHtml[0].trim()=='0000') {
|
||||
$("#life_list").append(arrHtml[1]);
|
||||
|
||||
if (arrHtml[3] == "N") {
|
||||
$("#life_more_btn").hide();
|
||||
} else {
|
||||
$("#life_more_btn").show();
|
||||
}
|
||||
life_page++;
|
||||
|
||||
} else {
|
||||
alert(arrHtml[1]);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
38
application/views/web/life/editor_life_list_more.php
Executable file
38
application/views/web/life/editor_life_list_more.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?
|
||||
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='/web/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="/web/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.'|||||글가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
37
application/views/web/life/editor_list_more.php
Executable file
37
application/views/web/life/editor_list_more.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
if(count($list) > 0) {
|
||||
$i=1;
|
||||
$editor_count = count($list);
|
||||
foreach ($list as $val) {
|
||||
if($i%4==1) echo '<div class="channel_boxs">';
|
||||
|
||||
?>
|
||||
<div class="bk_con" onclick="location.href='/web/life/editor/<?=$val['idx']?>'" style="cursor: pointer">
|
||||
<span class="shadow"></span>
|
||||
<div class="art-img" onclick="location.href='/web/life/editor/<?=$val['idx']?>'" style="border-radius: 5px;cursor:pointer;width:173px;height:246px;background:url('<?=$val['main_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
<p class="chn_tit"><a href="/web/life/editor/<?=$val['idx']?>"><?=$val['partner_name']?></a></p>
|
||||
<p class="chn_bar"> <img src="/img/web/bg_bar.gif"></p>
|
||||
<p class="chn_reply"><span class="beachblue" style="font-size:18px;"><a href="/web/life/editor/<?=$val['idx']?>"><?=number_format($val['article_count'])?></a></span><span style="font-size:14px;"> 개 글</span></p>
|
||||
</div>
|
||||
|
||||
|
||||
<?
|
||||
|
||||
if($i%4==0 || $editor_count==$i) echo '</div>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo '|||||'.$total_count.'|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||글가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
269
application/views/web/life/index.php
Executable file
269
application/views/web/life/index.php
Executable file
@@ -0,0 +1,269 @@
|
||||
<?php
|
||||
$i = 1;
|
||||
$list1 = array();
|
||||
$list2 = array();
|
||||
$list3 = array();
|
||||
foreach($list as $val) {
|
||||
if($i%3 == 1) $list1[] = array('idx'=> $val['idx'], 'main_img' => $val['main_img'], 'sub_title'=> $val['sub_title'], 'title'=> $val['title'], 'hit_count'=> $val['hit_count'], 'comment_count'=> $val['comment_count']);
|
||||
if($i%3 == 2) $list2[] = array('idx'=> $val['idx'], 'main_img' => $val['main_img'], 'sub_title'=> $val['sub_title'], 'title'=> $val['title'], 'hit_count'=> $val['hit_count'], 'comment_count'=> $val['comment_count']);
|
||||
if($i%3 == 0) $list3[] = array('idx'=> $val['idx'], 'main_img' => $val['main_img'], 'sub_title'=> $val['sub_title'], 'title'=> $val['title'], 'hit_count'=> $val['hit_count'], 'comment_count'=> $val['comment_count']);
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?=DIR_CSS?>/web/jquery-ui.custom.css" />
|
||||
<script src="<?=DIR_JS?>/jquery-ui.min.js"></script>
|
||||
<script src="<?=DIR_JS?>/jquery-ui.multidatespicker.js"></script>
|
||||
|
||||
|
||||
<div class="contents">
|
||||
<div class="wrap" style="background:0 !important">
|
||||
<div class="life_left">
|
||||
<div class="life_header">
|
||||
<form name="input_form" id="input_form" method="post" action="/web/life/">
|
||||
<input type="hidden" name="search_sort" id="search_sort" value="<?=$search_sort?>">
|
||||
<input type="hidden" name="search_date" id="search_date" value="<?=$search_date?>">
|
||||
<input type="hidden" name="search_popular" id="search_popular" value="<?=$search_popular?>">
|
||||
<span class="life_date"><a href="javascript:life_search('search_date', '<?=$prev_date?>')"><img src="/img/web/ico_date_prev.gif"></a> <?=$month_txt?> <a href="javascript:life_search('search_date', '<?=$next_date?>')"><img src="/img/web/ico_date_next.gif"></a></span>
|
||||
<span style="display:none;" class="life_story">라이프 스토리 </span>
|
||||
<span class="btn btn-default br15" style="font-size:12px; background-color:#fff"><a href="javascript:life_search('search_date', '');">최근</a></span>
|
||||
|
||||
<span class="fr">
|
||||
<ul class="life_click2">
|
||||
<li><a href="javascript:life_search('search_sort', '1');" <? if($search_sort=='1') { echo 'class="current"';}?>>최신순</a></li>
|
||||
<li><a href="javascript:life_search('search_sort', '2');" <? if($search_sort=='2') { echo 'class="current"';}?>>인기순</a></li>
|
||||
</ul>
|
||||
</span>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<? if(count($list) == 0) {
|
||||
echo '<div style="height:100px;width:100%; margin-top:100px;text-align: center">등록된 글이 없습니다.</div>';
|
||||
|
||||
} else {
|
||||
?>
|
||||
|
||||
<div class="item_story" id="life_list">
|
||||
<ul class="list_story item_1" id="item_list1">
|
||||
<?
|
||||
if(count($list1) > 0) {
|
||||
$i = 1;
|
||||
foreach($list1 as $val) {
|
||||
$style = '';
|
||||
if($i > 3) {
|
||||
$style = 'style="display:none;"';
|
||||
}
|
||||
?>
|
||||
<li class="life_box item1_1" id="item_1_<?=$i?>" <?=$style?>>
|
||||
<a href="/web/life/life_view/<?=$val['idx']?>"><img src="<?=$val['main_img']?>" width="226"></a>
|
||||
<p class="life_info"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$val['sub_title']?></a></p>
|
||||
<p class="life_title"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$val['title']?></a></p>
|
||||
<p class="life_click"><span>조회 <?=number_format($val['hit_count'])?></span> <span>댓글수 <?=number_format($val['comment_count'])?></span></p>
|
||||
</li>
|
||||
<? $i++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</ul>
|
||||
<ul class="list_story2 item_2" id="item_list2">
|
||||
|
||||
<?
|
||||
if(count($list2) > 0) {
|
||||
$i = 1;
|
||||
foreach($list2 as $val) {
|
||||
$style = '';
|
||||
if($i > 4) {
|
||||
$style = 'style="display:none;"';
|
||||
}
|
||||
|
||||
?>
|
||||
<li class="life_box2 item2_1" id="item_2_<?=$i?>" <?=$style?>>
|
||||
<a href="/web/life/life_view/<?=$val['idx']?>"><img src="<?=$val['main_img']?>" width="226"></a>
|
||||
<p class="life_info"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$val['sub_title']?></a></p>
|
||||
<p class="life_title"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$val['title']?></a></p>
|
||||
<p class="life_click"><span>조회 <?=number_format($val['hit_count'])?></span> <span>댓글수 <?=number_format($val['comment_count'])?></span></p>
|
||||
</li>
|
||||
<?
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</ul>
|
||||
<ul class="list_story3 item_3" id="item_list3">
|
||||
<?
|
||||
if(count($list3) > 0) {
|
||||
$i = 1;
|
||||
foreach($list3 as $val) {
|
||||
$style = '';
|
||||
if($i > 3) {
|
||||
$style = 'style="display:none;"';
|
||||
}
|
||||
?>
|
||||
<li class="life_box3 item3_1" id="item_3_<?=$i?>" <?=$style?>>
|
||||
<a href="/web/life/life_view/<?=$val['idx']?>"><img src="<?=$val['main_img']?>" width="226"></a>
|
||||
<p class="life_info"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$val['sub_title']?></a></p>
|
||||
<p class="life_title"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$val['title']?></a></p>
|
||||
<p class="life_click"><span>조회 <?=number_format($val['hit_count'])?></span> <span>댓글수 <?=number_format($val['comment_count'])?></span></p>
|
||||
</li>
|
||||
|
||||
<?
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div >
|
||||
<a href="javascript:life_list_more();">
|
||||
<div id="more_btn" class="btn btn-default btn_life">
|
||||
<span>더보기 <img src="/img/web/img_replyopen.gif"></span>
|
||||
</div></a>
|
||||
<? }?>
|
||||
</div>
|
||||
|
||||
<div class="life_right">
|
||||
<div class="lifestory">
|
||||
<!--<div class="lifestory_title">
|
||||
라이프 STORY
|
||||
</div>-->
|
||||
<ul class="life_tab">
|
||||
<li <? if($search_popular == '1') { echo 'class="current"';}?>><a href="/web/life/?search_date=<?=$search_date?>&search_sort=<?=$search_sort?>&search_popular=1">채널</a></li>
|
||||
<li <? if($search_popular == '2') { echo 'class="current"';}?>><a href="/web/life/?search_date=<?=$search_date?>&search_sort=<?=$search_sort?>&search_popular=2">에디터</a></li>
|
||||
</ul>
|
||||
<ul class="lifestory_list">
|
||||
<? foreach ($arr_popular as $val) {
|
||||
if($search_popular == 1) {
|
||||
$list_idx = $val['idx'];
|
||||
$list_icon = $val['channel_icon'];
|
||||
$list_title = $val['channel_name'];
|
||||
$list_intro = $val['channel_intro'];
|
||||
$view_url = '/web/life/channel/'.$list_idx;
|
||||
} else {
|
||||
$list_idx = $val['idx'];
|
||||
$list_icon = $val['partner_img'];
|
||||
$list_title = $val['partner_name'];
|
||||
$list_intro = $val['partner_intro'];
|
||||
$view_url = '/web/life/editor/'.$list_idx;
|
||||
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<a href="<?=$view_url?>"><img src="<?=$list_icon?>"></a>
|
||||
<p class="life_cate"><a href="<?=$view_url?>"><?=$list_title?></a></p>
|
||||
<p class="life_tit"><a href="<?=$view_url?>"><?=$list_intro?></a></p>
|
||||
</li>
|
||||
<? }?>
|
||||
|
||||
</ul>
|
||||
<div class="pagenumber">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="banner">
|
||||
<a href="http://www.cplace.co.kr/" target="http://www.cplace.co.kr/"><img src="/img/web/banner_250.jpg"></a>
|
||||
<!-- PC_라이프_우측하단
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:250px;height:250px"
|
||||
data-ad-client="ca-pub-7071495522658800"
|
||||
data-ad-slot="1272145884"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script> -->
|
||||
</div>
|
||||
|
||||
<div style="height:50px"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//var list_height = $(".item_1").outerHeight(true);
|
||||
//$('.item_story').css('height', list_height);
|
||||
|
||||
});
|
||||
|
||||
function life_search(id, val) {
|
||||
$("#"+id).val(val);
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
var page = 2;
|
||||
function life_list_more() {
|
||||
var calc_count = parseInt("<?=$total_count?>") - (page * 10);
|
||||
var form_data = {
|
||||
"sort" : "<?=$search_sort?>",
|
||||
"page" : page,
|
||||
"start_date" : "<?=$start_date?>",
|
||||
"end_date" : "<?=$end_date?>",
|
||||
"type" : "main"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/life/life_list_more',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'HTML',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml=='') return false;
|
||||
var arrHtml = rtnHtml.split("|||||");
|
||||
if(arrHtml[0].trim()=='0000') {
|
||||
$("#item_list1").append(arrHtml[1]);
|
||||
$("#item_list2").append(arrHtml[2]);
|
||||
$("#item_list3").append(arrHtml[3]);
|
||||
|
||||
$(".item1_"+page).show();
|
||||
$(".item2_"+page).show();
|
||||
$(".item3_"+page).show();
|
||||
if (arrHtml[5] == "N") {
|
||||
$("#more_btn").hide();
|
||||
/*
|
||||
var list_height = $(".item_1").outerHeight(true);
|
||||
var list_height2 = $(".item_2").outerHeight(true);
|
||||
var list_height3 = $(".item_3").outerHeight(true);
|
||||
if(list_height < list_height2) list_height = list_height2;
|
||||
if(list_height < list_height3) list_height = list_height3;
|
||||
|
||||
list_height = list_height + 200;
|
||||
*/
|
||||
} else {
|
||||
$("#more_btn").show();
|
||||
//var list_height = $(".item_1").outerHeight(true);
|
||||
}
|
||||
//$('.item_story').css('height', list_height);
|
||||
|
||||
page++;
|
||||
|
||||
} else {
|
||||
alert(arrHtml[1]);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
console.log(rtnHtml);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="//wcs.naver.net/wcslog.js"></script>
|
||||
<script type="text/javascript">
|
||||
if(!wcs_add) var wcs_add = {};
|
||||
wcs_add["wa"] = "2ee4bea3106352";
|
||||
wcs_do();
|
||||
</script>
|
||||
32
application/views/web/life/life_comment.php
Executable file
32
application/views/web/life/life_comment.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
$title = $result['title'];
|
||||
$content = $result['content'];
|
||||
$main_img = $result['main_img'];
|
||||
$channel_main_img = $result['channel_main_img'];
|
||||
$editor_name = $result['editor_name'];
|
||||
$category_name = $result['category_name'];
|
||||
$channel_name = $result['channel_name'];
|
||||
$sub_title = $result['sub_title'];
|
||||
$hit_count = $result['hit_count'];
|
||||
$display_date = $result['display_date'];
|
||||
$partner_img = $result['partner_img'];
|
||||
$channel_idx = $result['channel_idx'];
|
||||
$partner_idx = $result['partner_idx'];
|
||||
$category_idx = $result['category_idx'];
|
||||
|
||||
$content_type = '3';
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<? include_once ('life_header_inc.php');?>
|
||||
<div class="life_contents">
|
||||
<div class="life_list">
|
||||
<h4 class="beachblue">댓글전체보기</h4>
|
||||
</div>
|
||||
<? require_once(APPPATH."views/web/comm/comment_inc.php");?>
|
||||
</div>
|
||||
<? include_once ('life_footer_inc.php');?>
|
||||
|
||||
167
application/views/web/life/life_footer_inc.php
Executable file
167
application/views/web/life/life_footer_inc.php
Executable file
@@ -0,0 +1,167 @@
|
||||
<?
|
||||
$ci=& get_instance();
|
||||
|
||||
# 테마
|
||||
# theme_type = 13 (라이프스타일), theme_type = 14 (지금뜨는 라이프)
|
||||
$ci->load->model('web/m_theme');
|
||||
$req_data = array();
|
||||
$req_data['theme_types'] = array('13', '14');
|
||||
$arr_theme = $ci->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
$arr_life_style = array();
|
||||
$arr_boomup_life = array();
|
||||
$i=1;$z=1;
|
||||
foreach ($arr_theme as $val) {
|
||||
if($val['theme_type'] == 13) {
|
||||
$arr_life_style[$val['rank']] = array('title' => $val['title'], 'sub_title'=> $val['sub_title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
if($i>25) continue;
|
||||
}
|
||||
if($val['theme_type'] == 14) {
|
||||
$arr_boomup_life[$val['rank']] = array('title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
if($i>12) continue;
|
||||
}
|
||||
$z++;
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
# 많이본 TOP5
|
||||
$req_data = array();
|
||||
$req_data['ranking_type'] = '1';
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 5;
|
||||
$ci->load->model('web/m_ranking');
|
||||
$arr_ranking = $ci->m_ranking->ranking_join_life_list($req_data);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div class="life_footer">
|
||||
<div class="wrap">
|
||||
<div class="life_cont1">
|
||||
<h4>크로스맵 스타일</h4>
|
||||
<?
|
||||
$i=1;
|
||||
$life_style_count = count($arr_life_style);
|
||||
foreach ($arr_life_style as $val) {
|
||||
$display_style = 'display:block';
|
||||
$curr_page = '1';
|
||||
if($i > 4) {
|
||||
$display_style = 'display:none;';
|
||||
$curr_page='2';
|
||||
}
|
||||
if($i%4==1) echo '<ul class="life_cont1_box life_style_page'.$curr_page.'" style="'.$display_style.'">';
|
||||
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '55', '..', 'utf-8');
|
||||
|
||||
|
||||
?>
|
||||
<li style="height:181px">
|
||||
|
||||
<div onclick="location.href='/web/life/life_view/<?=$val['content_idx']?>'" class="art-img" style="cursor:pointer;width:175px;height:127px;background: url(<?=$val['theme_img']?>) no-repeat; background-size: cover;"></div>
|
||||
<p class="life_title"><a href="/web/life/life_view/<?=$val['content_idx']?>"><?=$title_txt?></a></p>
|
||||
</li>
|
||||
|
||||
<?
|
||||
if($i%4==0 || $life_style_count == $i) echo '</ul>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="channel_bottom2">
|
||||
<button type="button" class="btn btn-success br20" id="life_style_more_btn" onclick="life_style_more();">더보기 <img src="/img/web/img_down.png" style=padding-top:7px;></button>
|
||||
</div>
|
||||
<div class="life_cont2">
|
||||
<h4>HOT 크로스맵</h4>
|
||||
<?
|
||||
$i=1;
|
||||
$boomup_life_count = count($arr_boomup_life);
|
||||
foreach ($arr_boomup_life as $val) {
|
||||
$display_style = 'display:block';
|
||||
$curr_page = '1';
|
||||
if($i > 2) {
|
||||
$display_style = 'display:none;';
|
||||
$curr_page='2';
|
||||
}
|
||||
if($i%2==1) echo '<ul class="life_cont2_box boomup_life_page'.$curr_page.'" style="height:212px;'.$display_style.'">';
|
||||
|
||||
?>
|
||||
|
||||
<li>
|
||||
<a href="/web/life/life_view/<?=$val['content_idx']?>">
|
||||
<div class="art-img" style="width:360px;height:202px;background: url(<?=$val['theme_img']?>) no-repeat; background-size: cover;"></div>
|
||||
<span class="photo_info"><?=$val['title']?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?
|
||||
if($i%2==0 || $boomup_life_count == $i) echo '</ul>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="channel_bottom2">
|
||||
<button type="button" class="btn btn-success br20" id="boomup_life_more_btn" onclick="boomup_life_more();">더보기 <img src="/img/web/img_down.png" style=padding-top:7px;></button>
|
||||
</div>
|
||||
|
||||
<? if(count($arr_ranking) > 0) {?>
|
||||
<ul class="life_cont3">
|
||||
<a href="/web/life/ranking"><h4>많이 본 <span class="beachblue">TOP 5</span> </h4></a>
|
||||
<? foreach ($arr_ranking as $val) {?>
|
||||
|
||||
<li class="tr_img">
|
||||
<a href="/web/life/life_view/<?=$val['content_idx']?>">
|
||||
<div class="art-img" style="border-radius: 134px;width:134px;height:134px;background: url(<?=$val['main_img']?>) no-repeat; background-size: cover;"></div>
|
||||
<p class="tr_txt"><?=$val['title']?></p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<? }?>
|
||||
<? }?>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="life_banner">
|
||||
<!-- <a href="" target=""><img src="/img/web/banner8.jpg"></a> -->
|
||||
<!-- PC_라이프_뷰_하단
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:770px;height:70px"
|
||||
data-ad-client="ca-pub-7071495522658800"
|
||||
data-ad-slot="4581260537"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
function life_style_more() {
|
||||
$(".life_style_page2").show();
|
||||
$("#life_style_more_btn").hide();
|
||||
}
|
||||
|
||||
function boomup_life_more() {
|
||||
$(".boomup_life_page2").show();
|
||||
$("#boomup_life_more_btn").hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="//wcs.naver.net/wcslog.js"></script>
|
||||
<script type="text/javascript">
|
||||
if(!wcs_add) var wcs_add = {};
|
||||
wcs_add["wa"] = "2ee4bea3106352";
|
||||
wcs_do();
|
||||
</script>
|
||||
199
application/views/web/life/life_header_inc.php
Executable file
199
application/views/web/life/life_header_inc.php
Executable file
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
$method = $this->uri->segment(3);
|
||||
|
||||
$content_type = '3';
|
||||
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
$logo_url = '/';
|
||||
if($method=='editor' || $method=='channel') {
|
||||
$logo_url = '/web/life/channel_recommend';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="channel_header">
|
||||
<div class="wrap_cover">
|
||||
<? if($method=='editor') {?>
|
||||
<div class="cover_image" style="background: url(<?=$editor_main_img?>) no-repeat left top; display: block;background-size: cover;height:310px;background-position: 50% 50%;"></div>
|
||||
<? } else {?>
|
||||
<div class="cover_image" style="background: url(<?=$channel_main_img?>) no-repeat left top; display: block;background-size: cover;height:310px;background-position: 50% 50%;"></div>
|
||||
<? }?>
|
||||
<div class="cover_inner"></div>
|
||||
<div class="cover_top" style="z-index:9995;">
|
||||
<h1 class="channel_logo"><a href="/"><img src="/img/web/logo_channel.png"></a></h1>
|
||||
<? if($method=='channel') {?>
|
||||
<a href="/web/life/channel/<?=$channel_idx?>"><span class="channel_title"><?=$channel_name?></span></a>
|
||||
<? } else {?>
|
||||
<span class="channel_title"><a href="/web/life/editor/<?=$partner_idx?>"><?=$editor_name?></a></span>
|
||||
<? }?>
|
||||
<span class="channel_search"></span>
|
||||
<span class="channel_menu"><a href="javascript:;"><img src="/img/web/search_menu.png" class="side_menu_btn"></a></span>
|
||||
<div class="channel_search" id="life_search1" style="z-index:8887;"><a href="javascript:search_show();"><img src="/img/web/search_channel.png"></a></div>
|
||||
<div class="srch2" id="life_search2" style="z-index:8888;display:none;">
|
||||
<form name="search_form" id="search_form" action="/web/search/" method="get" onsubmit="return submit_check(); return false;">
|
||||
<span>
|
||||
<input type="text" name="search_keyword" id="search_keyword">
|
||||
<a href="javascript:search();"><img src="/img/web/search_channel2.png" alt="검색하기"></a>
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrap_channel">
|
||||
|
||||
<? if($method=='channel') {
|
||||
$channel_delivery_btn = '/img/web/bt_delivery_off_white.png';
|
||||
if($channel_delivery_count > 0) {
|
||||
$channel_delivery_btn = '/img/web/bt_delivery_on_white.png';
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="cover_cell">
|
||||
<div>
|
||||
<p style="margin-bottom:15px;"><span style="background: url('/img/web/bgbg3.png') repeat-x left bottom; padding-bottom:8px;"><a href="/web/life/category/<?=$category_idx?>"><?=$category_name?></a></span></p>
|
||||
<p><img src="/img/web/img_home_c.png"><span class="chdate"><?=number_format($total_count)?> Stories</span></p>
|
||||
</div>
|
||||
<div class="titlewrap">
|
||||
<div class="title_profile" style="border-radius: 39px;width:39px;height:39px;background:url('<?=$channel_icon?>') no-repeat center; background-size:cover;"></div>
|
||||
<span class="chtit"><?=$channel_name?></span>
|
||||
</div>
|
||||
<p class="chtxt"><?=$channel_intro?></p>
|
||||
<p class="delivery_top"><?=number_format($channel_delivery_total_count)?>명에게 배달중</p>
|
||||
</div>
|
||||
|
||||
<? } else if ($method=='editor'){?>
|
||||
|
||||
|
||||
<div class="cover_cell">
|
||||
<div>
|
||||
<p style="margin-bottom:15px;"><span style="background: url('/img/web/bgbg3.png') repeat-x left bottom; padding-bottom:8px;"><a href="/web/life/category/<?=$category_idx?>"><?=$category_name?></a> <img src="/img/web/bg5.gif" style="padding: 2px 5px 0 5px;"> <a href="/web/life/channel/<?=$channel_idx?>"><?=$channel_name?></a></span></p>
|
||||
<p><img src="/img/web/img_home_c.png"><span class="chdate"><?=number_format($total_count)?> Stories</span></p>
|
||||
</div>
|
||||
<h2 class="chtit"><a href="/web/life/editor/<?=$partner_idx?>"><?=$editor_name?></a></h2>
|
||||
<p class="chtxt"><?=$editor_intro?></p>
|
||||
</div>
|
||||
<div class="cover_profile">
|
||||
<div style="margin:auto;border-radius: 88px;width:88px;height:88px;background:url('<?=$partner_img?>') no-repeat center; background-size:cover;"></div>
|
||||
</div>
|
||||
<div class="cover_social">
|
||||
<a href="/web/life/editor/<?=$partner_idx?>"><img src="/img/web/f_icon1.png" alt="" title=""></a>
|
||||
<? if($sns_id1!='') { ?><a href="https://www.facebook.com/<?=$sns_id1?>" target="_blank"><img src="/img/web/f_icon3.png"></a><? }?>
|
||||
<? if($sns_id2!='') { ?><a href="https://instagram.com/<?=$sns_id2?>" target="_blank"><img src="/img/web/f_icon2.png"></a><? }?>
|
||||
<? if($sns_id3!='') { ?><a href="https://band.us/band/<?=$sns_id3?>" target="_blank"><img src="/img/web/f_icon8.png"></a><? }?>
|
||||
<? if($sns_id4!='') { ?><a href="https://story.kakao.com/ch/<?=$sns_id4?>" target="_blank"><img src="/img/web/f_icon6.png"></a><? }?>
|
||||
<? if($sns_id5!='') { ?><a href="https://story.kakao.com/<?=$sns_id5?>" target="_blank"><img src="/img/web/f_icon7.png"></a><? }?>
|
||||
</div>
|
||||
|
||||
|
||||
<? } else {?>
|
||||
<div class="cover_cell">
|
||||
<div>
|
||||
<p style="margin-bottom:15px;"><span style="background: url('/img/web/bgbg3.png') repeat-x left bottom; padding-bottom:8px;"><a href="/web/life/category/<?=$category_idx?>"><?=$category_name?></a> <img src="/img/web/bg5.gif" style="padding: 2px 5px 0 5px;"> <a href="/web/life/channel/<?=$channel_idx?>"><?=$channel_name?></a></span></p>
|
||||
</div>
|
||||
<h2 class="chtit"><?=$title?></h2>
|
||||
<p class="chdate">
|
||||
<? if($sub_title != '') {
|
||||
echo $sub_title.' <span style="padding:0 10px;">|</span>';
|
||||
|
||||
} ?><p class="chdate">조회 <?=number_format($hit_count)?><span style="padding:0 10px;">|</span><?=substr($display_date, 0, 10)?> </p>
|
||||
<p class="cheditor"><a href="/web/life/editor/<?=$partner_idx?>"><?=$editor_name?></a></p>
|
||||
</div>
|
||||
<div class="cover_profile2" onclick="location.href='/web/life/editor/<?=$partner_idx?>'" style="cursor: pointer">
|
||||
<div style="margin:auto;border-radius: 65px;width:65px;height:65px;background:url('<?=$partner_img?>') no-repeat center; background-size:cover;"></div>
|
||||
</div>
|
||||
|
||||
<? }?>
|
||||
|
||||
<? if($method == 'life_view') {?>
|
||||
<div class="cover_star">
|
||||
<a href="javascript:bookmark();"><img src="<?=$bookmark_img?>" id="bookmark_img"></a>
|
||||
</div>
|
||||
<? } else if($method == 'channel') {?>
|
||||
<div class="cover_star">
|
||||
<a href="javascript:channel_delivery();"><img src="<?=$channel_delivery_btn?>" id="channel_delivery_btn"></a>
|
||||
</div>
|
||||
|
||||
<? }?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 레이어 이외의 공간 클릭시 close
|
||||
$(document).mouseup(function (e){
|
||||
var container = $("#life_search2");
|
||||
if( container.has(e.target).length === 0) container.hide();
|
||||
$("#life_search1").show();
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('.side_menu_btn').click(function(e) {
|
||||
var element = $(".channel_header");
|
||||
var doc_width = element.width();
|
||||
|
||||
$("#side_menu_layer").toggle();
|
||||
var popH = $(this).offset().top;
|
||||
$("#side_menu_layer").css('top','0px');
|
||||
$("#side_menu_layer").css('left',doc_width+'px');
|
||||
|
||||
});
|
||||
|
||||
function submit_check() {
|
||||
if(!$("#search_keyword").val()) {
|
||||
alert('검색어를 입력하세요.');
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function search(){
|
||||
$('#search_form').submit();
|
||||
}
|
||||
|
||||
function search_show(){
|
||||
$("#life_search1").hide();
|
||||
$("#life_search2").show();
|
||||
$("#search_keyword").focus();
|
||||
}
|
||||
|
||||
function channel_delivery(){
|
||||
if("<?=$SES_MEMBER_ID?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
var form_data = {
|
||||
"main_idx" : <?=$channel_idx?>,
|
||||
"content_type" : <?=$content_type?>
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/delivery_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
$("#channel_delivery_btn").attr("src","/img/web/bt_delivery_"+rtnJson.data+"_white.png");
|
||||
|
||||
} else {
|
||||
alert("저장에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
36
application/views/web/life/life_list_more.php
Executable file
36
application/views/web/life/life_list_more.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
if(count($list) > 0) {
|
||||
$i = 1;
|
||||
foreach ($list as $val) {
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '90', '..', 'utf-8');
|
||||
|
||||
$channel_article_style = '';
|
||||
if($i == count($list)) {
|
||||
$channel_article_style= 'style="border-bottom:0 !important"';
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="channel_cont" <?=$channel_article_style?>>
|
||||
<div class="channel_photo" onclick="location.href='/web/life/life_view/<?=$val['idx']?>'" style="cursor:pointer;width:234px;height:151px;background:url('<?=$val['main_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
<p class="chtitle2"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$title_txt?></a></p>
|
||||
<p><img src="/img/web/img_heart.gif"><span class="like"><?=number_format($val['like_count'])?></span><span class="chname pdl25" ><a href="/web/life/editor/<?=$val['partner_idx']?>"><?=$val['editor_name']?></a></span></p>
|
||||
</div>
|
||||
|
||||
<?
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo '|||||'.$total_count.'|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||글가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
84
application/views/web/life/life_main_list_more.php
Executable file
84
application/views/web/life/life_main_list_more.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
if(count($list) > 0) {
|
||||
$i = 1;
|
||||
$list1 = array();
|
||||
$list2 = array();
|
||||
$list3 = array();
|
||||
foreach($list as $val) {
|
||||
if($i%3 == 1) $list1[] = array('idx'=> $val['idx'], 'main_img' => $val['main_img'], 'sub_title'=> $val['sub_title'], 'title'=> $val['title'], 'hit_count'=> $val['hit_count'], 'comment_count'=> $val['comment_count']);
|
||||
if($i%3 == 2) $list2[] = array('idx'=> $val['idx'], 'main_img' => $val['main_img'], 'sub_title'=> $val['sub_title'], 'title'=> $val['title'], 'hit_count'=> $val['hit_count'], 'comment_count'=> $val['comment_count']);
|
||||
if($i%3 == 0) $list3[] = array('idx'=> $val['idx'], 'main_img' => $val['main_img'], 'sub_title'=> $val['sub_title'], 'title'=> $val['title'], 'hit_count'=> $val['hit_count'], 'comment_count'=> $val['comment_count']);
|
||||
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list1) > 0) {
|
||||
$i = 1;
|
||||
foreach($list1 as $val) {
|
||||
$style = 'style="display:none;"';
|
||||
|
||||
?>
|
||||
<li class="life_box item1_<?=$page?>" id="item_1_<?=$val['idx']?>" <?=$style?>>
|
||||
<a href="/web/life/life_view/<?=$val['idx']?>"><img src="<?=$val['main_img']?>" width="226"></a>
|
||||
<p class="life_info"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$val['sub_title']?></a></p>
|
||||
<p class="life_title"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$val['title']?></a></p>
|
||||
<p class="life_click"><span>조회 <?=number_format($val['hit_count'])?></span> <span>댓글수 <?=number_format($val['comment_count'])?></span></p>
|
||||
</li>
|
||||
<? $i++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|||||
|
||||
<?
|
||||
if(count($list2) > 0) {
|
||||
$i = 1;
|
||||
foreach($list2 as $val) {
|
||||
$style = 'style="display:none;"';
|
||||
|
||||
|
||||
?>
|
||||
<li class="life_box2 item2_<?=$page?>" id="item_2_<?=$val['idx']?>" <?=$style?>>
|
||||
<a href="/web/life/life_view/<?=$val['idx']?>"><img src="<?=$val['main_img']?>" width="226"></a>
|
||||
<p class="life_info"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$val['sub_title']?></a></p>
|
||||
<p class="life_title"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$val['title']?></a></p>
|
||||
<p class="life_click"><span>조회 <?=number_format($val['hit_count'])?></span> <span>댓글수 <?=number_format($val['comment_count'])?></span></p>
|
||||
</li>
|
||||
<?
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|||||
|
||||
<?
|
||||
if(count($list3) > 0) {
|
||||
$i = 1;
|
||||
foreach($list3 as $val) {
|
||||
$style = 'style="display:none;"';
|
||||
|
||||
?>
|
||||
<li class="life_box3 item3_<?=$page?>" id="item_3_<?=$val['idx']?>" <?=$style?>>
|
||||
<a href="/web/life/life_view/<?=$val['idx']?>"><img src="<?=$val['main_img']?>" width="226"></a>
|
||||
<p class="life_info"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$val['sub_title']?></a></p>
|
||||
<p class="life_title"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$val['title']?></a></p>
|
||||
<p class="life_click"><span>조회 <?=number_format($val['hit_count'])?></span> <span>댓글수 <?=number_format($val['comment_count'])?></span></p>
|
||||
</li>
|
||||
<? }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
echo '|||||'.$total_count.'|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||글가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
91
application/views/web/life/life_right_inc.php
Executable file
91
application/views/web/life/life_right_inc.php
Executable file
@@ -0,0 +1,91 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="list_right">
|
||||
<div class="hotlife">
|
||||
<h4>지금 뜨는 콘텐츠 <span style="float: right;"><a href="javascript:change_boomup_life_page(-1)"><img src="/img/web/img_section_left.jpg"></a><a href="javascript:change_boomup_life_page(1)"><img src="/img/web/img_section_right.jpg"></a></span></h4>
|
||||
<?
|
||||
$i=1;
|
||||
$boomup_life_count = count($arr_boomup_life);
|
||||
$boomup_life_page = $boomup_life_count;
|
||||
foreach ($arr_boomup_life as $key=>$val) {
|
||||
$curr_page = $i;
|
||||
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '38', '..', 'utf-8');
|
||||
$display_style = 'block';
|
||||
if($i > 1) $display_style = 'none';
|
||||
?>
|
||||
|
||||
<div class="i-cover boomup_life_page<?=$curr_page?>" style="display:<?=$display_style?>">
|
||||
<a href="/web/life/life_view/<?=$val['content_idx']?>"><span class="shadow"></span>
|
||||
<div style="width:269px; height:150px; background:url('<?=$val['theme_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
<p class="bar"> <img src="/img/web/bg_bar.gif"></p>
|
||||
<p class="txt"><a href="/web/life/life_view/<?=$val['content_idx']?>"><?=$title_txt?></a> </p>
|
||||
</div>
|
||||
<?
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<? if(count($arr_life_ranking) > 0) {?>
|
||||
<div class="top3">
|
||||
<h4>공감글 TOP3</h4>
|
||||
<? foreach ($arr_life_ranking as $val) {?>
|
||||
<div class="top3_box" onclick="location.href='/web/life/life_view/<?=$val['content_idx']?>'" style="cursor: pointer">
|
||||
<div class="art-img" style="width:108px; height:90px; background:url('<?=$val['main_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
<div class="art-info">
|
||||
<div><a href="/web/life/life_view/<?=$val['content_idx']?>"><?=$val['title']?></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<? }?>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
<div class="banner2 bgb3"><a href="http://www.cplace.co.kr/" target="http://www.cplace.co.kr/"><img src="/img/web/banner_250.jpg"></a>
|
||||
<!-- PC_라이프_우측하단
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:250px;height:250px"
|
||||
data-ad-client="ca-pub-7071495522658800"
|
||||
data-ad-slot="1272145884"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script> -->
|
||||
</div>
|
||||
|
||||
<? if(count($arr_life_style) > 0) {?>
|
||||
<div class="lifestyle">
|
||||
<h4>크로스맵 스타일</h4>
|
||||
<? foreach ($arr_life_style as $val) {?>
|
||||
<div class="top3_box" onclick="location.href='/web/life/life_view/<?=$val['content_idx']?>'" style="cursor: pointer">
|
||||
<div class="art-img" style="width:108px; height:90px; background:url('<?=$val['theme_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
<div class="art-info">
|
||||
<div><a href="/web/life/life_view/<?=$val['content_idx']?>"><?=$val['title']?></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<? }?>
|
||||
<? }?>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var boomup_life_curr_page = 1;
|
||||
function change_boomup_life_page(page){
|
||||
var total_page = "<?=$boomup_life_page?>";
|
||||
var move_page = boomup_life_curr_page + page;
|
||||
if(move_page > 0 && total_page >= move_page) {
|
||||
$(".boomup_life_page"+move_page).show();
|
||||
$(".boomup_life_page"+boomup_life_curr_page).hide();
|
||||
boomup_life_curr_page = move_page;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
158
application/views/web/life/life_view.php
Executable file
158
application/views/web/life/life_view.php
Executable file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
$arr_tag = explode(" ", $result['tag']);
|
||||
$arr_tag = array_filter(array_map('trim', $arr_tag));
|
||||
|
||||
$title = $result['title'];
|
||||
$content = $result['content'];
|
||||
$main_img = $result['main_img'];
|
||||
$channel_main_img = $result['channel_main_img'];
|
||||
$editor_name = $result['editor_name'];
|
||||
$category_name = $result['category_name'];
|
||||
$channel_name = $result['channel_name'];
|
||||
$sub_title = $result['sub_title'];
|
||||
$hit_count = $result['hit_count'];
|
||||
$display_date = $result['display_date'];
|
||||
$partner_img = $result['partner_img'];
|
||||
$channel_idx = $result['channel_idx'];
|
||||
$partner_idx = $result['partner_idx'];
|
||||
$category_idx = $result['category_idx'];
|
||||
$video_url = $result['video_url'];
|
||||
|
||||
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
|
||||
$bookmark_img = '/img/web/star_off.png';
|
||||
if ($bookmark_count > 0) {
|
||||
$bookmark_img = '/img/web/star_on.png';
|
||||
}
|
||||
$content_type = '3';
|
||||
|
||||
?>
|
||||
<? include_once('life_header_inc.php'); ?>
|
||||
|
||||
<div class="life_contents" style="margin-top:70px;">
|
||||
<img src="<?= $main_img ?>" width="0" height="0">
|
||||
<? if ($video_url != '') { ?>
|
||||
<div style="text-align:center; display: block;"><iframe type="text/html" src="<?= $video_url ?>" allowfullscreen="true" style="border: 0px; display: block; margin: 0px; width: 730px; height: 410px;" data-ratio="0.5625" data-width="730" data-height="410"></iframe></div>
|
||||
<? } ?>
|
||||
<div class="view_article">
|
||||
|
||||
<?php echo convertEmoji($content, 'ENCODE') ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="life_tags">
|
||||
<div class="wrap">
|
||||
<div class="cover_profile3">
|
||||
<div onclick="location.href='/web/life/editor/<?= $partner_idx ?>'" style="cursor:pointer;margin:auto;border-radius: 65px;width:65px;height:65px;background:url('<?= $result['partner_img'] ?>') no-repeat center; background-size:cover;"></div>
|
||||
</div>
|
||||
<? if (count($arr_tag) > 0) { ?>
|
||||
<div class="tags">Tags
|
||||
<? foreach ($arr_tag as $key => $val) {
|
||||
if ($key > 0) echo ', ';
|
||||
?>
|
||||
<span class="beachblue"><a href="/web/life/tag/<?= $val ?>"><?= $val ?></a></span>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<? } ?>
|
||||
<div class="panel_btns">
|
||||
<span><a href="javascript:;" class="btn btn-default br15 share_btn" style="padding:5px 30px;"><img src="/img/web/img_upload2.gif"> <span id="share_count"></span></a></span>
|
||||
<span><a href="javascript:like_proc();" class="btn btn-default br15" style="padding:5px 30px;"><img src="/img/web/img_heart.gif"> <span id="like_count"><?= number_format($result['like_count']) ?></span></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="life_contents">
|
||||
<? require_once(APPPATH . "views/web/comm/comment_inc.php"); ?>
|
||||
</div>
|
||||
|
||||
<? include_once('life_footer_inc.php'); ?>
|
||||
|
||||
|
||||
<? require_once(APPPATH . "views/web/comm/share_box_inc.php"); ?>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(".mask").on('click', function(event) {
|
||||
$(event.target).parent().hide();
|
||||
|
||||
});
|
||||
|
||||
|
||||
function bookmark() {
|
||||
if ("<?= $SES_MEMBER_ID ?>" == "") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
location.href = '/web/user/login';
|
||||
return;
|
||||
}
|
||||
var form_data = {
|
||||
"content_idx": "<?= $idx ?>",
|
||||
"content_type": "<?= $content_type ?>"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/bookmark_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function(rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
$("#bookmark_img").attr("src", "/img/web/star_" + rtnJson.data.bookmark_status + ".png");
|
||||
$("#share_box").hide();
|
||||
if (rtnJson.data.bookmark_status == 'off') {
|
||||
alert("북마크함에서 삭제 되었습니다");
|
||||
return false;
|
||||
} else {
|
||||
alert("북마크함에 추가 되었습니다");
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
alert("북마크에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function(rtnJson) {
|
||||
alert('북마크에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function like_proc() {
|
||||
if ("<?= $SES_MEMBER_ID ?>" == "") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
location.href = '/web/user/login';
|
||||
return;
|
||||
}
|
||||
var form_data = {
|
||||
"content_idx": "<?= $idx ?>",
|
||||
"content_type": "<?= $content_type ?>"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/like_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function(rtnJson) {
|
||||
if (rtnJson.result_code == "0000") {
|
||||
var like_count = setComma(rtnJson.result_data.like_count);
|
||||
$("#like_count").html(like_count);
|
||||
|
||||
} else {
|
||||
alert("저장에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function(rtnJson) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
170
application/views/web/life/life_view2.php
Executable file
170
application/views/web/life/life_view2.php
Executable file
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
$arr_tag = explode(" ",$result['tag']);
|
||||
$arr_tag = array_filter(array_map('trim',$arr_tag));
|
||||
|
||||
$title = $result['title'];
|
||||
$content = $result['content'];
|
||||
$main_img = $result['main_img'];
|
||||
$channel_main_img = $result['channel_main_img'];
|
||||
$editor_name = $result['editor_name'];
|
||||
$category_name = $result['category_name'];
|
||||
$channel_name = $result['channel_name'];
|
||||
$sub_title = $result['sub_title'];
|
||||
$hit_count = $result['hit_count'];
|
||||
$display_date = $result['display_date'];
|
||||
$partner_img = $result['partner_img'];
|
||||
$channel_idx = $result['channel_idx'];
|
||||
$partner_idx = $result['partner_idx'];
|
||||
$category_idx = $result['category_idx'];
|
||||
$video_url = $result['video_url'];
|
||||
|
||||
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
|
||||
$bookmark_img = '/img/web/star_off.png';
|
||||
if($bookmark_count > 0) {
|
||||
$bookmark_img = '/img/web/star_on.png';
|
||||
}
|
||||
$content_type = '3';
|
||||
|
||||
|
||||
?>
|
||||
<? include_once ('life_header_inc.php');?>
|
||||
|
||||
<div class="life_contents" style="margin-top:70px;">
|
||||
<img src="<?=$main_img?>" width="0" height="0">
|
||||
<? if($video_url!='') {?>
|
||||
<div style="text-align:center; display: block;"><iframe type="text/html" src="<?=$video_url?>" allowfullscreen="true" style="border: 0px; display: block; margin: 0px; width: 700px; height: 400px;" data-ratio="0.5625" data-width="700" data-height="400"></iframe></div>
|
||||
<? }?>
|
||||
<div class="view_article">
|
||||
|
||||
<?=$content?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="life_tags">
|
||||
<div class="wrap">
|
||||
<div class="cover_profile3">
|
||||
<div onclick="location.href='/web/life/editor/<?=$partner_idx?>'" style="cursor:pointer;margin:auto;border-radius: 65px;width:65px;height:65px;background:url('<?=$result['partner_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
</div>
|
||||
<? if(count($arr_tag)>0) { ?>
|
||||
<div class="tags">Tags
|
||||
<? foreach ($arr_tag as $key=>$val) {
|
||||
if($key>0) echo ', ';
|
||||
?>
|
||||
<span class="beachblue"><a href="/web/life/tag/<?=$val?>"><?=$val?></a></span>
|
||||
<? }?>
|
||||
</div>
|
||||
|
||||
<? }?>
|
||||
<div class="panel_btns">
|
||||
<span><a href="javascript:;" class="btn btn-default br15 share_btn" style="padding:5px 30px;"><img src="/img/web/img_upload2.gif"> <span id="share_count"></span></a></span>
|
||||
<span><a href="javascript:like_proc();" class="btn btn-default br15" style="padding:5px 30px;"><img src="/img/web/img_heart.gif"> <span id="like_count"><?=number_format($result['like_count'])?></span></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="life_contents">
|
||||
<? require_once(APPPATH."views/web/comm/comment_inc.php");?>
|
||||
</div>
|
||||
|
||||
<? include_once ('life_footer_inc.php');?>
|
||||
|
||||
|
||||
<? require_once(APPPATH."views/web/comm/share_box_inc.php"); ?>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$('.share_btn').click(function(e) {
|
||||
$("#share_box").toggle();
|
||||
var popH = $(this).offset().top;
|
||||
$('.popup_share').css('left','50%');
|
||||
$('.popup_share').css('top',popH+'px');
|
||||
|
||||
});
|
||||
|
||||
$(".mask").on('click', function(event){
|
||||
$(event.target).parent().hide();
|
||||
|
||||
});
|
||||
|
||||
|
||||
function bookmark(){
|
||||
if("<?=$SES_MEMBER_ID?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
var form_data = {
|
||||
"content_idx" : "<?=$idx?>",
|
||||
"content_type" : "<?=$content_type?>"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/bookmark_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
$("#bookmark_img").attr("src", "/img/web/star_"+rtnJson.data.bookmark_status+".png");
|
||||
$("#share_box").hide();
|
||||
if(rtnJson.data.bookmark_status == 'off') {
|
||||
alert("북마크함에서 삭제 되었습니다");
|
||||
return false;
|
||||
} else {
|
||||
alert("북마크함에 추가 되었습니다");
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
alert("북마크에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('북마크에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function like_proc(){
|
||||
if("<?=$SES_MEMBER_ID?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
var form_data = {
|
||||
"content_idx" : "<?=$idx?>",
|
||||
"content_type" : "<?=$content_type?>"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/like_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.result_code == "0000") {
|
||||
var like_count = setComma(rtnJson.result_data.like_count);
|
||||
$("#like_count").html(like_count);
|
||||
|
||||
} else {
|
||||
alert("저장에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
170
application/views/web/life/life_view_backup190213.php
Executable file
170
application/views/web/life/life_view_backup190213.php
Executable file
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
$arr_tag = explode(" ",$result['tag']);
|
||||
$arr_tag = array_filter(array_map('trim',$arr_tag));
|
||||
|
||||
$title = $result['title'];
|
||||
$content = $result['content'];
|
||||
$main_img = $result['main_img'];
|
||||
$channel_main_img = $result['channel_main_img'];
|
||||
$editor_name = $result['editor_name'];
|
||||
$category_name = $result['category_name'];
|
||||
$channel_name = $result['channel_name'];
|
||||
$sub_title = $result['sub_title'];
|
||||
$hit_count = $result['hit_count'];
|
||||
$display_date = $result['display_date'];
|
||||
$partner_img = $result['partner_img'];
|
||||
$channel_idx = $result['channel_idx'];
|
||||
$partner_idx = $result['partner_idx'];
|
||||
$category_idx = $result['category_idx'];
|
||||
$video_url = $result['video_url'];
|
||||
|
||||
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
|
||||
$bookmark_img = '/img/web/star_off.png';
|
||||
if($bookmark_count > 0) {
|
||||
$bookmark_img = '/img/web/star_on.png';
|
||||
}
|
||||
$content_type = '3';
|
||||
|
||||
|
||||
?>
|
||||
<? include_once ('life_header_inc.php');?>
|
||||
|
||||
<div class="life_contents" style="margin-top:70px;">
|
||||
<img src="<?=$main_img?>" width="0" height="0">
|
||||
<? if($video_url!='') {?>
|
||||
<div style="text-align:center; display: block;"><iframe type="text/html" src="<?=$video_url?>" allowfullscreen="true" style="border: 0px; display: block; margin: 0px; width: 560px; height: 315px;" data-ratio="0.5625" data-width="560" data-height="315"></iframe></div>
|
||||
<? }?>
|
||||
<div class="view_article">
|
||||
|
||||
<?=$content?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="life_tags">
|
||||
<div class="wrap">
|
||||
<div class="cover_profile3">
|
||||
<div onclick="location.href='/web/life/editor/<?=$partner_idx?>'" style="cursor:pointer;margin:auto;border-radius: 65px;width:65px;height:65px;background:url('<?=$result['partner_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
</div>
|
||||
<? if(count($arr_tag)>0) { ?>
|
||||
<div class="tags">Tags
|
||||
<? foreach ($arr_tag as $key=>$val) {
|
||||
if($key>0) echo ', ';
|
||||
?>
|
||||
<span class="beachblue"><a href="/web/life/tag/<?=$val?>"><?=$val?></a></span>
|
||||
<? }?>
|
||||
</div>
|
||||
|
||||
<? }?>
|
||||
<div class="panel_btns">
|
||||
<span><a href="javascript:;" class="btn btn-default br15 share_btn" style="padding:5px 30px;"><img src="/img/web/img_upload2.gif"> <span id="share_count"></span></a></span>
|
||||
<span><a href="javascript:like_proc();" class="btn btn-default br15" style="padding:5px 30px;"><img src="/img/web/img_heart.gif"> <span id="like_count"><?=number_format($result['like_count'])?></span></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="life_contents">
|
||||
<? require_once(APPPATH."views/web/comm/comment_inc.php");?>
|
||||
</div>
|
||||
|
||||
<? include_once ('life_footer_inc.php');?>
|
||||
|
||||
|
||||
<? require_once(APPPATH."views/web/comm/share_box_inc.php"); ?>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$('.share_btn').click(function(e) {
|
||||
$("#share_box").toggle();
|
||||
var popH = $(this).offset().top;
|
||||
$('.popup_share').css('left','50%');
|
||||
$('.popup_share').css('top',popH+'px');
|
||||
|
||||
});
|
||||
|
||||
$(".mask").on('click', function(event){
|
||||
$(event.target).parent().hide();
|
||||
|
||||
});
|
||||
|
||||
|
||||
function bookmark(){
|
||||
if("<?=$SES_MEMBER_ID?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
var form_data = {
|
||||
"content_idx" : "<?=$idx?>",
|
||||
"content_type" : "<?=$content_type?>"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/bookmark_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
$("#bookmark_img").attr("src", "/img/web/star_"+rtnJson.data.bookmark_status+".png");
|
||||
$("#share_box").hide();
|
||||
if(rtnJson.data.bookmark_status == 'off') {
|
||||
alert("북마크함에서 삭제 되었습니다");
|
||||
return false;
|
||||
} else {
|
||||
alert("북마크함에 추가 되었습니다");
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
alert("북마크에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('북마크에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function like_proc(){
|
||||
if("<?=$SES_MEMBER_ID?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
var form_data = {
|
||||
"content_idx" : "<?=$idx?>",
|
||||
"content_type" : "<?=$content_type?>"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/like_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.result_code == "0000") {
|
||||
var like_count = setComma(rtnJson.result_data.like_count);
|
||||
$("#like_count").html(like_count);
|
||||
|
||||
} else {
|
||||
alert("저장에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
92
application/views/web/life/ranking.php
Executable file
92
application/views/web/life/ranking.php
Executable file
@@ -0,0 +1,92 @@
|
||||
<?
|
||||
$now_date = date("Y.m.d");
|
||||
?>
|
||||
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
<div class="list_left">
|
||||
<div class="news_list">
|
||||
<div class="rankynews">
|
||||
<div class="rankytop">
|
||||
<span class="ranky_tit">인기 라이프</span>
|
||||
<span class="ranky_date"><span class="btn-default_bb" style="margin-right:10px;">오늘</span> <?=$now_date?></span>
|
||||
</div>
|
||||
<ul class="rankylist">
|
||||
<li><a href="/web/life/ranking" <? if($ranking_type=='1') { echo 'class="current"'; }?>>많이본</a></li>
|
||||
<li><a href="/web/life/ranking?ranking_type=2" <? if($ranking_type=='2') { echo 'class="current"'; }?>>댓글많은 </a></li>
|
||||
<li><a href="/web/life/ranking?ranking_type=3" <? if($ranking_type=='3') { echo 'class="current"'; }?>>공감많은</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<?
|
||||
if(count($list) == 0) {
|
||||
echo '<div style="width: 100%; padding-left:40%">등록된 내용이 없습니다.</div>';
|
||||
|
||||
} else {
|
||||
|
||||
foreach ($list as $val) {
|
||||
|
||||
if($ranking_type=='1') {
|
||||
$ranking_view_txt = '조회 '.number_format($val['hit_count']);
|
||||
} else if($ranking_type=='2') {
|
||||
$comment_count = $val['comment_count'];
|
||||
$comment_count_txt = $comment_count;
|
||||
if($comment_count > 9) {
|
||||
$calc_count = str_pad(1, strlen($comment_count), "0", STR_PAD_RIGHT);
|
||||
$comment_count_txt = (floor($comment_count/$calc_count)) * $calc_count;
|
||||
$comment_count_txt = $comment_count_txt.'+';
|
||||
}
|
||||
$ranking_view_txt = '<img src="/img/web/img_comment.png"> '.$comment_count_txt;
|
||||
} else if($ranking_type=='3') {
|
||||
$ranking_view_txt = '<img src="/img/web/img_heart.gif"> '.number_format($val['like_count']);
|
||||
}
|
||||
|
||||
$ranking_css ='art-info';
|
||||
$title_length = '40';
|
||||
$content_length = '250';
|
||||
if($val['rank'] < 3) {
|
||||
$ranking_css ='art-info';
|
||||
$title_length = '40';
|
||||
$content_length = '250';
|
||||
}
|
||||
$title_txt = mb_strimwidth($val['title'], '0', $title_length, '..', 'utf-8');
|
||||
$content = preg_replace("(\<(/?[^\>]+)\>)", "", $val['content']);
|
||||
$content_txt = mb_strimwidth(strip_tags($content), '0', $content_length, '..', 'utf-8');
|
||||
|
||||
|
||||
?>
|
||||
<div class="news_list_cont">
|
||||
<div class="list_no beachblue"><?=$val['rank']?></div>
|
||||
<div class="<?=$ranking_css?>">
|
||||
<h2 class="art-title">
|
||||
<a href="/web/life/life_view/<?=$val['content_idx']?>"><?=$title_txt?></a>
|
||||
<span class="origin"> | <a href="/web/life/editor/<?=$val['partner_idx']?>"><?=$val['editor_name']?></a></span>
|
||||
<span class="comment fr"> <?=$ranking_view_txt?></span>
|
||||
</h2>
|
||||
<p class="art-sum"><a href="/web/life/life_view/<?=$val['content_idx']?>"><?=$content_txt?></a> </p>
|
||||
</div>
|
||||
<div class="art-img"><a href="/web/life/life_view/<?=$val['content_idx']?>"><img src="<?=$val['main_img']?>" width="160"></a></div>
|
||||
|
||||
</div>
|
||||
|
||||
<? }
|
||||
|
||||
}?>
|
||||
|
||||
|
||||
</div>
|
||||
<? if($pagination !='') {?>
|
||||
<div class="pagenumber">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<? include_once ('life_right_inc.php');?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
142
application/views/web/life/tag.php
Executable file
142
application/views/web/life/tag.php
Executable file
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
$tag_delivery_btn = '/img/web/bt_delivery_off_gray.png';
|
||||
if($tag_delivery_count > 0) {
|
||||
$tag_delivery_btn = '/img/web/bt_delivery_on_gray.png';
|
||||
}
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
?>
|
||||
|
||||
<div id="life" class="channel_contents4">
|
||||
<div class="wrap">
|
||||
<div style="text-align:center;">
|
||||
<p class="c_title" >#<?=$tag?> <span style="padding-top:1px;"><a href="javascript:tag_delivery();"><img src="<?=$tag_delivery_btn?>" id="tag_delivery_btn"></a></span></p>
|
||||
<p style="padding-bottom:20px;"><span><?=number_format($total_count)?>개의 글이 있어요</span></p>
|
||||
</div>
|
||||
<div class="channel_top" style="text-align:center;">
|
||||
<? foreach ($arr_relation_tag as $val) {?>
|
||||
<button type="button" class="btn btn-default_bb br20" onclick="location.href='/web/life/tag/<?=$val['tag']?>'" style="padding:10px 40px;"><?=$val['tag']?></button>
|
||||
<? }?>
|
||||
|
||||
</div>
|
||||
<div id="tag_list">
|
||||
<? $i=1;
|
||||
$tag_count = count($list);
|
||||
if($tag_count == 0) echo '<div style="height:100px; text-align:center; padding-top:30px">등록된 태그가 없습니다.</div>';
|
||||
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', '80', '..', 'utf-8');
|
||||
|
||||
|
||||
if($i%3==1) echo '<div class="channel_boxs">';
|
||||
?>
|
||||
|
||||
<div class="channel_con">
|
||||
<div class="art-img" onclick="location.href='/web/life/life_view/<?=$val['idx']?>'" style="cursor:pointer;width:304.58px;height:197.19px;background:url('<?=$val['main_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
<p class="chtitle" style="height:57px"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$title_txt?></a><span class="c_name"><a href="/web/life/editor/<?=$val['partner_idx']?>"><?=$val['editor_name']?></a></span><span class="checkno fr">조회 <?=number_format($val['hit_count'])?> </span></p>
|
||||
</div>
|
||||
|
||||
<?
|
||||
|
||||
if($i%3==0 || $tag_count==$i) echo '</div>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?
|
||||
$more_btn_style = 'style="display:none"';
|
||||
if($tag_count < $total_count) {
|
||||
$more_btn_style = 'style="display:block"';
|
||||
}
|
||||
?>
|
||||
<div class="channel_bottom" <?=$more_btn_style?> id="tag_more_btn">
|
||||
<button type="button" class="btn btn-default br20" onclick="tag_list_more();">더보기 </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var page = 2;
|
||||
function tag_list_more(){
|
||||
var form_data = {
|
||||
"page" : page,
|
||||
"tag" : "<?=$tag?>"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/life/tag_list_more',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'HTML',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml=='') return false;
|
||||
var arrHtml = rtnHtml.split("|||||");
|
||||
if(arrHtml[0].trim()=='0000') {
|
||||
$("#tag_list").append(arrHtml[1]);
|
||||
if (arrHtml[3] == "N") {
|
||||
$("#tag_more_btn").hide();
|
||||
} else {
|
||||
$("#tag_more_btn").show();
|
||||
}
|
||||
page++;
|
||||
|
||||
} else {
|
||||
alert(arrHtml[1]);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('데이터 가져오기에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function tag_delivery(){
|
||||
if("<?=$SES_MEMBER_ID?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
var form_data = {
|
||||
"main_idx" : '<?=$tag?>',
|
||||
"content_type" : '9'
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/delivery_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
$("#tag_delivery_btn").attr("src","/img/web/bt_delivery_"+rtnJson.data+"_gray.png");
|
||||
|
||||
} else {
|
||||
alert("저장에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
39
application/views/web/life/tag_list_more.php
Executable file
39
application/views/web/life/tag_list_more.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
if(count($list) > 0) {
|
||||
$i=1;
|
||||
$tag_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', '80', '..', 'utf-8');
|
||||
|
||||
|
||||
if($i%3==1) echo '<div class="channel_boxs">';
|
||||
?>
|
||||
|
||||
<div class="channel_con">
|
||||
<div class="art-img" onclick="location.href='/web/life/life_view/<?=$val['idx']?>'" style="cursor:pointer;width:304.58px;height:197.19px;background:url('<?=$val['main_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
<p class="chtitle" style="height:57px"><a href="/web/life/life_view/<?=$val['idx']?>"><?=$title_txt?></a><span class="c_name"><a href="/web/life/editor/<?=$val['partner_idx']?>"><?=$val['editor_name']?></a></span><span class="checkno fr">조회 <?=number_format($val['hit_count'])?> </span></p>
|
||||
</div>
|
||||
|
||||
<?
|
||||
|
||||
if($i%3==0 || $tag_count==$i) echo '</div>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo '|||||'.$total_count.'|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||글가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user