gusucode.com > 同城苏州黄页系统php源码程序 > lib/class.webPge/idx_commentlist.class.php

    <?
if( !class_exists('field') )
	include_once( $root_path.'lib/field.class.php' );
if( !class_exists('column') )
	include_once( $root_path.'lib/column.class.php' );
if( !class_exists('indexPge') )
	include_once( $root_path.'lib/indexPge.class.php' );

class idx_commentlist extends indexPge
{
	var $name				= 'commentlist';
	var $formName			= 'theform';
	var $dbtable			= 'yp_comment';

	var $primary_key		= 'id';
	var $status_column_name	= 'is_open';
	var $parent_column_name	= 'parent';


	# 构造函数
	function idx_commentlist(){
		# 调用父类的构造函数,初始化 父类中的成员
		$my_parent_name=get_parent_class(__CLASS__);
		$this->$my_parent_name();
	
		# 初始化本网页类的 栏位 和 数据库字段
		$this->init_commentlist();
	
	}
	




	function init_commentlist()
	{
		##############################
		#
		# 初始化 栏位 和 数据库字段
		#

		# 创建 score 栏位 --- ---
		$this -> add_field ('score');
		# 创建 text 栏位 --- ---
		$this -> add_field ('text');
		# 创建 author 栏位 --- ---
		$this -> add_field ('author');
		# 创建 createTime 栏位 --- ---
		$this -> add_field ('createTime');
		# 创建 parent 栏位 --- ---
		$this -> add_field ('parent');


		# 创建 score 字段 --- ---
		$this -> add_column ('score');
		# 创建 text 字段 --- ---
		$this -> add_column ('text');
		# 创建 author 字段 --- ---
		$this -> add_column ('author');
		# 创建 createTime 字段 --- ---
		$this -> add_column ('createTime');
		# 创建 parent 字段 --- ---
		$this -> add_column ('parent');

	}
}
?>