/**
  * Diagnostic method that responds if MemberMouse is active and working correctly
  * 
  * @param RestServer $rest An instance of the RestServer
  * @return Response object with status 200 containing if MemberMouse is installed, receives the request, and is able to respond
  */
 public function ping($rest)
 {
     $result = MM_MemberMouseService::ping();
     if ($result instanceof MM_Response) {
         return new Response($rest, $result->message, $result->message, RESPONSE_ERROR_CODE_INTERNAL, RESPONSE_ERROR_CODE_INTERNAL);
     }
     if ($result) {
         return new Response($rest, "PONG", "PONG");
     } else {
         return new Response($rest, "Plugin authorization failed", "Plugin authorization failed", RESPONSE_ERROR_CODE_INTERNAL, RESPONSE_ERROR_MESSAGE_INTERNAL);
     }
 }
示例#2
0
 public function getData()
 {
     if (class_exists("MM_MemberMouseService")) {
         if (method_exists("MM_MemberMouseService", "getLicense")) {
             MM_MemberMouseService::getLicense($this);
         } else {
             // TODO remove this after all customers migrated from 1.x
             // protect from 1.x versions of MemberMouse trying to upgrade directly
             $error = "<div style='font-family: sans-serif; font-size: 13px;'>";
             $error .= "<h3 style='color:#BC0B0B; margin-top:0px; margin-bottom:5px; font-size: 14px;'>Cannot Upgrade to MemberMouse 2.0</h3>";
             $error .= "<p style='margin-top:0px; margin-bottom:5px;'>Before you can upgrade MemberMouse 2.0 you must export your data and uninstall the current version of MemberMouse.</p>";
             $error .= "<p style='margin-top:0px; margin-bottom:5px;'>Please contact us at <a href='mailto:support@membermouse.com'>support@membermouse.com</a> for more information on upgrading to MemberMouse 2.0.</p>";
             $error .= "</div>";
             $vars = new stdClass();
             $vars->content = $error;
             echo $error;
             MM_DiagnosticLog::log(MM_DiagnosticLog::$MM_ERROR, "deactivated in MM_License::getData()");
             @deactivate_plugins(MM_PLUGIN_ABSPATH . "/index.php", false);
             exit;
         }
     } else {
         parent::invalidate();
     }
 }
            ?>
 Create Shipping Method Mapping</a>
				</div>
				<?php 
        }
        ?>
			
				<div class="clear"></div>
				
				<div style="width:65%;">
					<?php 
        echo $dgHtml;
        ?>
				</div>
	<?php 
    } else {
        echo "<p><em>No MemberMouse shipping methods created.</em></p>";
    }
} else {
    ?>
		<?php 
    echo MM_Utils::getIcon('lock', 'yellow', '1.3em', '2px');
    ?>
		This feature is not available on your current plan. To get access, <a href="<?php 
    echo MM_MemberMouseService::getUpgradeUrl(MM_MemberMouseService::$PYMT_SERVICE_LIMELIGHT);
    ?>
" target="_blank">upgrade your plan now</a>.
	<?php 
}
?>
</div>
示例#4
0
    ?>
		1. Cache directory permissions modified successfully<br/>
		<?php 
}
?>
		
		2. Refreshing cache... <br/>
		<em>Please wait...</em><br/>
		
		<?php 
@ob_end_flush();
@ob_flush();
@flush();
@ob_start();
// refresh cache
MM_MemberMouseService::authorize();
?>
		
		Cache refreshed successfully<br/>
		
		3. Repairing database indexes...<br/>
		<em>Please wait</em><br/>
		<?php 
