1. ValueHunt Inc. is not responsible for the consequences of use of this software, no matter how awful, even if they arise from flaws in it.
2. The origin of this software must not be misrepresented, either by explicit claim or by omission. Since few users ever read sources, credits must appear in the documentation. and also the URL http://www.vhconsultants.com
3. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. Since few users ever read sources, credits must appear in the documentation.
4. This notice may not be removed or altered.
include("/path/to/the/class/class.layout");
Or, if you may configure a PHP3 module in Apache's httpd.conf
php3_include_path /path/to/the/class
php3_auto_prepend_file class.layout
php3_magic_quotes_gpc on
php3_track_vars on
A simple example
<?php
setdefault("window",array("bgcolor"=>"white"));
setdefault("table",array("cellpadding"=>"0"));
setdefault("text",array("size"=>"2"));
newhtml(&$w);
insert($w, wheader("A Test Page"))
insert($w,$t = table(array("cols"=>"2","width"=>"650")));
insert($t,$c = cell(array("colspan"=>"2")));
insert($c,text("TEST ONLY"));
printhtml($w);
?>
setdefault("window",array("bgcolor"=>"white"));
setdefault("table",array("cellpadding"=>"0"));
newhtml(&$w);
insert($w, $t = table(array("width"=>"400","cols"=>"2")));
insert($t, $c = cell(array("colspan"=>"2","bgcolor"=>"white")));
insert($c, text("A TEXT CELL",array("color"=>"blue")));
printhtml($w);
$a is an array of attributes for the table and
will overwrite any default value declared in
setdefault("table",array("cellpadding"=>"0"));
This function returns the reference to the object. Table can be nested in any legal containers like cell etc.
insert($c, $t2 = table(array("width"=>"100%")));
$a is an array of attributes. This function
returns the reference to the cell object.
insert($t, $c = cell(array("colspan"=>"2","bgcolor"=>"white")));
$s is the source (location) of the image
file. $a is an array of attributes.
insert($c, image("/title.gif",array("width"=>"10")));
$h is the href, $s is the text
or image object. $a is the optional array of attributes.
insert($c,anchor("http://some.com","Click Here"));
insert($c,anchor("http://some.com",image("/some.gif",
array("width"=>"10"))));
$t as the text and an optional array of
attributes.
insert($c,text("TEST",array("color"=>"red")));
$t is the tag name, $a is
an optional array of attributes.
to insert a horizontal ruler.
insert($c, $g = generic("hr",array("noshade"=>"undef","size"=>"1")));
insert a break
insert($c, $b = generic("br"));
$t is the tag name, $a
is an optional array of attributes.
insert($w, $con = container("div",array("align"=>"center")));
function insert($p,$c)
function defsetting($a)
function newhtml(&$w,$a = "")
function printhtml($w)
function table($a = "")
function cell($a = "")
function image($s,$a,$ni = "")
function anchor($h,$s,$a = "")
function block($t,$ni = "")
function text($t,$a = "")
function form($a = "")
function alist($t,$c,$a = "")
function comment($m)
function generic($t,$a = "")
function container($t,$a = "")
function script($c,$a = "")
function wheader($t)
function heading($l,$c,$a = "" )
function button($a)
function checkbox($a,$t,$c = "")
function inputfile($a)
function hidden($a)
function imagebutton($s,$a)
function password($a)
function radio($a,$t,$c = "")
function freset($a)
function submit($a)
function input_text($a)
function select($o,$a,$s = "")
function textarea($a,$m = "")
function imagemap($a)
function area($a)
function layer($a)
function nolayer($m)
function frameset($a)
function frame($a)
function noframe($m)
function style($m,$a)
function insert($c)