Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezgroupeventcalendar/admin/categorylist.php
Go to the documentation of this file.
1 <?
3 //
4 // $Id: categorylist.php,v 1.3 2001/02/19 22:13:10 gl Exp $
5 //
6 // Adam Fallert <FallertA@umsystem.edu>
7 // Created on: <3-Oct-2001 14:36:00>
8 //
9 // Copyright (C) 1999-2000 eZ Systems. All rights reserved.
10 //
11 // This source file is part of Exponential Basic, publishing software.
12 // Copyright (C) 1999-2000 eZ systems as
13 //
14 // This program is free software; you can redistribute it and/or
15 // modify it under the terms of the GNU General Public License
16 // as published by the Free Software Foundation; either version 2
17 // of the License, or (at your option) any later version.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
27 //
28
29 // include_once( "classes/INIFile.php" );
30 // include_once( "classes/eztemplate.php" );
31 // include_once( "classes/ezlocale.php" );
32
33 $ini =& eZINI::instance( 'site.ini' );
34 $Language = $ini->variable( "eZGroupEventCalendarMain", "Language" );
35 /*
36 include_once( "ezgroupeventcalendar/classes/ezgroupevent.php" );
37 include_once( "ezgroupeventcalendar/classes/ezgroupeventcategory.php" );
38 */
39 $t = new eZTemplate( "kernel/ezgroupeventcalendar/admin/" . $ini->variable( "eZGroupEventCalendarMain", "AdminTemplateDir" ),
40 "kernel/ezgroupeventcalendar/admin/intl/", $Language, "categorylist.php" );
41
42 $t->setAllStrings();
43
44 $t->set_file( array(
45 "category_list_page_tpl" => "categorylist.tpl"
46 ) );
47
48
49 $t->set_block( "category_list_page_tpl", "category_list_tpl", "category_list" );
50 $t->set_block( "category_list_tpl", "category_item_tpl", "category_item" );
51
52 $t->set_var( "site_style", $SiteDesign );
53
54 $category = new eZGroupEventCategory();
55 $categoryList = $category->getTree();
56
57 $i=0;
58 foreach ( $categoryList as $categorySubList )
59 {
60 $categoryItem = $categorySubList[0];
61 $categoryLevel = $categorySubList[1];
62 $indent = "";
63
64 while ( $categoryLevel > 1 )
65 {
66 $indent = $indent . "&nbsp;&nbsp;&nbsp;";
67 $categoryLevel--;
68 }
69
70 $t->set_var( "category_name", $indent . $categoryItem->name() );
71 $t->set_var( "category_id", $categoryItem->id() );
72 $t->set_var( "category_description", $categoryItem->description() );
73
74 if ( ( $i % 2 ) == 0 )
75 $t->set_var( "td_class", "bglight" );
76 else
77 $t->set_var( "td_class", "bgdark" );
78
79 $t->parse( "category_item", "category_item_tpl", true );
80 $i++;
81 }
82
83 if ( count( $categoryList ) > 0 )
84 $t->parse( "category_list", "category_list_tpl" );
85 else
86 $t->set_var( "category_list", "" );
87
88
89 $t->pparse( "output", "category_list_page_tpl" );
90
91 ?>
eZGroupEventCategory
Definition: ezgroupeventcategory.php:39
eZTemplate
Definition: eztemplate.php:107
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
$category
$category
Definition: ezgroupeventcalendar/admin/categorylist.php:54
$t
$t
Definition: ezgroupeventcalendar/admin/categorylist.php:39
$i
$i
Definition: ezgroupeventcalendar/admin/categorylist.php:57
$Language
$Language
Definition: ezgroupeventcalendar/admin/categorylist.php:34
$ini
$ini
Definition: ezgroupeventcalendar/admin/categorylist.php:33
$categoryList
$categoryList
Definition: ezgroupeventcalendar/admin/categorylist.php:55
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.