예제 #1
0
<?php

@(include_once 'commons.php');
$options = get_option('newsletter');
if ($_POST['a'] == 'resend' && check_admin_referer()) {
    newsletter_send_confirmation(newsletter_get_subscriber(newsletter_request('id')));
    $_POST['a'] = 'search';
}
if ($_POST['a'] == 'remove' && check_admin_referer()) {
    newsletter_delete(newsletter_request('id'));
    $_POST['a'] = 'search';
}
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;
예제 #2
0
<?php

if ($access != 'VALID') {
    header('location:../../index.php');
}
if (!isset($_SESSION['admin'])) {
    header('location:../../index.php');
}
include_once 'model/contact/fonctions_newsletter.php';
$retour = "";
if (isset($_GET['a'])) {
    if (newsletter_delete($_GET['a'])) {
        $retour = "Le contact newsletter a bien été supprimé";
    } else {
        $retour = "Il y a eu une erreur lors de la suppression du contact newsletter, veuillez réessayer";
    }
}
$newsletters = afficher_newsletter();
$title = 'Message reçus';
include_once 'view/contact/newsletter.php';