Ejemplo n.º 1
0
function overview()
{
	?>
	<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
	<script src="http://www.isocra.com/js/tablednd.js" type="text/javascript"></script>
	<div class="wrap">
	<h2>Newsletter Creator</h2>
		<?php
				if(isset($_POST['Create'])) {
					newsletter_save($_POST);
				} elseif(isset($_POST['Update'])) {
					newsletter_update($_POST);
				} else {
					show_newsletter_list();
				}
			?>
		</div>
	<?php
}
Ejemplo n.º 2
0
}
if ($_POST['removeall'] && check_admin_referer()) {
    newsletter_delete_all();
}
if ($_POST['removeallunconfirmed'] && check_admin_referer()) {
    newsletter_delete_all('S');
}
if ($_POST['showallunconfirmed'] && check_admin_referer()) {
    $list = newsletter_get_unconfirmed();
}
if ($_POST['a'] == 'status' && check_admin_referer()) {
    newsletter_set_status(newsletter_request('id'), newsletter_request('status'));
    $_POST['a'] = 'search';
}
if ($_POST['a'] == 'save' && check_admin_referer()) {
    newsletter_save(stripslashes_deep($_POST['subscriber']));
    $_POST['a'] = 'search';
}
if ($_POST['a'] == 'search' && check_admin_referer()) {
    $status = isset($_POST['unconfirmed']) ? 'S' : null;
    $order = $_POST['order'];
    $list = newsletter_search(newsletter_request('text'), $status, $order);
}
$options = null;
$nc = new NewsletterControls($options, 'manage');
?>
<script type="text/javascript">
    function newsletter_detail(id)
    {
        document.getElementById("action").value = "detail";
        document.getElementById("id").value = id;
Ejemplo n.º 3
0
        // If the user is new, we simply add it
        if (empty($user)) {
            newsletter_save($subscriber);
            continue;
        }
        if ($options['mode'] == 'skip') {
            $error[] = '[DUPLICATE] ' . $line;
            continue;
        }
        if ($options['mode'] == 'overwrite') {
            $subscriber['id'] = $user['id'];
            newsletter_save($subscriber);
            continue;
        }
        if ($options['mode'] == 'update') {
            newsletter_save(array_merge($user, $subscriber));
        }
    }
}
$nc = new NewsletterControls();
$nc->errors($errors);
$nc->messages($messages);
$lists = array('0' => 'All');
for ($i = 1; $i <= NEWSLETTER_LIST_MAX; $i++) {
    $lists['' . $i] = '(' . $i . ') ' . $options_profile['list_' . $i];
}
?>

<div class="wrap">
    <h2>Newsletter Import/Export</h2>
    <form method="post" action="">