| 1 | <?php | 
| 2 |  | 
| 3 | /** | 
| 4 | * This example illustrates the use of the | 
| 5 | * NavTable widget. | 
| 6 | * | 
| 7 | * | 
| 8 | * $Id: widget101.php,v 1.1 2002/11/26 21:53:19 hemna Exp $ | 
| 9 | * | 
| 10 | * @author Walter A. Boring IV <waboring@buildabetterweb.com> | 
| 11 | * @package phpHtmlLib | 
| 12 | * @subpackage widget-examples | 
| 13 | * @version 2.0 | 
| 14 | * | 
| 15 | */ | 
| 16 |  | 
| 17 | /** | 
| 18 | * Include the phphtmllib libraries | 
| 19 | * | 
| 20 | */ | 
| 21 | include_once("includes.inc"); | 
| 22 |  | 
| 23 |  | 
| 24 | //create the page object | 
| 25 | $page = new HTMLPageClass("phpHtmlLib Widgets - NavTable", | 
| 26 | XHTML_TRANSITIONAL); | 
| 27 |  | 
| 28 | //enable output debugging. | 
| 29 | $page->set_text_debug( $_GET["debug"] ); | 
| 30 |  | 
| 31 | //add the css link to the default theme which will | 
| 32 | //automatically generate the css classes used | 
| 33 | //by the Navtable widget, as well as the other widgets. | 
| 34 | $page->add_css_link( "/phphtmllib/css/darkbluetheme.php" ); | 
| 35 |  | 
| 36 |  | 
| 37 | //create the NavTable Object | 
| 38 | //create the widget with a | 
| 39 | //title of "Some lame title" | 
| 40 | //subtitle of "some subtitle" | 
| 41 | //overall width of 300 pixels ( u can use % as well ) | 
| 42 | $nav = new RoundTitleTable("Some lame title", "some subtitle", "300"); | 
| 43 | $nav->add( "foo", html_br(2), "bar"); | 
| 44 |  | 
| 45 | $page->add( $nav ); | 
| 46 |  | 
| 47 |  | 
| 48 | //this will render the entire page | 
| 49 | //with the content you have added | 
| 50 | //wrapped inside all the required | 
| 51 | //elements for a complete HTML/XHTML page. | 
| 52 | //NOTE: all the objects in phphtmllib have | 
| 53 | //      the render() method.  So you can call | 
| 54 | //      render on any phphtmlib object. | 
| 55 | print $page->render(); | 
| 56 | ?> |