Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezform/admin/formlist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: formlist.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 // include_once( "classes/ezlist.php" );
31
32 // include_once( "ezform/classes/ezform.php" );
33
34 $ActionValue = "list";
35 $ini =& eZINI::instance( 'site.ini' );
36
37 $Language = $ini->variable( "eZFormMain", "Language" );
38 $Limit = $ini->variable( "eZFormMain", "AdminFormListLimit" );
39
40 if ( !$Offset )
41 $Offset = 0;
42
43 if( isset( $DeleteSelected ) )
44 {
45 foreach( $formDelete as $deleteMe )
46 {
47 $form = new eZForm( $deleteMe );
48 $form->delete();
49 }
50 eZHTTPTool::header( "Location: /form/form/list" );
51 exit();
52 }
53
54 $t = new eZTemplate( "kernel/ezform/admin/" . $ini->variable( "eZFormMain", "AdminTemplateDir" ),
55 "kernel/ezform/admin/intl/", $Language, "form.php" );
56 $t->setAllStrings();
57
58 $t->set_file( array(
59 "form_list_page_tpl" => "formlist.tpl"
60 ) );
61
62 $t->set_block( "form_list_page_tpl", "no_forms_item_tpl", "no_forms_item" );
63 $t->set_block( "form_list_page_tpl", "form_list_tpl", "form_list" );
64 $t->set_block( "form_list_tpl", "form_item_tpl", "form_item" );
65
66 $t->set_var( "form_item", "" );
67 $t->set_var( "form_list", "" );
68 $t->set_var( "no_forms_item", "" );
69
70 $totalCount =& eZForm::count();
71 $forms =& eZForm::getAll( $Offset, $Limit );
72
73
74 if( count( $forms ) == 0 )
75 {
76 $t->parse( "no_forms_item", "no_forms_item_tpl" );
77 }
78 else
79 {
80 $i = 0;
81 foreach( $forms as $form )
82 {
83 if ( ( $i % 2 ) == 0 )
84 {
85 $t->set_var( "td_class", "bglight" );
86 }
87 else
88 {
89 $t->set_var( "td_class", "bgdark" );
90 }
91
92 $t->set_var( "form_id", $form->id() );
93 $t->set_var( "form_name", $form->name() );
94 $t->set_var( "form_receiver", $form->receiver() );
95 $t->parse( "form_item", "form_item_tpl", true );
96
97 $i++;
98 }
99
100
101 $t->parse( "form_list", "form_list_tpl" );
102 }
103
104 eZList::drawNavigator( $t, $totalCount, $Limit, $Offset, "form_list_page_tpl" );
105
106 $t->set_var( "action_value", $ActionValue );
107 $t->set_var( "site_style", $SiteDesign );
108 $t->pparse( "output", "form_list_page_tpl" );
109
110 ?>
$i
$i
Definition: admin/adlist.php:91
eZForm
Definition: ezform.php:42
eZForm\count
static count()
Definition: ezform.php:243
eZForm\getAll
static & getAll( $offset=0, $limit=20)
Definition: ezform.php:209
eZHTTPTool\header
static header( $string)
Definition: ezhttptool.php:96
eZList\drawNavigator
static drawNavigator(&$t, $total_types, $max_types, $index, $parent=false, $variables=false)
Definition: ezlist.php:401
eZTemplate
Definition: eztemplate.php:107
$Offset
$Offset
Definition: ezarticle/user/search.php:110
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
$t
if(isset( $DeleteSelected)) $t
Definition: ezform/admin/formlist.php:54
$Limit
$Limit
Definition: ezform/admin/formlist.php:38
$ActionValue
$ActionValue
Definition: ezform/admin/formlist.php:34
$Language
$Language
Definition: ezform/admin/formlist.php:37
$forms
$forms
Definition: ezform/admin/formlist.php:71
$ini
$ini
Definition: ezform/admin/formlist.php:35
$totalCount
$totalCount
Definition: ezform/admin/formlist.php:70
exit
exit
Definition: folder.php:81
$form
$form
Definition: formedit.php:46
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.