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

Annotation of /nfo/php/libs/com.newsblob.phphtmllib/examples/wizard1.php

Parent Directory Parent Directory | Revision Log Revision Log


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

1 jonen 1.1 <?php
2    
3     /**
4     * This example illustrates the basics of the
5     * FormProcessing engine for phphtmllib.
6     *
7     *
8 jonen 1.2 * $Id: wizard1.php,v 1.3 2003/08/15 23:43:01 hemna Exp $
9 jonen 1.1 *
10     * @author Walter A. Boring IV <waboring@buildabetterweb.com>
11     * @package phpHtmlLib
12     * @subpackage form-examples
13     * @version 2.2.0
14     *
15     */
16    
17     /**
18     * Include the phphtmllib libraries
19     *
20     */
21     include("includes.inc");
22    
23     /**
24     * Include the Form Processing objects
25     *
26     */
27     include_once($phphtmllib."/form/includes.inc");
28     include_once($phphtmllib."/form/FormWizard.inc");
29    
30     include_once("_steps.inc");
31    
32 jonen 1.2 function debug( $var ) {
33 jonen 1.1 echo "<xmp>\n";
34     var_dump( $var );
35     echo "</xmp>\n";
36     }
37    
38    
39     //use the class we defined from
40     //Example 3.
41     include_once("MyLayoutPage.inc");
42    
43     //session_start();
44    
45     /**
46     * A simple Page Layout object child.
47     * this came from Example 3.
48     *
49     * @author Walter A. Boring IV <waboring@buildabetterweb.com>
50     * @package phpHtmlLib
51     * @subpackage form-examples
52     */
53     class Form1Page extends MyLayoutPage {
54    
55     function content_block() {
56     //build the FormProcessor, and add the
57     //Form content object that the FormProcessor
58     //will use. Make the width of the form 600
59     return new MyWizard();
60     }
61     }
62    
63     class MyWizard extends FormWizard {
64     function user_setup() {
65     $this->add_step( "Hemna", "This is a long description of ".
66     "what the user should do. Like do this step ".
67     "you loser! Just fill out the form asswhipe!",
68     "", new Step1("Hemna", "", 600) );
69     $this->add_step( "Dude", "This is some dude step", "",
70     new Step2("Dude", "", 600) );
71     $this->add_step( "Settings", "Use this step to configure your settings.", "",
72     new Step3("My Settings", "", 600) );
73     }
74     }
75    
76    
77    
78     $page = new Form1Page("Form Example 1");
79     print $page->render();
80    
81    
82     ?>

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