1 |
jonen |
1.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.1 2002/11/09 00:01:38 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 |
|
|
|
22 |
|
|
//build the wml document object. |
23 |
|
|
$wmldoc = new WMLDocumentClass; |
24 |
|
|
|
25 |
|
|
//turn off the rendering of the http Content-type |
26 |
|
|
//so we can see the output in a non WAP browser. |
27 |
|
|
$wmldoc->show_http_header(FALSE); |
28 |
|
|
|
29 |
|
|
$card1 = wml_card("Testing", "card1"); |
30 |
|
|
$card1->add(wml_do("accept", wml_go("#card2"))); |
31 |
|
|
|
32 |
|
|
$options = array("Testing1" => "test1", |
33 |
|
|
"Testing2" => "test2", |
34 |
|
|
"Foo" => "bar"); |
35 |
|
|
$card1->add( html_p( form_select("name", $options) ) ); |
36 |
|
|
$wmldoc->add( $card1 ); |
37 |
|
|
|
38 |
|
|
|
39 |
|
|
$card2 = wml_card("Foo", "card2"); |
40 |
|
|
$card2->add( html_p( "This is card #2!")); |
41 |
|
|
$wmldoc->add( $card2 ); |
42 |
|
|
|
43 |
|
|
//this will render the entire page |
44 |
|
|
print $wmldoc->render(); |
45 |
|
|
?> |