Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezforum/admin/categorylist.php
Go to the documentation of this file.
1 <?php
3 // $Id: categorylist.php 7371 2001-09-21 11:34:16Z jhe $
4 //
5 // Created on: Created on: <14-Jul-2000 13:41:35 lw>
6 //
7 // This source file is part of Exponential Basic, publishing software.
8 //
9 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
10 //
11 // This program is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program; if not, write to the Free Software
23 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
24 //
25
26 //include( "ezforum/dbsettings.php" );
27
28 // include_once( "classes/INIFile.php" );
29 $ini =& eZINI::instance( 'site.ini' );
30
31 $Language = $ini->variable( "eZForumMain", "Language" );
32
33 // include_once( "classes/eztemplate.php" );
34 // include_once( "ezforum/classes/ezforumcategory.php" );
35
36 require( "kernel/ezuser/admin/admincheck.php" );
37
38 $cat = new eZForumCategory();
39
40 $t = new eZTemplate( "kernel/ezforum/admin/" . $ini->variable( "eZForumMain", "AdminTemplateDir" ),
41 "kernel/ezforum/admin/" . "/intl", $Language, "categorylist.php" );
42 $t->setAllStrings();
43
44 $t->set_file( "category_page", "categorylist.tpl" );
45
46 $t->set_block( "category_page", "category_item_tpl", "category_item" );
47
48 $t->set_var( "site_style", $SiteDesign );
49
50 $category = new eZForumCategory();
51 $categoryList = $category->getAll();
52
53 if ( !$categoryList )
54 {
55 $languageIni = new eZINI( "kernel/ezforum/admin/" . "intl/" . $Language . "/categorylist.php.ini", false );
56 $noitem = $languageIni->variable( "strings", "noitem" );
57
58 $t->set_var( "category_item", $noitem );
59 }
60 else
61 {
62 $i = 0;
63 foreach ( $categoryList as $categoryItem )
64 {
65 if ( ( $i %2 ) == 0 )
66 $t->set_var( "td_class", "bgdark" );
67 else
68 $t->set_var( "td_class", "bglight" );
69
70 $t->set_var( "category_id", $categoryItem->id() );
71 $t->set_var( "category_name", $categoryItem->name() );
72 $t->set_var( "category_description", $categoryItem->description() );
73
74 $t->parse( "category_item", "category_item_tpl", true );
75 $i++;
76 }
77 }
78
79 $t->pparse( "output", "category_page" );
80
81 ?>
$i
$i
Definition: admin/adlist.php:91
eZForumCategory
Definition: ezforumcategory.php:44
eZINI
Reads and writes .ini style configuration files.
eZTemplate
Definition: eztemplate.php:107
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
$category
$category
Definition: ezforum/admin/categorylist.php:50
$t
$t
Definition: ezforum/admin/categorylist.php:40
$Language
$Language
Definition: ezforum/admin/categorylist.php:31
$ini
$ini
Definition: ezforum/admin/categorylist.php:29
$cat
$cat
Definition: ezforum/admin/categorylist.php:38
$categoryList
$categoryList
Definition: ezforum/admin/categorylist.php:51
$languageIni
$languageIni
Definition: pendinglist.php:43
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.