<div class="contents">
		<div class="wrap">
			<div class="list_left">
				<div class="news_list">
					<div class="rankynews">
						<div class="rankytop" style="margin-bottom:10px">
							<span <? if($search_sort=='1') { echo 'class="radio_on"'; } else { echo 'class="radio_off"';}?> style="margin-right:10px;width: 60px;float: left;"><a href="/web/news/?search_sort=1">최신순</a></span>
							<span <? if($search_sort=='2') { echo 'class="radio_on"'; } else { echo 'class="radio_off"';}?> style="float: left;width: 60px;"><a href="/web/news/?search_sort=2">인기순</a></span>
						</div>
					</div>
                <?


                    foreach ($list as $val) {

                        $comment_count = $val['comment_count'];
                        $comment_count_txt = $comment_count;
                        if($comment_count > 9) {
                            $calc_count = str_pad(1, strlen($comment_count), "0", STR_PAD_RIGHT);
                            $comment_count_txt = (floor($comment_count/$calc_count)) * $calc_count;
                            $comment_count_txt = $comment_count_txt.'+';
                        }

                        $display_date =  $val['display_date'];
                        $display_date_txt = substr($display_date, 0, 10);
                        $display_date_txt = str_replace('-', '.', $display_date_txt);

						$title_len = 50;
						if($arr_news_setting['etc_char1']=='Y') {
							$title_len = '40';
						}

                        $title_txt = mb_strimwidth($val['title'], '0', $title_len, '..', 'utf-8');
						$content = preg_replace("(\<(/?[^\>]+)\>)", "", $val['content']);
						$content = strip_tags($content);
                        $content_txt = mb_strimwidth($content, '0', '250', '..', 'utf-8');


                ?>
                    <div class="news_list_cont">
						<div class="art-img2"><a href="/web/m/news_view/<?=$val['idx']?>"><img src="<?=$val['main_img']?>" width="160"></a></div>
						<div class="art-info2">
							<h2 class="art-title">
								<a href="/m/news/news_view/<?=$val['idx']?>"><?=$title_txt?></a>
                                <? if($arr_news_setting['etc_char1']=='Y') {?><span class="company"><a href="<?=$val['press_homepage']?>" target="_blank"><?=$val['press_name']?></a></span><?}?>
                                <span class="comment fr"><img src="/img/web/img_comment.png"> <?=$comment_count_txt?></span></h2>
							<p class="n_date"><?=$display_date_txt?></p>
							<p class="art-sum"><a href="/web/m/news_view/<?=$val['idx']?>"><?=$content_txt?></a> </p>
						</div>
					</div>

                <?  }?>
				</div>
				<div class="pagenumber">
					<?=$pagination?>
				</div>

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





        </div>


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



		</div>
	</div>

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

</script>
