first commit
This commit is contained in:
1082
application/views/m/common/comment_inc.php
Executable file
1082
application/views/m/common/comment_inc.php
Executable file
File diff suppressed because it is too large
Load Diff
166
application/views/m/common/comment_list.php
Executable file
166
application/views/m/common/comment_list.php
Executable file
@@ -0,0 +1,166 @@
|
||||
<?
|
||||
$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="'.$member_img.'" width="16" height="16"> ';
|
||||
if($c_sns_name !='cm') {
|
||||
$name_header = '<img src="/img/web/img_'.$c_sns_name.'_on.gif"> ';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<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 $val['write_name'];
|
||||
} else {
|
||||
if($content_type == '1' || $content_type == '2') {
|
||||
?>
|
||||
<a href="javascript:user_comment('<?=$val['write_id']?>', '<?=$val['write_name']?>');"><?=$val['write_name']?></a>
|
||||
<?
|
||||
} else {
|
||||
if($comment_sns_id!=$val['write_id']) {
|
||||
echo $val['write_name'];
|
||||
} else {
|
||||
?>
|
||||
<a href="javascript:user_comment('<?=$val['write_id']?>', '<?=$val['write_name']?>');"><?=$val['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="icons">
|
||||
<span class="thumbup"><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="thumbdown"><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="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" 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" 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.'|||||댓글가져오기를 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
94
application/views/m/common/comment_reply_list.php
Executable file
94
application/views/m/common/comment_reply_list.php
Executable file
@@ -0,0 +1,94 @@
|
||||
<?
|
||||
$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="'.$member_img.'" width="16" height="16"> ';
|
||||
if($c_sns_name !='cm') {
|
||||
$name_header = '<img src="/img/web/img_'.$c_sns_name.'_on.gif"> ';
|
||||
}
|
||||
|
||||
?>
|
||||
<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 $val['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;"><?=$val['write_name']?></a>
|
||||
|
||||
<? } else {
|
||||
if($comment_sns_id!=$val['write_id']) {
|
||||
echo $val['write_name'];
|
||||
} else {
|
||||
?>
|
||||
<a href="javascript:user_comment('<?=$val['write_id']?>', '<?=$val['write_name']?>');" style="color: #2bbec6 !important;"><?=$val['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.'|||||댓글가져오기를 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
120
application/views/m/common/comment_spam_layer_inc.php
Executable file
120
application/views/m/common/comment_spam_layer_inc.php
Executable file
@@ -0,0 +1,120 @@
|
||||
|
||||
<?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="top: 10%;">
|
||||
<div class="popupbox trc">
|
||||
<div class="popuptop">
|
||||
<h3 class="p_title">신고하기 </h3>
|
||||
<span class="btn-close"><a href="javascript:commonLayerClose('comment_spam_layer')"><img src="/img/mobile/btn-close.png"></a></span>
|
||||
</div>
|
||||
<div class="popupbody">
|
||||
<dl class="bgb notice pd30 ft16" style="margin:20px 0">
|
||||
<dt>신고대상</dt>
|
||||
<dd id="comment_write_name_txt"></dd>
|
||||
<dt style="padding-top:6px;">내용</dt>
|
||||
<dd class="info_forms">
|
||||
<div>
|
||||
<input type="id" class="form-control" 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" class="current" 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 style="margin:30px 0; display:block; text-align:center">
|
||||
<button type="button" class="btn btn-default_bb br20" style="padding:10px 40px; font-size:16px; margin:5px 0 " onclick="commonLayerClose('comment_spam_layer')">취소</button>
|
||||
<button type="button" class="btn btn-success br20" style="padding:10px 40px; font-size:16px;margin:5px 0" onclick="comment_spam_proc();">확인</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>
|
||||
169
application/views/m/common/footer.php
Executable file
169
application/views/m/common/footer.php
Executable file
@@ -0,0 +1,169 @@
|
||||
<div class="mypage_footer" style="margin-top:0">
|
||||
<div class="f_btns">
|
||||
<span><a href="" class="btn btn-default_bb br20">로그인</a></span>
|
||||
<span><a href="" class="btn btn-default_bb br20">PC버전</a></span>
|
||||
<span><a href="" class="btn btn-default_bb br20">고객센터</a></span>
|
||||
</div>
|
||||
<div class="f_policy">
|
||||
<span><a href="">이용약관</a></span>
|
||||
<span style="padding:0 2px"><img src="/img/mobile/bar.gif"></span>
|
||||
<span><a href="">개인정보취급방침</a></span>
|
||||
</div>
|
||||
<div class="f_social">
|
||||
<span><a href=""><img src="/img/mobile/f_icon1_l.png"></a></span>
|
||||
<span><a href=""><img src="/img/mobile/f_icon2_l.png"></a></span>
|
||||
<span><a href=""><img src="/img/mobile/f_icon3_l.png"></a></span>
|
||||
<span><a href=""><img src="/img/mobile/f_icon4_l.png"></a></span>
|
||||
</div>
|
||||
<div class="copyright">
|
||||
© 2017 The CrossMap. All Rights Reserved.
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>
|
||||
<!--script src="js/jquery-1.11.3.min.js"></script-->
|
||||
<script>
|
||||
// 스크롤 고정 함수.
|
||||
function scroll_fix(news_nav) {
|
||||
|
||||
$( document ).ready( function() {
|
||||
|
||||
var jbOffset = $( '.'+news_nav ).offset(); // 고정하고자 하는 클래스의 offset.
|
||||
|
||||
$( window ).scroll( function() {
|
||||
/*스크롤탑(현재스크롤위치) > news_nav : 상단 아래로 내렸을때 상단 고정*/
|
||||
if ( $( document ).scrollTop() > jbOffset.top ) {
|
||||
$( '.'+news_nav ).addClass( 'jbFixed' );
|
||||
}
|
||||
/*스크롤탑(현재스크롤위치) <= news_nav : 원래*/
|
||||
else {
|
||||
$( '.'+news_nav ).removeClass( 'jbFixed' );
|
||||
}
|
||||
});
|
||||
|
||||
} );
|
||||
}
|
||||
//
|
||||
|
||||
scroll_fix('news_nav'); // 상단 고정하고 싶은 클래스 설정.
|
||||
</script>
|
||||
|
||||
<!-- 슬라이드 스크립트 -->
|
||||
<script src="js/swiper.min.js"></script>
|
||||
|
||||
<!--script>
|
||||
// 루프용 슬라이드
|
||||
var swiper1 = new Swiper('.mainswiper', {
|
||||
loop: true,
|
||||
autoHeight: true,
|
||||
});
|
||||
//console.log(swiper.activeIndex);
|
||||
|
||||
$(document).on("touchend mousemove", ".mainswiper", function(){
|
||||
console.log(swiper1.activeIndex);
|
||||
// 슬라이드 당겼을 때, 전 current 제거
|
||||
$(".news_nav .current").removeClass('current')
|
||||
// 슬라이드 당겼을 떄, 후 current 생성
|
||||
slide_index = swiper1.activeIndex-1;
|
||||
if(swiper1.activeIndex==5){
|
||||
slide_index = 0;
|
||||
}
|
||||
$(".news_nav span").eq(slide_index).addClass('current')
|
||||
});
|
||||
var swiper2 = new Swiper('.swiper-03', {
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 10,
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
// 홈 만나 를 클릭했을때 슬라이드 이동
|
||||
$(".news_nav span").on('touchstart mousedown',function(e){
|
||||
//console.log('클릭이동');
|
||||
// 터치하거나, 마우스 다운을 눌렀을 때, 실행 금지
|
||||
e.preventDefault()
|
||||
// 은혜, 라이프,,, 클릭시, 전 current 제거
|
||||
$(".news_nav .current").removeClass('current')
|
||||
// 후 current 생성
|
||||
$(this).addClass('current')
|
||||
// 후 슬라이드로 이동
|
||||
swiper1.slideTo( $(this).index()+1 )
|
||||
})
|
||||
$(".news_nav span").click(function(e){
|
||||
// 홈 만나 클릭시 실행 금지.
|
||||
e.preventDefault()
|
||||
})
|
||||
</script>
|
||||
<!-- 슬라이드 스크립트 끝-->
|
||||
|
||||
<!--script>
|
||||
var mySwiper ;
|
||||
$(document).ready(function(){
|
||||
|
||||
$('.news_menu').click(function(){
|
||||
$('.life_menu_l').addClass('active');
|
||||
$('.mainswiper').css('height','740px');
|
||||
});
|
||||
$('.life_close').click(function(){
|
||||
$('.life_menu_l').removeClass('active');
|
||||
$('.mainswiper').css('height','auto');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
function detectswipe(el,func) {
|
||||
swipe_det = new Object();
|
||||
swipe_det.sX = 0;
|
||||
swipe_det.sY = 0;
|
||||
swipe_det.eX = 0;
|
||||
swipe_det.eY = 0;
|
||||
var min_x = 20; //min x swipe for horizontal swipe
|
||||
var max_x = 40; //max x difference for vertical swipe
|
||||
var min_y = 40; //min y swipe for vertical swipe
|
||||
var max_y = 50; //max y difference for horizontal swipe
|
||||
var direc = "";
|
||||
ele = document.getElementById(el);
|
||||
ele.addEventListener('touchstart',function(e){
|
||||
var t = e.touches[0];
|
||||
swipe_det.sX = t.screenX;
|
||||
swipe_det.sY = t.screenY;
|
||||
},false);
|
||||
ele.addEventListener('touchmove',function(e){
|
||||
e.preventDefault();
|
||||
var t = e.touches[0];
|
||||
swipe_det.eX = t.screenX;
|
||||
swipe_det.eY = t.screenY;
|
||||
},false);
|
||||
ele.addEventListener('touchend',function(e){
|
||||
//horizontal detection
|
||||
if ((((swipe_det.eX - min_x > swipe_det.sX) || (swipe_det.eX + min_x < swipe_det.sX)) && ((swipe_det.eY < swipe_det.sY + max_y) && (swipe_det.sY > swipe_det.eY - max_y)))) {
|
||||
if(swipe_det.eX > swipe_det.sX) direc = "r";
|
||||
else direc = "l";
|
||||
}
|
||||
//vertical detection
|
||||
if ((((swipe_det.eY - min_y > swipe_det.sY) || (swipe_det.eY + min_y < swipe_det.sY)) && ((swipe_det.eX < swipe_det.sX + max_x) && (swipe_det.sX > swipe_det.eX - max_x)))) {
|
||||
if(swipe_det.eY > swipe_det.sY) direc = "d";
|
||||
else direc = "u";
|
||||
}
|
||||
|
||||
if (direc != "") {
|
||||
if(typeof func == 'function') func(el,direc);
|
||||
}
|
||||
direc = "";
|
||||
},false);
|
||||
}
|
||||
|
||||
function myfunction(el,d) {
|
||||
$('.life_menu_l').removeClass('active');
|
||||
$('.mainswiper').css('height','auto');
|
||||
}
|
||||
detectswipe('swipeme',myfunction);
|
||||
</script-->
|
||||
92
application/views/m/common/kmc_mobile_auth.php
Executable file
92
application/views/m/common/kmc_mobile_auth.php
Executable file
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
header("Pragma: no-cache");
|
||||
header("Cache-Control: no-cache,must-revalidate");
|
||||
|
||||
$tr_url = WWW_CROSSMAP.'/m/common/kmc_mobile_callback'; // 본인인증 결과수신 POPUP URL
|
||||
$tr_add = 'N'; // 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: '/m/common/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;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
kmc_window_open("<?=@$_GET['mobile']?>","<?=$_GET['type']?>");
|
||||
});
|
||||
|
||||
// kmc 본인인증
|
||||
window.name = "kmcis_web";
|
||||
var KMCIS_window;
|
||||
function openKMCISWindow(){
|
||||
var UserAgent = navigator.userAgent;
|
||||
/* 모바일 접근 체크*/
|
||||
// 모바일일 경우 (변동사항 있을경우 추가 필요)
|
||||
document.reqKMCISForm.target = '';
|
||||
|
||||
document.reqKMCISForm.action = 'https://www.kmcert.com/kmcis/web/kmcisReq.jsp';
|
||||
document.reqKMCISForm.submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
151
application/views/m/common/kmc_mobile_auth_fin.php
Executable file
151
application/views/m/common/kmc_mobile_auth_fin.php
Executable file
@@ -0,0 +1,151 @@
|
||||
<?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') {?>
|
||||
mobile_auth_password_find_fin('<?=$CI?>');
|
||||
<? } else if($type=='find_id') {?>
|
||||
mobile_auth_id_find_fin('<?=$CI?>');
|
||||
<? } else if($type=='email_check') {?>
|
||||
mobile_auth_email_check_fin();
|
||||
<? } else if($type=='member_edit') {?>
|
||||
mobile_auth_member_edit_fin('<?=$phone?>');
|
||||
alert("번호 수정 완료");
|
||||
<? } else {?>
|
||||
mobile_auth_fin('<?=$CI?>', '<?=$name?>');
|
||||
<? }?>
|
||||
self.close();
|
||||
});
|
||||
|
||||
function mobile_auth_fin(key, name){
|
||||
$("#is_mobile_auth", opener.document).val("Y");
|
||||
$("#mobile_CI", opener.document).val(key);
|
||||
$("#member_name", opener.document).val(name);
|
||||
$('.mobile_auth_btn', opener.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', opener.document).hide();
|
||||
$('#find_pwd_fin_layer', opener.document).show();
|
||||
$('#find_pwd_email_text', opener.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', opener.document).hide();
|
||||
$('#find_id_fin_layer', opener.document).show();
|
||||
$('#find_id_text', opener.document).html(rtnJson.data);
|
||||
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('비밀번호 찾기에 실패했습니다 실패했습니다.');
|
||||
return_state = false;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function mobile_auth_email_check_fin(){
|
||||
$("#is_mobile_auth_email", opener.document).val("Y");
|
||||
$('#email_change_layer2', opener.document).show();
|
||||
$('#email_change_layer1', opener.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", opener.document).val("");
|
||||
$('#mobile_edit_layer', opener.document).hide();
|
||||
$('#member_edit_text', opener.document).html('+82 '+rtnJson.data);
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('모바일폰 변경에 실패했습니다.');
|
||||
return_state = false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
19
application/views/m/common/kmc_mobile_callback.php
Executable file
19
application/views/m/common/kmc_mobile_callback.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<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(opener.kmc_auth_callback !== undefined)opener.kmc_auth_callback("<?=$name?>","<?=$phone?>","<?=$CI?>");
|
||||
self.close();
|
||||
});
|
||||
</script>
|
||||
157
application/views/m/common/light_header.php
Executable file
157
application/views/m/common/light_header.php
Executable file
@@ -0,0 +1,157 @@
|
||||
<script>
|
||||
|
||||
|
||||
// 검색
|
||||
function onkeyup_search_keyword(val) {
|
||||
if (window.event.keyCode == 13) {
|
||||
search_keyword_proc(val);
|
||||
|
||||
} else {
|
||||
if (val == '') {
|
||||
$("#search_arrow").removeClass();
|
||||
$("#search_keyword_list").empty();
|
||||
$("#open_search").hide();
|
||||
$("#search_arrow").addClass('src_icon arrow_down_on');
|
||||
}
|
||||
else {
|
||||
var form_data = {
|
||||
"keyword": val
|
||||
};
|
||||
$.ajax({
|
||||
url: '/m/search/search_keyword',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
var count = rtnJson.data.length;
|
||||
var content = '';
|
||||
for (var i = 0; i < count; i++) {
|
||||
var result = rtnJson.data[i];
|
||||
var result_keyword = result.keyword;
|
||||
keyword = result_keyword.replace(val, '<span class="on">' + val + '</span>');
|
||||
content += ' <div class="recents"><span><a href="javascript:search_keyword_proc(\'' + result_keyword + '\');">' + keyword + '</a></span><span class="close fr"><img src="/img/mobile/img_pointer.png"></span></div>';
|
||||
}
|
||||
$("#search_keyword_list").html(content);
|
||||
$("#search_arrow").removeClass();
|
||||
$("#open_search").show();
|
||||
|
||||
} else {
|
||||
$("#search_arrow").removeClass();
|
||||
$("#search_keyword_list").empty();
|
||||
// $("#open_search").hide();
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function search_keyword_proc(search_keyword) {
|
||||
if (search_keyword == '') {
|
||||
search_keyword = $("#search_keyword").val();
|
||||
}
|
||||
|
||||
$("#search_keyword").val(search_keyword);
|
||||
$("#search_form").submit();
|
||||
|
||||
|
||||
}
|
||||
|
||||
function remove(i){
|
||||
|
||||
$k = JSON.parse($.cookie("pre_keyword"));
|
||||
$k.splice(i,1);
|
||||
$.cookie("pre_keyword",JSON.stringify($k),{ expires: 7, path: '/'});
|
||||
$("#keys"+i).remove();
|
||||
}
|
||||
|
||||
function removeAll(){
|
||||
|
||||
$.cookie("pre_keyword","[]",{ expires: 7, path: '/'});
|
||||
$(".keys").remove();
|
||||
}
|
||||
|
||||
function pre_keyword_toggle(){
|
||||
toggle = $.cookie('pre_keyword_show') || "Y";
|
||||
|
||||
if(toggle == 'Y'){
|
||||
$.cookie('pre_keyword_show',"N",{ expires: 7, path: '/'});
|
||||
$("#prev_keyword_list").hide();
|
||||
$("#pre_on_off").text("켜기");
|
||||
}
|
||||
else{
|
||||
$.cookie('pre_keyword_show',"Y",{ expires: 7, path: '/'});
|
||||
$("#prev_keyword_list").show();
|
||||
$("#pre_on_off").text("끄기");
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
keys = $.cookie("pre_keyword") || "[]";
|
||||
keys = JSON.parse(keys);
|
||||
$("#prev_keyword_list").html("");
|
||||
for(i=0;i<keys.length;i++){
|
||||
$("#prev_keyword_list").append("\n" +
|
||||
"\t\t<div class='keys' id='keys"+i+"'>\n" +
|
||||
"\t\t\t<span><a href=\"javascript:search_keyword_proc('"+keys[i].split("|")[0]+"')\"><span class=\"search_pointer\">"+keys[i].split("|")[0]+"</span></a></span>\n" +
|
||||
"\t\t\t<span class=\"close fr\" onclick='remove("+i+")'><img src=\"/img/mobile/img_x_grey.png\"></span>\n" +
|
||||
"<span class=\"date fr\">"+keys[i].split("|")[1]+"</span>"+
|
||||
"\t\t</div>");
|
||||
}
|
||||
|
||||
$("#search_keyword").focus(function(){
|
||||
$(".open_search").show();
|
||||
});
|
||||
|
||||
toggle = $.cookie('pre_keyword_show') || "Y";
|
||||
|
||||
if(toggle == 'Y'){
|
||||
$("#prev_keyword_list").show();
|
||||
$("#pre_on_off").text("끄기");
|
||||
}
|
||||
else{
|
||||
$("#prev_keyword_list").hide();
|
||||
$("#pre_on_off").text("켜기");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="mypage_top mypage_top_fixed bgb3">
|
||||
<div class="mypage_logo"><a href="/"><img src="/img/mobile/logo_cm.jpg" alt="logo"></a>
|
||||
</div>
|
||||
<div class="mypage_title">
|
||||
<a href="<?= $page_title_link ?>"><span class="header_tit"><?= $page_title ?></span></a>
|
||||
</div>
|
||||
<div class="mypage_search" style="width: 150px; text-align: right;">
|
||||
<form name="search_form" id="search_form" method="get" action="/m/search/">
|
||||
<span><input type="text" class="inputer" id="search_keyword" name="search_keyword" placeholder="검색"
|
||||
value=""
|
||||
onkeyup="onkeyup_search_keyword(this.value);"><a
|
||||
href="javascript:search_form.submit();"><img
|
||||
src="/img/mobile/mypage_serch_icon.gif" alt="검색하기"></a></span>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="mypage_menu"><a href=""><img src="/img/mobile/menu_list.gif" alt="menu"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="open_search" id="open_search" style="display:none;top:53px">
|
||||
<div class="roll_box" id="prev_keyword_list">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="roll_box" id="search_keyword_list">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="roll_footer">
|
||||
<span><a href="javascript:pre_keyword_toggle()">최근 검색어 <span id="pre_on_off"></span></a></span> | <span><a href="javascript:removeAll()">전체삭제</a></span>
|
||||
<span class="fr"><a href='javascript:$("#open_search").hide();'>닫기</a></span>
|
||||
</div>
|
||||
</div>
|
||||
417
application/views/m/common/navigation.php
Executable file
417
application/views/m/common/navigation.php
Executable file
@@ -0,0 +1,417 @@
|
||||
<?
|
||||
|
||||
$data = $this->session->userdata;
|
||||
|
||||
$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'];
|
||||
}
|
||||
|
||||
$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');
|
||||
|
||||
if (isset($data['C_Member_Id']) || isset($comment_sns_name)) {
|
||||
if($comment_sns_name) {
|
||||
$data['C_Member_Profile'] = '/img/mobile/life_profile.png';
|
||||
$data['C_Member_Nicname'] = $comment_sns_name;
|
||||
$data['C_Member_Group_Name'] = $comment_sns_type;
|
||||
if($comment_sns_type != 'cm') {
|
||||
$logout_link = "comment_logout();";
|
||||
} else {
|
||||
$logout_link = "window.location='/m/member/logout_proc'";
|
||||
}
|
||||
} else if($data['C_Member_Id']) {
|
||||
$logout_link = "window.location='/m/member/logout_proc'";
|
||||
} else {
|
||||
$logout_link = "";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="life_menu_l">
|
||||
<div class="life_menu_top">
|
||||
<h1 class="logo"><a href="javascript:change_slide(0);"><img src="/img/mobile/life_logo.png"></a></h1>
|
||||
<span class="life_close"><img src="/img/mobile/close.png" style="cursor:pointer"></span>
|
||||
|
||||
<? if (isset($data['C_Member_Id'])): ?>
|
||||
|
||||
<div class="profile"><a href="/m/mypage/req_password"><img src="<?= $data['C_Member_Profile'] ?>"
|
||||
onerror="this.src='/img/mobile/life_profile.png'"
|
||||
style="max-width:77px;max-height:77px;"></a></div>
|
||||
<div class="nickname"><a href="/m/mypage/req_password"><?= $data['C_Member_Nicname'] ?></a></div>
|
||||
<div class="member"><a href="/m/mypage/req_password"><?= $data['C_Member_Group_Name'] ?></a></div>
|
||||
<div class="life_menu_btn" style="background: #f6f6f6;">
|
||||
<button type="button" class="btn btn-default br20" style="width:100px;color:#a7a7a7"
|
||||
onclick="<?=$logout_link;?>">로그아웃
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<? else: ?>
|
||||
|
||||
<div class="profile"><a><img src="/img/mobile/life_profile.png"></a></div>
|
||||
<div class="bible"><?=$today_word?><br><span class="chpter"><?=$today_word_title?></span>
|
||||
</div>
|
||||
<div class="life_menu_btn" style="background: #f6f6f6;">
|
||||
<button type="button" class="btn btn-default br20" style="width:100px;color:#a7a7a7" onclick="login()">
|
||||
로그인
|
||||
</button>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
<div class="life_cate">
|
||||
<span style="width:30%;"><img src="/img/mobile/life_icon2.png"><a <?=(isset($data['C_Member_Id']))? 'href="/m/mypage/user_comment"' : 'href="javascript:alert(\'로그인 후 사용 가능합니다.\')" ' ?> >내댓글보기</a></span>
|
||||
<span><img src="/img/mobile/life_bar.gif"></span>
|
||||
<span style="width:28%;"><img src="/img/mobile/life_icon3.png"> <a <?=(isset($data['C_Member_Id']))? 'href="/m/mypage/bookmark"' : 'href="javascript:alert(\'로그인 후 사용 가능합니다.\')" ' ?>>북마크</a></span>
|
||||
<span><img src="/img/mobile/life_bar.gif"></span>
|
||||
<span style="width:28%;"><img src="/img/mobile/life_icon1.png"><a <?=(isset($data['C_Member_Id']))? 'href="/m/mypage/delivery"' : 'href="javascript:alert(\'로그인 후 사용 가능합니다.\')" ' ?>>배달함</a></span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<ul class="life_list_top">
|
||||
<li><a onclick="change_slide(0)" style="cursor:pointer;" class="current">은혜</a></li>
|
||||
<li><a onclick="change_slide(1);" style="cursor:pointer;">라이프</a></li>
|
||||
<li><a onclick="change_slide(2);" style="cursor:pointer;">뉴스</a></li>
|
||||
<li><a onclick="change_slide(3);" style="cursor:pointer;">바로가기</a></li>
|
||||
</ul>
|
||||
<div class="life_app">
|
||||
<h4 style="padding: 0 20px 10px 20px;">추천앱</h4>
|
||||
<?
|
||||
$ci = &get_instance();
|
||||
$ci->load->model('web/m_recommend_app');
|
||||
$result = $ci->m_recommend_app->recommend_app_list(array("offset" => 0, "limit" => 99));
|
||||
?>
|
||||
<div class="swiper-container swiper-04">
|
||||
|
||||
|
||||
<div class="swiper-wrapper">
|
||||
<? foreach ($result as $key => $app_data): ?>
|
||||
<div class="swiper-slide"><a href="<?= $app_data['market_url'] ?>" target="_blank"><img style="width:66px;height:66px;"
|
||||
src="<?= thumb($app_data['icon_img']) ?>"></a><a href="<?= $app_data['market_url'] ?>"
|
||||
target="_blank"
|
||||
class="app_txt"><?= $app_data['app_name'] ?></a>
|
||||
</div>
|
||||
<? endforeach; ?>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Add Arrows -->
|
||||
<div class="swiper-button-next"></div>
|
||||
<div class="swiper-button-prev"></div>
|
||||
<div class="swiper-pagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="life_list_bottom">
|
||||
<li><a href="/m/board/notice">공지사항</a> <span class="new" style="display:none;">N</span></li>
|
||||
<li><a href="/m/board/faq">FAQ</a></li>
|
||||
<?if(isset($data['C_Member_Id'])):?>
|
||||
<li><a href="/m/mypage/qna">1:1 문의</a></li>
|
||||
<?endif?>
|
||||
</ul>
|
||||
<div class="life_menu_btn">
|
||||
<? if (isset($data['C_Member_Id'])): ?>
|
||||
<button type="button" class="btn btn-default br20" style="widh:100px;color:#a7a7a7"
|
||||
onclick="window.location='/m/member/logout_proc'">로그아웃
|
||||
</button>
|
||||
<? else: ?>
|
||||
<button type="button" class="btn btn-default br20" style="width:100px;color:#a7a7a7" onclick="login()">로그인
|
||||
</button>
|
||||
<? endif ?>
|
||||
</div>
|
||||
<div class="life_menu_btn" style="padding-bottom:80px;">
|
||||
<button type="button" class="btn btn-default_bb br20" style="width:100px;" onclick="window.location='/'">PC 버전
|
||||
</button>
|
||||
</div>
|
||||
<div class="dims" id='swipeme'></div>
|
||||
<div class="dims2"></div>
|
||||
</div>
|
||||
<div class="news_top">
|
||||
<span class="news_menu"><img src="/img/mobile/news_menu.png" style="cursor:pointer"></span>
|
||||
<span class="news_logo"><a href=""><img src="/img/mobile/news_logo.png"></a></span>
|
||||
<div>
|
||||
<span class="srch">
|
||||
<form name="search_form" id="search_form" method="get" action="/m/search/">
|
||||
<span><input type="text" class="window" id="search_keyword" name="search_keyword" autocomplete="off" placeholder="검색"
|
||||
value=""
|
||||
onkeyup="onkeyup_search_keyword(this.value);">
|
||||
|
||||
<a style="float:right;" href="javascript:search_form.submit();"><img src="/img/mobile/mypage_serch_icon.gif" alt="검색하기"></a>
|
||||
<a href="javascript:show_toggle()"><img id="show_toggle" src="/img/mobile//arrow_up2.png" alt="검색하기" style="float:right; margin-top:4px;"></a>
|
||||
</span>
|
||||
</form>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_nav"><!-- 여기를 아래로 내릴때 픽스시켜준다 -->
|
||||
<span class="current" style="width:20%;"><a href="/m#grace">은혜</a></span>
|
||||
<span style="width:30%;"><a href="/m#life">라이프</a></span>
|
||||
<span style="width:20%;"><a href="/m#newss">뉴스</a></span>
|
||||
<span style="width:30%;"><a href="/m#shortcut">바로가기</a></span>
|
||||
</div>
|
||||
|
||||
<div class="open_search" id="open_search" style="display:none;">
|
||||
<div class="roll_box" id="prev_keyword_list">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="roll_box" id="search_keyword_list">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="roll_footer">
|
||||
<span><a href="javascript:pre_keyword_toggle()">최근 검색어 <span id="pre_on_off"></span></a></span> | <span><a href="javascript:removeAll()">전체삭제</a></span>
|
||||
<span class="fr"><a href='javascript:$("#open_search").hide();'>닫기</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$.ajax({
|
||||
url: "/m/board/ajax_new_notice",
|
||||
success: function (data) {
|
||||
if (parseInt(data) > 0) $(".new").show();
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
function login() {
|
||||
window.location = "/m/member/login?redir=" + window.location.href;
|
||||
}
|
||||
|
||||
|
||||
// 검색
|
||||
function onkeyup_search_keyword(val) {
|
||||
if (window.event.keyCode == 13) {
|
||||
search_keyword_proc(val);
|
||||
|
||||
} else {
|
||||
if (val == '') {
|
||||
$("#search_arrow").removeClass();
|
||||
$("#search_keyword_list").empty();
|
||||
$("#open_search").hide();
|
||||
$("#search_arrow").addClass('src_icon arrow_down_on');
|
||||
} else {
|
||||
console.log(val);
|
||||
var form_data = {
|
||||
"keyword": val
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: '/m/search/search_keyword',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function (rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
var count = rtnJson.data.length;
|
||||
var content = '';
|
||||
for (var i = 0; i < 8; i++) {
|
||||
var result = rtnJson.data[i];
|
||||
var result_keyword = result.keyword;
|
||||
keyword = result_keyword.replace(val, '<span class="on">' + val + '</span>');
|
||||
content += ' <div class="recents"><span><a href="javascript:search_keyword_proc(\'' + result_keyword + '\');">' + keyword + '</a></span><span class="close fr keywords_copy"><img src="/img/mobile/img_pointer.png"></span></div>';
|
||||
}
|
||||
/*
|
||||
* 키워드끼리 비교하여 정확도를 구하고 해당 정확도 순으로 정렬하는 작업이 필요합니다.
|
||||
* */
|
||||
|
||||
|
||||
|
||||
$("#search_keyword_list").html(content);
|
||||
$("#search_arrow").removeClass();
|
||||
$("#open_search").show();
|
||||
|
||||
$(".keywords_copy").each(function(i,v){
|
||||
|
||||
a = $(v).prev().text();
|
||||
|
||||
if(a.indexOf(val) < 0){
|
||||
$(v).parent().hide();
|
||||
}
|
||||
else{
|
||||
$(v).parent().show();
|
||||
window.aa = $(this);
|
||||
console.log($(this).html());
|
||||
if( a == val ){
|
||||
$(this).find("img").hide();
|
||||
}
|
||||
else{
|
||||
$(this).find("img").show();
|
||||
}
|
||||
}
|
||||
return;
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
$("#search_arrow").removeClass();
|
||||
$("#search_keyword_list").empty();
|
||||
$("#open_search").hide();
|
||||
}
|
||||
},
|
||||
error: function (rtnJson) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function search_keyword_proc(search_keyword) {
|
||||
if (search_keyword == '') {
|
||||
search_keyword = $("#search_keyword").val();
|
||||
}
|
||||
var result = true;
|
||||
if (search_keyword != '') result = search_keyword_reg(search_keyword);
|
||||
if (result == true) {
|
||||
$("#search_keyword").val(search_keyword);
|
||||
$("#search_form").submit();
|
||||
}
|
||||
|
||||
}
|
||||
// 스크롤 고정 함수.
|
||||
function scroll_fix(news_nav) {
|
||||
|
||||
$( document ).ready( function() {
|
||||
|
||||
var jbOffset = $( '.'+news_nav ).offset(); // 고정하고자 하는 클래스의 offset.
|
||||
|
||||
$( window ).scroll( function() {
|
||||
/*스크롤탑(현재스크롤위치) > news_nav : 상단 아래로 내렸을때 상단 고정*/
|
||||
if ( $( document ).scrollTop() > jbOffset.top ) {
|
||||
$( '.'+news_nav ).addClass( 'jbFixed' );
|
||||
$( '.mainswiper' ).addClass( 'Fixed' );
|
||||
}
|
||||
/*스크롤탑(현재스크롤위치) <= news_nav : 원래*/
|
||||
else {
|
||||
$( '.'+news_nav ).removeClass( 'jbFixed' );
|
||||
$( '.mainswiper' ).removeClass( 'Fixed' );
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
} );
|
||||
}
|
||||
//
|
||||
|
||||
function remove(i){
|
||||
|
||||
$k = JSON.parse($.cookie("pre_keyword"));
|
||||
$k.splice(i,1);
|
||||
$.cookie("pre_keyword",JSON.stringify($k),{ expires: 7, path: '/'});
|
||||
$("#keys"+i).remove();
|
||||
}
|
||||
|
||||
function removeAll(){
|
||||
|
||||
$.cookie("pre_keyword","[]",{ expires: 7, path: '/'});
|
||||
$(".keys").remove();
|
||||
}
|
||||
|
||||
function pre_keyword_toggle(){
|
||||
toggle = $.cookie('pre_keyword_show') || "Y";
|
||||
|
||||
if(toggle == 'Y'){
|
||||
$.cookie('pre_keyword_show',"N",{ expires: 7, path: '/'});
|
||||
$("#prev_keyword_list").hide();
|
||||
$("#pre_on_off").text("켜기");
|
||||
}
|
||||
else{
|
||||
$.cookie('pre_keyword_show',"Y",{ expires: 7, path: '/'});
|
||||
$("#prev_keyword_list").show();
|
||||
$("#pre_on_off").text("끄기");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function show_toggle(){
|
||||
toggle = $.cookie('pre_keyword_show') || "Y";
|
||||
$(".open_search").toggle();
|
||||
if($(".open_search").css("display") == "block"){
|
||||
$("#show_toggle").attr("src","/img/mobile/arrow_up2.png");
|
||||
}
|
||||
else{
|
||||
$("#show_toggle").attr("src","/img/mobile/arrow_down2_gray.png");
|
||||
}
|
||||
console.log($("#show_toggle").attr("src"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$("body").on("click",".keywords_copy",function(i,v){
|
||||
|
||||
selected_keyword = $(this).prev().text();
|
||||
$("#search_keyword").val(selected_keyword);
|
||||
onkeyup_search_keyword(selected_keyword);
|
||||
});
|
||||
|
||||
keys = $.cookie("pre_keyword") || "[]";
|
||||
keys = JSON.parse(keys);
|
||||
$("#prev_keyword_list").html("");
|
||||
|
||||
add = null;
|
||||
add = "<span class=\"close fr keywords_copy\" style=\"width: 14px;\"><img src=\"/img/mobile/img_pointer.png\"></span>";
|
||||
|
||||
for(i=0;i<keys.length;i++){
|
||||
$("#prev_keyword_list").append("\n" +
|
||||
"\t\t<div class='keys' id='keys"+i+"'>\n" +
|
||||
"\t\t\t<span><a href=\"javascript:search_keyword_proc('"+keys[i].split("|")[0]+"')\"><span class=\"search_pointer\">"+keys[i].split("|")[0]+"</span></a></span>\n" +
|
||||
//"\t\t\t<span class=\"close fr\" onclick='remove("+i+")'><img src=\"/img/mobile/img_x_grey.png\"></span>\n" +
|
||||
add+
|
||||
"<span class=\"date fr\">"+keys[i].split("|")[1]+"</span>"+
|
||||
"\t\t</div>");
|
||||
}
|
||||
|
||||
$("#search_keyword").focus(function(){
|
||||
$(".open_search").show();
|
||||
});
|
||||
|
||||
toggle = $.cookie('pre_keyword_show') || "Y";
|
||||
|
||||
if(toggle == 'Y'){
|
||||
$("#prev_keyword_list").show();
|
||||
$("#pre_on_off").text("끄기");
|
||||
}
|
||||
else{
|
||||
$("#prev_keyword_list").hide();
|
||||
$("#pre_on_off").text("켜기");
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
scroll_fix('news_nav'); // 상단 고정하고 싶은 클래스 설정.
|
||||
var swiper4 = new Swiper('.swiper-04', {
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 10,
|
||||
pagination : { // 페이징 설정
|
||||
el : '.swiper-pagination',
|
||||
clickable : true, // 페이징을 클릭하면 해당 영역으로 이동, 필요시 지정해 줘야 기능 작동
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
});
|
||||
|
||||
</script>
|
||||
162
application/views/m/common/realtime.php
Executable file
162
application/views/m/common/realtime.php
Executable file
@@ -0,0 +1,162 @@
|
||||
<div class="open_roll bar_type">
|
||||
<div class="mostpopular-fixed"><span>실시간급상승</span></div>
|
||||
<div>
|
||||
|
||||
<?
|
||||
$ci = &get_instance();
|
||||
$ci->load->model('web/m_realtime_keyword');
|
||||
$arr_realtime_keyword = $ci->m_realtime_keyword->realtime_keyword_all_list();
|
||||
|
||||
|
||||
foreach ($arr_realtime_keyword as $key=>$val) :
|
||||
|
||||
$last_rank = $val['last_rank'];
|
||||
$rank = $val['rank'];
|
||||
|
||||
$class = '';
|
||||
$last_rank_txt = '';
|
||||
if($last_rank==0){
|
||||
$class = 'new';
|
||||
$last_rank_txt = 'NEW';
|
||||
} else {
|
||||
$calc_rank = $last_rank - $rank;
|
||||
if($calc_rank == 0){ // 같음
|
||||
$last_rank_txt = '-';
|
||||
} else if($calc_rank > 0){ // up
|
||||
$last_rank_txt = '<img src="/img/web/btn_up.jpg">'.$calc_rank;
|
||||
} else {
|
||||
$last_rank_txt = '<img src="/img/web/btn_down.jpg">'.abs($calc_rank);
|
||||
}
|
||||
}
|
||||
$keyword = mb_strimwidth($val['keyword'], '0', '25', '..', 'utf-8');
|
||||
?>
|
||||
<div class="roll_box">
|
||||
<span class="mostpopular">실시간급상승</span>
|
||||
<span class="no" >
|
||||
<?=$rank?>
|
||||
</span>
|
||||
<span class="keyword" style="cursor:pointer;">
|
||||
<a href="/m/search/?search_keyword=<?=urlencode($val['keyword'])?>">
|
||||
<?=$keyword?>
|
||||
</a>
|
||||
</span>
|
||||
<span class="graph updown" style="cursor:pointer;">
|
||||
<?=$last_rank_txt?>
|
||||
</span>
|
||||
<span style="padding-left:10px;cursor:pointer" ><img src="/img/mobile/arr_down.gif"></span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?endforeach; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="open_roll spread">
|
||||
<div class="open_roll_wrap">
|
||||
<div class="txt">실시간 급상승
|
||||
<a class="close_btn" style="cursor:pointer;">×</a>
|
||||
</div>
|
||||
<ul class="ranking">
|
||||
<li style="width:48%">
|
||||
<a class="rank first current" style="cursor:pointer;">1-10위</a>
|
||||
</li>
|
||||
<li style="width:2%">
|
||||
<img src="/img/mobile/img_ranking.gif">
|
||||
</li>
|
||||
<li style="width:48%">
|
||||
<a class="rank second" style="cursor:pointer;">11-20위</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="roll_box_wrap">
|
||||
<div>
|
||||
<?
|
||||
foreach ($arr_realtime_keyword as $key=>$val) :
|
||||
|
||||
$last_rank = $val['last_rank'];
|
||||
$rank = $val['rank'];
|
||||
|
||||
$class = '';
|
||||
$last_rank_txt = '';
|
||||
if($last_rank==0){
|
||||
$class = 'new';
|
||||
$last_rank_txt = 'NEW';
|
||||
} else {
|
||||
$calc_rank = $last_rank - $rank;
|
||||
if($calc_rank == 0){ // 같음
|
||||
$last_rank_txt = '-';
|
||||
} else if($calc_rank > 0){ // up
|
||||
$last_rank_txt = '<img src="/img/web/btn_up.jpg">'.$calc_rank;
|
||||
} else {
|
||||
$last_rank_txt = '<img src="/img/web/btn_down.jpg">'.abs($calc_rank);
|
||||
}
|
||||
}
|
||||
$keyword = mb_strimwidth($val['keyword'], '0', '25', '..', 'utf-8');
|
||||
?>
|
||||
<div class="<?echo ($key < 10)?"first": "second hide"?>">
|
||||
<div class="issue_box">
|
||||
<span class="no">
|
||||
<?=$rank?>
|
||||
</span>
|
||||
<span>
|
||||
<a href="/m/search/?search_keyword=<?=urlencode($val['keyword'])?>">
|
||||
<?=$keyword?>
|
||||
</a>
|
||||
</span>
|
||||
<span class="bbox <?=$class?> updown">
|
||||
<?=$last_rank_txt?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?endforeach; ?>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
// 실시간 급상승 검색어 위로 슬라이딩
|
||||
var margin_top = 0;
|
||||
var no_i = 0;
|
||||
setInterval(function(){
|
||||
(margin_top < (51*20*-1))? margin_top = 0 : margin_top -= 51.5;
|
||||
$(".open_roll.bar_type > div").animate({ "margin-top" : margin_top +"px"},1000);
|
||||
},10000);
|
||||
|
||||
// 실시간 급상승 펼치기 버튼
|
||||
$(".open_roll.bar_type .roll_box img").click(function(){
|
||||
$(".open_roll.spread").show();
|
||||
});
|
||||
|
||||
// 실시간 급상승 접기 버튼
|
||||
$(".open_roll.spread .close_btn").click(function(){
|
||||
$(".open_roll.spread").hide();
|
||||
});
|
||||
|
||||
//순위별 보여주기 , 1-10위 | 11-20위 클릭시
|
||||
$(".open_roll.spread .ranking a.rank").click(function(){
|
||||
|
||||
//모든 current 클래스 제거
|
||||
$(".open_roll.spread .ranking a.rank").removeClass("current");
|
||||
//클릭된 엘리먼트에 current 추가
|
||||
$(this).addClass("current");
|
||||
|
||||
// 1-10위 클릭이면
|
||||
$(".roll_box_wrap > div > div").addClass("hide");
|
||||
if($(this).hasClass("first")){
|
||||
|
||||
$(".roll_box_wrap > div > div.first").removeClass("hide");
|
||||
}
|
||||
// 11-20위 클릭이면
|
||||
else if($(this).hasClass("second")){
|
||||
$(".roll_box_wrap > div > div.second").removeClass("hide");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
55
application/views/m/common/weather.php
Executable file
55
application/views/m/common/weather.php
Executable file
@@ -0,0 +1,55 @@
|
||||
<div id="weather_block" style="height:60px;overflow:hidden;">
|
||||
<div class="spirit-fixed"><span class="">영적기상도</span></div>
|
||||
<div>
|
||||
<?
|
||||
|
||||
$ci = &get_instance();
|
||||
$ci->load->model('web/m_weather');
|
||||
$arr_weather = $ci->m_weather->weather_join_relation_article_join_news_list();
|
||||
|
||||
|
||||
// var_dump($arr_weather[0]);
|
||||
// $data = $arr_weather[0];
|
||||
//var_dump
|
||||
foreach ($arr_weather as $data):
|
||||
?>
|
||||
<div class="weather" onclick="window.location='/m/news/news_view/<?=$data['relation_article_idx']?>'" style="cursor:pointer;">
|
||||
|
||||
<span class="spirit">영적기상도</span>
|
||||
|
||||
<span class="country">
|
||||
<strong>
|
||||
<?= $data['continent'] ?>
|
||||
</strong>
|
||||
</span>
|
||||
<span class="country2">
|
||||
<?= $data['country'] ?>
|
||||
<span class="date">
|
||||
<span>|</span>
|
||||
<?
|
||||
setlocale(LC_TIME, 'ko_KR');
|
||||
echo iconv("euc-kr", "utf-8", strftime('%Y.%m.%d(%a)')); // 결과 : 금 금요일
|
||||
?>
|
||||
</span>
|
||||
</span>
|
||||
<span class="fr">
|
||||
<img src="<?= $data['weather_icon'] ?>">
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<? endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
_margin_top = 0;
|
||||
setInterval(function(){
|
||||
(_margin_top < (60*<?=count($arr_weather)-2?>*-1))? _margin_top = 0 : _margin_top -= 60;
|
||||
|
||||
$("#weather_block > div").animate({ "margin-top" : _margin_top+"px"},1000);
|
||||
|
||||
},10000);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user