Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

bulklist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: bulklist.php 6417 2001-08-13 12:31:09Z ce $
5 //
6 // Created on: <07-Aug-2001 15:45:54 ce>
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/ezbulkmailcategory.php" );
28 // include_once( "ezbulkmail/classes/ezbulkmail.php" );
29 // include_once( "classes/ezlocale.php" );
30 // include_once( "ezuser/classes/ezuser.php" );
31 // include_once( "classes/ezhttptool.php" );
32 // include_once( "classes/eztemplate.php" );
33 // include_once( "classes/INIFile.php" );
34 // include_once( "classes/ezlist.php" );
35
36 if( isset( $Ok ) || isset( $New ) )
37 {
38 eZHTTPTool::header( "Location: /bulkmail/subscriptionlist/" );
39 exit();
40 }
41
42 $Language = $ini->variable( "eZBulkMailMain", "Language" );
43 $t = new eZTemplate( "kernel/ezbulkmail/user/" . $ini->variable( "eZBulkMailMain", "TemplateDir" ),
44 "kernel/ezbulkmail/user/intl", $Language, "bulklist.php" );
45
46 $iniLanguage = new eZINI( "kernel/ezbulkmail/user/intl/" . $Language . "/bulklist.php.ini", false );
47
48 $locale = new eZLocale( $Language );
49 $t->set_file( array(
50 "bulk_list_tpl" => "bulklist.tpl"
51 ) );
52
53 $t->setAllStrings();
54 $t->set_var( "site_style", $SiteDesign );
55
56 $t->set_block( "bulk_list_tpl", "bulkmail_tpl", "bulkmail" );
57 $t->set_block( "bulkmail_tpl", "bulkmail_item_tpl", "bulkmail_item" );
58 $t->set_block( "bulk_list_tpl", "no_bulkmail_tpl", "no_bulkmail" );
59 $t->set_var( "bulkmail", "" );
60 $t->set_var( "bulkmail_item", "" );
61
62
63
64 if( is_numeric( $CategoryID ) && $CategoryID > 0 )
65 {
66 $category = new eZBulkMailCategory( $CategoryID );
67 $t->set_var( "current_category_name", $category->name() );
68 $t->set_var( "current_category_id", $category->id() );
69 $mail = $category->mail($Offset, 20, false );
70 $mailCount = $category->mailCount();
71 $i = 0;
72 foreach( $mail as $mailItem )
73 {
74 $t->set_var( "bulkmail_id", $mailItem->id() );
75 $t->set_var( "bulkmail_subject", $mailItem->subject() );
76
77 if( !$mailItem->isDraft() )
78 {
79 $t->set_var( "sent_date", $locale->format( $mailItem->date() ) );
80 }
81 else
82 {
83 $t->set_var( "sent_date", $iniLanguage->variable( "strings", "not_sent" ) );
84 }
85 ( $i % 2 ) ? $t->set_var( "td_class", "bgdark" ) : $t->set_var( "td_class", "bglight" );
86
87 $t->parse( "bulkmail_item", "bulkmail_item_tpl", true );
88 $i++;
89 }
90 if( $i > 0 )
91 {
92 $t->set_var( "no_bulkmail", "" );
93 $t->parse( "bulkmail", "bulkmail_tpl" );
94 }
95 else
96 {
97 $t->parse( "no_bulkmail", "no_bulkmail_tpl" );
98 }
99
100 }
101
102 eZList::drawNavigator( $t, $mailCount, 20, $Offset, "bulk_list_tpl" );
103 $t->pparse( "output", "bulk_list_tpl" );
104
105 ?>
$category
if( $Action=="Edit") $category
Definition: adedit.php:378
$i
$i
Definition: admin/adlist.php:91
$CategoryID
$CategoryID
Definition: admin/articleedit.php:53
$iniLanguage
$iniLanguage
Definition: bulklist.php:46
$locale
$locale
Definition: bulklist.php:48
$t
$t
Definition: bulklist.php:43
$Language
if(isset( $Ok)||isset( $New)) $Language
Definition: bulklist.php:42
eZHTTPTool\header
static header( $string)
Definition: ezhttptool.php:96
eZINI
Reads and writes .ini style configuration files.
eZList\drawNavigator
static drawNavigator(&$t, $total_types, $max_types, $index, $parent=false, $variables=false)
Definition: ezlist.php:401
eZLocale
Definition: ezlocale.php:119
eZTemplate
Definition: eztemplate.php:107
$ini
$ini
Definition: classes/admin/linklist.php:64
$Offset
$Offset
Definition: ezarticle/user/search.php:110
$mailCount
$mailCount
Definition: ezbulkmail/admin/categorylist.php:36
$mail
$mail
Definition: ezbulkmail/admin/maillist.php:61
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
exit
exit
Definition: folder.php:81
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.