first commit

This commit is contained in:
pakerpale
2020-06-10 06:19:03 +09:00
commit cd6b5b7832
6081 changed files with 624389 additions and 0 deletions

View 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>