Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

imagemap.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: imagemap.php 7845 2001-10-15 11:04:57Z jhe $
5 //
6 // Created on: <12-Jun-2001 14:47:19 jhe>
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/ezhttptool.php" );
30 // include_once( "ezarticle/classes/ezimagemap.php" );
31
32 $ini =& eZINI::instance( 'site.ini' );
33 $Language = $ini->variable( "eZArticleMain", "Language" );
34
35 $map = new eZImageMap( $ImageID );
36
37 switch ( $Action )
38 {
39 case "Edit" :
40 {
41 $t = new eZTemplate( "kernel/ezarticle/admin/" . $ini->variable( "eZArticleMain", "AdminTemplateDir" ),
42 "kernel/ezarticle/admin/intl/", $Language, "imagemap.php" );
43
44 $t->setAllStrings();
45
46 $t->set_file( "image_map_tpl", "imagemap.tpl" );
47 $t->set_block( "image_map_tpl", "element_tpl", "element" );
48
49 $article = new eZArticle( $ArticleID );
50 $image = new eZImage( $ImageID );
51
52 $t->set_var( "article_name", $article->name() );
53
54 $t->set_var( "image_id", $ImageID );
55 $t->set_var( "article_id", $ArticleID );
56 $t->set_var( "image", $image->filePath( true ) );
57
58 $elements = $map->elements();
59 $t->set_var( "element", "" );
60
61 for ( $i = 0; $i < count( $elements ); $i++ )
62 {
63 $t->set_var( "element_id", $i );
64 $t->set_var( "value", $elements[$i] );
65
66 $t->parse( "element", "element_tpl", true );
67 }
68 $t->pparse( "output", "image_map_tpl" );
69 }
70 break;
71
72 case "Store" :
73 {
74 $map->store( $Values );
75 eZHTTPTool::header( "Location: /article/articleedit/imagelist/" . $ArticleID );
76 }
77 break;
78 }
79
80 ?>
$i
$i
Definition: admin/adlist.php:91
$article
$article
Definition: articlelog.php:45
eZArticle
Definition: ezarticle.php:82
eZHTTPTool\header
static header( $string)
Definition: ezhttptool.php:96
eZImageMap
Definition: ezimagemap.php:37
eZImage
Definition: ezimage.php:95
eZTemplate
Definition: eztemplate.php:107
$t
foreach( $Modules as $module) if(isset( $ItemInsert)) $t
Definition: classes/admin/linklist.php:168
$Action
$Action
Definition: companysearch.php:80
$ImageID
$ImageID
Definition: companytypelist.php:201
$ArticleID
$ArticleID
Definition: export.php:48
$elements
$elements
Definition: formedit.php:355
$Language
$Language
Definition: imagemap.php:33
$ini
$ini
Definition: imagemap.php:32
$map
$map
Definition: imagemap.php:35
$image
$image
Definition: user/articlelist.php:242
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.