Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezbulkmail.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: ezbulkmail.php 9251 2002-02-20 13:18:49Z jhe $
5 //
6 // eZBulkMail class
7 //
8 // Created on: <17-Apr-2001 11:53:30 fh>
9 //
10 // This source file is part of Exponential Basic, publishing software.
11 //
12 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
13 //
14 // This program is free software; you can redistribute it and/or
15 // modify it under the terms of the GNU General Public License
16 // as published by the Free Software Foundation; either version 2
17 // of the License, or (at your option) any later version.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
27 //
28
31
38 // include_once( "classes/ezdatetime.php" );
39 // include_once( "ezbulkmail/classes/ezbulkmailcategory.php" );
40 // include_once( "ezbulkmail/classes/ezbulkmailtemplate.php" );
41 // include_once( "ezbulkmail/classes/ezbulkmailsubscriptionaddress.php" );
42 // include_once( "ezmail/classes/ezmail.php" );
43 // include_once( "ezuser/classes/ezobjectpermission.php" );
44
45 class eZBulkMail
46 {
50 function __construct( $id = -1 )
51 {
52 // default values...
53 $this->IsDraft = 1;
54 $this->UserID = 0;
55
56 if ( $id != -1 )
57 {
58 $this->ID = $id;
59 $this->get( $this->ID );
60 }
61 }
62
66 function store()
67 {
68 $db =& eZDB::globalDatabase();
69 $db->begin();
70 $bodytext = $db->escapeString( $this->BodyText );
71 $subject = $db->escapeString( $this->Subject );
72 $replyto = $db->escapeString( $this->ReplyTo );
73 $fromname = $db->escapeString( $this->FromName );
74 $sentdate = (new eZDateTime())->timeStamp( true );
75 if ( !isset( $this->ID ) )
76 {
77 $db->lock( "eZBulkMail_Mail" );
78 $nextID = $db->nextID( "eZBulkMail_Mail", "ID" );
79
80 $result = $db->query( "INSERT INTO eZBulkMail_Mail
81 ( ID, UserID, FromField, FromName, ReplyTo, Subject, BodyText, SentDate, IsDraft )
82 VALUES
83 ( '$nextID',
84 '$this->UserID',
85 '$this->From',
86 '$fromname',
87 '$replyto',
88 '$subject',
89 '$bodytext',
90 '$sentdate',
91 '$this->IsDraft' )
92 " );
93 $this->ID = $nextID;
94 }
95 else
96 {
97 $result = $db->query( "UPDATE eZBulkMail_Mail SET
98 UserID='$this->UserID',
99 FromField='$this->From',
100 FromName='$this->FromName',
101 ReplyTo='$replyto',
102 Subject='$subject',
103 BodyText='$bodytext',
104 SentDate='$sentdate',
105 IsDraft='$this->IsDraft'
106 WHERE ID='$this->ID'" );
107 }
108 $db->unlock();
109
110 if ( $result == false )
111 $db->rollback( );
112 else
113 $db->commit();
114
115 return true;
116 }
117
122 function delete( $id = -1 )
123 {
124 $db =& eZDB::globalDatabase();
125 $db->begin();
126
127 if ( $id == -1 )
128 $id = $this->ID;
129
130 $results[] = $db->query( "DELETE FROM eZBulkMail_MailCategoryLink WHERE MailID='$id'" );
131 $results[] = $db->query( "DELETE FROM eZBulkMail_Mail WHERE ID='$id'" );
132
133 $commit = true;
134 foreach ( $results as $result )
135 {
136 if ( $result == false )
137 $commit = false;
138 }
139 if ( $commit == false )
140 $db->rollback( );
141 else
142 $db->commit();
143 }
144
148 function get( $id=-1 )
149 {
150 $db =& eZDB::globalDatabase();
151
152 if ( $id != "" )
153 {
154 $db->array_query( $mail_array, "SELECT * FROM eZBulkMail_Mail WHERE ID='$id'" );
155 if ( count( $mail_array ) > 1 )
156 {
157 die( "Error: Category's with the same ID was found in the database. This shouldent happen." );
158 }
159 else if ( count( $mail_array ) == 1 )
160 {
161 $this->ID = $mail_array[0][$db->fieldName( "ID" )];
162 $this->UserID = $mail_array[0][$db->fieldName( "UserID" )];
163 $this->From = $mail_array[0][$db->fieldName( "FromField" )];
164 $this->FromName = $mail_array[0][$db->fieldName( "FromName" )];
165 $this->ReplyTo = $mail_array[0][$db->fieldName( "ReplyTo" )];
166 $this->Subject = $mail_array[0][$db->fieldName( "Subject" )];
167 $this->BodyText = $mail_array[0][$db->fieldName( "BodyText" )];
168 $this->SentDate = $mail_array[0][$db->fieldName( "SentDate" )];
169 $this->IsDraft = $mail_array[0][$db->fieldName( "IsDraft" )];
170 }
171 }
172 }
173
179 static public function getAll( $draftsOnly = false )
180 {
181 $db =& eZDB::globalDatabase();
182
183 $return_array = array();
184 $mail_array = array();
185
186 $draftsSQL = "";
187 if ( $draftsOnly == true )
188 $draftsSQL = "WHERE IsDraft='1'";
189
190 $db->array_query( $mail_array, "SELECT ID, SentDate FROM eZBulkMail_Mail $draftsSQL ORDER BY SentDate" );
191
192 for ( $i = 0; $i < count( $mail_array ); $i++ )
193 {
194 $return_array[$i] = new eZBulkMail( $mail_array[$i][$db->fieldName( "ID" )] );
195 }
196
197 return $return_array;
198 }
199
203 function id()
204 {
205 return $this->ID;
206 }
207
211 function sender()
212 {
213 return $this->From;
214 }
215
219 function setSender( $newSender )
220 {
221 $this->From = $newSender;
222 }
223
227 function fromName()
228 {
229 return $this->FromName;
230 }
231
235 function from()
236 {
237 return $this->From;
238 }
239
243 function setFromName( $newSender )
244 {
245 $this->FromName = $newSender;
246 }
247
251 function subject( $html = true )
252 {
253 if ( $html )
254 return htmlspecialchars( $this->Subject );
255 return $this->Subject;
256 }
257
261 function setSubject( $newSubject )
262 {
263 $this->Subject = trim( $newSubject );
264 }
265
269 function body( $html = true )
270 {
271 if ( $html )
272 return htmlspecialchars( $this->BodyText );
273 return $this->BodyText;
274 }
275
279 function setBodyText( $newBody )
280 {
281 $this->BodyText = $newBody;
282 }
283
287 function owner()
288 {
289 return $this->UserID;;
290 }
291
295 function setOwner( $newOwner )
296 {
297 if ( is_a( $newOwner, "eZUser" ) )
298 $this->UserID = $newOwner->id();
299 else
300 $this->UserID = $newOwner;
301 }
302
306 function date()
307 {
308 $dateTime = new eZDateTime();
309 $dateTime->setTimeStamp( $this->SentDate );
310
311 return $dateTime;
312 }
313
317 function setDate( $value )
318 {
319 $this->SentDate = $value;
320 }
321
325 function isDraft()
326 {
327 return $this->IsDraft;
328 }
329
333 function setIsDraft( $value )
334 {
335 $this->IsDraft = $value;
336 }
337
341 function addToCategory( $value )
342 {
343 if ( is_a( $value, "eZBulkMailCategory" ) )
344 $value = $value->id();
345
346 $db =& eZDB::globalDatabase();
347
348 if ( $value == false )
349 {
350 $db->begin();
351 $result = $db->query( "DELETE FROM eZBulkMail_MailCategoryLink WHERE MailID='$this->ID'");
352 if ( $result == false )
353 $db->rollback( );
354 else
355 $db->commit();
356 }
357 else
358 {
359 $db->query_single( $result, "SELECT count( * ) AS Count FROM eZBulkMail_MailCategoryLink WHERE CategoryID='$value' AND MailID='$this->ID'" );
360 if ( $result[$db->fieldName( "Count" )] == 0 )
361 {
362 $db->begin();
363 $db->lock( "eZBulkMail_MailCategoryLink" );
364
365 $result = $db->query( "INSERT INTO eZBulkMail_MailCategoryLink ( CategoryID, MailID ) VALUES ( '$value', '$this->ID' ) " );
366
367 $db->unlock();
368
369 if ( $result == false )
370 $db->rollback( );
371 else
372 $db->commit();
373 }
374 }
375 }
376
377
382 function categories( $as_object = true )
383 {
384 $db =& eZDB::globalDatabase();
385 $category_array = array();
386 $result_array = array();
387
388 $db->array_query( $category_array, "SELECT CategoryID FROM eZBulkMail_MailCategoryLink WHERE MailID='$this->ID'" );
389
390 foreach ( $category_array as $arrayItem )
391 {
392 $result_array[] = ( $as_object == true ) ? new eZBulkMailCategory( $arrayItem[$db->fieldName( "CategoryID" )] ) : $arrayItem[$db->fieldName( "CategoryID" )];
393 }
394
395 return $result_array;
396 }
397
403 function useTemplate( $templateID )
404 {
405 $db =& eZDB::globalDatabase();
406
407 $db->begin();
408 $result = $db->query( "DELETE FROM eZBulkMail_MailTemplateLink WHERE MailID='$this->ID'" );
409 if ( $result == false )
410 $db->rollback( );
411 else
412 $db->commit();
413
414 if ( $templateID != false )
415 {
416 $db->begin();
417 $db->lock( "eZBulkMail_MailTemplateLink" );
418 $result = $db->query( "INSERT INTO eZBulkMail_MailTemplateLink ( MailID, TemplateID ) VALUES ( '$this->ID', '$templateID' ) " );
419 $db->unlock();
420 if ( $result == false )
421 $db->rollback( );
422 else
423 $db->commit();
424 }
425 }
426
430 function template( $as_object = true )
431 {
432 $db =& eZDB::globalDatabase();
433 $template_array = array();
434
435 $db->array_query( $template_array, "SELECT TemplateID FROM eZBulkMail_MailTemplateLink WHERE MailID='$this->ID'" );
436
437 if ( count( $template_array ) > 0 && $as_object == true )
438 return new eZBulkMailTemplate( $template_array[0][$db->fieldName( "TemplateID" )] );
439 if ( count( $template_array ) > 0 && $as_object == false )
440 return $template_array[0][$db->fieldName( "TemplateID" )];
441
442 return false;
443 }
444
450 function send( $article = false )
451 {
452 $this->IsDraft = 0;
453 $template = $this->template();
454 if ( is_object( $template ) )
455 $this->BodyText = $template->header( false ) . $this->BodyText . $template->footer( false );
456
457 $this->useTemplate( false );
458
459 $categories = $this->categories();
460 if ( count( $categories ) > 0 ) // category does exist...
461 {
462 // get subscribers from groups
463 $subscribers = array();
464
465 // normal subscribers...
466 foreach ( $categories as $categoryItem )
467 {
468 $subscribers = array_merge( $subscribers, $categoryItem->subscribers( true, $categoryItem->id() ) );
469 $subscribers = array_merge( $subscribers, $categoryItem->subscribedUsers( $categoryItem->id() ) );
470
471 $groups = $categoryItem->groupSubscriptions();
472 foreach ( $groups as $group )
473 $subscribers = array_merge( $subscribers, $group->users() );
474 }
475 for ( $i = 0; $i < count( $subscribers ); $i++ )
476 {
477 $mail = new eZMail();
478 $mail->setBodyText( $this->BodyText );
479 $mail->setSubject( $this->Subject );
480 $mail->setSender( $this->From );
481 $mail->setFromName( $this->FromName );
482
483 $subscriber = $subscribers[$i];
484 set_time_limit( 5 );
485 $canSend = false;
486
487 $permission = false;
488 if ( $article && is_a( $subscriber, "eZUser" ) )
489 {
490 if ( eZObjectPermission::hasPermissionWithDefinition( $article->id(), "article_article", 'r', $subscriber,
491 $article->categoryDefinition( false ) ) ||
492 eZArticle::isAuthor( $subscriber, $article->id() ) )
493 $permission = true;
494 }
495 else
496 {
497 $permission = true;
498 }
499 if ( $permission )
500 {
501 if ( is_a( $subscriber, "eZUser" ) )
502 {
503 $canSend = true;
504 $subscriber = $subscriber->email();
505 }
506
507 if ( is_a( $subscriber, "eZBulkMailSubscriptionAddress" ) )
508 {
509 $categoryID = $subscriber->categoryID();
510 $settings = eZBulkMailCategory::settings( $subscriber, $categoryID );
511 if ( $settings )
512 {
513 $delay = $settings->delay();
514 if ( $delay == 0 )
515 {
516 $subscriber = $subscriber->email();
517 $canSend = true;
518 }
519 else
520 eZBulkMailCategory::addDelayMail( $subscriber, $categoryID, $delay, $this );
521 }
522 else
523 {
524 $canSend = true;
525 $subscriber = $subscriber->email();
526 }
527 }
528
529 if ( is_a( $subscriber, "eZBulkMailUserSubscripter" ) )
530 {
531 $categoryID = $subscriber->categoryID();
532 $settings = eZBulkMailCategory::settings( $subscriber, $categoryID );
533 if ( $settings )
534 {
535 $delay = $settings->delay();
536
537 if ( $delay == 0 )
538 {
539 $subscriber = $subscriber->email();
540 $canSend = true;
541 }
542 else
543 {
544 eZBulkMailCategory::addDelayMail( $subscriber, $categoryID, $delay, $this );
545 }
546 }
547 else
548 {
549 $canSend = true;
550 $userMail = $subscriber->user();
551 if ( is_object( $userMail ) )
552 $subscriber = $userMail->email();
553 }
554 }
555
556 if ( !$this->isSent( $subscriber ) && $canSend )
557 {
558 $mail->setTo( $subscriber );
559 $mail->send();
560 $this->addLogEntry( $subscriber );
561 }
562 }
563 }
564 $this->store();
565 // The mail was sent.. now lets set the timestamp
566 $db =& eZDB::globalDatabase();
567 $db->begin();
568 $timeStamp =& (new eZDateTime())->timeStamp( true );
569 $result = $db->query( "UPDATE eZBulkMail_Mail SET SentDate='$timeStamp' WHERE ID='$this->ID'" );
570 if ( $result == false )
571 $db->rollback( );
572 else
573 $db->commit();
574 }
575 }
576
577 function sendDelayedMail( )
578 {
579 $db =& eZDB::globalDatabase();
580
581 $categoryID = $this->ID();
582 $subscribe_array = array();
583 $user_array = array();
584 $return_array = array();
585
586 if ( !$this->haveSentHourly( ) )
587 {
588 $db->array_query_append( $subscribe_array, "SELECT * FROM eZBulkMail_CategoryDelay WHERE Delay='1'" );
589 $db->array_query_append( $user_array, "SELECT * FROM eZBulkMail_UserCategoryDelay WHERE Delay='1'" );
590 $db->begin();
591 $result = $db->query( "DELETE FROM eZBulkMail_CategoryDelay WHERE Delay='1'" );
592 $result = $db->query( "DELETE FROM eZBulkMail_UserCategoryDelay WHERE Delay='1'" );
593 if ( $result == false )
594 $db->rollback( );
595 else
596 $db->commit();
597
598 $this->setOffset( 1 );
599 }
600 if ( !$this->haveSentDaily( ) )
601 {
602 $db->array_query_append( $subscribe_array, "SELECT * FROM eZBulkMail_CategoryDelay WHERE Delay='2'" );
603 $db->array_query_append( $user_array, "SELECT * FROM eZBulkMail_UserCategoryDelay WHERE Delay='2'" );
604 $db->begin();
605 $result = $db->query( "DELETE FROM eZBulkMail_CategoryDelay WHERE Delay='2'" );
606 $result = $db->query( "DELETE FROM eZBulkMail_UserCategoryDelay WHERE Delay='2'" );
607 if ( $result == false )
608 $db->rollback( );
609 else
610 $db->commit();
611
612 $this->setOffset( 2 );
613 }
614 if ( !$this->haveSentWeekly( ) )
615 {
616 $db->array_query_append( $subscribe_array, "SELECT * FROM eZBulkMail_CategoryDelay WHERE Delay='3'" );
617 $db->array_query_append( $user_array, "SELECT * FROM eZBulkMail_UserCategoryDelay WHERE Delay='3'" );
618 $db->begin();
619 $result = $db->query( "DELETE FROM eZBulkMail_CategoryDelay WHERE Delay='3'" );
620 $result = $db->query( "DELETE FROM eZBulkMail_UserCategoryDelay WHERE Delay='3'" );
621 if ( $result == false )
622 $db->rollback( );
623 else
624 $db->commit();
625
626 $this->setOffset( 3 );
627 }
628 if ( !$this->haveSentMonthly( ) )
629 {
630 $db->array_query_append( $subscribe_array, "SELECT * FROM eZBulkMail_CategoryDelay WHERE Delay='4'" );
631 $db->array_query_append( $user_array, "SELECT * FROM eZBulkMail_UserCategoryDelay WHERE Delay='4'" );
632 $db->begin();
633 $result = $db->query( "DELETE FROM eZBulkMail_CategoryDelay WHERE Delay='4'" );
634 $result = $db->query( "DELETE FROM eZBulkMail_UserCategoryDelay WHERE Delay='4'" );
635 if ( $result == false )
636 $db->rollback( );
637 else
638 $db->commit();
639
640 $this->setOffset( 4 );
641 }
642
643 for ( $i = 0; $i < count( $subscribe_array ); $i++ )
644 {
645 $this->sendSingle( $subscribe_array[$i]["AddressID"], $subscribe_array[$i]["MailID"], false );
646 }
647 for ( $i = 0; $i < count( $user_array ); $i++ )
648 {
649 $this->sendSingle( $user_array[$i]["UserID"], $user_array[$i]["MailID"], true );
650 }
651
652 return $return_array;
653
654 }
655
660 function haveSentHourly( )
661 {
662 $db =& eZDB::globalDatabase();
663 $now = (new eZDateTime())->timeStamp( true );
664 $db->query_single( $offset, "SELECT Hour FROM eZBulkMail_Offset" );
665
666 $check = $now - $offset["Hour"];
667
668 if ( $check <= 3600 )
669 {
670 return true;
671 }
672 else
673 return false;
674 }
675
680 function haveSentDaily( )
681 {
682 $db =& eZDB::globalDatabase();
683 $now = (new eZDateTime())->timeStamp( true );
684 $db->query_single( $offset, "SELECT Daily FROM eZBulkMail_Offset" );
685
686 $check = $now - $offset["Daily"];
687 if ( $check <= 86400 )
688 return true;
689 else
690 return false;
691 }
692
693
698 function haveSentWeekly( )
699 {
700 $db =& eZDB::globalDatabase();
701 $now = (new eZDateTime())->timeStamp( true );
702 $db->query_single( $offset, "SELECT Weekly FROM eZBulkMail_Offset" );
703
704 $check = $now - $offset["Weekly"];
705 if ( $check <= 604800 )
706 return true;
707 else
708 return false;
709 }
710
711
716 function haveSentMonthly( )
717 {
718 $db =& eZDB::globalDatabase();
719 $now = (new eZDateTime())->timeStamp( true );
720 $db->query_single( $offset, "SELECT Monthly FROM eZBulkMail_Offset" );
721
722 $check = $now - $offset["Monthly"];
723 if ( $check <= 2678400 )
724 return true;
725 else
726 return false;
727 }
728
732 function sendSingle( $addressID, $mailID, $user=false )
733 {
734 if ( !is_numeric ( $addressID ) )
735 return false;
736
737 $bulkMail = new eZBulkMail( $mailID );
738
739 if ( $user )
740 {
741 $subscriber = new eZBulkMailUserSubscripter( $addressID );
742 $user = $subscriber->user();
743 $subscriber = $user->email();
744 }
745 else
746 {
747 $subscriber = new eZBulkMailSubscriptionAddress( $addressID );
748 $subscriber = $subscriber->eMail();
749 }
750
751 $template = $bulkMail->template();
752 if ( is_object( $template ) )
753 $bulkMail->setBodyText( $template->header( false ) . $bulkMail->body() . $template->footer( false ) );
754
755 $bulkMail->useTemplate( false );
756
757 $mail = new eZMail();
758 $mail->setBodyText( $bulkMail->body() );
759 $mail->setSubject( $bulkMail->subject() );
760 $mail->setSender( $bulkMail->from() );
761 $mail->setFromName( $bulkMail->fromName() );
762 $mail->setTo( $subscriber );
763 $mail->send();
764
765 $bulkMail->addLogEntry( $subscriber );
766 $bulkMail->store();
767
768 // The mail was sent.. now lets set the timestamp
769 $db =& eZDB::globalDatabase();
770 $db->begin();
771 $timeStamp =& (new eZDateTime())->timeStamp( true );
772 $id = $bulkMail->id();
773 $result = $db->query( "UPDATE eZBulkMail_Mail SET SentDate='$timeStamp' WHERE ID='$id'");
774 if ( $result == false )
775 $db->rollback( );
776 else
777 $db->commit();
778 }
779
784 function setOffset( $delay )
785 {
786 $db =& eZDB::globalDatabase();
787 $db->begin();
788 $db->lock( "eZBulkMail_Offset" );
789 $timeStamp =& (new eZDateTime())->timeStamp( true );
790
791 if ( $delay == 1 )
792 $delay = "Hour";
793 if ( $delay == 2 )
794 $delay = "Daily";
795 if ( $delay == 3 )
796 $delay = "Weekly";
797 if ( $delay == 4 )
798 $delay = "Monthly";
799
800 $db->array_query( $checkArray, "SELECT * FROM eZBulkMail_Offset" );
801 if ( count ( $checkArray ) == 0 )
802 {
803 $result = $db->query( "INSERT INTO eZBulkMail_Offset
804 ( $delay )
805 VALUES
806 ( '$timeStamp' )
807 " );
808 }
809 else
810 $result = $db->query( "UPDATE eZBulkMail_Offset SET $delay='$timeStamp'" );
811
812
813 $db->unlock();
814 if ( $result == false )
815 $db->rollback( );
816 else
817 $db->commit();
818 }
819
824 function addLogEntry( $mail )
825 {
826 $db =& eZDB::globalDatabase();
827 $db->begin();
828 $db->lock( "eZBulkMail_SentLog" );
829 $nextID = $db->nextID( "eZBulkMail_SentLog", "ID" );
830 $timeStamp =& (new eZDateTime())->timeStamp( true );
831
832 $result = $db->query( "INSERT INTO eZBulkMail_SentLog
833 ( ID, SentDate, Mail, MailID )
834 VALUES
835 ( '$nextID', '$timeStamp', '$mail', '$this->ID' )
836 " );
837
838 $db->unlock();
839 if ( $result == false )
840 $db->rollback( );
841 else
842 $db->commit();
843 }
844
848 function addToDelayList( $subscripter, $category, $delay )
849 {
850 $db = eZDB::globalDatabase();
851 $db->begin();
852 $db->lock( "eZBulkMail_CategoryDelay" );
853 $nextID = $db->nextID( "eZBulkMail_CategoryDelay", "ID" );
854 $timeStamp =& (new eZDateTime())->timeStamp( true );
855
856 $mailID = $this->ID;
857 $result = $db->query( "INSERT INTO eZBulkMail_CategoryDelay
858 ( ID, AddressID, CategoryID, Delay, MailID )
859 VALUES
860 ( '$nextID', '$subscripter', '$category', '$delay', '$mailID' )
861 " );
862
863 $db->unlock();
864 if ( $result == false )
865 $db->rollback( );
866 else
867 $db->commit();
868 }
869
874 function isSent( $mail )
875 {
876 $db =& eZDB::globalDatabase();
877 $db->query_single( $result, "SELECT COUNT( ID ) as Count FROM eZBulkMail_SentLog WHERE Mail='$mail' AND MailID='$this->ID'" );
878 if ( $result[$db->fieldName( "Count" )] > 0 )
879 return true;
880
881 return false;
882 }
883
884 var $ID;
885 var $UserID;
886 var $From;
887 var $FromName;
888 var $ReplyTo;
889 var $Subject;
890 var $BodyText;
891 var $SentDate;
892 var $IsDraft;
893
895 var $IsConnected;
896
897 }
898
899 ?>
$category
if( $Action=="Edit") $category
Definition: adedit.php:378
$i
$i
Definition: admin/adlist.php:91
$group
$group
Definition: admin/articleedit.php:799
$article
$article
Definition: articlelog.php:45
$dateTime
$dateTime
Definition: authorview.php:77
eZArticle\isAuthor
static isAuthor( $user, $articleID)
Definition: ezarticle.php:2672
eZBulkMailSubscriptionAddress
Definition: ezbulkmailsubscriptionaddress.php:40
eZBulkMailTemplate
Definition: ezbulkmailtemplate.php:40
eZBulkMailUserSubscripter
Definition: ezbulkmailusersubscripter.php:42
eZBulkMail
Definition: ezbulkmail.php:46
eZBulkMail\id
id()
Definition: ezbulkmail.php:203
eZBulkMail\body
body( $html=true)
Definition: ezbulkmail.php:269
eZBulkMail\$UserID
$UserID
Definition: ezbulkmail.php:885
eZBulkMail\fromName
fromName()
Definition: ezbulkmail.php:227
eZBulkMail\$Subject
$Subject
Definition: ezbulkmail.php:889
eZBulkMail\sender
sender()
Definition: ezbulkmail.php:211
eZBulkMail\haveSentDaily
haveSentDaily()
Definition: ezbulkmail.php:680
eZBulkMail\$IsDraft
$IsDraft
Definition: ezbulkmail.php:892
eZBulkMail\sendDelayedMail
sendDelayedMail()
Definition: ezbulkmail.php:577
eZBulkMail\__construct
__construct( $id=-1)
Definition: ezbulkmail.php:50
eZBulkMail\addToCategory
addToCategory( $value)
Definition: ezbulkmail.php:341
eZBulkMail\from
from()
Definition: ezbulkmail.php:235
eZBulkMail\useTemplate
useTemplate( $templateID)
Definition: ezbulkmail.php:403
eZBulkMail\haveSentWeekly
haveSentWeekly()
Definition: ezbulkmail.php:698
eZBulkMail\addToDelayList
addToDelayList( $subscripter, $category, $delay)
Definition: ezbulkmail.php:848
eZBulkMail\haveSentHourly
haveSentHourly()
Definition: ezbulkmail.php:660
eZBulkMail\$ID
$ID
Definition: ezbulkmail.php:884
eZBulkMail\haveSentMonthly
haveSentMonthly()
Definition: ezbulkmail.php:716
eZBulkMail\date
date()
Definition: ezbulkmail.php:306
eZBulkMail\$SentDate
$SentDate
Definition: ezbulkmail.php:891
eZBulkMail\setSubject
setSubject( $newSubject)
Definition: ezbulkmail.php:261
eZBulkMail\$From
$From
Definition: ezbulkmail.php:886
eZBulkMail\setFromName
setFromName( $newSender)
Definition: ezbulkmail.php:243
eZBulkMail\owner
owner()
Definition: ezbulkmail.php:287
eZBulkMail\setOffset
setOffset( $delay)
Definition: ezbulkmail.php:784
eZBulkMail\$BodyText
$BodyText
Definition: ezbulkmail.php:890
eZBulkMail\$FromName
$FromName
Definition: ezbulkmail.php:887
eZBulkMail\sendSingle
sendSingle( $addressID, $mailID, $user=false)
Definition: ezbulkmail.php:732
eZBulkMail\store
store()
Definition: ezbulkmail.php:66
eZBulkMail\addLogEntry
addLogEntry( $mail)
Definition: ezbulkmail.php:824
eZBulkMail\setIsDraft
setIsDraft( $value)
Definition: ezbulkmail.php:333
eZBulkMail\getAll
static getAll( $draftsOnly=false)
Definition: ezbulkmail.php:179
eZBulkMail\setDate
setDate( $value)
Definition: ezbulkmail.php:317
eZBulkMail\categories
categories( $as_object=true)
Definition: ezbulkmail.php:382
eZBulkMail\setBodyText
setBodyText( $newBody)
Definition: ezbulkmail.php:279
eZBulkMail\setOwner
setOwner( $newOwner)
Definition: ezbulkmail.php:295
eZBulkMail\$IsConnected
$IsConnected
Is true if the object has database connection, false if not.
Definition: ezbulkmail.php:895
eZBulkMail\isSent
isSent( $mail)
Definition: ezbulkmail.php:874
eZBulkMail\$ReplyTo
$ReplyTo
Definition: ezbulkmail.php:888
eZBulkMail\setSender
setSender( $newSender)
Definition: ezbulkmail.php:219
eZBulkMail\send
send( $article=false)
Definition: ezbulkmail.php:450
eZBulkMail\subject
subject( $html=true)
Definition: ezbulkmail.php:251
eZBulkMail\isDraft
isDraft()
Definition: ezbulkmail.php:325
eZDB\globalDatabase
static & globalDatabase()
Definition: ezdb.php:134
eZDateTime
Definition: ezdatetime.php:55
eZMail
Definition: ezmail.php:57
eZObjectPermission\hasPermissionWithDefinition
static hasPermissionWithDefinition( $objectID, $moduleTable, $permission, $user=false, $categoryID=false)
Definition: ezobjectpermission.php:141
$result
$result
Definition: companysearch.php:94
$results
$results
Definition: companysearch.php:81
$id
$id
Definition: companytypelist.php:193
$template_array
$template_array
Definition: countryedit.php:43
$permission
$permission
Definition: eventedit.php:315
$categories
$categories
Definition: ezarticle/admin/categoryedit.php:636
$db
$db
Definition: ezarticle/user/authorlist.php:53
$mail_array
$mail_array
Definition: ezbug/admin/cron.php:42
$groups
if( $CategoryID !=0) $groups
Definition: ezbulkmail/admin/categoryedit.php:108
$templateID
$templateID
Definition: ezbulkmail/admin/mailedit.php:71
$mail
$mail
Definition: ezbulkmail/admin/maillist.php:61
$user_array
while( $tmpTime->isGreater( $stopTime)) $user_array
Definition: ezcalendar/user/dayview.php:495
$now
$now
Definition: ezcalendar/user/dayview.php:401
$offset
$offset
Definition: ezstats/admin/cron.php:51
$categoryID
else $categoryID
Definition: productview.php:66
$category_array
$category_array
Definition: todoedit.php:604
$user
$user
Definition: user/adlist.php:39
$checkArray
for( $i=0; $i< count( $AddressID);++$i) if( $deleted) $checkArray
Definition: userwithaddress.php:823
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.