|
Revision 117, 1.8 kB
(checked in by argh, 4 years ago)
|
Massive update of the examples collection; added the patExampleGen examples framework; commented all examples; reworked all the templates...
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
include_once 'patExampleGen/prepend.php'; |
|---|
| 25 |
$exampleGen->displayHead( 'Example' ); |
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
require_once $neededFiles['patForms']; |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
require_once $neededFiles['patErrorManager']; |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
$creator = &patForms::createCreator( 'DB_Mysql' ); |
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
$form =& $creator->create( 'mysql://root:@localhost/pat', 'patForms_Storage' ); |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
$renderer =& patForms::createRenderer( "Array" ); |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
$form->setRenderer( $renderer ); |
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
$form->setAutoValidate( 'save' ); |
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
$elements = $form->renderForm(); |
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 |
if( $form->isSubmitted() ) |
|---|
| 62 |
|
|---|
| 63 |
displayErrors( $form ); |
|---|
| 64 |
} |
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
displayForm( $form, $elements ); |
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 |
$exampleGen->displayFooter(); |
|---|
| 74 |
?> |
|---|