
	<div class="contents">

		<div class="top_banner"><a href="" target=""><img src="/img/web/banner_970.jpg"></a>
<!-- PC_칼럼_상단 
<ins class="adsbygoogle"
     style="display:inline-block;width:970px;height:90px"
     data-ad-client="ca-pub-7071495522658800"
     data-ad-slot="6896432687"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script> -->
		</div>

		<div class="wrap">
			
			<div class="list_left">
				<div class="column_list"><a href="/web/news/column"><span class="beachblue">전체칼럼</span></a>
				<? for($i=0;$i<=6;$i++) {
						if(isset($arr_columnist[$i])==false)	continue;
				?>
					  · <a href="/web/news/columnist/<?=$arr_columnist[$i]['idx']?>"><?=$arr_columnist[$i]['partner_name']?></a>
				<?	}?>
					<span class="fr"><a href="javascript:columnist_show();"><img src="/img/web/menu.gif"></a></span>
				</div>
				<div class="news_list" id="column_headline">
					<div class="news_list_cont" style="margin-top:0;">
				<?

					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', '500', '..', 'utf-8');
				?>
						<div class="art-info3">
							<p class="column_tit"><a href="/web/news/columnist/<?=$arr_headline_column[1]['partner_idx']?>"><?=$arr_headline_column[1]['column_name']?></a></p>
							<h2 class="art-title"><a href="/web/news/column_view/<?=$arr_headline_column[1]['content_idx']?>"><?=$arr_headline_column[1]['title']?></a></h2>
							<p class="art-sum"><a href="/web/news/column_view/<?=$arr_headline_column[1]['content_idx']?>"><?=$headline_content?></a> </p>
						</div>
				<?	}?>
					</div>
				</div>
				<div class="columnist_box" id="columnist_list" style="display:none;">
					<div>
			<?
				$i = 1;
				$columnist_count = count($arr_columnist);
				$columnist_page = ceil($columnist_count/35);
				foreach ($arr_columnist as $val) {

					$curr_page = ceil($i/35);
					$style_display = 'block';
					if($i > 35) 	$style_display='none';

					$item_style = "";
					if($i%7 == 1) {
						echo '<ul class="news_s_box columnist_page'.$curr_page.'" style="display:'.$style_display.'">';
						$item_style = 'style="border-left:0 !important;"';
					}

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

			<?
					if($i%7 == 0) echo '</ul>';

					$i++;
				}

				if($columnist_count%7!=0) {
					for($z=1;$z<=7-($columnist_count%7);$z++){
						echo '<div style="height:17px"></div>';
					}
					echo '</ul>';
				}

			?>

						<ul class="news_s_box"><div style="border-left:0 !important;"></div><div></div><div></div><div></div><div></div><div></div><div></div></ul>
					</div>
					<div class="new_box_footer">
						<span class="c_left"><a href="javascript:change_columnist_page(1)"><img src="/img/web/c_right.gif"></a></span>
						<span class="c_right"><a href="javascript:change_columnist_page(-1)"><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>	

				<div class="pray" style="margin-top:0;">
					<div class="list_box" style="padding-top:0;">
				<? //	foreach($list as $val) {?>
                <? for($i = 0; $i < 6; $i++) { ?>
						<div>
							<a href="/web/news/columnist/<?=$list[$i]['partner_idx']?>"><span class="art_cate2" style="width:15%;">[<?=$list[$i]['column_name']?>]</span></a>
							<span style="width:70%;"><a href="/web/news/column_view/<?=$list[$i]['idx']?>"><?=$list[$i]['title']?></a></span>
						</div>
				<?	}?>
					</div>
				</div>

				<? require_once(APPPATH."views/web/comm/weather_column_bar_inc.php"); ?>

			<?
				$recomm_life_count = count($arr_recomm_life);
				$recomm_life_page = ceil($recomm_life_count/3);
				if($recomm_life_count > 0) {
			?>

				<div class="pray">
					<ul class="pray_box">
				<? if($recomm_life_count > 3) {?>
						<a href="javascript:change_recomm_life_page(-1)"><span class="s_left"><img src="/img/web/p_slide_left.png"></span></a>
						<a href="javascript:change_recomm_life_page(1)"><span class="s_right"><img src="/img/web/p_slide_right.png"></span></a>
				<? }?>
				<?  $i=1;
					foreach ($arr_recomm_life as $val) {
                		$title_txt = mb_strimwidth($val['title'], '0', '70', '..', 'utf-8');

						$curr_page = ceil($i/3);
						$margin = '';$style_display='block';
						if($i%3==0)	$margin='margin-right:0 !important';
						if($i > 3) 	$style_display='none';

				?>
						<li class="recomm_life_page<?=$curr_page?>" style="display:<?=$style_display?>;<?=$margin?>;cursor: pointer" onclick="location.href='/web/life/life_view/<?=$val['content_idx']?>'">
							<div style="width:230px; height:168px; background:url('<?=$val['theme_img']?>') no-repeat center; background-size:cover;"></div>
							<span class="photo_info" style="width:210px"><a href="/web/life/life_view/<?=$val['content_idx']?>"><?=$title_txt?></a></span>
						</li>
				<?  	$i++;
					} ?>

					</ul>
			<?  }?>



					<div class="list_box" id="column_list">
					<? //foreach($list as $val) {?>
                    <? for($i = 6; $i < 12; $i++) { ?>
						<div>
							<a href="/web/news/columnist/<?=$list[$i]['partner_idx']?>"><span class="art_cate2" style="width:15%;">[<?=$list[$i]['column_name']?>]</span></a>
							<span style="width:70%;"><a href="/web/news/column_view/<?=$list[$i]['idx']?>"><?=$list[$i]['title']?></a></span>
						</div>
					<?	}?>

					</div>

			<? 	if($total_count > 6) {?>

					<div class="channel_bottom" id="column_more_btn">
						<button type="button" class="btn btn-default br20" style="width: 90px;" onclick="column_list_more();">더보기 <img src="/img/web/arrow_more.gif" style="vertical-align:middle;"></button>
					</div>

			<?	}?>

					<div style="margin-top:30px;"></div>
					<div class="banner"><a href="" target=""><img src="/img/web/banner_730.jpg"></a>

