first commit
This commit is contained in:
164
application/views/web/search/image.php
Executable file
164
application/views/web/search/image.php
Executable file
@@ -0,0 +1,164 @@
|
||||
<?
|
||||
$SES_MEMBER_ID = $this->session->userdata('C_Member_Id');
|
||||
|
||||
$is_more = 'Y';
|
||||
if($total_count <= $limit) {
|
||||
$is_more = 'N';
|
||||
}
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/web/imgcss.css"/>
|
||||
|
||||
|
||||
<div class="contents">
|
||||
<div class="s_wrap">
|
||||
<div id="search" style="border-bottom:0 !important; padding-bottom:0px !important">
|
||||
<div class="search_images">
|
||||
<div class="search_cate" style="margin:0 0 0 20px">
|
||||
이미지 <span class="search_num"><?=number_format($total_count)?>건</span>
|
||||
</div>
|
||||
<section class="image-grid"></section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<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: '/web/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] != "") {
|
||||
$('.image-grid').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');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
133
application/views/web/search/image_list_more.php
Executable file
133
application/views/web/search/image_list_more.php
Executable file
@@ -0,0 +1,133 @@
|
||||
<?
|
||||
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 $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 = '/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 = '/web/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);
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<article class="image__cell is-collapsed" id="img_item<?=$row?>">
|
||||
<div class="image--basic">
|
||||
<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>
|
||||
<div class="arrow--wrap"><div class="arrow--up"></div></div>
|
||||
</div>
|
||||
<div class="image--expand" id="img_view_<?=$row?>">
|
||||
<a href="javascript:;" class="expand__close" onclick="img_view_close(this)"></a>
|
||||
<a href="javascript:img_view_change('<?=$row+1?>');" title="다음이미지" class="ommbtn omm_next">></a>
|
||||
<a href="javascript:img_view_change('<?=$row-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);
|
||||
if(isset($list[$key]) == true) {
|
||||
|
||||
|
||||
$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 = '/web/life/life_view/'.$val2['idx']; break;
|
||||
}
|
||||
$alt_text2 = $val2['title'];
|
||||
if(isset($val2['category_name'])==true) $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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
|
||||
<?
|
||||
$row++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo '|||||'.$more_list;
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||이미지 가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
92
application/views/web/search/image_list_test.php
Executable file
92
application/views/web/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 = '/web/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 = '/web/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.'|||||이미지 가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
77
application/views/web/search/image_view.php
Executable file
77
application/views/web/search/image_view.php
Executable file
@@ -0,0 +1,77 @@
|
||||
<?
|
||||
if($result_code == '0000') {
|
||||
echo '0000|||||';
|
||||
$title = $result['title'];
|
||||
$title_txt = mb_strimwidth($title, '0', '60', '..', 'utf-8');
|
||||
switch ($content_type) {
|
||||
case '1': $img_view_url = '/web/news/news_view/'.$result['idx']; $content_name='뉴스'; $content_main_url='/web/news'; break;
|
||||
case '2': $img_view_url = '/web/news/column_view/'.$result['idx']; $content_name='칼럼'; $content_main_url='/web/news/column'; break;
|
||||
case '3': $img_view_url = '/web/life/life_view/'.$result['idx']; $content_name='라이프'; $content_main_url='/web/life'; break;
|
||||
}
|
||||
|
||||
$main_img =$result['main_img'];
|
||||
$info = getimagesize(WWW_CROSSMAP.$main_img);
|
||||
$img_width = $info[0];
|
||||
$img_height = $info[1];
|
||||
$img_mime = $info[2];
|
||||
|
||||
$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');
|
||||
$alt_text = $title;
|
||||
if($result['category_name']!='') $alt_text.= ' - '.$result['category_name'];
|
||||
|
||||
?>
|
||||
<span class="click_close"><a href="javascript:close_image_popup();"><img src="/img/web/photo_close.png"></a></span>
|
||||
<span class="click_left">
|
||||
<? if(isset($arr_prev['idx'])==true) { ?>
|
||||
<a href="javascript:img_view('<?=$arr_prev['content_type']?>','<?=$arr_prev['idx']?>','<?=$arr_prev['row_num']?>','<?=$search_keyword?>');"><img src="/img/web/photo_left.png"></a>
|
||||
<? } else {?>
|
||||
<img src="/img/web/photo_left.png">
|
||||
<? }?>
|
||||
</span>
|
||||
<span class="click_right">
|
||||
<? if(isset($arr_next['idx'])==true) { ?>
|
||||
<a href="javascript:img_view('<?=$arr_next['content_type']?>','<?=$arr_next['idx']?>','<?=$arr_next['row_num']?>','<?=$search_keyword?>');"><img src="/img/web/photo_right.png"></a>
|
||||
<? } else {?>
|
||||
<img src="/img/web/photo_right.png">
|
||||
<? }?>
|
||||
</span>
|
||||
|
||||
<div class="viewer_box_wrap">
|
||||
<div class="viewer_photo">
|
||||
<a href="<?=$img_view_url?>" title="<?=$alt_text?>"><p style="cursor:pointer;width:434px;height:225px;background:url('<?=$main_img?>') no-repeat center; background-size:cover;"></p></a>
|
||||
</div>
|
||||
<div class="viewer_box">
|
||||
<a href=""><h2><?=$title_txt?></h2></a>
|
||||
<div class="search_info" style="font-weight:bold; margin-bottom:20px;">
|
||||
<a href="<?=$content_main_url?>"><span class="beachblue"><?=$content_name?></span></a>
|
||||
<span><?=$img_width?>*<?=$img_height?></span>
|
||||
<span>|</span>
|
||||
<span><?=$img_type[$img_mime]?></span>
|
||||
</div>
|
||||
<div class="small_photos">
|
||||
<? foreach ($arr_relation_img as $val2) {
|
||||
switch ($val2['content_type']) {
|
||||
case '1': $img_view_url1 = '/web/news/news_view/'.$val2['idx']; break;
|
||||
case '2': $img_view_url1 = '/web/news/column_view/'.$val2['idx']; break;
|
||||
case '3': $img_view_url1 = '/web/life/life_view/'.$val2['idx']; break;
|
||||
}
|
||||
|
||||
?>
|
||||
<a href="<?=$img_view_url1?>" title="<?=$alt_text?>"><p style="cursor:pointer;width:70px;height:70px;background:url('<?=$val2['main_img']?>') no-repeat center; background-size:cover;"></p></a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?
|
||||
|
||||
} else {
|
||||
echo $result_code.'|||||이미지 가져오기에 실패했습니다.';
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
490
application/views/web/search/index.php
Executable file
490
application/views/web/search/index.php
Executable file
@@ -0,0 +1,490 @@
|
||||
<?
|
||||
$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);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
<? if ($total_count == 0) { ?>
|
||||
<div class="list_left">
|
||||
<div id="search" style="border-bottom: 0;">
|
||||
<div class="search_articles">
|
||||
<div id="notfound" class="noresult_type3">
|
||||
<div class="not_found02">
|
||||
<p>
|
||||
<em>'<?= $search_keyword ?>'</em>에 대한 검색결과가 없습니다.
|
||||
</p>
|
||||
<ul>
|
||||
<li>단어의 철자가 정확한지 확인해 보세요.</li>
|
||||
<li>한글을 영어로 혹은 영어를 한글로 입력했는지 확인해 보세요.</li>
|
||||
<li>검색어의 단어 수를 줄이거나, 보다 일반적인 검색어로 다시 검색해 보세요.</li>
|
||||
<li>두 단어 이상의 검색어인 경우, 띄어쓰기를 확인해 보세요.</li>
|
||||
<li>검색 옵션을 변경해서 다시 검색해 보세요.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<? } else { ?>
|
||||
|
||||
<div class="list_left">
|
||||
<div id="search">
|
||||
<? if (count($arr_search_keyword_relation) > 0) { ?>
|
||||
<div class="search_result">
|
||||
<div class="related_tit">관련</div>
|
||||
<div class="related_names">
|
||||
<? foreach ($arr_search_keyword_relation as $val) { ?>
|
||||
<a href="/web/search/?search_keyword=<?= $val['relation_keyword'] ?>"><?= $val['relation_keyword'] ?></a>
|
||||
<? } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<? } ?>
|
||||
|
||||
<div class="search_articles">
|
||||
<? if (count($arr_life) > 0) { ?>
|
||||
|
||||
<div class="search_cate">라이프</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="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 ?>/web/life/life_view/<?= $val['idx'] ?>"> <input type="hidden" name="img_url_life_<?= $val['idx'] ?>" id="img_url_life_<?= $val['idx'] ?>" value="<?= WWW_CROSSMAP ?><?= $main_img ?>"> <span class="search_img" onclick="location.href='/web/life/life_view/<?= $val['idx'] ?>'" style="cursor:pointer;width:137px;height:94px;background:url('<?= $val['main_img'] ?>') no-repeat center; background-size:cover;"></span>
|
||||
<h2 class="search_tit">
|
||||
<a href="/web/life/life_view/<?= $val['idx'] ?>"><?= $title_txt ?></a><span class="search_date"><?= $display_date_txt ?><span class="img_direct"><img src="/img/web/img_direct.gif" style="cursor: pointer" class="share_btn" strA="life_<?= $val['idx'] ?>"></span></span>
|
||||
</h2>
|
||||
<div class="search_txt">
|
||||
<?= $content_txt ?>
|
||||
<div class="search_info">
|
||||
<span class="profile"><a href="/web/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> <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>
|
||||
<? if ($i == count($arr_life)) { ?>
|
||||
<div class="s_seeall fr">
|
||||
<a href="/web/search/list?search_keyword=<?= $search_keyword ?>&content_type=3">라이프
|
||||
더보기<img src="/img/web/mypage_arrow_right.gif">
|
||||
</a>
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<? } ?>
|
||||
|
||||
<? if (count($arr_news) > 0) { ?>
|
||||
<ul class="search_cate2">
|
||||
<li class="search_cate">뉴스</li>
|
||||
</ul>
|
||||
<?
|
||||
|
||||
$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="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 ?>/web/news/news_view/<?= $val['idx'] ?>"> <input type="hidden" name="img_url_news_<?= $val['idx'] ?>" id="img_url_news_<?= $val['idx'] ?>" value="<?= WWW_CROSSMAP ?><?= $main_img ?>"> <span class="search_img" onclick="location.href='/web/news/news_view/<?= $val['idx'] ?>'" style="cursor:pointer;width:137px;height:94px;background:url('<?= $val['main_img'] ?>') no-repeat center; background-size:cover;"></span>
|
||||
<div class="search_box">
|
||||
<h2 class="search_tit">
|
||||
<a href="/web/news/news_view/<?= $val['idx'] ?>"><?= $title_txt ?></a>
|
||||
</h2>
|
||||
<div class="search_info">
|
||||
<span><?= $press_txt ?></span> <span><img src="/img/web/search_bar.gif"></span> <span><?= $display_date_txt ?></span>
|
||||
<span><img src="/img/web/search_bar.gif"></span> <span><a href="/web/news/news_view/<?= $val['idx'] ?>">크로스맵뉴스</a></span> <span class="img_direct"><img src="/img/web/img_direct.gif" style="margin-top: 0 !important" style="cursor: pointer" class="share_btn" strA="news_<?= $val['idx'] ?>"></span>
|
||||
</div>
|
||||
<div class="search_txt">
|
||||
<?= $content_txt ?>
|
||||
<?
|
||||
|
||||
if (count($arr_news_relation_article[$val['idx']]) > 0) {
|
||||
?>
|
||||
<?
|
||||
|
||||
foreach ($arr_news_relation_article[$val['idx']] as $key1 => $val1) {
|
||||
|
||||
$relation_title_txt = mb_strimwidth($val1['title'], '0', '55', '..', '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="search_info">
|
||||
<span class="s_reply"><img src="/img/web/search_reply.gif"><a href="/web/news/news_view/<?= $val1['idx'] ?>"><?= $relation_title_txt ?></a></span>
|
||||
<span><?= $press_txt ?></span> <span style="margin-right: 2px;"><img src="/img/web/search_bar.gif"></span> <span><?= $display_date_txt ?></span>
|
||||
<span style="margin-right: 2px;"><img src="/img/web/search_bar.gif"></span> <span><a href="/web/news/news_view/<?= $val1['idx'] ?>">크로스맵뉴스</a></span>
|
||||
|
||||
</div>
|
||||
|
||||
<?
|
||||
|
||||
if ($key1 == 1)
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div class="search_all" style="margin-top: 5px;">
|
||||
<a href="/web/search/news?search_keyword=<?= $search_keyword ?>&content_idx=<?= $val['idx'] ?>" style="color: #767676">관련뉴스 <?= count($arr_news_relation_article[$val['idx']]) ?>건 전체보기></a>
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
</div>
|
||||
<? if ($i == count($arr_news)) { ?> <div class="s_seeall fr">
|
||||
<a href="/web/search/news?search_keyword=<?= $search_keyword ?>&content_type=1">뉴스
|
||||
더보기<img src="/img/web/mypage_arrow_right.gif">
|
||||
</a>
|
||||
</div><? } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?
|
||||
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<? } ?>
|
||||
|
||||
|
||||
|
||||
<!--div class="search_wrap bb pdb20">
|
||||
<div class="search_cate">위키 </div>
|
||||
|
||||
<div class="search_wrap ">
|
||||
<?php
|
||||
foreach($wikiResult as $wiki) {
|
||||
?>
|
||||
<div class="search_box" style="width:100%">
|
||||
<h2 class="search_tit">
|
||||
<a href="https://en.wikipedia.org/wiki/<?php echo str_replace(' ', '_', $wiki->title)?>" target="_blank"><?php echo $wiki->title?></a>
|
||||
</h2>
|
||||
|
||||
<div class="search_txt">
|
||||
<?php echo $wiki->snippet?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
|
||||
</div-->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="search_wrap bb pdb20">
|
||||
<div class="search_cate">이미지</div>
|
||||
<div class="video_box">
|
||||
<?
|
||||
|
||||
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 = '/web/news/news_view/' . $val['idx'];
|
||||
break;
|
||||
case '2':
|
||||
$img_view_url = '/web/news/column_view/' . $val['idx'];
|
||||
break;
|
||||
case '3':
|
||||
$img_view_url = '/web/life/life_view/' . $val['idx'];
|
||||
break;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="video_list">
|
||||
<span class="photo"><a href="<?= $img_view_url ?>" title="<?= $title_text ?>">
|
||||
<p style="cursor:pointer;width:137px;height:94px;background:url('<?= $val['main_img'] ?>') no-repeat center; background-size:cover;"></p>
|
||||
</a><span class="img_spam_check_box" style="display: none;"><input type="checkbox" class="report" name="is_img_spam_check[]" value="<?= $val['content_type'] ?>_<?= $val['idx'] ?>" id="is_img_spam_check_<?= $val['content_type'] ?>_<?= $val['idx'] ?>" style="display: inline;" style="display:none"></span></span>
|
||||
</div>
|
||||
|
||||
<?
|
||||
|
||||
if ($key == 4)
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="s_seeall fr">
|
||||
<a href="/web/search/image?search_keyword=<?= $search_keyword ?>">이미지
|
||||
더보기<img src="/img/web/mypage_arrow_right.gif">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<? if (count($arr_video) > 0) { ?>
|
||||
<div class="search_wrap bb pdb20">
|
||||
<div class="search_cate">동영상</div>
|
||||
|
||||
<div class="video_box cm_earch_video">
|
||||
<?
|
||||
|
||||
foreach ($arr_video as $key => $val) {
|
||||
$title_txt = mb_strimwidth($val['title'], '0', '35', '..', 'utf-8');
|
||||
switch ($val['content_type']) {
|
||||
case '1':
|
||||
$video_view_url = '/web/news/news_view/' . $val['idx'];
|
||||
$video_category_url = '/web/news/category/' . $val['category_code'];
|
||||
break;
|
||||
case '2':
|
||||
$video_view_url = '/web/news/column_view/' . $val['idx'];
|
||||
$video_category_url = '/web/news/columnist/' . $val['partner_idx'];
|
||||
break;
|
||||
case '3':
|
||||
$video_view_url = '/web/life/life_view/' . $val['idx'];
|
||||
$video_category_url = '/web/life/category/' . $val['category_idx'];
|
||||
break;
|
||||
}
|
||||
|
||||
$display_date_txt = gf_article_date_text($val['display_date']);
|
||||
?>
|
||||
|
||||
<div class="video_list">
|
||||
<span class="play"><a href="<?= $video_view_url ?>"><img src="/img/web/img_play.png"></a></span> <span class="playtime2"><?= $val['video_playtime'] ?></span> <span class="photo"><a href="<?= $video_view_url ?>">
|
||||
<p style="cursor:pointer;width:137px;height:94px;background:url('<?= $val['main_img'] ?>') no-repeat center; background-size:cover;"></p>
|
||||
</a><span class="video_spam_check_box" style="display: none;"><input type="checkbox" class="report" name="is_video_spam_check[]" value="<?= $val['content_type'] ?>_<?= $val['idx'] ?>" id="is_video_spam_check_<?= $val['content_type'] ?>_<?= $val['idx'] ?>" style="display: inline;" style="display:none"></span></span> <span class="tit"><a href="<?= $video_view_url ?>"><?= $title_txt ?></a>
|
||||
<span><img src="/img/web/search_bar.gif"> <?= $display_date_txt ?></span></span>
|
||||
<div class="search_info">
|
||||
<img src="/img/web/img_arrow.gif"><a href="<?= $video_category_url ?>"> <?= $val['category_name'] ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? } ?>
|
||||
|
||||
</div>
|
||||
<div class="s_seeall fr">
|
||||
<a href="/web/search/video?search_keyword=<?= $search_keyword ?>">동영상
|
||||
더보기<img src="/img/web/mypage_arrow_right.gif">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<? if (count($arr_column) > 0) { ?>
|
||||
<div class="search_cate">칼럼</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="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 ?>/web/news/column_view/<?= $val['idx'] ?>">
|
||||
<input type="hidden" name="img_url_column_<?= $val['idx'] ?>" id="img_url_column_<?= $val['idx'] ?>" value="<?= WWW_CROSSMAP ?><?= $main_img ?>"> <span class="search_img" onclick="location.href='/web/news/column_view/<?= $val['idx'] ?>'" style="cursor:pointer;width:137px;height:94px;background:url('<?= $val['main_img'] ?>') no-repeat center; background-size:cover;"></span>
|
||||
<h2 class="search_tit">
|
||||
<a href=/web/news/column_view/<?= $val['idx'] ?>""><?= $title_txt ?> </a> <span class="search_date"><?= $display_date_txt ?><span class="img_direct"><img src="/img/web/img_direct.gif" style="cursor: pointer" class="share_btn" strA="column_<?= $val['idx'] ?>"></span></span>
|
||||
</h2>
|
||||
<div class="search_txt"><?= $content_txt ?></div>
|
||||
<div class="search_info search_url">
|
||||
<a href="/web/news/column_view/<?= $val['idx'] ?>"><?= WWW_CROSSMAP ?>/web/news/column_view/<?= $val['idx'] ?></a>
|
||||
</div>
|
||||
|
||||
<? if ($i == count($arr_column)) { ?> <div class="s_seeall fr">
|
||||
<a href="/web/search/list?search_keyword=<?= $search_keyword ?>&content_type=2">칼럼
|
||||
더보기<img src="/img/web/mypage_arrow_right.gif">
|
||||
</a>
|
||||
</div><? } ?>
|
||||
</div>
|
||||
|
||||
<?
|
||||
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<? } ?>
|
||||
|
||||
<? require_once(APPPATH . "views/web/search/search_footer_inc.php"); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<? } ?>
|
||||
|
||||
<? require_once(APPPATH . 'views/web/news/news_right_inc.php'); ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<? 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 - 160 + 'px');
|
||||
$('.popup_share').css('top', popH - 200 + 'px');
|
||||
|
||||
share_key = key;
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
function bookmark() {
|
||||
if ("<?= $SES_MEMBER_ID ?>" == "") {
|
||||
alert("로그인 후에 이용가능합니다.");
|
||||
return;
|
||||
}
|
||||
var str_temp = share_key.split('_');
|
||||
var content_type = '';
|
||||
if (str_temp[0] == 'column') {
|
||||
content_type = '2';
|
||||
} else if (str_temp[0] == 'news') {
|
||||
content_type = '1';
|
||||
} else if (str_temp[0] == 'life') {
|
||||
content_type = '3';
|
||||
}
|
||||
|
||||
var form_data = {
|
||||
"content_idx": str_temp[1],
|
||||
"content_type": content_type
|
||||
};
|
||||
$.ajax({
|
||||
url: '/web/comm/bookmark_proc',
|
||||
async: false,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: form_data,
|
||||
success: function(rtnJson) {
|
||||
if (rtnJson.code == "0000") {
|
||||
$("#share_box").hide();
|
||||
} else {
|
||||
alert("북마크에 실패했습니다.");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function(rtnJson) {
|
||||
alert('북마크에 실패했습니다.');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
156
application/views/web/search/list.php
Executable file
156
application/views/web/search/list.php
Executable file
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
$arr_search_keyword = array();
|
||||
if($search_keyword!=''){
|
||||
$arr_search_keyword = explode(" ", $search_keyword);
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
|
||||
<? if(count($list)==0) {?>
|
||||
<div class="list_left">
|
||||
<div id="search" style="border-bottom: 0;">
|
||||
<div class="search_articles">
|
||||
<div id="notfound" class="noresult_type3">
|
||||
<div class="not_found02">
|
||||
<p><em>'<?=$search_keyword?>'</em>에 대한 검색결과가 없습니다.</p>
|
||||
<ul>
|
||||
<li>단어의 철자가 정확한지 확인해 보세요.</li> <li>한글을 영어로 혹은 영어를 한글로 입력했는지 확인해 보세요.</li>
|
||||
<li>검색어의 단어 수를 줄이거나, 보다 일반적인 검색어로 다시 검색해 보세요.</li>
|
||||
<li>두 단어 이상의 검색어인 경우, 띄어쓰기를 확인해 보세요.</li>
|
||||
<li>검색 옵션을 변경해서 다시 검색해 보세요.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? } else {?>
|
||||
|
||||
<div class="list_left">
|
||||
<div id="search">
|
||||
<div class="search_cate">
|
||||
<?=$page_title?><span class="search_num"><?=number_format($start_row)?>-<?=number_format($end_row)?> / <?=number_format($total_count)?>건</span>
|
||||
</div>
|
||||
<div class="search_articles">
|
||||
<? $i=1;
|
||||
foreach ($list as $key=>$val) {
|
||||
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', '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'];
|
||||
if($content_type == '2') {
|
||||
$view_url = '/web/news/column_view/'.$val['idx'];
|
||||
$share_id_name ="column_".$val['idx'];
|
||||
} else if($content_type == '3') {
|
||||
$view_url = '/web/life/life_view/'.$val['idx'];
|
||||
$share_id_name ="life_".$val['idx'];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div class="search_wrap">
|
||||
<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?>">
|
||||
<span class="search_img" onclick="location.href='<?=$view_url?>'" style="cursor:pointer;width:137px;height:94px;background:url('<?=$val['main_img']?>') no-repeat center; background-size:cover;"></span>
|
||||
<h2 class="search_tit"><a href="<?=$view_url?>"><?=$title_txt?></a><? if($content_type!='1') { ?><span class="search_date"><?=$display_date_txt?><span class="img_direct"><img src="/img/web/img_direct.gif" style="cursor: pointer" class="share_btn" strA="<?=$share_id_name?>"></span></span><?}?></h2>
|
||||
<? if($content_type == '2') {?>
|
||||
<div class="search_txt">
|
||||
<?=$content_txt?>
|
||||
<div class="search_info profile">
|
||||
<span class="search_url"><a href="/web/news/column_view/<?=$val['idx']?>"><?=WWW_CROSSMAP?>/web/news/column_view/<?=$val['idx']?></a></span>
|
||||
</div>
|
||||
</div>
|
||||
<? } else if($content_type == '3') {?>
|
||||
<div class="search_txt">
|
||||
<?=$content_txt?>
|
||||
<div class="search_info">
|
||||
<span class="profile"><a href="/web/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>
|
||||
<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>
|
||||
|
||||
|
||||
<? $i++;
|
||||
}?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pagenumber">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
<? require_once(APPPATH."views/web/search/search_footer_inc.php"); ?>
|
||||
</div>
|
||||
|
||||
<?}?>
|
||||
|
||||
<? require_once (APPPATH.'views/web/news/news_right_inc.php');?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?
|
||||
$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>
|
||||
|
||||
|
||||
186
application/views/web/search/news.php
Executable file
186
application/views/web/search/news.php
Executable file
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
$arr_search_keyword = array();
|
||||
if($search_keyword!=''){
|
||||
$arr_search_keyword = explode(" ", $search_keyword);
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
|
||||
<? if(count($list)==0) {?>
|
||||
<div class="list_left">
|
||||
<div id="search" style="border-bottom: 0;">
|
||||
<div class="search_articles">
|
||||
<div id="notfound" class="noresult_type3">
|
||||
<div class="not_found02">
|
||||
<p><em>'<?=$search_keyword?>'</em>에 대한 검색결과가 없습니다.</p>
|
||||
<ul>
|
||||
<li>단어의 철자가 정확한지 확인해 보세요.</li> <li>한글을 영어로 혹은 영어를 한글로 입력했는지 확인해 보세요.</li>
|
||||
<li>검색어의 단어 수를 줄이거나, 보다 일반적인 검색어로 다시 검색해 보세요.</li>
|
||||
<li>두 단어 이상의 검색어인 경우, 띄어쓰기를 확인해 보세요.</li>
|
||||
<li>검색 옵션을 변경해서 다시 검색해 보세요.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? } else {?>
|
||||
|
||||
|
||||
<div class="list_left">
|
||||
<div id="search">
|
||||
<div class="search_cate">
|
||||
뉴스<? if($news_type=='relation') { ?><span class="search_nav"><a href="/web/search/?search_keyword=<?=$search_keyword?>" class="current">전체뉴스</a> > 관련뉴스 </span><?}?><span class="search_num"><?=number_format($start_row)?>-<?=number_format($end_row)?> / <?=number_format($total_count)?>건</span>
|
||||
</div>
|
||||
<ul class="search_list" style="margin:20px 0">
|
||||
<li style="padding-left:0 !important"><a href="/web/search/news?search_keyword=<?=$search_keyword?>&content_idx=<?=$content_idx?>&search_sort=1" <? if($search_sort == '1') { echo 'class="current"'; }?>>최신순 </a></li>
|
||||
<li style="color:#c2c2c2;">|</li>
|
||||
<li><a href="/web/search/news?search_keyword=<?=$search_keyword?>&content_idx=<?=$content_idx?>&search_sort=2" <? if($search_sort == '2') { echo 'class="current"'; }?>>오래된순 </a></li>
|
||||
</ul>
|
||||
|
||||
<div class="search_articles">
|
||||
<? $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 = '/web/news/news_view/'.$val['idx'];
|
||||
$share_id_name ="news_".$val['idx'];
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<div class="search_wrap">
|
||||
<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?>">
|
||||
<span class="search_img" onclick="location.href='<?=$view_url?>'" style="cursor:pointer;width:137px;height:94px;background:url('<?=$val['main_img']?>') no-repeat center; background-size:cover;"></span>
|
||||
<div class="search_box">
|
||||
<h2 class="search_tit"><a href="<?=$view_url?>"><?=$title_txt?></a></h2>
|
||||
<div class="search_info">
|
||||
<span><?=$press_txt?></span>
|
||||
<span style="color:#c2c2c2;">|</span>
|
||||
<span><?=$display_date_txt?></span>
|
||||
<span style="color:#c2c2c2;">|</span>
|
||||
<span><a href="<?=$view_url?>">크로스맵뉴스</a></span>
|
||||
<span class="img_direct"><img src="/img/web/img_direct.gif" style="margin-top:0 !important" style="cursor: pointer" class="share_btn" strA="news_<?=$val['idx']?>"></span>
|
||||
</div>
|
||||
<div class="search_txt">
|
||||
<?=$content_txt?>
|
||||
|
||||
<?
|
||||
if(isset($arr_news_relation_article[$val['idx']])==true) {
|
||||
if(count($arr_news_relation_article[$val['idx']]) > 0 ) {?>
|
||||
<? $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="search_info">
|
||||
<span class="s_reply"><img src="/img/web/search_reply.gif"><a href="/web/news/news_view/<?=$val1['idx']?>"><?=$relation_title_txt?></a></span>
|
||||
<span><?=$press_txt?></span>
|
||||
<span style="color:#c2c2c2;">|</span>
|
||||
<span><?=$display_date_txt?></span>
|
||||
<span style="color:#c2c2c2;">|</span>
|
||||
<span><a href="/web/news/news_view/<?=$val1['idx']?>">크로스맵뉴스</a></span>
|
||||
</div>
|
||||
<?
|
||||
if($i==4) break;
|
||||
$i++;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="search_all" style="margin-top: 5px;">
|
||||
<a href="/web/search/news?search_keyword=<?=$search_keyword?>&content_idx=<?=$val['idx']?>" style="color:#767676">관련뉴스 <?=count($arr_news_relation_article[$val['idx']])?>건 전체보기></a>
|
||||
</div>
|
||||
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? }?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pagenumber">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
<? require_once(APPPATH."views/web/search/search_footer_inc.php"); ?>
|
||||
</div>
|
||||
|
||||
<?}?>
|
||||
<? require_once (APPPATH.'views/web/news/news_right_inc.php');?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?
|
||||
$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>
|
||||
|
||||
|
||||
49
application/views/web/search/search_footer_inc.php
Executable file
49
application/views/web/search/search_footer_inc.php
Executable file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
$ci=& get_instance();
|
||||
|
||||
# 실시간급상승
|
||||
$req_data = array();
|
||||
$req_data['offset'] = 0;
|
||||
$req_data['limit'] = 20;
|
||||
|
||||
$ci->load->model('web/m_realtime_keyword');
|
||||
$arr_realtime_keyword = $ci->m_realtime_keyword->realtime_keyword_list($req_data);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div style="padding:0px 0 0 60px;" id="roll_realtime_keyword_bottom">
|
||||
<span style="padding-right:50px; position: absolute; top: 0; left: 60px;">실시간 급상승 </span>
|
||||
<ul style="height:17px; left: 150px">
|
||||
<?
|
||||
foreach ($arr_realtime_keyword as $key=>$val) {
|
||||
?>
|
||||
<li style="height:17px">
|
||||
<span class="beachblue"><?=$val['rank']?></span>
|
||||
<span class="b_roll_txt" style="width:500px"><a href="/web/search/?search_keyword=<?=urlencode($val['keyword'])?>"><?=$val['keyword']?></a></span>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="b_search">
|
||||
<input class="b_window" id="search_keyword_bottom" name="search_keyword_bottom" value="<?=$search_keyword?>" onkeypress="if( event.keyCode==13 ){search_keyword_bottom_proc();}">
|
||||
<button type="button" class="b_src_sumit" onclick="search_keyword_bottom_proc()"><img src="/img/web/img_search.gif"></button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('#roll_realtime_keyword_bottom').vTicker();
|
||||
|
||||
function search_keyword_bottom_proc(){
|
||||
var search_keyword = $("#search_keyword_bottom").val();
|
||||
var result = true;
|
||||
if(search_keyword!='') result = search_keyword_reg(search_keyword);
|
||||
if(result==true) {
|
||||
location.href='/web/search/?search_keyword='+encodeURI(search_keyword);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
133
application/views/web/search/video.php
Executable file
133
application/views/web/search/video.php
Executable file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
$arr_search_keyword = array();
|
||||
if($search_keyword!=''){
|
||||
$arr_search_keyword = explode(" ", $search_keyword);
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="contents">
|
||||
<div class="wrap">
|
||||
|
||||
<? if(count($list)==0) {?>
|
||||
<div class="list_left">
|
||||
<div id="search" style="border-bottom: 0;">
|
||||
<div class="search_articles">
|
||||
<div id="notfound" class="noresult_type3">
|
||||
<div class="not_found02">
|
||||
<p><em>'<?=$search_keyword?>'</em>에 대한 검색결과가 없습니다.</p>
|
||||
<ul>
|
||||
<li>단어의 철자가 정확한지 확인해 보세요.</li> <li>한글을 영어로 혹은 영어를 한글로 입력했는지 확인해 보세요.</li>
|
||||
<li>검색어의 단어 수를 줄이거나, 보다 일반적인 검색어로 다시 검색해 보세요.</li>
|
||||
<li>두 단어 이상의 검색어인 경우, 띄어쓰기를 확인해 보세요.</li>
|
||||
<li>검색 옵션을 변경해서 다시 검색해 보세요.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? } else {?>
|
||||
|
||||
<div class="list_left">
|
||||
<div id="search" style="border-bottom:0;">
|
||||
<div class="search_cate">
|
||||
동영상<span class="search_num"><?=number_format($start_row)?>-<?=number_format($end_row)?> / <?=number_format($total_count)?>개</span>
|
||||
</div>
|
||||
<div class="search_articles">
|
||||
<? 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 = '/web/news/news_view/'.$val['idx']; $share_key = 'news_'.$val['idx']; $add_title = $val['category_name']; $writer_name = $val['reporter_name']; break;
|
||||
case '2': $view_url = '/web/news/column_view/'.$val['idx']; $share_key = 'column_'.$val['idx']; $add_title = $val['column_name']; $writer_name = $val['column_name']; break;
|
||||
case '3': $view_url = '/web/life/life_view/'.$val['idx']; $share_key = 'life_'.$val['idx']; $add_title = $val['channel_name']; $writer_name = $val['channel_name']; break;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="search_box" style="margin-bottom: 15px;">
|
||||
<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 class="search_tit"><a href="<?=$view_url?>"><?=$title_txt?> - <?=$add_title?></a><span class="search_date"> <span class="img_direct"><img src="/img/web/img_direct.gif" style="cursor: pointer" class="share_btn" strA="<?=$share_key?>"></span></span></h2>
|
||||
<div class="search_wrap">
|
||||
<div class="search_img" onclick="location.href='<?=$view_url?>'" style="cursor:pointer;width:137px;height:94px;background:url('<?=$val['main_img']?>') no-repeat center; background-size:cover;">
|
||||
<span class="play"><a href="<?=$view_url?>"><img src="/img/web/img_play.png"></a></span>
|
||||
<span class="playtime"><?=$val['video_playtime']?></span>
|
||||
</div>
|
||||
<div class="search_txt">
|
||||
<div class="search_url"><a href="<?=$view_url?>"><?=WWW_CROSSMAP?><?=$view_url?></a></div>
|
||||
<div class="search_info"><?=$display_date_txt?> - 업로더: <?=$writer_name?></div>
|
||||
<?=$content_txt?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? }?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagenumber" style="border-top: 1px solid #eaeaea; padding-top: 25px;">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
<? require_once(APPPATH."views/web/search/search_footer_inc.php"); ?>
|
||||
</div>
|
||||
<?}?>
|
||||
|
||||
<? require_once (APPPATH.'views/web/news/news_right_inc.php');?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?
|
||||
$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