$tableIndexesToPurge = array("mm_membership_levels" => "name", "mm_commission_profiles" => "name", "mm_orders" => "order_number", "mm_transaction_key" => "transaction_key", "mm_payment_services" => "token", "mm_shipping_methods" => "token", "mm_social_login_providers" => "token");
foreach ($tableIndexesToPurge as $table => $indexRoot) {
    $enumerationQuery = "SHOW INDEXES FROM {$table} WHERE Non_unique=0 AND Key_name LIKE '{$indexRoot}%'";
    $enumerationResults = $wpdb->get_results($enumerationQuery);
    foreach ($enumerationResults as $enumeratedResult) {
        $wpdb->query("DROP INDEX {$enumeratedResult->Key_name} ON {$table}");
    }
}
示例#5
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 
    }
    ?>
	
	
	
示例#6
0
<?php

/**
 *
 * MemberMouse(TM) (http://www.membermouse.com)
 * (c) MemberMouse, LLC. All rights reserved.
 */
if (isset($_REQUEST["mm-update-license"])) {
    MM_MemberMouseService::authorize(false);
}
$license = new MM_License();
$permissions = $license->getPermissions();
if (!empty($permissions)) {
    $permissions = "";
    $obj = json_decode($license->getPermissions());
    if ($obj) {
        foreach ($obj as $key => $value) {
            $permissions .= $key . ": " . $value . "<br/>";
        }
    } else {
        $permissions = $data->{$fieldName};
    }
}
?>
<div class="mm-wrap">
    <p class="mm-header-text">License</p>
	
	<form method="post">
		<input type="hidden" name="mm-update-license" value="1" />
		<input type='submit' value='Update License' class="mm-ui-button blue" />
	</form>
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 
示例#8
0
 public function authenticateWithMM()
 {
     if (class_exists("MM_MemberMouseService")) {
         return MM_MemberMouseService::authorize();
     }
     return false;
 }
