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