Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezgroupeventcalendar/user/filelist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: filelist.php,v 1.9 2001/08/30 07:55:56 bf Exp $
5 //
6 // Created on: <21-Dec-2000 17:43:40 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/ezlocale.php" );
30 // include_once( "classes/ezcurrency.php" );
31
32 $ini =& eZINI::instance( 'site.ini' );
33
34 $Language = $ini->variable( "eZGroupEventCalendarMain", "Language" );
35 $SiteStyle = $ini->variable( "site", "SiteStyle" );
36
37 // include_once( "eztrade/classes/ezgroupeventcalendarcategory.php" );
38 //include_once( "kernel/ezgroupeventcalendar/classes/ezgroupevent.php" );
39
40 $t = new eZTemplate( "kernel/ezgroupeventcalendar/user/" . $ini->variable( "eZGroupEventCalendarMain", "AdminTemplateDir" ),
41 "kernel/ezgroupeventcalendar/user/intl/", $Language, "filelist.php" );
42
43 $t->setAllStrings();
44
45 $t->set_file( "file_list_page_tpl", "filelist.tpl" );
46
47 $t->set_block( "file_list_page_tpl", "no_files_tpl", "no_files" );
48 $t->set_block( "file_list_page_tpl", "file_list_tpl", "file_list" );
49 $t->set_block( "file_list_tpl", "file_tpl", "file" );
50
51 $event = new eZGroupEvent( $EventID );
52
53 $session =& eZSession::globalSession();
54 $session->setVariable( "FileListReturnTo", $REQUEST_URI );
55 $session->setVariable( "NameInBrowse", $event->name() );
56
57 if ( isSet ( $AddFiles ) )
58 {
59 if ( count ( $FileArrayID ) > 0 )
60 {
61 foreach( $FileArrayID as $fileID )
62 {
63 $file = new eZVirtualFile( $fileID );
64 if ( $DescriptionArray[$fileID] != $file->description() );
65 $file->setDescription( $DescriptionArray[$fileID] );
66 $file->store();
67 $event->addFile( $file );
68 }
69 }
70 }
71
72 $t->set_var( "event_name", $event->name() );
73
74 $t->set_var( "site_style", $SiteStyle );
75
76 $files =& $event->files();
77 if ( count( $files ) == 0 )
78 {
79 $t->set_var( "file_list", "" );
80 $t->parse( "no_files", "no_files_tpl", true );
81 }
82 else
83 {
84 $t->set_var( "no_files", "" );
85
86 $i=0;
87 $t->set_var( "file", "" );
88 foreach ( $files as $file )
89 {
90 if ( ( $i % 2 ) == 0 )
91 {
92 $t->set_var( "td_class", "bglight" );
93 }
94 else
95 {
96 $t->set_var( "td_class", "bgdark" );
97 }
98
99 $t->set_var( "file_number", $i + 1 );
100 $t->set_var( "file_id", $file->id() );
101 $t->set_var( "file_name", $file->name() );
102 $t->set_var( "file_description", $file->description() );
103
104 $t->parse( "file", "file_tpl", true );
105
106 $i++;
107 }
108
109 $t->parse( "file_list", "file_list_tpl", true );
110 }
111
112
113 $t->set_var( "event_id", $event->id() );
114
115 $t->pparse( "output", "file_list_page_tpl" );
116
117 ?>
eZGroupEvent
Definition: ezgroupevent.php:85
eZSession\globalSession
static & globalSession( $id="", $fetch=true)
Definition: kernel/ezsession/classes/ezsession.php:614
eZTemplate
Definition: eztemplate.php:107
eZVirtualFile
Definition: ezvirtualfile.php:42
$file
$file
Definition: ezfilemanager/user/filedownload.php:35
$t
$t
Definition: ezgroupeventcalendar/user/filelist.php:40
$event
$event
Definition: ezgroupeventcalendar/user/filelist.php:51
$i
$i
Definition: ezgroupeventcalendar/user/filelist.php:86
$Language
$Language
Definition: ezgroupeventcalendar/user/filelist.php:34
$ini
$ini
Definition: ezgroupeventcalendar/user/filelist.php:32
$files
$files
Definition: ezgroupeventcalendar/user/filelist.php:76
$session
$session
Definition: ezgroupeventcalendar/user/filelist.php:53
$SiteStyle
$SiteStyle
Definition: ezgroupeventcalendar/user/filelist.php:35
$REQUEST_URI
$REQUEST_URI
Definition: storestats.php:32
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.