Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezsitemanager/admin/templateedit.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: templateedit.php 9330 2002-03-04 12:56:24Z ce $
5 //
6 // Created on: <24-Sep-2001 15:16:31 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/ezfile.php" );
28
29 if ( isset( $Store ) )
30 {
31 $fp = eZPBFile::fopen( $FileName, "w+");
32 $Contents =& str_replace ("\r", "", $Contents );
33 fwrite ( $fp, $Contents );
34 fclose( $fp );
35 $realPath = $FileName;
36 }
37 else
38 {
39 $realPath = str_replace( "-", "/", $filePath );
40 }
41
42
43 $ini =& eZINI::instance( 'site.ini' );
44 $Language = $ini->variable( "eZSiteManagerMain", "Language" );
45
46 $t = new eZTemplate( "kernel/ezsitemanager/admin/" . $ini->variable( "eZSiteManagerMain", "AdminTemplateDir" ),
47 "kernel/ezsitemanager/admin/" . "/intl", $Language, "templateedit.php" );
48 $t->setAllStrings();
49
50 $t->set_file( "site_config_tpl", "templateedit.tpl" );
51
52 $lines = eZPBFile::file( $realPath );
53 $contents = "";
54 foreach ( $lines as $line )
55 {
56 $contents .= $line;
57 }
58
59 $t->set_var( "file_contents", htmlspecialchars( $contents ) );
60 $t->set_var( "file_name", $realPath );
61
62 $t->pparse( "output", "site_config_tpl" );
63
64 ?>
eZPBFile\fopen
static fopen( $filename, $options)
Definition: ezpbfile.php:326
eZPBFile\file
static file( $filename)
Definition: ezpbfile.php:428
eZTemplate
Definition: eztemplate.php:107
$fp
$fp
Definition: export.php:97
$filePath
$filePath
Definition: ezfilemanager/user/filedownload.php:50
$t
$t
Definition: ezsitemanager/admin/templateedit.php:46
$lines
$lines
Definition: ezsitemanager/admin/templateedit.php:52
$contents
$contents
Definition: ezsitemanager/admin/templateedit.php:53
$Language
$Language
Definition: ezsitemanager/admin/templateedit.php:44
$ini
$ini
Definition: ezsitemanager/admin/templateedit.php:43
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.