Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezfilemanager/user/menubox.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: menubox.php 7461 2001-09-25 16:10:50Z fh $
5 //
6 // Created on: <16-Jan-2001 13:23:02 ce>
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( "ezuser/classes/ezpermission.php" );
29 // include_once( "ezuser/classes/ezobjectpermission.php" );
30
31 $ini =& eZINI::instance( 'site.ini' );
32
33 $Language = $ini->variable( "eZFileManagerMain", "Language" );
34
35
36 // include_once( "classes/eztemplate.php" );
37 // include_once( "classes/ezdb.php" );
38 // include_once( "ezuser/classes/ezpermission.php" );
39
40 $t = new eZTemplate( "kernel/ezfilemanager/user/" . $ini->variable( "eZFileManagerMain", "TemplateDir" ),
41 "kernel/ezfilemanager/user/intl", $Language, "menubox.php" );
42
43 $t->setAllStrings();
44
45 $t->set_file( array(
46 "menu_box_tpl" => "menubox.tpl"
47 ) );
48
49 $t->set_block( "menu_box_tpl", "user_login_tpl", "user_login" );
50
51 $user =& eZUser::currentUser();
52
53 if ( $user && ( eZObjectPermission::getObjects( "filemanager_folder", 'w', true ) > 0 ||
54 eZObjectPermission::getObjects( "filemanager_folder", 'u', true ) > 0 ||
55 eZPermission::checkPermission( $user, "eZFileManager", "WriteToRoot" ) ) )
56 {
57 $t->parse( "user_login", "user_login_tpl" );
58 }
59 else
60 {
61 $t->set_var( "user_login", "" );
62 }
63
64 $t->set_var( "sitedesign", $GlobalSiteDesign );
65
66 $t->pparse( "output", "menu_box_tpl" );
67
68 ?>
eZObjectPermission\getObjects
static getObjects( $moduleTable, $permission, $count=false, $user=false)
Definition: ezobjectpermission.php:425
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
$t
Definition: ezfilemanager/user/menubox.php:40
$user
$user
Definition: ezfilemanager/user/menubox.php:51
$Language
$Language
Definition: ezfilemanager/user/menubox.php:33
$ini
$ini
Definition: ezfilemanager/user/menubox.php:31
$GlobalSiteDesign
global $GlobalSiteDesign
Definition: latestmessages.php:52
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.