
<?
require_once(APPPATH."views/m/common/navigation.php");
?>


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

<div class="news_cont2">
	<div class="grace_top">
		<h2 class="art-category">
			<span class="beachblue">전체칼럼</span>
			<? for($i=0;$i<=3;$i++) {
				if(isset($arr_columnist[$i])==false)	continue;
				?>
				<span> <a href="/m/news/columnist/<?=$arr_columnist[$i]['idx']?>"><?=$arr_columnist[$i]['partner_name']?></a></span>
			<?	}?>

			<span class="fr"><a onclick="tg();" style="cursor:pointer;"><img id="down" src="/img/mobile/arrow_down2.png"><img id="up" src="/img/mobile/arrow_up2.png" style="display:none;"></a></span>
			<script>
				function tg(){
					$('.columnist_box').toggle();
					$("#down").toggle();
					$("#up").toggle();
				}
			</script>
		</h2>


		<!--

		-->


		<div class="columnist_box news_box" id="columnist_list" style="display:none;">
			<div>

				<ul class="news_s_box">

					<? // $arr_columnist = array_merge($arr_columnist,$arr_columnist,$arr_columnist,$arr_columnist,$arr_columnist); ?>


					<?
					$columnist_count = count($arr_columnist);
					$max = 20;
					$columnist_page = ceil($columnist_count / $max);
					foreach ($arr_columnist as $i=>$val) {

					$curr_page = ceil(($i+1) / $max);
					$style_display = 'block';
					if ($i >0) $style_display = 'none';

					$item_style = "";
					if($i % $max == 0){

						echo '<ul class="news_s_box columnist_page' . $curr_page . '" style="display:' . $style_display . '">';
						$item_style = 'style="border-left:0 !important;"';
					}


					?>
					<li <?= $item_style ?>><a href="/m/news/columnist/<?= $val['idx'] ?>"><?= $val['partner_name'] ?></a></li>

					<?if($i % $max == ($max-1)) : ?>
				</ul>

				<?endif;?>
				<?


				}


				?>


				</ul>
			</div>
			<div class="new_box_footer">
				<span class="c_left" onclick="change_columnist_page(1)" style="cursor:pointer;"><a><img src="/img/web/c_right.gif"></a></span>
				<span class="c_right" onclick="change_columnist_page(-1)" style="cursor:pointer;"><a><img src="/img/web/c_left.gif"></a></span>
				<span class="c_slide">
						<? for ($j = 1; $j <= $columnist_page; $j++) {
							$page_img = '/img/web/c_off.gif';
							if ($j == 1) $page_img = '/img/web/c_on.gif';
							?>
							<a href="javascript:columnist_page('<?= $j ?>')"><img src="<?= $page_img ?>"
																				  id="columnist_page<?= $j ?>"></a>
						<? } ?>

			</div>
		</div>

		<!--


		-->
		<h2 class="art-title">
			<?

			if(count($arr_headline_column)==1){
				$headline_content = $arr_headline_column[1]['content'];
				$headline_content = strip_tags($headline_content);
				$headline_content = mb_strimwidth($headline_content, '0', '200', '..', 'utf-8');
				?>

				<a href="/m/news/columnist/<?=$arr_headline_column[1]['partner_idx']?>"><span class="blue">[<?=$arr_headline_column[1]['column_name']?>]</span></a> 
				<a href="/m/news/column_view/<?=$arr_headline_column[1]['content_idx']?>"><?=$arr_headline_column[1]['title']?></a>

				<p class="art-txt"><a href="/m/news/column_view/<?=$arr_headline_column[1]['content_idx']?>"><?=$headline_content?></a></p>

			<?	}?>


		</h2>

		<? 	foreach($list as $val) {?>
			<div>
				<h2 class="art-title">
					<a href="/m/news/columnist/<?=$val['partner_idx']?>"><span class="blue">[<?=$val['column_name']?>]</span></a> 
					<a href="/m/news/column_view/<?=$val['idx']?>"><?=$val['title']?></a>
				</h2>

			</div>
		<?}?>

	</div>
	<?
	include_once (APPPATH."/views/m/common/realtime.php");
	?>
	<div class="grace_top">
		<? 	foreach($list as $val) {?>
			<div>
				<h2 class="art-title">
					<a href="/m/news/columnist/<?=$val['partner_idx']?>"><span class="blue">[<?=$val['column_name']?>]</span></a> 
					<a href="/m/news/column_view/<?=$val['idx']?>"><?=$val['title']?></a>
				</h2>
			</div>
		<?}?>
	</div>
	<?
	include_once (APPPATH."/views/m/common/weather.php");
	?>


	<?
	include_once (APPPATH."/views/m/news/news_right_inc.php");
	?>


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





<script>


	var columnist_curr_page = 1;
	function change_columnist_page(page){
		var total_page = "<?=$columnist_page?>";
		var move_page = columnist_curr_page + page;
		if(move_page > 0 && total_page >= move_page) {
			columnist_page(move_page);
		}
	}

	function columnist_page(page){
		$(".columnist_page"+page).show();
		$(".columnist_page"+columnist_curr_page).hide();

		$("#columnist_page"+columnist_curr_page).attr("src","/img/web/c_off.gif");
		$("#columnist_page"+page).attr("src","/img/web/c_on.gif");

		columnist_curr_page = page;

	}




	var column_list_page = 2;
</script>
