當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Subscriber::delete方法代碼示例

本文整理匯總了PHP中Subscriber::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Subscriber::delete方法的具體用法?PHP Subscriber::delete怎麽用?PHP Subscriber::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Subscriber的用法示例。


在下文中一共展示了Subscriber::delete方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Subscriber

    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>
開發者ID:infercom2,項目名稱:rccn,代碼行數:31,代碼來源:subscriber_delete.php

示例2: elseif

<?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);
開發者ID:bklein01,項目名稱:jobberbase,代碼行數:31,代碼來源:page_subscriptions.php


注:本文中的Subscriber::delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。