<?php

class singleModel extends Model{
		function __construct(){
			parent:: __construct();
			$this->tabName = TAB_PREFIX."single";
			$this->fieldList=$this->get_fields($this->tabName,'list');

		}
		function chech_form(){
			$result = true;
			if(!Validate::required($_POST['singlename'])){
					$this->messList[] = "单页栏目名称不能为空";
					$result = false;
			}
			if(!Validate::required($_POST['content'])){
					$this->messList[] = "单页内容不能为空";
					$result = false;
			}
			if(!Validate::isNumber($_POST['ordering'])){
					$this->messList[] = "排序必须为数字";
					$result = false;
			}
			return $result;
		}




}
?>
