summaryrefslogtreecommitdiff
path: root/edition_edit.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2005-12-10 22:24:23 +0000
committerChristian Fowler <spider@viovio.com>2005-12-10 22:24:23 +0000
commit34a8fac038f903976d5696a1e2cdaad2100232ca (patch)
treeb881d2c993cba0c6a43bbf3ea76d95fac721f3cf /edition_edit.php
parent845c78b116b1074200c4a4d198aeddd8cfbc0376 (diff)
downloadnewsletters-34a8fac038f903976d5696a1e2cdaad2100232ca.tar.gz
newsletters-34a8fac038f903976d5696a1e2cdaad2100232ca.tar.bz2
newsletters-34a8fac038f903976d5696a1e2cdaad2100232ca.zip
break out edition editing
Diffstat (limited to 'edition_edit.php')
-rw-r--r--edition_edit.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/edition_edit.php b/edition_edit.php
new file mode 100644
index 0000000..b7360ca
--- /dev/null
+++ b/edition_edit.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ *
+ * Copyright (c) 2005 bitweaver.org
+ * All Rights Reserved. See copyright.txt for details and a complete list of authors.
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
+ *
+ * created 2005/12/10
+ *
+ * @author spider <spider@steelsun.com>
+ */
+
+// Initialization
+require_once( '../bit_setup_inc.php' );
+include_once( NEWSLETTERS_PKG_PATH.'nl_lib.php' );
+include_once( UTIL_PKG_PATH.'htmlMimeMail.php' );
+
+$gBitSystem->verifyPackage( 'newsletters' );
+
+require_once( NEWSLETTERS_PKG_PATH.'lookup_newsletter_edition_inc.php' );
+
+$listHash = array();
+$newsletters = $gContent->mNewsletter->getList( $listHash );
+$gBitSmarty->assign( 'newsletters', $newsletters );
+
+if (isset($_REQUEST["preview"])) {
+ $gBitSmarty->assign('preview', 'y');
+
+ //$parsed = $tikilib->parse_data($_REQUEST["content"]);
+ $parsed = $_REQUEST["edit"];
+ $gBitSmarty->assign('parsed', $parsed);
+ $info["data"] = $_REQUEST['edit'];
+ $info["subject"] = $_REQUEST['title'];
+ $gBitSmarty->assign('info', $info);
+} elseif (isset($_REQUEST["save"])) {
+ // Now send the newsletter to all the email addresses and save it in sent_newsletters
+ $gBitSmarty->assign('presend', 'y');
+
+ $subscribers = $nllib->get_subscribers($_REQUEST["nl_id"]);
+ $gBitSmarty->assign('nl_id', $_REQUEST["nl_id"]);
+ $gBitSmarty->assign('edit', $_REQUEST['edit']);
+ $gBitSmarty->assign('subject', $_REQUEST['title']);
+ $cant = count($subscribers);
+ $gBitSmarty->assign('subscribers', $cant);
+}
+
+// Display the template
+$gBitSystem->display( 'bitpackage:newsletters/edit_edition.tpl' );
+
+
+?> \ No newline at end of file