#native_company# #native_desc#
#native_cta#

PHP Layout Class Page 6

By Robbin Zhang
on July 30, 2000

line 10: aruler();
line 11: insert($c2,text("<B>Annouce the PHP Layout Class</B>"));
line 12: aruler();
line 13: include("/apache/htdocs/template2.inc");
Line 13 here is the last part of the page, which is also same
across the whole site. From the samples above, you can see how
easy it is to create a uniform look and feel across the whole site.
Now we can dissect template1.inc in detail for getting
further with class.layout.
line 1: setdefault("window",array("bgcolor"=>"white"));
line 2: setdefault("table",array("cellpadding"=>"0"));
line 3: setdefault("image",array("border"=>"0"));
line 4: $width = 650; $fircl = 150; $seccl = $width - $fircl;
line 5: newhtml(&$w);
line 6: insert($w,$h = wheader("VH Consultants"));
line 7: insert($w,$d = container("div",array("align"=>"left")));
line 8: insert($d,$t = table(array("width" => $width )));
line 9: insert($t,$c = cell());
line10: insert($c,image("/header.gif",array("width"=>$width,
			"height"=>"60")));
line11: insert($t,$c = cell(array("align"=>"right")));
line12: insert($c,anchor("/index.htm",
		image("/title/2/16/home.gif",array())));
line13: insert($d,$t = table(array("width" => $width )));
line14: insert($t,$c = cell(array("align"=>"center")));
line15: insert($c,$t1= table(array("width"=>"100%","cols"=>"2")));
line16: insert($t1,$c1 = cell(array("width"=>$fircl,
		"bgcolor"=>"#B1A0CA","valign"=>"top")));
line17: insert($c1,$t2 = table(array("width"=>"100%","cellspacing"=>"2",
		"cellpadding" =>"3")));
line18: insert($t2,$c2 = cell(array("align"=>"left","bgcolor"=>"#B1A0CA")));
line19: insert($c2,image("/title/2/20/projects.gif",array()));
line20: insert($t2,$c2 = cell(array("align"=>"left","bgcolor"=>"#FFFFFF")));
line21: insert($c2,$f2 = container("font",array("face" =>
		"verdana,arial,helvetica","size" => "2")));
line22: insert($f2,anchor("/layout.htm","PHP Layout class<BR>"));
line23: insert($f2,anchor("/graph.htm","PHP Graph class<BR>"));
line24: insert($f2,anchor("/forum.htm","PHP Forum class<BR>"));
line25: insert($f2,anchor("/pdf.htm","PHP PDF class<BR>"));

line26: insert($t1,$c1= cell(array("width"=>$seccl,"valign"=>"top")));
line27: insert($c1,$t2= table(array("width"=>"100%","cellpadding"=>"15")));
line28: insert($t2,$c2= cell(array("align"=>"left")));

1
|
2
|
3
|
4
|
5
|
6
|
7