<?php
	$w = '1';
	if(!empty($_GET['key']))
		$w = "class_id='{$_GET['key']}' ";
	$order = ' order by id desc';
	$page = new page(DB_PRE.'z_web_news','title,time,id',$w.$order,10,'p');
	$artcle = $page->page_2(10);
	$artcle['0'] = !empty($artcle['0']) ? $artcle['0'] : array();
	$pages = $page -> pages;
    include './sundry/cache/json/config.php';
    $arr = json_decode($json,true);
	$top_title = "新闻动态 - 第{$pages}页 - {$arr['4']}";
?>
<{include ./header.hhc}>
<div class="index_con">
<div class="page_left">
<h2 class="left_title">新闻动态</h2>
<div class="leftbg borl_r">
<ul class="classul">
<?php
	$pdo = get_pdo();
	$res = $pdo -> query('select * from '.DB_PRE."z_web_class where type='1'");
	foreach($res as $v){
?>
<li><a href="web.php?h=index&c=news&key=<{@v['id']}>" title="<{@v['title']}>"><?php echo mb_substr($v['title'],'0','12','utf-8'); ?></a></li>
<?php } ?>
</ul>



</div>
<div class="left_bot"></div>
<div class="magtop10 search">
<p class="searchp01">站内搜索</p>
<form action="web.php" method="get">
<input type="hidden" name="h" value="index">
<input type="hidden" name="c" value="so">
<input name="name" type="text" class="searchinp"/>
<p class="searchp02"><input type="submit" value="" class="searchbon" /></p>
</form>

</div>
<div class="magtop10"><a href="web.php?h=index&c=comment" title="留言反馈"><img src="HHC_TPL_HHC/images/left01.gif"  alt="留言反馈"/></a></div>
<{*<div class="magtop10"><a href="#" title=""><img src="HHC_TPL_HHC/images/left02.gif"  alt="在线加盟"/></a></div>*}>
</div>
<div class="page_right">
<div class="pagetop"><span class="web_navi">当前位置：<a href="web.php">首页</a> &gt;&gt; <a href="web.php?h=index&c=news">新闻动态</a></span><h2>新闻动态</h2></div>
<div class="borl_r">
<ul class="newslist">
<?php 

	foreach($artcle['0'] as $v){
?>
<li><a href="web.php?h=index&c=news_content&k=<{@v['id']}>" title="<{@v['title']}>"><?php echo mb_substr($v['title'],'0','45','utf-8'); ?></a><span><?php echo date('Y-m-d H:i',$v['time']); ?></span></li>
<?php } ?>
</ul>
<div class="epages">
	<?php echo $artcle['1']; ?>
</div>



</div>
<div class="page_bot"></div>

</div>
<div class="clear"></div>
<div class="blank10"></div>
</div>
<{include ./footer.hhc}>