| 1 | jonen | 1.1 | <?php | 
| 2 |  |  |  | 
| 3 |  |  | /** | 
| 4 |  |  | * This example illustrates the use of the | 
| 5 |  |  | * RoundTitleTable widget. | 
| 6 |  |  | * | 
| 7 |  |  | * | 
| 8 |  |  | * $Id: widget10.php,v 1.1 2003/09/30 00:11:13 hemna Exp $ | 
| 9 |  |  | * | 
| 10 |  |  | * @author Walter A. Boring IV <waboring@buildabetterweb.com> | 
| 11 |  |  | * @package phpHtmlLib | 
| 12 |  |  | * @subpackage widget-examples | 
| 13 |  |  | * @version 2.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 - RoundTable", | 
| 26 |  |  | HTML); | 
| 27 |  |  |  | 
| 28 |  |  | //enable output debugging. | 
| 29 |  |  | if (isset($_GET['debug'])) { | 
| 30 |  |  | $page->set_text_debug( TRUE ); | 
| 31 |  |  | } | 
| 32 |  |  |  | 
| 33 |  |  | //add the css link to the default theme which will | 
| 34 |  |  | //automatically generate the css classes used | 
| 35 |  |  | //by the Navtable widget, as well as the other widgets. | 
| 36 |  |  | $page->add_css_link( "/phphtmllib/css/defaulttheme.php" ); | 
| 37 |  |  | $page->add_css_link( "/css/fonts.css" ); | 
| 38 |  |  |  | 
| 39 |  |  |  | 
| 40 |  |  | //create the RoundTitleTable Object | 
| 41 |  |  | //create the widget with a | 
| 42 |  |  | //title of "Some lame title" | 
| 43 |  |  | //overall width of 300 pixels ( u can use % as well ) | 
| 44 |  |  | $dialog = new DialogWidget("Some title", "300", "center"); | 
| 45 |  |  | //$dialog->add_button(); | 
| 46 |  |  |  | 
| 47 |  |  | $dialog->add("This is a message"); | 
| 48 |  |  |  | 
| 49 |  |  |  | 
| 50 |  |  | $page->add( $dialog ); | 
| 51 |  |  |  | 
| 52 |  |  |  | 
| 53 |  |  | //this will render the entire page | 
| 54 |  |  | //with the content you have added | 
| 55 |  |  | //wrapped inside all the required | 
| 56 |  |  | //elements for a complete HTML/XHTML page. | 
| 57 |  |  | //NOTE: all the objects in phphtmllib have | 
| 58 |  |  | //      the render() method.  So you can call | 
| 59 |  |  | //      render on any phphtmlib object. | 
| 60 |  |  | print $page->render(); | 
| 61 |  |  | ?> |