示例#9
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; }
示例#10
0
';
alert(message.replace(/[\|]+/g, "\n\n"));
<?php 
    }
    foreach ($expandedRows as $row) {
        if (isset($rowCache[$row])) {
            ?>
mmjs.toggleRow('<?php 
            echo $rowCache[$row];
            ?>
', '<?php 
            echo $totalRows;
            ?>
');
<?php 
        }
    }
    ?>
</script>
<?php 
} else {
    ?>
	<?php 
    echo MM_Utils::getIcon('lock', 'yellow', '1.2em', '1px');
    ?>
	This feature is not available on your current plan. To get access, <a href="<?php 
    echo MM_MemberMouseService::getUpgradeUrl(MM_MemberMouseService::$FEATURE_DRIP_CONTENT_SCHEDULE);
    ?>
" target="_blank">upgrade your plan now</a>.
<?php 
}
示例#11
0
文件: index.php 项目: huynp/Critical
 public function showNotices()
 {
     $this->checkVersion();
     // check to see if cache is being used
     $writeableDir = MM_PLUGIN_ABSPATH . "/com/membermouse/cache";
     $usingDbCache = false;
     if (class_exists("MM_Session")) {
         $usingDbCache = MM_Session::value(MM_Session::$KEY_USING_DB_CACHE);
         if (empty($usingDbCache)) {
             $usingDbCache = false;
         }
     }
     if (!isset($_GET['module']) || $_GET['module'] != MM_MODULE_REPAIR_INSTALL) {
         $cacheRepairUrl = MM_ModuleUtils::getUrl(MM_MODULE_GENERAL_SETTINGS, MM_MODULE_REPAIR_INSTALL);
         if (!file_exists($writeableDir) || is_dir($writeableDir) && !is_writeable($writeableDir)) {
             MM_Messages::addMessage("Currently MemberMouse can't utilize the cache. <a href='{$cacheRepairUrl}'>Click here to correct this.</a>");
             if (!file_exists($writeableDir)) {
                 @mkdir($writeableDir);
                 //if the cache directory is missing, attempt to create it silently if possible
             }
         } else {
             if ($usingDbCache) {
                 //this means the dbcache is in use, but the cache is now writeable, show banner and see if refresh is available
                 MM_Messages::addMessage("Currently MemberMouse can't utilize the cache. <a href='{$cacheRepairUrl}'>Click here to correct this.</a>");
                 $lastAuth = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_LAST_CODE_REFRESH);
                 $minInterval = time() - 60;
                 //(1 min)
                 if (class_exists("MM_MemberMouseService") && (empty($lastAuth) || $lastAuth <= $minInterval)) {
                     $refreshSuccess = MM_MemberMouseService::authorize();
                     MM_OptionUtils::setOption(MM_OptionUtils::$OPTION_KEY_LAST_CODE_REFRESH, time());
                 }
                 MM_Session::clear(MM_Session::$KEY_USING_DB_CACHE);
             }
         }
     }
     // check to see if this is a beta version
     if (MM_IS_BETA == true) {
         $mmVersion = self::getPluginVersion();
         $msg = "<div style='width:750px;'><em class='mm-beta'>beta</em><strong>MemberMouse {$mmVersion}</strong>";
         $msg .= "<div style='margin-left:20px; margin-top:5px; line-height:22px;'>This is a Beta version of MemberMouse.<br/>";
         $msg .= "<i class=\"fa fa-caret-right\"></i> <a href='http://membermouse.com/beta-release-notes.php?version={$mmVersion}' target='_blank'>Beta {$mmVersion} Release Notes</a><br/>";
         $msg .= "<i class=\"fa fa-caret-right\"></i> Email <a href='mailto:beta@membermouse.com'>beta@membermouse.com</a> for support or questions on the beta version</div>";
         $msg .= "</div>";
         MM_Messages::addError($msg);
     }
     // check to see if there's a new version of MM available
     if (class_exists("MM_MemberMouseService")) {
         // check if there's an upgrade available
         $crntMajorVersion = self::getPluginVersion();
         $upgradeVersion = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_UPGRADE_NOTICE);
         if (!empty($upgradeVersion)) {
             if (version_compare($upgradeVersion, $crntMajorVersion, ">") || MM_IS_BETA == true && version_compare($upgradeVersion, $crntMajorVersion, "==")) {
                 // verify that customer is on PHP 5.3+
                 if ((double) phpversion() < 5.3) {
                     $phpWarning = "<div style='width:750px;'><i class=\"fa fa-exclamation-triangle\"></i> <strong>Warning:</strong> A new version of MemberMouse is available. In order to upgrade to the latest version of MemberMouse you will need to upgrade to PHP 5.3 or higher.</div>";
                     MM_Messages::addError($phpWarning);
                 } else {
                     if (strpos($_SERVER["PHP_SELF"], "plugins.php") === false && !(isset($_GET["action"]) && $_GET["action"] == "upgrade-plugin")) {
                         MM_Messages::addMessage("<a href='https://membermouse.uservoice.com/knowledgebase/articles/319210-membermouse-versions' target='_blank'>MemberMouse {$upgradeVersion}</a> is available! <a href='plugins.php?plugin_update=membermouse&version={$upgradeVersion}'>Please update now</a>.");
                     }
                 }
             }
         }
         // check if plugin needs to be upgraded
         global $wpdb;
         $sql = "SELECT count(u.wp_user_id) as total FROM " . MM_TABLE_USER_DATA . " u, " . MM_TABLE_MEMBERSHIP_LEVELS . " m WHERE ";
         $sql .= "u.membership_level_id = m.id AND (u.status = '" . MM_Status::$ACTIVE . "' OR u.status = '" . MM_Status::$PENDING_CANCELLATION . "') ";
         $result = $wpdb->get_row($sql);
         if ($result) {
             $activeMembers = intval($result->total);
             $memberLimit = intval(MM_MemberMouseService::getMemberLimit());
             $upgradeUrl = MM_MemberMouseService::getUpgradeUrl();
             if ($memberLimit != -1 && $activeMembers > $memberLimit) {
                 MM_Messages::addMessage("MemberMouse is currently over the limit of " . number_format($memberLimit) . " members and will be deactivated within a week of going over the limit. Please <a href='{$upgradeUrl}' target='_blank'>upgrade your account</a> to avoid any service interruptions.");
             }
         }
         // check to see if in Safe Mode
         $safeMode = MM_SafeMode::getMode();
         if ($safeMode == MM_SafeMode::$MODE_ENABLED) {
             $safeModeUrl = MM_ModuleUtils::getUrl(MM_MODULE_GENERAL_SETTINGS, MM_MODULE_SAFE_MODE);
             MM_Messages::addError("<i class=\"fa fa-life-saver\"></i> MemberMouse Safe Mode is Enabled. <a href='{$safeModeUrl}'>Safe Mode Settings</a>");
         }
         //check to see if payment subsystem is in test mode or if test data is being used.
         $testPaymentSrvcEnabled = class_exists("MM_TestPaymentService") && MM_TestPaymentService::isSiteUsingTestService();
         $testDataEnabled = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_USE_CHECKOUT_FORM_TEST_DATA) == "1" ? true : false;
         if ($testPaymentSrvcEnabled || $testDataEnabled) {
             $errorMsg = "<i class=\"fa fa-flask\"></i> <strong>MemberMouse Testing Enabled</strong>";
             $errorMsg .= "<div style='margin-left:20px;'>";
             if ($testPaymentSrvcEnabled) {
                 $paymentSettingsUrl = MM_ModuleUtils::getUrl(MM_MODULE_PAYMENT_SETTINGS, MM_MODULE_PAYMENT_METHODS);
                 $errorMsg .= "<i class=\"fa fa-caret-right\"></i> Test Payment Service is enabled. ";
                 $errorMsg .= "All charges will be processed by the test payment service. ";
                 $errorMsg .= "<a href='{$paymentSettingsUrl}'>Payment Method Settings</a><br/>";
             }
             if ($testDataEnabled) {
                 $testDataSettingsUrl = MM_ModuleUtils::getUrl(MM_MODULE_PAYMENT_SETTINGS, MM_MODULE_TEST_DATA);
                 $errorMsg .= "<i class=\"fa fa-caret-right\"></i> Test Data is enabled. All checkout forms will be prepopulated with test data. <a href='{$testDataSettingsUrl}'>Test Data Settings</a>";
             }
             $errorMsg .= "</div>";
             MM_Messages::addError($errorMsg);
         }
     }
     // check PHP version
     if ((double) phpversion() < 5.3) {
         $phpWarning = "<div style='width:750px;'><i class=\"fa fa-exclamation-triangle\"></i> <strong>Warning:</strong> Your webserver is running PHP ";
         $phpWarning .= phpversion();
         $phpWarning .= ", which is an obsolete version of PHP. MemberMouse isn't compatible with versions of PHP lower than 5.3 and you will experience issues ";
         $phpWarning .= "using the MemberMouse plugin. Please contact your hosting provider and request a more recent version of PHP. ";
         $phpWarning .= "For more information, <a href='http://membermouse.uservoice.com/knowledgebase/articles/534052' target='_blank'>click here</a>.</div>";
         MM_Messages::addError($phpWarning);
     }
     // check to see if any trouble plugins are activated
     MM_Utils::getPluginWarnings();
     // get error messages
     $errors = MM_Messages::get(MM_Session::$KEY_ERRORS);
     $output = "";
     if (is_array($errors) && count($errors) > 0) {
         $output .= "<div class=\"error\">";
         foreach ($errors as $msg) {
             $output .= "<p>{$msg}</p>";
         }
         $output .= "</div>";
     }
     // get notices
     $messages = MM_Messages::get(MM_Session::$KEY_MESSAGES);
     if (is_array($messages) && count($messages) > 0) {
         $output .= "<div class=\"updated\">";
         foreach ($messages as $msg) {
             $output .= "<p>{$msg}</p>";
         }
         $output .= "</div>";
     }
     echo $output;
     MM_Messages::clear();
 }
