Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

admin/formview.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: formview.php 6216 2001-07-19 13:03:50Z jakobn $
5 //
6 // Created on: <12-Jun-2001 13:07:24 pkej>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27 // include_once( "classes/INIFile.php" );
28 // include_once( "classes/eztemplate.php" );
29 // include_once( "classes/ezhttptool.php" );
30
31 // include_once( "ezform/classes/ezform.php" );
32 // include_once( "ezform/classes/ezformelement.php" );
33 // include_once( "ezform/classes/ezformelementtype.php" );
34 // include_once( "ezform/classes/ezformrenderer.php" );
35 // include_once( "ezmail/classes/ezmail.php" );
36
37
38 $ini =& eZINI::instance( 'site.ini' );
39
40 if( isset( $Cancel ) )
41 {
42 if( !empty( $redirectTo ) )
43 {
44 eZHTTPTool::header( "Location: $redirectTo" );
45 }
46 else
47 {
48 eZHTTPTool::header( "Location: /" );
49 }
50 exit();
51 }
52
53
54
55 $ActionValue="process";
56
57 $form = new eZForm( $FormID );
58
59 $errorMessages = array();
60
61 $Language = $ini->variable( "eZFormMain", "Language" );
62
63 $t = new eZTemplate( "kernel/ezform/admin/" . $ini->variable( "eZFormMain", "AdminTemplateDir" ),
64 "kernel/ezform/admin/intl/", $Language, "form.php" );
65
66 $t->setAllStrings();
67
68 $t->set_file( array(
69 "form_view_page_tpl" => "formview.tpl"
70 ) );
71
72 $t->set_block( "form_view_page_tpl", "mail_preview_tpl", "mail_preview" );
73
74 $t->set_var( "error", "" );
75 $t->set_var( "form", "" );
76
77 $t->set_var( "form_id", $FormID );
78 $t->set_var( "form_name", $form->name() );
79 $t->set_var( "form_completed_page", $form->completedPage() );
80 $t->set_var( "form_instruction_page", $form->instructionPage() );
81
82 $renderer = new eZFormRenderer( $form );
83 $output =& $renderer->renderForm( $form );
84 $t->set_var( "form", $output );
85
86 if( isset( $OK ) )
87 {
88 $output =& $renderer->verifyForm();
89 if( $output == "" )
90 {
91 $renderer->sendForm();
92 }
93 else
94 {
95 $t->set_var( "error", $output );
96 }
97 }
98
99 $t->pparse( "output", "form_view_page_tpl" );
100
101 ?>
$form
$form
Definition: admin/formview.php:57
$t
$t
Definition: admin/formview.php:63
$output
$output
Definition: admin/formview.php:83
$Language
$Language
Definition: admin/formview.php:61
$renderer
$renderer
Definition: admin/formview.php:82
$ini
$ini
Definition: admin/formview.php:38
$ActionValue
if(isset( $Cancel)) $ActionValue
Definition: admin/formview.php:55
$errorMessages
$errorMessages
Definition: admin/formview.php:59
eZFormRenderer
Definition: ezformrenderer.php:50
eZForm
Definition: ezform.php:42
eZHTTPTool\header
static header( $string)
Definition: ezhttptool.php:96
eZTemplate
Definition: eztemplate.php:107
exit
exit
Definition: folder.php:81
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.