Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

admin/imageview.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: imageview.php 7670 2001-10-05 09:50:30Z br $
5 //
6 // Created on: <26-Oct-2000 19:40:18 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
30 // include_once( "ezimagecatalogue/classes/ezimage.php" );
31 // include_once( "ezimagecatalogue/classes/ezimagevariation.php" );
32
33 // include_once( "ezuser/classes/ezuser.php" );
34 // include_once( "ezuser/classes/ezobjectpermission.php" );
35 // include_once( "classes/ezhttptool.php" );
36
37 $ini =& eZINI::instance( 'site.ini' );
38
39 $Language = $ini->variable( "eZImageCatalogueMain", "Language" );
40
41 $ShowOriginal = $ini->variable( "eZImageCatalogueMain", "ShowOriginal" );
42
43
44 $t = new eZTemplate( "kernel/ezimagecatalogue/admin/" . $ini->variable( "eZImageCatalogueMain", "AdminTemplateDir" ),
45 "kernel/ezimagecatalogue/admin/intl/", $Language, "imageview.php" );
46
47 $t->set_file( "image_view_tpl", "imageview.tpl" );
48 $t->set_block( "image_view_tpl", "path_tpl", "path" );
49
50 $t->setAllStrings();
51
52 $user =& eZUser::currentUser();
53
54 $image = new eZImage( $ImageID );
55
56 $parent_category = $image->categories();
57
58 //if ( eZObjectPermission::hasPermission( $image->id(), "imagecatalogue_image", "r", $user ) == false )
59 //{
60 // eZHTTPTool::header( "Location: /error/403/" );
61 // exit();
62 //}
63
64 if ( $ShowOriginal != "enabled" && !isset( $VariationID ) )
65 {
66 $variation =& $image->requestImageVariation( $ini->variable( "eZImageCatalogueMain", "ImageViewWidth" ),
67 $ini->variable( "eZImageCatalogueMain", "ImageViewHeight" ) );
68 }
69 else if ( isset( $VariationID ) )
70 {
71 $variation = new eZImageVariation( $VariationID );
72 if ( $variation->imageID() != $ImageID )
73 {
74
75 $variation =& $image->requestImageVariation( $ini->variable( "eZImageCatalogueMain", "ImageViewWidth" ),
76 $ini->variable( "eZImageCatalogueMain", "ImageViewHeight" ) );
77 }
78 }
79
80 $t->set_var( "path", "" );
81 $category = $image->categoryDefinition();
82 if ( $category != -1 )
83 {
84 $pathArray =& $category->path();
85 foreach ( $pathArray as $path )
86 {
87 $t->set_var( "category_id", $path[0] );
88 $t->set_var( "category_name", $path[1] );
89 $t->parse( "path", "path_tpl", true );
90 }
91 }
92
93 $t->set_var( "image_uri", "/" . $variation->imagePath() );
94 $t->set_var( "image_width", $variation->width() );
95 $t->set_var( "image_height", $variation->height() );
96 $t->set_var( "image_caption", $image->caption() );
97 $t->set_var( "image_name", $image->name() );
98 $t->set_var( "image_description", $image->description() );
99
100 $t->set_var( "referer_url", $RefererURL );
101
102 $t->pparse( "output", "image_view_tpl" );
103
104 ?>
$pathArray
$pathArray
Definition: admin/adlist.php:74
$category
$category
Definition: admin/imageview.php:81
$t
$t
Definition: admin/imageview.php:44
$user
$user
Definition: admin/imageview.php:52
$parent_category
$parent_category
Definition: admin/imageview.php:56
$ShowOriginal
$ShowOriginal
Definition: admin/imageview.php:41
$Language
$Language
Definition: admin/imageview.php:39
$ini
$ini
Definition: admin/imageview.php:37
$image
$image
Definition: admin/imageview.php:54
eZImageVariation
Definition: ezimagevariation.php:41
eZImage
Definition: ezimage.php:95
eZTemplate
Definition: eztemplate.php:107
eZUser\currentUser
static & currentUser()
Definition: ezuser.php:896
$ImageID
$ImageID
Definition: companytypelist.php:201
$variation
$variation
Definition: ezimagecatalogue/user/menubox.php:55
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.