<!-- PC_칼럼_하단 
<ins class="adsbygoogle"
     style="display:inline-block;width:730px;height:65px"
     data-ad-client="ca-pub-7071495522658800"
     data-ad-slot="1072835336"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script> -->
					</div>

				</div>

			</div>

			<? include_once ('news_right_inc.php');?>


		</div>
	</div>




<script>
var recomm_life_curr_page = 1;
function change_recomm_life_page(page){
	var total_page = "<?=$recomm_life_page?>";
	var move_page = recomm_life_curr_page + page;
	if(move_page > 0 && total_page >= move_page) {
		$(".recomm_life_page"+move_page).show();
		$(".recomm_life_page"+recomm_life_curr_page).hide();
		recomm_life_curr_page = move_page;
	}
}

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 = 3;
function column_list_more(){
	var form_data = {
		"page"					: column_list_page
	};
	$.ajax({
        url: '/web/news/column_list_more',
        async: false,
        type: 'POST',
        dataType: 'HTML',
		data: form_data,
		success: function (rtnHtml) {
        	var arrHtml = rtnHtml.split("|||||");
			if(arrHtml[0].trim()=='0000') {
				if (arrHtml[1] != "") {
					$("#column_list").append(arrHtml[1]);
					column_list_page++;
					if (arrHtml[2] == "N") {
						$("#column_more_btn").hide();
					} else {
						$("#rcolumn_more_btn").show();
					}
				}
			}
        },
        error: function (rtnHtml) {
            alert('데이터 로드에 실패했습니다.');
            return false;
        }
    });


}

function columnist_show(){
	$("#columnist_list").toggle();
	$("#column_headline").toggle();

}


</script>