示例#12
0
文件: init.php 项目: huynp/Critical
 public static function load($className, $canRecurse = true)
 {
     if (!$canRecurse) {
         LogMe::write("Missing {$className} from cache");
         showLoadedClasses($className, "Eval Missing {$className} from cache");
     }
     /** only try to load MemberMouse classes **/
     if (strpos($className, "MM_") !== 0 && !preg_match("/LogMe/", $className)) {
         return false;
     }
     $exclusions = array("MemberMouse");
     if (in_array($className, $exclusions)) {
         return false;
     }
     /** end exclusions **/
     $classFileName = str_replace("MM_", "", $className);
     if (self::includeLimitedLocalFiles($className, $classFileName)) {
         return true;
     }
     $forceUseDBCache = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_FORCE_USE_DB_CACHE) == "1" ? true : false;
     if (isLocalInstall("localhost") && !$forceUseDBCache) {
         // look locally
         if (self::includeLocalFiles($className, $classFileName)) {
             return true;
         }
         if (class_exists($className, false) || interface_exists($className, false)) {
             return true;
         } else {
             if (self::includeCacheFiles($className, $classFileName)) {
                 return true;
             }
             /// get db class
             if (self::includeDBClass($className, $classFileName)) {
                 if ($classFileName != "MemberMouseService") {
                     MM_Session::value(MM_Session::$KEY_USING_DB_CACHE, true);
                 }
                 return true;
             }
         }
     } else {
         if (class_exists($className, false) || interface_exists($className, false)) {
             return true;
         } else {
             if (self::includeCacheFiles($className, $classFileName)) {
                 return true;
             }
             // get class from DB
             if (self::includeDBClass($className, $classFileName)) {
                 if ($classFileName != "MemberMouseService") {
                     MM_Session::value(MM_Session::$KEY_USING_DB_CACHE, true);
                 }
                 return true;
             }
         }
         // look locally
         if (self::includeLocalFiles($className, $classFileName)) {
             return true;
         }
     }
     //if execution gets here, then a needed class is unloadable, meaning its not in the cache or in the dbcache
     //reauth if we haven't already done so in the last 10 mins, and attempt to populate both
     $lastAuth = MM_OptionUtils::getOption(MM_OptionUtils::$OPTION_KEY_LAST_CODE_REFRESH);
     $minInterval = time() - 600;
     //(600 secs = 10 min)
     if ($canRecurse && class_exists("MM_MemberMouseService") && (empty($lastAuth) || $lastAuth <= $minInterval)) {
         $authSuccess = MM_MemberMouseService::authorize();
         MM_OptionUtils::setOption(MM_OptionUtils::$OPTION_KEY_LAST_CODE_REFRESH, time());
         if ($authSuccess) {
             return MM_ClassLoader::load($className, false);
             //this will break if the session doesnt work.. but then you have bigger problems...
         }
     }
     return false;
 }
