Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

eztrade/user/menubox.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: menubox.php 6363 2001-08-02 13:09:42Z jhe $
5 //
6 // Created on: <18-April-2001 13:00:00 th>
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
29 $ini =& eZINI::instance( 'site.ini' );
30 $Language = $ini->variable( "eZTradeMain", "Language" );
31 $CategoryListProductImages = $ini->variable( "eZTradeMain", "CategoryListProductImages" ) == "enabled" ? true : false;
32
33 // include_once( "classes/eztemplate.php" );
34 // include_once( "classes/ezdb.php" );
35 // include_once( "ezuser/classes/ezobjectpermission.php" );
36
37 $t = new eZTemplate( "kernel/eztrade/user/" . $ini->variable( "eZTradeMain", "TemplateDir" ),
38 "kernel/eztrade/user/intl", $Language, "menubox.php" );
39
40 $t->setAllStrings();
41
42 $t->set_file( "category_list_page_tpl", "menubox.tpl" );
43 $t->set_block( "category_list_page_tpl", "category_tpl", "category" );
44 $t->set_block( "category_list_page_tpl", "category_list_tpl", "category_list" );
45
46 $t->set_block( "category_list_tpl",'category_image_hot_deals_tpl', "category_image_hot_deals" );
47 $t->set_block( "category_list_tpl", "category_image_list_tpl", "category_image_list" );
48 $t->set_block( "category_image_list_tpl", "category_image_tpl", "category_image" );
49
50 $t->set_var( "sitedesign", $GlobalSiteDesign );
51
52 $category = new eZProductCategory( );
53 $category->get( $CategoryID );
54
55 $categoryList = $category->getByParent( $category );
56
57 if ( $CategoryListProductImages == true && count( $categoryList ) > 0 )
58 {
59 foreach ( $categoryList as $category )
60 {
61 $t_category_name = $category->id().".gif";
62 $t->set_var( "category_id", $category->id() );
63 $t->set_var( "category_image_name", $t_category_name );
64
65 if ( $CategoryListProductImages == true ) {
66 $t->parse( "category_image_hot_deals", "category_image_hot_deals_tpl", true);
67 $t->parse( "category_image_list", "category_image_list_tpl", true);
68 $t->parse( "category_image", "category_image_tpl", true);
69
70 $t->set_var( "category", "");
71 $t->set_var( "category_hot_deals","");
72 }
73 else
74 {
75 $t->set_var( "category_image_list", "");
76 $t->set_var( "category_image_hot_deals", "");
77 }
78 }
79
80 $t->parse( "category_image_list", "category_image_list_tpl", true);
81 }
82 else
83 {
84 $t->parse( "category_image_hot_deals", "category_image_hot_deals_tpl", true);
85 $t->set_var( "category_image", "");
86 $t->set_var( "category_image_list", "");
87 $t->set_var( "category", "");
88 }
89
90 foreach ( $categoryList as $category )
91 {
92 $t->set_var( "id", $category->id() );
93 $t->set_var( "name", $category->name() );
94 $t->parse( "category", "category_tpl", true );
95 }
96 //$t->set_var( "category", "" );
97
98 $t->pparse( "output", "category_list_tpl" );
99
100 ?>
$CategoryID
$CategoryID
Definition: admin/articleedit.php:53
eZProductCategory
Definition: ezproductcategory.php:90
eZTemplate
Definition: eztemplate.php:107
$category
$category
Definition: eztrade/user/menubox.php:52
$t
$t
Definition: eztrade/user/menubox.php:37
$Language
$Language
Definition: eztrade/user/menubox.php:30
$ini
$ini
Definition: eztrade/user/menubox.php:29
$categoryList
$categoryList
Definition: eztrade/user/menubox.php:55
$CategoryListProductImages
$CategoryListProductImages
Definition: eztrade/user/menubox.php:31
$GlobalSiteDesign
global $GlobalSiteDesign
Definition: latestmessages.php:52
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.