Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezbulkmail/user/mailview.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: mailview.php 7100 2001-09-08 12:16:19Z ce $
5 //
6 // Created on: <23-Oct-2000 17:53:46 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( "ezbulkmail/classes/ezbulkmail.php" );
28 // include_once( "ezbulkmail/classes/ezbulkmailtemplate.php" );
29
30 // include_once( "classes/INIFile.php" );
31 // include_once( "classes/eztemplate.php" );
32 // include_once( "classes/ezlocale.php" );
33 // include_once( "ezuser/classes/ezuser.php" );
34 // include_once( "classes/ezhttptool.php" );
35
36
37 $ini =& eZINI::instance( 'site.ini' );
38 $Language = $ini->variable( "eZBulkMailMain", "Language" );
39
40 $t = new eZTemplate( "kernel/ezbulkmail/user/" . $ini->variable( "eZBulkMailMain", "TemplateDir" ),
41 "kernel/ezbulkmail/user/intl/", $Language, "mailview.php" );
42 $t->setAllStrings();
43
44 $t->set_file( array(
45 "mail_view_page_tpl" => "mailview.tpl"
46 ) );
47
48
49 $t->set_var( "site_style", $SiteDesign );
50
51 $mail = new eZBulkMail( $MailID );
52 if( is_object( $mail ) )
53 {
54 $fromString = $mail->fromName() . " &lt;" . $mail->sender() ."&gt;";
55 $t->set_var( "current_mail_id", $MailID );
56 $t->set_var( "from", $fromString );
57 $t->set_var( "subject", $mail->subject() );
58
60 $body = $mail->body();
61 $template = $mail->template();
62 if( is_object( $template ) )
63 $body = $template->header() . $body . $template->footer();
64 $t->set_var( "mail_body", nl2br( $body ) );
65
66 $category = $mail->categories();
67 if( count( $category ) > 0 )
68 {
69 $t->set_var( "category", $category[0]->name() );
70 $t->set_var( "category_id", $category[0]->id() );
71 }
72 }
73
74 $t->pparse( "output", "mail_view_page_tpl" );
75
76 ?>
$category
if( $Action=="Edit") $category
Definition: adedit.php:378
eZBulkMail
Definition: ezbulkmail.php:46
eZTemplate
Definition: eztemplate.php:107
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
$t
$t
Definition: ezbulkmail/user/mailview.php:40
$Language
$Language
Definition: ezbulkmail/user/mailview.php:38
$ini
$ini
Definition: ezbulkmail/user/mailview.php:37
$mail
$mail
Definition: ezbulkmail/user/mailview.php:51
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.