* @date 2011-3-28 * @version 0.1 */ class basic_info{ public $columns; //Number of Column public $rows; //Number of rows public $content; //Content to display,2-D /* Array with items<$itemNum; If need add No at 0, use function: array_unshift*/ public $titles; /* Main title of Basic Information as: lot information */ public $main_title; public $num_flag; //Is first column is No? Set 1 if yes. public $aligns; //Align method for each column; public $width; public $display; //Get Formated Display of Content function get_Content_Display(){ global $tableTop,$interval; if($this->content[0]==NULL) { $this->display="

Query result is null

"; return; } /* Get number of rows if not defined */ if($this->rows == NULL) $this->rows=count($this->content[0]); $this->display="\n"; /* Main title display */ if(strlen($this->main_title)>0) { $this->display.="\n"; } /* Get Row number of HTML */ $html_row=ceil(count($this->content[0])/2); //display data for($i=0;$i<$html_row;$i++){ $j=$i+1; $this->display.="\n"; $this->display.="\n"; $this->display.="\n"; $this->display.="\n"; $this->display.="\n"; } $this->display.="

"; $this->display.=$this->main_title; $this->display.="

\n"; $this->display.=$this->content[0][2*$i]; $this->display.="\n"; $this->display.=$this->content[1][2*$i]; $this->display.=" \n"; $this->display.=$this->content[0][2*$i+1]; $this->display.="\n"; $this->display.=$this->content[1][2*$i+1]; $this->display.="
"; } function display(){ echo $this->display; } } ?>