예제 #1
0
    echo _("Delete");
    ?>
</button>
				<div class="spacer"></div>
				</form>
			</div>
<?php 
}
if (isset($_POST['delete_subscriber'])) {
    // no error process form
    $msisdn = $_POST['msisdn'];
    echo "<center>";
    try {
        $sub = new Subscriber();
        $sub->get($msisdn);
        $sub->delete();
        echo "<img src='img/true.png' width='200' height='170' /><br/><br/>";
        echo "<span style='font-size: 20px;'>" . _("Subscriber successfully deleted!") . "<br/><br/>";
        echo "<a href='#'  onclick=\"parent.jQuery.fancybox.close()\"><button class='b1'>" . _("Close") . "</button></a>";
    } catch (SubscriberException $e) {
        echo "<img src='img/false.png' width='200' height='170' /><br/><br/>";
        echo "<span style='font-size: 20px; color: red;'>" . _("ERROR DELETING SUBSCRIBER!") . " " . $e->getMessage() . " </span><br/><br/><br/><br/>";
        echo "<a href='#' onclick=\"parent.jQuery.fancybox.close()\"><button class='b1'>" . _("Close") . "</button></a>";
    }
    echo "</center>";
} else {
    print_form(0, '');
}
?>

	</body>
예제 #2
0
<?php

$email = $auth = null;
if (!empty($_POST) && isset($_POST['email']) && isset($_POST['auth'])) {
    $email = $db->real_escape_string($_POST['email']);
    $auth = $db->real_escape_string($_POST['auth']);
} elseif (!empty($id) && !empty($extra)) {
    $email = $id;
    $auth = $extra;
}
if (!empty($email) && !empty($auth) && Subscriber::isValid($email, $auth)) {
    $subscriber = new Subscriber($email);
    $postman = new Postman();
    if (isset($_POST['delete_subscriber'])) {
        if ($subscriber->delete()) {
            $postman->MailSubscriptionRemoved($email);
            $template = 'subscriptions-removed.tpl';
        }
    } else {
        if ($settings['subscribe_page_content'] != '') {
            $sql = '
					SELECT *
					FROM ' . DB_PREFIX . 'pages
					WHERE url = "' . $db->real_escape_string($settings['subscribe_page_content']) . '"';
            $result = $db->query($sql);
            $pageData = $result->fetch_assoc();
            if (is_array($pageData)) {
                $html_title = $pageData['page_title'] . ' - ' . SITE_NAME;
                $meta_keywords = $pageData['keywords'];
                $meta_description = $pageData['description'];
                $smarty->assign('page', $pageData);