Пример #1
0
$products = array();
if ($p->accessType == MM_AccessControlEngine::$ACCESS_TYPE_MEMBERSHIP) {
    $membership = new MM_MembershipLevel($p->accessTypeId);
    if ($membership->isValid()) {
        $accessName = $membership->getName();
        $products = $membership->getProductIds();
    } else {
        echo "Payment Options Dialog: Invalid membership level ID '{$p->accessTypeId}'";
        exit;
    }
} else {
    if ($p->accessType == MM_AccessControlEngine::$ACCESS_TYPE_BUNDLE) {
        $bundle = new MM_Bundle($p->accessTypeId);
        if ($bundle->isValid()) {
            $accessName = $bundle->getName();
            $products = $bundle->getAssociatedProducts();
        } else {
            echo "Payment Options Dialog: Invalid bundle ID '{$p->accessTypeId}'";
            exit;
        }
    }
}
$actionParams = json_decode($p->lastActionParams);
$compFunction = $actionParams->mm_jshandle . ".";
$compFunction .= $actionParams->mm_compfunction . "(";
$compFunction .= htmlspecialchars(json_encode($p->lastActionParams), ENT_NOQUOTES);
$compFunction .= ");";
?>

<script>
function appendAffiliateParams(url)
Пример #2
0
<?php

/**
 * 
 * MemberMouse(TM) (http://www.membermouse.com)
 * (c) MemberMouse, LLC. All rights reserved.
 */
$bundle = new MM_Bundle($p->id);
if (!$bundle->isFree() && $bundle->getAssociatedProducts() > 0 && !$bundle->hasSubscribers()) {
    $productsDisabled = "";
} else {
    $productsDisabled = "disabled='disabled'";
}
if ($bundle->hasSubscribers()) {
    $subTypeDisabled = "disabled='disabled'";
} else {
    $subTypeDisabled = "";
}
$provider = MM_EmailServiceProviderFactory::getActiveProvider();
$provider_token = strtolower($provider->getToken());
?>
<script>
function unlockBundle()
{
	jQuery("#expiry-setting").prop('disabled', false);
}
</script>

<style>
.noticeMessage {
	background-color: #FFFFE0;