diff options
| author | Christian Fowler <spider@viovio.com> | 2005-12-25 02:23:44 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2005-12-25 02:23:44 +0000 |
| commit | c37f0b2fcd77e746b8e8a358d8d6679f8b43e0e0 (patch) | |
| tree | 8624366c57872f795c570f12a732be6ebc88c837 /index.php | |
| parent | 0aecfb52ff64d0ed06ae99752799be6d4d3d265d (diff) | |
| download | newsletters-c37f0b2fcd77e746b8e8a358d8d6679f8b43e0e0.tar.gz newsletters-c37f0b2fcd77e746b8e8a358d8d6679f8b43e0e0.tar.bz2 newsletters-c37f0b2fcd77e746b8e8a358d8d6679f8b43e0e0.zip | |
unsubscription info coming along. some schema changes to track nl_id in tiki_mail_queue
Diffstat (limited to 'index.php')
| -rw-r--r-- | index.php | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -1,6 +1,6 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_newsletters/index.php,v 1.7 2005/12/11 06:34:19 spiderr Exp $ +// $Header: /cvsroot/bitweaver/_bit_newsletters/index.php,v 1.8 2005/12/25 02:23:44 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. @@ -9,9 +9,8 @@ // Initialization require_once( '../bit_setup_inc.php' ); -if( $gBitSystem->isPackageActive( 'webmail' ) ) { - include_once( WEBMAIL_PKG_PATH.'htmlMimeMail.php' ); -} +include_once( NEWSLETTERS_PKG_PATH.'BitMailer.php' ); + $gBitSystem->verifyPackage( 'newsletters' ); $gBitSmarty->assign('confirm', 'n'); @@ -22,7 +21,12 @@ if( isset( $_REQUEST["confirm_subscription"] ) ) { } } -if( isset( $_REQUEST["unsubscribe"] ) ) { +if( isset( $_REQUEST["sub"] ) ) { + if( strlen( $_REQUEST["sub"] ) == 32 ) { + $gBitSmarty->assign( 'subInfo', BitMailer::lookupUrlCode( $_REQUEST["sub"] ) ); + } + $mid = 'bitpackage:newsletters/user_subscriptions.tpl'; +} elseif( isset( $_REQUEST["unsubscribe"] ) ) { if( $conf = $gContent->unsubscribe( $_REQUEST["unsubscribe"] ) ) { $feedback['success'] = tra( "Your email address was removed from the list of subscriptors." ); $gBitSmarty->assign('nl_info', $conf); @@ -57,7 +61,7 @@ if( isset( $_REQUEST["subscribe"] ) ) { if( $gContent->isValid() ) { $mid = 'bitpackage:newsletters/view_newsletter.tpl'; -} else { +} elseif( empty( $mid ) ) { /* List newsletters */ $listHash = array(); $newsletters = $gContent->getList( $listHash ); @@ -89,4 +93,4 @@ if( $gContent->isValid() ) { // Display the template $gBitSystem->display( $mid ); -?> +?>
\ No newline at end of file |
