summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2005-12-25 02:23:44 +0000
committerChristian Fowler <spider@viovio.com>2005-12-25 02:23:44 +0000
commitc37f0b2fcd77e746b8e8a358d8d6679f8b43e0e0 (patch)
tree8624366c57872f795c570f12a732be6ebc88c837 /index.php
parent0aecfb52ff64d0ed06ae99752799be6d4d3d265d (diff)
downloadnewsletters-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.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/index.php b/index.php
index a1dfc6d..7a0a32c 100644
--- a/index.php
+++ b/index.php
@@ -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