first commit
This commit is contained in:
266
application/views/m/search/image.php
Executable file
266
application/views/m/search/image.php
Executable file
@@ -0,0 +1,266 @@
|
||||
<?
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
$is_more = 'Y';
|
||||
if ($total_count <= $limit) {
|
||||
$is_more = 'N';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<? include_once "search_header.php" ?>
|
||||
<style>
|
||||
.thumbs {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-content: flex-start;
|
||||
align-items: stretch;
|
||||
/* for demo: */
|
||||
|
||||
|
||||
margin: 10px auto;
|
||||
resize: both;
|
||||
}
|
||||
|
||||
.thumb {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
flex: 1 0 auto;
|
||||
width: auto;
|
||||
height: 120px;
|
||||
/* cosmetics and zoom: */
|
||||
margin: 2px;
|
||||
text-decoration: none;
|
||||
background-color: rgba(0,0,0, 0.50);
|
||||
box-shadow: 0px 0px 0px 0px rgba(0,0,0, 0.0);
|
||||
transition: box-shadow 300ms, transform 400ms, z-index 400ms, background-position 400ms;
|
||||
z-index: 1;
|
||||
}
|
||||
.thumb:hover {
|
||||
/* zoom: */
|
||||
box-shadow: 0px 0px 10px 0px rgba(0,0,0, 0.7);
|
||||
transform: scale(1.2, 1.2);
|
||||
z-index: 100;
|
||||
}
|
||||
.thumb-img > img,
|
||||
.thumb-txt > div {
|
||||
min-width: 60px;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.thumb-img {
|
||||
background-size: cover;
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.thumb-img:hover {
|
||||
animation-name: thumb-scroll;
|
||||
animation-delay: 400ms;
|
||||
animation-duration: 2.5s;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: normal;
|
||||
animation-timing-function: linear;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
.thumb-img > img {
|
||||
display: block;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div class="news_box">
|
||||
<div class="news_box_title" style="border-bottom:0;">
|
||||
이미지 <span class="search_num"><?= number_format($total_count) ?>건</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="thumbs" class="thumbs">
|
||||
|
||||
</div>
|
||||
<iframe style=" width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
background-image: url(/img/loading_circle.gif);
|
||||
background-size: auto;
|
||||
z-index: 2147483647;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-color: black;
|
||||
display:none;"></iframe>
|
||||
<?include_once ("search_footer_inc.php")?>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
var more_yn = '<?=$is_more?>';
|
||||
$(document).scroll(function () {
|
||||
var maxHeight = $(document).height();
|
||||
var currentScroll = $(window).scrollTop() + $(window).height();
|
||||
if (maxHeight <= (currentScroll + 100)) {
|
||||
console.log(more_yn);
|
||||
if (more_yn == "Y") {
|
||||
get_img_list();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
var img_list_page = 1;
|
||||
|
||||
function get_img_list() {
|
||||
|
||||
console.log("get_img_list");
|
||||
var form_data = {
|
||||
"page": img_list_page,
|
||||
"search_keyword": "<?=$search_keyword?>"
|
||||
};
|
||||
$.ajax({
|
||||
url: '/m/search/image_list_more',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'HTML',
|
||||
data: form_data,
|
||||
success: function (rtnHtml) {
|
||||
var arrHtml = rtnHtml.split("|||||");
|
||||
if (arrHtml[0].trim() == '0000') {
|
||||
more_yn = arrHtml[2];
|
||||
console.log(more_yn);
|
||||
if (arrHtml[1] != "") {
|
||||
$('.thumbs').append(arrHtml[1]);
|
||||
img_list_page++;
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (rtnHtml) {
|
||||
alert('데이터 로드에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
get_img_list();
|
||||
|
||||
$(document).ready(function () {
|
||||
//get_img_list();
|
||||
|
||||
|
||||
$('.smalls').click(function () {
|
||||
var tmp = $(this).parent()
|
||||
if (tmp.attr('class') == 'imms') {
|
||||
$('.imms').removeClass('act');
|
||||
tmp.addClass('act');
|
||||
} else {
|
||||
tmp.removeClass('act');
|
||||
}
|
||||
});
|
||||
$('.omm_a2').click(function () {
|
||||
var tmp = $(this).parent().parent()
|
||||
if (tmp.attr('class') == 'omgg_ul1') {
|
||||
tmp.addClass('act');
|
||||
} else {
|
||||
tmp.removeClass('act');
|
||||
}
|
||||
});
|
||||
$('.omm_c').click(function () {
|
||||
$('.omgg_ul1').removeClass('act');
|
||||
});
|
||||
|
||||
/*
|
||||
$('.ommbtn.omm_next').click(function(){
|
||||
var tmp = $(this).parent()
|
||||
if (tmp.attr('class') == 'image--expand') {
|
||||
$('html, body').animate({scrollTop:$(this).offset().top}, 0);
|
||||
}else{
|
||||
// $('html, body').animate({scrollTop:$(this).offset().top + 140}, 0);
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
});
|
||||
|
||||
var $cell = $('.image__cell');
|
||||
|
||||
function thumb_img_click(t) {
|
||||
var $thisCell = $(t).closest('.image__cell');
|
||||
if ($thisCell.hasClass('is-collapsed')) {
|
||||
$cell.not($thisCell).removeClass('is-expanded').addClass('is-collapsed');
|
||||
$thisCell.removeClass('is-collapsed').addClass('is-expanded');
|
||||
$('html, body').animate({scrollTop: $(t).offset().top}, 300);
|
||||
} else {
|
||||
$thisCell.removeClass('is-collapsed').addClass('is-expanded');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function img_view_change(num) {
|
||||
var $thisCell = $('#img_item' + num).closest('.image__cell');
|
||||
if ($thisCell.hasClass('is-collapsed')) {
|
||||
$cell.not($thisCell).removeClass('is-expanded').addClass('is-collapsed');
|
||||
$thisCell.removeClass('is-collapsed').addClass('is-expanded');
|
||||
$('html, body').animate({scrollTop: $('#img_item' + num).offset().top}, 0);
|
||||
} else {
|
||||
$thisCell.removeClass('is-expanded').addClass('is-collapsed');
|
||||
}
|
||||
}
|
||||
|
||||
function img_view_close(t) {
|
||||
var $thisCell = $(t).closest('.image__cell');
|
||||
$thisCell.removeClass('is-expanded').addClass('is-collapsed');
|
||||
}
|
||||
|
||||
|
||||
$('.ommbtn.omm_next', '.ommbtn.omm_pre').click(function () {
|
||||
var $thisCelle = $(this).closest('.image__cell');
|
||||
// var $this = $(this).closest('.omm_con');
|
||||
|
||||
if ($thisCelle.hasClass('is-collapsed')) {
|
||||
$cell.not($thisCelle).removeClass('is-expanded').addClass('is-collapsed');
|
||||
$thisCelle.removeClass('is-collapsed').addClass('is-expanded');
|
||||
$('html, body').animate({scrollTop: $(this).offset().top}, 300);
|
||||
//return true;
|
||||
|
||||
} else {
|
||||
$thisCelle.removeClass('is-expanded').addClass('is-collapsed');
|
||||
}
|
||||
});
|
||||
|
||||
function show_bigsize(i){
|
||||
$("body").find("iframe").attr("src","/m/search/image_view?data="+i);
|
||||
$("body").find("iframe").show();
|
||||
|
||||
}
|
||||
|
||||
function return_attr(i){
|
||||
$src = $(".thumb_"+i+".src");
|
||||
$href = $(".thumb_"+i+".href");
|
||||
$text = $(".thumb_"+i+".text");
|
||||
|
||||
ret = new Array();
|
||||
$src.each(function(i,v){
|
||||
ret.push({
|
||||
"src" : $src.eq(i).text(),
|
||||
"href" : $href.eq(i).text(),
|
||||
"text" : $text.eq(i).text()
|
||||
});
|
||||
});
|
||||
|
||||
return ret;
|
||||
|
||||
|
||||
}
|
||||
|
||||
function closeIframe(){
|
||||
|
||||
$("body").find("iframe").hide();
|
||||
}
|
||||
</script>
|
||||
120
application/views/m/search/image_list_more.php
Executable file
120
application/views/m/search/image_list_more.php
Executable file
@@ -0,0 +1,120 @@
|
||||
<?
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
$row_count = count($list);
|
||||
|
||||
if($row_count > 0) {
|
||||
|
||||
$max_rand_num = $limit-1;
|
||||
if($total_count < $limit) $max_rand_num = $total_count-1;
|
||||
if(count($list) < $limit) $max_rand_num = count($list);
|
||||
|
||||
$relation_count = 8;
|
||||
if($total_count < 8) $relation_count = $total_count-1;
|
||||
$row = 1;
|
||||
if($page > 1) $row = $view_count +1;
|
||||
foreach($list as $i=>$val) {
|
||||
$idx =$val['idx'];
|
||||
$main_img =$val['main_img'];
|
||||
|
||||
$info = getimagesize('.'.$main_img);
|
||||
$img_width = $info[0];
|
||||
$img_height = $info[1];
|
||||
$img_mime = $info[2];
|
||||
|
||||
|
||||
|
||||
|
||||
$title_text = $val['title'];
|
||||
if(isset($val['category_name'])==true) $title_text.= ' - '.$val['category_name'];
|
||||
|
||||
$img_type = array('1'=>'GIF', '2'=>'JPG','3'=>'PNG','4'=>'PSD','5'=>'BMP','6'=>'TIFF','7'=>'TIFF','8'=>'JPC','9'=>'JP2','10'=>'JPX','11'=>'JB2','12'=>'SWC','13'=>'IFF','14'=>'WBMP','15'=>'XBM');
|
||||
|
||||
|
||||
switch ($val['content_type']) {
|
||||
case '1': $img_view_url = '/m/news/news_view/'.$val['idx']; $content_name='뉴스'; $content_main_url='/web/news'; break;
|
||||
case '2': $img_view_url = '/m/news/column_view/'.$val['idx']; $content_name='칼럼'; $content_main_url='/web/news/column'; break;
|
||||
case '3': $img_view_url = '/m/life/life_view/'.$val['idx']; $content_name='라이프'; $content_main_url='/web/life'; break;
|
||||
}
|
||||
|
||||
|
||||
// $req_data = array();
|
||||
// $req_data['search_type'] = 'main_search';
|
||||
// $req_data['search_keyword'] = $search_keyword_tmp;
|
||||
// $req_data['row_num'] = $val['row_num'];
|
||||
//
|
||||
// $this->load->model('web/m_vw_content');
|
||||
// $arr_next = $this->m_vw_content->vw_content_next_select($req_data);
|
||||
// $arr_prev = $this->m_vw_content->vw_content_prev_select($req_data);
|
||||
|
||||
|
||||
|
||||
// $req_data = array();
|
||||
// $req_data['search_type'] = 'main_search';
|
||||
// $req_data['search_keyword'] = $search_keyword_tmp;
|
||||
// $req_data['offset'] = 0;
|
||||
// $req_data['limit'] = 8;
|
||||
// $req_data['idx'] = $idx;
|
||||
// $this->load->model('web/m_vw_content');
|
||||
// $arr_relation_img = $this->m_vw_content->vw_content_where_not_idx_list($req_data);
|
||||
|
||||
|
||||
|
||||
|
||||
$cnt = ($page-1) * 100 + $i;
|
||||
// $arr = array();
|
||||
// $arr[] = array("src"=>$main_img,"href"=>$img_view_url,"text"=>$title_text);
|
||||
echo "<div style='display:none;' class='thumb_".$cnt." src'>".$main_img."</div>";
|
||||
echo "<div style='display:none;' class='thumb_".$cnt." href'>".$img_view_url."</div>";
|
||||
echo "<div style='display:none;' class='thumb_".$cnt." text'>".$title_text."</div>";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<a href="#somelink" class="thumb thumb-img" style="background-image: url(<?=$main_img?>)" onclick="show_bigsize(<?=$cnt?>)">
|
||||
<img src="<?=$main_img?>" title="<?=$title_text?>" alt="<?=$title_text?>">
|
||||
|
||||
|
||||
<?
|
||||
for ($z=0;$z<$relation_count;$z++) {
|
||||
$key = rand(0, $max_rand_num);
|
||||
if(isset($list[$key]) == true) {
|
||||
|
||||
|
||||
$val2 = $list[$key];
|
||||
switch ($val2['content_type']) {
|
||||
case '1': $img_view_url2 = '/m/news/news_view/'.$val2['idx']; break;
|
||||
case '2': $img_view_url2 = '/m/news/column_view/'.$val2['idx']; break;
|
||||
case '3': $img_view_url2 = '/m/life/life_view/'.$val2['idx']; break;
|
||||
}
|
||||
$alt_text2 = $val2['title'];
|
||||
if(isset($val2['category_name'])==true) $alt_text2.= ' - '.$val2['category_name'];
|
||||
|
||||
echo "<div style='display:none;' class='thumb_".$cnt." src' id=\"thumb_".$cnt."\">".$val2['main_img']."</div>";
|
||||
echo "<div style='display:none;' class='thumb_".$cnt." href'>".$img_view_url2."</div>";
|
||||
echo "<div style='display:none;' class='thumb_".$cnt." text'>".$alt_text2."</div>";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
<?
|
||||
$row++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo '|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||이미지 가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
92
application/views/m/search/image_list_test.php
Executable file
92
application/views/m/search/image_list_test.php
Executable file
@@ -0,0 +1,92 @@
|
||||
<?
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
$row_count = count($list);
|
||||
|
||||
if($row_count > 0) {
|
||||
|
||||
$max_rand_num = $limit-1;
|
||||
if($total_count < $limit) $max_rand_num = $total_count-1;
|
||||
|
||||
$relation_count = 8;
|
||||
if($total_count < 8) $relation_count = $total_count;
|
||||
foreach($list as $val) {
|
||||
$idx =$val['idx'];
|
||||
$main_img =$val['main_img'];
|
||||
|
||||
// $info = getimagesize(WWW_CROSSMAP.$main_img);
|
||||
// $img_width = $info[0];
|
||||
// $img_height = $info[1];
|
||||
// $img_mime = $info[2];
|
||||
|
||||
$title_text = $val['title'];
|
||||
if($val['category_name']!='') $title_text.= ' - '.$val['category_name'];
|
||||
|
||||
//$img_type = array('1'=>'GIF', '2'=>'JPG','3'=>'PNG','4'=>'PSD','5'=>'BMP','6'=>'TIFF','7'=>'TIFF','8'=>'JPC','9'=>'JP2','10'=>'JPX','11'=>'JB2','12'=>'SWC','13'=>'IFF','14'=>'WBMP','15'=>'XBM');
|
||||
|
||||
|
||||
switch ($val['content_type']) {
|
||||
case '1': $img_view_url = '/web/news/news_view/'.$val['idx']; $content_name='뉴스'; $content_main_url='/web/news'; break;
|
||||
case '2': $img_view_url = '/web/news/column_view/'.$val['idx']; $content_name='칼럼'; $content_main_url='/web/news/column'; break;
|
||||
case '3': $img_view_url = '/m/life/life_view/'.$val['idx']; $content_name='라이프'; $content_main_url='/web/life'; break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<a href="javascript:;" title="<?=$title_text?>" class="baimg" onclick="thumb_img_click(this)">
|
||||
<span class="photo_infos"><?=$img_width?>x<?=$img_height?> - <?=WWW_CROSSMAP?><?=$img_view_url?></span>
|
||||
<img id="expand-jump-<?=$idx?>" class="basic__img" src="<?=$main_img?>" alt="<?=$title_text?>" />
|
||||
</a>
|
||||
|
||||
|
||||
<a href="javascript:;" class="expand__close" onclick="img_view_close(this)"></a>
|
||||
<a href="javascript:img_view_change('<?=$val['row_num']+1?>');" title="다음이미지" class="ommbtn omm_next">></a>
|
||||
<a href="javascript:img_view_change('<?=$val['row_num']-1?>');" title="이전이미지" class="ommbtn omm_pre"><</a>
|
||||
<div class="omm_con">
|
||||
<div class="omgg_left"><a href="<?=$img_view_url?>" title="<?=$title_text?>"><img class="image--large" src="<?=$main_img?>" alt="<?=$title_text?>" /></a></div>
|
||||
<div class="omgg_right">
|
||||
<ul class="omgg_ul1">
|
||||
<li class="omm_tit"><a href="<?=$img_view_url?>"><?=$val['title']?></a></li>
|
||||
<li class="omm_txt"><strong><?=$content_name?></strong><?=$img_width?>x<?=$img_height?><span>|</span><?=$img_type[$img_mime]?><span>
|
||||
</ul>
|
||||
<div class="omm_imm_list">
|
||||
<ul>
|
||||
<? for ($z=0;$z<$relation_count;$z++) {
|
||||
$key = rand(0, $max_rand_num);
|
||||
$val2 = $list[$key];
|
||||
switch ($val2['content_type']) {
|
||||
case '1': $img_view_url2 = '/web/news/news_view/'.$val2['idx']; break;
|
||||
case '2': $img_view_url2 = '/web/news/column_view/'.$val2['idx']; break;
|
||||
case '3': $img_view_url2 = '/m/life/life_view/'.$val2['idx']; break;
|
||||
}
|
||||
$alt_text2 = $val2['title'];
|
||||
if($val2['category_name']!='') $alt_text2.= ' - '.$val2['category_name'];
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<li class="imms"><a href="<?=$img_view_url2?>"><img src="<?=$val2['main_img']?>" class="smalls" title="<?=$alt_text2?>"></a></li>
|
||||
|
||||
<? }?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo '|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||이미지 가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
111
application/views/m/search/image_view.php
Executable file
111
application/views/m/search/image_view.php
Executable file
@@ -0,0 +1,111 @@
|
||||
<?
|
||||
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
|
||||
<title>Crossmap</title>
|
||||
<link rel="stylesheet" href="/css/m/swiper.min.css">
|
||||
<link rel="stylesheet" href="/css/m/xeicon.min.css">
|
||||
<link rel="stylesheet" href="/css/m/img_style.css">
|
||||
</head>
|
||||
|
||||
<body id="photo" class="photos">
|
||||
<a href="javascript:dd()" class="ph_back"><i class="xi-long-arrow-left"></i></a>
|
||||
<!-- Swiper -->
|
||||
<div class="swiper-container gallery-top">
|
||||
<div class="swiper-wrapper" id="main">
|
||||
|
||||
</div>
|
||||
<!-- Add Arrows -->
|
||||
<div class="swiper-button-next swiper-button-white"></div>
|
||||
<div class="swiper-button-prev swiper-button-white"></div>
|
||||
</div>
|
||||
<div class="swiper-container gallery-thumbs">
|
||||
<div class="swiper-wrapper" id="sub">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="/js/m/jquery-1.11.3.min.js"></script>
|
||||
<script src="/js/m/swipers.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
function dd(){
|
||||
parent.closeIframe();
|
||||
}
|
||||
|
||||
arr = parent.return_attr(<?=($_GET['data'])?>);
|
||||
|
||||
|
||||
|
||||
txt ='';
|
||||
txt2 = '';
|
||||
for(i=0;i<arr.length;i++){
|
||||
txt += '<div class="swiper-slide" style="background-image: url('+arr[i].src+'); background-size:contain;background-repeat:no-repeat;">\n' +
|
||||
'\t\t\t<div class="sw_tit">\n' +
|
||||
'\t\t\t\t<ul>\n' +
|
||||
'\t\t\t\t\t<li onclick="parent.window.location=\''+arr[i].href+'\'" style="cursor:pointer">'+arr[i].text+'</li>\n' +
|
||||
'\t\t\t\t</ul>\n' +
|
||||
'\t\t\t\t<div class="swbtn1"><a href="#">연관</a></div>\n' +
|
||||
'\t\t\t\t<div class="swbtn2"><a href="#"><i class="xi-ellipsis-v"></i></a></div>\n' +
|
||||
'\t\t\t</div>\n' +
|
||||
'\t\t\t<div class="sw_set">\n' +
|
||||
'\t\t\t\t<ul>\n' +
|
||||
'\t\t\t\t\t<li class="upbt"><a href="#"><i class="xi-upload"></i></a></li>\n' +
|
||||
'\t\t\t\t\t<li><a href="#"><i class="xi-overscan"></i></a></li>\n' +
|
||||
'\t\t\t\t\t<li><a href="#"><i class="xi-close"></i></a></li>\n' +
|
||||
'\t\t\t\t</ul>\n' +
|
||||
'\t\t\t</div>\n' +
|
||||
'\t\t</div>\n' +
|
||||
'\t\t';
|
||||
|
||||
txt2 +='<div class="swiper-slide" style="cursor:pointer;background-image: url('+arr[i].src+')"></div>\';';
|
||||
|
||||
}
|
||||
|
||||
$("#main").append(txt);
|
||||
$("#sub").append(txt2);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var galleryTop = new Swiper('.gallery-top', {
|
||||
spaceBetween: 10,
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
});
|
||||
var galleryThumbs = new Swiper('.gallery-thumbs', {
|
||||
spaceBetween: 10,
|
||||
centeredSlides: true,
|
||||
slidesPerView: 'auto',
|
||||
touchRatio: 0.2,
|
||||
slideToClickedSlide: true,
|
||||
});
|
||||
galleryTop.controller.control = galleryThumbs;
|
||||
galleryThumbs.controller.control = galleryTop;
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var mySwiper ;
|
||||
$(document).ready(function(){
|
||||
|
||||
$('.swbtn1').click(function(){
|
||||
|
||||
$("body").toggleClass('active');
|
||||
});
|
||||
|
||||
$('.swbtn2').click(function(){
|
||||
|
||||
$("div#main").toggleClass('set');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
491
application/views/m/search/index.php
Executable file
491
application/views/m/search/index.php
Executable file
@@ -0,0 +1,491 @@
|
||||
<?
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
$title = '';
|
||||
$content = '';
|
||||
$main_img = '';
|
||||
|
||||
$arr_search_keyword = array();
|
||||
if($search_keyword!=''){
|
||||
$arr_search_keyword = explode(" ", $search_keyword);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<?include_once "search_header.php"?>
|
||||
|
||||
<? if($total_count == 0) { ?>
|
||||
<div class="news_nothing">
|
||||
<div class="t_nothing"><span class="beachblue"><?=$search_keyword?></span> 에 대한 검색결과가 없습니다.</div>
|
||||
<ul>
|
||||
<li>단어의 철자가 정확한지 확인해 보세요.</li>
|
||||
<li>한글을 영어로 혹은 영어를 한글로 입력했는지 확인해보세요.</li>
|
||||
<li>검색어의 단어 수를 줄이거나, 보다 일반적인 검색어로 다시 검색해보세요.</li>
|
||||
<li>두 단어 이상의 검색어인 경우, 띄어쓰기를 확인해 보세요.</li>
|
||||
<li>검색 옵션을 변경해서 다시 검색해 보세요.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<? } ?>
|
||||
|
||||
|
||||
<? if(count($arr_search_keyword_relation) > 0) {?>
|
||||
<!-- <div class="relative">
|
||||
<span class="r_left"><span class="r_title">연관</span>
|
||||
<? foreach($arr_search_keyword_relation as $val) {?>
|
||||
<a href="/m/search/?search_keyword=<?=$val['relation_keyword']?>"><?=$val['relation_keyword']?></a>
|
||||
<? }?>
|
||||
</span>
|
||||
</div> -->
|
||||
|
||||
|
||||
<? }?>
|
||||
|
||||
|
||||
<? if(count($arr_life) > 0) {?>
|
||||
<div class="news_cont2">
|
||||
<div class="news_box">
|
||||
<div class="news_box_title">
|
||||
라이프
|
||||
</div>
|
||||
<? $i=1;
|
||||
foreach ($arr_life as $key=>$val) {
|
||||
$title = $val['title'];
|
||||
$content = strip_tags($val['content']);
|
||||
|
||||
$title_txt = mb_strimwidth($title, '0', '60', '..', 'utf-8');
|
||||
$content_txt = mb_strimwidth($content, '0', '180', '..', 'utf-8');
|
||||
|
||||
foreach($arr_search_keyword as $val3) {
|
||||
$title_txt = str_replace($val3, '<b>'.$val3.'</b>', $title_txt);
|
||||
$content_txt = str_replace($val3, '<b>'.$val3.'</b>', $content_txt);
|
||||
}
|
||||
|
||||
$display_date_txt = gf_article_date_text($val['display_date']);
|
||||
|
||||
$share_title = str_replace("'", "\\'", $val['title']);
|
||||
$share_title = str_replace('"', '\\"', $share_title);
|
||||
$share_content = mb_strimwidth($content, '0', '250', '..', 'utf-8');
|
||||
$share_content = htmlspecialchars($share_content);
|
||||
$share_content = str_replace("'", "\\'", $share_content);
|
||||
$share_content = str_replace('”', '"', $share_content);
|
||||
|
||||
$main_img = $val['main_img'];
|
||||
|
||||
$life_class = '';
|
||||
if($i==count($arr_life)) {
|
||||
$life_class=' bb pdb20';
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div class="news_box_con search_wrap<?=$life_class?>">
|
||||
<input type="hidden" name="content_life_<?=$val['idx']?>" id="content_life_<?=$val['idx']?>" value="<?=$share_content?>">
|
||||
<input type="hidden" name="title_life_<?=$val['idx']?>" id="title_life_<?=$val['idx']?>" value="<?=$share_title?>">
|
||||
<input type="hidden" name="copy_url_life_<?=$val['idx']?>" id="copy_url_life_<?=$val['idx']?>" value="<?=WWW_CROSSMAP_M?>/life/life_view/<?=$val['idx']?>">
|
||||
<input type="hidden" name="img_url_life_<?=$val['idx']?>" id="img_url_life_<?=$val['idx']?>" value="<?=WWW_CROSSMAP_M?><?=$main_img?>">
|
||||
<h2><a href="/m/life/life_view/<?=$val['idx']?>"><?=$title_txt?></a></h2>
|
||||
<div class="news_box_con_left">
|
||||
<div><?=$content_txt?></div>
|
||||
</div>
|
||||
<div class="news_box_detail" style="padding-top: 35px;">
|
||||
<span class="profile"><a href="/m/life/editor/<?=$val['partner_idx']?>"><img style="padding-right:3px; max-width:21px;max-height:21px; vertical-align:middle;" src="<?=$val['partner_img']?>"><?=$val['editor_name']?></a></span>
|
||||
<!-- <span><img src="/img/mobile/search_bar.gif"></span> -->
|
||||
<span>|</span>
|
||||
<span><?=$display_date_txt?></span>
|
||||
<span>|</span>
|
||||
<span><img src="/img/mobile/img_heart.gif" style="padding:0 3px; vertical-align:middle;"><?=number_format($val['like_count'])?></span>
|
||||
<span>|</span>
|
||||
<span><img src="/img/mobile/img_comment.gif" style="padding:0 3px; vertical-align:middle;"><?=number_format($val['comment_count'])?></span>
|
||||
</div>
|
||||
<div class="news_box_con_right">
|
||||
<a href="/m/life/life_view/<?=$val['idx']?>"><img src="<?=$main_img?>"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<? if($i==count($arr_life)) {?>
|
||||
|
||||
<div class="news_box_more">
|
||||
<a href="/m/search/list?search_keyword=<?=$search_keyword?>&content_type=3">더보기 <img src="/img/mobile/arrow_more.gif"></a>
|
||||
</div>
|
||||
<? }?>
|
||||
</div>
|
||||
</div>
|
||||
<? $i++;
|
||||
}?>
|
||||
|
||||
<? }?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<? if(count($arr_news) > 0) {?>
|
||||
<div class="news_box">
|
||||
<div class="news_box_title">
|
||||
뉴스
|
||||
|
||||
</div>
|
||||
|
||||
<? $i=1;
|
||||
foreach ($arr_news as $key=>$val) {
|
||||
$news_class = '';
|
||||
if($i==count($arr_news)) {
|
||||
$news_class='bb pdb20';
|
||||
}
|
||||
|
||||
$title = $val['title'];
|
||||
$content = strip_tags($val['content']);
|
||||
$title_txt = mb_strimwidth($title, '0', '60', '..', 'utf-8');
|
||||
$content_txt = mb_strimwidth($content, '0', '180', '..', 'utf-8');
|
||||
foreach($arr_search_keyword as $val3) {
|
||||
$title_txt = str_replace($val3, '<b>'.$val3.'</b>', $title_txt);
|
||||
$content_txt = str_replace($val3, '<b>'.$val3.'</b>', $content_txt);
|
||||
}
|
||||
|
||||
|
||||
$share_title = str_replace("'", "\\'", $val['title']);
|
||||
$share_title = str_replace('"', '\\"', $share_title);
|
||||
$share_content = mb_strimwidth($content, '0', '250', '..', 'utf-8');
|
||||
$share_content = htmlspecialchars($share_content);
|
||||
$share_content = str_replace("'", "\\'", $share_content);
|
||||
$share_content = str_replace('”', '"', $share_content);
|
||||
|
||||
$press_txt = $val['press_name'];
|
||||
if($val['press_homepage']!='') {
|
||||
$press_txt = '<a href="'.$val['press_homepage'].'" target="_blank">'.$val['press_name'].'</a>';
|
||||
}
|
||||
$display_date_txt = gf_article_date_text($val['display_date']);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="news_box_con search_wrap <?=$news_class?>">
|
||||
<input type="hidden" name="content_news_<?=$val['idx']?>" id="content_news_<?=$val['idx']?>" value="<?=$share_content?>">
|
||||
<input type="hidden" name="title_news_<?=$val['idx']?>" id="title_news_<?=$val['idx']?>" value="<?=$share_title?>">
|
||||
<input type="hidden" name="copy_url_news_<?=$val['idx']?>" id="copy_url_news_<?=$val['idx']?>" value="<?=WWW_CROSSMAP_M?>/web/news/news_view/<?=$val['idx']?>">
|
||||
<input type="hidden" name="img_url_news_<?=$val['idx']?>" id="img_url_news_<?=$val['idx']?>" value="<?=WWW_CROSSMAP_M?><?=$main_img?>">
|
||||
|
||||
<h2><a href="/m/news/news_view/<?=$val['idx']?>"><?=$title_txt?></a></h2>
|
||||
<div class="news_box_con_left">
|
||||
<div><?=$content_txt?></div>
|
||||
</div>
|
||||
<div class="news_box_detail2" style="padding-top:5px;">
|
||||
<span><?=$press_txt?></span>
|
||||
<span>|</span>
|
||||
<span><?=$display_date_txt?></span>
|
||||
<span>|</span>
|
||||
<span><a href="/web/news/news_view/<?=$val['idx']?>">크로스맵뉴스</a></span>
|
||||
</div>
|
||||
<div class="news_box_con_right">
|
||||
<a href="/web/news/news_view/<?=$val['idx']?>"><img src="<?=$val['main_img']?>"></a>
|
||||
</div>
|
||||
<?
|
||||
if(isset($arr_news_relation_article[$val['idx']])==true) {
|
||||
if(count($arr_news_relation_article[$val['idx']]) > 0 ) {?>
|
||||
<div class="relatednews">
|
||||
<? $i=1;
|
||||
foreach ($arr_news_relation_article[$val['idx']] as $key1=>$val1) {
|
||||
|
||||
$relation_title_txt = mb_strimwidth($val1['title'], '0', '53', '..', 'utf-8');
|
||||
$press_txt = $val1['press_name'];
|
||||
if($val1['press_homepage']!='') {
|
||||
$press_txt = '<a href="'.$val1['press_homepage'].'" target="_blank">'.$val1['press_name'].'</a>';
|
||||
}
|
||||
|
||||
$display_date_txt = gf_article_date_text($val1['display_date']);
|
||||
?>
|
||||
|
||||
<div class="relatednews_box">
|
||||
<span class="relatednews_tit"><img src="/img/web/search_reply.gif" style="vertical-align:middle;"> <a href="/m/news/news_view/<?=$val1['idx']?>"><?=$relation_title_txt?></a></span>
|
||||
<span class="relatednews_info news_box_detail2">
|
||||
<span><?=$press_txt?></span>
|
||||
<span style="color:#c2c2c2;">|</span>
|
||||
<span><?=$display_date_txt?></span>
|
||||
<span style="color:#c2c2c2;">|</span>
|
||||
<span><a href="/m/news/news_view/<?=$val1['idx']?>">크로스맵뉴스</a></span>
|
||||
</span>
|
||||
</div>
|
||||
<?
|
||||
if($i==4) break;
|
||||
$i++;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="fr beachblue" style="margin-top: 5px;">
|
||||
<a href="/m/search/news?search_keyword=<?=$search_keyword?>&content_idx=<?=$val['idx']?>" >관련뉴스 <?=count($arr_news_relation_article[$val['idx']])?>건 전체보기></a>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="news_box_more"><a href="/m/search/news?search_keyword=<?=$search_keyword?>&content_type=1">
|
||||
더보기 <img src="/img/mobile/arrow_more.gif">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?
|
||||
}?>
|
||||
|
||||
<? if(count($arr_img) > 0) {?>
|
||||
|
||||
<div class="news_box">
|
||||
<div class="news_box_title" style="border-bottom:0;">
|
||||
이미지
|
||||
</div>
|
||||
<div class="news_box_con" style="padding:0; border-bottom:0; border-top:0">
|
||||
<div class="container">
|
||||
<? foreach ($arr_img as $key=>$val) {
|
||||
$title_text = $val['title'];
|
||||
if($val['category_name']!='') $title_text.= ' - '.$val['category_name'];
|
||||
|
||||
|
||||
|
||||
switch ($val['content_type']) {
|
||||
case '1': $img_view_url = '/m/news/news_view/'.$val['idx']; break;
|
||||
case '2': $img_view_url = '/m/news/column_view/'.$val['idx']; break;
|
||||
case '3': $img_view_url = '/m/life/life_view/'.$val['idx']; break;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="item">
|
||||
<!-- <a href="--><?//=$img_view_url?><!--">-->
|
||||
<img src='<?=$val['main_img']?>' title="<?=$title_text?>">
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
|
||||
<? if($key == 4) break;
|
||||
}?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_box_more">
|
||||
<a href="/m/search/image?search_keyword=<?=$search_keyword?>">
|
||||
더보기 <img src="/img/mobile/arrow_more.gif">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?}?>
|
||||
<? if(count($arr_video) > 0) {?>
|
||||
<div class="news_box">
|
||||
<div class="news_box_title">
|
||||
동영상
|
||||
</div>
|
||||
<div class="news_box_con">
|
||||
<div class="news_video">
|
||||
<div class="swiper-container swiper-02">
|
||||
<div class="swiper-wrapper">
|
||||
<? foreach ($arr_video as $key=>$val) {
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '28', '..', 'utf-8');
|
||||
switch ($val['content_type']) {
|
||||
case '1': $video_view_url = '/m/news/news_view/'.$val['idx'];
|
||||
// $video_category_url = '/m/news/category/'.$val['category_code'];
|
||||
break;
|
||||
case '2': $video_view_url = '/m/news/column_view/'.$val['idx'];
|
||||
$video_category_url = '/m/news/columnist/'.$val['partner_idx'];
|
||||
break;
|
||||
case '3': $video_view_url = '/m/life/life_view/'.$val['idx'];
|
||||
// $video_category_url = '/m/life/category/'.$val['category_idx'];
|
||||
break;
|
||||
}
|
||||
|
||||
$display_date_txt = gf_article_date_text($val['display_date']);
|
||||
?>
|
||||
|
||||
<div class="swiper-slide">
|
||||
<div class="channel_con">
|
||||
<div class="play_box">
|
||||
<a href="<?=$video_view_url?>"><img src="<?=$val['main_img']?>" class="art-img" style="max-height:80px;max-width:150px"></a>
|
||||
<span class="play"><a href="<?=$video_view_url?>"><img src="/img/mobile/img_play.png"></a></span>
|
||||
<span class="play_time"><?=$val['video_playtime']?></span>
|
||||
</div>
|
||||
<p class="chtitle"><a href="<?=$video_view_url?>"><span class="beachblue">[<?=$val['category_name']?>]</span> <?=$title_txt?></a></p>
|
||||
</div>
|
||||
</div>
|
||||
<? }?>
|
||||
</div>
|
||||
<!-- Add Scrollbar -->
|
||||
<div class="swiper-scrollbar"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_box_more"><a href="/m/search/video?search_keyword=<?=$search_keyword?>">
|
||||
더보기 <img src="/img/mobile/arrow_more.gif">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? }?>
|
||||
|
||||
|
||||
|
||||
<? if(count($arr_column) > 0) {?>
|
||||
<div class="news_box">
|
||||
<div class="news_box_title">
|
||||
칼럼
|
||||
</div>
|
||||
<?
|
||||
$i=1;
|
||||
foreach ($arr_column as $val) {
|
||||
$column_class = '';
|
||||
if($i==count($arr_column)) {
|
||||
$column_class=' bb pdb20';
|
||||
}
|
||||
|
||||
$title = '['.$val['column_name'].'] '.$val['title'];
|
||||
$content = strip_tags($val['content']);
|
||||
|
||||
$title_txt = mb_strimwidth($title, '0', '60', '..', 'utf-8');
|
||||
$content_txt = mb_strimwidth($content, '0', '180', '..', 'utf-8');
|
||||
|
||||
foreach($arr_search_keyword as $val3) {
|
||||
$title_txt = str_replace($val3, '<b>'.$val3.'</b>', $title_txt);
|
||||
$content_txt = str_replace($val3, '<b>'.$val3.'</b>', $content_txt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$display_date_txt = gf_article_date_text($val['display_date']);
|
||||
|
||||
$share_title = str_replace("'", "\\'", $val['title']);
|
||||
$share_title = str_replace('"', '\\"', $share_title);
|
||||
|
||||
$share_content = mb_strimwidth($content, '0', '250', '..', 'utf-8');
|
||||
$share_content = htmlspecialchars($share_content);
|
||||
$share_content = str_replace("'", "\\'", $share_content);
|
||||
$share_content = str_replace('”', '"', $share_content);
|
||||
|
||||
$main_img = $val['main_img'];
|
||||
|
||||
?>
|
||||
<div class="news_box_con search_wrap<?=$column_class?>">
|
||||
<input type="hidden" name="content_column_<?=$val['idx']?>" id="content_column_<?=$val['idx']?>" value="<?=$share_content?>">
|
||||
<input type="hidden" name="title_column_<?=$val['idx']?>" id="title_column_<?=$val['idx']?>" value="<?=$share_title?>">
|
||||
<input type="hidden" name="copy_url_column_<?=$val['idx']?>" id="copy_url_column_<?=$val['idx']?>" value="<?=WWW_CROSSMAP_M?>/web/news/column_view/<?=$val['idx']?>">
|
||||
<input type="hidden" name="img_url_column_<?=$val['idx']?>" id="img_url_column_<?=$val['idx']?>" value="<?=WWW_CROSSMAP_M?><?=$main_img?>">
|
||||
<h2><a href=/m/news/column_view/<?=$val['idx']?>""><?=$title_txt?></a><span class="n_date"><?=$display_date_txt?></span></h2>
|
||||
<div class="news_box_con_left">
|
||||
<div><?=$content_txt?></div>
|
||||
</div>
|
||||
<div class="news_box_con_right">
|
||||
<a href="/m/news/column_view/<?=$val['idx']?>"><img src="<?=$val['main_img']?>"></a>
|
||||
</div>
|
||||
<div class="news_box_detail">
|
||||
<span class="beachblue"><a href="/m/news/column_view/<?=$val['idx']?>"><?=WWW_CROSSMAP_M?>/m/news/column_view/<?=$val['idx']?></a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? if($i==count($arr_column)) {?>
|
||||
|
||||
<div class="news_box_more">
|
||||
<a href="/m/search/list?search_keyword=<?=$search_keyword?>&content_type=2">
|
||||
더보기 <img src="/img/mobile/arrow_more.gif">
|
||||
</a>
|
||||
</div>
|
||||
<? }?>
|
||||
</div>
|
||||
<? $i++;
|
||||
}?>
|
||||
|
||||
<?}?>
|
||||
|
||||
<? require_once(APPPATH."views/m/search/search_footer_inc.php"); ?>
|
||||
|
||||
|
||||
<?include_once ("search_footer_inc.php")?>
|
||||
<script>
|
||||
var swiper = new Swiper('.swiper-01', {
|
||||
spaceBetween: 5,
|
||||
slidesPerView: 'auto',
|
||||
scrollbar: {
|
||||
el: '.swiper-scrollbar',
|
||||
hide: true,
|
||||
},
|
||||
});
|
||||
var swiper = new Swiper('.swiper-02', {
|
||||
spaceBetween: 5,
|
||||
slidesPerView: 'auto',
|
||||
scrollbar: {
|
||||
el: '.swiper-scrollbar',
|
||||
hide: true,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
// document.addEventListener('DOMContentLoaded', function () {
|
||||
// new SmartPhoto(".js-smartPhoto");
|
||||
// new SmartPhoto(".js-smartPhoto-hide", {
|
||||
// arrows: false,
|
||||
// nav: false
|
||||
// });
|
||||
// new SmartPhoto(".js-smartPhoto-fit", {
|
||||
// resizeStyle: 'fit'
|
||||
// });
|
||||
// });
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var options = {minMargin: 5, maxMargin: 15, itemSelector: ".item", firstItemClass: "first-item"};
|
||||
$(".container").rowGrid(options);
|
||||
});
|
||||
|
||||
jQuery(function($){
|
||||
'use strict';
|
||||
|
||||
setTimeout(function () {
|
||||
var $frame = $('#basic1');
|
||||
var $slidee = $frame.children('ul').eq(0);
|
||||
// Call Sly on frame
|
||||
$frame.sly({
|
||||
horizontal: 1,
|
||||
itemNav: 'basic',
|
||||
smart: 1,
|
||||
activateOn: 'click',
|
||||
mouseDragging: 1,
|
||||
touchDragging: 1,
|
||||
releaseSwing: 1,
|
||||
startAt: 0, // 탭설정
|
||||
scrollBy: 4,
|
||||
activatePageOn: 'click',
|
||||
speed: 300,
|
||||
elasticBounds: 1,
|
||||
easing: 'easeOutExpo',
|
||||
dragHandle: 1,
|
||||
dynamicHandle: 1,
|
||||
clickBar: 1
|
||||
});
|
||||
}(), 0);
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
119
application/views/m/search/list.php
Executable file
119
application/views/m/search/list.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
$arr_search_keyword = array();
|
||||
if($search_keyword!=''){
|
||||
$arr_search_keyword = explode(" ", $search_keyword);
|
||||
}
|
||||
|
||||
?>
|
||||
<? require_once(APPPATH."views/m/search/search_header.php"); ?>
|
||||
|
||||
|
||||
<? if($total_count == 0) { ?>
|
||||
<div class="news_nothing">
|
||||
<div class="t_nothing"><span class="beachblue"><?=$search_keyword?></span> 에 대한 검색결과가 없습니다.</div>
|
||||
<ul>
|
||||
<li>단어의 철자가 정확한지 확인해 보세요.</li>
|
||||
<li>한글을 영어로 혹은 영어를 한글로 입력했는지 확인해보세요.</li>
|
||||
<li>검색어의 단어 수를 줄이거나, 보다 일반적인 검색어로 다시 검색해보세요.</li>
|
||||
<li>두 단어 이상의 검색어인 경우, 띄어쓰기를 확인해 보세요.</li>
|
||||
<li>검색 옵션을 변경해서 다시 검색해 보세요.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<? } ?>
|
||||
|
||||
<div class="news_cont2">
|
||||
<div class="news_box">
|
||||
<div class="news_box_title">
|
||||
<?=$page_title?> <span class="info"><span><?=number_format($start_row)?>-<?=number_format($end_row)?></span> | <span><?=number_format($total_count)?>건</span></span>
|
||||
</div>
|
||||
<? $i=1;
|
||||
foreach ($list as $key=>$val) {
|
||||
|
||||
// var_dump($list);exit();
|
||||
if($content_type == '2') {
|
||||
$title = '['.$val['column_name'].'] '.$val['title'];
|
||||
} else {
|
||||
$title = $val['title'];
|
||||
}
|
||||
$content = strip_tags($val['content']);
|
||||
|
||||
$title_txt = mb_strimwidth($title, '0', '60', '..', 'utf-8');
|
||||
$content_txt = mb_strimwidth($content, '0', '180', '..', 'utf-8');
|
||||
|
||||
foreach($arr_search_keyword as $val3) {
|
||||
$title_txt = str_replace($val3, '<b>'.$val3.'</b>', $title_txt);
|
||||
$content_txt = str_replace($val3, '<b>'.$val3.'</b>', $content_txt);
|
||||
}
|
||||
|
||||
$display_date_txt = gf_article_date_text($val['display_date']);
|
||||
|
||||
$share_title = str_replace("'", "\\'", $val['title']);
|
||||
$share_title = str_replace('"', '\\"', $share_title);
|
||||
$share_content = mb_strimwidth($content, '0', '200', '..', 'utf-8');
|
||||
$share_content = htmlspecialchars($share_content);
|
||||
$share_content = str_replace("'", "\\'", $share_content);
|
||||
$share_content = str_replace('”', '"', $share_content);
|
||||
|
||||
$main_img = $val['main_img'];
|
||||
if($content_type == '2') {
|
||||
$view_url = '/m/news/column_view/'.$val['idx'];
|
||||
$share_id_name ="column_".$val['idx'];
|
||||
} else if($content_type == '3') {
|
||||
$view_url = '/m/life/life_view/'.$val['idx'];
|
||||
$share_id_name ="life_".$val['idx'];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="news_box_con">
|
||||
<input type="hidden" name="content_<?=$share_id_name?>" id="content_<?=$share_id_name?>" value="<?=$share_content?>">
|
||||
<input type="hidden" name="title_<?=$share_id_name?>" id="title_<?=$share_id_name?>" value="<?=$share_title?>">
|
||||
<input type="hidden" name="copy_url_<?=$share_id_name?>" id="copy_url_<?=$share_id_name?>" value="<?=WWW_CROSSMAP?><?=$view_url?>">
|
||||
<input type="hidden" name="img_url_l<?=$share_id_name?>" id="img_url_<?=$share_id_name?>" value="<?=WWW_CROSSMAP?><?=$main_img?>">
|
||||
<h2 class="search_tit"><a href="<?=$view_url?>"><?=$title_txt?></a><? if($content_type!='1') { ?><span class="n_date"><?=$display_date_txt?><?}?></h2>
|
||||
<div class="news_box_con_left">
|
||||
<div><?=$content_txt?></div>
|
||||
<div class="news_box_detail" style="padding-top: 35px;">
|
||||
|
||||
<?if($content_type == 3):?>
|
||||
<span class="profile"><a href="/m/life/editor/<?=$val['partner_idx']?>"><div style="float:left;border-radius: 21px;cursor:pointer;width:21px;height:21px;background:url('<?=@$val['partner_img']?>') no-repeat center; background-size:cover;"></div> <?=@$val['editor_name']?></a></span>
|
||||
<span><img src="/img/web/search_bar.gif"></span>
|
||||
<?endif;?>
|
||||
|
||||
<?if($content_type == 2):?>
|
||||
<span class="profile"><a href="/m/news/columnist/<?=$val['partner_idx']?>"><?=@$val['column_name']?></a></span>
|
||||
<span><img src="/img/web/search_bar.gif"></span>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
<span><img src="/img/web/img_heart.gif"><?=number_format($val['like_count'])?></span>
|
||||
<span><img src="/img/web/search_bar.gif"></span>
|
||||
<span><img src="/img/web/img_comment.gif"><?=number_format($val['comment_count'])?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_box_con_right<?=($val['video_url']) ? " plays_b" : ""; ?>">
|
||||
<a href="<?=WWW_CROSSMAP?><?=$view_url?>"><img src="<?=$val['main_img']?>"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<? $i++;
|
||||
}?>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="news_box">
|
||||
<div class="pagenumber">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<? require_once(APPPATH."views/m/search/search_footer_inc.php"); ?>
|
||||
213
application/views/m/search/news.php
Executable file
213
application/views/m/search/news.php
Executable file
@@ -0,0 +1,213 @@
|
||||
<?php
|
||||
$arr_search_keyword = array();
|
||||
if($search_keyword!=''){
|
||||
$arr_search_keyword = explode(" ", $search_keyword);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<? require_once(APPPATH."views/m/search/search_header.php"); ?>
|
||||
|
||||
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
|
||||
<? if(count($list)==0) {?>
|
||||
<div class="news_nothing">
|
||||
<div class="t_nothing"><span class="beachblue"><?=$search_keyword?></span> 에 대한 검색결과가 없습니다.</div>
|
||||
<ul>
|
||||
<li>단어의 철자가 정확한지 확인해 보세요.</li>
|
||||
<li>한글을 영어로 혹은 영어를 한글로 입력했는지 확인해보세요.</li>
|
||||
<li>검색어의 단어 수를 줄이거나, 보다 일반적인 검색어로 다시 검색해보세요.</li>
|
||||
<li>두 단어 이상의 검색어인 경우, 띄어쓰기를 확인해 보세요.</li>
|
||||
<li>검색 옵션을 변경해서 다시 검색해 보세요.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<? } else {?>
|
||||
|
||||
|
||||
|
||||
<div class="news_cont2">
|
||||
<div class="news_box_title">
|
||||
뉴스 <span class="info"><span><?=number_format($start_row)?>-<?=number_format($end_row)?></span> | <span><?=number_format($total_count)?>건</span></span>
|
||||
</div>
|
||||
<div class="serchview">
|
||||
<? if(@$_GET['content_idx']):
|
||||
|
||||
$tmp = $_SERVER['REQUEST_URI'];
|
||||
$uri = explode("?",$tmp);
|
||||
$uri_org = $uri[0];
|
||||
$uri = explode("&",$uri[1]);
|
||||
$key = array();
|
||||
$value = array();
|
||||
foreach($uri as $data){
|
||||
$kv = explode("=",$data);
|
||||
|
||||
if($kv[0] != "content_idx"){
|
||||
$key[] = $kv[0];
|
||||
$value[] = $kv[1];
|
||||
}
|
||||
|
||||
}
|
||||
$str = array();
|
||||
foreach($key as $i => $data){
|
||||
$str[] = $data."=".$value[$i];
|
||||
}
|
||||
|
||||
$str = implode("&",$str);
|
||||
|
||||
$uri_org .= "?".$str;
|
||||
?>
|
||||
<a href="<?=$uri_org?>">
|
||||
<img src="/img/mobile/img_back.gif"> <span>검색어 뉴스</span> 전체 검색결과 보기
|
||||
</a>
|
||||
<?endif;?>
|
||||
</div>
|
||||
<? $i=1;
|
||||
foreach ($list as $key=>$val) {
|
||||
$title = $val['title'];
|
||||
$content = strip_tags($val['content']);
|
||||
$title_txt = mb_strimwidth($title, '0', '60', '..', 'utf-8');
|
||||
$content_txt = mb_strimwidth($content, '0', '180', '..', 'utf-8');
|
||||
$display_date_txt = gf_article_date_text($val['display_date']);
|
||||
|
||||
foreach($arr_search_keyword as $val3) {
|
||||
$title_txt = str_replace($val3, '<b>'.$val3.'</b>', $title_txt);
|
||||
$content_txt = str_replace($val3, '<b>'.$val3.'</b>', $content_txt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$share_title = str_replace("'", "\\'", $val['title']);
|
||||
$share_title = str_replace('"', '\\"', $share_title);
|
||||
$share_content = mb_strimwidth($content, '0', '250', '..', 'utf-8');
|
||||
$share_content = htmlspecialchars($share_content);
|
||||
$share_content = str_replace("'", "\\'", $share_content);
|
||||
$share_content = str_replace('”', '"', $share_content);
|
||||
|
||||
$main_img = $val['main_img'];
|
||||
$press_txt = $val['press_name'];
|
||||
if($val['press_homepage']!='') {
|
||||
$press_txt = '<a href="'.$val['press_homepage'].'" target="_blank">'.$val['press_name'].'</a>';
|
||||
}
|
||||
$view_url = '/m/news/news_view/'.$val['idx'];
|
||||
$share_id_name ="news_".$val['idx'];
|
||||
|
||||
|
||||
?>
|
||||
<input type="hidden" name="content_<?=$share_id_name?>" id="content_<?=$share_id_name?>" value="<?=$share_content?>">
|
||||
<input type="hidden" name="title_<?=$share_id_name?>" id="title_<?=$share_id_name?>" value="<?=$share_title?>">
|
||||
<input type="hidden" name="copy_url_<?=$share_id_name?>" id="copy_url_<?=$share_id_name?>" value="<?=WWW_CROSSMAP?><?=$view_url?>">
|
||||
<input type="hidden" name="img_url_l<?=$share_id_name?>" id="img_url_<?=$share_id_name?>" value="<?=WWW_CROSSMAP?><?=$main_img?>">
|
||||
<div class="news_box">
|
||||
<div class="news_box_con">
|
||||
<h2 class="search_tit"><a href="<?=$view_url?>"><?=$title_txt?></a></h2>
|
||||
<div class="news_box_con_left">
|
||||
<div><?=$content_txt?></div>
|
||||
</div>
|
||||
<div class="news_box_detail2">
|
||||
|
||||
<span><?=$press_txt?></span>
|
||||
<span><img src="/img/mobile/search_bar.gif"></span>
|
||||
<span><?=$display_date_txt?></span>
|
||||
<span><img src="/img/mobile/search_bar.gif"></span>
|
||||
<span><a href="<?=$view_url?>">크로스맵뉴스</a></span>
|
||||
|
||||
</div>
|
||||
<div class="news_box_con_right<?=($val['video_url']) ? " plays_b" : ""; ?>">
|
||||
<a href="<?=$view_url?>"><img src="<?=$main_img?>"></a>
|
||||
</div>
|
||||
|
||||
<?
|
||||
if(isset($arr_news_relation_article[$val['idx']])==true) {
|
||||
if(count($arr_news_relation_article[$val['idx']]) > 0 ) {?>
|
||||
<div class="relatednews">
|
||||
<? $i=1;
|
||||
foreach ($arr_news_relation_article[$val['idx']] as $key1=>$val1) {
|
||||
|
||||
$relation_title_txt = mb_strimwidth($val1['title'], '0', '53', '..', 'utf-8');
|
||||
$press_txt = $val1['press_name'];
|
||||
if($val1['press_homepage']!='') {
|
||||
$press_txt = '<a href="'.$val1['press_homepage'].'" target="_blank">'.$val1['press_name'].'</a>';
|
||||
}
|
||||
|
||||
$display_date_txt = gf_article_date_text($val1['display_date']);
|
||||
?>
|
||||
|
||||
<div class="relatednews_box">
|
||||
<span class="relatednews_tit"><img src="/img/web/search_reply.gif"><a href="/m/news/news_view/<?=$val1['idx']?>"><?=$relation_title_txt?></a></span>
|
||||
<span class="relatednews_info news_box_detail2">
|
||||
<span><?=$press_txt?></span>
|
||||
<span style="color:#c2c2c2;">|</span>
|
||||
<span><?=$display_date_txt?></span>
|
||||
<span style="color:#c2c2c2;">|</span>
|
||||
<span><a href="/m/news/news_view/<?=$val1['idx']?>">크로스맵뉴스</a></span>
|
||||
</span>
|
||||
</div>
|
||||
<?
|
||||
if($i==4) break;
|
||||
$i++;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="fr beachblue" style="margin-top: 5px;">
|
||||
<a href="/m/search/news?search_keyword=<?=$search_keyword?>&content_idx=<?=$val['idx']?>" >관련뉴스 <?=count($arr_news_relation_article[$val['idx']])?>건 전체보기></a>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?}?>
|
||||
|
||||
<div class="pagenumber">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?}?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? require_once(APPPATH."views/m/search/search_footer_inc.php"); ?>
|
||||
<?
|
||||
$title = ''; $content = ''; $main_img = '';
|
||||
require_once(APPPATH."views/web/comm/share_box_inc.php"); ?>
|
||||
<script>
|
||||
var share_key = '';
|
||||
$('.share_btn').click(function(e) {
|
||||
$("#share_box").toggle();
|
||||
var key = $(this).attr('strA');
|
||||
|
||||
$("#share_content").val($("#content_"+key).val());
|
||||
$("#share_title").val($("#title_"+key).val());
|
||||
$("#share_copy_url").val($("#copy_url_"+key).val());
|
||||
$("#share_img_url").val($("#img_url_"+key).val());
|
||||
$("#copy_url").val($("#copy_url_"+key).val());
|
||||
|
||||
var popH = $(this).offset().top;
|
||||
var popL = $(this).offset().left;
|
||||
|
||||
$('.popup_share').css('left',(popL+120)+'px');
|
||||
$('.popup_share').css('top',popH+'px');
|
||||
|
||||
share_key = key;
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
144
application/views/m/search/search_footer_inc.php
Executable file
144
application/views/m/search/search_footer_inc.php
Executable file
@@ -0,0 +1,144 @@
|
||||
|
||||
<!-- <div class="banner_grace">
|
||||
<a href="#"><img src="/img/mobile/banner_grace.jpg" alt="banner"></a>
|
||||
<!-- m크맵 _검색결과
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:720px;height:74px"
|
||||
data-ad-client="ca-pub-7071495522658800"
|
||||
data-ad-slot="5412203153"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div> -->
|
||||
|
||||
<?
|
||||
|
||||
$ci = & get_instance();
|
||||
$ci->load->model('web/m_realtime_keyword');
|
||||
$ci->load->model('web/m_search_keyword_relation');
|
||||
$search_keyword = trim($ci->input->get_post('search_keyword', TRUE));
|
||||
|
||||
|
||||
$search_keyword_tmp = urldecode($search_keyword);
|
||||
$search_keyword_tmp = addslashes($search_keyword_tmp);
|
||||
|
||||
# 연관검색어
|
||||
$req_data = array();
|
||||
$req_data['keyword'] = $search_keyword_tmp;
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 10;
|
||||
$arr_search_keyword_relation = $ci->m_search_keyword_relation->search_keyword_relation_list($req_data);
|
||||
|
||||
|
||||
|
||||
|
||||
if(count($arr_search_keyword_relation) > 0) {?>
|
||||
<!-- <div class="news_box">
|
||||
<span class="relative"><span class="r_title">연관</span>
|
||||
<? foreach($arr_search_keyword_relation as $val) {?>
|
||||
<a href="/m/search/?search_keyword=<?=$val['relation_keyword']?>"><?=$val['relation_keyword']?></a>
|
||||
<? }?>
|
||||
</span>
|
||||
</div> -->
|
||||
|
||||
|
||||
<? }?>
|
||||
<div class="news_box">
|
||||
<div class="news_box_title">
|
||||
실시간 검색어
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="news_box_con">
|
||||
|
||||
<?
|
||||
|
||||
$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');
|
||||
|
||||
?>
|
||||
<?if($key % 5 == 0):?>
|
||||
|
||||
<div class="<?echo ($key < 5 || ($key ==10))?"c_left": "c_right"?> <?echo ($key<10)?"page1": "page2"?>" <?echo ($key>=10)?"style='display:none;'":""?>>
|
||||
|
||||
<?endif?>
|
||||
<div class="issue_box" style="font-size:14px;">
|
||||
<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>
|
||||
<?if($key % 5 == 4):?>
|
||||
</div>
|
||||
<?endif?>
|
||||
<?endforeach; ?>
|
||||
|
||||
</div>
|
||||
<div class="news_box_slide">
|
||||
<a onclick="page(1)" id="page1" style="cursor:pointer;"><img src="/img/mobile/circle_on.gif"></a>
|
||||
<a onclick="page(2)" id="page2" style="cursor:pointer;"><img src="/img/mobile/circle_off.gif"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text_size">
|
||||
<a class="share_btn" style="cursor:pointer;"><img src="/img/mobile/icon1.gif"></a>
|
||||
<!-- <a href="javascript:zoom_out();"><img src="/img/mobile/icon2.gif"></a>
|
||||
<a href="javascript:zoom_in();"><img src="/img/mobile/icon3.gif"></a> -->
|
||||
<a href="javascript:ts('body', -1);"><img src="/img/mobile/icon2.gif"></a>
|
||||
<a href="javascript:ts('body', 1);"><img src="/img/mobile/icon3.gif"></a>
|
||||
<a href="javascript:$(window).scrollTop(0)"><img src="/img/mobile/icon4.gif"></a>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$title = ''; $content = ''; $main_img = '';
|
||||
require_once(APPPATH."views/web/comm/share_box_inc.php"); ?>
|
||||
<script>
|
||||
function page(i){
|
||||
if( i == 1){
|
||||
$(".page2").hide();
|
||||
$(".page1").show();
|
||||
$("#page1 > img").attr("src","/img/mobile/circle_on.gif");
|
||||
$("#page2 > img").attr("src","/img/mobile/circle_off.gif");
|
||||
|
||||
}
|
||||
else{
|
||||
$(".page1").hide();
|
||||
$(".page2").show();
|
||||
$("#page1 > img").attr("src","/img/mobile/circle_off.gif");
|
||||
$("#page2 > img").attr("src","/img/mobile/circle_on.gif");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
150
application/views/m/search/search_header.php
Executable file
150
application/views/m/search/search_header.php
Executable file
@@ -0,0 +1,150 @@
|
||||
<div class="search_result_top search_result_top_fixed">
|
||||
<a href="/m">
|
||||
<span class="logo_srch"><img src="/img/mobile/logo_srch.gif" alt="logo"></span>
|
||||
</a>
|
||||
<span class="s_srch">
|
||||
<form>
|
||||
<span><input type="text" placeholder="" id="srch_input" name="search_keyword"
|
||||
value="<?= $_GET['search_keyword'] ?>">
|
||||
<!--a href="#"><img src="/img/mobile/mypage_serch_menu.gif" alt="검색하기" style="float:right;"></a-->
|
||||
<a><img src="/img/mobile/mypage_serch_icon.gif" alt="검색하기" style="float:right"
|
||||
onclick="window.location='/m/search/?search_keyword='+$('#srch_input').val()"></a>
|
||||
</span>
|
||||
</form>
|
||||
</span>
|
||||
</div>
|
||||
<?
|
||||
|
||||
$ci = &get_instance();
|
||||
|
||||
@$tmp = $_SERVER['REQUEST_URI'];
|
||||
@$tmp = (explode("?", $tmp));
|
||||
@$query_string = $tmp[1];
|
||||
|
||||
?>
|
||||
<div class="search_result search_result_fixed">
|
||||
<div class="search_result_menu">
|
||||
<nav class="topmn" id="basic1">
|
||||
<ul class="nav_u" id="timeline_tab">
|
||||
<li <?= $ci->uri->segment(3) == '' ? "class='active'" : ""; ?> id="root"><a
|
||||
href="/m/search/?<?= $query_string ?>" id="timeline_tab01">통합검색</a></li>
|
||||
<li <?= $ci->uri->segment(3) == 'image' ? "class='active'" : ""; ?>><a
|
||||
href="/m/search/image?<?= $query_string ?>" id="timeline_tab02">이미지</a></li>
|
||||
<li <?= ($ci->uri->segment(3) == 'list' && $_GET['content_type'] == 3) ? "class='active'" : ""; ?>><a
|
||||
href="/m/search/list?<?= $query_string ?>&content_type=3" id="timeline_tab03">라이프</a></li>
|
||||
<li <?= $ci->uri->segment(3) == 'news' ? "class='active'" : ""; ?>><a
|
||||
href="/m/search/news?<?= $query_string ?>" id="timeline_tab04">뉴스</a></li>
|
||||
<li <?= $ci->uri->segment(3) == 'video' ? "class='active'" : ""; ?>><a
|
||||
href="/m/search/video?<?= $query_string ?>" id="timeline_tab05">동영상</a></li>
|
||||
<li <?= ($ci->uri->segment(3) == 'list' && $_GET['content_type'] == 2) ? "class='active'" : ""; ?>><a
|
||||
href="/m/search/list?<?= $query_string ?>&content_type=2" id="timeline_tab03">칼럼</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<div class="s_result" style="display:none;">
|
||||
|
||||
<span class="beachblue"><img src="/img/mobile/img_search.gif">‘<a id="keyword"><?= $search_keyword ?></a>’</span>
|
||||
검색어를 찾으셨습니까?
|
||||
<div class="search_view"><a href="" id="keyword_link">‘꽃처럼 살아가는 인생’ 검색결과 보기</a></div>
|
||||
</div>
|
||||
<script src="/js/m/jquery-1.11.3.min.js"></script>
|
||||
<script src="/js/m/swipers.js"></script>
|
||||
<script src="/js/m/jquery.row-grid.js"></script>
|
||||
<script src="/js/m/vendor_plugins.js"></script>
|
||||
<script src="/js/m/sly.min.js"></script>
|
||||
<script src="/js/m/smartphoto.js"></script>
|
||||
|
||||
<script>
|
||||
var s = '<?=$search_keyword?>';
|
||||
var t = e2k(s);
|
||||
console.log(s, t);
|
||||
|
||||
if (s !== t) {
|
||||
$(".s_result").show();
|
||||
|
||||
$("#keyword").text(t);
|
||||
$("#keyword_link").text("'" + t + "' 검색결과 보기");
|
||||
$("#keyword_link").attr("href", "/m/search/?search_keyword=" + encodeURI(t));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var swiper = new Swiper('.swiper-01', {
|
||||
spaceBetween: 5,
|
||||
slidesPerView: 'auto',
|
||||
scrollbar: {
|
||||
el: '.swiper-scrollbar',
|
||||
hide: true,
|
||||
},
|
||||
});
|
||||
var swiper = new Swiper('.swiper-02', {
|
||||
spaceBetween: 5,
|
||||
slidesPerView: 'auto',
|
||||
scrollbar: {
|
||||
el: '.swiper-scrollbar',
|
||||
hide: true,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var options = {minMargin: 5, maxMargin: 15, itemSelector: ".item", firstItemClass: "first-item"};
|
||||
$(".container").rowGrid(options);
|
||||
});
|
||||
|
||||
jQuery(function ($) {
|
||||
'use strict';
|
||||
|
||||
setTimeout(function () {
|
||||
var $frame = $('#basic1');
|
||||
// var $slidee = $frame.children('ul').eq(0);
|
||||
// Call Sly on frame
|
||||
|
||||
<? if ($ci->uri->segment(3) == '')
|
||||
$a = 0;
|
||||
else if ($ci->uri->segment(3) == 'image')
|
||||
$a = 1;
|
||||
else if ($ci->uri->segment(3) == 'list'){
|
||||
|
||||
if($_GET['content_type'] == 2)
|
||||
$a = 5;
|
||||
else
|
||||
$a = 2;
|
||||
}
|
||||
|
||||
|
||||
else if ($ci->uri->segment(3) == 'news')
|
||||
$a = 3;
|
||||
else if ($ci->uri->segment(3) == 'video')
|
||||
$a = 4;
|
||||
?>
|
||||
|
||||
|
||||
$frame.sly({
|
||||
horizontal: 1,
|
||||
itemNav: 'basic',
|
||||
smart: 1,
|
||||
activateOn: 'click',
|
||||
mouseDragging: 1,
|
||||
touchDragging: 1,
|
||||
releaseSwing: 1,
|
||||
startAt: <?=$a;?>, // 탭설정
|
||||
scrollBy: 4,
|
||||
activatePageOn: 'click',
|
||||
speed: 300,
|
||||
elasticBounds: 1,
|
||||
easing: 'easeOutExpo',
|
||||
dragHandle: 1,
|
||||
dynamicHandle: 1,
|
||||
clickBar: 1
|
||||
});
|
||||
}(), 0);
|
||||
|
||||
$("#timeline_tab > li.active").insertAfter("#root");
|
||||
|
||||
});
|
||||
</script>
|
||||
132
application/views/m/search/video.php
Executable file
132
application/views/m/search/video.php
Executable file
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
$arr_search_keyword = array();
|
||||
if($search_keyword!=''){
|
||||
$arr_search_keyword = explode(" ", $search_keyword);
|
||||
}
|
||||
|
||||
?>
|
||||
<? require_once(APPPATH."views/m/search/search_header.php"); ?>
|
||||
|
||||
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
|
||||
<? if(count($list)==0) {?>
|
||||
<div class="news_nothing">
|
||||
<div class="t_nothing"><span class="beachblue"><?=$search_keyword?></span> 에 대한 검색결과가 없습니다.</div>
|
||||
<ul>
|
||||
<li>단어의 철자가 정확한지 확인해 보세요.</li>
|
||||
<li>한글을 영어로 혹은 영어를 한글로 입력했는지 확인해보세요.</li>
|
||||
<li>검색어의 단어 수를 줄이거나, 보다 일반적인 검색어로 다시 검색해보세요.</li>
|
||||
<li>두 단어 이상의 검색어인 경우, 띄어쓰기를 확인해 보세요.</li>
|
||||
<li>검색 옵션을 변경해서 다시 검색해 보세요.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<? } else {?>
|
||||
<div class="news_cont2">
|
||||
<div class="news_box">
|
||||
<div class="news_box_title">
|
||||
동영상 <span class="info"><span><?=number_format($start_row)?>-<?=number_format($end_row)?></span> | <span><?=number_format($total_count)?>건</span></span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<? foreach ($list as $val) {
|
||||
$title = $val['title'];
|
||||
$content = strip_tags($val['content']);
|
||||
|
||||
$title_txt = mb_strimwidth($title, '0', '60', '..', 'utf-8');
|
||||
$content_txt = mb_strimwidth($content, '0', '140', '..', 'utf-8');
|
||||
|
||||
foreach($arr_search_keyword as $val3) {
|
||||
$title_txt = str_replace($val3, '<b>'.$val3.'</b>', $title_txt);
|
||||
$content_txt = str_replace($val3, '<b>'.$val3.'</b>', $content_txt);
|
||||
}
|
||||
|
||||
$display_date_txt = gf_article_date_text($val['display_date']);
|
||||
|
||||
|
||||
|
||||
$share_title = str_replace("'", "\\'", $val['title']);
|
||||
$share_title = str_replace('"', '\\"', $share_title);
|
||||
$share_content = mb_strimwidth($content, '0', '250', '..', 'utf-8');
|
||||
$share_content = htmlspecialchars($share_content);
|
||||
$share_content = str_replace("'", "\\'", $share_content);
|
||||
$share_content = str_replace('”', '"', $share_content);
|
||||
|
||||
$main_img = $val['main_img'];
|
||||
|
||||
|
||||
|
||||
switch ($val['content_type']) {
|
||||
case '1': $view_url = '/m/news/news_view/'.$val['idx']; $share_key = 'news_'.$val['idx']; $add_title = $val['category_name']; $writer_name = $val['reporter_name']; $curl = $view_url;break;
|
||||
case '2': $view_url = '/m/news/column_view/'.$val['idx']; $share_key = 'column_'.$val['idx']; $add_title = $val['column_name']; $writer_name = $val['column_name']; $curl = '/m/life/channel/'.$val['partner_idx']; break;
|
||||
case '3': $view_url = '/m/life/life_view/'.$val['idx']; $share_key = 'life_'.$val['idx']; $add_title = $val['channel_name']; $writer_name = $val['channel_name']; $curl = '/m/life/channel/'.$val['partner_idx'];break;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="news_box_con">
|
||||
<input type="hidden" name="content_life_<?=$val['idx']?>" id="content_life_<?=$val['idx']?>" value="<?=$share_content?>">
|
||||
<input type="hidden" name="title_life_<?=$val['idx']?>" id="title_life_<?=$val['idx']?>" value="<?=$share_title?>">
|
||||
<input type="hidden" name="copy_url_life_<?=$val['idx']?>" id="copy_url_life_<?=$val['idx']?>" value="<?=WWW_CROSSMAP?><?=$view_url?>">
|
||||
<input type="hidden" name="img_url_life_<?=$val['idx']?>" id="img_url_life_<?=$val['idx']?>" value="<?=WWW_CROSSMAP?><?=$main_img?>">
|
||||
<h2><a href="<?=$view_url?>"><?=$title_txt?> - <?=$add_title?></a><span class="n_date"><?=$display_date_txt?></span></h2>
|
||||
<div class="news_box_con_left">
|
||||
<div><?=$content_txt?></div>
|
||||
<div class="news_box_detail" style="padding-top: 35px;">
|
||||
<span class="profile" ><a href="<?=$curl?>" style="color:#000;"> <?=$writer_name?></a></span>
|
||||
<span><img src="/img/mobile/search_bar.gif"></span>
|
||||
<span class="beachblue"><a href="<?=$view_url?>"><?=WWW_CROSSMAP_M?><?=$view_url?></a></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_box_con_right">
|
||||
<div class="channel_con">
|
||||
<div class="play_box">
|
||||
<a href=""><img src="<?=$main_img?>" style="max-width:150px;max-height:150px;" class="art-img"></a>
|
||||
<span class="play"><a href=""><img src="/img/mobile/img_play2.png"></a></span>
|
||||
<span class="play_time"><?=$val['video_playtime']?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? }?>
|
||||
|
||||
</div>
|
||||
<div class="pagenumber" style="border-top: 1px solid #eaeaea; padding-top: 25px;">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
<? require_once(APPPATH."views/m/search/search_footer_inc.php"); ?>
|
||||
|
||||
|
||||
|
||||
<?}?>
|
||||
|
||||
|
||||
<?
|
||||
$title = ''; $content = ''; $main_img = '';
|
||||
require_once(APPPATH."views/web/comm/share_box_inc.php"); ?>
|
||||
<script>
|
||||
var share_key = '';
|
||||
$('.share_btn').click(function(e) {
|
||||
$("#share_box").toggle();
|
||||
var key = $(this).attr('strA');
|
||||
|
||||
$("#share_content").val($("#content_"+key).val());
|
||||
$("#share_title").val($("#title_"+key).val());
|
||||
$("#share_copy_url").val($("#copy_url_"+key).val());
|
||||
$("#share_img_url").val($("#img_url_"+key).val());
|
||||
$("#copy_url").val($("#copy_url_"+key).val());
|
||||
|
||||
var popH = $(this).offset().top;
|
||||
var popL = $(this).offset().left;
|
||||
|
||||
$('.popup_share').css('left',(popL+130)+'px');
|
||||
$('.popup_share').css('top',popH+'px');
|
||||
|
||||
share_key = key;
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user