本文整理汇总了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>
示例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);