Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

menufolderlist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: menufolderlist.php 7649 2001-10-04 10:04:54Z ce $
5 //
6 // Created on: <30-Sep-2001 15:43:27 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/ezlog.php" );
30
31 // include_once( "ezfilemanager/classes/ezvirtualfile.php" );
32 // include_once( "ezfilemanager/classes/ezvirtualfolder.php" );
33
34 // include_once( "ezuser/classes/ezuser.php" );
35 // include_once( "ezuser/classes/ezpermission.php" );
36 // include_once( "ezuser/classes/ezobjectpermission.php" );
37
38
39 $ini =& eZINI::instance( 'site.ini' );
40
41 $Language = $ini->variable( "eZFileManagerMain", "Language" );
42 $ImageDir = $ini->variable( "eZFileManagerMain", "ImageDir" );
43
44 $t = new eZTemplate( "kernel/ezfilemanager/user/" . $ini->variable( "eZFileManagerMain", "TemplateDir" ),
45 "kernel/ezfilemanager/user/intl/", $Language, "menufolderlist.php" );
46
47 $t->set_file( "folder_list_page_tpl", "menufolderlist.tpl" );
48
49 $t->setAllStrings();
50
51 $t->set_block( "folder_list_page_tpl", "folder_list_tpl", "folder_list" );
52 $t->set_block( "folder_list_tpl", "folder_tpl", "folder" );
53
54 $folder = new eZVirtualFolder( $FolderID );
55
56 $user =& eZUser::currentUser();
57
58 // Print out the folders.
59 $folderList =& $folder->getByParent( $folder );
60
61 foreach ( $folderList as $folderItem )
62 {
63 if ( eZObjectPermission::hasPermission( $folderItem->id(), "filemanager_folder", "r", $user ) ||
64 eZVirtualFolder::isOwner( $user, $folderItem->id() ) )
65 {
66 $t->set_var( "folder_name", $folderItem->name() );
67 $t->set_var( "folder_id", $folderItem->id() );
68
69 $t->parse( "folder", "folder_tpl", true );
70 }
71 }
72
73 if ( count( $folderList ) > 0 )
74 {
75 $t->parse( "folder_list", "folder_list_tpl" );
76 }
77 else
78 {
79 $t->set_var( "folder_list", "" );
80 }
81
82 $t->pparse( "output", "folder_list_page_tpl" );
83
84 ?>
eZObjectPermission\hasPermission
static hasPermission( $objectID, $moduleTable, $permission, $user=false)
Definition: ezobjectpermission.php:76
eZTemplate
Definition: eztemplate.php:107
eZUser\currentUser
static & currentUser()
Definition: ezuser.php:896
eZVirtualFolder
Definition: ezvirtualfolder.php:43
eZVirtualFolder\isOwner
static isOwner( $user, $folderID)
Definition: ezvirtualfolder.php:421
$ImageDir
$ImageDir
Definition: menufolderlist.php:42
$t
$t
Definition: menufolderlist.php:44
$user
$user
Definition: menufolderlist.php:56
$folder
$folder
Definition: menufolderlist.php:54
$Language
$Language
Definition: menufolderlist.php:41
$ini
$ini
Definition: menufolderlist.php:39
$folderList
$folderList
Definition: menufolderlist.php:59
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.