first commit
This commit is contained in:
94
application/views/web/news/category.php
Executable file
94
application/views/web/news/category.php
Executable file
@@ -0,0 +1,94 @@
|
||||
<?
|
||||
$category_name = $arr_category['category_name'];
|
||||
$category_code1 = $arr_category1['category_code'];
|
||||
$category_name1 = $arr_category1['category_name'];
|
||||
$category_code2 = ''; $category_name2 = '';
|
||||
if(isset($arr_category2['category_code'])==true) {
|
||||
$category_code2 = $arr_category2['category_code'];
|
||||
$category_name2 = $arr_category2['category_name'];
|
||||
}
|
||||
$category_code3 = ''; $category_name3 = '';
|
||||
if(isset($arr_category3['category_code'])==true) {
|
||||
$category_code3 = $arr_category3['category_code'];
|
||||
$category_name3 = $arr_category3['category_name'];
|
||||
}
|
||||
|
||||
|
||||
$category_txt = $category_name1;
|
||||
if($category_name2!='') $category_txt.= ' <img src="/img/web/arrow_left.gif" style="vertical-align:baseline"> '.$category_name2;
|
||||
if($category_name3!='') $category_txt.= ' <img src="/img/web/arrow_left.gif" style="vertical-align:baseline"> '.$category_name3;
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
<div class="list_left">
|
||||
<div class="news_list">
|
||||
<div class="rankynews">
|
||||
<div class="news_cate">
|
||||
<span class="beachblue" style="padding-right:5px;"><?=$category_name?></span>
|
||||
<span class="category fr" style="font-size:14px;line-height: 22px;"><?=$category_txt?></span>
|
||||
</div>
|
||||
<div class="rankytop" style="margin-bottom:10px">
|
||||
<span <? if($search_sort=='1') { echo 'class="radio_on"'; } else { echo 'class="radio_off"';}?> style="margin-right:10px;width: 60px;float: left;"><a href="/web/news/category/<?=$category_code?>?search_sort=1">최신순</a></span>
|
||||
<span <? if($search_sort=='2') { echo 'class="radio_on"'; } else { echo 'class="radio_off"';}?> style="float: left;width: 60px;"><a href="/web/news/category/<?=$category_code?>?search_sort=2">인기순</a></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?
|
||||
foreach ($list as $val) {
|
||||
|
||||
$press_homepage = $val['press_homepage'];
|
||||
$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.'+';
|
||||
}
|
||||
|
||||
$display_date = $val['display_date'];
|
||||
$display_date_txt = substr($display_date, 0, 10);
|
||||
$display_date_txt = str_replace('-', '.', $display_date_txt);
|
||||
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '40', '..', 'utf-8');
|
||||
$content = preg_replace("(\<(/?[^\>]+)\>)", "", $val['content']);
|
||||
$content = strip_tags($content);
|
||||
$content_txt = mb_strimwidth($content, '0', '250', '..', 'utf-8');
|
||||
|
||||
?>
|
||||
|
||||
<div class="news_list_cont">
|
||||
<div class="art-img2"><a href="/web/news/news_view/<?=$val['idx']?>"><img src="<?=$val['main_img']?>" width="160"></a></div>
|
||||
<div class="art-info2">
|
||||
<h2 class="art-title">
|
||||
<a href="/web/news/news_view/<?=$val['idx']?>"><?=$title_txt?></a>
|
||||
<span class="company"><a href="<?=$press_homepage?>" target="_blank"><?=$val['press_name']?></a></span>
|
||||
<span class="comment fr"><img src="/img/web/img_comment.png"> <?=$comment_count_txt?></span></h2>
|
||||
<p class="n_date"><?=$display_date_txt?></p>
|
||||
<p class="art-sum"><a href="/web/news/news_view/<?=$val['idx']?>"><?=$content_txt?></a> </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? }?>
|
||||
</div>
|
||||
|
||||
|
||||
<? if($pagination !='') {?>
|
||||
<div class="pagenumber">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
|
||||
<? include_once ('news_main_content_inc.php');?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<? include_once ('news_right_inc.php');?>
|
||||
</div>
|
||||
</div>
|
||||
264
application/views/web/news/column.php
Executable file
264
application/views/web/news/column.php
Executable file
@@ -0,0 +1,264 @@
|
||||
|
||||
<div class="contents">
|
||||
|
||||
<div class="top_banner"><a href="" target=""><img src="/img/web/banner_970.jpg"></a>
|
||||
<!-- PC_칼럼_상단
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:970px;height:90px"
|
||||
data-ad-client="ca-pub-7071495522658800"
|
||||
data-ad-slot="6896432687"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script> -->
|
||||
</div>
|
||||
|
||||
<div class="wrap">
|
||||
|
||||
<div class="list_left">
|
||||
<div class="column_list"><a href="/web/news/column"><span class="beachblue">전체칼럼</span></a>
|
||||
<? for($i=0;$i<=6;$i++) {
|
||||
if(isset($arr_columnist[$i])==false) continue;
|
||||
?>
|
||||
· <a href="/web/news/columnist/<?=$arr_columnist[$i]['idx']?>"><?=$arr_columnist[$i]['partner_name']?></a>
|
||||
<? }?>
|
||||
<span class="fr"><a href="javascript:columnist_show();"><img src="/img/web/menu.gif"></a></span>
|
||||
</div>
|
||||
<div class="news_list" id="column_headline">
|
||||
<div class="news_list_cont" style="margin-top:0;">
|
||||
<?
|
||||
|
||||
if(count($arr_headline_column)==1){
|
||||
$headline_content = $arr_headline_column[1]['content'];
|
||||
$headline_content = strip_tags($headline_content);
|
||||
$headline_content = mb_strimwidth($headline_content, '0', '500', '..', 'utf-8');
|
||||
?>
|
||||
<div class="art-info3">
|
||||
<p class="column_tit"><a href="/web/news/columnist/<?=$arr_headline_column[1]['partner_idx']?>"><?=$arr_headline_column[1]['column_name']?></a></p>
|
||||
<h2 class="art-title"><a href="/web/news/column_view/<?=$arr_headline_column[1]['content_idx']?>"><?=$arr_headline_column[1]['title']?></a></h2>
|
||||
<p class="art-sum"><a href="/web/news/column_view/<?=$arr_headline_column[1]['content_idx']?>"><?=$headline_content?></a> </p>
|
||||
</div>
|
||||
<? }?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columnist_box" id="columnist_list" style="display:none;">
|
||||
<div>
|
||||
<?
|
||||
$i = 1;
|
||||
$columnist_count = count($arr_columnist);
|
||||
$columnist_page = ceil($columnist_count/35);
|
||||
foreach ($arr_columnist as $val) {
|
||||
|
||||
$curr_page = ceil($i/35);
|
||||
$style_display = 'block';
|
||||
if($i > 35) $style_display='none';
|
||||
|
||||
$item_style = "";
|
||||
if($i%7 == 1) {
|
||||
echo '<ul class="news_s_box columnist_page'.$curr_page.'" style="display:'.$style_display.'">';
|
||||
$item_style = 'style="border-left:0 !important;"';
|
||||
}
|
||||
|
||||
?>
|
||||
<div <?=$item_style?>><a href="/web/news/columnist/<?=$val['idx']?>"><?=$val['partner_name']?></a></div>
|
||||
|
||||
<?
|
||||
if($i%7 == 0) echo '</ul>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
if($columnist_count%7!=0) {
|
||||
for($z=1;$z<=7-($columnist_count%7);$z++){
|
||||
echo '<div style="height:17px"></div>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<ul class="news_s_box"><div style="border-left:0 !important;"></div><div></div><div></div><div></div><div></div><div></div><div></div></ul>
|
||||
</div>
|
||||
<div class="new_box_footer">
|
||||
<span class="c_left"><a href="javascript:change_columnist_page(1)"><img src="/img/web/c_right.gif"></a></span>
|
||||
<span class="c_right"><a href="javascript:change_columnist_page(-1)"><img src="/img/web/c_left.gif"></a></span>
|
||||
<span class="c_slide">
|
||||
<? for($j=1;$j<=$columnist_page;$j++) {
|
||||
$page_img = '/img/web/c_off.gif';
|
||||
if($j==1) $page_img = '/img/web/c_on.gif';
|
||||
?>
|
||||
<a href="javascript:columnist_page('<?=$j?>')"><img src="<?=$page_img?>" id="columnist_page<?=$j?>"></a>
|
||||
<? }?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pray" style="margin-top:0;">
|
||||
<div class="list_box" style="padding-top:0;">
|
||||
<? // foreach($list as $val) {?>
|
||||
<? for($i = 0; $i < 6; $i++) { ?>
|
||||
<div>
|
||||
<a href="/web/news/columnist/<?=$list[$i]['partner_idx']?>"><span class="art_cate2" style="width:15%;">[<?=$list[$i]['column_name']?>]</span></a>
|
||||
<span style="width:70%;"><a href="/web/news/column_view/<?=$list[$i]['idx']?>"><?=$list[$i]['title']?></a></span>
|
||||
</div>
|
||||
<? }?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? require_once(APPPATH."views/web/comm/weather_column_bar_inc.php"); ?>
|
||||
|
||||
<?
|
||||
$recomm_life_count = count($arr_recomm_life);
|
||||
$recomm_life_page = ceil($recomm_life_count/3);
|
||||
if($recomm_life_count > 0) {
|
||||
?>
|
||||
|
||||
<div class="pray">
|
||||
<ul class="pray_box">
|
||||
<? if($recomm_life_count > 3) {?>
|
||||
<a href="javascript:change_recomm_life_page(-1)"><span class="s_left"><img src="/img/web/p_slide_left.png"></span></a>
|
||||
<a href="javascript:change_recomm_life_page(1)"><span class="s_right"><img src="/img/web/p_slide_right.png"></span></a>
|
||||
<? }?>
|
||||
<? $i=1;
|
||||
foreach ($arr_recomm_life as $val) {
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '70', '..', 'utf-8');
|
||||
|
||||
$curr_page = ceil($i/3);
|
||||
$margin = '';$style_display='block';
|
||||
if($i%3==0) $margin='margin-right:0 !important';
|
||||
if($i > 3) $style_display='none';
|
||||
|
||||
?>
|
||||
<li class="recomm_life_page<?=$curr_page?>" style="display:<?=$style_display?>;<?=$margin?>;cursor: pointer" onclick="location.href='/web/life/life_view/<?=$val['content_idx']?>'">
|
||||
<div style="width:230px; height:168px; background:url('<?=$val['theme_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
<span class="photo_info" style="width:210px"><a href="/web/life/life_view/<?=$val['content_idx']?>"><?=$title_txt?></a></span>
|
||||
</li>
|
||||
<? $i++;
|
||||
} ?>
|
||||
|
||||
</ul>
|
||||
<? }?>
|
||||
|
||||
|
||||
|
||||
<div class="list_box" id="column_list">
|
||||
<? //foreach($list as $val) {?>
|
||||
<? for($i = 6; $i < 12; $i++) { ?>
|
||||
<div>
|
||||
<a href="/web/news/columnist/<?=$list[$i]['partner_idx']?>"><span class="art_cate2" style="width:15%;">[<?=$list[$i]['column_name']?>]</span></a>
|
||||
<span style="width:70%;"><a href="/web/news/column_view/<?=$list[$i]['idx']?>"><?=$list[$i]['title']?></a></span>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
</div>
|
||||
|
||||
<? if($total_count > 6) {?>
|
||||
|
||||
<div class="channel_bottom" id="column_more_btn">
|
||||
<button type="button" class="btn btn-default br20" style="width: 90px;" onclick="column_list_more();">더보기 <img src="/img/web/arrow_more.gif" style="vertical-align:middle;"></button>
|
||||
</div>
|
||||
|
||||
<? }?>
|
||||
|
||||
<div style="margin-top:30px;"></div>
|
||||
<div class="banner"><a href="" target=""><img src="/img/web/banner_730.jpg"></a>
|
||||
|
||||
<!-- PC_칼럼_하단
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:730px;height:65px"
|
||||
data-ad-client="ca-pub-7071495522658800"
|
||||
data-ad-slot="1072835336"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<? include_once ('news_right_inc.php');?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var recomm_life_curr_page = 1;
|
||||
function change_recomm_life_page(page){
|
||||
var total_page = "<?=$recomm_life_page?>";
|
||||
var move_page = recomm_life_curr_page + page;
|
||||
if(move_page > 0 && total_page >= move_page) {
|
||||
$(".recomm_life_page"+move_page).show();
|
||||
$(".recomm_life_page"+recomm_life_curr_page).hide();
|
||||
recomm_life_curr_page = move_page;
|
||||
}
|
||||
}
|
||||
|
||||
var columnist_curr_page = 1;
|
||||
function change_columnist_page(page){
|
||||
var total_page = "<?=$columnist_page?>";
|
||||
var move_page = columnist_curr_page + page;
|
||||
if(move_page > 0 && total_page >= move_page) {
|
||||
columnist_page(move_page);
|
||||
}
|
||||
}
|
||||
|
||||
function columnist_page(page){
|
||||
$(".columnist_page"+page).show();
|
||||
$(".columnist_page"+columnist_curr_page).hide();
|
||||
|
||||
$("#columnist_page"+columnist_curr_page).attr("src","/img/web/c_off.gif");
|
||||
$("#columnist_page"+page).attr("src","/img/web/c_on.gif");
|
||||
|
||||
columnist_curr_page = page;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var column_list_page = 3;
|
||||
function column_list_more(){
|
||||
var form_data = {
|
||||
"page" : column_list_page
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/news/column_list_more',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'HTML',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
var arrHtml = rtnHtml.split("|||||");
|
||||
if(arrHtml[0].trim()=='0000') {
|
||||
if (arrHtml[1] != "") {
|
||||
$("#column_list").append(arrHtml[1]);
|
||||
column_list_page++;
|
||||
if (arrHtml[2] == "N") {
|
||||
$("#column_more_btn").hide();
|
||||
} else {
|
||||
$("#rcolumn_more_btn").show();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('데이터 로드에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function columnist_show(){
|
||||
$("#columnist_list").toggle();
|
||||
$("#column_headline").toggle();
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
43
application/views/web/news/column_comment.php
Executable file
43
application/views/web/news/column_comment.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
$column_name = $result['column_name'];
|
||||
$title = $result['title'];
|
||||
$display_date = $result['display_date'];
|
||||
$display_date = str_replace('-', '.', $display_date);
|
||||
$display_date = substr($display_date, 0, 16);
|
||||
$hit_count = $result['hit_count'];
|
||||
$comment_count = $result['comment_count'];
|
||||
$content = $result['content'];
|
||||
$main_img = $result['main_img'];
|
||||
$partner_idx = $result['partner_idx'];
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
|
||||
$content_type = '2';
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
<div class="list_left">
|
||||
<div class="news_list">
|
||||
<div class="view_header">
|
||||
<div><span class="beachblue" style="padding-right:5px;"><a href="/web/news/column">오피니언</a></span><a href="/web/news/columnist/<?=$partner_idx?>"><?=$column_name?></a></div>
|
||||
<h2><?=$title?></h2>
|
||||
<div class="time">입력 <?=$display_date?>
|
||||
<span style="padding-left:10px">조회수 <span class="beachblue"><?=number_format($hit_count)?></span>회</span>
|
||||
<span style="padding-left:10px">댓글 <span class="beachblue"><?=number_format($comment_count)?></span>개</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column_contents">
|
||||
<h4 class="beachblue">댓글전체보기</h4>
|
||||
</div>
|
||||
<? require_once(APPPATH."views/web/comm/comment_inc.php");?>
|
||||
</div>
|
||||
</div>
|
||||
<? include_once ('news_right_inc.php');?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? include_once ('news_footer_inc.php');?>
|
||||
23
application/views/web/news/column_list_more.php
Executable file
23
application/views/web/news/column_list_more.php
Executable file
@@ -0,0 +1,23 @@
|
||||
<?
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
$row_count = count($list);
|
||||
if($row_count > 0) {
|
||||
|
||||
foreach($list as $val) {
|
||||
?>
|
||||
<div>
|
||||
<a href=""><span class="art_cate2" style="width:15%;">[<?=$val['column_name']?>]</span></a>
|
||||
<span style="width:70%;"><a href="/web/news/column_view/<?=$val['idx']?>"><?=$val['title']?></a></span>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
||||
echo '|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||칼럼글 가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
212
application/views/web/news/column_view.php
Executable file
212
application/views/web/news/column_view.php
Executable file
@@ -0,0 +1,212 @@
|
||||
<?php
|
||||
|
||||
$column_name = $result['column_name'];
|
||||
$title = $result['title'];
|
||||
$display_date = $result['display_date'];
|
||||
$display_date = str_replace('-', '.', $display_date);
|
||||
$display_date = substr($display_date, 0, 16);
|
||||
$hit_count = $result['hit_count'];
|
||||
$comment_count = $result['comment_count'];
|
||||
$content = $result['content'];
|
||||
$main_img = $result['main_img'];
|
||||
$partner_idx = $result['partner_idx'];
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$video_url = $result['video_url'];
|
||||
|
||||
$bookmark_img = '/img/web/star4_off.png';
|
||||
if($bookmark_count > 0) {
|
||||
$bookmark_img = '/img/web/star4_on.png';
|
||||
}
|
||||
$content_type = '2';
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
<div class="list_left">
|
||||
<div class="news_list">
|
||||
<img src="<?=$main_img?>" style="width:0px;height:0px;position:absolute; top:0; left:-9999px;">
|
||||
<div id = "print_area">
|
||||
<div class="view_header">
|
||||
<div><span class="beachblue" style="padding-right:5px;"><a href="/web/news/column">오피니언</a></span><a href="/web/news/columnist/<?=$partner_idx?>"><?=$column_name?></a></div>
|
||||
<h2><?=$title?></h2>
|
||||
<div class="time"><a href="javascript:bookmark();"><img src="<?=$bookmark_img?>" style="padding-right:5px;" id="bookmark_img"></a>입력 <?=$display_date?>
|
||||
<span style="padding-left:10px">조회수 <span class="beachblue"><?=number_format($hit_count)?></span>회</span>
|
||||
<span style="padding-left:10px">댓글 <span class="beachblue"><a href=""><?=number_format($comment_count)?></a></span>개</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class='function'>
|
||||
<a href="javascript:send_email_content('<?=$content_type?>', '<?=$idx?>');"><img src="/img/web/icon_email.gif"></a>
|
||||
<a href="javascript:popup_print(document.getElementById('print_area').innerHTML);"><img src="/img/web/icon_print.gif"></a>
|
||||
<a href="javascript:zoom_in();"><img src="/img/web/icon_plus.gif"></a>
|
||||
<a href="javascript:zoom_out();"><img src="/img/web/icon_minus.gif"></a>
|
||||
</div>
|
||||
<div class="view_main">
|
||||
<? 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 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"> </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>
|
||||
|
||||
<? if(count($arr_relation_column) > 0) { ?>
|
||||
<div class="reply"></div>
|
||||
<div class="relatedarticle">
|
||||
<h4>관련연재</h4>
|
||||
<ul>
|
||||
<? foreach ($arr_relation_column as $val) { ?>
|
||||
<li><a href="/web/news/column_view/<?=$val['relation_article_idx']?>"><?=$val['title']?></a></li>
|
||||
<? }?>
|
||||
</ul>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
<? require_once(APPPATH."views/web/comm/comment_inc.php");?>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? include_once ('news_right_inc.php');?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? include_once ('news_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','38%');
|
||||
$('.popup_share').css('top',popH+'px');
|
||||
});
|
||||
|
||||
function popup_print() {
|
||||
var pop_url = "/web/news/news_print";
|
||||
var pop_option = "width=760,height=750,top=0,left=0,noresizable,toolbar=no,status=no,scrollbars=yes,directory=n";
|
||||
window.open(pop_url, "news_print", pop_option);
|
||||
}
|
||||
|
||||
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/star4_"+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;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function send_email_content(content_type, content_idx) {
|
||||
if("<?=$SES_MEMBER_ID?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var form_data = {
|
||||
"content_idx" : content_idx,
|
||||
"content_type" : content_type
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/send_email_content',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
alert("이메일이 발송되었습니다.");
|
||||
return false;
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('이메일 발송에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
135
application/views/web/news/columnist.php
Executable file
135
application/views/web/news/columnist.php
Executable file
@@ -0,0 +1,135 @@
|
||||
<?
|
||||
$main_column_name = $arr_columnist['partner_name'];
|
||||
$main_column_idx = $arr_columnist['idx'];
|
||||
|
||||
$column_delivery_btn = '/img/web/bt_delivery_off_gray.png';
|
||||
if($column_delivery_count > 0) {
|
||||
$column_delivery_btn = '/img/web/bt_delivery_on_gray.png';
|
||||
}
|
||||
|
||||
$content_type ='2';
|
||||
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
<div class="list_left">
|
||||
<div class="news_list">
|
||||
<div class="rankynews">
|
||||
<div class="news_cate">
|
||||
<span class="beachblue" style="padding-right:5px;"><a href="/web/news/column">오피니언</a></span>
|
||||
<span class="text"><a href="/web/news/columnist/<?=$main_column_idx?>"><?=$main_column_name?></a></span>
|
||||
<span class="category" style="float:right">
|
||||
<span style="padding-top:1px;"><a href="javascript:column_delivery();"><img src="<?=$column_delivery_btn?>" id="column_delivery_btn"></a> </span>
|
||||
</div>
|
||||
<div class="rankytop" style="margin-bottom:10px">
|
||||
<span <? if($search_sort=='1') { echo 'class="radio_on" '; } else { echo 'class="radio_off"';}?> style="margin-right:10px;width: 60px;float: left;"><a href="/web/news/columnist/<?=$main_column_idx?>?search_sort=1">최신순</a></span>
|
||||
<span <? if($search_sort=='2') { echo 'class="radio_on" '; } else { echo 'class="radio_off"';}?> style="float: left;width: 60px;"><a href="/web/news/columnist/<?=$main_column_idx?>?search_sort=2">인기순</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?
|
||||
if($total_count == 0) {
|
||||
?>
|
||||
<div style="margin:30px 0px 40px 0px;text-align: center;">
|
||||
등록된 칼럼이 없습니다.
|
||||
</div>
|
||||
<?
|
||||
} else {
|
||||
|
||||
foreach ($list as $val) {
|
||||
|
||||
$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.'+';
|
||||
}
|
||||
|
||||
$display_date = $val['display_date'];
|
||||
$display_date_txt = substr($display_date, 0, 10);
|
||||
$display_date_txt = str_replace('-', '.', $display_date_txt);
|
||||
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '50', '..', 'utf-8');
|
||||
$content = preg_replace("(\<(/?[^\>]+)\>)", "", $val['content']);
|
||||
$content_txt = mb_strimwidth(strip_tags($content), '0', '250', '..', 'utf-8');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="news_list_cont">
|
||||
<div class="art-img2"><a href="/web/news/column_view/<?=$val['idx']?>"><img src="<?=$val['main_img']?>" width="160"></a></div>
|
||||
<div class="art-info2">
|
||||
<h2 class="art-title"><a href="/web/news/column_view/<?=$val['idx']?>"><?=$title_txt?></a><span class="comment fr"><img src="/img/web/img_comment.png"> <?=$comment_count_txt?></span></h2>
|
||||
<p class="art-sum"><a href="/web/news/column_view/<?=$val['idx']?>"><?=$content_txt?></a> </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? }
|
||||
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<? if($pagination !='') {?>
|
||||
<div class="pagenumber">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
|
||||
<? include_once ('news_main_content_inc.php');?>
|
||||
|
||||
</div>
|
||||
|
||||
<? include_once ('news_right_inc.php');?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? include_once ('news_footer_inc.php');?>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function column_delivery(){
|
||||
if("<?=$SES_MEMBER_ID?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
var form_data = {
|
||||
"main_idx" : <?=$main_column_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") {
|
||||
$("#column_delivery_btn").attr("src","/img/web/bt_delivery_"+rtnJson.data+"_gray.png");
|
||||
|
||||
} else {
|
||||
alert("저장에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
102
application/views/web/news/index.php
Executable file
102
application/views/web/news/index.php
Executable file
@@ -0,0 +1,102 @@
|
||||
<link rel="stylesheet" type="text/css" href="/renew/css/news.css" /><!-- added by justin -->
|
||||
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
<div class="list_left">
|
||||
<div class="news_list">
|
||||
<div class="rankynews">
|
||||
<div class="rankytop" style="margin-bottom:10px">
|
||||
<span <? if ($search_sort == '1') {
|
||||
echo 'class="radio_on"';
|
||||
} else {
|
||||
echo 'class="radio_off"';
|
||||
} ?> style="margin-right:10px;width: 61px;float: left;"><a href="/web/news/?search_sort=1">최신순</a></span>
|
||||
<span <? if ($search_sort == '2') {
|
||||
echo 'class="radio_on"';
|
||||
} else {
|
||||
echo 'class="radio_off"';
|
||||
} ?> style="float: left;width: 61px;"><a href="/web/news/?search_sort=2">인기순</a></span>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
|
||||
|
||||
foreach ($list as $val) {
|
||||
|
||||
$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 . '+';
|
||||
}
|
||||
|
||||
$display_date = $val['display_date'];
|
||||
$display_date_txt = substr($display_date, 0, 10);
|
||||
$display_date_txt = str_replace('-', '.', $display_date_txt);
|
||||
|
||||
$title_len = 50;
|
||||
if ($arr_news_setting['etc_char1'] == 'Y') {
|
||||
$title_len = '40';
|
||||
}
|
||||
|
||||
$title_txt = mb_strimwidth($val['title'], '0', $title_len, '..', 'utf-8');
|
||||
$content = preg_replace("(\<(/?[^\>]+)\>)", "", $val['content']);
|
||||
$content = strip_tags($content);
|
||||
$content_txt = mb_strimwidth($content, '0', '250', '..', 'utf-8');
|
||||
|
||||
|
||||
?>
|
||||
<div class="news_list_cont">
|
||||
<?php if (!empty($val['main_img'])) { ?><div class="art-img2"><a href="/web/news/news_view/<?= $val['idx'] ?>"><img src="<?php echo imgSrc($val['main_img']) ?>" width="160"></a></div><?php } ?>
|
||||
<div class="art-info2"<?php if (empty($val['main_img'])) echo ' style="width:100%"'; ?>>
|
||||
<h2 class="art-title">
|
||||
<a href="/web/news/news_view/<?= $val['idx'] ?>"><?= $title_txt ?></a>
|
||||
<? if ($arr_news_setting['etc_char1'] == 'Y') { ?><span class="company"><a href="<?= $val['press_homepage'] ?>" target="_blank"><?= $val['press_name'] ?></a></span><? } ?>
|
||||
<span class="comment fr"><img src="<?php echo imgSrc('/img/web/img_comment.png')?>"> <?= $comment_count_txt ?></span></h2>
|
||||
<p class="n_date"><?= $display_date_txt ?></p>
|
||||
<p class="art-sum"><a href="/web/news/news_view/<?= $val['idx'] ?>"><?= $content_txt ?></a> </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? } ?>
|
||||
</div>
|
||||
<div class="pagenumber">
|
||||
<?= $pagination ?>
|
||||
</div>
|
||||
|
||||
<? include_once('news_main_content_inc.php'); ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<? include_once('news_right_inc.php'); ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var today_photo_curr_page = 1;
|
||||
|
||||
function change_today_photo_page(page) {
|
||||
var total_page = "<?= $today_photo_page ?>";
|
||||
var move_page = today_photo_curr_page + page;
|
||||
if (move_page > 0 && total_page >= move_page) {
|
||||
$(".today_photo_page" + move_page).show();
|
||||
$(".today_photo_page" + today_photo_curr_page).hide();
|
||||
today_photo_curr_page = move_page;
|
||||
}
|
||||
}
|
||||
</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>
|
||||
80
application/views/web/news/news_comment.php
Executable file
80
application/views/web/news/news_comment.php
Executable file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
$press_logo = $result['logo_img'];
|
||||
$press_name = $result['press_name'];
|
||||
$org_url = $result['org_url'];
|
||||
$title = $result['title'];
|
||||
$display_date = $result['display_date'];
|
||||
$display_date = str_replace('-', '.', $display_date);
|
||||
$display_date = substr($display_date, 0, 16);
|
||||
$hit_count = $result['hit_count'];
|
||||
$comment_count = $result['comment_count'];
|
||||
$category_code = $result['category_code'];
|
||||
$category_name1 = $result['category_name1'];
|
||||
$category_name2 = $result['category_name2'];
|
||||
$category_name3 = $result['category_name3'];
|
||||
$category_code1 = substr($category_code, 0, 2);
|
||||
$category_code2 = substr($category_code, 0, 4);
|
||||
$category_code3 = substr($category_code, 0, 6);
|
||||
|
||||
$weather_icon = '';
|
||||
if(count($arr_weather) > 0){
|
||||
$weather_icon = $arr_weather['weather_icon'];
|
||||
$continent = $arr_weather['continent'];
|
||||
$country = $arr_weather['country'];
|
||||
$weather_content = $arr_weather['weather_content'];
|
||||
|
||||
}
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$content_type = '1';
|
||||
|
||||
?>
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
<div class="list_left">
|
||||
<div class="news_list">
|
||||
<div style="border-bottom: 1px solid #ebeef3;padding-bottom: 160px;">
|
||||
<div class="view_header" style="width:610px; float:left; border-bottom:0 !important">
|
||||
<div><a href="<?=$org_url?>" target="_blank"><span class="logo_company"><img src="<?=$press_logo?>" alt="logo" height="17" width="20"></span><?=$press_name?></a></div>
|
||||
<h2><?=$title?></h2>
|
||||
<div class="time">
|
||||
입력 <?=$display_date?>
|
||||
<span style="padding-left:10px">조회수 <span class="beachblue"><?=number_format($hit_count)?></span>회</span>
|
||||
<span style="padding-left:10px">댓글 <span class="beachblue"><?=number_format($comment_count)?></span>개</span>
|
||||
<span class="category">
|
||||
<a href="/web/news/category/<?=$category_code1?>"><?=$category_name1?></a>
|
||||
<img src="/img/web/arrow_left.gif">
|
||||
<a href="/web/news/category/<?=$category_code2?>"><?=$category_name2?></a>
|
||||
<? if($category_name3!='') {?> <img src="/img/web/arrow_left.gif"><a href="/web/news/category/<?=$category_code3?>"><?=$category_name3?></a> <?}?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<? if(count($arr_weather) > 0){?>
|
||||
<div class="spirit_weather">
|
||||
<ul class="w_info">
|
||||
<li><img src="<?=$weather_icon?>" style="width:48px"></li>
|
||||
<li style="color:#fff">
|
||||
<table style="line-height: 22px;width:100%; margin-top: 10px;">
|
||||
<tr>
|
||||
<td style="font-size:18px; padding-top: 15px;"><?=$weather_content?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="w_location"><?=$continent?> <span style="padding:0 5px;"><img src="/img/web/w_bg.gif" style="padding-top:8px;"></span><?=$country?></div>
|
||||
</div>
|
||||
<? }?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="column_contents" style="margin-bottom: -10px">
|
||||
<h4 class="beachblue">댓글전체보기</h4>
|
||||
</div>
|
||||
|
||||
<? require_once(APPPATH."views/web/comm/comment_inc.php");?>
|
||||
|
||||
</div>
|
||||
<? include_once ('news_right_inc.php');?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? include_once ('news_footer_inc.php');?>
|
||||
132
application/views/web/news/news_footer_inc.php
Executable file
132
application/views/web/news/news_footer_inc.php
Executable file
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
|
||||
$ci=& get_instance();
|
||||
|
||||
$ci->load->library('comm');
|
||||
$arr_news_comm = $ci->comm->fn_news_footer();
|
||||
|
||||
$arr_recomm_news = $arr_news_comm['arr_recomm_news'];
|
||||
$arr_realtime_keyword = $arr_news_comm['arr_realtime_keyword'];
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="timenews">
|
||||
<div class="wrap">
|
||||
<div class="t_left">
|
||||
<h4>이 시각 추천뉴스</h4>
|
||||
<div class="photonews">
|
||||
<?
|
||||
for($i=1;$i<=2;$i++) {
|
||||
if(isset($arr_recomm_news[$i])==true) {
|
||||
$reomm_news = $arr_recomm_news[$i];
|
||||
?>
|
||||
<div>
|
||||
<div style="width:230px; height:148px; background:url('<?=$reomm_news['theme_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
<p class="txt"><a href="/web/news/news_view/<?=$reomm_news['content_idx']?>"><?=$reomm_news['title']?></a></p>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="listnews">
|
||||
<?
|
||||
for($i=3;$i<=10;$i++) {
|
||||
if(isset($arr_recomm_news[$i])==true) {
|
||||
$reomm_news = $arr_recomm_news[$i];
|
||||
|
||||
$title_txt = mb_strimwidth($reomm_news['title'], '0', '65', '..', 'utf-8');
|
||||
|
||||
|
||||
?>
|
||||
<p><a href="/web/news/news_view/<?=$reomm_news['content_idx']?>"><?=$title_txt?></a></p>
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="t_right">
|
||||
<div class="issue2">
|
||||
<h4>실시간 급상승<span class="fr" style="margin-top:-3px;"><a href="javascript:change_realtime_keyword_page(-1)"><img src="/img/web/img_section_left.jpg"></a><a href="javascript:change_realtime_keyword_page(1)"><img src="/img/web/img_section_right.jpg"></a></span></h4>
|
||||
<div>
|
||||
<?
|
||||
$i=1;
|
||||
$realtime_keyword_count = count($arr_realtime_keyword);
|
||||
$realtime_keyword_page = ceil($realtime_keyword_count/5);
|
||||
foreach ($arr_realtime_keyword as $key=>$val) {
|
||||
$curr_page = ceil($i/5);
|
||||
|
||||
$last_rank = $val['last_rank'];
|
||||
$rank = $val['rank'];
|
||||
|
||||
$display_style = 'block';
|
||||
if($i > 5) $display_style = 'none';
|
||||
|
||||
$class = '';
|
||||
$last_rank_txt = '';
|
||||
if($last_rank==0){
|
||||
$class = 'new';
|
||||
$last_rank_txt = 'NEW';
|
||||
} else {
|
||||
$calc_rank = $last_rank - $rank;
|
||||
if($calc_rank == 0){ // 같음
|
||||
$last_rank_txt = '-';
|
||||
} else if($calc_rank > 0){ // up
|
||||
$last_rank_txt = '<img src="/img/web/btn_up.jpg">'.$calc_rank;
|
||||
} else {
|
||||
$last_rank_txt = '<img src="/img/web/btn_down.jpg">'.abs($calc_rank);
|
||||
}
|
||||
}
|
||||
|
||||
$keyword_text = mb_strimwidth($val['keyword'], '0', '25', '..', 'utf-8');
|
||||
|
||||
?>
|
||||
<div class="issue_box realtime_keyword_page<?=$curr_page?>" style="display:<?=$display_style?>">
|
||||
<span class="no"><?=$rank?></span>
|
||||
<span><a href="/web/search/?search_keyword=<?=urlencode($val['keyword'])?>"><?=$keyword_text?></a></span>
|
||||
<span class="bbox new updown"><?=$last_rank_txt?></span>
|
||||
</div>
|
||||
<? $i++;
|
||||
}?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="banner3"><a href="https://abluestore.com/product/detail.html?product_no=25&cafe_mkt=google_aw&utm_source=google&utm_medium=display&utm_campaign=curble&gclid=EAIaIQobChMIwNPeo4235wIVDGq9Ch2W_AYbEAEYASAAEgKflPD_BwE" target="_blank"><img src="/img/web/banner3_0204.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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var realtime_keyword_curr_page = 1;
|
||||
function change_realtime_keyword_page(page){
|
||||
var total_page = "<?=$realtime_keyword_page?>";
|
||||
var move_page = realtime_keyword_curr_page + page;
|
||||
if(move_page > 0 && total_page >= move_page) {
|
||||
$(".realtime_keyword_page"+move_page).show();
|
||||
$(".realtime_keyword_page"+realtime_keyword_curr_page).hide();
|
||||
realtime_keyword_curr_page = move_page;
|
||||
}
|
||||
}
|
||||
</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>
|
||||
103
application/views/web/news/news_main_content_inc.php
Executable file
103
application/views/web/news/news_main_content_inc.php
Executable file
@@ -0,0 +1,103 @@
|
||||
<?
|
||||
$ci=& get_instance();
|
||||
|
||||
# 테마
|
||||
$ci->load->model('web/m_theme');
|
||||
$req_data = array();
|
||||
$req_data['theme_types'] = array('4', '14');
|
||||
$arr_theme = $ci->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
$arr_today_photo = array();
|
||||
$i=1;$z=1;
|
||||
foreach ($arr_theme as $val) {
|
||||
if($val['theme_type'] == 4) $arr_today_photo[$val['rank']] = array('rank'=>$val['rank'], 'title' => $val['title'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
|
||||
}
|
||||
|
||||
# 댓글 많은 뉴스 --> 뉴스 랭킹
|
||||
$req_data = array();
|
||||
$req_data['ranking_type'] = '2';
|
||||
$req_data['content_type'] = '1';
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 10;
|
||||
$ci->load->model('web/m_ranking');
|
||||
$arr_news_ranking = $ci->m_ranking->ranking_join_news_list($req_data);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$today_photo_count = count($arr_today_photo);
|
||||
$today_photo_page = ceil($today_photo_count/4);
|
||||
if($today_photo_count > 0) { ?>
|
||||
|
||||
<div class="todayphoto">
|
||||
<h4>오늘의 포토</h4>
|
||||
<ul class="todayphoto_box">
|
||||
<? if($today_photo_count > 4) {?>
|
||||
<a href="javascript:change_today_photo_page(-1)"><span class="s_left"><img src="<?php echo imgSrc('/img/web/p_slide_left.png')?>"></span></a>
|
||||
<a href="javascript:change_today_photo_page(1)"><span class="s_right"><img src="<?php echo imgSrc('/img/web/p_slide_right.png')?>"></span></a>
|
||||
<? }?>
|
||||
<? $i=1;
|
||||
foreach ($arr_today_photo as $val) {
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '40', '..', 'utf-8');
|
||||
|
||||
$curr_page = ceil($i/4);
|
||||
$margin = '';$style_display='block';
|
||||
if($i%4==0) $margin='margin-right:0px;';
|
||||
if($i > 4) $style_display='none';
|
||||
|
||||
?>
|
||||
<li class="today_photo_page<?=$curr_page?>" style="display:<?=$style_display?>;<?php echo $margin?>;cursor: pointer" onclick="location.href='/web/news/news_view/<?=$val['content_idx']?>'">
|
||||
<div style="width:171px; height:118px; background:url('<?php echo imgSrc($val['theme_img'])?>') no-repeat center; background-size:cover;"></div>
|
||||
<p class="card_title"><a href="/web/news/news_view/<?=$val['content_idx']?>"><?=$title_txt?></a></p>
|
||||
</li>
|
||||
|
||||
<? $i++;
|
||||
} ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<? }?>
|
||||
|
||||
<div class="mostreply">
|
||||
<div style="float:left; width:18%">
|
||||
<h4>댓글 많은 뉴스</h4>
|
||||
<span class="viewall" style="text-decoration:none !important"><a href="/web/news/ranking?ranking_type=2">전체보기 ></a></span>
|
||||
</div>
|
||||
|
||||
|
||||
<? $i=1;
|
||||
foreach ($arr_news_ranking as $key=>$val) {
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '30', '..', 'utf-8');
|
||||
|
||||
if($i==1) echo '<div style="float:left; width:40%; padding-right:2%">';
|
||||
if($i==6) echo '<div style="float:left; width:40%;">';
|
||||
|
||||
?>
|
||||
<div class="issue_box">
|
||||
<span class="no"><?=$val['rank']?></span>
|
||||
<span><a href="/web/news/news_view/<?=$val['content_idx']?>"><?=$title_txt?></a></span>
|
||||
</div>
|
||||
|
||||
<?
|
||||
if($i==5 || $i==10 || $i == count($arr_news_ranking)) echo '</div>';
|
||||
$i++;
|
||||
}?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var today_photo_curr_page = 1;
|
||||
function change_today_photo_page(page){
|
||||
var total_page = "<?=$today_photo_page?>";
|
||||
var move_page = today_photo_curr_page + page;
|
||||
if(move_page > 0 && total_page >= move_page) {
|
||||
$(".today_photo_page"+move_page).show();
|
||||
$(".today_photo_page"+today_photo_curr_page).hide();
|
||||
today_photo_curr_page = move_page;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
34
application/views/web/news/news_print.php
Executable file
34
application/views/web/news/news_print.php
Executable file
@@ -0,0 +1,34 @@
|
||||
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/web/common.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="/css/web/news.css?<?=time()?>"/>
|
||||
<link rel="stylesheet" type="text/css" href="/css/web/channel.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="/css/web/life.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="/css/web/search.css"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="printArea"></div>
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
printArea.innerHTML = opener.document.getElementById("print_area").innerHTML;
|
||||
window.print();
|
||||
setTimeout("window.close();", 500);
|
||||
// window.close();
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</html>
|
||||
268
application/views/web/news/news_right_inc.php
Executable file
268
application/views/web/news/news_right_inc.php
Executable file
@@ -0,0 +1,268 @@
|
||||
<?php
|
||||
$method = $this->uri->segment(3);
|
||||
$controller = $this->uri->segment(2);
|
||||
|
||||
$ci=& get_instance();
|
||||
|
||||
$ci->load->library('comm');
|
||||
$arr_news_comm = $ci->comm->fn_news_right();
|
||||
|
||||
$arr_main_news = $arr_news_comm['arr_main_news'];
|
||||
$arr_recomm_column = $arr_news_comm['arr_recomm_column'];
|
||||
$arr_recomm_life = array(); //$arr_news_comm['arr_recomm_life'];
|
||||
$arr_life_ranking = $arr_news_comm['arr_life_ranking'];
|
||||
// $arr_p_photo = $arr_news_comm['arr_p_photo'];
|
||||
// $arr_p_video = $arr_news_comm['arr_p_video'];
|
||||
$arr_realtime_keyword = $arr_news_comm['arr_realtime_keyword'];
|
||||
|
||||
$ci->load->model('life_model');
|
||||
$ci->load->helper('general');
|
||||
$lifeRecommends = $ci->life_model->findByCategoryId(array_flatten($ci->config->item('categories')))
|
||||
->order_by('like_count', 'desc')->limit(3)->get()->result_array();
|
||||
|
||||
foreach ($lifeRecommends as $val) {
|
||||
array_push($arr_recomm_life,
|
||||
array('title' => $val['title'], 'sub_content' => $val['sub_title'],
|
||||
'main_img' => $val['mainImg'], 'content_idx' => $val['idx']));
|
||||
}
|
||||
|
||||
$main_news_class = 'section';
|
||||
$main_news_style='';
|
||||
if($controller == 'search') {
|
||||
$main_news_class = 'lifepopular';
|
||||
$main_news_style = 'style="margin-top:0"';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div class="list_right">
|
||||
<?php if($method == 'column') { echo '<div style="height:20px"></div>'; } ?>
|
||||
<?php if($controller !='search') { ?>
|
||||
<div class="banner2"><a href="https://www.christiantoday.co.kr/" target="_blank"><img src="<?php echo imgSrc('/img/web/banner_0217.jpg')?>"></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="<?php echo $main_news_class?>" <?php echo $main_news_style?>>
|
||||
<h4>주요뉴스</h4>
|
||||
|
||||
<?php
|
||||
$i=1;
|
||||
$main_news_count = count($arr_main_news);
|
||||
$main_news_page = ceil($main_news_count/10);
|
||||
foreach ($arr_main_news as $key=>$val) {
|
||||
|
||||
$curr_page = ceil($i/10);
|
||||
|
||||
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '38', '..', 'utf-8');
|
||||
$display_style = 'block';
|
||||
if($i > 10) $display_style = 'none';
|
||||
?>
|
||||
<div class="section_box main_news_page<?php echo $curr_page?>" style="display:<?php echo $display_style?>">
|
||||
<span class="no"><?php echo $val['rank']?></span>
|
||||
<span><a href="/web/news/news_view/<?php echo $val['content_idx']?>/<?php echo cleanUrl($val['title'])?>"><?php echo $title_txt?></a></span>
|
||||
</div>
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
if($main_news_count > 10) {
|
||||
?>
|
||||
<div class="viewall">
|
||||
<span>
|
||||
<a href="javascript:change_main_news_page(-1)"><img src="<?php echo imgSrc('/img/web/img_section_left.jpg')?>"></a><a href="javascript:change_main_news_page(1)"><img src="<?php echo imgSrc('/img/web/img_section_right.jpg')?>"></a>
|
||||
</span>
|
||||
</div>
|
||||
<?php }?>
|
||||
</div>
|
||||
<?php if($controller !='search') {?>
|
||||
|
||||
|
||||
|
||||
<div class="recommend">
|
||||
<h4>추천연재</h4>
|
||||
<?php foreach ($arr_recomm_column as $val) {
|
||||
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '60', '..', 'utf-8');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div class="recommend_box">
|
||||
<div class="art-info">
|
||||
<a href="/web/news/columnist/<?php echo $val['partner_idx']?>/<?php echo cleanUrl($val['title'])?>"><span class="tit"> <?php echo $val['column_name']?></a></span>
|
||||
<div><a href="/web/news/column_view/<?php echo $val['content_idx']?>/<?php echo cleanUrl($val['title'])?>"><?php echo $title_txt?></a></div>
|
||||
</div>
|
||||
<div class="art-img" onclick="location.href='/web/news/column_view/<?php echo $val['content_idx']?>/<?php echo cleanUrl($val['title'])?>'"
|
||||
style="cursor: pointer;width:62px;width:62px; height:62px; background:url('<?php echo $val['theme_img']?>') no-repeat center; background-size:cover;"></div>
|
||||
</div>
|
||||
|
||||
<?php }?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php }?>
|
||||
|
||||
<?php if($method == 'news_view') {?>
|
||||
|
||||
<div class="banner2"><a
|
||||
href="https://www.yanadoo.co.kr/freepass/neverGiveupNew?&utm_source=criteo_pc&utm_medium=da_criteo&utm_campaign=%EB%A6%AC%ED%83%80%EA%B2%9F%ED%8C%85&utm_content=%EC%B4%88%ED%8A%B9%EA%B0%80"
|
||||
target="_blank"><img src="<?php echo imgSrc('/img/web/banner1_0204.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>
|
||||
|
||||
|
||||
<?php } else {?>
|
||||
<!--<div class="issue">
|
||||
<h4>실시간 급상승</h4>
|
||||
<?php $i=1;
|
||||
foreach ($arr_realtime_keyword as $val) {
|
||||
if($i==1) echo '<div style="float:left; width:48%; padding-right:2%">';
|
||||
if($i==6) echo '<div style="float:left; width:48%; padding-left:2%">';
|
||||
|
||||
$keyword_txt = mb_strimwidth($val['keyword'], '0', '17', '..', 'utf-8');
|
||||
|
||||
?>
|
||||
<div class="issue_box">
|
||||
<span class="no"><?php echo $i?></span>
|
||||
<span><a href="/web/search/?search_keyword=<?php echo urlencode($val['keyword'])?>"><?php echo $keyword_txt?></a></span>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if($i==5 || $i==10 || $i == count($arr_realtime_keyword)) echo '</div>';
|
||||
|
||||
if($i==10) break;
|
||||
|
||||
|
||||
$i++;
|
||||
}?>
|
||||
|
||||
</div>-->
|
||||
<?php }?>
|
||||
<?php $this->load->view('cmtv/news_side_box'); ?>
|
||||
|
||||
<div class="section">
|
||||
<h4>크로스맵 인기글 </h4>
|
||||
|
||||
|
||||
<?php
|
||||
$i=1;
|
||||
$life_ranking_count = count($arr_life_ranking);
|
||||
$life_ranking_page = ceil($life_ranking_count/10);
|
||||
foreach ($arr_life_ranking as $key=>$val) {
|
||||
|
||||
$curr_page = ceil($i/10);
|
||||
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '38', '..', 'utf-8');
|
||||
$display_style = 'block';
|
||||
if($i > 10) $display_style = 'none';
|
||||
?>
|
||||
<div class="section_box life_ranking_page<?php echo $curr_page?>" style="display:<?php echo $display_style?>">
|
||||
<span class="no"><?php echo $val['rank']?></span>
|
||||
<span><a href="/web/life/life_view/<?php echo $val['content_idx']?>/<?php echo cleanUrl($val['title'])?>"><?php echo $title_txt?></a></span>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
if($life_ranking_count > 10) {
|
||||
?>
|
||||
<div class="viewall">
|
||||
<span><a href="javascript:change_life_ranking_page(-1)"><img src="<?php echo imgSrc('/img/web/img_section_left.jpg')?>"></a><a href="javascript:change_life_ranking_page(1)"><img
|
||||
src="<?php echo imgSrc('/img/web/img_section_right.jpg')?>"></a></span>
|
||||
<span style="float:right; font-size:13px;"><a href="/web/life/ranking">전체보기 ></a> </span>
|
||||
</div>
|
||||
|
||||
<?php }?>
|
||||
|
||||
</div>
|
||||
<?php if($controller !='search') {?>
|
||||
<div class="life">
|
||||
<h4>추천 콘텐츠</h4>
|
||||
<?php
|
||||
$i=1;
|
||||
foreach ($arr_recomm_life as $val) {
|
||||
$class = 'i-cover2';
|
||||
$height = '134';
|
||||
$title_len = '15';
|
||||
if($i==1) {
|
||||
$class = 'i-cover';
|
||||
$height = '268';
|
||||
$title_len = '40';
|
||||
}
|
||||
|
||||
$title_txt = mb_strimwidth($val['title'], '0', $title_len, '..', 'utf-8');
|
||||
|
||||
|
||||
?>
|
||||
<div class="<?php echo $class?>" onclick="location.href='/web/life/life_view/<?php echo $val['content_idx']?>'" style="cursor: pointer">
|
||||
<span class="shadow"></span>
|
||||
<div style="width:<?php echo $height?>px; height:163px; background:url('<?php echo imgSrc($val['main_img'])?>') no-repeat center; background-size:cover;"></div>
|
||||
<p class="txt"><?php echo $title_txt?></p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if($i > 2) break;
|
||||
$i++;
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
setInterval("popular_media_interval()", 7000);
|
||||
});
|
||||
|
||||
var main_news_curr_page = 1;
|
||||
|
||||
function change_main_news_page(page) {
|
||||
var total_page = "<?php echo $main_news_page?>";
|
||||
var move_page = main_news_curr_page + page;
|
||||
if (move_page > 0 && total_page >= move_page) {
|
||||
$(".main_news_page" + move_page).show();
|
||||
$(".main_news_page" + main_news_curr_page).hide();
|
||||
main_news_curr_page = move_page;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var life_ranking_curr_page = 1;
|
||||
|
||||
function change_life_ranking_page(page) {
|
||||
var total_page = "<?php echo $life_ranking_page?>";
|
||||
var move_page = life_ranking_curr_page + page;
|
||||
if (move_page > 0 && total_page >= move_page) {
|
||||
$(".life_ranking_page" + move_page).show();
|
||||
$(".life_ranking_page" + life_ranking_curr_page).hide();
|
||||
life_ranking_curr_page = move_page;
|
||||
}
|
||||
}
|
||||
|
||||
function change_popular_media(id) {
|
||||
$("#popular_photo").hide();
|
||||
$("#popular_video").hide();
|
||||
$("#" + id).show();
|
||||
}
|
||||
|
||||
|
||||
function popular_media_interval() {
|
||||
$("#popular_photo").toggle();
|
||||
$("#popular_video").toggle();
|
||||
}
|
||||
</script>
|
||||
349
application/views/web/news/news_view.php
Executable file
349
application/views/web/news/news_view.php
Executable file
@@ -0,0 +1,349 @@
|
||||
<?php
|
||||
$press_logo = $result['logo_img'];
|
||||
$press_name = $result['press_name'];
|
||||
$homepage = $result['homepage'];
|
||||
$title = $result['title'];
|
||||
$display_date = $result['display_date'];
|
||||
$display_date = str_replace('-', '.', $display_date);
|
||||
$display_date = substr($display_date, 0, 16);
|
||||
$hit_count = $result['hit_count'];
|
||||
$comment_count = $result['comment_count'];
|
||||
$category_code = $result['category_code'];
|
||||
$category_name1 = $result['category_name1'];
|
||||
$category_name2 = $result['category_name2'];
|
||||
$category_name3 = $result['category_name3'];
|
||||
$category_code1 = substr($category_code, 0, 2);
|
||||
$category_code2 = substr($category_code, 0, 4);
|
||||
$category_code3 = substr($category_code, 0, 6);
|
||||
$sub_title = $result['sub_title'];
|
||||
$main_img = $result['main_img'];
|
||||
$content = $result['content'];
|
||||
$reporter_name = $result['reporter_name'];
|
||||
|
||||
$review_count1 = $result['review_count1'];
|
||||
$review_count2 = $result['review_count2'];
|
||||
$review_count3 = $result['review_count3'];
|
||||
$review_count4 = $result['review_count4'];
|
||||
$review_count5 = $result['review_count5'];
|
||||
$video_url = $result['video_url'];
|
||||
$weather_icon = '';
|
||||
if(count($arr_weather) > 0){
|
||||
$weather_icon = $arr_weather['weather_icon'];
|
||||
$continent = $arr_weather['continent'];
|
||||
$country = $arr_weather['country'];
|
||||
$weather_content = $arr_weather['weather_content'];
|
||||
|
||||
}
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
$http_host = $_SERVER['HTTP_HOST'];
|
||||
$request_uri = $_SERVER['REQUEST_URI'];
|
||||
$url = 'http://' . $http_host . $request_uri;
|
||||
|
||||
$bookmark_img = '/img/web/star4_off.png';
|
||||
if($bookmark_count > 0) {
|
||||
$bookmark_img = '/img/web/star4_on.png';
|
||||
}
|
||||
$content_type = '1';
|
||||
|
||||
$review_type = '';
|
||||
if(isset($arr_review['review_type'])==true) {
|
||||
$review_type = $arr_review['review_type'];
|
||||
}
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/renew/css/news.css"/><!-- justin -->
|
||||
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
<div class="list_left">
|
||||
<div class="news_list">
|
||||
<img src="<?=$main_img?>" style="width:0px;height:0px;position:absolute; top:0; left:-9999px;">
|
||||
<div id = "print_area">
|
||||
<div style="border-bottom: 1px solid #ebeef3;overflow: hidden;">
|
||||
<!--div class="view_header" style="width:600px; float:left; border-bottom:0 !important"> justin -->
|
||||
<div class="view_header" style="float:left; border-bottom:0 !important">
|
||||
<div><a href="<?=$homepage?>" target="_blank"><span class="logo_company"><img src="<?=$press_logo?>" alt="logo" height="25" ></span><?php //$press_name?></a></div>
|
||||
<h2><?=$title?></h2>
|
||||
<div class="time"><a href="javascript:bookmark();"><img src="<?=$bookmark_img?>" style="padding-right:5px;" id="bookmark_img"></a>입력 <?=$display_date?>
|
||||
<span style="padding-left:10px">조회수 <span class="beachblue"><?=number_format($hit_count)?></span>회</span>
|
||||
<span style="padding-left:10px">댓글 <span class="beachblue"><?=number_format($comment_count)?></span>개</span>
|
||||
<span class="category">
|
||||
<a href="/web/news/category/<?=$category_code1?>"><?=$category_name1?></a>
|
||||
<img src="/img/web/arrow_left.gif">
|
||||
<a href="/web/news/category/<?=$category_code2?>"><?=$category_name2?></a>
|
||||
<? if($category_name3!='') {?> <img src="/img/web/arrow_left.gif">
|
||||
<a href="/web/news/category/<?=$category_code3?>"><?=$category_name3?></a> <?}?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<? if(count($arr_weather) > 0){?>
|
||||
<div class="spirit_weather" style="float: right; margin-top: 5px;">
|
||||
<ul class="w_info">
|
||||
<li><img src="<?=$weather_icon?>" style="width:48px"></li>
|
||||
<li style="color:#fff">
|
||||
|
||||
<table style="line-height: 22px;width:100%; margin-top: 10px;">
|
||||
<tr>
|
||||
<td style="font-size:18px; padding-top: 15px;"><?=$weather_content?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="w_location"><?=$continent?> <span style="padding:0 5px;"><img src="/img/web/w_bg.gif" style="padding-top:8px;"></span><?=$country?></div>
|
||||
</div>
|
||||
<? }?>
|
||||
</div>
|
||||
|
||||
<div class='function'>
|
||||
<a href="javascript:send_email_content('<?=$content_type?>', '<?=$idx?>');"><img src="/img/web/icon_email.gif"></a>
|
||||
<a href="javascript:popup_print();"><img src="/img/web/icon_print.gif"></a>
|
||||
<a href="javascript:ts('print_area', 2);"><img src="/img/web/icon_plus.gif"></a>
|
||||
<a href="javascript:ts('print_area', -2);"><img src="/img/web/icon_minus.gif"></a>
|
||||
</div>
|
||||
<div class="view_main">
|
||||
<div class="sub_tit"><?=$sub_title?></div>
|
||||
<? if($sub_title!='') { ?>
|
||||
<div class="sub_tit_bar"><img src="/img/web/bg_row2.gif"></div>
|
||||
<? }?>
|
||||
<? 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"><?php echo contentImgSrc($content)?></div>
|
||||
<div class="writer">
|
||||
<?=$reporter_name?> 기자
|
||||
<span style="float:right"><img src="/img/web/img_download.gif" class="share_btn" style="cursor: pointer"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? $reaction_style = '';
|
||||
if(count($arr_relation_news) == 0) $reaction_style = 'style="border-bottom:0px !important;"';
|
||||
?>
|
||||
<div class="reaction" <?=$reaction_style?>>
|
||||
<div class="reaction_box">
|
||||
<a href="javascript:review_select(1);"><img src="/img/web/img_reaction1.png"></a>
|
||||
<div class="rb">
|
||||
<p class="like">좋아요</p>
|
||||
<p class="click" id="review1"><?=number_format($review_count1)?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="reaction_box">
|
||||
<a href="javascript:review_select(2);"><img src="/img/web/img_reaction2.png"></a>
|
||||
<div class="rb">
|
||||
<p class="like">훈훈해요</p>
|
||||
<p class="click" id="review2"><?=number_format($review_count2)?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="reaction_box" style="width:19%;">
|
||||
<a href="javascript:review_select(3);"><img src="/img/web/img_reaction3.png"></a>
|
||||
<div class="rb">
|
||||
<p class="like">슬퍼요 </p>
|
||||
<p class="click" id="review3"><?=number_format($review_count3)?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="reaction_box" style="width:19%;">
|
||||
<a href="javascript:review_select(4);"><img src="/img/web/img_reaction4.png"></a>
|
||||
<div class="rb">
|
||||
<p class="like">화나요 </p>
|
||||
<p class="click" id="review4"><?=number_format($review_count4)?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="reaction_box" style="width:22%;">
|
||||
<a href="javascript:review_select(5);"><img src="/img/web/img_reaction5.png"></a>
|
||||
<div class="rb">
|
||||
<p class="like">후속기사 원해요 </p>
|
||||
<p class="click" id="review5"><?=number_format($review_count5)?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? if(count($arr_relation_news) > 0) { ?>
|
||||
<div class="relatedarticle">
|
||||
<h4>관련뉴스 </h4>
|
||||
<ul>
|
||||
<? foreach ($arr_relation_news as $val) {?>
|
||||
<li><a href="/web/news/news_view/<?=$val['idx']?>"><?=$val['title']?></a></li>
|
||||
<? }?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
<!-- 댓글 -->
|
||||
<? require_once(APPPATH."views/web/comm/comment_inc.php");?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- right -->
|
||||
<? include_once ('news_right_inc.php');?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<? // include_once ('news_footer_inc.php');?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<? require_once(APPPATH."views/web/comm/share_box_inc.php"); ?>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
<? if($review_type != '') {?>
|
||||
var review_type = "<?=$review_type?>";
|
||||
$("#review"+review_type).css("font-weight", "bold");
|
||||
|
||||
<?}?>
|
||||
});
|
||||
|
||||
|
||||
// $('.share_btn').click(function(e) {
|
||||
// $("#share_box").toggle();
|
||||
// var popH = $(this).offset().top;
|
||||
// $('.popup_share').css('left','55%');
|
||||
// $('.popup_share').css('top',popH+'px');
|
||||
|
||||
// });
|
||||
|
||||
|
||||
function popup_print() {
|
||||
var pop_url = "/web/news/news_print";
|
||||
var pop_option = "width=760,height=750,top=0,left=0,noresizable,toolbar=no,status=no,scrollbars=yes,directory=n";
|
||||
window.open(pop_url, "news_print", pop_option);
|
||||
}
|
||||
|
||||
function review_select(t) {
|
||||
if("<?=$SES_MEMBER_ID?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
$("#review1").css("font-weight", "normal");
|
||||
$("#review2").css("font-weight", "normal");
|
||||
$("#review3").css("font-weight", "normal");
|
||||
$("#review4").css("font-weight", "normal");
|
||||
$("#review5").css("font-weight", "normal");
|
||||
|
||||
var form_data = {
|
||||
"type" : t,
|
||||
"idx" : "<?=$idx?>"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/review_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.result_code == "0000") {
|
||||
var review_count1 = setComma(rtnJson.result_data.review_count1);
|
||||
var review_count2 = setComma(rtnJson.result_data.review_count2);
|
||||
var review_count3 = setComma(rtnJson.result_data.review_count3);
|
||||
var review_count4 = setComma(rtnJson.result_data.review_count4);
|
||||
var review_count5 = setComma(rtnJson.result_data.review_count5);
|
||||
|
||||
$("#review1").html(review_count1);
|
||||
$("#review2").html(review_count2);
|
||||
$("#review3").html(review_count3);
|
||||
$("#review4").html(review_count4);
|
||||
$("#review5").html(review_count5);
|
||||
|
||||
$("#review"+t).css("font-weight", "bold");
|
||||
|
||||
} else {
|
||||
alert("리뷰등록에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('리뷰등록에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
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/star4_"+rtnJson.data.bookmark_status+".png");
|
||||
$("#share_box").hide();
|
||||
if(rtnJson.data.bookmark_status == 'off') {
|
||||
alert("북마크함에서 삭제 되었습니다");
|
||||
return false;
|
||||
} else {
|
||||
alert("북마크함에 추가 되었습니다");
|
||||
return false;
|
||||
}
|
||||
|
||||
} else {
|
||||
alert("북마크에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('북마크에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function send_email_content(content_type, content_idx) {
|
||||
if("<?=$SES_MEMBER_ID?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var form_data = {
|
||||
"content_idx" : content_idx,
|
||||
"content_type" : content_type
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/send_email_content',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
alert("이메일이 발송되었습니다.");
|
||||
return false;
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('이메일 발송에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
89
application/views/web/news/ranking.php
Executable file
89
application/views/web/news/ranking.php
Executable file
@@ -0,0 +1,89 @@
|
||||
<?
|
||||
$now_date = date("Y.m.d");
|
||||
?>
|
||||
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
<div class="list_left">
|
||||
<div class="news_list">
|
||||
<div class="rankynews" style="margin-top:0 !important;">
|
||||
<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/news/ranking" <? if($ranking_type=='1') { echo 'class="current"'; }?>>많이본</a></li>
|
||||
<li><a href="/web/news/ranking?ranking_type=2" <? if($ranking_type=='2') { echo 'class="current"'; }?>>댓글많은 </a></li>
|
||||
<li><a href="/web/news/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['review_count1']);
|
||||
}
|
||||
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '38', '..', 'utf-8');
|
||||
$content = preg_replace("(\<(/?[^\>]+)\>)", "", $val['content']);
|
||||
$content_txt = mb_strimwidth(strip_tags($content), '0', '250', '..', 'utf-8');
|
||||
|
||||
$display_date = $val['display_date'];
|
||||
$display_date_txt = substr($display_date, 0, 10);
|
||||
$display_date_txt = str_replace('-', '.', $display_date_txt);
|
||||
|
||||
$press_homepage = $val['press_homepage'];
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="news_list_cont">
|
||||
<div class="list_no beachblue"><?=$val['rank']?></div>
|
||||
<div class="art-info">
|
||||
<h2 class="art-title">
|
||||
<a href="/web/news/news_view/<?=$val['content_idx']?>"><?=$title_txt?></a>
|
||||
<? if($arr_news_setting['etc_char1']=='Y') {?><span class="company"><a href="<?=$press_homepage?>" target="_blank"><?=$val['press_name']?></a></span><?}?>
|
||||
<span class="comment fr"> <?=$ranking_view_txt?></span>
|
||||
</h2>
|
||||
<p class="n_date"><?=$display_date_txt?></p>
|
||||
<p class="art-sum"><a href="/web/news/news_view/<?=$val['content_idx']?>"><?=$content_txt?></a> </p>
|
||||
</div>
|
||||
<div class="art-img"><a href="/web/news/news_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 ('news_right_inc.php');?>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user