first commit
This commit is contained in:
193
application/views/m/news/category.php
Executable file
193
application/views/m/news/category.php
Executable file
@@ -0,0 +1,193 @@
|
||||
<?
|
||||
$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'];
|
||||
}
|
||||
$ci =& get_instance();
|
||||
$ci->load->model('web/m_contents_setting');
|
||||
$arr_news_setting = $ci->m_contents_setting->contents_setting_select(1);
|
||||
|
||||
|
||||
$category_txt = "<a href='/m/news/category/".$category_code1."'>".$category_name1."</a>";
|
||||
if ($category_name2 != '') $category_txt .= ' <img src="/img/mobile/arrow_left.gif" style="vertical-align:baseline"> <a href="/m/news/category/'.$category_code2.'">' . $category_name2."</a>";
|
||||
if ($category_name3 != '') $category_txt .= ' <img src="/img/mobile/arrow_left.gif" style="vertical-align:baseline"> <a href="/m/news/category/'.$category_code3.'">' . $category_name3."</a>";
|
||||
$page_title = "뉴스";
|
||||
$page_title_link = '/m/#news';
|
||||
|
||||
if (@$_GET['page']):
|
||||
|
||||
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', '60', '..', '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" style="margi-top:50px;">
|
||||
<div class="art-img2"><a href="/m/news/news_view/<?= $val['idx'] ?>"><img src="<?= $val['main_img'] ?>"
|
||||
width="160"></a></div>
|
||||
<div class="art-info2">
|
||||
<h2 class="art-title"><a href="/m/news/news_view/<?= $val['idx'] ?>"><?= $title_txt ?></a></h2>
|
||||
<p class="art-info"><?= $display_date_txt ?>
|
||||
|
||||
|
||||
<? if($arr_news_setting['etc_char1']=='Y') {?> |
|
||||
<a target="_blank" href="<?= $val['press_homepage'] ?>"><?= $val['press_name'] ?></a>
|
||||
<?}?>
|
||||
|
||||
<span
|
||||
class="feedback fr"><img src="/img/mobile/img_comments.gif"> <?= $comment_count_txt ?>+</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?endforeach;
|
||||
exit();
|
||||
else :?>
|
||||
<?
|
||||
require_once(APPPATH . "/views/m/common/light_header.php"); ?>
|
||||
<div class="news_cont2" style="padding-top:50px">
|
||||
<div class="news_cate2" style="box-sizing: border-box;">
|
||||
<span class="beachblue" style="padding-right:5px;">기사</span>
|
||||
<span class="category fr" style="font-size:14px;line-height: 22px;">
|
||||
|
||||
<?=$category_txt?>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="news_lists" style="padding-top: 0px; padding-bottom: 25px;">
|
||||
<div class="rankynews">
|
||||
<div class="rankytop" style="margin-bottom:10px; border-bottom: 1px solid #ddd;">
|
||||
<span <? if ($search_sort == '1') {
|
||||
echo 'class="radio_on"';
|
||||
} else {
|
||||
echo 'class="radio_off"';
|
||||
} ?> style="margin-right:10px;width: 60px;float: left;"><a
|
||||
href="/m/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="/m/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', '60', '..', '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="/m/news/news_view/<?= $val['idx'] ?>"><img
|
||||
src="<?= $val['main_img'] ?>" width="160"></a></div>
|
||||
<div class="art-info2">
|
||||
<h2 class="art-title"><a href="/m/news/news_view/<?= $val['idx'] ?>"><?= $title_txt ?></a></h2>
|
||||
<p class="art-info"><?= $display_date_txt ?>
|
||||
<? if($arr_news_setting['etc_char1']=='Y') {?> |
|
||||
<a target="_blank" href="<?= $val['press_homepage'] ?>"><?= $val['press_name'] ?></a>
|
||||
<?}?>
|
||||
<span
|
||||
class="feedback fr"><img src="/img/mobile/img_comments.gif"> <?= $comment_count_txt ?>+</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<? endforeach; ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<p style="text-align:center;">
|
||||
<button type="button" class="btn btn-default br20" style="padding:8px 40px; font-size:16px;" onclick="get_page()" id="add">더보기 <img
|
||||
src="/img/mobile/arr_down.gif" style="vertical-align:middle;"></button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
page = 2;
|
||||
function get_page(){
|
||||
|
||||
|
||||
var add = '<?=
|
||||
isset($_GET['search_sort'])?
|
||||
"&":"?";
|
||||
|
||||
?>';
|
||||
a = window.location.href+add+"page="+page;
|
||||
$.ajax({
|
||||
type :"get",
|
||||
url : a,
|
||||
success : function(data){
|
||||
|
||||
if(data.toString().trim().length > 0){
|
||||
$(".news_lists").append(data);
|
||||
page++;
|
||||
}
|
||||
else{
|
||||
alert("마지막 페이지 입니다.");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<? endif; ?>
|
||||
204
application/views/m/news/column.php
Executable file
204
application/views/m/news/column.php
Executable file
@@ -0,0 +1,204 @@
|
||||
|
||||
<?
|
||||
require_once(APPPATH."views/m/common/navigation.php");
|
||||
?>
|
||||
|
||||
|
||||
<div class="banner_grace">
|
||||
<!-- <a href="#"><img src="/img/mobile/banner_grace.jpg" alt="banner"></a> -->
|
||||
<!-- m크맵 _칼럼 (상단) -->
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:720px;height:74px"
|
||||
data-ad-client="ca-pub-7071495522658800"
|
||||
data-ad-slot="5412203153"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<div class="news_cont2">
|
||||
<div class="grace_top">
|
||||
<h2 class="art-category">
|
||||
<span class="beachblue">전체칼럼</span>
|
||||
<? for($i=0;$i<=3;$i++) {
|
||||
if(isset($arr_columnist[$i])==false) continue;
|
||||
?>
|
||||
<span> <a href="/m/news/columnist/<?=$arr_columnist[$i]['idx']?>"><?=$arr_columnist[$i]['partner_name']?></a></span>
|
||||
<? }?>
|
||||
|
||||
<span class="fr"><a onclick="tg();" style="cursor:pointer;"><img id="down" src="/img/mobile/arrow_down2.png"><img id="up" src="/img/mobile/arrow_up2.png" style="display:none;"></a></span>
|
||||
<script>
|
||||
function tg(){
|
||||
$('.columnist_box').toggle();
|
||||
$("#down").toggle();
|
||||
$("#up").toggle();
|
||||
}
|
||||
</script>
|
||||
</h2>
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<div class="columnist_box news_box" id="columnist_list" style="display:none;">
|
||||
<div>
|
||||
|
||||
<ul class="news_s_box">
|
||||
|
||||
<? // $arr_columnist = array_merge($arr_columnist,$arr_columnist,$arr_columnist,$arr_columnist,$arr_columnist); ?>
|
||||
|
||||
|
||||
<?
|
||||
$columnist_count = count($arr_columnist);
|
||||
$max = 20;
|
||||
$columnist_page = ceil($columnist_count / $max);
|
||||
foreach ($arr_columnist as $i=>$val) {
|
||||
|
||||
$curr_page = ceil(($i+1) / $max);
|
||||
$style_display = 'block';
|
||||
if ($i >0) $style_display = 'none';
|
||||
|
||||
$item_style = "";
|
||||
if($i % $max == 0){
|
||||
|
||||
echo '<ul class="news_s_box columnist_page' . $curr_page . '" style="display:' . $style_display . '">';
|
||||
$item_style = 'style="border-left:0 !important;"';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<li <?= $item_style ?>><a href="/m/news/columnist/<?= $val['idx'] ?>"><?= $val['partner_name'] ?></a></li>
|
||||
|
||||
<?if($i % $max == ($max-1)) : ?>
|
||||
</ul>
|
||||
|
||||
<?endif;?>
|
||||
<?
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="new_box_footer">
|
||||
<span class="c_left" onclick="change_columnist_page(1)" style="cursor:pointer;"><a><img src="/img/web/c_right.gif"></a></span>
|
||||
<span class="c_right" onclick="change_columnist_page(-1)" style="cursor:pointer;"><a><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>
|
||||
|
||||
<!--
|
||||
|
||||
|
||||
-->
|
||||
<h2 class="art-title">
|
||||
<?
|
||||
|
||||
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', '200', '..', 'utf-8');
|
||||
?>
|
||||
|
||||
<a href="/m/news/columnist/<?=$arr_headline_column[1]['partner_idx']?>"><span class="blue">[<?=$arr_headline_column[1]['column_name']?>]</span></a>
|
||||
<a href="/m/news/column_view/<?=$arr_headline_column[1]['content_idx']?>"><?=$arr_headline_column[1]['title']?></a>
|
||||
|
||||
<p class="art-txt"><a href="/m/news/column_view/<?=$arr_headline_column[1]['content_idx']?>"><?=$headline_content?></a></p>
|
||||
|
||||
<? }?>
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
<? foreach($list as $val) {?>
|
||||
<div>
|
||||
<h2 class="art-title">
|
||||
<a href="/m/news/columnist/<?=$val['partner_idx']?>"><span class="blue">[<?=$val['column_name']?>]</span></a>
|
||||
<a href="/m/news/column_view/<?=$val['idx']?>"><?=$val['title']?></a>
|
||||
</h2>
|
||||
|
||||
</div>
|
||||
<?}?>
|
||||
|
||||
</div>
|
||||
<?
|
||||
include_once (APPPATH."/views/m/common/realtime.php");
|
||||
?>
|
||||
<div class="grace_top">
|
||||
<? foreach($list as $val) {?>
|
||||
<div>
|
||||
<h2 class="art-title">
|
||||
<a href="/m/news/columnist/<?=$val['partner_idx']?>"><span class="blue">[<?=$val['column_name']?>]</span></a>
|
||||
<a href="/m/news/column_view/<?=$val['idx']?>"><?=$val['title']?></a>
|
||||
</h2>
|
||||
</div>
|
||||
<?}?>
|
||||
</div>
|
||||
<?
|
||||
include_once (APPPATH."/views/m/common/weather.php");
|
||||
?>
|
||||
|
||||
|
||||
<?
|
||||
include_once (APPPATH."/views/m/news/news_right_inc.php");
|
||||
?>
|
||||
|
||||
|
||||
<div class="banner_grace">
|
||||
<!-- <a href="#"><img src="/img/mobile/banner_grace.jpg" alt="banner"></a> -->
|
||||
<!-- m크맵 _칼럼 (하단) -->
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:720px;height:74px"
|
||||
data-ad-client="ca-pub-7071495522658800"
|
||||
data-ad-slot="5412203153"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
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 = 2;
|
||||
</script>
|
||||
59
application/views/m/news/column_comment.php
Executable file
59
application/views/m/news/column_comment.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?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';
|
||||
|
||||
|
||||
|
||||
?><?
|
||||
$page_title = $column_name;
|
||||
$page_title_link = '#';
|
||||
|
||||
require_once(APPPATH."/views/m/common/light_header.php");?>
|
||||
|
||||
|
||||
|
||||
<div class="article_cont article_cont_fixed">
|
||||
<div class="news_list">
|
||||
<div class="view_header">
|
||||
<div>
|
||||
<a href="/m/news/columnist/<?=$partner_idx?>"><span class="beachblue">[오피니언]</span></a><a href="<?=$page_title_link?>"> <?=$column_name?></a>
|
||||
</div>
|
||||
<h2><span class="blue">[<?=$column_name?>]</span> <?=$title?></h2>
|
||||
<div class="time">
|
||||
<img src="/img/mobile/star.gif" style="vertical-align:sub"> 입력 <?=$display_date?><br>
|
||||
<span style="padding-right:10px;">조회수 <span class="beachblue"><a href=""><?=number_format($hit_count)?></a></span>회</span>
|
||||
<span style="padding-right:10px">댓글 <span class="beachblue"><a href=""><?=number_format($comment_count)?></a></span>개</span>
|
||||
<span style="margin-right:10px;"><a class="btn btn-default share_btn br20" style=" padding:2px 10px;"><img src="/img/mobile/img_upload3.gif"></a></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column_contents">
|
||||
<h4 class="beachblue"> 댓글전체보기</h4>
|
||||
</div>
|
||||
<? require_once(APPPATH."views/m/common/comment_inc.php");?>
|
||||
<!-- <div class="view_main">-->
|
||||
<!---->
|
||||
<!---->
|
||||
<!-- </div>-->
|
||||
<? require_once(APPPATH."views/web/comm/share_box_inc.php"); ?>
|
||||
|
||||
<? include_once ('news_footer_inc.php');?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
23
application/views/m/news/column_list_more.php
Executable file
23
application/views/m/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.'|||||칼럼글 가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
215
application/views/m/news/column_view.php
Executable file
215
application/views/m/news/column_view.php
Executable file
@@ -0,0 +1,215 @@
|
||||
<?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';
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<?
|
||||
$page_title = $column_name;
|
||||
$page_title_link = '/m/news/columnist/'.$partner_idx;
|
||||
require_once(APPPATH."/views/m/common/light_header.php");?>
|
||||
<div class="article_cont article_cont_fixed">
|
||||
<div class="news_list">
|
||||
<div class="view_header">
|
||||
<div>
|
||||
<a href="/m/news/column"><span class="beachblue">[오피니언]</span></a><a href="<?=$page_title_link?>"> <?=$column_name?></a>
|
||||
</div>
|
||||
<h2><span class="blue">[<?=$column_name?>]</span> <?=$title?></h2>
|
||||
<div class="time">
|
||||
<img src="<?=$bookmark_img?>" style="vertical-align:sub;cursor:pointer" onclick="bookmark()" id="bookmark_img"> 입력 <?=$display_date?><br>
|
||||
<span style="padding-right:10px;">조회수 <span class="beachblue"><a href=""><?=number_format($hit_count)?></a></span>회</span>
|
||||
<span style="padding-right:10px">댓글 <span class="beachblue"><a href=""><?=number_format($comment_count)?></a></span>개</span>
|
||||
<span style="margin-right:10px;"><a class="btn btn-default share_btn br20" style=" padding:2px 10px;"><img src="/img/mobile/img_upload3.gif"></a></span>
|
||||
<!-- <span class="fr"><a href="javascript:zoom_out();"><img src="/img/mobile/s_a.gif"></a><a href="javascript:zoom_in();"><img src="/img/mobile/l_a.gif" style="padding-left:5px;"></a></span> -->
|
||||
<span class="fr"><a href="javascript:ts('body', -1);"><img src="/img/mobile/s_a.gif"></a><a href="javascript:ts('body', 1);"><img src="/img/mobile/l_a.gif" style="padding-left:5px;"></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
<div class="view_article">
|
||||
<?=$content?>
|
||||
</div>
|
||||
<? if(count($arr_relation_column) > 0) { ?>
|
||||
<div class="reply"></div>
|
||||
<div class="relatedarticle">
|
||||
<h4 class="beachblue">관련연재</h4>
|
||||
<ul>
|
||||
<? foreach ($arr_relation_column as $val) { ?>
|
||||
<li><a href="/m/news/columnist/<?=$val['partner_idx']?>"><span class="blue">[<?=$val['column_name']?>]</span></a> <a href="/m/news/column_view/<?=$val['relation_article_idx']?>"><?=$val['title']?></a></li>
|
||||
<? }?>
|
||||
</ul>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
<div style="margin:30px 0; text-align:center;">
|
||||
<span style="margin-left:10px;"><a class="btn btn-default share_btn br10" style=" padding:2px 20px;color:#000; font-size:16px;"><img src="/img/mobile/img_upload2.gif" style="vertical-align: middle;"> </a></span>
|
||||
<span style="margin-left:10px;"><a href="javascript:like_proc()" class="btn btn-default br10" style=" padding:2px 20px;color:#000; font-size:16px;" id=""><img src="/img/mobile/img_heart.gif" style="vertical-align: middle;"> <span id="like_count"><?=number_format($result['like_count'])?></span></a></span>
|
||||
</div>
|
||||
|
||||
<div class="banner_grace">
|
||||
<!-- <a href="#"><img src="/img/mobile/banner_grace.jpg" alt="banner"></a> -->
|
||||
<!-- m크맵 _칼럼_뷰 -->
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:720px;height:74px"
|
||||
data-ad-client="ca-pub-7071495522658800"
|
||||
data-ad-slot="5412203153"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<? require_once(APPPATH."views/m/common/comment_inc.php");?>
|
||||
</div>
|
||||
|
||||
<? include_once ('news_footer_inc.php');?>
|
||||
|
||||
<? require_once(APPPATH."views/web/comm/share_box_inc.php"); ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function popup_print() {
|
||||
var pop_url = "/m/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>
|
||||
231
application/views/m/news/columnist.php
Executable file
231
application/views/m/news/columnist.php
Executable file
@@ -0,0 +1,231 @@
|
||||
<?
|
||||
$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');
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?
|
||||
$page_title = $main_column_name;
|
||||
$page_title_link = '/m/news/columnist/'.$main_column_idx;
|
||||
require_once(APPPATH."/views/m/common/light_header.php");?>
|
||||
|
||||
|
||||
<div class="news_cont news_cont_fixed">
|
||||
<?
|
||||
if($total_count == 0) {
|
||||
?>
|
||||
<div style="margin:30px 0px 40px 0px;text-align: center;">
|
||||
등록된 칼럼이 없습니다.
|
||||
</div>
|
||||
<?
|
||||
} else {
|
||||
?>
|
||||
|
||||
|
||||
<div class="cont_top">
|
||||
<div class="cont_top_img">
|
||||
<span class="shadow"></span>
|
||||
<a href="/m/news/column_view/<?=$list[0]['idx']?>"><img src="<?=$list[0]['main_img']?>"></a>
|
||||
</div>
|
||||
<p class="cont_top_title"><a href=""><?=$list[0]['title']?></a></p>
|
||||
<p class="chn_bar"> <img src="/img/mobile/bg_bar.gif"></p>
|
||||
<p class="cont_top_txt">1시간 전</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="rankytop" style="padding:10px 20px 0 20px;border-bottom: 1px solid #eaeaea;">
|
||||
<span <? if($search_sort=='1') { echo 'class="radio_on" '; } else { echo 'class="radio_off"';}?> style="margin-right:10px;width: 60px;float: left;"><a href="/m/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="/m/news/columnist/<?=$main_column_idx?>?search_sort=2">인기순</a></span>
|
||||
<!-- <span class="fr"><a href="" style="vertical-align:middle"><img src="/img/mobile/bt_delivery_on_beachblue.gif"></a></span>-->
|
||||
<span class="fr"><a href="javascript:column_delivery();"><img src="<?=$column_delivery_btn?>" id="column_delivery_btn"></a> </span>
|
||||
</div>
|
||||
<div class="grace_top">
|
||||
|
||||
<?
|
||||
|
||||
foreach ($list as $key=>$val) {
|
||||
if($key == 0) continue;
|
||||
$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 = $val['title'];
|
||||
$content = preg_replace("(\<(/?[^\>]+)\>)", "", $val['content']);
|
||||
$content_txt = mb_strimwidth(strip_tags($content), '0', '250', '..', 'utf-8');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<h2 class="art-title"><a href=""><span class="blue">[<?=$val['column_name']?>]</span></a> <a href="/m/news/column_view/<?=$val['idx']?>"><?=$title_txt?></a></h2>
|
||||
|
||||
|
||||
<? }
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<? include_once (APPPATH.'/views/m/common/weather.php');?>
|
||||
<? include_once ('news_right_inc.php');?>
|
||||
|
||||
<!-- <div class="grace_top" style="margin-bottom:40px; border-bottom:0">-->
|
||||
<!-- <h2 class="art-title"><a href=""><span class="blue">[김영한 칼럼]</span> 英 메이 총리 “불임의 고통, 신앙으로 이길 수 있었다”</a></h2>-->
|
||||
<!-- <h2 class="art-title"><a href=""><span class="blue">[김영한 칼럼]</span> 칭의는 ‘공략’의 대상이 아닙니다</a></h2>-->
|
||||
<!-- <h2 class="art-title"><a href=""><span class="blue">[김영한 칼럼]</span> 강대상 바꿨을 뿐인데... 변화의 목회, 이렇게 어려..</a></h2>-->
|
||||
<!-- <h2 class="art-title"><a href=""><span class="blue">[김영한 칼럼]</span> 칭의는 ‘공략’의 대상이 아닙니다</a></h2>-->
|
||||
<!-- <h2 class="art-title"><a href=""><span class="blue">[김영한 칼럼]</span> 강대상 바꿨을 뿐인데... 변화의 목회, 이렇게 어려..</a></h2>-->
|
||||
<!-- <h2 class="art-title"><a href=""><span class="blue">[김영한 칼럼]</span> 칭의는 ‘공략’의 대상이 아닙니다</a></h2>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<!--
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<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");
|
||||
|
||||
|
||||
// if(rtnJson.data == 'off')
|
||||
// $("#column_delivery_btn").attr("src","/img/mobile/bt_delivery_off_gray.png");
|
||||
// else
|
||||
// $("#column_delivery_btn").attr("src",'/img/mobile/bt_delivery_on_gray.png');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
alert("저장에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
86
application/views/m/news/index.php
Executable file
86
application/views/m/news/index.php
Executable file
@@ -0,0 +1,86 @@
|
||||
<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: 60px;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: 60px;"><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">
|
||||
<div class="art-img2"><a href="/web/m/news_view/<?=$val['idx']?>"><img src="<?=$val['main_img']?>" width="160"></a></div>
|
||||
<div class="art-info2">
|
||||
<h2 class="art-title">
|
||||
<a href="/m/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="/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/m/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>
|
||||
123
application/views/m/news/main.php
Executable file
123
application/views/m/news/main.php
Executable file
@@ -0,0 +1,123 @@
|
||||
<?
|
||||
|
||||
$a = array(
|
||||
"search_type" => "",
|
||||
"search_keyword" => "",
|
||||
"search_theme_type" => "5",
|
||||
"search_category_code" => "",
|
||||
"sort_column" => "a.reg_date",
|
||||
"content_type" => 1,
|
||||
"search_click1" => "",
|
||||
"search_click2" => "",
|
||||
"offset" => 0,
|
||||
"limit" => "30"
|
||||
);
|
||||
$ci->load->model('admin/news/m_theme_news');
|
||||
$result = $ci->m_theme_news->theme_join_news_list($a);
|
||||
|
||||
?>
|
||||
|
||||
<div class="news_cont2">
|
||||
<div class="cont_top">
|
||||
<div class="cont_top_img">
|
||||
<span class="shadow"></span>
|
||||
<a href="/m/news/news_view/<?=$result[0]['content_idx']?>">
|
||||
<img src="<?= $result[0]['main_img'] ?>">
|
||||
</a>
|
||||
</div>
|
||||
<p class="cont_top_title">
|
||||
<a href="/m/news/news_view/<?=$result[0]['content_idx']?>"><?= $result[0]['title'] ?></a>
|
||||
</p>
|
||||
<p class="chn_bar">
|
||||
<img src="/img/mobile/bg_bar.gif">
|
||||
</p>
|
||||
<p class="cont_top_txt"><?
|
||||
$a = time();
|
||||
$b = strtotime($result[0]['reg_date']);
|
||||
echo floor(($a - $b) / 3600);
|
||||
|
||||
?>시간 전</p>
|
||||
</div>
|
||||
<div class="news_lists">
|
||||
<div id="news_box">
|
||||
<?
|
||||
$ci->db->from("news");
|
||||
$ci->db->select("*, `news`.idx as content_idx");
|
||||
$ci->db->join('press', 'press.idx = news.press_idx');
|
||||
$ci->db->where("news.is_del", "N");
|
||||
$ci->db->where("news.is_display", "Y");
|
||||
$ci->db->where("news.is_display", "Y");
|
||||
$ci->db->order_by("news.reg_date","desc");
|
||||
$ci->db->limit(11, 0);
|
||||
$res = $ci->db->get();
|
||||
|
||||
|
||||
$result = $res->result_array();
|
||||
|
||||
// echo $ci->db->last_query();
|
||||
|
||||
|
||||
foreach ($result as $data):
|
||||
?>
|
||||
|
||||
|
||||
<div class="news_list_cont" >
|
||||
<div class="art-img2<?=($data['video_url']) ? " plays_b" : ""; ?>">
|
||||
<a href="/m/news/news_view/<?=$data['content_idx']?>">
|
||||
<img src="<?= thumb($data['main_img']) ?>">
|
||||
</a>
|
||||
</div>
|
||||
<div class="art-info2">
|
||||
<h2 class="art-title">
|
||||
<a href="/m/news/news_view/<?=$data['content_idx']?>"><?= $data['title'] ?></a>
|
||||
</h2>
|
||||
<p class="art-info"><?
|
||||
$a = time();
|
||||
$b = strtotime($data['update_date']);
|
||||
echo floor(($a - $b) / 3600);
|
||||
|
||||
?>시간 전 <? if($arr_news_setting['etc_char1']=='Y') {?> |
|
||||
|
||||
|
||||
<a target="_blank" href="<?= $data['homepage'] ?>"><?= $data['press_name'] ?> </a>
|
||||
<?}?>
|
||||
<span class="feedback fr">
|
||||
<img src="/img/mobile/img_comments.gif"> <?= $data['comment_count'] ?>+</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<? endforeach; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<p style="text-align:center;">
|
||||
<button type="button" class="btn btn-default br20" style="padding:8px 40px; font-size:16px;" onclick="more();">더보기
|
||||
<img src="/img/mobile/arr_down.gif" style="vertical-align:middle;"></button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
var $page = 1;
|
||||
function more(){
|
||||
|
||||
$.ajax({
|
||||
url: "/m/news/ajax_news_more?page=" + $page,
|
||||
complete: function (data) {
|
||||
$("#news_box").append(data.responseText);
|
||||
$page++;
|
||||
setTimeout(function(){
|
||||
swiper1.update();
|
||||
},500);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
79
application/views/m/news/news_comment.php
Executable file
79
application/views/m/news/news_comment.php
Executable file
@@ -0,0 +1,79 @@
|
||||
<?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';
|
||||
|
||||
?>
|
||||
<?
|
||||
$page_title = '뉴스';
|
||||
$page_title_link = '/m/#news';
|
||||
require_once(APPPATH."/views/m/common/light_header.php");?>
|
||||
|
||||
|
||||
<div class="article_cont article_cont_fixed">
|
||||
<div class="news_list">
|
||||
<div class="view_header">
|
||||
<div>
|
||||
<a href=""><span class="logo_company"><img src="<?=$press_logo?>" width="20" height="17" alt="logo"></span><?=$press_name?></a>
|
||||
</div>
|
||||
<h2 style="padding-right: 75px;"><?=$title?>
|
||||
<? 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>
|
||||
<? }?></h2>
|
||||
<div class="time">
|
||||
<span style="padding-right:10px;">조회수 <span class="beachblue"><a><?=number_format($hit_count)?></a></span>회</span>
|
||||
<span style="padding-right:10px">댓글 <span class="beachblue"><a><?=number_format($comment_count)?></a></span>개</span>
|
||||
<span style="margin-right:10px;"><a class="share_btn btn btn-default br20 " style=" padding:2px 10px;"><img src="/img/mobile/img_upload3.gif"> </a></span>
|
||||
<span class="fr"><a href="javascript:zoom_out();"><img src="/img/mobile/s_a.gif"></a><a href="javascript:zoom_in();"><img src="/img/mobile/l_a.gif" style="padding-left:5px;"></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="reply">
|
||||
<p class="reply_title" style="padding-top: 20px;">댓글전체보기</p>
|
||||
</div>
|
||||
<? require_once(APPPATH."views/m/common/comment_inc.php");?>
|
||||
|
||||
</div>
|
||||
|
||||
<? require_once(APPPATH."views/web/comm/share_box_inc.php"); ?>
|
||||
|
||||
<? require_once(APPPATH."views/m/news/news_footer_inc.php");?>
|
||||
|
||||
</div>
|
||||
68
application/views/m/news/news_footer_inc.php
Executable file
68
application/views/m/news/news_footer_inc.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<div class="article_recommend">
|
||||
<div class="beachblue" style="font-size:16px; padding-bottom:10px;">추천기사</div>
|
||||
|
||||
|
||||
<?
|
||||
|
||||
$ci=& get_instance();
|
||||
|
||||
$ci->load->library('comm');
|
||||
$arr_news_comm = $ci->comm->fn_news_footer();
|
||||
$arr_recomm_news = $arr_news_comm['arr_m_recomm_news'];
|
||||
$ci->load->model('web/m_contents_setting');
|
||||
$arr_news_setting = $ci->m_contents_setting->contents_setting_select(1);
|
||||
|
||||
|
||||
for($i=1;$i<=3;$i++) {
|
||||
if(isset($arr_recomm_news[$i])==true) {
|
||||
$reomm_news = $arr_recomm_news[$i];
|
||||
|
||||
|
||||
|
||||
|
||||
$ci->db->from("press");
|
||||
$ci->db->where("press_name", $reomm_news['press_name']);
|
||||
$ci->db->limit(1, 0);
|
||||
$res = $ci->db->get();
|
||||
$result = $res->result_array();
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div class="news_list_cont">
|
||||
|
||||
<div class="art-img2"><a href="/m/news/news_view/<?=$reomm_news['content_idx']?>"><img src="<?=$reomm_news['theme_img']?>"></a></div>
|
||||
<div class="art-info2">
|
||||
<h2 class="art-title"><a href="/m/news/news_view/<?=$reomm_news['content_idx']?>"><?=$reomm_news['title']?></a></h2>
|
||||
<p class="art-info"><?
|
||||
$a = time();
|
||||
$b = strtotime($reomm_news['update_date']);
|
||||
echo floor(($a-$b)/3600);
|
||||
?>시간 전
|
||||
|
||||
<? if($arr_news_setting['etc_char1']=='Y') {?> |
|
||||
|
||||
<a href="<?=$result[0]['homepage']?>" target="_blank"><?=$reomm_news['press_name']?></a></p>
|
||||
<?}?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="banner_grace">
|
||||
<a href="#"><img src="/img/mobile/banner_grace.jpg" alt="banner"></a>
|
||||
<!-- m크맵 _뉴스_뷰
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:720px;height:74px"
|
||||
data-ad-client="ca-pub-7071495522658800"
|
||||
data-ad-slot="5412203153"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div> -->
|
||||
103
application/views/m/news/news_main_content_inc.php
Executable file
103
application/views/m/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="/img/web/p_slide_left.png"></span></a>
|
||||
<a href="javascript:change_today_photo_page(1)"><span class="s_right"><img src="/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?>;<?=$margin?>;cursor: pointer" onclick="location.href='/web/news/news_view/<?=$val['content_idx']?>'">
|
||||
<div style="width:171px; height:118px; background:url('<?=$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>
|
||||
33
application/views/m/news/news_print.php
Executable file
33
application/views/m/news/news_print.php
Executable file
@@ -0,0 +1,33 @@
|
||||
|
||||
<!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();
|
||||
window.close();
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</html>
|
||||
205
application/views/m/news/news_right_inc.php
Executable file
205
application/views/m/news/news_right_inc.php
Executable file
@@ -0,0 +1,205 @@
|
||||
<?
|
||||
$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 = $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'];
|
||||
|
||||
|
||||
|
||||
$main_news_class = 'section';
|
||||
$main_news_style='';
|
||||
if($controller == 'search') {
|
||||
$main_news_class = 'lifepopular';
|
||||
$main_news_style = 'style="margin-top:0"';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<?if($method != 'columnist'):?>
|
||||
<div class="channel_cont">
|
||||
<div class="wrap">
|
||||
<h4 class="beachblue">추천연재</h4>
|
||||
<div class="channel_boxs" style="margin-bottom:0;">
|
||||
<? foreach ($arr_recomm_column as $val) {
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '60', '..', 'utf-8')."<br>";
|
||||
?>
|
||||
<div class="channel_con2">
|
||||
<a href="/m/news/column_view/<?=$val['content_idx']?>"><img src="<?=$val['theme_img']?>" class="art-img"></a>
|
||||
<p class="chtitle"><a href="/m/news/column_view/<?=$val['content_idx']?>"><span class="tit"> <?=$title_txt?> </a> <a href="/m/news/columnist/<?=$val['partner_idx']?>"><?=$val['column_name']?></a></p>
|
||||
</div>
|
||||
<? }?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?endif;?>
|
||||
|
||||
|
||||
|
||||
<div class="life_footer" style="background:#f8f8f8;">
|
||||
<div style="text-align:center; margin:30px 0">
|
||||
<span><a href="javascript:change_popular_media('popular_video');" class="btn btn-default br20 tab-btn popular_video" style="padding:8px 40px; font-size:16px;" id="p_v">영상 </a></span>
|
||||
<span><a href="javascript:change_popular_media('popular_photo');" class="btn btn-default br20 tab-btn popular_photo" style="padding:8px 40px; font-size:16px; margin-left:5px;" id="p_p">포토</a></span>
|
||||
</div>
|
||||
<ul class="life_cont2_box">
|
||||
<span class="s_left"><a href=""><img src="/img/mobile/p_slide_left.png"></a></span>
|
||||
<span class="s_right"><a href=""><img src="/img/mobile/p_slide_right.png"></a></span>
|
||||
<div class="popular responsive" id="popular_photo" style="display:none;">
|
||||
|
||||
<? $i=1;
|
||||
foreach ($arr_p_photo as $val) {
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '38', '..', 'utf-8');
|
||||
switch ($val['content_type']) {
|
||||
case '1': $img_view_url = '/m/news/news_view/'.$val['content_idx']; break;
|
||||
case '2': $img_view_url = '/m/news/column_view/'.$val['content_idx']; break;
|
||||
case '3': $img_view_url = '/m/life/life_view/'.$val['content_idx']; break;
|
||||
}
|
||||
?>
|
||||
<li <?if(0 == $i%2) echo "class=right"?>>
|
||||
<a href="<?=$img_view_url?>"><img src="<?=$val['main_img']?>" class="art-img"></a>
|
||||
<p class="life_title"><a href=""><span class="beachblue">[인기]</span> <?=$title_txt?></a></p>
|
||||
</li>
|
||||
|
||||
|
||||
<? if($i==10) break;
|
||||
$i++;
|
||||
}?>
|
||||
</div>
|
||||
|
||||
<div class="popular responsive" id="popular_video" style="">
|
||||
<? $i=1;
|
||||
foreach ($arr_p_video as $val) {
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '38', '..', 'utf-8');
|
||||
switch ($val['content_type']) {
|
||||
case '1': $img_view_url = '/m/news/news_view/'.$val['content_idx']; break;
|
||||
case '2': $img_view_url = '/m/news/column_view/'.$val['content_idx']; break;
|
||||
case '3': $img_view_url = '/m/life/life_view/'.$val['content_idx']; break;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<li <?if(0 == $i%2) echo "class=right"?>>
|
||||
<a href="<?=$img_view_url?>"><img src="<?=$val['main_img']?>" class="art-img"></a>
|
||||
<p class="life_title">
|
||||
|
||||
<a href="<?=$img_view_url?>">
|
||||
<?if($val['head_title']!=''):?>
|
||||
|
||||
<span class="beachblue">[<?=$val['head_title']?>]</span>
|
||||
<?endif?>
|
||||
<?=$title_txt?></a></p>
|
||||
</li>
|
||||
|
||||
<?
|
||||
if($i==10) break;
|
||||
$i++;
|
||||
}?>
|
||||
</div>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
/**
|
||||
$(document).ready(function() {
|
||||
setInterval("popular_media_interval()", 7000);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function change_popular_media(id){
|
||||
|
||||
|
||||
ids = (id == 'popular_video') ? "p_v":"p_p";
|
||||
ids2 = (id == 'popular_video') ? "p_p":"p_v"
|
||||
$("#popular_photo").hide();
|
||||
$("#popular_video").hide();
|
||||
$("#"+id).show();
|
||||
$("#"+ids).addClass("btn-default_bb");
|
||||
$("#"+ids).removeClass("btn-default");
|
||||
|
||||
$("#"+ids2).removeClass("btn-default_bb");
|
||||
$("#"+ids2).addClass("btn-default");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function popular_media_interval(){
|
||||
$("#popular_photo").toggle();
|
||||
$("#popular_video").toggle();
|
||||
}**/
|
||||
$(document).ready(function() {
|
||||
$(".tab-btn.popular_video").addClass("btn-default_bb");
|
||||
$("#popular_video").show();
|
||||
$('.responsive').slick({
|
||||
dots: false,
|
||||
infinite: true,
|
||||
speed: 300,
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 2,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 480,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 2,
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
$("#popular_video")[0].slick.refresh();
|
||||
$("#popular_video").slick('slickPlay');
|
||||
});
|
||||
|
||||
function change_popular_media(objId){
|
||||
$(".popular").hide();
|
||||
$(".tab-btn").removeClass("btn-default_bb");
|
||||
$(".tab-btn."+objId).addClass("btn-default_bb");
|
||||
$("#"+objId).show();
|
||||
$('#'+objId+'.responsive')[0].slick.refresh();
|
||||
$('#'+objId+'.responsive').slick('slickPlay');
|
||||
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.life_cont2_box li img{width:98%;margin-right:2%}
|
||||
.life_cont2_box li.right img{width:98%;margin-right:0;margin-left:2%}
|
||||
.life_cont2_box .s_left, .life_cont2_box .s_right{display:none}
|
||||
.life_cont2_box {position:relative}
|
||||
.life_cont2_box .life_cont4_box{float:none;margin:0 auto}
|
||||
.life_cont2_box .slick-prev.slick-arrow{cursor:pointer;z-index:99;position:absolute;left:0;top:30%;background:url('/img/mobile/p_slide_left.png') center center no-repeat;width:31px;height:59px;border:none;text-indent:-9999rem;text-decoration:}
|
||||
.life_cont2_box .slick-next.slick-arrow{cursor:pointer;z-index:99;position:absolute;right:0;top:30%;background:url('/img/mobile/p_slide_right.png') center center no-repeat;width:31px;height:59px;border:none;text-indent:-9999rem;}
|
||||
.life_cont2_box .tr_txt{padding-top:1rem}
|
||||
@media screen and (max-width: 640px){
|
||||
.life_cont2_box .slick-prev.slick-arrow{left:0;top:20%;background:url('/img/mobile/p_slide_left.png') center center no-repeat;width:31px;background-size:100% auto }
|
||||
.life_cont2_box .slick-next.slick-arrow{ right:0;top:20%;background:url('/img/mobile/p_slide_right.png') center center no-repeat;width:31px;background-size:100% auto}
|
||||
}
|
||||
@media screen and (max-width: 400px){
|
||||
.life_cont2_box .slick-prev.slick-arrow{top:10%;}
|
||||
.life_cont2_box .slick-next.slick-arrow{top:10%;}
|
||||
}
|
||||
</style>
|
||||
368
application/views/m/news/news_view.php
Executable file
368
application/views/m/news/news_view.php
Executable file
@@ -0,0 +1,368 @@
|
||||
<?php
|
||||
|
||||
//var_dump($result);
|
||||
$press_logo = $result['logo_img'];
|
||||
$press_name = $result['press_name'];
|
||||
$homepage = $result['homepage'];
|
||||
$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);
|
||||
$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'];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?
|
||||
|
||||
|
||||
$page_title = "뉴스";
|
||||
$page_title_link = '/m/#news';
|
||||
require_once(APPPATH."/views/m/common/light_header.php");?>
|
||||
<div class="article_cont article_cont_fixed">
|
||||
<div class="news_list">
|
||||
<div class="view_header">
|
||||
<div class="view_alm">
|
||||
<ul class="tapt">
|
||||
<li><img src="/img/mobile/cloud.gif"></li>
|
||||
<li>비</li>
|
||||
</ul>
|
||||
<p class="tit">영적기상도</p>
|
||||
</div>
|
||||
<div>
|
||||
<a target="_blank" href="<?=$homepage?>"><span class="logo_company"><img src="<?=$press_logo?>" width="30" height="25" alt="logo"></span><?=$press_name?></a>
|
||||
</div>
|
||||
<h2 style="padding-right: 75px;"><?=$title?>
|
||||
<span class="category">
|
||||
<a href="/m/news/category/<?=$category_code1?>"><?=$category_name1?></a>
|
||||
<img src="/img/web/arrow_left.gif">
|
||||
<a href="/m/news/category/<?=$category_code2?>"><?=$category_name2?></a>
|
||||
<? if($category_name3!='') {?> <img src="/img/web/arrow_left.gif">
|
||||
<a href="/m/news/category/<?=$category_code3?>"><?=$category_name3?></a> <?}?>
|
||||
</span>
|
||||
|
||||
|
||||
<!-- --><?// 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>-->
|
||||
<!-- --><?// }?>
|
||||
</h2>
|
||||
<div class="time">
|
||||
<img src="<?=$bookmark_img?>" style="vertical-align:sub;cursor:pointer" onclick="bookmark()" id="bookmark_img"> 입력 <?=$display_date?><br>
|
||||
<span style="padding-right:10px;">조회수 <span class="beachblue"><a><?=number_format($hit_count)?></a></span>회</span>
|
||||
<span style="padding-right:10px">댓글 <span class="beachblue"><a><?=number_format($comment_count)?></a></span>개</span>
|
||||
<span style="margin-right:10px;"><a class="btn btn-default br20 share_btn" style=" padding:2px 10px;"><img src="/img/mobile/img_upload3.gif"> </a></span>
|
||||
<span class="fr">
|
||||
<!-- <a href="javascript:zoom_out();"><img src="/img/mobile/s_a.gif"></a><a href="javascript:zoom_in();"><img src="/img/mobile/l_a.gif" style="padding-left:5px;"></a> -->
|
||||
<a href="javascript:ts('body', -1);"><img src="/img/mobile/s_a.gif"></a><a href="javascript:ts('body', 1);"><img src="/img/mobile/l_a.gif" style="padding-left:5px;"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="view_main">-->
|
||||
<!-- <div class="view_img">-->
|
||||
<!-- <div><img src="/img/mobile/img_photo.jpg"></div>-->
|
||||
<!-- <div class="img_desc">ⓒPexel</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<? if($sub_title!='') { ?>
|
||||
<div class="sub_tit"><?=$sub_title?>
|
||||
</div>
|
||||
<div class="sub_tit_bar"><img src="/img/mobile/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: 100%; height: 240px;" data-ratio="0.5625" data-width="100%" data-height="240" width="100%" height="240"></iframe></div>
|
||||
<? }?>
|
||||
|
||||
|
||||
<div class="view_article">
|
||||
<?=$content?>
|
||||
</div>
|
||||
<div class="writer">
|
||||
<?=$reporter_name?> 기자
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<? if(count($arr_relation_news) > 0) { ?>
|
||||
<div class="relatedarticle">
|
||||
<h4>관련뉴스 </h4>
|
||||
<ul>
|
||||
<? foreach ($arr_relation_news as $val) {?>
|
||||
<li><a href="/m/news/news_view/<?=$val['idx']?>"><?=$val['title']?></a></li>
|
||||
<? }?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
<div class="reaction" >
|
||||
<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>
|
||||
<div style="margin:30px 0; text-align:center;">
|
||||
<span style="margin-left:10px;"><a class="btn btn-default share_btn br10" style=" padding:2px 20px;color:#000; font-size:16px;"><img src="/img/mobile/img_upload2.gif" style="vertical-align: middle;"> </a></span>
|
||||
</div>
|
||||
|
||||
<div class="banner_grace">
|
||||
<!-- <a href="#"><img src="/img/mobile/banner_grace.jpg" alt="banner"></a> -->
|
||||
<!-- m크맵 _뉴스_뷰 -->
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:720px;height:74px"
|
||||
data-ad-client="ca-pub-7071495522658800"
|
||||
data-ad-slot="5412203153"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<? require_once(APPPATH."views/m/common/comment_inc.php");?>
|
||||
|
||||
</div>
|
||||
<? require_once(APPPATH."views/m/news/news_footer_inc.php");?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<? 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");
|
||||
|
||||
<?}?>
|
||||
});
|
||||
|
||||
|
||||
|
||||
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/m/news/ranking.php
Executable file
89
application/views/m/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