1 |
jonen |
1.1 |
<?php |
2 |
|
|
|
3 |
|
|
/** |
4 |
|
|
* This example illustrates the use of the |
5 |
|
|
* RoundTitleTable widget. |
6 |
|
|
* |
7 |
|
|
* |
8 |
|
|
* $Id: widget12.php,v 1.2 2004/02/03 23:46:51 hemna Exp $ |
9 |
|
|
* |
10 |
|
|
* @author Walter A. Boring IV <waboring@buildabetterweb.com> |
11 |
|
|
* @package phpHtmlLib |
12 |
|
|
* @subpackage widget-examples |
13 |
|
|
* @version 2.4.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 MessageBoxWidget("Some title", "300", |
45 |
|
|
"This is a message"); |
46 |
|
|
//$dialog->add_button("test", "index.php"); |
47 |
|
|
|
48 |
|
|
$page->add( $dialog ); |
49 |
|
|
|
50 |
|
|
|
51 |
|
|
//this will render the entire page |
52 |
|
|
//with the content you have added |
53 |
|
|
//wrapped inside all the required |
54 |
|
|
//elements for a complete HTML/XHTML page. |
55 |
|
|
//NOTE: all the objects in phphtmllib have |
56 |
|
|
// the render() method. So you can call |
57 |
|
|
// render on any phphtmlib object. |
58 |
|
|
print $page->render(); |
59 |
|
|
?> |