Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

urledit.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: urledit.php 7910 2001-10-16 17:22:36Z fh $
5 //
6 // Created on: <24-Apr-2001 11:09:30 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/ezlocale.php" );
28 // include_once( "classes/ezhttptool.php" );
29 // include_once( "classes/eztemplate.php" );
30 // include_once( "classes/INIFile.php" );
31
32 // include_once( "ezurltranslator/classes/ezurltranslator.php" );
33
34 if ( isset( $DeleteURL ) && count( $DeleteIDArray ) > 0 )
35 {
36 $url = new eZURLTranslator( );
37 foreach ( $DeleteIDArray as $id )
38 {
39 $url = new eZURLTranslator( $id );
40 $url->delete();
41 }
42 }
43
44
45 if ( isset( $NewURL ) )
46 {
47
48 $url = new eZURLTranslator( );
49 $url->store();
50 }
51
52 if ( isset( $Store ) )
53 {
54 $i=0;
55 foreach ( $IDArray as $id )
56 {
57 $url = new eZURLTranslator( $id );
58 $url->setSource( $SourceURL[$i] );
59 $url->setDest( $DestURL[$i] );
60 $url->store();
61
62 $i++;
63 }
64
65 }
66
67 $Language = $ini->variable( "eZURLTranslatorMain", "Language" );
68
69 $t = new eZTemplate( "kernel/ezurltranslator/admin/" . $ini->variable( "eZURLTranslatorMain", "AdminTemplateDir" ),
70 "kernel/ezurltranslator/admin/intl", $Language, "urledit.php" );
71
72 $locale = new eZLocale( $Language );
73
74 $t->set_file( "url_edit_tpl", "urledit.tpl" );
75
76 $t->setAllStrings();
77
78 $t->set_block( "url_edit_tpl", "url_list_tpl", "url_list" );
79 $t->set_block( "url_list_tpl", "url_item_tpl", "url_item" );
80 $t->set_var( "url_item", "" );
81
82 $url = new eZURLTranslator( );
83
84 $urlArray = $url->getAll();
85
86 foreach ( $urlArray as $url )
87 {
88 $t->set_var( "id", $url->id() );
89 $t->set_var( "source_url", $url->source() );
90 $t->set_var( "dest_url", $url->dest() );
91
92 $t->parse( "url_item", "url_item_tpl", true );
93 }
94
95 $t->parse( "url_list", "url_list_tpl" );
96
97 $t->pparse( "output", "url_edit_tpl" );
98
99 ?>
$i
$i
Definition: admin/adlist.php:91
eZLocale
Definition: ezlocale.php:119
eZTemplate
Definition: eztemplate.php:107
eZURLTranslator
Definition: ezurltranslator.php:38
$ini
$ini
Definition: classes/admin/linklist.php:64
$id
$id
Definition: companytypelist.php:193
$locale
$locale
Definition: urledit.php:72
$t
$t
Definition: urledit.php:69
$urlArray
$urlArray
Definition: urledit.php:84
$Language
if(isset( $DeleteURL) &&count( $DeleteIDArray) > 0) if(isset( $NewURL)) if(isset( $Store)) $Language
Definition: urledit.php:67
$url
$url
Definition: urledit.php:82
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.