Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezcontact/user/menubox.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: menubox.php 7760 2001-10-10 13:19:26Z 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 // include_once( "ezuser/classes/ezuser.php" );
28 // include_once( "ezuser/classes/ezusergroup.php" );
29 // include_once( "ezuser/classes/ezpermission.php" );
30
31 $user =& eZUser::currentUser();
32 if ( is_a( $user, "eZUser" ) and
33 ( eZPermission::checkPermission( $user, "eZContact", "CompanyList" ) or
34 eZPermission::checkPermission( $user, "eZContact", "PersonList" ) or
35 eZPermission::checkPermission( $user, "eZContact", "Consultation" ) ) )
36 {
37 // include_once( "classes/INIFile.php" );
38
39 $Language = $ini->variable( "eZContactMain", "Language" );
40
41 // include_once( "classes/eztemplate.php" );
42
43 $t = new eZTemplate( "kernel/ezcontact/user/" . $ini->variable( "eZContactMain", "TemplateDir" ),
44 "kernel/ezcontact/user/intl", $Language, "menubox.php" );
45 $t->setAllStrings();
46 $t->set_file( "menu_box_tpl", "menubox.tpl" );
47 $t->set_block( "menu_box_tpl", "company_item_tpl", "company_item" );
48 $t->set_block( "menu_box_tpl", "person_item_tpl", "person_item" );
49 $t->set_block( "menu_box_tpl", "company_new_tpl", "company_new" );
50 $t->set_block( "menu_box_tpl", "person_new_tpl", "person_new" );
51 $t->set_block( "menu_box_tpl", "consultation_item_tpl", "consultation_item" );
52
53 $t->set_var( "company_item", "" );
54 $t->set_var( "person_item", "" );
55 $t->set_var( "company_new", "" );
56 $t->set_var( "person_new", "" );
57 $t->set_var( "consultation_item", "" );
58 if ( eZPermission::checkPermission( $user, "eZContact", "CompanyList" ) )
59 $t->parse( "company_item", "company_item_tpl" );
60 if ( eZPermission::checkPermission( $user, "eZContact", "PersonList" ) )
61 $t->parse( "person_item", "person_item_tpl" );
62 if ( eZPermission::checkPermission( $user, "eZContact", "CompanyAdd" ) )
63 $t->parse( "company_new", "company_new_tpl" );
64 if ( eZPermission::checkPermission( $user, "eZContact", "PersonAdd" ) )
65 $t->parse( "person_new", "person_new_tpl" );
66 if ( eZPermission::checkPermission( $user, "eZContact", "Consultation" ) )
67 $t->parse( "consultation_item", "consultation_item_tpl" );
68
69 $t->set_var( "sitedesign", $GlobalSiteDesign );
70
71 $t->pparse( "output", "menu_box_tpl" );
72 }
73
74 ?>
eZPermission\checkPermission
static checkPermission( $user, $moduleName, $permissionName)
Definition: ezpermission.php:430
eZTemplate
Definition: eztemplate.php:107
eZUser\currentUser
static & currentUser()
Definition: ezuser.php:896
$t
foreach( $Modules as $module) if(isset( $ItemInsert)) $t
Definition: classes/admin/linklist.php:168
$Language
$Language
Definition: classes/admin/linklist.php:65
$ini
$ini
Definition: classes/admin/linklist.php:64
$user
$user
Definition: ezcontact/user/menubox.php:31
$GlobalSiteDesign
global $GlobalSiteDesign
Definition: latestmessages.php:52
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.