Location: PHPKode > scripts > OO PHP Library > oo-php-library-1-8a/examples/text.php
<?
include "localconf.php";

$a = new THeader("Sample header");
$a->output();

$a = new TText("some text");
$a->output();
$b = new TBR();
$b->output();
$a->output("other");
$b->output();
$a = new TDateLabel();
$a->output();
$b->output();

?><HR><?

if (!isset($foo))	$foo = '';
if (!isset($foo1))	$foo1 = '';

$r = new TForm($PHP_SELF, "GET");
$r->insert(new TCombo("foo", array(1,2 ,3,5, "erT"=>"uio")));
$r->insert(new TList("foo1", array(1,2 ,"aqwe"=>3,5, "erT"=>"uio"), 5, 0, $foo1));
$r->insert("some text<BR>");
$r->insert(new TSubmitButton());
$r->insert(new TResetButton());
$r->output(array("foo1"=>"$foo1","foo"=>"$foo"));

?><HR><?

$r = new TFormTable($PHP_SELF, "GET", "Title", 0, 500);
$r->insert("asd", new TCombo("foo", array(1,2 ,3,5, "erT"=>"uio")));
$r->insert("asd", new TList("foo1", array(1,2 ,"aqwe"=>3,5, "erT"=>"uio"), 5, 0, $foo1));
$r->insert("asasdasdd", "some text<BR>");
$r->insert("&nbsp;",new TSubmitButton());
$r->insert("&nbsp;",new TResetButton());
$r->output(array("foo1"=>"$foo1","foo"=>"$foo"));

?><HR><?

$t = new TFormRow($PHP_SELF, "GET", 0, 0, 0);
$t->insert(new TCellInput("s_input"));
$t->insert(new TCellInput("r_input", "",  100));
$t->insert("");
$t->insert("");
$t->insert("");
$t->insert(new THiddenField("id", "notset"));
$t->insert(new TCellSubmitButton("Submit"));

$r = new TTable(0, 0, $t, 0);
$r->insert(array(1, 5, 6, 10));
$r->insert(array(2, 5, 6, 10));
$r->insert(array(3, 5, 6, 10));
$r->insert(array(4, 5, 6, 10));
$r->border=2;
$r->output();

?><HR><?

$k = new TFormTable($PHP_SELF, "GET", "sample title");
$k->insert ("input field", new TInput("foo"));
$k->insert ("hidden", new THiddenField("hidden_var", "value"));
$k->insert ("",  new TSubmitButton("Press me!"));
$k->output();
?>
Return current item: OO PHP Library