Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezfilemanager/admin/unassigned.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: unassigned.php 7496 2001-09-27 07:59:27Z jhe $
5 //
6 // Created on: <10-Dec-2000 16:16:20 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 $ini =& eZINI::instance( 'site.ini' );
39
40 $Language = $ini->variable( "eZFileManagerMain", "Language" );
41
42 $ImageDir = $ini->variable( "eZFileManagerMain", "ImageDir" );
43
44
45 $t = new eZTemplate( "kernel/ezfilemanager/admin/" . $ini->variable( "eZFileManagerMain", "AdminTemplateDir" ),
46 "kernel/ezfilemanager/admin/intl/", $Language, "unassigned.php" );
47
48 $t->set_file( "unassigned_page_tpl", "unassigned.tpl" );
49
50 $t->setAllStrings();
51
52 $t->set_block( "unassigned_page_tpl", "current_folder_tpl", "current_folder" );
53 $t->set_block( "unassigned_page_tpl", "value_tpl", "value" );
54
55 $t->set_block( "unassigned_page_tpl", "file_list_tpl", "file_list" );
56 $t->set_block( "file_list_tpl", "file_tpl", "file" );
57 $t->set_var( "read", "" );
58
59 if ( isset( $Update ) )
60 {
61 for ( $i = 0; $i < count( $FileArrayID ); $i++ )
62 {
63 if ( ( $FolderArrayID[$i] != "-1" ) && ( is_numeric( $FolderArrayID[$i] ) ) )
64 {
65 $file = new eZVirtualFile( $FileArrayID[$i] );
66 $folder = new eZVirtualFolder( $FolderArrayID[$i] );
67 $folder->addFile( $file );
68 }
69 }
70 }
71
72 // Print out the files.
73 $fileList =& eZVirtualFile::getUnAssigned();
74 // $fileCount =& eZFileManager::countUnAssigned();
75 if ( !is_null( $fileList ) && count( $fileList ) > 0 )
76 {
77 foreach ( $fileList as $file )
78 {
79 $t->set_var( "file_id", $file->id() );
80 $t->set_var( "original_file_name", $file->originalFileName() );
81 $t->set_var( "file_name", $file->name() );
82 $t->set_var( "file_url", $file->name() );
83 $t->set_var( "file_description", $file->description() );
84
85 $filePath = $file->filePath( true );
86
87 $size = $file->siFileSize();
88 $t->set_var( "file_size", $size["size-string"] );
89 $t->set_var( "file_unit", $size["unit"] );
90
91 $t->set_var( "file_read", "" );
92 $t->set_var( "file_write", "" );
93 ( $i % 2 ) ? $t->set_var( "td_class", "bgdark" ) : $t->set_var( "td_class", "bglight" );
94
95 $t->parse( "file", "file_tpl", true );
96 $i++;
97 }
98 $t->parse( "file_list", "file_list_tpl" );
99 }
100 else
101 $t->set_var( "file_list", "" );
102
103 $folder = new eZVirtualFolder() ;
104 $folderList =& $folder->getTree( );
105
106 // Make a folder list
107 foreach ( $folderList as $folderItem )
108 {
109 if ( eZObjectPermission::hasPermission( $folderItem[0]->id(), "imagecatalogue_category", 'w' )
110 || eZImageCategory::isOwner( eZUser::currentUser(), $folderItem[0]->id() ) )
111 {
112 $t->set_var( "option_name", $folderItem[0]->name() );
113 $t->set_var( "option_value", $folderItem[0]->id() );
114
115 if ( $folderItem[1] > 0 )
116 $t->set_var( "option_level", str_repeat( "&nbsp;", $folderItem[1] ) );
117 else
118 $t->set_var( "option_level", "" );
119
120 $t->parse( "value", "value_tpl", true );
121 }
122 }
123
124 $t->set_var( "image_dir", $ImageDir );
125
126 $t->pparse( "output", "unassigned_page_tpl" );
127
128 ?>
$i
$i
Definition: admin/adlist.php:91
eZImageCategory\isOwner
static isOwner( $user, $imageCategory=false)
Definition: ezimagecategory.php:480
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
eZVirtualFile
Definition: ezvirtualfile.php:42
eZVirtualFolder
Definition: ezvirtualfolder.php:43
$ImageDir
$ImageDir
Definition: ezfilemanager/admin/unassigned.php:42
$t
$t
Definition: ezfilemanager/admin/unassigned.php:45
$folder
$folder
Definition: ezfilemanager/admin/unassigned.php:103
$fileList
if(isset( $Update)) $fileList
Definition: ezfilemanager/admin/unassigned.php:73
$Language
$Language
Definition: ezfilemanager/admin/unassigned.php:40
$ini
$ini
Definition: ezfilemanager/admin/unassigned.php:38
$folderList
$folderList
Definition: ezfilemanager/admin/unassigned.php:104
$size
if($file_debug) $size
Definition: ezfilemanager/user/filedownload.php:165
$file
$file
Definition: ezfilemanager/user/filedownload.php:35
$filePath
$filePath
Definition: ezfilemanager/user/filedownload.php:50
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.