Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezbug/admin/categorylist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: categorylist.php 8504 2001-11-19 09:46:46Z jhe $
5 //
6 // Created on: <23-Oct-2000 17:53:46 bf>
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 /*
28 Viser liste over prioriteringer
29 */
30 // include_once( "classes/INIFile.php" );
31 $ini = eZINI::instance( 'site.ini' );
32 $Language = $ini->variable( "eZBugMain", "Language" );
33 $LanguageIni = new eZINI( "kernel/ezbug/admin/intl/" . $Language . "/categorylist.php.ini", false );
34
35
36 // include_once( "classes/eztemplate.php" );
37
38 // include_once( "ezbug/classes/ezbugcategory.php" );
39
40 $t = new eZTemplate( "kernel/ezbug/admin/" . $ini->variable( "eZBugMain", "AdminTemplateDir" ),
41 "kernel/ezbug/admin/intl", $Language, "categorylist.php" );
42 $t->setAllStrings();
43
44 $t->set_file( array(
45 "category_page" => "categorylist.tpl"
46 ) );
47
48 $t->set_block( "category_page", "category_item_tpl", "category_item" );
49
50 $t->set_var( "site_style", $SiteDesign );
51
52 if( isset( $Ok ) || isset( $AddCategory ) )
53 {
54 $i = 0;
55 if( count( $CategoryID ) > 0 )
56 {
57 foreach( $CategoryID as $itemID )
58 {
59 $category = new eZBugCategory( $itemID );
60 $category->setName( $CategoryName[$i] );
61 $category->store();
62 $i++;
63 }
64 }
65 }
66
67 if( isset( $AddCategory ) )
68 {
69 $newItem = new eZBugCategory();
70 $newName = $LanguageIni->variable( "strings", "newcategory" );
71 $newItem->setName($newName);
72 $newItem->store();
73 }
74
75 if( isset( $DeleteCategories ) )
76 {
77 if( count( $CategoryArrayID ) > 0 )
78 {
79 foreach( $CategoryArrayID as $deleteItemID )
80 {
81 $item = new eZBugCategory( $CategoryID[ $deleteItemID ] );
82 $item->delete();
83 }
84 }
85 }
86
87
88
89 $category = new eZBugCategory();
90 $categoryList = $category->getAll();
91
92 $i=0;
93 foreach( $categoryList as $categoryItem )
94 {
95 if ( ( $i %2 ) == 0 )
96 {
97 $t->set_var( "td_class", "bglight" );
98 }
99 else
100 {
101 $t->set_var( "td_class", "bgdark" );
102 }
103
104 $t->set_var( "category_id", $categoryItem->id() );
105 $t->set_var( "category_name", $categoryItem->name() );
106 $t->set_var( "index_nr", $i );
107
108 $t->parse( "category_item", "category_item_tpl", true );
109 $i++;
110 }
111
112 $t->pparse( "output", "category_page" );
113
114 ?>
$CategoryID
$CategoryID
Definition: admin/articleedit.php:53
eZBugCategory
Definition: ezbugcategory.php:55
eZINI
Reads and writes .ini style configuration files.
eZTemplate
Definition: eztemplate.php:107
$item
$item
Definition: classes/admin/linklist.php:228
$t
$t
Definition: ezbug/admin/categorylist.php:40
$i
$i
Definition: ezbug/admin/categorylist.php:92
$Language
$Language
Definition: ezbug/admin/categorylist.php:32
$ini
$ini
Definition: ezbug/admin/categorylist.php:31
$LanguageIni
$LanguageIni
Definition: ezbug/admin/categorylist.php:33
$category
if(isset( $Ok)||isset( $AddCategory)) if(isset( $AddCategory)) if(isset( $DeleteCategories)) $category
Definition: ezbug/admin/categorylist.php:89
$categoryList
$categoryList
Definition: ezbug/admin/categorylist.php:90
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.