示例#13
0
文件: api.php 项目: huynp/Critical
    ?>
" style="width:600px" onclick="jQuery('#mm-secure-api-url').focus(); jQuery('#mm-secure-api-url').select();" />
			</span>
		</p>

		<div style="width: 700px; margin-top: 20px; margin-bottom: 20px;" class="mm-divider"></div>
		
		<a onclick="mmjs.create('mm-api-keys-dialog', 500,280)" class="mm-ui-button green"><?php 
    echo MM_Utils::getIcon('plus-circle', '', '1.2em', '1px');
    ?>
 Create API Credentials</a>
		
		<div class="clear"></div>
		
		<?php 
    echo $dgHtml;
    ?>
	<?php 
} else {
    ?>
		<?php 
    echo MM_Utils::getIcon('lock', 'yellow', '1.3em', '2px');
    ?>
		This feature is not available on your current plan. To get access, <a href="<?php 
    echo MM_MemberMouseService::getUpgradeUrl(MM_MemberMouseService::$FEATURE_API);
    ?>
" target="_blank">upgrade your plan now</a>.
	<?php 
}
?>
</div>
示例#14
0
文件: view.php 项目: huynp/Critical
<?php

/**
 * 
 * MemberMouse(TM) (http://www.membermouse.com)
 * (c) MemberMouse, LLC. All rights reserved.
 */
