<?php
	!defined('DIRCMS_MEMBER') && exit('Access Denied!');
	$action=empty($action)?'main':trim($action);
	switch($action)
	{
		case 'main':
			$membertype=cache_read('cache_membermodel'.$_modelid.'.cache.php',DIRCMS_ROOT.'data/cache_model/');
			$membertype=$membertype['modelname'];
			$notice=$db->fetch_all("SELECT * FROM `".DB_PRE."notice` ORDER BY `".DB_PRE."notice`.`orderby` ASC,`id` DESC LIMIT 0,2");
			include member_tlp('main');
			unset($notice,$membertype);
			break;
		case 'read_notice':
			$val=$db->fetch_one("SELECT * FROM `".DB_PRE."notice` WHERE `".DB_PRE."notice`.`id`=".intval($id));
			if(!$val)showmsg('ÍøÕ¾¹«¸æ²»´æÔÚ!');
			include member_tlp('notice_read');
			unset($val);
			break;
		default:
			showmsg('Bad Request!!!',$DIRCMS['site_url']);
			break;
	}
?>