www.gusucode.com > 同城苏州黄页系统php源码程序 > lib/class.webPge/idx_cardlist.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_cardlist extends indexPge { var $name = 'cardlist'; var $formName = ''; var $dbtable = 'yp_card'; var $primary_key = 'id'; var $status_column_name = 'is_open'; var $parent_column_name = ''; # 构造函数 function idx_cardlist(){ # 调用父类的构造函数,初始化 父类中的成员 $my_parent_name=get_parent_class(__CLASS__); $this->$my_parent_name(); # 初始化本网页类的 栏位 和 数据库字段 $this->init_cardlist(); } function init_cardlist() { ############################## # # 初始化 栏位 和 数据库字段 # # 创建 name 栏位 --- --- $this -> add_field ('name'); # 创建 address 栏位 --- --- $this -> add_field ('address'); # 创建 tel 栏位 --- --- $this -> add_field ('tel'); # 创建 price 栏位 --- --- $this -> add_field ('price'); # 创建 titlePic 栏位 --- --- $this -> add_field ('titlePic'); # 创建 ModifyFor 栏位 --- --- $this -> add_field ('ModifyFor'); # 创建 report_tel 栏位 --- --- $this -> add_field ('report_tel'); # 创建 report_addr 栏位 --- --- $this -> add_field ('report_addr'); # 创建 report_content 栏位 --- --- $this -> add_field ('report_content'); # 创建 commend_a 栏位 --- --- $this -> add_field ('commend_a'); # 创建 commend_b 栏位 --- --- $this -> add_field ('commend_b'); # 创建 ViewCnt 栏位 --- --- $this -> add_field ('ViewCnt'); # 创建 CommentCnt 栏位 --- --- $this -> add_field ('CommentCnt'); # 创建 name 字段 --- --- $this -> add_column ('name'); # 创建 address 字段 --- --- $this -> add_column ('address'); # 创建 tel 字段 --- --- $this -> add_column ('tel'); # 创建 price 字段 --- --- $this -> add_column ('price'); # 创建 titlePic 字段 --- --- $this -> add_column ('titlePic'); # 创建 ModifyFor 字段 --- --- $this -> add_column ('ModifyFor'); # 创建 report_tel 字段 --- --- $this -> add_column ('report_tel'); # 创建 report_addr 字段 --- --- $this -> add_column ('report_addr'); # 创建 report_content 字段 --- --- $this -> add_column ('report_content'); # 创建 commend_a 字段 --- --- $this -> add_column ('commend_a'); # 创建 commend_b 字段 --- --- $this -> add_column ('commend_b'); # 创建 ViewCnt 字段 --- --- $this -> add_column ('ViewCnt'); # 创建 CommentCnt 字段 --- --- $this -> add_column ('CommentCnt'); } } ?>