<?php
$noticeclass_list = $db->index('noticeclass_id')->pe_selectall('noticeclass');
switch($act) {
	case 'list':
		$_g_class && $sqlwhere['noticeclass_id'] = intval($_g_class);
		$sqlwhere['order by'] = '`notice_id` desc';
		$info_list = $db->pe_selectall('notice', $sqlwhere, '*', array(20, $_g_page));
		
		$seo = pe_seo('联盟公告');
		include(pe_tpl('cps_notice_list.html'));
	break;
	case 'production':
		$_g_class && $sqlwhere['noticeclass_id'] = 4;
		$sqlwhere['order by'] = '`notice_id` desc';
		//$info_list = $db->pe_selectall('notice', $sqlwhere, '*', array(20, $_g_page));
		$info_list = $db->pe_selectall('notice', $sqlwhere, '*', array(20, $_g_page));
		$seo = pe_seo('产品公告');
		include(pe_tpl('cps_production_list.html'));
	break;
	case 'about':
		$_g_class && $sqlwhere['noticeclass_id'] = 5;
		$sqlwhere['order by'] = '`notice_id` desc';
		//$info_list = $db->pe_selectall('notice', $sqlwhere, '*', array(20, $_g_page));
		$info_list =$db->pe_selectall('notice',$sqlwhere, '*', array(20, $_g_page));
		$seo = pe_seo('活动推荐');
		include(pe_tpl('cps_about_list.html'));
	break;
	default:
		$_g_class && $sqlwhere['noticeclass_id'] = intval($_g_class);
		$info = $db->pe_select('notice', array('notice_id'=>intval($act)));
		
		$seo = pe_seo($info['notice_name']);
		include(pe_tpl('cps_notice_view.html'));
	break;
}
?>