/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/widgets/InfoTable.inc
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/widgets/InfoTable.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jonen, Thu Jan 30 03:29:45 2003 UTC revision 1.2 by jonen, Sat Feb 22 21:08:23 2003 UTC
# Line 1  Line 1 
1  <?php  <?php
   
   
2  /**  /**
3   *   *
4   * $Id$   * $Id$
# Line 20  Line 18 
18   * with a title, column headers and data   * with a title, column headers and data
19   *   *
20   * @author Walter A. Boring IV   * @author Walter A. Boring IV
21     * @package phpHtmlLib
22   */   */
23  class InfoTable extends BaseWidget {  class InfoTable extends BaseWidget {
24    
# Line 98  class InfoTable extends BaseWidget { Line 97  class InfoTable extends BaseWidget {
97                  //now go thru the rows of data                  //now go thru the rows of data
98                  //and add them                  //and add them
99                  foreach( $this->data as $row ) {                  foreach( $this->data as $row ) {
100                          $tr = new TRtag;              if ((count($row) == 1) && is_object($row[0]) && (is_a($row[0], "TRtag") ||
101                          $cnt = count( $row );                                                               is_a($row[0], "TDtag"))) {
102                          foreach( $row as $index => $data ) {                                              $table->add_row( $row[0] );
103                                  $td = $this->_build_td("", "", $index+1, $cnt );              } else {
104                                  $td->add( $data );                  $tr = new TRtag;
105                                  $tr->add( $td );                  $cnt = count( $row );
106                          }                  foreach( $row as $index => $data ) {                
107                          $table->add_row( $tr );                                              $td = $this->_build_td("", "", $index+1, $cnt );
108                        $td->add( $data );
109                        $tr->add( $td );
110                    }
111                    $table->add_row( $tr );
112                }
113                  }                  }
   
114                  return $table->render($indent_level, $output_debug);                  return $table->render($indent_level, $output_debug);
115          }          }
116    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed