Esempio n. 1
0
            $attributes .= MM_Utils::getIcon('calendar-o', 'beige', '1.3em', '0px', 'Payment Plan', 'margin-right:5px;');
        } else {
            $attributes .= MM_Utils::getIcon('refresh', 'beige', '1.3em', '0px', 'Subscription', 'margin-right:5px;');
        }
    } else {
        $attributes .= "<img title='No Recurring' style='margin-right:5px;' src='" . MM_Utils::getImageUrl("clear") . "' />";
    }
    if ($product->isShippable()) {
        $attributes .= MM_Utils::getIcon('truck', 'beige', '1.3em', '0px', 'Requires Shipping', 'margin-right:5px;');
    } else {
        $attributes .= "<img title='No Shipping Required' style='margin-right:5px;' src='" . MM_Utils::getImageUrl("clear") . "' />";
    }
    if ($product->getSku() != "") {
        $attributes .= MM_Utils::getIcon('barcode', 'beige', '1.3em', '0px', "SKU [" . $product->getSku() . "]", 'margin-right:5px;');
    } else {
        $attributes .= "<img title='No SKU' style='margin-right:5px;' src='" . MM_Utils::getImageUrl("clear") . "' />";
    }
    $rows[] = array(array('content' => "<span title='ID [" . $product->getId() . "]'>" . $product->getName() . "</span>"), array('content' => $product->getBillingDescription()), array('content' => $attributes), array('content' => $accessGranted), array('content' => $purchaseLinks), array('content' => MM_Utils::getStatusImage($product->getStatus())), array('content' => $actions));
}
$headers = array('name' => array('content' => '<a onclick="mmjs.sort(\'name\');" href="#">Name</a>'), 'billing' => array('content' => 'Billing Description'), 'attributes' => array('content' => 'Attributes'), 'access' => array('content' => 'Associated Access'), 'links' => array('content' => 'Purchase Links'), 'status' => array('content' => '<a onclick="mmjs.sort(\'status\');" href="#">Status</a>'), 'actions' => array('content' => 'Actions'));
$dataGrid->setHeaders($headers);
$dataGrid->setRows($rows);
$dgHtml = $dataGrid->generateHtml();
if ($dgHtml == "") {
    $dgHtml = "<p><i>No products found.</i></p>";
}
?>
<div class="mm-wrap">
	<div class="mm-button-container">
		<a onclick="mmjs.create('mm-products-dialog', 580, 600)" class="mm-ui-button green"><?php 
