Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

viewfile.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: viewfile.php 6214 2001-07-19 13:01:02Z jakobn $
5 //
6 // Created on: <04-Jan-2001 16:47:23 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( "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 $ini =& eZINI::instance( 'site.ini' );
35 $Language = $ini->variable( "eZFileManagerMain", "Language" );
36
37
38 $t = new eZTemplate( "kernel/ezfilemanager/user/" . $ini->variable( "eZFileManagerMain", "TemplateDir" ),
39 "kernel/ezfilemanager/user/intl/", $Language, "fileview.php" );
40
41 $t->set_file( "file_view", "fileview.tpl" );
42
43 $t->setAllStrings();
44
45 $t->set_block( "file_view", "value_tpl", "value" );
46 $t->set_block( "file_view", "view_tpl", "view" );
47
48 if ( $FileID != 0 )
49 {
50 $file = new eZVirtualFile();
51
52 $t->set_var( "file_name", $file->name() );
53 $t->set_var( "file_id", $file->id() );
54 $t->set_var( "file_description", $file->description() );
55
56 $read = $file->readPermission();
57
58 if ( $read == "User" )
59 {
60 print( "user" );
61 }
62 else if ( $read == "Group" )
63 {
64 print( "group" );
65 }
66 else if ( $read == "All" )
67 {
68 print( "all" );
69 }
70
71 $t->parse( "view", "view_tpl" );
72 }
73
74
75 $folder = new eZVirtualFolder( $FolderID );
76
77 $folderList =& $folder->getByParent( $folder );
78
79 foreach ( $folderList as $folder )
80 {
81 $t->set_var( "option_name", $folder->name() );
82 $t->set_var( "option_value", $folder->id() );
83
84 $t->set_var( "selected", "" );
85 $t->set_var( "option_level", "" );
86
87 $t->parse( "value", "value_tpl", true );
88 }
89
90 $t->pparse( "output", "file_view" );
91
92 ?>
eZTemplate
Definition: eztemplate.php:107
eZVirtualFile
Definition: ezvirtualfile.php:42
eZVirtualFolder
Definition: ezvirtualfolder.php:43
$file
$file
Definition: ezfilemanager/user/filedownload.php:35
$t
$t
Definition: viewfile.php:38
$Language
$Language
Definition: viewfile.php:35
$ini
$ini
Definition: viewfile.php:34
$folder
if( $FileID !=0) $folder
Definition: viewfile.php:75
$folderList
$folderList
Definition: viewfile.php:77
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.