Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

eztrade/admin/typelist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: typelist.php 6233 2001-07-20 11:42:02Z jakobn $
5 //
6 // Created on: <20-Dec-2000 18:18:28 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 // include_once( "classes/INIFile.php" );
28 // include_once( "classes/eztemplate.php" );
29 // include_once( "classes/ezlocale.php" );
30 // include_once( "classes/ezcurrency.php" );
31
32 $ini =& eZINI::instance( 'site.ini' );
33 $Language = $ini->variable( "eZTradeMain", "Language" );
34
35 // include_once( "eztrade/classes/ezproductcategory.php" );
36 // include_once( "eztrade/classes/ezproduct.php" );
37 // include_once( "eztrade/classes/ezproducttype.php" );
38
39 if( isset( $Delete ) )
40 {
41 foreach( $DeleteArrayID as $typeid )
42 {
43 $typed = new eZProductType( $typeid );
44 $typed->delete();
45 }
46 }
47
48 $t = new eZTemplate( "kernel/eztrade/admin/" . $ini->variable( "eZTradeMain", "AdminTemplateDir" ),
49 "kernel/eztrade/admin/intl/", $Language, "typelist.php" );
50
51 $t->setAllStrings();
52
53 $t->set_file( array(
54 "type_list_page_tpl" => "typelist.tpl"
55 ) );
56
57
58 // type
59 $t->set_block( "type_list_page_tpl", "type_list_tpl", "type_list" );
60 $t->set_block( "type_list_tpl", "type_item_tpl", "type_item" );
61
62 $t->set_var( "site_style", $SiteDesign );
63
64 $type = new eZProductType( );
65
66 $typeList = $type->getAll( );
67
68 // categories
69 $i=0;
70 $t->set_var( "type_list", "" );
71 foreach ( $typeList as $typeItem )
72 {
73 $t->set_var( "type_id", $typeItem->id() );
74
75 $t->set_var( "type_name", $typeItem->name() );
76
77
78 if ( ( $i % 2 ) == 0 )
79 {
80 $t->set_var( "td_class", "bglight" );
81 }
82 else
83 {
84 $t->set_var( "td_class", "bgdark" );
85 }
86
87 $t->set_var( "type_description", $typeItem->description() );
88
89 $t->parse( "type_item", "type_item_tpl", true );
90 $i++;
91 }
92
93 if ( count( $typeList ) > 0 )
94 $t->parse( "type_list", "type_list_tpl" );
95 else
96 $t->set_var( "type_list", "" );
97
98
99 $t->pparse( "output", "type_list_page_tpl" );
100
101 ?>
eZProductType
Definition: ezproducttype.php:46
eZTemplate
Definition: eztemplate.php:107
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
$typeList
$typeList
Definition: eztrade/admin/typelist.php:66
$i
$i
Definition: eztrade/admin/typelist.php:69
$Language
$Language
Definition: eztrade/admin/typelist.php:33
$ini
$ini
Definition: eztrade/admin/typelist.php:32
$type
$type
Definition: eztrade/admin/typelist.php:64
$t
if(isset( $Delete)) $t
Definition: eztrade/admin/typelist.php:48
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.