MM_MemberMouseService::validateLicense(new MM_License());
$crntPage = MM_ModuleUtils::getPage();
$primaryTab = MM_ModuleUtils::getPrimaryTab();
$module = MM_ModuleUtils::getModule();
if (isset($_REQUEST[MM_Session::$PARAM_USER_ID])) {
    $user = new MM_User($_REQUEST[MM_Session::$PARAM_USER_ID]);
} else {
    $user = new MM_User();
}
$resourceUrl = MM_RESOURCES_URL;
if (MM_Utils::isSSL()) {
    $resourceUrl = preg_replace("/(http\\:)/", "https:", MM_RESOURCES_URL);
}
if (version_compare(get_bloginfo('version'), "3.8", ">=")) {
    ?>
<!-- override WordPress 3.8 styles -->
<style>
#wpwrap
{
	background-color: #fff;
}
.ui-widget 
{
	font-size:1em;
示例#15
0
require_once "../../../../wp-load.php";
require_once "../includes/mm-constants.php";
require_once "../includes/init.php";
function returnStatus($status, $message)
{
    echo json_encode(array('status' => $status, 'message' => $message));
    exit(0);
}
$postdata = file_get_contents("php://input");
$request = json_decode($postdata, true);
if ($request === false || empty($request['reference_id'])) {
    MM_DiagnosticLog::log(MM_DiagnosticLog::$MM_ERROR, "Scheduler Endpoint: Invalid request received:" . print_r($postdata, true));
    returnStatus('error', 'Invalid Request');
}
$license = new MM_License("", false);
MM_MemberMouseService::getLicense($license);
if (function_exists("hash_hmac") && in_array("sha256", hash_algos())) {
    $apiKey = $license->getApiKey();
    $apiSecret = $license->getApiSecret();
    $timestamp = $request['time'];
    $remoteHash = $request['auth'];
    $contents = "{$timestamp}|{$request['reference_id']}|{$request['status']}";
    $hashKey = "{$apiKey}|{$timestamp}|{$apiSecret}";
    $hash = hash_hmac("sha256", $contents, $hashKey);
    if ($hash !== $remoteHash) {
        MM_DiagnosticLog::log(MM_DiagnosticLog::$MM_ERROR, "Scheduler Endpoint: Authentication Failed ({$hash} <> {$remoteHash})");
        returnStatus('error', 'Authentication Failed');
        exit;
    }
} else {
    MM_DiagnosticLog::log(MM_DiagnosticLog::$MM_ERROR, "System does not support sha256 hmac... proceeding to process schedules without auth");
示例#16
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);
    ?>
示例#17
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");
示例#18
0
<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 {
    ?>
		<?php 
    echo MM_Utils::getIcon('lock', 'yellow', '1.3em', '2px');
    ?>
		This feature is not available on your current plan. To get access, <a href="<?php 
    echo MM_MemberMouseService::getUpgradeUrl(MM_MemberMouseService::$FEATURE_PUSH_NOTIFICATIONS);
    ?>
" target="_blank">upgrade your plan now</a>.
	<?php 
}
?>
</div>
示例#19
0
		<div class="clear"></div>
		
		<div style="width:98%">
		<?php 
    echo $dgHtml;
    ?>
		</div>
	<?php 
} else {
    ?>
		<?php 
    echo MM_Utils::getIcon('lock', 'yellow', '1.3em', '2px');
    ?>
 
		This feature is not available on your current plan. To get access, <a href="<?php 
    echo MM_MemberMouseService::getUpgradeUrl(MM_MemberMouseService::$FEATURE_BUNDLES);
    ?>
" target="_blank">upgrade your plan now</a>.
	<?php 
}
?>
</div>

<?php 
if (isset($_REQUEST["autoload"])) {
    ?>
<script type='text/javascript'>
jQuery(document).ready(function() {
	<?php 
    if ($_REQUEST["autoload"] == "new") {
        echo 'mmjs.create(\'mm-bundles-dialog\');';