Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezmail/user/fileedit.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: fileedit.php 8504 2001-11-19 09:46:46Z jhe $
5 //
6 // Created on: <16-Feb-2001 14:33:48 fh>
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/ezlog.php" );
30
31 // include_once( "classes/ezfile.php" );
32 // include_once( "ezmail/classes/ezmail.php" );
33 // include_once( "ezfilemanager/classes/ezvirtualfile.php" );
34
35 if( isset( $Ok ) )
36 {
37 $file = new eZFile();
38
39 if ( $file->getUploadedFile( "userfile" ) )
40 {
41 $mail = new eZMail( $MailID );
42
43 $uploadedFile = new eZVirtualFile();
44 // $uploadedFile->setDescription( $Description );
45
46 $uploadedFile->setFile( $file );
47 $uploadedFile->setName( $uploadedFile->originalFileName() );
48
49 $uploadedFile->store();
50
51 $mail->addFile( $uploadedFile );
52
53 eZPBLog::writeNotice( "File added to mail $MailID from IP: $REMOTE_ADDR" );
54 }
55 else
56 {
57 print( $file->name() . " not uploaded successfully" );
58 }
59
60 // include_once( "classes/ezhttptool.php" );
61 eZHTTPTool::header( "Location: /mail/mailedit/" . $MailID . "/" );
62 exit();
63 }
64
65 if( isset( $Cancel ) )
66 {
67 // include_once( "classes/ezhttptool.php" );
68 eZHTTPTool::header( "Location: /mail/mailedit/" . $MailID . "/" );
69 exit();
70 }
71
72 $ini = eZINI::instance( 'site.ini' );
73 $Language = $ini->variable( "eZMailMain", "Language" );
74 $session = new eZSession();
75 $t = new eZTemplate( "kernel/ezmail/user/" . $ini->variable( "eZMailMain", "TemplateDir" ),
76 "kernel/ezmail/user/intl", $Language, "fileedit.php" );
77
78 $t->setAllStrings();
79
80 $t->set_file( array(
81 "file_edit_page" => "fileedit.tpl",
82 ) );
83
84 $t->set_var( "mail_id", $MailID );
85 $mail = new eZMail( $MailID );
86 $t->set_var( "mail_subject", $mail->subject() );
87
88 $t->pparse( "output", "file_edit_page" );
89 ?>
eZFile
Tool class which has convencience functions for files and directories.
Definition: ezfile.php:19
eZHTTPTool\header
static header( $string)
Definition: ezhttptool.php:96
eZMail
Definition: ezmail.php:57
eZPBLog\writeNotice
static writeNotice( $notice)
Definition: ezpblog.php:166
eZSession
Definition: lib/ezsession/classes/ezsession.php:65
eZTemplate
Definition: eztemplate.php:107
eZVirtualFile
Definition: ezvirtualfile.php:42
$file
$file
Definition: ezfilemanager/user/filedownload.php:35
$t
$t
Definition: ezmail/user/fileedit.php:75
$ini
if(isset( $Ok)) if(isset( $Cancel)) $ini
Definition: ezmail/user/fileedit.php:72
$Language
$Language
Definition: ezmail/user/fileedit.php:73
$session
$session
Definition: ezmail/user/fileedit.php:74
$mail
$mail
Definition: ezmail/user/fileedit.php:85
exit
exit
Definition: folder.php:81
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.