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


PHP Subscription::FindByEmail方法代碼示例

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


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

示例1: die

<?php

/*
 * ReDonate is more free software. It is licensed under the WTFPL, which
 * allows you to do pretty much anything with it, without having to
 * ask permission. Commercial use is allowed, and no attribution is
 * required. We do politely request that you share your modifications
 * to benefit other developers, but you are under no enforced
 * obligation to do so :)
 * 
 * Please read the accompanying LICENSE document for the full WTFPL
 * licensing text.
 */
if (!isset($_APP)) {
    die("Unauthorized.");
}
try {
    $sSubscription = Subscription::FindByEmail($router->uParameters[1], $router->uParameters[2]);
} catch (NotFoundException $e) {
    throw new RouterException("No such subscription was found.");
}
$sRouterAuthenticated = true;
開發者ID:GodOfConquest,項目名稱:redonate,代碼行數:22,代碼來源:subscription.php

示例2: die

/*
 * ReDonate is more free software. It is licensed under the WTFPL, which
 * allows you to do pretty much anything with it, without having to
 * ask permission. Commercial use is allowed, and no attribution is
 * required. We do politely request that you share your modifications
 * to benefit other developers, but you are under no enforced
 * obligation to do so :)
 * 
 * Please read the accompanying LICENSE document for the full WTFPL
 * licensing text.
 */
if (!isset($_APP)) {
    die("Unauthorized.");
}
$sOtherSubscriptions = array();
foreach (Subscription::FindByEmail($sSubscription->sEmailAddress) as $sOtherSubscription) {
    /* We don't want to add the currently visible subscription to the
     * list of other subscriptions. */
    if ($sOtherSubscription->sId != $sSubscription->sId) {
        if ($sOtherSubscription->sIsConfirmed == false) {
            $sStatus = "Awaiting confirmation";
        } elseif ($sOtherSubscription->sIsActive == true) {
            $sStatus = "Active";
        } else {
            $sStatus = "Cancelled";
        }
        $sOtherSubscriptions[] = array("name" => $sOtherSubscription->sCampaign->sName, "amount" => Currency::Format($sOtherSubscription->sCurrency, $sOtherSubscription->sAmount), "key" => $sOtherSubscription->sSettingsKey, "status" => $sStatus);
    }
}
if ($sSubscription->sIsConfirmed == false) {
    $sStatus = "Awaiting confirmation";
開發者ID:GodOfConquest,項目名稱:redonate,代碼行數:31,代碼來源:manage.php

示例3: array

}
try {
    $exists = false;
    Subscription::CreateFromQuery("SELECT * FROM subscriptions WHERE `EmailAddress` = :EmailAddress AND `Confirmed` = 0", array(":EmailAddress" => $_POST['email']));
    $exists = true;
} catch (NotFoundException $e) {
    $exists = false;
}
if ($exists) {
    flash_error("That e-mail address has subscribed before and is currently awaiting confirmation.");
    require "modules/landing.php";
    return;
}
try {
    $exists = false;
    foreach (Subscription::FindByEmail($_POST['email']) as $sSubscription) {
        if ($sSubscription->sCampaignId == $sCampaign->sId && $sSubscription->sIsActive == true) {
            $exists = true;
            $sExistingSubscription = $sSubscription;
        }
    }
} catch (NotFoundException $e) {
    $exists = false;
}
if ($exists) {
    $sPageContents = NewTemplater::Render("subscription/change", $locale->strings, array());
    $sChangeRequest = new ChangeRequest(0);
    $sChangeRequest->uKey = random_string(16);
    $sChangeRequest->uOldCurrency = $sExistingSubscription->sCurrency;
    $sChangeRequest->uOldAmount = $sExistingSubscription->sAmount;
    $sChangeRequest->uNewCurrency = $_POST['currency'];
開發者ID:GodOfConquest,項目名稱:redonate,代碼行數:31,代碼來源:subscribe.php


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