<?php
saxue_includedb();
class saxuearticledata extends saxueobjectdata {
		function saxuearticledata() {
				$this -> initvar( "aid", SAXUE_TYPE_INT, 0, "文章编号", false, 11 );
				$this -> initvar( "preid", SAXUE_TYPE_INT, 0, "上一篇文章ID", false, 11 );
				$this -> initvar( "nextid", SAXUE_TYPE_INT, 0, "下一篇文章ID", false, 11 );
				$this -> initvar( "title", SAXUE_TYPE_TXTBOX, "", "文章标题", false, 100 );
				$this -> initvar( "ftitle", SAXUE_TYPE_TXTBOX, "", "文章副标题", false, 100 );
				$this -> initvar( "style", SAXUE_TYPE_TXTBOX, "", "标题颜色", false, 7 );
				$this -> initvar( "intro", SAXUE_TYPE_TXTBOX, "", "文章简介", false, 200 );
				$this -> initvar( "tags", SAXUE_TYPE_TXTBOX, "", "TAG标签", false, 100 );
				$this -> initvar( "tagids", SAXUE_TYPE_TXTBOX, "", "TAG标签ID", false, 100 );
				$this -> initvar( "uname", SAXUE_TYPE_TXTBOX, "", "会员名", false, 30 );
				$this -> initvar( "author", SAXUE_TYPE_TXTBOX, "", "文章作者", false, 30 );
				$this -> initvar( "copyfrom", SAXUE_TYPE_TXTBOX, "", "文章来源", false, 30 );
				$this -> initvar( "fromurl", SAXUE_TYPE_TXTBOX, "", "文章来源URL", false, 100 );
				$this -> initvar( "url", SAXUE_TYPE_TXTBOX, "", "文章URL", false, 100 );
				$this -> initvar( "surl", SAXUE_TYPE_TXTBOX, "", "图集URL", false, 100 );
				$this -> initvar( "thumb", SAXUE_TYPE_TXTBOX, "", "文章缩略图", false, 100 );
				$this -> initvar( "album", SAXUE_TYPE_TXTAREA, "", "图集图片", false, null );
		} 
} 

class saxuearticledatahandler extends saxueobjecthandler {
		function saxuearticledatahandler( $_db = "" ) {
				$this -> saxueobjecthandler( $_db );
				$this -> basename = "articledata";
				$this -> autoid = "aid";
				$this -> dbname = "article_data_1";
		} 
		function setdatatable( $_tbnum = 1 ) {
				if ( is_numeric( $_tbnum ) && $_tbnum > 0 ) {
						$this -> dbname = "article_data_" . $_tbnum;
				}
		} 
}