first commit
This commit is contained in:
9
application/views/web/comm/blind_view_alert.php
Executable file
9
application/views/web/comm/blind_view_alert.php
Executable file
@@ -0,0 +1,9 @@
|
||||
<?
|
||||
$def_arr_blind_limit_type = array('경고메일발송', '댓글작성불가', '게시물열람불가', '불량회원등록', '회원영구탈퇴');
|
||||
|
||||
?>
|
||||
<script>
|
||||
alert("블라인드 누적으로 인해 기능이 제한 되었습니다.\r\n제제내용 : <?=$def_arr_blind_limit_type[$arr_blind['limit_type']]?>\n제제기간 : <?=$arr_blind['end_date']?> 까지");
|
||||
location.href="<?=$url?>";
|
||||
|
||||
</script>
|
||||
806
application/views/web/comm/comment_inc.php
Executable file
806
application/views/web/comm/comment_inc.php
Executable file
@@ -0,0 +1,806 @@
|
||||
<?
|
||||
$ci=& get_instance();
|
||||
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
# 댓글
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = $content_type;
|
||||
$req_data['content_idx'] = $idx;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 15;
|
||||
$req_data['sort_column'] = 'reg_date';
|
||||
$req_data['sort_type'] = 'desc';
|
||||
$req_data['write_id'] = $SES_MEMBER_ID;
|
||||
|
||||
$ci->load->library('comm');
|
||||
$arr_comment_result = $ci->comm->fn_comment($req_data);
|
||||
|
||||
$comment_total_count = $arr_comment_result['comment_total_count'];
|
||||
$comment_my_delete_count = $arr_comment_result['comment_my_delete_count'];
|
||||
$arr_comment = $arr_comment_result['arr_comment'];
|
||||
|
||||
/*
|
||||
echo $this->session->userdata('C_Member_Id');
|
||||
var_dump($arr_comment_result);
|
||||
*/
|
||||
|
||||
$ci->load->helper('cookie');
|
||||
$comment_sns_id = get_cookie('crossmap_comment_sns_id');
|
||||
$comment_sns_name = get_cookie('crossmap_comment_sns_name');
|
||||
$comment_sns_type = get_cookie('crossmap_comment_sns_type');
|
||||
|
||||
$comment_list_url = '';
|
||||
$main_url = '';
|
||||
if($content_type == '3') {
|
||||
$comment_list_url = '/web/life/life_comment/'.$idx;
|
||||
$main_url = '/web/life/life_view/'.$idx;
|
||||
} else if($content_type == '2') {
|
||||
$comment_list_url = '/web/news/column_comment/'.$idx;
|
||||
$main_url = '/web/news/column_view/'.$idx;
|
||||
} else if($content_type == '1') {
|
||||
$comment_list_url = '/web/news/news_comment/'.$idx;
|
||||
$main_url = '/web/news/news_view/'.$idx;
|
||||
}else if($content_type == '4') {
|
||||
$comment_list_url = '/web/maptoon/comments?mtId='.$this->input->get('mtId'). '&no='. $idx;
|
||||
$main_url = '/web/maptoon/article?mtId='.$this->input->get('mtId'). '&no='. $idx;
|
||||
}
|
||||
|
||||
$method = $this->uri->segment(3);
|
||||
$is_comment_all_list = 'N';
|
||||
if($method == 'life_comment' || $method == 'column_comment'|| $method == 'news_comment') {
|
||||
$is_comment_all_list = 'Y';
|
||||
}
|
||||
|
||||
$ci=& get_instance();
|
||||
$ci->load->model('web/m_member');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div class="reply" style="margin-top:10px">
|
||||
<div class="reply_tit">댓글 <span class="beachblue" id="comment_count"><?=number_format($comment_total_count)?></span><span class="delete">본인 삭제 <span><?=number_format($comment_my_delete_count)?></span> <a href="javascript:comment_delete_refresh('<?=$idx?>', '<?=$SES_MEMBER_ID;?>', '<?=$content_type;?>');"><img src="/img/web/icon_refresh.gif"></a></span>
|
||||
|
||||
<span class="btn-info fr" style="padding-left:10px; padding-top:1px;"><a href="javascript:;" class="comment_policy_btn"><img src="/img/web/icon_info.gif"></a></span>
|
||||
<span class="btn-tit fr"><a href="javascript:;" class="comment_policy_btn" style="color: #bcbcbc;">댓글운영정책</a></span>
|
||||
|
||||
</div>
|
||||
|
||||
<?
|
||||
|
||||
if($comment_sns_id == '') {
|
||||
$reply_css2 = 'replay_text';
|
||||
$content_readonly = 'readonly';
|
||||
} else {
|
||||
$reply_css2 = '';
|
||||
$content_readonly = '';
|
||||
}
|
||||
|
||||
|
||||
$comment_sns_img1 = '/img/web/img_cm_off.gif'; $comment_sns_class1 = 'fr'; $nameText1=""; $comment_sns_javascript1="change_toggle('login_layer');"; $comment_sns_cursor1 = 'pointer';
|
||||
$comment_sns_img2 = '/img/web/img_tweet_off.gif'; $comment_sns_class2 = 'fr'; $nameText2=""; $comment_sns_javascript2="twitter_join('comment')"; $comment_sns_cursor2 = 'pointer';
|
||||
$comment_sns_img3 = '/img/web/img_facebook_off.gif';$comment_sns_class3 = 'fr'; $nameText3=""; $comment_sns_javascript3="checkLoginState();"; $comment_sns_cursor3 = 'pointer';
|
||||
$comment_sns_img4 = '/img/web/img_kakao_off.gif'; $comment_sns_class4 = 'fr'; $nameText4=""; $comment_sns_javascript4="kakako_login()"; $comment_sns_cursor4 = 'pointer';
|
||||
$comment_sns_img5 = '/img/web/img_naver_off.gif'; $comment_sns_class5 = 'fr'; $nameText5=""; $comment_sns_javascript5="naver_login()"; $comment_sns_cursor5 = 'pointer';
|
||||
if($comment_sns_type != '') {
|
||||
$comment_sns_javascript1 = "logout_advice()"; $comment_sns_javascript2 = "logout_advice()"; $comment_sns_javascript3 = "logout_advice()"; $comment_sns_javascript4 = "logout_advice()"; $comment_sns_javascript5 = "logout_advice()";
|
||||
//$comment_sns_cursor1 = "default"; $comment_sns_cursor2 = "default"; $comment_sns_cursor3 = "default"; $comment_sns_cursor4 = "default"; $comment_sns_cursor5 = "default";
|
||||
switch ($comment_sns_type) {
|
||||
case 'cm': $comment_sns_img1 = '/img/web/img_cm_on.gif'; $comment_sns_class1 = ''; $nameText1='<span>'.$comment_sns_name.'</span>'; break;
|
||||
case 'twitter': $comment_sns_img2 = '/img/web/img_tweet.gif'; $comment_sns_class2 = ''; $nameText2='<span>'.$comment_sns_name.'<span style="color:#a7a7a7;padding-left:10px;font-size:11px"><a href="javascript:comment_logout();">로그아웃</a> </span></span>'; break;
|
||||
case 'facebook': $comment_sns_img3 = '/img/web/img_facebook_on.gif'; $comment_sns_class3 = ''; $nameText3='<span>'.$comment_sns_name.'<span style="color:#a7a7a7;padding-left:10px;font-size:11px"><a href="javascript:comment_logout();">로그아웃</a> </span></span>'; break;
|
||||
case 'kakao': $comment_sns_img4 = '/img/web/img_kakao_on.gif'; $comment_sns_class4 = ''; $nameText4='<span>'.$comment_sns_name.'<span style="color:#a7a7a7;padding-left:10px;font-size:11px"><a href="javascript:comment_logout();">로그아웃</a> </span></span>'; break;
|
||||
case 'naver': $comment_sns_img5 = '/img/web/img_naver_on.gif'; $comment_sns_class5 = ''; $nameText5='<span>'.$comment_sns_name.'<span style="color:#a7a7a7;padding-left:10px;font-size:11px"><a href="javascript:comment_logout();">로그아웃</a> </span></span>'; break;
|
||||
}
|
||||
} else {
|
||||
$comment_sns_class1 = ''; $comment_sns_class2 = ''; $comment_sns_class3 = ''; $comment_sns_class4 = ''; $comment_sns_class5 = '';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<div class="reply_box">
|
||||
<div class="reply_social">
|
||||
<a href="javascript:<?=$comment_sns_javascript1?>" style="cursor:<?=$comment_sns_cursor1?>"><span class="<?=$comment_sns_class1?>"><img src="<?=$comment_sns_img1?>"></span></a> <?=$nameText1?>
|
||||
<a href="javascript:<?=$comment_sns_javascript2?>" style="cursor:<?=$comment_sns_cursor2?>"><span class="tweet <?=$comment_sns_class2?>"><img src="<?=$comment_sns_img2?>"></span></a> <?=$nameText2?>
|
||||
<a href="javascript:<?=$comment_sns_javascript3?>" style="cursor:<?=$comment_sns_cursor3?>"><span class="facebook <?=$comment_sns_class3?>"><img src="<?=$comment_sns_img3?>"></span></a> <?=$nameText3?>
|
||||
<a href="javascript:<?=$comment_sns_javascript4?>" style="cursor:<?=$comment_sns_cursor4?>"><span class="<?=$comment_sns_class4?>"><img src="<?=$comment_sns_img4?>"></span></a> <?=$nameText4?>
|
||||
<a href="javascript:<?=$comment_sns_javascript5?>" style="cursor:<?=$comment_sns_cursor5?>"><span class="<?=$comment_sns_class5?>"><img src="<?=$comment_sns_img5?>"></span></a> <?=$nameText5?>
|
||||
</div>
|
||||
<div class="reply_write">
|
||||
<textarea class="form-control <?=$reply_css2?> comment_text" name="comment" id="comment" rows="3" strA="" <?=$content_readonly?> placeholder="댓글 작성 시 상대방에 대한 배려와 사랑을 담아주세요." style="width:665px;" ></textarea>
|
||||
</div>
|
||||
<div class="reply_regist"><span class="reply_no" id="reply_text_count">0/300</span><span class="reply_btn" onclick="comment_add_proc();" style="cursor: pointer">등록</span></div>
|
||||
</div>
|
||||
<div class="reply_sort">
|
||||
<input type="hidden" name="comment_sort" id="comment_sort" value="1">
|
||||
<span><a href="javascript:change_comment_sort(1);" id="comment_sort1">호감순</a></span><span><a href="javascript:change_comment_sort(2);" class="current" id="comment_sort2">최신순</a></span>
|
||||
<? if($is_comment_all_list == 'Y') { ?>
|
||||
<span><a href="javascript:change_comment_sort(3);" id="comment_sort3">과거순</a></span><span><a href="javascript:change_comment_sort(4);" id="comment_sort4">답글순</a></span>
|
||||
<? }?>
|
||||
</div>
|
||||
<div class="reply_contents">
|
||||
<ul class="reply_list">
|
||||
<div class="comment_box" >
|
||||
<div id="comment_list">
|
||||
<?
|
||||
if(count($arr_comment) == 0) {
|
||||
echo '<div style="height:100px;text-align:center; line-height:100px;">등록된 댓글이 없습니다.</div>';
|
||||
|
||||
} else{
|
||||
$i=1;
|
||||
foreach($arr_comment as $val) {
|
||||
$content_type = $val['content_type'];
|
||||
$comment_status = $val['comment_status'];
|
||||
$comment = $val['comment'];
|
||||
$comment_del_date = $val['del_date'];
|
||||
$c_sns_name = $val['sns_name'];
|
||||
$comment_reg_date = $val['reg_date'];
|
||||
$is_best = $val['is_best'];
|
||||
$write_id = $val['write_id'];
|
||||
$comment_reg_date = substr($comment_reg_date, 0, 10);
|
||||
|
||||
$comment_main_style = '';
|
||||
if($i == count($arr_comment) && $is_comment_all_list == 'Y') {
|
||||
$comment_main_style= 'style="border-bottom:0 !important"';
|
||||
}
|
||||
|
||||
$comment_txt = $comment;
|
||||
if($comment_status!='1') {
|
||||
$comment_txt = '<div style="color:#bcbcbc;"><img src="/img/web/icon_info.gif"> '.$comment.'</div><div class="r_date" style="margin-top:5px;color:#bcbcbc;">'.$comment_del_date.'</div>';
|
||||
}
|
||||
if($is_best=='Y') $comment_txt = '<label>BEST</label>'.$comment_txt;
|
||||
|
||||
|
||||
$arr_member = $ci->m_member->member_where_member_id_select($write_id);
|
||||
$member_img = '/img/web/img_profile_l.png';
|
||||
if(isset($arr_member['member_img'])==true) $member_img = $arr_member['member_img'];
|
||||
|
||||
$name_header = '<img src="'.(empty($member_img)? '/files/img/web/img_photo.png': $member_img).'" width="16" height="16"> ';
|
||||
if($c_sns_name !='cm') {
|
||||
$name_header = '<img src="/img/web/img_'.$c_sns_name.'_on.gif"> ';
|
||||
}
|
||||
|
||||
$write_name = $val['write_name'];
|
||||
//$write_name = (mb_strlen($val['write_name']) > 10) ? iconv_substr($val['write_name'], 0, 10, "utf-8") . "***" : $val['write_name'];
|
||||
$write_name = !empty($val['member_nickname']) ? $val['member_nickname'] : iconv_substr($val['member_id'], 0, 4, "utf-8") . "***";
|
||||
|
||||
?>
|
||||
<div class="reply_comment" id="reply_comment_main<?=$val['idx']?>" <?=$comment_main_style?>>
|
||||
<div class="r_info">
|
||||
<?=$name_header?>
|
||||
<span class="beachblue">
|
||||
<?
|
||||
if($comment_sns_id == '') {
|
||||
echo $write_name;
|
||||
} else {
|
||||
if($content_type=='1' || $content_type=='2') {?>
|
||||
<a href="javascript:user_comment('<?=$val['write_id']?>', '<?=$val['write_name']?>');" style="color: #2bbec6 !important;"><?=$write_name?></a>
|
||||
<? } else {
|
||||
if($comment_sns_id==$val['write_id']) {
|
||||
?>
|
||||
<a href="javascript:user_comment('<?=$val['write_id']?>', '<?=$val['write_name']?>');" style="color: #2bbec6 !important;"><?=$write_name?></a>
|
||||
<?
|
||||
} else {
|
||||
echo $write_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</span>
|
||||
<span class="r_date">
|
||||
<?=$comment_reg_date?>
|
||||
<? if($comment_status==1) {?>
|
||||
<? if($comment_sns_id!=$val['write_id']){?><span style="color:#e1e2e2;padding-left:10px;"> |</span> <a href="javascript:comment_spam('<?=$val['idx']?>', '<?=$val['write_name']?>')">신고</a><? } ?>
|
||||
<? if($comment_sns_id==$val['write_id']){?><span style="color:#e1e2e2;padding-left:10px;"> |</span> <a href="javascript:comment_del('<?=$val['idx']?>')">삭제</a><?}?>
|
||||
<? }?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="r_text"><?=$comment_txt?></div>
|
||||
<ul class="r_base">
|
||||
<li class="btn btn-default" onclick="comment_reply_open('<?=$val['idx']?>');" style="color:#000000;cursor: pointer">답글 <span id="comment_reply_count<?=$val['idx']?>"><?=number_format($val['reply_count'])?></span></li>
|
||||
<li class="icons2">
|
||||
<span class="thumbup2"><a href="javascript:comment_like_select(1, '<?=$val['idx']?>');"><img src="/img/web/img_thumbup.jpg"></a><span id="comment_like1_<?=$val['idx']?>"><?=number_format($val['like_count'])?></span></span>
|
||||
<span class="thumbdown2"><a href="javascript:comment_like_select(2, '<?=$val['idx']?>');"><img src="/img/web/img_thumbdown.jpg"></a><span id="comment_like2_<?=$val['idx']?>"><?=number_format($val['bad_count'])?></span></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 대댓글 -->
|
||||
<div class="reply_box2" id="reply_comment<?=$val['idx']?>" style="display:none">
|
||||
<div id="reply_comment_list<?=$val['idx']?>"></div>
|
||||
<input type="hidden" name="comment_reply_page<?=$val['idx']?>" id="comment_reply_page<?=$val['idx']?>" value="1">
|
||||
<div class="reply_close" id="reply_more<?=$val['idx']?>" style="display:none;"><a href="javascript:comment_reply_more(<?=$val['idx']?>)">더보기</a> <img src="/img/web/img_replyopen.gif"></div>
|
||||
|
||||
<ul class="box_wrap2">
|
||||
<li class="r_img2"><img src="/img/web/img_reply1.gif"></li>
|
||||
<li>
|
||||
<div class="reply_box">
|
||||
<div class="reply_social">
|
||||
<a href="javascript:<?=$comment_sns_javascript1?>" style="cursor:<?=$comment_sns_cursor1?>"><span class="<?=$comment_sns_class1?>"><img src="<?=$comment_sns_img1?>"></span></a> <?=$nameText1?>
|
||||
<a href="javascript:<?=$comment_sns_javascript2?>" style="cursor:<?=$comment_sns_cursor2?>"><span class="tweet <?=$comment_sns_class2?>"><img src="<?=$comment_sns_img2?>"></span></a> <?=$nameText2?>
|
||||
<a href="javascript:<?=$comment_sns_javascript3?>" style="cursor:<?=$comment_sns_cursor3?>"><span class="facebook <?=$comment_sns_class3?>"><img src="<?=$comment_sns_img3?>"></span></a> <?=$nameText3?>
|
||||
<a href="javascript:<?=$comment_sns_javascript4?>" style="cursor:<?=$comment_sns_cursor4?>"><span class="<?=$comment_sns_class4?>"><img src="<?=$comment_sns_img4?>"></span></a> <?=$nameText4?>
|
||||
<a href="javascript:<?=$comment_sns_javascript5?>" style="cursor:<?=$comment_sns_cursor5?>"><span class="<?=$comment_sns_class5?>"><img src="<?=$comment_sns_img5?>"></span></a> <?=$nameText5?>
|
||||
</div>
|
||||
<div class="reply_write">
|
||||
<textarea class="form-control <?=$reply_css2?> comment_text" <?=$content_readonly?> name="comment<?=$val['idx']?>" id="comment<?=$val['idx']?>" strA="<?=$val['idx']?>" rows="3" placeholder="댓글 작성 시 상대방에 대한 배려와 사랑을 담아주세요." style=" width: 590px;"></textarea>
|
||||
</div>
|
||||
<div class="reply_regist">
|
||||
<span class="reply_no" id="reply_text_count<?=$val['idx']?>">0/300</span><span class="reply_btn"><a href="javascript:comment_reply_add_proc(<?=$val['idx']?>);"> 등록</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="reply_close"><a href="javascript:comment_reply_close('<?=$val['idx']?>')">댓글 접기</a> <img src="/img/web/img_replyclose.gif"></div>
|
||||
</div>
|
||||
<!--// 대댓글 -->
|
||||
|
||||
<?
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<? if($is_comment_all_list == 'Y') {
|
||||
$comment_more_btn_style = 'style="display:none;"';
|
||||
if($comment_total_count > count($arr_comment)) {
|
||||
$comment_more_btn_style = ' style="display:block;"';
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="channel_bottom3">
|
||||
<button type="button" class="btn btn-default br20" id="comment_more_btn" <?=$comment_more_btn_style?> onclick="comment_list_more();">더보기 </button>
|
||||
</div>
|
||||
<? }
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<? if($is_comment_all_list == 'Y') { ?>
|
||||
<div class="reply_info" style="float:right; padding:0 0 30px 0;">
|
||||
<span><img src="/img/web/mypage_arrow_left.gif" style="padding-top:9px;"> <a href="<?=$main_url?>" style="color:#7e7f82"> 이전 페이지로 돌아가기</a> </span>
|
||||
|
||||
<span style="color:#d4d4d4;padding-left:10px;"> |</span>
|
||||
<span><img src="/img/web/img_up2.gif" style="padding-top:12px;"><a href="#" style="color:#7e7f82"> 맨위로</a></span>
|
||||
</div>
|
||||
<? } else {
|
||||
|
||||
$comment_all_list_style = '';
|
||||
if($comment_total_count==0) $comment_all_list_style='display:none;';
|
||||
|
||||
?>
|
||||
<div class="viewall" id="comment_all_list" style="float:right; padding:20px 0 30px 0;<?=$comment_all_list_style?>"><a href="<?=$comment_list_url?>">전체 댓글 보기 ></a></div>
|
||||
<? } ?>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="comment_policy" style="display:none;z-index: 9999">
|
||||
<div class="delivery_info3" style="position: fixed;">
|
||||
<p class="d_info_tit" style="text-align:center; margin:10px 0">댓글운영정책</p>
|
||||
<p class="d_info_txt">
|
||||
|
||||
크로스맵 댓글은 게시물에 대하여 자신의 생각을 말하고 남의 생각을 들으며 서로 다양한 의견을 나누는 공간입니다. 그러나 간혹 불건전한 내용을 올리시는 분들이 계셔서 건전한 인터넷문화 정착을 위해 아래와 같은 운영원칙을 적용합니다.<br><br>
|
||||
|
||||
<span style="text-decoration:underline; margin-bottom: 15px;display: inline-block;">1. 댓글의 삭제 및 제한 조치</span><br>
|
||||
|
||||
네티즌들의 신고 또는 자제 모니터링을 통해 아래에 해당하는 내용이 포함된 댓글이 발견되면 예고없이 삭제 또는 제한 조치를 하겠습니다. <br>
|
||||
</p>
|
||||
<table style="font-size:13px;">
|
||||
<tr>
|
||||
<td>1) 타인에 대한 욕설 또는 비방 </td>
|
||||
<td>2) 인신공격 또는 명예훼손 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3) 개인정보 유출 또는 사생활 침해</td>
|
||||
<td>4) 음란성 내용 또는 음란물 링크 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5) 상업적 광고 또는 사이트/홈피 홍보 </td>
|
||||
<td>6) 불법정보 유출</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>7) 같은 내용의 반복(도배) </td>
|
||||
<td>8) 폭력 또는 사행심 조장 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9) 기타 게시물 내용과 관계없는 내용</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
<p class="d_info_txt">
|
||||
|
||||
<span style="text-decoration:underline; margin-bottom: 15px;display: inline-block;">2. 댓글 작성에 대한 제한</span><br>
|
||||
|
||||
불건전한 댓글은 발견시 별도의 통보없이 즉시 삭제 또는 제한 조치 하며 상습적 또는 위반 정도가 심한 댓글을 올리시는 분에 대해서는 일정 기간 댓글 작성에 대한 권한을 제한할 수 있습니다.<br>
|
||||
또한 비정상적인 패턴으로 조회, 추천, 반대 등이 발생하는 것으로 관리자 또는 시스템이 판단하는
|
||||
경우 부정 클릭여부를 확인하여 해당 IP나 ID를 제재할 수 있습니다.<br>
|
||||
명예훼손, 개인정보유츨, 욕설 등 법률에 위반되는 댓글은 관계 법령에 의거 민형사상 처벌을 받을 수 있으니 이용에 주의를 부탁 드립니다.<br><br>
|
||||
|
||||
<span style="text-decoration:underline; margin-bottom: 15px;display: inline-block;">3. 뉴스, 칼럼 댓글함 전체공개</span><br>
|
||||
|
||||
건전한 댓글 문화를 위하여 뉴스 및 칼럼 댓글에 한해서만 댓글모음이 전체공개됩니다. 제공되는 목록에 삭제한 댓글이나 답글은 포함되지 않습니다. <br>
|
||||
</p>
|
||||
<div class="form-group" style="margin:20px 0; display:block; text-align:center">
|
||||
<button type="button" class="btn btn-success" onclick="change_toggle('comment_policy');" style="padding:5px 20px; font-size:14px">확인</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="mask" style="z-index: 9998"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="social_login" style="display:none;">
|
||||
<div class="popup_wrap" style="position: fixed">
|
||||
<div class="popupbox trc" style=" width:445px; ">
|
||||
<div class="popuptop">
|
||||
<h3 class="p_title">소셜댓글 로그인 </h3>
|
||||
<span class="btn-close"><a href="javascript:change_toggle('social_login')"><img src="/img/web/btn-close.png"></a></span>
|
||||
</div>
|
||||
<div class="popupbody">
|
||||
<div class="ft16" style="padding:30px 0 20px;">계정을 선택하시면 <span class="beachblue">로그인·계정인증</span>을 통해<br>댓글을 남기실 수 있습니다.</div>
|
||||
<div class="form-group" style="margin:10px 0 10px 0; display:block;">
|
||||
<a href="javascript:change_toggle('social_login');change_toggle('login_layer')"><img src="/img/web/btn_crossmap.gif" alt="크로스맵"></a>
|
||||
</div>
|
||||
<div class="form-group" style="margin:10px 0 10px 0; display:block;">
|
||||
<a href="javascript:twitter_join('comment')"><img src="/img/web/btn_tweet.gif" alt="트위터"></a>
|
||||
</div>
|
||||
<div class="form-group" style="margin:10px 0 10px 0; display:block;">
|
||||
<a href="javascript:kakako_login()"><img src="/img/web/btn_kakao.gif" alt="카카오"></a>
|
||||
</div>
|
||||
<div class="form-group" style="margin:10px 0 10px 0; display:block;">
|
||||
<a href="javascript:naver_login()"><img src="/img/web/btn_naver.gif" alt="네이버"></a>
|
||||
</div>
|
||||
<div class="form-group" style="margin:10px 0 50px; display:block; ">
|
||||
<a href="javascript:checkLoginState()"><img src="/img/web/btn_facebook.gif" alt="페이스북"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mask"></div>
|
||||
</div>
|
||||
|
||||
<!-- 댓글 신고 -->
|
||||
<? require_once(APPPATH . "views/web/comm/comment_spam_layer_inc.php");?>
|
||||
|
||||
|
||||
<script>
|
||||
// 레이어 이외의 공간 클릭시 close
|
||||
$(document).mouseup(function (e){
|
||||
var container = $("#comment_policy");
|
||||
if( container.has(e.target).length === 0) container.hide();
|
||||
|
||||
});
|
||||
|
||||
$('.comment_policy_btn').click(function(e) {
|
||||
$("#comment_policy").toggle();
|
||||
var popH = $(this).offset().top;
|
||||
$('.delivery_info3').css('left','50%');
|
||||
$('.delivery_info3').css('top', '70px');
|
||||
$('.delivery_info3').css('margin-left','-265px');
|
||||
//$("html, body").scrollTop(0);
|
||||
|
||||
|
||||
console.log(popH);
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('.replay_text').click(function(e) {
|
||||
$("#social_login").show();
|
||||
var popH = $(this).offset().top;
|
||||
$(".popup_wrap").css('left','50%');
|
||||
$(".popup_wrap").css('top','100px');
|
||||
//$("html, body").scrollTop(0);
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('.comment_text').on('keyup', function(event) {
|
||||
var key = $(this).attr('strA');
|
||||
var len = $(this).val().length;
|
||||
if (len >= 300) {
|
||||
$(this).val($(this).val().substring(0, 300));
|
||||
len = 300;
|
||||
}
|
||||
$("#reply_text_count"+key).html(len+'/300');
|
||||
});
|
||||
|
||||
|
||||
|
||||
// 댓글
|
||||
// 댓글 sort 변경
|
||||
function change_comment_sort(type){
|
||||
$("#comment_sort").val(type);
|
||||
$("#comment_sort1").removeClass('current');
|
||||
$("#comment_sort2").removeClass('current');
|
||||
$("#comment_sort3").removeClass('current');
|
||||
$("#comment_sort4").removeClass('current');
|
||||
$("#comment_sort"+type).addClass('current');
|
||||
comment_list(1);
|
||||
}
|
||||
|
||||
// 대댓글 열기
|
||||
function comment_reply_open(idx){
|
||||
$("#reply_comment"+idx).toggle();
|
||||
$("#reply_comment_main"+idx).addClass('reply_comment_open');
|
||||
$("#reply_comment_main"+idx).removeClass('reply_comment');
|
||||
|
||||
comment_reply_list(idx, 1);
|
||||
$("#comment_reply_page"+idx).val(1);
|
||||
}
|
||||
|
||||
// 대댓글 닫기
|
||||
function comment_reply_close(idx){
|
||||
$("#reply_comment"+idx).hide();
|
||||
|
||||
$("#reply_comment_main"+idx).removeClass('reply_comment_open');
|
||||
$("#reply_comment_main"+idx).addClass('reply_comment');
|
||||
}
|
||||
|
||||
// 대댓글 더보기
|
||||
function comment_reply_more(idx){
|
||||
var page = $("#comment_reply_page"+idx).val();
|
||||
page = parseInt(page) + 1;
|
||||
$("#comment_reply_page"+idx).val(page);
|
||||
comment_reply_list(idx, page);
|
||||
|
||||
}
|
||||
|
||||
// 댓글 더보기
|
||||
var comment_page = 2;
|
||||
function comment_list_more(){
|
||||
comment_list(comment_page);
|
||||
}
|
||||
|
||||
function comment_list(page){
|
||||
var sort = $("#comment_sort").val();
|
||||
var form_data = {
|
||||
"sort" : sort,
|
||||
"page" : page,
|
||||
"content_idx" : "<?=$idx?>",
|
||||
"content_type" : "<?=$content_type?>",
|
||||
"is_comment_all_list" : "<?=$is_comment_all_list?>"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/comment_list',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
timeout: 10000,
|
||||
dataType: 'HTML',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml=='') return false;
|
||||
var arrHtml = rtnHtml.split("|||||");
|
||||
if(arrHtml[0].trim()=='0000') {
|
||||
if(page == 1) {
|
||||
$("#comment_list").html(arrHtml[1]);
|
||||
} else {
|
||||
$("#comment_list").children('.reply_comment').last().removeAttr("style");
|
||||
$("#comment_list").append(arrHtml[1]);
|
||||
}
|
||||
$("#comment_count").html(setComma(arrHtml[2]));
|
||||
if (arrHtml[3] == "N") {
|
||||
$("#comment_more_btn").hide();
|
||||
} else {
|
||||
$("#comment_more_btn").show();
|
||||
}
|
||||
<? if($is_comment_all_list=='N') {?>
|
||||
|
||||
if(parseInt(arrHtml[2]) > 0) {
|
||||
console.log("1");
|
||||
$("#comment_all_list").show();
|
||||
}
|
||||
<? }?>
|
||||
comment_page=page+1;
|
||||
|
||||
} else {
|
||||
alert(arrHtml[1]);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
//alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// comment 댓글 리스트 가져오기
|
||||
function comment_reply_list(idx, page){
|
||||
var sort = $("#comment_sort").val();
|
||||
var form_data = {
|
||||
"comment_idx" : idx,
|
||||
"page" : page,
|
||||
"sort" : sort
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/comment_reply_list',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'HTML',
|
||||
timeout: 10000,
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
var arrHtml = rtnHtml.split("|||||");
|
||||
if(arrHtml[0].trim()=='0000') {
|
||||
if (arrHtml[1] != "") {
|
||||
if(page==1) {
|
||||
$("#reply_comment_list" + idx).html(arrHtml[1]);
|
||||
} else {
|
||||
$("#reply_comment_list" + idx).append(arrHtml[1]);
|
||||
}
|
||||
}
|
||||
|
||||
$("#comment_reply_count"+idx).html(setComma(arrHtml[2]));
|
||||
if (arrHtml[3] == "N") {
|
||||
$("#reply_more" + idx).hide();
|
||||
} else {
|
||||
$("#reply_more" + idx).show();
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
//alert('데이터 로드에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 댓글달기
|
||||
function comment_add_proc(){
|
||||
if("<?=$comment_sns_id?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
location.href='/web/user/login';
|
||||
return;
|
||||
}
|
||||
|
||||
if($("#comment").val()=="") {
|
||||
alert("댓글을 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
var form_data = {
|
||||
"content_idx" : "<?=$idx?>",
|
||||
"content_type" : "<?=$content_type?>",
|
||||
"comment" : $("#comment").val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/comment_add_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
$("#comment").val('');
|
||||
$("#comment").focus();
|
||||
$("#reply_text_count").html('0/300');
|
||||
|
||||
$("#comment_sort").val('2');
|
||||
$("#comment_sort1").removeClass('current');
|
||||
$("#comment_sort2").removeClass('current');
|
||||
$("#comment_sort2").addClass('current');
|
||||
|
||||
comment_list(1);
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 대대글 달기
|
||||
function comment_reply_add_proc(p_idx){
|
||||
if("<?=$comment_sns_id?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
location.href='/web/user/login';
|
||||
return;
|
||||
}
|
||||
|
||||
if($("#comment"+p_idx).val()=="") {
|
||||
alert("댓글을 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
var form_data = {
|
||||
"p_idx" : p_idx,
|
||||
"content_idx" : "<?=$idx?>",
|
||||
"content_type" : "<?=$content_type?>",
|
||||
"comment" : $("#comment"+p_idx).val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/comment_add_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
$("#comment"+p_idx).val('');
|
||||
$("#reply_text_count"+p_idx).html('0/300');
|
||||
$("#comment_reply_page"+p_idx).val(1);
|
||||
|
||||
$("#comment_sort").val('2');
|
||||
$("#comment_sort1").removeClass('current');
|
||||
$("#comment_sort2").removeClass('current');
|
||||
$("#comment_sort2").addClass('current');
|
||||
|
||||
comment_reply_list(p_idx, 1);
|
||||
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
//alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 댓글 좋아요
|
||||
function comment_like_select(type, idx){
|
||||
if("<?=$comment_sns_id?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
location.href='/web/user/login';
|
||||
return;
|
||||
}
|
||||
var form_data = {
|
||||
"comment_idx" : idx,
|
||||
"type" : type
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/comment_like_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
var like_count = setComma(rtnJson.data.like_count);
|
||||
var bad_count = setComma(rtnJson.data.bad_count);
|
||||
$("#comment_like1_"+idx).html(like_count);
|
||||
$("#comment_like2_"+idx).html(bad_count);
|
||||
|
||||
} else {
|
||||
alert("저장에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function comment_del(idx){
|
||||
if(confirm("댓글이 삭제됩니다. 삭제하시겠습니까?") == false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var form_data = {
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/user_comment_del_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
comment_list(1);
|
||||
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('삭제에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function reply_comment_del(idx, p_idx){
|
||||
if(confirm("댓글이 삭제됩니다. 삭제하시겠습니까?") == false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var form_data = {
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/user_comment_del_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
comment_reply_list(p_idx, 1);
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('삭제에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function comment_delete_refresh(idx, write_id, content_type) {
|
||||
var form_data = {
|
||||
"idx" : idx,
|
||||
"write_id" : write_id,
|
||||
"content_type" : content_type
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/life/user_comment_refresh_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.result.code == "0000") {
|
||||
$('.delete span').text(rtnJson.delete_cnt);
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('알 수 없는 오류가 발생하였습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function logout_advice(){
|
||||
alert("로그아웃 후에 이용해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
function comment_logout(){
|
||||
location.href="/web/comm/comment_logout";
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
196
application/views/web/comm/comment_list.php
Executable file
196
application/views/web/comm/comment_list.php
Executable file
@@ -0,0 +1,196 @@
|
||||
<?
|
||||
$this->load->helper('cookie');
|
||||
$comment_sns_id = get_cookie('crossmap_comment_sns_id');
|
||||
$comment_sns_name = get_cookie('crossmap_comment_sns_name');
|
||||
$comment_sns_type = get_cookie('crossmap_comment_sns_type');
|
||||
|
||||
|
||||
$ci=& get_instance();
|
||||
$ci->load->model('web/m_member');
|
||||
|
||||
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
if(count($arr_comment) == 0) {
|
||||
echo '<div style="height:100px;text-align:center; line-height:100px;">등록된 댓글이 없습니다.</div>';
|
||||
|
||||
} else{
|
||||
if($comment_sns_id == '') {
|
||||
$reply_css2 = 'replay_text';
|
||||
} else {
|
||||
$reply_css2 = '';
|
||||
}
|
||||
|
||||
$i=1;
|
||||
foreach($arr_comment as $val) {
|
||||
$content_type = $val['content_type'];
|
||||
$comment_status = $val['comment_status'];
|
||||
$comment_del_date = $val['del_date'];
|
||||
$comment_reg_date = $val['reg_date'];
|
||||
$c_sns_name = $val['sns_name'];
|
||||
$comment = $val['comment'];
|
||||
$is_best = $val['is_best'];
|
||||
$write_id = $val['write_id'];
|
||||
$comment_reg_date = substr($comment_reg_date, 0, 10);
|
||||
|
||||
$comment_main_style = '';
|
||||
if($i == count($arr_comment) && $is_comment_all_list == 'Y') {
|
||||
$comment_main_style= 'style="border-bottom:0 !important"';
|
||||
}
|
||||
|
||||
$comment_txt = $comment;
|
||||
if($comment_status!='1') {
|
||||
$comment_txt = '<div style="color:#bcbcbc;"><img src="/img/web/icon_info.gif"> '.$comment.'</div><div class="r_date" style="margin-top:5px;color:#bcbcbc;">'.$comment_del_date.'</div>';
|
||||
}
|
||||
if($is_best=='Y') $comment_txt = '<label>BEST</label>'.$comment_txt;
|
||||
|
||||
$arr_member = $ci->m_member->member_where_member_id_select($write_id);
|
||||
$member_img = '/img/web/img_profile_l.png';
|
||||
if(isset($arr_member['member_img'])==true) $member_img = $arr_member['member_img'];
|
||||
|
||||
$name_header = '<img src="'.(empty($member_img)? '/files/img/web/img_photo.png': $member_img).'" width="16" height="16"> ';
|
||||
if($c_sns_name !='cm') {
|
||||
$name_header = '<img src="/img/web/img_'.$c_sns_name.'_on.gif"> ';
|
||||
}
|
||||
|
||||
//$write_name = $val['write_name'];
|
||||
$write_name = !empty($val['member_nickname']) ? $val['member_nickname'] : iconv_substr($val['member_id'], 0, 4, "utf-8") . "***";
|
||||
|
||||
?>
|
||||
<div class="reply_comment" id="reply_comment_main<?=$val['idx']?>" <?=$comment_main_style?>>
|
||||
<div class="r_info">
|
||||
<span class="beachblue">
|
||||
<?=$name_header?>
|
||||
<?
|
||||
if($comment_sns_id == '') {
|
||||
echo $write_name;
|
||||
} else {
|
||||
if($content_type == '1' || $content_type == '2') {
|
||||
?>
|
||||
<a href="javascript:user_comment('<?=$val['write_id']?>', '<?=$val['write_name']?>');"><?=$write_name?></a>
|
||||
<?
|
||||
} else {
|
||||
if($comment_sns_id!=$val['write_id']) {
|
||||
echo $write_name;
|
||||
} else {
|
||||
?>
|
||||
<a href="javascript:user_comment('<?=$val['write_id']?>', '<?=$val['write_name']?>');"><?=$write_name?></a>
|
||||
<?
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</span>
|
||||
<span class="r_date"><?=$comment_reg_date?>
|
||||
<? if($comment_status==1) {?>
|
||||
<? if($comment_sns_id!=$val['write_id']){?><span style="color:#e1e2e2;padding-left:10px;"> |</span> <a href="javascript:comment_spam('<?=$val['idx']?>', '<?=$val['write_name']?>')">신고</a><? } ?>
|
||||
<? if($comment_sns_id==$val['write_id']){?><span style="color:#e1e2e2;padding-left:10px;"> |</span> <a href="javascript:comment_del('<?=$val['idx']?>')">삭제</a> <?}?>
|
||||
<? }?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="r_text"><?=$comment_txt?></div>
|
||||
<ul class="r_base">
|
||||
<li class="btn btn-default" onclick="comment_reply_open('<?=$val['idx']?>');" style="color:#000000;cursor: pointer">답글 <span id="comment_reply_count<?=$val['idx']?>"><?=number_format($val['reply_count'])?></span></li>
|
||||
<li class="icons2">
|
||||
<span class="thumbup2"><a href="javascript:comment_like_select(1, '<?=$val['idx']?>');"><img src="/img/web/img_thumbup.jpg"></a><span id="comment_like1_<?=$val['idx']?>"><?=number_format($val['like_count'])?></span></span>
|
||||
<span class="thumbdown2"><a href="javascript:comment_like_select(2, '<?=$val['idx']?>');"><img src="/img/web/img_thumbdown.jpg"></a><span id="comment_like2_<?=$val['idx']?>"><?=number_format($val['bad_count'])?></span></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 대댓글 -->
|
||||
|
||||
<?php
|
||||
$comment_sns_img1 = '/img/web/img_cm_off.gif'; $comment_sns_class1 = 'fr'; $nameText1=""; $comment_sns_javascript1="window.location='/m/member/login?redir=https://crossmap.co.kr/m/life/life_view/335';"; $comment_sns_cursor1 = 'pointer';
|
||||
$comment_sns_img2 = '/img/web/img_tweet_off.gif'; $comment_sns_class2 = 'fr'; $nameText2=""; $comment_sns_javascript2="twitter_join('comment')"; $comment_sns_cursor2 = 'pointer';
|
||||
$comment_sns_img3 = '/img/web/img_facebook_off.gif';$comment_sns_class3 = 'fr'; $nameText3=""; $comment_sns_javascript3="checkLoginState();"; $comment_sns_cursor3 = 'pointer';
|
||||
$comment_sns_img4 = '/img/web/img_kakao_off.gif'; $comment_sns_class4 = 'fr'; $nameText4=""; $comment_sns_javascript4="kakako_login()"; $comment_sns_cursor4 = 'pointer';
|
||||
$comment_sns_img5 = '/img/web/img_naver_off.gif'; $comment_sns_class5 = 'fr'; $nameText5=""; $comment_sns_javascript5="naver_login()"; $comment_sns_cursor5 = 'pointer';
|
||||
if($comment_sns_type != '') {
|
||||
|
||||
if($comment_sns_name) {
|
||||
if(mb_strlen($comment_sns_name, 'utf-8') > 5) {
|
||||
$comment_sns_name = mb_strcut($comment_sns_name, 0, 9, 'UTF-8')."**";
|
||||
}
|
||||
}
|
||||
|
||||
$comment_sns_javascript1 = "logout_advice()"; $comment_sns_javascript2 = "logout_advice()"; $comment_sns_javascript3 = "logout_advice()"; $comment_sns_javascript4 = "logout_advice()"; $comment_sns_javascript5 = "logout_advice()";
|
||||
//$comment_sns_cursor1 = "default"; $comment_sns_cursor2 = "default"; $comment_sns_cursor3 = "default"; $comment_sns_cursor4 = "default"; $comment_sns_cursor5 = "default";
|
||||
switch ($comment_sns_type) {
|
||||
case 'cm': $comment_sns_img1 = '/img/web/img_cm_on.gif'; $comment_sns_class1 = 'fl'; $nameText1="<span>".$comment_sns_name." <span style='color:#a7a7a7;padding-left:10px;font-size:11px'><a href='javascript:window.location=\"/m/member/logout_proc\";'>로그아웃</a></span>"; break;
|
||||
case 'twitter': $comment_sns_img2 = '/img/web/img_tweet.gif'; $comment_sns_class2 = 'fl'; $nameText2="<span>".$comment_sns_name." <span style='color:#a7a7a7;padding-left:10px;font-size:11px'><a href='javascript:comment_logout();'>로그아웃</a></span>"; break;
|
||||
case 'facebook': $comment_sns_img3 = '/img/web/img_facebook_on.gif'; $comment_sns_class3 = 'fl'; $nameText3="<span>".$comment_sns_name." <span style='color:#a7a7a7;padding-left:10px;font-size:11px'><a href='javascript:comment_logout();'>로그아웃</a></span>"; break;
|
||||
case 'kakao': $comment_sns_img4 = '/img/web/img_kakao_on.gif'; $comment_sns_class4 = 'fl'; $nameText4="<span>".$comment_sns_name." <span style='color:#a7a7a7;padding-left:10px;font-size:11px'><a href='javascript:comment_logout();'>로그아웃</a></span>"; break;
|
||||
case 'naver': $comment_sns_img5 = '/img/web/img_naver_on.gif'; $comment_sns_class5 = 'fl'; $nameText5="<span>".$comment_sns_name." <span style='color:#a7a7a7;padding-left:10px;font-size:11px'><a href='javascript:comment_logout();'>로그아웃</a></span>"; break;
|
||||
}
|
||||
} else {
|
||||
$comment_sns_class1 = '';$comment_sns_class2 = '';$comment_sns_class3 = '';$comment_sns_class4 = '';$comment_sns_class5 = '';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="reply_box2" id="reply_comment<?=$val['idx']?>" style="display:none">
|
||||
<div id="reply_comment_list<?=$val['idx']?>"></div>
|
||||
<input type="hidden" name="comment_reply_page<?=$val['idx']?>" id="comment_reply_page<?=$val['idx']?>" value="1">
|
||||
<div class="reply_close" id="reply_more<?=$val['idx']?>" style="display:none;"><a href="javascript:comment_reply_more(<?=$val['idx']?>)">더보기</a> <img src="/img/web/img_replyopen.gif"></div>
|
||||
|
||||
<ul class="box_wrap2">
|
||||
<li class="r_img2"><img src="/img/web/img_reply1.gif"></li>
|
||||
<li>
|
||||
<div class="reply_box">
|
||||
<div class="reply_social">
|
||||
<?switch($comment_sns_type){
|
||||
case 'cm': ?>
|
||||
<a href="javascript:<?=$comment_sns_javascript1?>" style="cursor:<?=$comment_sns_cursor1?>"><span class="tweet"><img src="<?=$comment_sns_img1?>"></a> <?=$nameText1?>
|
||||
<?;break;?>
|
||||
<?case 'twitter': ?>
|
||||
<a href="javascript:<?=$comment_sns_javascript2?>" style="cursor:<?=$comment_sns_cursor2?>"><img src="<?=$comment_sns_img2?>"></a> <?=$nameText2?>
|
||||
<?;break;?>
|
||||
<?case 'facebook': ?>
|
||||
<a href="javascript:<?=$comment_sns_javascript3?>" style="cursor:<?=$comment_sns_cursor3?>"><img src="<?=$comment_sns_img3?>"></a> <?=$nameText3?>
|
||||
<?;break;?>
|
||||
<?case 'kakao': ?>
|
||||
<a href="javascript:<?=$comment_sns_javascript4?>" style="cursor:<?=$comment_sns_cursor4?>"><img src="<?=$comment_sns_img4?>"></a> <?=$nameText4?>
|
||||
<?;break;?>
|
||||
<?case 'naver': ?>
|
||||
<a href="javascript:<?=$comment_sns_javascript5?>" style="cursor:<?=$comment_sns_cursor5?>"><img src="<?=$comment_sns_img5?>"></a> <?=$nameText5?>
|
||||
<?;break;?>
|
||||
<?}?>
|
||||
<span class="facebook<?=($comment_sns_type) ? " on" : ""; ?>">
|
||||
<a href="javascript:<?=$comment_sns_javascript5?>" style="cursor:<?=$comment_sns_cursor5?>;<?=($comment_sns_type == 'naver')? "display:none" : ""?>"><img src="<?=$comment_sns_img5?>"></a>
|
||||
<a href="javascript:<?=$comment_sns_javascript4?>" style="cursor:<?=$comment_sns_cursor4?>;<?=($comment_sns_type == 'kakao')? "display:none" : ""?>"><img src="<?=$comment_sns_img4?>"></a>
|
||||
<a href="javascript:<?=$comment_sns_javascript3?>" style="cursor:<?=$comment_sns_cursor3?>;<?=($comment_sns_type == 'facebook')? "display:none" : ""?>"><img src="<?=$comment_sns_img3?>"></a>
|
||||
<a href="javascript:<?=$comment_sns_javascript2?>" style="cursor:<?=$comment_sns_cursor2?>;<?=($comment_sns_type == 'twitter')? "display:none" : ""?>"><img src="<?=$comment_sns_img2?>"></a>
|
||||
<a href="javascript:<?=$comment_sns_javascript1?>" style="cursor:<?=$comment_sns_cursor1?>;<?=($comment_sns_type == 'cm')? "display:none" : ""?>"><span class="tweet"><img src="<?=$comment_sns_img1?>"></span></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="reply_write">
|
||||
<textarea class="form-control <?=$reply_css2?> comment_text" name="comment<?=$val['idx']?>" id="comment<?=$val['idx']?>" strA="<?=$val['idx']?>" rows="3" placeholder="댓글 작성 시 상대방에 대한 배려와 사랑을 담아주세요." style=" width: 590px;"></textarea>
|
||||
</div>
|
||||
<div class="reply_regist">
|
||||
<span class="reply_no" id="reply_text_count<?=$val['idx']?>">0/300</span><span class="reply_btn"><a href="javascript:comment_reply_add_proc(<?=$val['idx']?>);"> 등록</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="reply_close"><a href="javascript:comment_reply_close('<?=$val['idx']?>')">댓글 접기</a> <img src="/img/web/img_replyclose.gif"></div>
|
||||
</div>
|
||||
<!--// 대댓글 -->
|
||||
|
||||
<?
|
||||
$i++;
|
||||
}?>
|
||||
<?
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo '|||||'.$total_count.'|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||댓글가져오기를 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
97
application/views/web/comm/comment_reply_list.php
Executable file
97
application/views/web/comm/comment_reply_list.php
Executable file
@@ -0,0 +1,97 @@
|
||||
<?
|
||||
$this->load->helper('cookie');
|
||||
$comment_sns_id = get_cookie('crossmap_comment_sns_id');
|
||||
|
||||
$ci=& get_instance();
|
||||
$ci->load->model('web/m_member');
|
||||
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
$row_count = count($arr_comment);
|
||||
if($row_count > 0) {
|
||||
foreach($arr_comment as $val) {
|
||||
$content_type = $val['content_type'];
|
||||
$comment_reg_date = $val['reg_date'];
|
||||
$comment_reg_date = substr($comment_reg_date, 0, 10);
|
||||
$comment_status = $val['comment_status'];
|
||||
$comment = $val['comment'];
|
||||
$comment_del_date = $val['del_date'];
|
||||
$is_best = $val['is_best'];
|
||||
$c_sns_name = $val['sns_name'];
|
||||
$write_id = $val['write_id'];
|
||||
|
||||
$comment_txt = $comment;
|
||||
if($comment_status!='1') {
|
||||
$comment_txt = '<div style="color:#bcbcbc;"><img src="/img/web/icon_info.gif"> '.$comment.'</div><div class="r_date" style="margin-top:5px;color:#bcbcbc;">'.$comment_del_date.'</div>';
|
||||
}
|
||||
if($is_best=='Y') $comment_txt = '<label>BEST</label>'.$comment_txt;
|
||||
|
||||
$arr_member = $ci->m_member->member_where_member_id_select($write_id);
|
||||
$member_img = '/img/web/img_profile_l.png';
|
||||
if(isset($arr_member['member_img'])==true) $member_img = $arr_member['member_img'];
|
||||
|
||||
$name_header = '<img src="'.(empty($member_img)? '/files/img/web/img_photo.png': $member_img).'" width="16" height="16"> ';
|
||||
if($c_sns_name !='cm') {
|
||||
$name_header = '<img src="/img/web/img_'.$c_sns_name.'_on.gif"> ';
|
||||
}
|
||||
|
||||
//$write_name = $val['write_name'];
|
||||
$write_name = !empty($val['member_nickname']) ? $val['member_nickname'] : iconv_substr($val['member_id'], 0, 4, "utf-8") . "***";
|
||||
|
||||
?>
|
||||
<ul class="box_wrap">
|
||||
<li class="img_reply"><img src="/img/web/img_reply1.gif"></li>
|
||||
<li>
|
||||
<div class="r_info">
|
||||
<span class="beachblue">
|
||||
<?=$name_header?>
|
||||
<?
|
||||
if($comment_sns_id=='') {
|
||||
echo $write_name;
|
||||
} else {
|
||||
if($content_type == '1' || $content_type == '2') {
|
||||
?>
|
||||
<a href="javascript:user_comment('<?=$val['write_id']?>', '<?=$val['write_name']?>');" style="color: #2bbec6 !important;"><?=$write_name?></a>
|
||||
|
||||
<? } else {
|
||||
if($comment_sns_id!=$val['write_id']) {
|
||||
echo $write_name;
|
||||
} else {
|
||||
?>
|
||||
<a href="javascript:user_comment('<?=$val['write_id']?>', '<?=$val['write_name']?>');" style="color: #2bbec6 !important;"><?=$write_name?></a>
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<span class="r_date"><?=$comment_reg_date?>
|
||||
<? if($comment_status==1) {?>
|
||||
<? if($comment_sns_id!=$val['write_id']){?><span style="color:#e1e2e2;padding-left:10px;"> |</span> <a href="javascript:comment_spam('<?=$val['idx']?>', '<?=$val['write_name']?>')">신고</a><?}?>
|
||||
<? if($comment_sns_id==$val['write_id']){?><span style="color:#e1e2e2;padding-left:10px;"> |</span> <a href="javascript:reply_comment_del('<?=$val['idx']?>','<?=$val['p_idx']?>');">삭제</a> <?}?>
|
||||
<? }?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="r_base">
|
||||
<span><?=$comment_txt?></span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="icons2">
|
||||
<span class="thumbup2"><a href="javascript:comment_like_select(1, '<?=$val['idx']?>')"><img src="/img/web/img_thumbup.jpg"></a><span id="comment_like1_<?=$val['idx']?>"><?=number_format($val['like_count'])?></span></span>
|
||||
<span class="thumbdown2"><a href="javascript:comment_like_select(2, '<?=$val['idx']?>')"><img src="/img/web/img_thumbdown.jpg"></a><span id="comment_like2_<?=$val['idx']?>"><?=number_format($val['bad_count'])?></span></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<?
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
echo '|||||'.$total_count.'|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||댓글가져오기를 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
117
application/views/web/comm/comment_spam_layer_inc.php
Executable file
117
application/views/web/comm/comment_spam_layer_inc.php
Executable file
@@ -0,0 +1,117 @@
|
||||
|
||||
<?php
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
?>
|
||||
|
||||
<!-- 댓글 신고 -->
|
||||
<div id="comment_spam_layer" style="display:none;">
|
||||
<input type="hidden" name="comment_spam_idx" id="comment_spam_idx">
|
||||
<div class="popup_wrap" style="position: fixed">
|
||||
<div class="popupbox trc" style=" width:445px; ">
|
||||
<div class="popuptop">
|
||||
<h3 class="p_title">신고하기 </h3>
|
||||
<span class="btn-close"><a href="javascript:commonLayerClose('comment_spam_layer')"><img src="/img/web/btn-close.png"></a></span>
|
||||
</div>
|
||||
<div class="popupbody">
|
||||
<dl class="bgb notice2 pd30 ft16">
|
||||
<dt>신고대상</dt>
|
||||
<dd id="comment_write_name_txt"></dd>
|
||||
<dt style="padding-top:6px;">내용</dt>
|
||||
<dd class="info_forms">
|
||||
<div class="form-group">
|
||||
<input type="text" name="spam_reason_content" id="spam_reason_content" class="form-control" placeholder="간략 내용이 들어갑니다." style="width:97%;">
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="ft18 pd30 beachblue">신고를 원하시는 이유를 선택해 주세요.</div>
|
||||
<dl class="bgb notice_list ft16">
|
||||
<dt>부적절한 홍보 게시물</dt>
|
||||
<dd><input type="radio" name="spam_reason_type" id="spam_reason_type1" value="1" checked=""></dd>
|
||||
<dt>음란성 혹은 청소년에게 유해</dt>
|
||||
<dd><input type="radio" name="spam_reason_type" id="spam_reason_type2" value="2" ></dd>
|
||||
<dt>명예훼손 혹은 저작권 침해</dt>
|
||||
<dd><input type="radio" name="spam_reason_type" id="spam_reason_type3" value="3" ></dd>
|
||||
</dl>
|
||||
<div class="form-group" style="margin:30px 0; display:block; text-align:center">
|
||||
<button type="button" class="btn btn-success br20" style="padding:10px 50px; font-size:16px" onclick="comment_spam_proc();">확인</button>
|
||||
<button type="button" class="btn btn-default_bb br20" style="padding:10px 50px; font-size:16px " onclick="commonLayerClose('comment_spam_layer')">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mask"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
// 댓글 신고
|
||||
function comment_spam(idx, write_name){
|
||||
if("<?=$SES_MEMBER_ID?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
//$("html, body").scrollTop(0);
|
||||
|
||||
$("#comment_spam_layer").toggle();
|
||||
$("#comment_write_name_txt").html(write_name);
|
||||
$("#comment_spam_idx").val(idx);
|
||||
$("#spam_reason_content").val('');
|
||||
$('input:radio[name="spam_reason_type"][value="1"]').prop('checked', true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function comment_spam_proc(){
|
||||
var idx = $("#comment_spam_idx").val();
|
||||
if(idx == '') {
|
||||
alert("신고하기에 실패되었습니다.");
|
||||
$("#comment_spam_layer").toggle();
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#spam_reason_content").val()== '') {
|
||||
alert("신고내용을 입력해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var form_data = {
|
||||
"comment_idx" : idx,
|
||||
"spam_reason_content" : $("#spam_reason_content").val(),
|
||||
"spam_reason_type" : $(":input:radio[name=spam_reason_type]:checked").val()
|
||||
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/comment_spam_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
alert("신고되었습니다.");
|
||||
$("#comment_spam_layer").toggle();
|
||||
return false;
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
302
application/views/web/comm/delivery_inc.php
Executable file
302
application/views/web/comm/delivery_inc.php
Executable file
@@ -0,0 +1,302 @@
|
||||
<?
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$SES_MEMBER_NICNAME = $this->session->userdata('C_Member_Nicname');
|
||||
|
||||
$controller = $this->uri->segment(2);
|
||||
|
||||
$ci=& get_instance();
|
||||
|
||||
$ci->load->model('web/m_delivery');
|
||||
$ci->load->model('web/m_life');
|
||||
|
||||
# 채널
|
||||
$req_data = array();
|
||||
$req_data['content_type'] = '3';
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 15;
|
||||
$req_data['member_id'] = $SES_MEMBER_ID;
|
||||
|
||||
# model
|
||||
$list = $ci->m_delivery->delivery_join_channel_list($req_data);
|
||||
$total_count = $ci->m_delivery->delivery_join_channel_list_total_count($req_data);
|
||||
|
||||
?>
|
||||
|
||||
<div id="delivery_layer" style="display:none;">
|
||||
<div class="popup_wrap2_d" style="z-index:9998;">
|
||||
<div class="popupbox2" style="width:810px;">
|
||||
<div class="popuptop3_d">
|
||||
<h3 class="p_title2"><strong><?=$SES_MEMBER_NICNAME?></strong> 님의 배달함 <a href="javascript:change_delivery_type('3')"><span style="padding-left:40px;" class="current" id="delivery_menu3">채널</span></a> | <a href="javascript:change_delivery_type('2')"><span id="delivery_menu2">칼럼</span></a> | <a href="javascript:change_delivery_type('9')"><span id="delivery_menu9">태그</span></a></h3>
|
||||
<span class="btn-info"><a href="javascript:change_help()"><img src="/img/web/btn-info.png"></a></span>
|
||||
<span class="btn-close"><a href="javascript:change_toggle('delivery_layer')"><img src="/img/web/btn-close2.png"></a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="popupbody3_d">
|
||||
<div class="pop_tit">
|
||||
<span id="delivery_text">배달받는 채널 수</span> <span class="beachblue" id="delivery_count"><?=number_format($total_count)?></span>
|
||||
<span class="fr pop_box_d"><a href="javascript:delivery_arr_del()">전체삭제</a></span>
|
||||
</div>
|
||||
<div id="delivery_list">
|
||||
<?
|
||||
foreach ($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$article_count = $val['article_count'];
|
||||
$delivery_count = $val['delivery_count'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$main_idx = $val['main_idx'];
|
||||
$content_type = $val['content_type'];
|
||||
|
||||
$now_date = date("Y-m-d").' 00:00:00';
|
||||
|
||||
|
||||
$delivery_title = $val['channel_name'];
|
||||
$main_img = $val['channel_icon'];
|
||||
$req_data = array();
|
||||
$req_data['channel_idx'] = $val['main_idx'];
|
||||
$delivery_row = $ci->m_life->life_where_channel_idx_list_limit1($req_data);
|
||||
$display_date = $delivery_row['display_date'];
|
||||
$delivery_row_display_date_txt = substr($display_date, 0, 16);
|
||||
|
||||
$article_view_url = '/web/life/life_view/'.$delivery_row['idx'];
|
||||
$view_url = '/web/life/channel/'.$main_idx;
|
||||
|
||||
$req_data = array();
|
||||
$req_data['channel_idx'] = $val['main_idx'];
|
||||
$req_data['now_date'] = $now_date;
|
||||
|
||||
$delivery_today_count = $ci->m_life->life_where_display_date_channel_idx_count($req_data);
|
||||
|
||||
|
||||
?>
|
||||
<div class="pop_cont_box_d">
|
||||
<input type="text" name="copy_delivery_url<?=$idx?>" id="copy_delivery_url<?=$idx?>" style="position:absolute;top:-9999em;" value="<?=WWW_CROSSMAP?><?=$view_url?>">
|
||||
<input type="hidden" name="is_del[]" value="<?=$idx?>">
|
||||
<div class="pop_cont_title_d">
|
||||
<a href="<?=$article_view_url?>"><?=$delivery_row['title']?></a>
|
||||
<p class="popup_date_d"><?=$delivery_row_display_date_txt?></p>
|
||||
</div>
|
||||
<div class="pop_cont_txt">
|
||||
<span class="pop_cont_img_d" style="padding-top: 10px">
|
||||
<div onclick="location.href='<?=$view_url?>'" style="border-radius:50px;cursor:pointer;width:50px;height:50px;background:url('<?=$main_img?>') no-repeat center; background-size:cover;"></div>
|
||||
</span>
|
||||
<div class="pop_cont_txt_box_d">
|
||||
<p class="t_black"><a href="<?=$view_url?>"><?=$delivery_title?></a> <? if($delivery_today_count>0) {?><span class="pop_cont_like_d"><?=number_format($delivery_today_count)?>+</span><? }?></p>
|
||||
<p><span class="beachblue"><?=number_format($article_count)?></span>개의 글이 있습니다. <span style="padding:0 10px;">|</span> <span class="beachblue"><?=number_format($delivery_count)?></span>명에게 배달 중</p>
|
||||
</div>
|
||||
<div class="pop_cont_info_d">
|
||||
<span class="fr"><a href="javascript:change_toggle('delivery_info<?=$idx?>')"><img src="/img/web/pop_info.png"></a></span>
|
||||
<ul class="info_popup_d" id="delivery_info<?=$idx?>" style="display:none">
|
||||
<li><a href="javascript:delivery_del('<?=$idx?>');">삭제하기</a></li>
|
||||
<li style="border-top:1px solid #ededed"><a href="javascript:copy_delivery_url('<?=$idx?>');">링크복사</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? }?>
|
||||
</div>
|
||||
|
||||
<? $more_btn_style = 'style="display:block"';
|
||||
if($total_count <= count($list)) {
|
||||
$more_btn_style = 'style="display:none"';
|
||||
echo '<div style="height:50px"></div>';
|
||||
}
|
||||
?>
|
||||
<div class="btn btn-default btn_life" id="delivery_more_btn" <?=$more_btn_style?>>
|
||||
<a href="javascript:delivery_list('');">더보기 </a><img src="/img/web/img_replyopen.gif">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mask" style="z-index: 9997"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="delivery_info3" id="delivery_help" style="z-index:9999;top:195px;left:895px;width:200px;display:none">
|
||||
<p class="d_info_tit" style="text-align:center; margin:10px 0">배달함 도움말</p>
|
||||
<p class="d_info_txt" style="margin-bottom: 15px;display: inline-block;"> 채널 배달받기를 하고 있는 나만의배달리스트를 관리 할수 있습니다. </p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
// 레이어 이외의 공간 클릭시 close
|
||||
$(document).mouseup(function (e){
|
||||
var container = $("#delivery_help");
|
||||
if( container.has(e.target).length === 0) container.hide();
|
||||
});
|
||||
|
||||
$(".mask").on('click', function(event){
|
||||
$(event.target).parent().hide();
|
||||
|
||||
});
|
||||
|
||||
var help_type = 1;
|
||||
function change_help(){
|
||||
|
||||
if(help_type ==1) {
|
||||
$("#delivery_help").css("display","block");
|
||||
help_type = 2;
|
||||
} else {
|
||||
$("#delivery_help").css("display","none");
|
||||
help_type = 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
var delivery_content_type = '3';
|
||||
function change_delivery_type(content_type) {
|
||||
$('#delivery_menu3').removeClass('current');
|
||||
$('#delivery_menu2').removeClass('current');
|
||||
$('#delivery_menu9').removeClass('current');
|
||||
$('#delivery_menu'+content_type).addClass('current');
|
||||
|
||||
delivery_page = 1;
|
||||
delivery_content_type = content_type;
|
||||
delivery_list(content_type);
|
||||
|
||||
var text = '배달받는 채널 수';
|
||||
if(content_type == '2') {
|
||||
text = '배달받는 칼럼 수';
|
||||
} else if(content_type == '3') {
|
||||
text = '배달받는 채널 수';
|
||||
} else if(content_type == '9') {
|
||||
text = '배달받는 태그 수';
|
||||
}
|
||||
$("#delivery_text").html(text);
|
||||
|
||||
}
|
||||
|
||||
|
||||
var delivery_page = 2;
|
||||
function delivery_list(content_type){
|
||||
if(content_type == '') content_type = delivery_content_type;
|
||||
|
||||
console.log(content_type);
|
||||
var form_data = {
|
||||
"page" : delivery_page,
|
||||
"content_type" : content_type
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/delivery_list',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'HTML',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml=='') return false;
|
||||
var arrHtml = rtnHtml.split("|||||");
|
||||
if(arrHtml[0].trim()=='0000') {
|
||||
if(delivery_page == 1) {
|
||||
$("#delivery_list").html(arrHtml[1]);
|
||||
} else {
|
||||
$("#delivery_list").append(arrHtml[1]);
|
||||
}
|
||||
var total_count = setComma(arrHtml[2]);
|
||||
$("#delivery_count").html(total_count);
|
||||
|
||||
if (arrHtml[3] == "N") {
|
||||
$("#delivery_more_btn").hide();
|
||||
} else {
|
||||
$("#delivery_more_btn").show();
|
||||
}
|
||||
delivery_page++;
|
||||
|
||||
} else {
|
||||
alert(arrHtml[1]);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('데이터 가져오기에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delivery_del(idx){
|
||||
var form_data = {
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/delivery_del_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
delivery_page = 1;
|
||||
delivery_list(delivery_content_type);
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('삭제에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function delivery_arr_del(){
|
||||
if(confirm("배달함이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
var checkbox_del = [];
|
||||
$("input[name='is_del[]']").each(function(idx){
|
||||
checkbox_del.push($(this).val());
|
||||
});
|
||||
var form_data = {
|
||||
"idxs" : checkbox_del
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/delivery_arr_del_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
delivery_page = 1;
|
||||
delivery_list(delivery_content_type);
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('삭제에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
} else { //취소
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function copy_delivery_url(idx){
|
||||
$('#copy_delivery_url'+idx).select();
|
||||
try {
|
||||
document.execCommand('copy');
|
||||
alert("주소가 복사되었습니다.")
|
||||
} catch (err) {
|
||||
alert('이 브라우저는 지원하지 않습니다.')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
143
application/views/web/comm/delivery_list.php
Executable file
143
application/views/web/comm/delivery_list.php
Executable file
@@ -0,0 +1,143 @@
|
||||
<?
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
$row_count = count($list);
|
||||
if($row_count > 0) {
|
||||
|
||||
$ci=& get_instance();
|
||||
$ci->load->model('web/m_life');
|
||||
$ci->load->model('web/m_column');
|
||||
$ci->load->model('web/m_tag');
|
||||
foreach ($list as $val) {
|
||||
|
||||
$idx = $val['idx'];
|
||||
$delivery_count = $val['delivery_count'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$main_idx = $val['main_idx'];
|
||||
$content_type = $val['content_type'];
|
||||
|
||||
$now_date = date("Y-m-d").' 00:00:00';
|
||||
|
||||
if($content_type == '2') {
|
||||
$article_count = $val['article_count'];
|
||||
$delivery_title = $val['partner_name'];
|
||||
$main_img = $val['partner_img'];
|
||||
|
||||
$req_data = array();
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 1;
|
||||
$req_data['sort_column'] = 'display_date';
|
||||
$req_data['search_type'] = 'partner_idx';
|
||||
$req_data['search_key'] = $val['main_idx'];
|
||||
$delivery_row = $ci->m_column->column_list($req_data);
|
||||
|
||||
$delivery_row_display_date_txt = ''; $title=''; $article_view_url='';
|
||||
if(count($delivery_row) > 0) {
|
||||
$display_date = $delivery_row[0]['display_date'];
|
||||
$delivery_row_display_date_txt = substr($display_date, 0, 16);
|
||||
$title = $delivery_row[0]['title'];
|
||||
$article_view_url = '/web/news/column_view/'.$delivery_row[0]['idx'];
|
||||
}
|
||||
|
||||
$view_url = '/web/news/columnist/'.$main_idx;
|
||||
|
||||
$req_data = array();
|
||||
$req_data['partner_idx'] = $val['main_idx'];
|
||||
$req_data['now_date'] = $now_date;
|
||||
|
||||
$delivery_today_count = $ci->m_column->column_where_display_date_partner_idx_count($req_data);
|
||||
|
||||
|
||||
} else if($content_type == '3') {
|
||||
$article_count = $val['article_count'];
|
||||
$delivery_title = $val['channel_name'];
|
||||
$main_img = $val['channel_icon'];
|
||||
|
||||
|
||||
$req_data = array();
|
||||
$req_data['channel_idx'] = $val['main_idx'];
|
||||
$delivery_row = $ci->m_life->life_where_channel_idx_list_limit1($req_data);
|
||||
$display_date = $delivery_row['display_date'];
|
||||
$delivery_row_display_date_txt = substr($display_date, 0, 16);
|
||||
|
||||
$article_view_url = '/web/life/life_view/'.$delivery_row['idx'];
|
||||
$view_url = '/web/life/channel/'.$main_idx;
|
||||
|
||||
$req_data = array();
|
||||
$req_data['channel_idx'] = $val['main_idx'];
|
||||
$req_data['now_date'] = $now_date;
|
||||
|
||||
$delivery_today_count = $ci->m_life->life_where_display_date_channel_idx_count($req_data);
|
||||
|
||||
$title = $delivery_row['title'];
|
||||
|
||||
} else if($content_type == '9') {
|
||||
$delivery_title = '#'.$main_idx;
|
||||
$main_img = '';
|
||||
|
||||
$req_data = array();
|
||||
$req_data['tag'] = $val['main_idx'];
|
||||
$delivery_row = $ci->m_tag->tag_join_life_where_tag_list_limit1($req_data);
|
||||
$article_count = $ci->m_tag->tag_join_life_where_tag_count($req_data);
|
||||
|
||||
$display_date = $delivery_row['display_date'];
|
||||
$delivery_row_display_date_txt = substr($display_date, 0, 16);
|
||||
|
||||
|
||||
$req_data = array();
|
||||
$req_data['tag'] = $val['main_idx'];
|
||||
$req_data['now_date'] = $now_date;
|
||||
|
||||
$delivery_today_count = $ci->m_tag->tag_join_life_where_display_date_count($req_data);
|
||||
|
||||
$article_view_url = '/web/life/life_view/'.$delivery_row['idx'];
|
||||
$view_url = '/web/life/tag/'.$main_idx;
|
||||
|
||||
$title = $delivery_row['title'];
|
||||
$title = mb_strimwidth($title, '0', '200', '..', 'utf-8');
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<div class="pop_cont_box_d">
|
||||
<input type="text" name="copy_delivery_url<?=$idx?>" id="copy_delivery_url<?=$idx?>" style="position:absolute;top:-9999em;" value="<?=WWW_CROSSMAP?><?=$view_url?>">
|
||||
<input type="hidden" name="is_del[]" value="<?=$idx?>">
|
||||
<? if(count($delivery_row) > 0) { ?>
|
||||
<div class="pop_cont_title_d">
|
||||
<a href="<?=$article_view_url?>"><?=$title?></a>
|
||||
<p class="popup_date_d"><?=$delivery_row_display_date_txt?></p>
|
||||
</div>
|
||||
<? }?>
|
||||
<div class="pop_cont_txt">
|
||||
<? if($main_img!='') {?>
|
||||
<span class="pop_cont_img_d" style="padding-top: 10px">
|
||||
<div onclick="location.href='<?=$view_url?>'" style="border-radius:50px;cursor:pointer;width:50px;height:50px;background:url('<?=$main_img?>') no-repeat center; background-size:cover;"></div>
|
||||
</span>
|
||||
<? }?>
|
||||
<div class="pop_cont_txt_box_d">
|
||||
<p class="t_black"><a href="<?=$view_url?>"><?=$delivery_title?></a> <? if($delivery_today_count>0) {?><span class="pop_cont_like_d"><?=number_format($delivery_today_count)?>+</span><? }?></p>
|
||||
<p><span class="beachblue"><?=number_format($article_count)?></span>개의 글이 있습니다. <span style="padding:0 10px;">|</span> <span class="beachblue"><?=number_format($delivery_count)?></span>명에게 배달 중</p>
|
||||
</div>
|
||||
<div class="pop_cont_info_d">
|
||||
<span class="fr"><a href="javascript:change_toggle('delivery_info<?=$idx?>')"><img src="/img/web/pop_info.png"></a></span>
|
||||
<ul class="info_popup_d" id="delivery_info<?=$idx?>" style="display:none;">
|
||||
<li><a href="javascript:delivery_del('<?=$idx?>');">삭제하기</a></li>
|
||||
<li style="border-top:1px solid #ededed"><a href="javascript:copy_delivery_url('<?=$idx?>');">링크복사</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? }
|
||||
|
||||
}
|
||||
|
||||
if($more_list=='N') echo '<div style="height:50px"></div>';
|
||||
|
||||
echo '|||||'.$total_count.'|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||데이터 가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
63
application/views/web/comm/footer.php
Executable file
63
application/views/web/comm/footer.php
Executable file
@@ -0,0 +1,63 @@
|
||||
<div class="footer">
|
||||
<div class="container">
|
||||
<div class="ftLogo"><a href="/"><img src="/renew2/img/logo.svg" alt="크로스맵"></a></div>
|
||||
<ul>
|
||||
<li><a href="https://hwttjung.wixsite.com/mysite-1" target="https://hwttjung.wixsite.com/mysite-1">회사소개</a></li>
|
||||
<li><a href="/web/rules/privacy">개인정보 취급방침</a></li>
|
||||
<li><a href="/web/rules/service">이용약관</a></li>
|
||||
<li><a href="/web/cs/notice">고객센터</a></li>
|
||||
<li><a href="https://ko-kr.facebook.com/crossmapkr/" target="_blank"><i class="fab fa-facebook-f"></i>페이스북</a></li>
|
||||
<li><a href="https://www.instagram.com/crossmapkr/?hl=ko" target="_blank"><i class="fab fa-instagram"></i>인스타그램</a></li>
|
||||
</ul>
|
||||
<div class="copy">Copyright © All rights reserved.</div>
|
||||
</div>
|
||||
</div>
|
||||
<?/*
|
||||
<div class="container">
|
||||
<div class="address">서울시 성북구 안암로 53 (안암동5가 1136) | Tel : 02) 598-4564 | Fax : 02) 6008-4204</div>
|
||||
</div>
|
||||
*/?>
|
||||
<!--footer end-->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.1/min/tiny-slider.js"></script>
|
||||
<!-- <script src="/renew2/js/script.js"></script> -->
|
||||
<script src="/js/script.js"></script>
|
||||
<!--[if (lt IE 9)]>
|
||||
<script>
|
||||
var sheets = document.styleSheets;
|
||||
for (var i = 0, l = sheets.length; i < l; i++) {
|
||||
sheets[i].disabled = true;
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
body { font-family: Helvetica, Arial, sans-serif; }
|
||||
@media \0screen { img { width: auto; } }
|
||||
img {
|
||||
border: 0;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
<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>
|
||||
<!-- Default Statcounter code for Crossmap.co.kr
|
||||
http://crossmap.co.kr -->
|
||||
<script type="text/javascript">
|
||||
var sc_project=10767957;
|
||||
var sc_invisible=1;
|
||||
var sc_security="0cf2c0fe";
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="https://www.statcounter.com/counter/counter.js"
|
||||
async></script>
|
||||
<noscript><div class="statcounter"><a title="Web Analytics"
|
||||
href="https://statcounter.com/" target="_blank"><img
|
||||
class="statcounter"
|
||||
src="//c.statcounter.com/10767957/0/0cf2c0fe/1/" alt="Web
|
||||
Analytics"></a></div></noscript>
|
||||
<!-- End of Statcounter Code -->
|
||||
</body>
|
||||
</html>
|
||||
199
application/views/web/comm/kmc_mobile_auth.php
Executable file
199
application/views/web/comm/kmc_mobile_auth.php
Executable file
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
header("Pragma: no-cache");
|
||||
header("Cache-Control: no-cache,must-revalidate");
|
||||
|
||||
$tr_url = WWW_CROSSMAP.'/web/comm/kmc_callback_proc'; // 본인인증 결과수신 POPUP URL
|
||||
$tr_add = 'Y'; // IFrame사용여부
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<!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" />
|
||||
<script src="/js/jquery-3.3.1.min.js"></script>
|
||||
<script src="/js/web/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<form name="reqKMCISForm" method="post" action="#">
|
||||
<input type="hidden" name="tr_cert" id="tr_cert">
|
||||
<input type="hidden" name="tr_url" id="tr_url" value = "<?=$tr_url?>">
|
||||
<input type="hidden" name="tr_add" id="tr_add" value = "<?=$tr_add?>">
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
function kmc_window_open(mobile, type){
|
||||
var form_data = {
|
||||
"mobile" : mobile,
|
||||
"type" : type
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/kmc_encode_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if(rtnJson.code=='9999') {
|
||||
alert("본인인증에 실패했습니다.");
|
||||
return false;
|
||||
|
||||
} else {
|
||||
$("#tr_cert").val(rtnJson.data);
|
||||
openKMCISWindow();
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('본인인증에 실패했습니다.');
|
||||
return_state = false;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// kmc 본인인증
|
||||
window.name = "kmcis_web";
|
||||
var KMCIS_window;
|
||||
function openKMCISWindow(){
|
||||
var UserAgent = navigator.userAgent;
|
||||
/* 모바일 접근 체크*/
|
||||
// 모바일일 경우 (변동사항 있을경우 추가 필요)
|
||||
if (UserAgent.match(/iPhone|iPod|Android|Windows CE|BlackBerry|Symbian|Windows Phone|webOS|Opera Mini|Opera Mobi|POLARIS|IEMobile|lgtelecom|nokia|SonyEricsson/i) != null || UserAgent.match(/LG|SAMSUNG|Samsung/) != null) {
|
||||
document.reqKMCISForm.target = '';
|
||||
} else { // 모바일이 아닐 경우
|
||||
KMCIS_window = window.open('', 'KMCISWindow', 'width=425, height=550, resizable=0, scrollbars=no, status=0, titlebar=0, toolbar=0, left=435, top=250' );
|
||||
if(KMCIS_window == null){
|
||||
alert(" ※ 윈도우 XP SP2 또는 인터넷 익스플로러 7 사용자일 경우에는 \n 화면 상단에 있는 팝업 차단 알림줄을 클릭하여 팝업을 허용해 주시기 바랍니다. \n\n※ MSN,야후,구글 팝업 차단 툴바가 설치된 경우 팝업허용을 해주시기 바랍니다.");
|
||||
}
|
||||
document.reqKMCISForm.target = 'KMCISWindow';
|
||||
}
|
||||
document.reqKMCISForm.action = 'https://www.kmcert.com/kmcis/web/kmcisReq.jsp';
|
||||
document.reqKMCISForm.submit();
|
||||
}
|
||||
|
||||
|
||||
function mobile_auth_fin(key, name){
|
||||
$("#is_mobile_auth", parent.document).val("Y");
|
||||
$("#mobile_CI", parent.document).val(key);
|
||||
$("#member_name", parent.document).val(name);
|
||||
$('.mobile_auth_btn', parent.document).hide();
|
||||
|
||||
}
|
||||
|
||||
function mobile_auth_password_find_fin(key){
|
||||
var form_data = {
|
||||
"key" : key,
|
||||
"type" : 'mobile'
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/find_password_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if(rtnJson.code=='9999') {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
|
||||
} else {
|
||||
$('#find_pwd_layer', parent.document).hide();
|
||||
$('#find_pwd_fin_layer', parent.document).show();
|
||||
$('#find_pwd_email_text', parent.document).html(rtnJson.data);
|
||||
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('비밀번호 찾기에 실패했습니다 실패했습니다.');
|
||||
return_state = false;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function mobile_auth_id_find_fin(key){
|
||||
var form_data = {
|
||||
"key" : key,
|
||||
"type" : 'mobile'
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/find_id_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if(rtnJson.code=='9999') {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
|
||||
} else {
|
||||
$('#find_id_layer', parent.document).hide();
|
||||
$('#find_id_fin_layer', parent.document).show();
|
||||
$('#find_id_text', parent.document).html(rtnJson.data);
|
||||
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('비밀번호 찾기에 실패했습니다 실패했습니다.');
|
||||
return_state = false;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function mobile_auth_email_check_fin(){
|
||||
$("#is_mobile_auth_email", parent.document).val("Y");
|
||||
$('#email_change_layer2', parent.document).show();
|
||||
$('#email_change_layer1', parent.document).hide();
|
||||
|
||||
}
|
||||
|
||||
function mobile_auth_member_edit_fin(phone){
|
||||
var form_data = {
|
||||
"mobile" : phone
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/member/member_mobile_change_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if(rtnJson.code=='9999') {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
} else {
|
||||
$("#member_edit_mobile", parent.document).val("");
|
||||
$('#mobile_edit_layer', parent.document).hide();
|
||||
$('#member_edit_text', parent.document).html('+82 '+rtnJson.data);
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('모바일폰 변경에 실패했습니다.');
|
||||
return_state = false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
39
application/views/web/comm/kmc_mobile_auth_fin.php
Executable file
39
application/views/web/comm/kmc_mobile_auth_fin.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
header("Pragma: no-cache");
|
||||
header("Cache-Control: no-cache,must-revalidate");
|
||||
|
||||
?>
|
||||
<!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" />
|
||||
<script src="/js/jquery-3.3.1.min.js"></script>
|
||||
<script src="/js/web/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
<? if($type=='find_password') {?>
|
||||
$(opener.location).attr("href", "javascript:mobile_auth_password_find_fin('<?=$CI?>');");
|
||||
<? } else if($type=='find_id') {?>
|
||||
$(opener.location).attr("href", "javascript:mobile_auth_id_find_fin('<?=$CI?>');");
|
||||
<? } else if($type=='email_check') {?>
|
||||
$(opener.location).attr("href", "javascript:mobile_auth_email_check_fin();");
|
||||
<? } else if($type=='member_edit') {?>
|
||||
$(opener.location).attr("href", "javascript:mobile_auth_member_edit_fin('<?=$phone?>');");
|
||||
<? } else {?>
|
||||
$(opener.location).attr("href", "javascript:mobile_auth_fin('<?=$CI?>', '<?=$name?>');");
|
||||
<? }?>
|
||||
self.close();
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
9
application/views/web/comm/mail_template.php
Executable file
9
application/views/web/comm/mail_template.php
Executable file
@@ -0,0 +1,9 @@
|
||||
|
||||
<div style="font-family: Roboto, 'Segoe UI',Arial,'Malgun Gothic',Gulim,sans-serif; letter-spacing: -1px;">
|
||||
<a href="<?=WWW_CROSSMAP?>" style="display: block; background: #12202d; padding: 15px; height: 40px;"><img src="<?=WWW_CROSSMAP?>/img/logotop.png" title="크로스맵" style="height: 25px;"></a>
|
||||
<div style="padding: 30px 0; border-bottom: 2px solid #ddd; font-size: 14px; line-height: 1.5em; color: #888;">
|
||||
<?=$content?>
|
||||
</div>
|
||||
<a href="<?=WWW_CROSSMAP?>" style="display: block; padding: 30px 0; text-align: left;"><img src="<?=WWW_CROSSMAP?>/img/maillogos.png" title="크로스맵" style="height: 20px;"></a>
|
||||
</div>
|
||||
|
||||
1773
application/views/web/comm/member_inc.php
Executable file
1773
application/views/web/comm/member_inc.php
Executable file
File diff suppressed because it is too large
Load Diff
27
application/views/web/comm/mybox_inc.php
Executable file
27
application/views/web/comm/mybox_inc.php
Executable file
@@ -0,0 +1,27 @@
|
||||
|
||||
<div class="mypage_opened" id="mybox" style="z-index:9997;display:none">
|
||||
<div class="mypage_opened_box">
|
||||
<div class="mypage_opened_info">
|
||||
<div class="opened_arrow"><img src="/img/web/opened_arrow.png"></div>
|
||||
<div class="profile2">
|
||||
<span class="profile_l"><a href="javascript:commonLayerOpen('passwd_check_layer')"><img src="<?=$SES_MEMBER_PROFILE?>" width="47" height="47"></a></span>
|
||||
<span class="carmera"><img src="/img/web/img_camera.png"></span>
|
||||
</div>
|
||||
<div class="profile_detail" >
|
||||
<span class="name"><a href="javascript:commonLayerOpen('passwd_check_layer')"><?=$SES_MEMBER_NICNAME?></a></span> 님
|
||||
<div style="color:#000 padding-top:10px "><span class="beachblue beauchblue_underline"><a href="javascript:commonLayerOpen('passwd_check_layer')">내정보</a></span><span class="grey"></span> <?=$SES_MEMBER_GROUPNAME?></div>
|
||||
<p class="introduction"><?=$SES_MEMBER_INTRO?></p>
|
||||
</div>
|
||||
<div class="logout">
|
||||
<span class="btn"><a href="/web/member/logout_proc">로그아웃</a></span>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="mypage_menu">
|
||||
<li><a href="/web/cs/notice">알림</a></li>
|
||||
<li><a href="javascript:change_toggle('delivery_layer')">배달함 </a></li>
|
||||
<li><a href="javascript:user_comment('<?=$SES_MEMBER_ID?>', '<?=$SES_MEMBER_NICNAME?>');">내댓글</a></li>
|
||||
<li> <a href="/web/mypage/bookmark">북마크</a></li>
|
||||
<li> <a href="/m/" target="_blank">모바일 보기</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
57
application/views/web/comm/popup_body.php
Executable file
57
application/views/web/comm/popup_body.php
Executable file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
header("Pragma: no-cache");
|
||||
header("Cache-Control: no-cache,must-revalidate");
|
||||
?>
|
||||
|
||||
<!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" />
|
||||
<title><?=$title?></title>
|
||||
<link rel="shortcut icon" href="/img/shortcut_icon.png">
|
||||
<link rel="apple-touch-icon" href="/img/shortcut_icon.png">
|
||||
<link rel="apple-touch-startup-image" href="/img/shortcut_icon.png">
|
||||
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/web/common.css?<?=time()?>"/>
|
||||
<link rel="stylesheet" type="text/css" href="/css/web/news.css?<?=time()?>"/>
|
||||
<link rel="stylesheet" type="text/css" href="/css/web/channel.css?<?=time()?>"/>
|
||||
<link rel="stylesheet" type="text/css" href="/css/web/life.css?<?=time()?>"/>
|
||||
<link rel="stylesheet" type="text/css" href="/css/web/search.css?<?=time()?>"/>
|
||||
<script src="/js/jquery-3.3.1.min.js"></script>
|
||||
<script src="/js/web/common.js?<?=time()?>"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="popup_warp"><?=$content?></div>
|
||||
<div class="pop_todaynone"><input type="checkbox" id="popup_check" name="popup_check" onclick="javascript:close_popup('<?=$idx?>');"> 오늘하루 보지 않기</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
$("#popup_warp img").click(function(){
|
||||
window.open( "<?=$link_url?>");
|
||||
self.close();
|
||||
});
|
||||
$("#popup_warp img").css('cursor', 'pointer');
|
||||
|
||||
|
||||
// 창닫기
|
||||
function close_popup(key) {
|
||||
setCookie("popup"+key, 'N');
|
||||
self.close();
|
||||
}
|
||||
|
||||
function setCookie(name, value, expiredays){
|
||||
var todayDate = new Date();
|
||||
todayDate.setDate (todayDate.getDate() + expiredays);
|
||||
document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
</html>
|
||||
62
application/views/web/comm/popup_inc.php
Executable file
62
application/views/web/comm/popup_inc.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<script>
|
||||
function getCookie( name ) {
|
||||
var nameOfCookie = name + "=";
|
||||
var x = 0;
|
||||
while ( x <= document.cookie.length )
|
||||
{
|
||||
var y = (x+nameOfCookie.length);
|
||||
if ( document.cookie.substring( x, y ) == nameOfCookie ) {
|
||||
if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
|
||||
endOfCookie = document.cookie.length;
|
||||
return unescape( document.cookie.substring( y, endOfCookie ) );
|
||||
}
|
||||
x = document.cookie.indexOf( " ", x ) + 1;
|
||||
if ( x == 0 )
|
||||
break;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$controller = $this->uri->segment(2);
|
||||
$method = $this->uri->segment(3);
|
||||
|
||||
$ci=& get_instance();
|
||||
$popup_menu_code = '';
|
||||
if($controller == '' && $method == '') $popup_menu_code = '1';
|
||||
if($controller == 'life' && $method == '') $popup_menu_code = '3';
|
||||
if($controller == 'news' && $method == '') $popup_menu_code = '4';
|
||||
|
||||
if($popup_menu_code!='') {
|
||||
$now_date = date("Y-m-d H:i:s");
|
||||
|
||||
$req_data = array();
|
||||
$req_data['menu_code'] = $popup_menu_code;
|
||||
$req_data['now_date'] = $now_date;
|
||||
|
||||
$ci->load->model('web/m_popup');
|
||||
$list = $ci->m_popup->popup_where_menu_code_list($req_data);
|
||||
foreach ($list as $val) {
|
||||
$top_margin = $val['top_margin'];
|
||||
$left_margin = $val['left_margin'];
|
||||
$width_size = $val['width_size'];
|
||||
$height_size = $val['height_size'];
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var cookie = getCookie('popup<?=$val['idx']?>');
|
||||
if(cookie != 'N') {
|
||||
var w = window.open('/web/comm/popup_body?idx=<?=$val['idx']?>','<?=$val['idx']?>', 'width=<?=$width_size?>, height=<?=$height_size+35?>, left=<?=$left_margin?>, top=<?=$top_margin?>');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<?
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
1
application/views/web/comm/result_html.php
Executable file
1
application/views/web/comm/result_html.php
Executable file
@@ -0,0 +1 @@
|
||||
<?=$result?>
|
||||
1
application/views/web/comm/result_json.php
Executable file
1
application/views/web/comm/result_json.php
Executable file
@@ -0,0 +1 @@
|
||||
<?php echo json_encode($result);?>
|
||||
135
application/views/web/comm/share_box_inc.php
Executable file
135
application/views/web/comm/share_box_inc.php
Executable file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
// $title = str_replace("'", "\\'", $title);
|
||||
// $title = str_replace('"', '\\"', $title);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<input type="hidden" name="share_content" id="share_content" value="<?php echo mb_substr(getMetaDescription($content), 0, 100)?>">
|
||||
<input type="hidden" name="share_title" id="share_title" value="<?php echo addslashes($title)?>">
|
||||
<input type="hidden" name="share_copy_url" id="share_copy_url" value="<?=CROSSMAP_URL?>">
|
||||
<input type="hidden" name="share_img_url" id="share_img_url" value="<?php echo imgSrc($main_img) ?>">
|
||||
<div class="popup_share" id="share_box" style="display:none;">
|
||||
<p class="s_close"><a href="javascript:change_toggle('share_box');"><img src="/img/web/img_x.gif"></a></p>
|
||||
<ul>
|
||||
<li><a href="javascript:share_facebook();" class="fb-xfbml-parse-ignore"><img src="/img/web/img_fb.jpg" alt="페이스북"><br>페이스북</a></li>
|
||||
<li><a href="javascript:share_twitter();"><img src="/img/web/img_tw.jpg" alt="트위터"><br>트위터</a></li>
|
||||
<li><a href="javascript:share_kakao();" ><img src="/img/web/img_kk.jpg" alt="카카오톡 "><br>카카오톡</a></li>
|
||||
<li><a href="javascript:share_naver();"><img src="/img/web/img_na.jpg" alt="네이버"><br>네이버</a></li>
|
||||
</ul>
|
||||
<ul style="padding-top:10px; clear:both;">
|
||||
<li><a href="javascript:share_kakaostory();"><img src="/img/web/img_ks.jpg" alt="카카오스토리"><br>카카오스토리 </a></li>
|
||||
<li><a href="javascript:share_band();"><img src="/img/web/img_bd.jpg" alt="밴드"><br>밴드</a></li>
|
||||
<li><a href="javascript:bookmark()"><img src="/img/web/img_bm.jpg" alt="북마크"><br>북마크</a></li>
|
||||
</ul>
|
||||
<div class="s_share">
|
||||
<input type="text" class="s_window" id="copy_url" value="<?=CROSSMAP_URL?>">
|
||||
<button type="button" class="s_src_sumit" onclick="copy_url();">URL복사</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 카카오톡 공유하기 -->
|
||||
<script src="//developers.kakao.com/sdk/js/kakao.min.js"></script>
|
||||
<script type='text/javascript'>
|
||||
// 레이어 이외의 공간 클릭시 close
|
||||
$(document).mouseup(function (e){
|
||||
var container = $("#share_box");
|
||||
if( container.has(e.target).length === 0) container.hide();
|
||||
|
||||
});
|
||||
|
||||
Kakao.init('6ff83d5220e4182ba5f996b2cf6dd52c');
|
||||
function share_kakao() {
|
||||
Kakao.Link.sendDefault({
|
||||
objectType: 'feed',
|
||||
content: {
|
||||
title: $("#share_title").val(),
|
||||
imageUrl: $("#share_img_url").val(),
|
||||
link: {
|
||||
mobileWebUrl: $("#share_copy_url").val(),
|
||||
webUrl: $("#share_copy_url").val()
|
||||
}
|
||||
},
|
||||
buttons: [{
|
||||
title: '웹으로 보기',
|
||||
link: {
|
||||
mobileWebUrl: $("#share_copy_url").val(),
|
||||
webUrl: $("#share_copy_url").val()
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
function share_facebook() {
|
||||
var share_url = $("#share_copy_url").val();
|
||||
var url = encodeURI(share_url);
|
||||
window.open("http://www.facebook.com/sharer/sharer.php?u="+url, "", "height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes");
|
||||
}
|
||||
|
||||
|
||||
|
||||
function share_band(){
|
||||
var share_title = $("#share_title").val()+'\n' +$("#share_copy_url").val();
|
||||
var url = encodeURIComponent($("#share_copy_url").val());
|
||||
var text = encodeURI(share_title);
|
||||
window.open("http://band.us/plugin/share?body=" + text + "&route=" + url, "", "height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes");
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 카카오톡 스토리 공유하기
|
||||
function share_kakaostory() {
|
||||
var share_url = $("#share_copy_url").val();
|
||||
var share_title = $("#share_title").val()+'\n' +$("#share_copy_url").val();
|
||||
Kakao.Story.share({
|
||||
url: share_url,
|
||||
text: share_title,
|
||||
});
|
||||
}
|
||||
|
||||
// 네이버공유하기
|
||||
function share_naver() {
|
||||
var share_url = $("#share_copy_url").val();
|
||||
var share_title = $("#share_title").val();
|
||||
var url = encodeURI(encodeURIComponent(share_url));
|
||||
var title = encodeURI(share_title);
|
||||
var shareURL = "http://share.naver.com/web/shareView.nhn?url=" + url + "&title=" + title;
|
||||
window.open(shareURL, "", "height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes");
|
||||
}
|
||||
|
||||
// 트위터 공유하기
|
||||
function share_twitter() {
|
||||
var share_url = $("#share_copy_url").val();
|
||||
var share_title = $("#share_title").val();
|
||||
|
||||
var url = share_url;
|
||||
var text = encodeURI(share_title);
|
||||
window.open("https://twitter.com/intent/tweet?text=" + text + "&url=" + url, "", "height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
// 주소복사
|
||||
function copy_url(){
|
||||
var copyText = document.getElementById("copy_url");
|
||||
copyText.select();
|
||||
document.execCommand("Copy");
|
||||
alert ("주소가 복사되었습니다.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(".share_btn").unbind("click");
|
||||
$('.share_btn').click(function(e) {
|
||||
$("#share_box").toggle();
|
||||
var popH = $(this).offset().top;
|
||||
$('.popup_share').css('left','55%');
|
||||
$('.popup_share').css('top',popH+'px');
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
139
application/views/web/comm/share_box_inc_test.php
Executable file
139
application/views/web/comm/share_box_inc_test.php
Executable file
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
$title = str_replace("'", "\\'", $title);
|
||||
$title = str_replace('"', '\\"', $title);
|
||||
|
||||
$content_txt = @preg_replace("(\<(/?[^\>]+)\>)", "", $content);
|
||||
$content_txt = strip_tags($content_txt);
|
||||
$content_txt = str_replace("'", "\\'", $content_txt);
|
||||
$content_txt = str_replace('”', '"', $content_txt);
|
||||
$content_txt = mb_strimwidth($content_txt, '0', '250', '..', 'utf-8');
|
||||
|
||||
?>
|
||||
|
||||
<input type="hidden" name="share_content" id="share_content" value="<?=$content_txt?>">
|
||||
<input type="hidden" name="share_title" id="share_title" value="<?=$title?>">
|
||||
<input type="hidden" name="share_copy_url" id="share_copy_url" value="<?=CROSSMAP_URL?>">
|
||||
<input type="hidden" name="share_img_url" id="share_img_url" value="<?=WWW_CROSSMAP?><?=@$main_img?>">
|
||||
<div class="popup_share" id="share_box" style="display:none;">
|
||||
<p class="s_close"><a href="javascript:change_toggle('share_box');"><img src="/img/web/img_x.gif"></a></p>
|
||||
<ul>
|
||||
<li><a href="javascript:share_facebook();" class="fb-xfbml-parse-ignore"><img src="/img/web/img_fb.jpg" alt="페이스북"><br>페이스북</a></li>
|
||||
<li><a href="javascript:share_twitter();"><img src="/img/web/img_tw.jpg" alt="트위터"><br>트위터</a></li>
|
||||
<li><a href="javascript:share_kakao();" ><img src="/img/web/img_kk.jpg" alt="카카오톡 "><br>카카오톡</a></li>
|
||||
<li><a href="javascript:share_naver();"><img src="/img/web/img_na.jpg" alt="네이버"><br>네이버</a></li>
|
||||
</ul>
|
||||
<ul style="padding-top:10px; clear:both;">
|
||||
<li><a href="javascript:share_kakaostory();"><img src="/img/web/img_ks.jpg" alt="카카오스토리"><br>카카오스토리 </a></li>
|
||||
<li><a href="javascript:share_band();"><img src="/img/web/img_bd.jpg" alt="밴드"><br>밴드</a></li>
|
||||
<li><a href="javascript:bookmark()"><img src="/img/web/img_bm.jpg" alt="북마크"><br>북마크</a></li>
|
||||
</ul>
|
||||
<div class="s_share">
|
||||
<input type="text" class="s_window" id="copy_url" value="<?=CROSSMAP_URL?>">
|
||||
<button type="button" class="s_src_sumit" onclick="copy_url();">URL복사</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 카카오톡 공유하기 -->
|
||||
<script src="//developers.kakao.com/sdk/js/kakao.min.js"></script>
|
||||
<script type='text/javascript'>
|
||||
// 레이어 이외의 공간 클릭시 close
|
||||
$(document).mouseup(function (e){
|
||||
var container = $("#share_box");
|
||||
if( container.has(e.target).length === 0) container.hide();
|
||||
|
||||
});
|
||||
|
||||
Kakao.init('6ff83d5220e4182ba5f996b2cf6dd52c');
|
||||
function share_kakao() {
|
||||
Kakao.Link.sendDefault({
|
||||
objectType: 'feed',
|
||||
content: {
|
||||
title: $("#share_title").val(),
|
||||
imageUrl: $("#share_img_url").val(),
|
||||
link: {
|
||||
mobileWebUrl: $("#share_copy_url").val(),
|
||||
webUrl: $("#share_copy_url").val()
|
||||
}
|
||||
},
|
||||
buttons: [{
|
||||
title: '웹으로 보기',
|
||||
link: {
|
||||
mobileWebUrl: $("#share_copy_url").val(),
|
||||
webUrl: $("#share_copy_url").val()
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
function share_facebook() {
|
||||
var share_url = $("#share_copy_url").val();
|
||||
var url = encodeURI(share_url);
|
||||
window.open("http://www.facebook.com/sharer/sharer.php?u="+url, "", "height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes");
|
||||
}
|
||||
|
||||
|
||||
|
||||
function share_band(){
|
||||
var share_title = $("#share_title").val()+'\n' +$("#share_copy_url").val();
|
||||
var url = encodeURIComponent($("#share_copy_url").val());
|
||||
var text = encodeURI(share_title);
|
||||
window.open("http://band.us/plugin/share?body=" + text + "&route=" + url, "", "height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes");
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 카카오톡 스토리 공유하기
|
||||
function share_kakaostory() {
|
||||
var share_url = $("#share_copy_url").val();
|
||||
var share_title = $("#share_title").val()+'\n' +$("#share_copy_url").val();
|
||||
Kakao.Story.share({
|
||||
url: share_url,
|
||||
text: share_title,
|
||||
});
|
||||
}
|
||||
|
||||
// 네이버공유하기
|
||||
function share_naver() {
|
||||
var share_url = $("#share_copy_url").val();
|
||||
var share_title = $("#share_title").val();
|
||||
var url = encodeURI(encodeURIComponent(share_url));
|
||||
var title = encodeURI(share_title);
|
||||
var shareURL = "http://share.naver.com/web/shareView.nhn?url=" + url + "&title=" + title;
|
||||
window.open(shareURL, "", "height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes");
|
||||
}
|
||||
|
||||
// 트위터 공유하기
|
||||
function share_twitter() {
|
||||
var share_url = $("#share_copy_url").val();
|
||||
var share_title = $("#share_title").val();
|
||||
|
||||
var url = share_url;
|
||||
var text = encodeURI(share_title);
|
||||
window.open("https://twitter.com/intent/tweet?text=" + text + "&url=" + url, "", "height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
// 주소복사
|
||||
function copy_url(){
|
||||
var copyText = document.getElementById("copy_url");
|
||||
copyText.select();
|
||||
document.execCommand("Copy");
|
||||
alert ("주소가 복사되었습니다.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
// $(".share_btn").unbind("click");
|
||||
$('.share_btn').click(function(e) {
|
||||
$("#share_box").toggle();
|
||||
var popH = $(this).offset().top;
|
||||
$('.popup_share').css('left','50%');
|
||||
$('.popup_share').css('top',popH+'px');
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
137
application/views/web/comm/side_menu_inc.php
Executable file
137
application/views/web/comm/side_menu_inc.php
Executable file
@@ -0,0 +1,137 @@
|
||||
<?
|
||||
$ci=& get_instance();
|
||||
|
||||
# 오늘의 말씀
|
||||
$now_date = date("Y-m-d");
|
||||
$ci->load->model('web/m_today_word');
|
||||
$arr_today_word = $ci->m_today_word->today_word_where_display_date_select($now_date);
|
||||
$today_word = '하나님이 세상을 이처럼 사랑하사 </br>독생자를 주셨으니 이는 그를 믿는 자마다 </br>멸망하지 않고 영생을 얻게 하려 하심이라';
|
||||
$today_word_title = '요한복음 3장 16절';
|
||||
if(count($arr_today_word)>0) {
|
||||
$today_word = $arr_today_word['word'];
|
||||
$today_word_title = $arr_today_word['title'];
|
||||
}
|
||||
|
||||
|
||||
# 추천앱
|
||||
$req_data = array();
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 15;
|
||||
|
||||
# model - list
|
||||
$ci->load->model('web/m_recommend_app');
|
||||
$arr_recommend_app = $ci->m_recommend_app->recommend_app_list($req_data);
|
||||
|
||||
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$SES_MEMBER_NICNAME = $this->session->userdata('C_Member_Nicname');
|
||||
$SES_MEMBER_PROFILE = $this->session->userdata('C_Member_Profile');
|
||||
$SES_MEMBER_GROUPNAME = $this->session->userdata('C_Member_Group_Name');
|
||||
if($SES_MEMBER_PROFILE=='') $SES_MEMBER_PROFILE = '/img/web/life_profile.png';
|
||||
|
||||
?>
|
||||
|
||||
<!-- side_menu -->
|
||||
<div id="side_menu_layer" style="display:none;top:0px;right:0px;position: absolute;z-index: 9998">
|
||||
<div class="life_menu">
|
||||
<? if($SES_MEMBER_ID=='') {?>
|
||||
<div class="life_menu_top">
|
||||
<h1 class="logo"><img src="/img/web/life_logo.png"></h1>
|
||||
<div class="trc" style="padding:30px 20px 10px; font-size:12px; line-height:20px;">
|
||||
<span><i><?=$today_word?></i></span>
|
||||
<p class="grey" style="font-size:12px; padding-top:10px;"><i>-<?=$today_word_title?>-</i></p></div>
|
||||
<div class="life_menu_btn">
|
||||
<button type="button" class="btn btn-default br20" style="width:100px;color:#a7a7a7" onclick="change_toggle('login_layer');">로그인</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? } else {?>
|
||||
<div class="life_menu_top">
|
||||
<h1 class="logo"><img src="/img/web/life_logo.png"></h1>
|
||||
<div class="profile"><a href="javascript:commonLayerOpen('passwd_check_layer')"><img src="<?=$SES_MEMBER_PROFILE?>" width="73" height="73"></a></div>
|
||||
<p class="beachblue ft16 trc"><a href="javascript:commonLayerOpen('passwd_check_layer')"><?=$SES_MEMBER_NICNAME?></a></p>
|
||||
<div class="trc" style="padding-top:10px"> <span class="grey"></span> <a href="javascript:commonLayerOpen('passwd_check_layer')"><?=$SES_MEMBER_GROUPNAME?></a></div>
|
||||
<div class="life_menu_btn"></div>
|
||||
<ul class="life_cate">
|
||||
<li><img src="/img/web/life_icon2.png"><a href="javascript:user_comment('<?=$SES_MEMBER_ID?>', '<?=$SES_MEMBER_NICNAME?>');change_toggle('side_menu_layer')">내댓글보기</a></li>
|
||||
<li><img src="/img/web/life_bar.gif"></li>
|
||||
<li><img src="/img/web/life_icon3.png"> <a href="/web/mypage/bookmark">북마크</a></li>
|
||||
<li><img src="/img/web/life_bar.gif"></li>
|
||||
<li><img src="/img/web/life_icon1.png"><a href="javascript:change_toggle('delivery_layer');change_toggle('side_menu_layer')">배달함</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
<ul class="life_list_top">
|
||||
<li><a href="/">홈</a></li>
|
||||
<li><a href="/web/life/" class="current">라이프</a></li>
|
||||
<li><a href="/web/news/">뉴스</a></li>
|
||||
|
||||
</ul>
|
||||
<div class="life_app">
|
||||
<h4>추천앱</h4>
|
||||
<ul>
|
||||
<span class="btn_left"><a href="javascript:change_recommend_app_page(-1)"><img src="/img/web/img_aleft_on.gif"></a></span>
|
||||
<?
|
||||
$i=1;
|
||||
$recommend_app_count = count($arr_recommend_app);
|
||||
$recommend_app_page = ceil($recommend_app_count/3);
|
||||
foreach ($arr_recommend_app as $val) {
|
||||
$display_style = 'block';
|
||||
if($i > 3) $display_style = 'none';
|
||||
|
||||
$curr_page = ceil($i/3);
|
||||
|
||||
?>
|
||||
|
||||
<li class="recommend_app_page<?=$curr_page?>" style="display:<?=$display_style?>"><a href="<?=$val['market_url']?>" target="_blank"><img src="<?=$val['icon_img']?>" width="66" height="66"></a><a href="<?=$val['market_url']?>" class="app_txt" target="_blank"><?=$val['app_name']?></a></li>
|
||||
|
||||
<?
|
||||
$i++;
|
||||
}?>
|
||||
|
||||
<span class="btn_right"><a href="javascript:change_recommend_app_page(1)"><img src="/img/web/img_aright.gif"></a></span>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="life_list_bottom">
|
||||
<li><a href="/web/cs/notice">공지사항</a> <span class="new">N</span></li>
|
||||
<li><a href="/web/cs/faq">FAQ</a></li>
|
||||
<? if($SES_MEMBER_ID!='') {?><li><a href="/web/mypage/qna">1:1 문의</a></li><? }?>
|
||||
</ul>
|
||||
<div class="life_menu_btn">
|
||||
<? if($SES_MEMBER_ID=='') {?>
|
||||
<button type="button" class="btn btn-default br20" style="width:100px;color:#a7a7a7" onclick="change_toggle('login_layer');">로그인</button>
|
||||
<? } else {?>
|
||||
<button type="button" class="btn btn-default br20" style="width:100px;color:#a7a7a7" onclick="location.href='/web/member/logout_proc'">로그아웃</button>
|
||||
|
||||
<? }?>
|
||||
</div>
|
||||
<div class="life_menu_btn" style="margin-bottom:80px;">
|
||||
<button type="button" class="btn btn-default br20" style="width:100px;" onClick="window.open('/m/')">모바일 화면</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--// side_menu -->
|
||||
|
||||
|
||||
<script>
|
||||
// 레이어 이외의 공간 클릭시 close
|
||||
$(document).mouseup(function (e){
|
||||
var container = $("#side_menu_layer");
|
||||
if( container.has(e.target).length === 0) container.hide();
|
||||
});
|
||||
|
||||
var recommend_app_curr_page = 1;
|
||||
function change_recommend_app_page(page){
|
||||
var total_page = "<?=$recommend_app_page?>";
|
||||
var move_page = recommend_app_curr_page + page;
|
||||
if(move_page > 0 && total_page >= move_page) {
|
||||
$(".recommend_app_page"+move_page).show();
|
||||
$(".recommend_app_page"+recommend_app_curr_page).hide();
|
||||
recommend_app_curr_page = move_page;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
13
application/views/web/comm/social_join.php
Executable file
13
application/views/web/comm/social_join.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<script>
|
||||
|
||||
$( document ).ready(function() {
|
||||
self.close();
|
||||
$("#social_id", opener.document).val("<?=$social_id?>");
|
||||
opener.commonLayerClose('member_join1_layer');
|
||||
opener.commonLayerOpen('member_join2_layer');
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
10
application/views/web/comm/social_login.php
Executable file
10
application/views/web/comm/social_login.php
Executable file
@@ -0,0 +1,10 @@
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
self.close();
|
||||
opener.parent.location.reload();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
468
application/views/web/comm/user_comment_inc.php
Executable file
468
application/views/web/comm/user_comment_inc.php
Executable file
@@ -0,0 +1,468 @@
|
||||
<?
|
||||
# session
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$SES_MEMBER_NICNAME = $this->session->userdata('C_Member_Nicname');
|
||||
|
||||
$controller = $this->uri->segment(2);
|
||||
|
||||
$this->load->helper('cookie');
|
||||
$comment_sns_id = get_cookie('crossmap_comment_sns_id');
|
||||
$comment_sns_name = get_cookie('crossmap_comment_sns_name');
|
||||
$comment_sns_type = get_cookie('crossmap_comment_sns_type');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div id="user_comment_layer" style="display:none;">
|
||||
<div class="popup_wrap2_d" style=" z-index: 9998;">
|
||||
<div class="popupbox2_d" style=" width:810px;">
|
||||
<div class="popuptop3_d">
|
||||
<h3 class="p_title2"><strong><span id="user_comment_nicname"><?=$SES_MEMBER_NICNAME?></span></strong> 님의 댓글
|
||||
<span style="padding-left:40px;"><a href="javascript:change_user_comment_content_type(3)" class="current" id="user_comment_menu3">라이프</a> | <a href="javascript:change_user_comment_content_type(1)" id="user_comment_menu1">뉴스</a> | <a href="javascript:change_user_comment_content_type(2)" id="user_comment_menu2">칼럼</a></span>
|
||||
</h3>
|
||||
<a href="javascript:change_toggle('my_comment_policy')"><span class="btn-tit">댓글운영정책</span></a>
|
||||
<span class="btn-info"><a href="javascript:change_toggle('my_comment_policy')"><img src="/img/web/btn-info.png"></a></span>
|
||||
<span class="btn-close"><a href="javascript:commonLayerClose('user_comment_layer')"><img src="/img/web/btn-close2.png"></a></span>
|
||||
|
||||
<div class="delivery_info3" id="my_comment_policy" style="display:none;">
|
||||
<p class="d_info_tit" style="text-align:center; margin:10px 0">댓글운영정책</p>
|
||||
<p class="d_info_txt">크로스맵 댓글은 게시물에 대하여 자신의 생각을 말하고 남의 생각을 들으며 서로 다양한 의견을 나누는 공간입니다. 그러나 간혹 불건전한 내용을 올리시는 분들이 계셔서 건전한 인터넷문화 정착을 위해 아래와 같은 운영원칙을 적용합니다.<br><br><span style="text-decoration:underline; margin-bottom: 15px;display: inline-block;">1. 댓글의 삭제 및 제한 조치</span><br>네티즌들의 신고 또는 자제 모니터링을 통해 아래에 해당하는 내용이 포함된 댓글이 발견되면 예고없이 삭제 또는 제한 조치를 하겠습니다. <br></p>
|
||||
<table style="font-size:13px;">
|
||||
<tr>
|
||||
<td>1) 타인에 대한 욕설 또는 비방 </td>
|
||||
<td>2) 인신공격 또는 명예훼손 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3) 개인정보 유출 또는 사생활 침해</td>
|
||||
<td>4) 음란성 내용 또는 음란물 링크 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5) 상업적 광고 또는 사이트/홈피 홍보 </td>
|
||||
<td>6) 불법정보 유출</td>
|
||||
</tr>
|
||||
<tr>
|
||||
delivery_info3 <td>7) 같은 내용의 반복(도배) </td>
|
||||
<td>8) 폭력 또는 사행심 조장 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9) 기타 게시물 내용과 관계없는 내용</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
<p class="d_info_txt"><span style="text-decoration:underline; margin-bottom: 15px;display: inline-block;">2. 댓글 작성에 대한 제한</span><br>불건전한 댓글은 발견시 별도의 통보없이 즉시 삭제 또는 제한 조치 하며 상습적 또는 위반 정도가 심한 댓글을 올리시는 분에 대해서는 일정 기간 댓글 작성에 대한 권한을 제한할 수 있습니다.<br>또한 비정상적인 패턴으로 조회, 추천, 반대 등이 발생하는 것으로 관리자 또는 시스템이 판단하는 경우 부정 클릭여부를 확인하여 해당 IP나 ID를 제재할 수 있습니다.<br>명예훼손, 개인정보유츨, 욕설 등 법률에 위반되는 댓글은 관계 법령에 의거 민형사상 처벌을 받을 수 있으니 이용에 주의를 부탁 드립니다.<br><br><span style="text-decoration:underline; margin-bottom: 15px;display: inline-block;">3. 뉴스, 칼럼 댓글함 전체공개</span><br>건전한 댓글 문화를 위하여 뉴스 및 칼럼 댓글에 한해서만 댓글모음이 전체공개됩니다. 제공되는 목록에 삭제한 댓글이나 답글은 포함되지 않습니다. <br></p>
|
||||
<div class="form-group" style="margin:20px 0; display:block; text-align:center">
|
||||
<button type="button" class="btn btn-success" style="padding:5px 20px; font-size:14px" onclick="change_toggle('my_comment_policy')"">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popupbody3_d" >
|
||||
<div class="pop_tit">
|
||||
댓글/답글 <span class="beachblue" id="user_comment_count"></span>
|
||||
<div class="reply_sort_d">
|
||||
<span><a href="javascript:change_user_comment_sort(1)" id="user_comment_sort1">호감순</a></span>
|
||||
<span><a href="javascript:change_user_comment_sort(2)" id="user_comment_sort2" class="current">최신순</a></span>
|
||||
<span><a href="javascript:change_user_comment_sort(3)" id="user_comment_sort3">과거순</a></span>
|
||||
<span><a href="javascript:change_user_comment_sort(4)" id="user_comment_sort4">답글순</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="user_comment_list"></div>
|
||||
<div style="height:30px;display:none" id="user_comment_bottom"></div>
|
||||
<div class="btn btn-default btn_life" id="user_comment_more_btn">
|
||||
<a href="javascript:user_comment_list();">더보기 </a><img src="/img/web/img_replyopen.gif">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mask" style="z-index: 9997"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<? require_once(APPPATH . "views/web/comm/comment_spam_layer_inc.php");?>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
var user_comment_page = 1;
|
||||
var user_comment_content_type = '3';
|
||||
var user_comment_write_id = '<?=$comment_sns_id?>';
|
||||
var user_comment_sort = '2';
|
||||
|
||||
|
||||
|
||||
$(".mask").on('click', function(event){
|
||||
$(event.target).parent().hide();
|
||||
|
||||
});
|
||||
|
||||
$('.user_replay_text').click(function(e) {
|
||||
$("#social_login").toggle();
|
||||
|
||||
$(".popup_wrap").css('left','50%');
|
||||
$(".popup_wrap").css('top',popH+'px');
|
||||
|
||||
});
|
||||
|
||||
$('.user_comment_text').on('keyup', function(event) {
|
||||
var key = $(this).attr('strA');
|
||||
var len = $(this).val().length;
|
||||
if (len >= 300) {
|
||||
$(this).val($(this).val().substring(0, 300));
|
||||
len = 300;
|
||||
}
|
||||
$("#user_reply_text_count"+key).html(len+'/300');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// sort
|
||||
function change_user_comment_sort(type){
|
||||
user_comment_sort = type;
|
||||
user_comment_page = 1;
|
||||
user_comment_list();
|
||||
|
||||
$('#user_comment_sort1').toggleClass('current');
|
||||
$('#user_comment_sort2').toggleClass('current');
|
||||
$('#user_comment_sort3').toggleClass('current');
|
||||
$('#user_comment_sort4').toggleClass('current');
|
||||
}
|
||||
|
||||
|
||||
// content_type
|
||||
function change_user_comment_content_type(type){
|
||||
user_comment_content_type = type;
|
||||
user_comment_page = 1;
|
||||
user_comment_list();
|
||||
|
||||
$('#user_comment_menu1').removeClass('current');
|
||||
$('#user_comment_menu2').removeClass('current');
|
||||
$('#user_comment_menu3').removeClass('current');
|
||||
|
||||
$('#user_comment_menu'+type).addClass('current');
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function user_comment_list() {
|
||||
|
||||
var form_data = {
|
||||
"page" : user_comment_page,
|
||||
"content_type" : user_comment_content_type,
|
||||
"write_id" : user_comment_write_id,
|
||||
"sort" : user_comment_sort
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/user_comment_list',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'HTML',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml=='') return false;
|
||||
var arrHtml = rtnHtml.split("|||||");
|
||||
if(arrHtml[0].trim()=='0000') {
|
||||
if(user_comment_page == 1) {
|
||||
$("#user_comment_list").html(arrHtml[1]);
|
||||
} else {
|
||||
$("#user_comment_list").append(arrHtml[1]);
|
||||
}
|
||||
var total_count = setComma(arrHtml[2]);
|
||||
$("#user_comment_count").html(total_count);
|
||||
|
||||
if (arrHtml[3] == "N") {
|
||||
$("#user_comment_more_btn").hide();
|
||||
$("#user_comment_bottom").show();
|
||||
} else {
|
||||
$("#user_comment_more_btn").show();
|
||||
$("#user_comment_bottom").hide();
|
||||
}
|
||||
user_comment_page++;
|
||||
|
||||
} else {
|
||||
alert(arrHtml[1]);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('데이터 가져오기에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 대댓글 더보기
|
||||
function user_comment_reply_more(idx){
|
||||
var page = $("#user_comment_reply_page"+idx).val();
|
||||
page = parseInt(page) + 1;
|
||||
$("#user_comment_reply_page"+idx).val(page);
|
||||
user_comment_reply_list(idx, page);
|
||||
|
||||
}
|
||||
|
||||
|
||||
var user_comment_reply_open_type = 1;
|
||||
function user_comment_reply_open(idx){
|
||||
|
||||
if(user_comment_reply_open_type ==1) {
|
||||
$("#user_comment_reply_box"+idx).css("display","block");
|
||||
user_comment_reply_list(idx, 1);
|
||||
|
||||
user_comment_reply_open_type = 2;
|
||||
} else {
|
||||
$("#user_comment_reply_box"+idx).css("display","none");
|
||||
user_comment_reply_open_type = 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function user_comment_reply_list(idx, page) {
|
||||
var form_data = {
|
||||
"page" : page,
|
||||
"sort" : user_comment_sort,
|
||||
"comment_idx" : idx,
|
||||
"type" : "user_comment"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/comment_reply_list',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'HTML',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
if(rtnHtml=='') return false;
|
||||
var arrHtml = rtnHtml.split("|||||");
|
||||
if(arrHtml[0].trim()=='0000') {
|
||||
if(page == 1) {
|
||||
$("#user_comment_reply_list"+idx).html(arrHtml[1]);
|
||||
} else {
|
||||
$("#user_comment_reply_list"+idx).append(arrHtml[1]);
|
||||
}
|
||||
var total_count = setComma(arrHtml[2]);
|
||||
$("#user_comment_reply_count").html(total_count);
|
||||
console.log(arrHtml[3]);
|
||||
if (arrHtml[3] == "N") {
|
||||
$("#user_comment_reply_more_btn"+idx).hide();
|
||||
} else {
|
||||
$("#user_comment_reply_more_btn"+idx).show();
|
||||
}
|
||||
} else {
|
||||
alert(arrHtml[1]);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('데이터 가져오기에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#user_comment_reply_box"+idx).show();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 대대글 달기
|
||||
function user_comment_reply_add_proc(p_idx, content_idx){
|
||||
if("<?=$comment_sns_id?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
if($("#user_comment"+p_idx).val()=="") {
|
||||
alert("댓글을 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
var form_data = {
|
||||
"p_idx" : p_idx,
|
||||
"content_idx" : content_idx,
|
||||
"content_type" : user_comment_content_type,
|
||||
"comment" : $("#user_comment"+p_idx).val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/comment_add_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
$("#user_comment"+p_idx).val('');
|
||||
$("#user_reply_text_count"+p_idx).html('0/300');
|
||||
$("#user_comment_reply_page"+p_idx).val(1);
|
||||
|
||||
user_comment_reply_list(p_idx, 1);
|
||||
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function user_comment_del(idx){
|
||||
if(confirm("댓글이 삭제됩니다. 삭제하시겠습니까?") == false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var form_data = {
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/user_comment_del_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
user_comment_page = 1;
|
||||
user_comment_list();
|
||||
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('삭제에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function user_reply_comment_del(idx, p_idx){
|
||||
if(confirm("댓글이 삭제됩니다. 삭제하시겠습니까?") == false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var form_data = {
|
||||
"idx" : idx
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/user_comment_del_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
user_comment_reply_list(p_idx, 1);
|
||||
} else {
|
||||
alert(rtnJson.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('삭제에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function user_comment(write_id, write_name){
|
||||
user_comment_page = 1;
|
||||
user_comment_write_id = write_id;
|
||||
user_comment_list();
|
||||
$("#user_comment_layer").show();
|
||||
$("html, body").scrollTop(0);
|
||||
if(write_name!='') {
|
||||
$("#user_comment_nicname").html(write_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function copy_user_comment_url(idx){
|
||||
$('#copy_user_comment_url'+idx).select();
|
||||
try {
|
||||
document.execCommand('copy');
|
||||
alert("주소가 복사되었습니다.")
|
||||
} catch (err) {
|
||||
alert('이 브라우저는 지원하지 않습니다.')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 댓글 좋아요
|
||||
function user_comment_like_select(type, idx){
|
||||
if("<?=$SES_MEMBER_ID?>"=="") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
var form_data = {
|
||||
"comment_idx" : idx,
|
||||
"type" : type
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/comment_like_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
var like_count = setComma(rtnJson.data.like_count);
|
||||
var bad_count = setComma(rtnJson.data.bad_count);
|
||||
$("#comment_like1_"+idx).html(like_count);
|
||||
$("#comment_like2_"+idx).html(bad_count);
|
||||
|
||||
} else {
|
||||
alert("저장에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('저장에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function logout_advice(){
|
||||
alert("로그아웃 후에 이용해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
163
application/views/web/comm/user_comment_list.php
Executable file
163
application/views/web/comm/user_comment_list.php
Executable file
@@ -0,0 +1,163 @@
|
||||
<?
|
||||
$this->load->helper('cookie');
|
||||
$comment_sns_id = get_cookie('crossmap_comment_sns_id');
|
||||
$comment_sns_name = get_cookie('crossmap_comment_sns_name');
|
||||
$comment_sns_type = get_cookie('crossmap_comment_sns_type');
|
||||
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
$row_count = count($list);
|
||||
if($row_count > 0) {
|
||||
|
||||
foreach ($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$p_idx = $val['p_idx'];
|
||||
$s_idx = $val['s_idx'];
|
||||
$comment = $val['comment'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$content_idx = $val['content_idx'];
|
||||
$content_type = $val['content_type'];
|
||||
$main_img = $val['main_img'];
|
||||
$title = $val['title'];
|
||||
$column_name = $val['column_name'];
|
||||
$like_count = $val['like_count'];
|
||||
$bad_count = $val['bad_count'];
|
||||
$reply_count = $val['reply_count'];
|
||||
$write_id = $val['write_id'];
|
||||
$comment_status = $val['comment_status'];
|
||||
$comment_del_date = $val['del_date'];
|
||||
$is_best = $val['is_best'];
|
||||
if($column_name != '') $title = '['.$column_name.'] '.$title;
|
||||
|
||||
$user_comment_type = '<img src="/img/web/img_ballon.gif">';
|
||||
if($s_idx > 1) {
|
||||
$user_comment_type = '<span class="btn btn-default" style="padding: 1px 5px;">답글</span>';
|
||||
}
|
||||
|
||||
$reg_date_txt = substr($reg_date, 0, 16);
|
||||
|
||||
switch ($content_type) {
|
||||
case '1': $view_url = '/web/news/news_view/'.$content_idx; $comment_url = '/web/news/news_comment/'.$content_idx; break;
|
||||
case '2': $view_url = '/web/news/column_view/'.$content_idx; $comment_url = '/web/news/column_comment/'.$content_idx; break;
|
||||
case '3': $view_url = '/web/life/life_view/'.$content_idx; $comment_url = '/web/life/life_comment/'.$content_idx; break;
|
||||
}
|
||||
|
||||
$comment_txt = $user_comment_type.' '.$comment;
|
||||
if($comment_status!='1') {
|
||||
$comment_txt = '<div style="color:#bcbcbc;"><img src="/img/web/icon_info.gif"> '.$comment.'</div><div class="r_date" style="margin-top:5px;color:#bcbcbc;">'.$comment_del_date.'</div>';
|
||||
}
|
||||
if($is_best=='Y') $comment_txt = '<label>BEST</label>'.$comment_txt;
|
||||
|
||||
if($comment_sns_id == '') {
|
||||
$reply_css2 = 'user_replay_text';
|
||||
$content_readonly = 'readonly';
|
||||
} else {
|
||||
$reply_css2 = '';
|
||||
$content_readonly = '';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<div class="pop_cont_box_d">
|
||||
<input type="text" name="copy_user_comment_url<?=$idx?>" id="copy_user_comment_url<?=$idx?>" value="<?=WWW_CROSSMAP?><?=$comment_url?>" style="position:absolute;top:-9999em;">
|
||||
<div class="pop_cont_title_d">
|
||||
<?=$user_comment_type?> <?=$comment?>
|
||||
<p class="popup_date_d"><?=$reg_date_txt?></p>
|
||||
</div>
|
||||
<div class="pop_cont_txt">
|
||||
<span class="pop_cont_img2_d" style="width:14%;margin-top:10px; padding-bottom:10px;" >
|
||||
<div onclick="location.href='<?=$view_url?>'" style="cursor:pointer;width:87px;height:60px;background:url('<?=$main_img?>') no-repeat center; background-size:cover;""></div>
|
||||
</span>
|
||||
<div class="pop_cont_txt_box_d" style="width:76%">
|
||||
<p class="t_black"><a href="<?=$view_url?>"><?=$title?></a></p>
|
||||
<p class="pop_replay_more_d"> <a href="<?=$comment_url?>">댓글 더보기</a></p>
|
||||
</div>
|
||||
<div class="pop_cont_info_d" style="width:10%">
|
||||
<span class="fr"><a href="javascript:change_toggle('user_comment_info<?=$idx?>')"><img src="/img/web/pop_info.png"></a></span>
|
||||
<ul class="info_popup_d" id="user_comment_info<?=$idx?>" style="display:none">
|
||||
<? if($comment_status=='1') {
|
||||
if($comment_sns_id == $write_id) {?>
|
||||
<li><a href="javascript:user_comment_del('<?=$idx?>');">삭제하기</a></li>
|
||||
<? } else {?>
|
||||
<li><a href="javascript:user_comment_spam('<?=$idx?>', '<?=$write_id?>')">신고하기</a></li>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
<li style="border-top:1px solid #ededed"><a href="javascript:copy_user_comment_url('<?=$idx?>')">링크복사</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="r_base_d">
|
||||
<? if($p_idx == $idx) {?>
|
||||
<li class="btn btn-default" style="padding: 1px 12px;" onclick="user_comment_reply_open('<?=$p_idx?>');" style="cursor: pointer;">답글 <?=number_format($reply_count)?></li>
|
||||
<? }?>
|
||||
<li class="icons_d">
|
||||
<span class="thumbup_d"><a href="javascript:user_comment_like_select(1, '<?=$val['idx']?>')"><img src="/img/web/img_thumbup.jpg"></a><span id="comment_like1_<?=$val['idx']?>"><?=number_format($val['like_count'])?></span></span>
|
||||
<span class="thumbdown_d"><a href="javascript:user_comment_like_select(2, '<?=$val['idx']?>')"><img src="/img/web/img_thumbdown.jpg"></a><span id="comment_like2_<?=$val['idx']?>"><?=number_format($bad_count)?></span></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<? if($p_idx == $idx) {
|
||||
|
||||
$comment_sns_img1 = '/img/web/img_cm_off.gif'; $comment_sns_class1 = 'fr'; $nameText1=""; $comment_sns_javascript1="change_toggle('login_layer');"; $comment_sns_cursor1 = 'pointer';
|
||||
$comment_sns_img2 = '/img/web/img_tweet_off.gif'; $comment_sns_class2 = 'fr'; $nameText2=""; $comment_sns_javascript2="twitter_join('comment')"; $comment_sns_cursor2 = 'pointer';
|
||||
$comment_sns_img3 = '/img/web/img_facebook_off.gif';$comment_sns_class3 = 'fr'; $nameText3=""; $comment_sns_javascript3="checkLoginState();"; $comment_sns_cursor3 = 'pointer';
|
||||
$comment_sns_img4 = '/img/web/img_kakao_off.gif'; $comment_sns_class4 = 'fr'; $nameText4=""; $comment_sns_javascript4="kakako_login()"; $comment_sns_cursor4 = 'pointer';
|
||||
$comment_sns_img5 = '/img/web/img_naver_off.gif'; $comment_sns_class5 = 'fr'; $nameText5=""; $comment_sns_javascript5="naver_login()"; $comment_sns_cursor5 = 'pointer';
|
||||
if($comment_sns_type != '') {
|
||||
$comment_sns_javascript1 = "logout_advice()"; $comment_sns_javascript2 = "logout_advice()"; $comment_sns_javascript3 = "logout_advice()"; $comment_sns_javascript4 = "logout_advice()"; $comment_sns_javascript5 = "logout_advice()";
|
||||
//$comment_sns_cursor1 = "default"; $comment_sns_cursor2 = "default"; $comment_sns_cursor3 = "default"; $comment_sns_cursor4 = "default"; $comment_sns_cursor5 = "default";
|
||||
switch ($comment_sns_type) {
|
||||
case 'cm': $comment_sns_img1 = '/img/web/img_cm_on.gif'; $comment_sns_class1 = ''; $nameText1="<span>".$comment_sns_name."</span>"; break;
|
||||
case 'twitter': $comment_sns_img2 = '/img/web/img_tweet.gif'; $comment_sns_class2 = ''; $nameText2="<span>".$comment_sns_name."</span>"; break;
|
||||
case 'facebook': $comment_sns_img3 = '/img/web/img_facebook_on.gif'; $comment_sns_class3 = ''; $nameText3="<span>".$comment_sns_name."</span>"; break;
|
||||
case 'kakao': $comment_sns_img4 = '/img/web/img_kakao_on.gif'; $comment_sns_class4 = ''; $nameText4="<span>".$comment_sns_name."</span>"; break;
|
||||
case 'naver': $comment_sns_img5 = '/img/web/img_naver_on.gif'; $comment_sns_class5 = ''; $nameText5="<span>".$comment_sns_name."</span>"; break;
|
||||
}
|
||||
} else {
|
||||
$comment_sns_class1 = '';$comment_sns_class2 = '';$comment_sns_class3 = '';$comment_sns_class4 = '';$comment_sns_class5 = '';
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="reply_box2_d" id="user_comment_reply_box<?=$p_idx?>" style="display: none">
|
||||
<input type="hidden" name="user_comment_reply_page<?=$val['idx']?>" id="user_comment_reply_page<?=$val['idx']?>" value="1">
|
||||
<div id="user_comment_reply_list<?=$p_idx?>"></div>
|
||||
<ul class="box_wrap2">
|
||||
<li style="width: 100%;text-align:right;font-size: 12px;padding-bottom:10px;display:none" id="user_comment_reply_more_btn<?=$idx?>" class="fr"><a href="<?=$comment_url?>">댓글 더보기 ></a></li>
|
||||
<li class="r_img2" style="width: 2%; padding-right: 10px;"><img src="/img/web/img_reply1.gif"></li>
|
||||
<li style="width: 95%;">
|
||||
<div class="reply_box_d">
|
||||
<div class="reply_social_d">
|
||||
|
||||
<a href="javascript:<?=$comment_sns_javascript1?>" style="cursor:<?=$comment_sns_cursor1?>"><span class="<?=$comment_sns_class1?>"><img src="<?=$comment_sns_img1?>"></span></a> <?=$nameText1?>
|
||||
<a href="javascript:<?=$comment_sns_javascript2?>" style="cursor:<?=$comment_sns_cursor2?>"><span class="tweet <?=$comment_sns_class2?>"><img src="<?=$comment_sns_img2?>"></span></a> <?=$nameText2?>
|
||||
<a href="javascript:<?=$comment_sns_javascript3?>" style="cursor:<?=$comment_sns_cursor3?>"><span class="facebook <?=$comment_sns_class3?>"><img src="<?=$comment_sns_img3?>"></span></a> <?=$nameText3?>
|
||||
<a href="javascript:<?=$comment_sns_javascript4?>" style="cursor:<?=$comment_sns_cursor4?>"><span class="<?=$comment_sns_class4?>"><img src="<?=$comment_sns_img4?>"></span></a> <?=$nameText4?>
|
||||
<a href="javascript:<?=$comment_sns_javascript5?>" style="cursor:<?=$comment_sns_cursor5?>"><span class="<?=$comment_sns_class5?>"><img src="<?=$comment_sns_img5?>"></span></a> <?=$nameText5?>
|
||||
|
||||
</div>
|
||||
<div class="reply_write_d">
|
||||
<textarea class="form-control <?=$reply_css2?> user_comment_text" <?=$content_readonly?> name="user_comment<?=$idx?>" id="user_comment<?=$idx?>" strA="<?=$idx?>" rows="3" placeholder="댓글 작성 시 상대방에 대한 배려와 사랑을 담아주세요." style="width:95%;"></textarea>
|
||||
</div>
|
||||
<div class="reply_regist_d"><span class="reply_no_d" id="user_reply_text_count<?=$p_idx?>">0/300</span><span class="reply_btn_d"><a href="javascript:user_comment_reply_add_proc('<?=$idx?>', '<?=$content_idx?>');"> 등록</a></span></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="reply_close_d"><a href="javascript:change_toggle('user_comment_reply_box<?=$p_idx?>')">댓글 접기</a> <img src="/img/web/img_replyclose.gif"></div>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
|
||||
|
||||
<? }
|
||||
|
||||
} else {
|
||||
echo '<div class="pop_cont_box_d" style="text-align: center">등록된 댓글이 없습니다.</div>';
|
||||
}
|
||||
echo '|||||'.$total_count.'|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||데이터 가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
69
application/views/web/comm/user_comment_reply_list.php
Executable file
69
application/views/web/comm/user_comment_reply_list.php
Executable file
@@ -0,0 +1,69 @@
|
||||
<?
|
||||
$this->load->helper('cookie');
|
||||
$comment_sns_id = get_cookie('crossmap_comment_sns_id');
|
||||
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
$row_count = count($arr_comment);
|
||||
if($row_count > 0) {
|
||||
foreach($arr_comment as $val) {
|
||||
$comment_reg_date = $val['reg_date'];
|
||||
$comment_reg_date = substr($comment_reg_date, 0, 16);
|
||||
$comment = $val['comment'];
|
||||
$comment_status = $val['comment_status'];
|
||||
$comment_del_date = $val['del_date'];
|
||||
$is_best = $val['is_best'];
|
||||
$comment_txt = $comment;
|
||||
if($comment_status!='1') {
|
||||
$comment_txt = '<div style="color:#bcbcbc;"><img src="/img/web/icon_info.gif"> '.$comment.'</div><div class="r_date" style="margin-top:5px;color:#bcbcbc;">'.$comment_del_date.'</div>';
|
||||
}
|
||||
|
||||
if($is_best=='Y') $comment_txt = '<label>BEST</label>'.$comment_txt;
|
||||
|
||||
?>
|
||||
<ul class="box_wrap">
|
||||
<li class="img_reply"><img src="/img/web/img_reply1.gif"></li>
|
||||
<li>
|
||||
<div class="r_info_d" style="width:300px">
|
||||
<a href="javascript:user_comment('<?=$val['write_id']?>', '<?=$val['write_name']?>')"><span class="beachblue"><?=$val['write_name']?></span></a><span class="r_date_d"><?=$comment_reg_date?> <span style="color:#e1e2e2;padding-left:10px;">
|
||||
</div>
|
||||
<div class="r_base_d">
|
||||
<span><?=$comment_txt?></span>
|
||||
</div>
|
||||
</li>
|
||||
<li style="float:right;position: relative;">
|
||||
<div class="pop_cont_info_d" style="float:right">
|
||||
<span class="fr"><a href="javascript:change_toggle('user_comment_reply_info<?=$val['idx']?>')"><img src="/img/web/pop_info.png"></a></span>
|
||||
<ul class="info_popup2_d" id="user_comment_reply_info<?=$val['idx']?>" style="display:none">
|
||||
<?
|
||||
if($comment_status=='1') {
|
||||
if($val['write_id'] == $comment_sns_id) {?>
|
||||
<li><a href="javascript:user_reply_comment_del('<?=$val['idx']?>', '<?=$val['p_idx']?>');">삭제하기</a></li>
|
||||
<? } else {?>
|
||||
<li><a href="javascript:comment_spam('<?=$val['idx']?>', '<?=$val['write_name']?>');">신고하기</a></li>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
<li style="border-top:1px solid #ededed"><a href="javascript:copy_user_comment_url('<?=$val['p_idx']?>')">링크복사</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="icons_d">
|
||||
<span class="thumbup_d"><a href="javascript:user_comment_like_select(1, '<?=$val['idx']?>')"><img src="/img/web/img_thumbup.jpg"></a><span id="comment_like1_<?=$val['idx']?>"><?=number_format($val['like_count'])?></span></span>
|
||||
<span class="thumbdown_d"><a href="javascript:user_comment_like_select(2, '<?=$val['idx']?>')"><img src="/img/web/img_thumbdown.jpg"></a><span id="comment_like2_<?=$val['idx']?>"><?=number_format($val['bad_count'])?></span></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<?
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
echo '|||||'.$total_count.'|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||댓글가져오기를 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
135
application/views/web/comm/weather_column_bar_inc.php
Executable file
135
application/views/web/comm/weather_column_bar_inc.php
Executable file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
$ci=& get_instance();
|
||||
|
||||
# t 날씨 가져오기
|
||||
$ci->load->model('web/m_t_weather');
|
||||
$arr_public_weather = $ci->m_t_weather->t_weather_all_list();
|
||||
|
||||
$weather_date = date("m.d");
|
||||
$arr_week = array("일","월","화","수","목","금","토");
|
||||
$weather_week = $arr_week[date('w')];
|
||||
|
||||
# 테마
|
||||
|
||||
$theme_types = array('8');
|
||||
$ci->load->model('web/m_theme');
|
||||
$req_data = array();
|
||||
$req_data['theme_types'] = $theme_types;
|
||||
$arr_theme = $ci->m_theme->theme_join_vw_content_where_in_theme_type_list($req_data);
|
||||
|
||||
$arr_today_column = array();
|
||||
foreach ($arr_theme as $val) {
|
||||
$arr_today_column[$val['rank']] = array('title' => $val['title'], 'column_name'=> $val['column_name'], 'sub_content' => $val['sub_content'], 'theme_img' => $val['theme_img'], 'content_idx' => $val['content_idx']);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<div class="cont_box" style="margin-top:10px;">
|
||||
<div id="public_weather" style="width:55%;float:left;display:none">
|
||||
<span class="box_title">오늘의 날씨</span>
|
||||
<span class="date"> <?=$weather_date?>(<?=$weather_week?>)</span>
|
||||
<ul id="public_weather_list" style="left: 140px;">
|
||||
<? foreach ($arr_public_weather as $val) { ?>
|
||||
<li style="height:45px;">
|
||||
<a href="https://search.naver.com/search.naver?where=nexearch&sm=top_hty&fbm=1&ie=utf8&query=%EB%82%A0%EC%94%A8" target="_blank"><span class="location"> <?=$val['location']?> </span>
|
||||
<span class="weather"><img src="<?=$val['weather_img']?>" width="22"></span>
|
||||
<span><?=$val['weather_status']?> / <?=$val['temperatures']?></span></a>
|
||||
</li>
|
||||
<? }?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="today_column" style="width:45%;display:none">
|
||||
<span class="current">오늘의 칼럼</span>
|
||||
<span style="position: absolute; top: 0; left: 70px;"><img src="/img/web/news_bar.gif" alt="" style="padding: 0 5px;margin-top: 16px;"></span>
|
||||
<ul style="top:0;">
|
||||
<?
|
||||
if(count($arr_today_column) > 0 ){
|
||||
foreach ($arr_today_column as $val) {
|
||||
$title = '['.$val['column_name'].'] '.$val['title'];
|
||||
$title = mb_strimwidth($title, '0', '38', '..', 'utf-8');
|
||||
?>
|
||||
<li style="height:45px; text-align: left;">
|
||||
<span class="related_news fr" style="width:230px;display: block; padding-left: 80px">
|
||||
<span><a href="/web/news/column_view/<?=$val['content_idx']?>"><?=$title?></a></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<?
|
||||
}
|
||||
}?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$("#today_column").show();
|
||||
$("#public_weather").show();
|
||||
$('#today_column').vTicker({ speed: 700 });
|
||||
$('#public_weather').vTicker({ speed: 700 });
|
||||
//user_position();
|
||||
});
|
||||
|
||||
function user_position() {
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition (function(position) {
|
||||
if(position) {
|
||||
user_weather(position.coords);
|
||||
}
|
||||
}, function (error) {
|
||||
console.error(error);
|
||||
}, {
|
||||
enableHighAccuracy: false,
|
||||
maximumAge: 0,
|
||||
timeout: Infinity
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function user_weather(position){
|
||||
var latitude = position.latitude;
|
||||
var longitude = position.longitude;
|
||||
if (latitude == undefined) latitude = '';
|
||||
if (longitude == undefined) longitude = '';
|
||||
|
||||
if (latitude != '' && longitude != '') {
|
||||
var form_data = {
|
||||
"latitude": latitude,
|
||||
"longitude": longitude
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/weather_view',
|
||||
async: true,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
var result = rtnJson.data;
|
||||
content = '<li style="height:45px;"><a href="https://search.naver.com/search.naver?where=nexearch&sm=top_hty&fbm=1&ie=utf8&query=%EB%82%A0%EC%94%A8" target="_blank"><span class="location">' +result.location+ '</span>';
|
||||
content+= '<span class="weather"><img src="'+result.weather_img+'" width="22"></span>';
|
||||
content+= '<span>' + result.weather_status + ' / ' + result.temperatures + '</span></a></li>';
|
||||
|
||||
$("#public_weather_list").prepend(content);
|
||||
|
||||
} else {
|
||||
alert("데이터 로드에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
alert('데이터 로드에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user