Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezcalendar/admin/typelist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: typelist.php 8841 2001-12-22 18:00:00Z kaid $
5 //
6 // Created on: <20-Dec-2000 18:18:28 gl>
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/ezlocale.php" );
30
31 $ini =& eZINI::instance( 'site.ini' );
32 $Language = $ini->variable( "eZCalendarMain", "Language" );
33
34 // include_once( "ezcalendar/classes/ezappointment.php" );
35 // include_once( "ezcalendar/classes/ezappointmenttype.php" );
36
37 $t = new eZTemplate( "kernel/ezcalendar/admin/" . $ini->variable( "eZCalendarMain", "AdminTemplateDir" ),
38 "kernel/ezcalendar/admin/intl/", $Language, "typelist.php" );
39
40 $t->setAllStrings();
41
42 $t->set_file( "type_list_page_tpl", "typelist.tpl" );
43
44 $t->set_block( "type_list_page_tpl", "type_list_tpl", "type_list" );
45 $t->set_block( "type_list_tpl", "type_item_tpl", "type_item" );
46
47 $t->set_var( "site_style", $SiteDesign );
48
49 $type = new eZAppointmentType();
50 $typeList = $type->getTree();
51
52 $i = 0;
53 foreach ( $typeList as $typeSubList )
54 {
55 $typeItem = $typeSubList[0];
56 $typeLevel = $typeSubList[1];
57 $indent = "";
58
59 while ( $typeLevel > 1 )
60 {
61 $indent = $indent . "&nbsp;&nbsp;&nbsp;";
62 $typeLevel--;
63 }
64
65 $t->set_var( "type_name", $indent . $typeItem->name() );
66 $t->set_var( "type_id", $typeItem->id() );
67 $t->set_var( "type_description", $typeItem->description() );
68
69 if ( ( $i % 2 ) == 0 )
70 $t->set_var( "td_class", "bglight" );
71 else
72 $t->set_var( "td_class", "bgdark" );
73
74 $t->parse( "type_item", "type_item_tpl", true );
75 $i++;
76 }
77
78 if ( count( $typeList ) > 0 )
79 $t->parse( "type_list", "type_list_tpl" );
80 else
81 $t->set_var( "type_list", "" );
82
83
84 $t->pparse( "output", "type_list_page_tpl" );
85
86 ?>
eZAppointmentType
Definition: ezappointmenttype.php:42
eZTemplate
Definition: eztemplate.php:107
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
$t
$t
Definition: ezcalendar/admin/typelist.php:37
$typeList
$typeList
Definition: ezcalendar/admin/typelist.php:50
$i
$i
Definition: ezcalendar/admin/typelist.php:52
$Language
$Language
Definition: ezcalendar/admin/typelist.php:32
$ini
$ini
Definition: ezcalendar/admin/typelist.php:31
$type
$type
Definition: ezcalendar/admin/typelist.php:49
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.