diff options
| author | Christian Fowler <spider@viovio.com> | 2005-12-11 08:22:51 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2005-12-11 08:22:51 +0000 |
| commit | a8760e54d6a9480e595b7e70e80f0dd6d57f053f (patch) | |
| tree | 64dd4ab45152e741c1f6295f7dddac7f778d66f6 /admin/send.php | |
| parent | 643f1d7f43ef14bb415fd69ba435035d1426a3a9 (diff) | |
| download | newsletters-a8760e54d6a9480e595b7e70e80f0dd6d57f053f.tar.gz newsletters-a8760e54d6a9480e595b7e70e80f0dd6d57f053f.tar.bz2 newsletters-a8760e54d6a9480e595b7e70e80f0dd6d57f053f.zip | |
almost have sending working - now gets a list of users from the group selection, shows newsletter preview
Diffstat (limited to 'admin/send.php')
| -rw-r--r-- | admin/send.php | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/admin/send.php b/admin/send.php index 98a8b62..c5558fc 100644 --- a/admin/send.php +++ b/admin/send.php @@ -1,6 +1,6 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_newsletters/admin/send.php,v 1.5 2005/12/11 06:34:19 spiderr Exp $ +// $Header: /cvsroot/bitweaver/_bit_newsletters/admin/send.php,v 1.6 2005/12/11 08:22:51 spiderr Exp $ // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. @@ -26,8 +26,14 @@ $gBitSmarty->assign('preview', 'n'); $gBitSmarty->assign('presend', 'n'); $gBitSmarty->assign('emited', 'n'); -if (isset($_REQUEST["send"])) { - $subscribers = $nllib->get_subscribers($_REQUEST["nl_id"]); +if( $gContent->isValid() && isset( $_REQUEST['preview'] ) ) { + $recipients = $gContent->getRecipients( $_REQUEST['send_group'] ); + $gBitSmarty->assign_by_ref( 'recipientList', $recipients ); +} elseif( $gContent->isValid() && isset( $_REQUEST["send"] ) ) { + $emails = $gContent->getRecipients( $_REQUEST['send_group'] ); +vd( $emails ); +vd( $_REQUEST ); +die; $mail = new htmlMimeMail(); $mail->setFrom('noreply@noreply.com'); @@ -58,14 +64,20 @@ if (isset($_REQUEST["send"])) { $nllib->replace_edition($_REQUEST["nl_id"], $_REQUEST['title'], $_REQUEST['edit'], $sent); } -$listHash = array(); -$editions = $gContent->getList( $listHash ); -$gBitSmarty->assign_by_ref( 'editionList', $editions ); -$gBitSmarty->assign( 'listInfo', $listHash ); +if( $gContent->isValid() ) { + $groupListHash = array(); + $groups = $gBitUser->getAllGroups( $groupListHash ); + $gBitSmarty->assign_by_ref( 'groupList', $groups['data'] ); +} else { + $listHash = array(); + $editions = $gContent->getList( $listHash ); + $gBitSmarty->assign_by_ref( 'editionList', $editions ); + $gBitSmarty->assign( 'listInfo', $listHash ); -if( $gBitSystem->isFeatureActive( 'tiki_p_use_content_templates' ) ) { - $templates = $tikilib->list_templates('newsletters', 0, -1, 'name_asc', ''); - $gBitSmarty->assign_by_ref('templates', $templates["data"]); + if( $gBitSystem->isFeatureActive( 'tiki_p_use_content_templates' ) ) { + $templates = $tikilib->list_templates('newsletters', 0, -1, 'name_asc', ''); + $gBitSmarty->assign_by_ref('templates', $templates["data"]); + } } // Display the template |
