/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/test/test2.php
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/test/test2.php

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

revision 1.1 by jonen, Thu Jan 30 03:29:41 2003 UTC revision 1.2 by jonen, Fri Sep 19 22:49:58 2003 UTC
# Line 5  include_once("localinc.php"); Line 5  include_once("localinc.php");
5  $page = new HTMLPageClass("Test script #2");  $page = new HTMLPageClass("Test script #2");
6    
7  $style = new STYLEtag();  $style = new STYLEtag();
8  $style->push( "  $style->add( "
9  TABLE.frame {  TABLE.frame {
10      background:#000000;      background:#000000;
11      font-size:10pt;      font-size:10pt;
# Line 31  TR.cell1 { Line 31  TR.cell1 {
31    
32  //Add the raw style tag and content  //Add the raw style tag and content
33  //to the <head> of the page.  //to the <head> of the page.
34  $page->push_head_content( $style );  $page->add_head_content( $style );
35    
36    
37    
# Line 51  $title_table = new TABLEtag( array("widt Line 51  $title_table = new TABLEtag( array("widt
51                                  "cellspacing"=>0,                                  "cellspacing"=>0,
52                                  "cellpadding"=>2,                                  "cellpadding"=>2,
53                                  "class"=>"frame") );                                  "class"=>"frame") );
54  $td->push( "Some Title Here" );  $td->add( "Some Title Here" );
55  $title_table->push_row( $td );  $title_table->add_row( $td );
56    
57    
58  $td2->set_tag_attributes( array("valign"=>"top", "class"=>"head") );  $td2->set_tag_attributes( array("valign"=>"top", "class"=>"head") );
59  $td2->push( $title_table );  $td2->add( $title_table );
60  $table->push_row( $td2 );  $table->add_row( $td2 );
61    
62  $content_table = new TABLEtag;  $content_table = new TABLEtag;
63  $content_table->set_tag_attributes( array("width"=>"100%", "border"=>0,  $content_table->set_tag_attributes( array("width"=>"100%", "border"=>0,
# Line 66  $content_table->set_tag_attributes( arra Line 66  $content_table->set_tag_attributes( arra
66  $tr->set_tag_attributes( array("class" => "cell1") );  $tr->set_tag_attributes( array("class" => "cell1") );
67    
68  //set all of the td's that get created in  //set all of the td's that get created in
69  //tr's push function to have attributes of  //tr's add function to have attributes of
70  //allign=center  //allign=center
71  $tr->set_default_td_attributes(array("align"=>"center"));  $tr->set_default_td_attributes(array("align"=>"center"));
72    
73  $center = new Ptag();  $center = new Ptag();
74    
75  $str = "some example string";  $str = "some example string";
76  $center->push( $str, html_br(), html_br() );  $center->add( $str, html_br(), html_br() );
77  $center->push( $str, html_br(), html_br() );  $center->add( $str, html_br(), html_br() );
78  $center->push( $str );  $center->add( $str );
79  $tr->push( $center );  $tr->add( $center );
80    
81  $tr->push( html_p( "Some lame stuff", html_br(), html_br(),  $tr->add( html_p( "Some lame stuff", html_br(), html_br(),
82                          "some more stuff", html_br(), html_br(),                          "some more stuff", html_br(), html_br(),
83                          "and even more") );                          "and even more") );
84    
85  $content_table->push_row( $tr );  $content_table->add_row( $tr );
86    
87  $td2 = new TDtag( array( "class" => "head2") );  $td2 = new TDtag( array( "class" => "head2") );
88    
89  $td2->push( $content_table );  $td2->add( $content_table );
90    
91  $table->push_row( $td2 );  $table->add_row( $td2 );
92    
93  $page->push( $table );  $page->add( $table );
94    
95  print $page->render();  print $page->render();
96  ?>  ?>

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