1 |
<?php |
2 |
/** |
3 |
* Another example of how to build an |
4 |
* XML Document with the WML support |
5 |
* that phpHtmlLib provides. |
6 |
* |
7 |
* |
8 |
* $Id: example6.php,v 1.2 2003/02/27 22:07:57 hemna Exp $ |
9 |
* |
10 |
* @author Walter A. Boring IV <waboring@buildabetterweb.com> |
11 |
* @package phpHtmlLib |
12 |
* @subpackage examples |
13 |
* @version 2.0.0 |
14 |
* |
15 |
*/ |
16 |
|
17 |
/** |
18 |
* Include the phphtmllib libraries |
19 |
*/ |
20 |
include_once("includes.inc"); |
21 |
include_once($phphtmllib."/widgets/wml/WMLDocumentClass.inc"); |
22 |
|
23 |
//build the wml document object. |
24 |
$wmldoc = new WMLDocumentClass; |
25 |
|
26 |
//turn off the rendering of the http Content-type |
27 |
//so we can see the output in a non WAP browser. |
28 |
$wmldoc->show_http_header(FALSE); |
29 |
|
30 |
$card1 = wml_card("Testing", "card1"); |
31 |
$card1->add(wml_do("accept", wml_go("#card2"))); |
32 |
|
33 |
$options = array("Testing1" => "test1", |
34 |
"Testing2" => "test2", |
35 |
"Foo" => "bar"); |
36 |
$card1->add( html_p( form_select("name", $options) ) ); |
37 |
$wmldoc->add( $card1 ); |
38 |
|
39 |
|
40 |
$card2 = wml_card("Foo", "card2"); |
41 |
$card2->add( html_p( "This is card #2!")); |
42 |
$wmldoc->add( $card2 ); |
43 |
|
44 |
//this will render the entire page |
45 |
print $wmldoc->render(); |
46 |
?> |