<?php
	class PageModel extends Model{
		public function page($id,$length,$html){
			$list = $this->where("id in ($id)")->select();
			foreach($list as $key=>$value){
				if($html) $list[$key]['content'] = strip_tags($value['content']);
				if($length) $list[$key]['content']=msubstr($value['content'],0,$length,'utf-8',false);
				if(C('ISHTML')) $list[$key]['url'] = C('URL').'/page/'.$value['pagename'];
				else $list[$key]['url'] = C('URL').'/index.php/Index/page/id/'.$value['id'];
			}
			return $list;
		}
	}
?>