Ejemplo n.º 1
0
            break;
    }
    $rows[] = array(array('content' => $eventName . $eventNameAttributes), array('content' => $description), array('content' => MM_Utils::getStatusImage($item->status)), array('content' => $actions));
}
$dataGrid->setHeaders($headers);
$dataGrid->setRows($rows);
$dgHtml = $dataGrid->generateHtml();
if ($dgHtml == "") {
    $dgHtml = "<p><i>No push notifications configured.</i></p>";
}
$filePath = MM_TEMPLATE_BASE . "/push_notification_sample.php";
?>
<div class="mm-wrap">
    
    <?php 
if (MM_MemberMouseService::hasPermission(MM_MemberMouseService::$FEATURE_PUSH_NOTIFICATIONS)) {
    ?>
	<div class="mm-button-container">
		<a onclick="mmjs.create('mm-push-notification-dialog', '510', '570')" class="mm-ui-button green"><?php 
    echo MM_Utils::getIcon('plus-circle', '', '1.2em', '1px');
    ?>
 Create Push Notification</a>
	</div>
	
	<div class="clear"></div>
	
	<?php 
    echo $dgHtml;
    ?>
	<?php 
} else {
Ejemplo n.º 2
0
		<tr id="mm-additional-permissions-row" style="display:none;">
			<td>Additional Permissions</td>
			<td>
				<input id="mm-allow-export" type="checkbox" <?php 
echo $employee->doAllowExport() ? "checked" : "";
?>
 onchange="mmjs.changeAllowExport();" /> Allow this employee to export data
				<input id="mm-allow-export-val" type="hidden" value="<?php 
echo $employee->doAllowExport() ? "1" : "0";
?>
" />
			</td>
		</tr>
		
		<?php 
if (MM_MemberMouseService::hasPermission(MM_MemberMouseService::$FEATURE_EMPLOYEE_ACCOUNTS)) {
    $selectedMemberships = array();
    $restrictions = $employee->getAccessRescrictions(MM_Employee::$ACCESS_TYPE_MEMBERSHIP);
    foreach ($restrictions as $key => $value) {
        $selectedMemberships[$value] = $value;
    }
    ?>
		<tr id="mm-access-restriction-row" style="display:none;">
			<td>Access Restrictions</td>
			<td>
			<?php 
    $accessDesc = "By selecting one or more membership levels below you're indicating that the employee should only be able to manage members with one of those membership levels. When no membership levels are selected this indicates that the employee should be able to manage all members.";
    ?>
			Allowed Membership Levels<?php 
    echo MM_Utils::getInfoIcon($accessDesc);
    ?>
Ejemplo n.º 3
0
<?php

$showContent = true;
$error = "";
if (isset($_GET["update"]) && $_GET["update"] == "true") {
    MM_MemberMouseService::authorize();
    $reportingDashboard = MM_ModuleUtils::getUrl(MM_MODULE_REPORTING);
    if (MM_MemberMouseService::hasPermission(MM_MemberMouseService::$FEATURE_REPORTING_SUITE) == MM_MemberMouseService::$ACTIVE) {
        ?>
			<h2 class="mm-dashboard-title">Congratulations! Advanced Reporting has been activated.</h2>
			
			<p style="line-height:30px;"><a href="<?php 
        echo $reportingDashboard;
        ?>
" class="mm-ui-button green">Go to Reporting Dashboard</a></p>
	<?php 
        $showContent = false;
    } else {
        $error = "Your license doesn't have access to the advanced reporting suite. Contact <a href='mailto:support@membermouse.com'>MemberMouse support</a> if you need assistance upgrading.";
    }
}
if ($showContent) {
    $getReportingUrl = MM_ModuleUtils::getUrl(MM_MODULE_GET_REPORTING);
    if (!empty($error)) {
        echo "<div class='error'><p>{$error}</p></div>";
    }
    ?>
<style>
#mm-upgrade-container { }
#mm-upgrade-content { padding-right:60px; }
#mm-upgrade-col-left { float: left; width: 700px; }
Ejemplo n.º 4
0
{
	jQuery("#"+id).show();

	if(id == "mm-churn-description")
	{
		jQuery("#"+id).dialog({autoOpen: true, width: "575", height: "480"});
	}
	else
	{
		jQuery("#"+id).dialog({autoOpen: true, width: "575", height: "300"});
	}
}
</script>

<?php 
$hasAdvancedReporting = MM_MemberMouseService::hasPermission(MM_MemberMouseService::$FEATURE_REPORTING_SUITE) == MM_MemberMouseService::$ACTIVE ? true : false;
$crntPage = MM_ModuleUtils::getPage();
if ($hasAdvancedReporting) {
    if ($crntPage != MM_MODULE_REPORTING) {
        ?>
		<a class="mm-ui-button" onclick="showDescription('mm-report-description')" style='position: absolute; right: 150px; top: -4px;'>About</a>
	<?php 
    } else {
        ?>
		<a class="mm-ui-button" href="http://membermouse.uservoice.com/knowledgebase/articles/404652" target="_blank" style="position: absolute; right: 150px; top: -4px;">How to Use Reporting</a>
	<?php 
    }
    ?>
	
	
	
Ejemplo n.º 5
0
    // Lime Light Shipping Method
    $llShippingMethod = "{$item->limelight_shipping_method_name} [{$item->limelight_shipping_method_id}]";
    $llShippingMethod .= '<a href="javascript:mmjs.getLimeLightShippingDescription(\'' . $item->limelight_shipping_method_id . '\');" style="margin-left: 5px; cursor:pointer;" title="View Lime Light Shipping Method Info">' . MM_Utils::getIcon("info-circle", "blue", "1.3em", "2px;") . '</a>';
    $rows[] = array(array('content' => $llShippingMethod), array('content' => $mmShippingMethodName), array('content' => $actions));
}
$headers = array('limelight_shipping_method_name' => array('content' => '<a onclick="mmjs.sort(\'limelight_shipping_method_name\');" href="#">Lime Light Shipping Method</a>'), 'membermouse_shipping_method_id' => array('content' => 'MemberMouse Shipping Method'), 'actions' => array('content' => 'Actions', 'attr' => 'style="width:50px;"'));
$dataGrid->setHeaders($headers);
$dataGrid->setRows($rows);
$dgHtml = $dataGrid->generateHtml();
if ($dgHtml == "") {
    $dgHtml = "<p><em>No shipping method mappings.</em></p>";
}
?>
<div class="mm-wrap">
	<?php 
if (MM_MemberMouseService::hasPermission(MM_MemberMouseService::$PYMT_SERVICE_LIMELIGHT)) {
    $shippingMethods = MM_ShippingMethod::getAvailableShippingOptions();
    if (count($shippingMethods) > 0) {
        $unmappedShippingMethods = MM_LimeLightShippingMethod::getUnmappedShippingMethods();
        if (count($unmappedShippingMethods) > 0) {
            ?>
				<div class="mm-button-container">
					<a onclick="mmjs.create('mm-limelight-shipping-methods-dialog', 550, 235)" class="mm-ui-button green"><?php 
            echo MM_Utils::getIcon('plus-circle', '', '1.2em', '1px');
            ?>
 Create Shipping Method Mapping</a>
				</div>
				<?php 
        }
        ?>
			
Ejemplo n.º 6
0
echo htmlentities($membership->getEmailBody(), ENT_QUOTES, 'UTF-8', true);
?>
</textarea>
					</div>
				</div>
				<input id='id' type='hidden' value='<?php 
if ($membership->getId() != 0) {
    echo $membership->getId();
}
?>
' />
			</td>
		</tr>
		
		<?php 
if (MM_MemberMouseService::hasPermission(MM_MemberMouseService::$FEATURE_BUNDLES)) {
    ?>
		<tr>
			<td colspan="2">
			<div style="width: 600px; margin-top: 8px;" class="mm-divider"></div>
			</td>
		</tr>
		
		<tr>
			<td>Bundles<?php 
    echo MM_Utils::getInfoIcon("Select the bundles that members with this membership level should automatically get access to.");
    ?>
</td>
			<td>
				<select id="mm-bundles[]" size="5" multiple="multiple" style="width:100%">
				<?php 
Ejemplo n.º 7
0
require_once "../../../../wp-load.php";
require_once "../includes/mm-constants.php";
require_once "../includes/init.php";
require_once "classes/class.response.php";
require_once "classes/class.utils.php";
require_once "include/loadLibrary.php";
require_once 'controllers/class.webcontroller.php';
require_once 'controllers/class.membercontroller.php';
require_once 'controllers/class.releasecontroller.php';
require_once 'include/constants.php';
$_GET["q"] = isset($_GET["q"]) && $_GET["q"] != null ? $_GET["q"] : "";
$rest = new RestServer($_GET["q"]);
$ref = isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : "";
$ip = isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : "";
$rest->addMap("GET", "/?", "WebController");
if (MM_Utils::isMemberMouseActive() && MM_MemberMouseService::hasPermission(MM_MemberMouseService::$FEATURE_API)) {
    $rest->addMap("GET", "/createMember", "MemberController::createMember");
    $rest->addMap("POST", "/createMember", "MemberController::createMember");
    $rest->addMap("GET", "/purchaseBundle", "MemberController::purchaseBundle");
    $rest->addMap("POST", "/purchaseBundle", "MemberController::purchaseBundle");
    $rest->addMap("GET", "/updateMember", "MemberController::updateMember");
    $rest->addMap("POST", "/updateMember", "MemberController::updateMember");
    $rest->addMap("GET", "/getMember", "MemberController::getMember");
    $rest->addMap("POST", "/getMember", "MemberController::getMember");
    // added as temporary end point for SamCart to use until our new API is released
    $rest->addMap("GET", "/addMember", "MemberController::addMember");
    $rest->addMap("POST", "/addMember", "MemberController::addMember");
    $rest->addMap("GET", "/addBundle", "MemberController::addBundle");
    $rest->addMap("POST", "/addBundle", "MemberController::addBundle");
    $rest->addMap("GET", "/removeBundle", "MemberController::removeBundle");
    $rest->addMap("POST", "/removeBundle", "MemberController::removeBundle");
Ejemplo n.º 8
0
    $totalRows = count($generatedRows);
    $usedPages = array();
    foreach ($generatedRows as $day => $pages) {
        foreach ($pages as $row) {
            if (!isset($usedPages[$row->post_id])) {
                $usedPages[$row->post_id] = $row->post_id;
                //$totalRows++;
            }
        }
    }
}
$rowCache = array();
?>
<div class="mm-wrap">
    <?php 
if (MM_MemberMouseService::hasPermission(MM_MemberMouseService::$FEATURE_DRIP_CONTENT_SCHEDULE)) {
    ?>
    <div style='padding-top: 10px;'>
    	<div class='mm-dsm-view-schedule'>
    	<form id="mm_dsm_form_tag" method='post'>
    	<input type='hidden' id='mm-expanded-rows' name="mm_expanded_rows" value='' />
    	<div class='mm-dsm-section-summary' style="width:280px;">
    		View the drip content schedule for the following...
    	</div>
    	<div class='mm-dsm-options'>
    		<?php 
    echo $viewDeliveryAccessTypes;
    ?>
    	</div>
    	<div class='mm-dsm-clear10'></div>
    	<div id='mm-custom'></div>
Ejemplo n.º 9
0
 public function addFilters()
 {
     global $wpdb;
     $user_hooks = new MM_UserHooks();
     add_filter('login_redirect', array($user_hooks, 'loginRedirect'), 1, 3);
     add_filter('template_redirect', array($user_hooks, 'handlePageAccess'));
     $useMMLoginPage = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_USE_MM_LOGIN_PAGE);
     if ($useMMLoginPage == "1") {
         add_filter('login_url', array($user_hooks, "loginUrl"), 1, 2);
     }
     add_filter('logout_url', array($user_hooks, "logoutUrl"), 1, 2);
     // add WP menu filters
     $showLoginLogoutLink = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_SHOW_LOGIN_LOGOUT_LINK);
     if ($showLoginLogoutLink == "1") {
         add_filter('wp_nav_menu_items', array($user_hooks, 'showLoginLogoutLinkInMenu'), 10, 2);
     }
     $hideMenuItems = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_HIDE_PROTECTED_MENU_ITEMS);
     if ($hideMenuItems == "1") {
         add_filter('wp_setup_nav_menu_item', array($user_hooks, 'hideProtectedMenuItems'));
     }
     add_filter('the_title', 'do_shortcode', 9);
     add_filter('wp_title', 'do_shortcode', 9);
     // add MM link footer
     if (class_exists("MM_MemberMouseService") && MM_MemberMouseService::hasPermission(MM_MemberMouseService::$SHOW_MM_FOOTER) == MM_MemberMouseService::$ACTIVE) {
         add_filter('wp_footer', array($this, 'addMMFooter'), 9);
     }
     $post_hook = new MM_PostHooks();
     add_filter('manage_posts_columns', array($post_hook, 'postsColumns'), 5);
     add_filter('manage_pages_columns', array($post_hook, 'pagesColumns'), 5);
     add_filter('posts_where', array($post_hook, 'handlePostWhere'), 1, 1);
     add_filter('wp_head', array($post_hook, "checkPosts"));
     add_filter('the_content', array($this, "filterContent"), 10);
     //prevent members with pending status from logging in
     add_filter('authenticate', array($user_hooks, 'checkLogin'), 100, 3);
     //prevent wptexturize from running on mm_form tags
     add_filter('no_texturize_shortcodes', function ($shortcodes) {
         $shortcodes[] = 'MM_Form';
         return $shortcodes;
     });
 }
Ejemplo n.º 10
0
    $editActionUrl = 'onclick="mmjs.edit(\'mm-api-keys-dialog\', \'' . $item->id . '\', 500, 280)"';
    $deleteActionUrl = 'onclick="mmjs.remove(\'' . $item->id . '\')"';
    $actions = MM_Utils::getEditIcon("Edit API Credentials", '', $editActionUrl);
    $actions .= MM_Utils::getDeleteIcon("Delete API Credentials", 'margin-left:5px;', $deleteActionUrl);
    $rows[] = array(array('content' => "<span title='ID [" . $item->id . "]'>" . $item->name . "</span>"), array('content' => "<span style='font-family:courier; font-size:12px;'>" . $item->api_key . "</span>"), array('content' => "<span style='font-family:courier; font-size:12px;'>" . $item->api_secret . "</span>"), array('content' => MM_Utils::getStatusImage($item->status)), array('content' => $actions));
}
$dataGrid->setHeaders($headers);
$dataGrid->setRows($rows);
$dgHtml = $dataGrid->generateHtml();
if ($dgHtml == "") {
    $dgHtml = "<p><i>No API credentials found.</i></p>";
}
?>
<div class="mm-wrap">
	<?php 
if (MM_MemberMouseService::hasPermission(MM_MemberMouseService::$FEATURE_API)) {
    ?>
		<p style="margin-top:10px">
			<span class="mm-section-header">API URLs</span>
		</p>
		<p style="margin-left:15px;">
			Standard URL:<br/>
			<span style="font-family:courier; font-size:11px;">
				<input id="mm-api-url" type="text" readonly value="<?php 
    echo MM_API_URL;
    ?>
" style="width:600px" onclick="jQuery('#mm-api-url').focus(); jQuery('#mm-api-url').select();" />
			</span>
		</p>
		<p style="margin-left:15px;">
			Secure URL:<br/>