echo MM_Utils::getIcon('plus-circle', '', '1.2em', '1px');
Esempio n. 2
0
        public function customizeAdminBar()
        {
            if (MM_Employee::isEmployee()) {
                global $wp_admin_bar;
                $wp_admin_bar->add_menu(array('id' => 'mm-menu', 'title' => '<img src="' . MM_Utils::getImageUrl('mm-logo-svg') . '" style="width:22px; margin-bottom:2px;" />', 'href' => MM_ModuleUtils::getUrl(MM_MODULE_DASHBOARD), 'meta' => array('title' => __('MemberMouse'))));
                $wp_admin_bar->add_menu(array("id" => "mm-manage-members", "title" => "Manage Members", "href" => MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_MEMBERS), "parent" => "mm-menu"));
                $wp_admin_bar->add_menu(array("id" => "mm-browse-transactions", "title" => "Browse Transactions", "href" => MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_TRANSACTIONS), "parent" => "mm-menu"));
                $wp_admin_bar->add_menu(array("id" => "mm-reporting-suite", "title" => "Reporting Suite", "href" => MM_ModuleUtils::getUrl(MM_MODULE_REPORTING), "parent" => "mm-menu"));
                $wp_admin_bar->add_menu(array("id" => "mm-product-settings", "title" => "Product Settings", "href" => MM_ModuleUtils::getUrl(MM_MODULE_PRODUCT_SETTINGS), "parent" => "mm-menu"));
                $wp_admin_bar->add_menu(array("id" => "mm-support-center", "title" => "Support Center", "href" => "http://membermouse.uservoice.com", "parent" => "mm-menu", "meta" => array("target" => "blank")));
            }
            if (!is_admin() && MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_SHOW_PREVIEW_BAR) == "1" && MM_Employee::isEmployee()) {
                ?>
			<style>
			#wpadminbar {
				background: linear-gradient(to top, #373737 0px, #464646 0px) repeat scroll 0 0 #464646;
				background-image: -webkit-linear-gradient(bottom,#373737 0,#464646 1px);
				border-bottom: 1px #555555 solid;
			}
			
			#wpadminbar .ab-top-secondary {
				background: linear-gradient(to top, #373737 0px, #464646 0px) repeat scroll 0 0 #464646;
				background-image: -webkit-linear-gradient(bottom,#373737 0,#464646 1px);
				border-bottom: 1px #555555 solid;
			}
			
			body {
				margin-top: 34px;
			}
			</style>
			<script type='text/javascript'>
			jQuery(document).ready(function() {
				mmPreviewJs.hideNonMemberItems();
			});
			</script>
			<?php 
            }
        }
Esempio n. 3
0
                echo $rowNum;
                ?>
col0' class="mm-dsm-cell-days">
		    				<tr valign='top'>
		    					<td class='mm-dsm-day-part1'>
		    						<a onclick="mmjs.toggleRow('<?php 
                echo $rowNum;
                ?>
','<?php 
                echo $totalColumns;
                ?>
');"><img id='mm-dsm-row<?php 
                echo $rowNum;
                ?>
col0-image' src="<?php 
                echo MM_Utils::getImageUrl('expand');
                ?>
" /></a>
		    					</td>
		    					<td  class='mm-dsm-day-number'>
		    						
		    						<input type='hidden' id='row-<?php 
                echo $rowNum;
                ?>
' value='<?php 
                echo $day;
                ?>
' />
		    						<?php 
                echo $day;
                ?>
Esempio n. 4
0
$dataGrid = new MM_DataGrid($_REQUEST, "id", "desc", 10);
$data = $view->getViewData($dataGrid);
$dataGrid->setTotalRecords($data);
$dataGrid->recordName = "membership level";
$rows = array();
foreach ($data as $key => $item) {
    $membership = new MM_MembershipLevel($item->id, false);
    // Default Flag
    $defaultDescription = "Any free membership level can be marked as the default membership level. The default membership level is used when a customer&rsquo;s first purchase is for a bundle. In this scenario, a new account will be created for the customer with the default membership level and the bundle will be applied to their account.";
    if ($item->is_default == '1') {
        $defaultFlag = MM_Utils::getDefaultFlag("Default Membership Level\n\n{$defaultDescription}", "", true, 'margin-right:5px;');
    } else {
        if ($item->status == '1' && $item->is_free == '1') {
            $defaultFlag = MM_Utils::getDefaultFlag("Set as Default Membership Level\n\n{$defaultDescription}", "onclick='mmjs.setDefault(\"" . $item->id . "\")'", false, 'margin-right:5px;');
        } else {
            $defaultFlag = "<a style='margin-right:5px;'><img src='" . MM_Utils::getImageUrl("clear") . "' /></a>";
        }
    }
    // Product Assocations
    if ($item->is_free != "1") {
        $products = array();
        $productIds = array();
        if (!empty($item->products)) {
            foreach ($item->products as $product) {
                $products[] = "<a href='" . MM_ModuleUtils::getUrl(MM_MODULE_PRODUCT_SETTINGS, MM_MODULE_PRODUCTS) . "&autoload=" . $product->id . "'>" . $product->name . "</a>";
                $productIds[] = $product->id;
            }
        }
        $productAssociations = MM_Utils::getIcon('shopping-cart', 'blue', '1.3em', '1px', 'Products', 'margin-right:5px;') . join(', ', $products);
        $membershipLevel = MM_Utils::getIcon('dollar', 'green', '1.3em', '2px', 'Paid Membership Level');
        $purchaseLinks = '<a title="Get purchase links" onclick="mmjs.showPurchaseLinks(' . $item->id . ',\'' . htmlentities(addslashes($item->name), ENT_QUOTES) . '\', \'' . join(',', $productIds) . '\')" class="mm-ui-button" style="margin:0px;">' . MM_Utils::getIcon('money', '', '1.3em', '1px', '', 'margin-right:0px;') . '</a>';