Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

mediaview.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: mediaview.php 8187 2001-11-01 17:32:53Z ce $
5 //
6 // Created on: <24-Jul-2001 17:08:10 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
30 // include_once( "ezmediacatalogue/classes/ezmedia.php" );
31
32 // include_once( "ezuser/classes/ezuser.php" );
33 // include_once( "ezuser/classes/ezobjectpermission.php" );
34 // include_once( "classes/ezhttptool.php" );
35
36 $ini =& eZINI::instance( 'site.ini' );
37
38 $Language = $ini->variable( "eZMediaCatalogueMain", "Language" );
39
40 $t = new eZTemplate( "kernel/ezmediacatalogue/admin/" . $ini->variable( "eZMediaCatalogueMain", "TemplateDir" ),
41 "kernel/ezmediacatalogue/admin/intl/", $Language, "mediaview.php" );
42
43 $t->set_file( "media_view_tpl", "mediaview.tpl" );
44
45 $t->setAllStrings();
46
47 $user =& eZUser::currentUser();
48
49 $media = new eZMedia( $MediaID );
50
51 //if ( eZObjectPermission::hasPermission( $media->id(), "mediacatalogue_media", "r", $user ) == false )
52 //{
53 // eZHTTPTool::header( "Location: /error/403/" );
54 // exit();
55 //}
56
57 $t->set_var( "media_uri", $media->mediaPath( false ) );
58 $t->set_var( "media_caption", $media->caption() );
59 $t->set_var( "media_name", $media->name() );
60 $t->set_var( "media_description", $media->description() );
61
62 $attString =& $media->attributeString();
63
64 $t->set_var( "attributes", $attString );
65 $t->set_var( "referer_url", $RefererURL );
66
67 $t->pparse( "output", "media_view_tpl" );
68
69 ?>
eZMedia
Definition: ezmedia.php:65
eZTemplate
Definition: eztemplate.php:107
eZUser\currentUser
static & currentUser()
Definition: ezuser.php:896
$t
$t
Definition: mediaview.php:40
$user
$user
Definition: mediaview.php:47
$media
$media
Definition: mediaview.php:49
$attString
$attString
Definition: mediaview.php:62
$Language
$Language
Definition: mediaview.php:38
$ini
$ini
Definition: mediaview.php:36
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.