/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/examples/example4.php
ViewVC logotype

Contents of /nfo/php/libs/com.newsblob.phphtmllib/examples/example4.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Thu May 6 16:27:17 2004 UTC (20 years, 2 months ago) by jonen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +0 -0 lines
 updated all to v2.4.1 - Apr 01, 2004

1 <?php
2
3 /**
4 * Another example of how to build a
5 * parent PageWidget object to provide
6 * a base class for building a consistent
7 * look/feel accross a web application.
8 *
9 *
10 * $Id: example4.php,v 1.2 2002/09/26 21:29:06 hemna Exp $
11 *
12 * @author Walter A. Boring IV <waboring@buildabetterweb.com>
13 * @package phpHtmlLib
14 * @subpackage examples
15 * @version 2.0.0
16 *
17 */
18
19 /**
20 * Include the phphtmllib libraries
21 */
22 include_once("includes.inc");
23
24 //use the class we defined from
25 //Example 3.
26 include_once("MyLayoutPage.inc");
27
28 //enable the automatic detection of debugging
29 define("DEBUG", TRUE);
30
31 //define a child class that only changes the
32 //content in the left block
33 class LeftBlockPage extends MyLayoutPage {
34
35 /**
36 * this function returns the contents
37 * of the left block. It is already wrapped
38 * in a TD
39 *
40 * @return HTMLTag object
41 */
42 function left_block() {
43 $div = html_div();
44 $div->set_style("padding-left: 6px;");
45
46 //now add our list of examples
47 $navtable = new VerticalCSSNavTable("LEFT BLOCK", "", "90%");
48
49 $navtable->add("http://www.slashdot.org", "Slashdot",
50 "Go to /. in another window", "_slash");
51 $navtable->add("http://www.freshmeat.net", "Freshmeat",
52 "Go To Freshmeat in another window", "_fm");
53 $navtable->add("http://www.php.net", "PHP.net",
54 "Go To the Source for php", "_php");
55 $navtable->add("http://www.zend.com", "Zend.com",
56 "Go to Zend", "_zend");
57
58 $div->add( $navtable, html_br());
59
60 return $div;
61 }
62 }
63
64
65
66 $page = new LeftBlockPage("phpHtmlLib Example 4 - MyLayoutPage child");
67
68
69 //this will render the entire page
70 print $page->render();
71 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed