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

Annotation of /nfo/php/libs/com.newsblob.phphtmllib/test/test5.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Fri Sep 19 22:49:58 2003 UTC (20 years, 11 months ago) by jonen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +9 -9 lines
+ updated whole phphtmllib to v2.3.0

1 jonen 1.1 <?php
2    
3     include_once("localinc.php");
4    
5     $page = new HTMLPageClass("test #5");
6    
7     $style = new STYLEtag();
8 jonen 1.2 $style->add("
9 jonen 1.1 TD.head {
10     font-family:arial,helvetica,lucida;
11     font-size:11pt;
12     font-weight:bold;
13     background:#6b6b6b;
14     color:#ffffff;
15     }
16     TABLE.frame {
17     background:#000000;
18     font-size:10pt;
19     }
20     TD.head3 {
21     font-family:arial,helvetica,lucida;
22     font-size:10pt;
23     font-weight:bold;
24     background:#6b6b6b;
25     color:#eeeeee
26     }
27     TR.cell1 {
28     background:#ef1ff;
29     font-size:10pt;
30     }\n");
31    
32 jonen 1.2 $page->add_head_content( $style );
33 jonen 1.1
34    
35     $attributes = array("width"=>"300",
36     "border"=>1,
37     "cellspacing"=>0,
38     "cellpadding"=>1);
39     $table = new TABLEtag( $attributes );
40     $tr = new TRtag();
41     $td = new TDtag( array("class"=>"head", "valign"=>"top", "align"=>"center") );
42    
43     //build the content tr
44 jonen 1.2 $td->add("Some lame crap",html_br(), html_br(),"some more crap\n",
45 jonen 1.1 html_br(), html_br(),"even more");
46    
47 jonen 1.2 $table->add_row( $td );
48     $table->add_row( "this is a test", "and another test" );
49     $table->add_row( "this is a test2", "and another test2" );
50 jonen 1.1 $td = new TDtag( array("class" => "head3") );
51 jonen 1.2 $td->add( "help me dude" );
52     $table->add_row( $td, "and another test3" );
53 jonen 1.1 $table->set_cell_attributes( 1, 0, array("width" => "10") );
54    
55 jonen 1.2 $page->add( $table );
56 jonen 1.1
57     print $page->render()
58     ?>

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