Source for file newsletters.php
Documentation is available at newsletters.php
* @copyright (c) 2005 bitweaver.org
* All Rights Reserved. See below for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details
* Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
* @author spider <spider@steelsun.com>
require_once( '../kernel/setup_inc.php' );
$gBitSystem->verifyPackage( 'newsletters' );
require_once( NEWSLETTERS_PKG_PATH. 'lookup_newsletter_inc.php' );
if( isset ( $_REQUEST["remove"] ) && $gContent->isValid() ) {
if( !empty( $_REQUEST['cancel'] ) ) {
// user cancelled - just continue on, doing nothing
} elseif( empty( $_REQUEST['confirm'] ) ) {
$formHash['remove'] = TRUE;
$formHash['nl_id'] = $gContent->mNewsletterId;
$gBitSystem->confirmDialog( $formHash,
'warning' => tra('Are you sure you want to delete this newsletter?') . ' ' . $gContent->getTitle()
header( "Location: ". NEWSLETTERS_PKG_URL. 'newsletters.php' );
} elseif (isset ($_REQUEST["save"])) {
$sid = $gContent->store( $_REQUEST );
$gContent->storePreference( 'registration_optin', !empty( $_REQUEST['registration_optin'] ) ? $_REQUEST['registration_optin'] : NULL );
header( "Location: ". $_SERVER['SCRIPT_NAME'] );
} elseif( !empty( $_REQUEST['cancel'] ) ) {
$gContent->invokeServices( 'content_edit_function' );
$newsletters = $gContent->getList( $listHash );
$gBitSmarty->assign_by_ref( 'newsletters', $newsletters );
$gBitSmarty->assign_by_ref( 'listInfo', $listHash );
// Fill array with possible number of questions per page
for ($i = 0; $i < 90; $i++) {
$aux["t"] = $i * 24 * 60 * 60;
$gBitSmarty->assign('freqs', $freqs);
$cat_objid = $_REQUEST["nl_id"];
include_once( CATEGORIES_PKG_PATH.'categorize_list_inc.php' );
$gBitSystem->display( 'bitpackage:newsletters/list_newsletters.tpl', NULL, array( 'display_mode' => 'display' ));
|