public function pagesColumns($defaults) { $offset = 2; ///column offset $defaults = array_slice($defaults, 0, $offset, true) + array("core_page_type" => __('Core Page Type')) + array("access_rights" => __('Access Rights')) + array_slice($defaults, $offset, NULL, true); // verify core pages global $wpdb; $corruptCount = 0; $sql = "SELECT * FROM " . MM_TABLE_CORE_PAGES . " WHERE (ref_type IS NULL or ref_type = '') AND (ref_id IS NULL or ref_id = '');"; $results = $wpdb->get_results($sql); if ($results) { foreach ($results as $row) { if (!is_null($row->page_id) && FALSE === get_post_status($row->page_id)) { $corruptCount++; } } } if ($corruptCount > 0) { $repairCorePagesUrl = MM_ModuleUtils::getUrl(MM_MODULE_GENERAL_SETTINGS, MM_MODULE_REPAIR_CORE_PAGES); MM_Messages::addError("<i class=\"fa fa-warning\"></i> MemberMouse has detected that {$corruptCount} of your default core pages are associated with missing WordPress pages. <a href='{$repairCorePagesUrl}'>Repair Core Pages</a>"); } return $defaults; }
$dataGrid->setTotalRecords($data); $dataGrid->recordName = "IPN"; $rows = array(); $headers = array(); foreach ($data as $key => $item) { // member link $user = new MM_User($item->user_id); $memberLink = MM_NO_DATA; if ($user->isValid()) { $memberLink = $user->getUsername(); $memberLink = "<a href='?page=" . MM_MODULE_MANAGE_MEMBERS . "&module=details_general&user_id=" . $item->user_id . "'>" . $user->getUsername() . "</a>"; } // order link $orderLink = MM_NO_DATA; if (!empty($item->order_number)) { $orderLink = "<span style='font-family:courier;'><a href='" . MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_MEMBERS, MM_MODULE_MEMBER_DETAILS_TRANSACTION_HISTORY) . "&user_id={$item->user_id}'>{$item->order_number}</a></span>"; } // IPN Details $ipnDetails = MM_NO_DATA; ?> <div id="mm-view-info-<?php echo $item->id; ?> " style="display:none;" title="IPN Details" style="font-size:11px;"> <table style="width:100%"> <?php $ipnContent = unserialize($item->ipn_content); $altRow = false; foreach ($ipnContent as $key => $value) { $bkgdColor = "#f9f9f9"; if ($altRow) {
<input type='hidden' id='mm-welcome-email-enabled' value='<?php echo $membership->doSendWelcomeEmail() ? "1" : "0"; ?> ' /> </div> <div style='clear:both;'> </div> <div id='mm-welcome-email-row'> <div> From <select id="mm-email-from" class="medium-text"> <?php echo MM_HtmlUtils::getEmployees($membership->getEmailFromId()); ?> </select> <?php $employeesUrl = MM_ModuleUtils::getUrl(MM_MODULE_GENERAL_SETTINGS, MM_MODULE_EMPLOYEES); ?> <a href="<?php echo $employeesUrl; ?> " style="font-size:10px" target="_blank">add employees</a> </div> <div style="margin-top:5px"> Subject* <input id="mm-email-subject" type="text" style="width:368px; font-family:courier; font-size: 11px;" value="<?php echo $membership->getEmailSubject(); ?> "/> </div>
unset($availablePaymentServices[MM_PaymentService::$TEST_SERVICE_TOKEN]); } foreach ($availablePaymentServices as $currentoken => $aService) { if ($aService->supportsFeature(MM_PaymentServiceFeatures::OFFSITE_SERVICE)) { $offsiteServices[$currentoken] = $aService; } else { //assume services that fail the feature check are onsite, ie. only one onsite at a time can be active $onsiteServices[$currentoken] = $aService; if (!$onsiteSelected && $aService->isActive()) { $onsiteSelected = true; //if no onsite services are selected, this will indicate to check the 'none' option } } } $currentCurrency = MM_CurrencyUtil::getActiveCurrency(); $unsupportedCurrencyWarning = "<div style='background-color: #ff0000; color: #ffffff;'>" . "This payment service does not support the configured currency. " . "To change the configured currency click " . "<a href='" . MM_ModuleUtils::getUrl(MM_MODULE_PRODUCT_SETTINGS, MM_MODULE_CHECKOUT_OTHER_SETTINGS) . "'>here</a></div>"; ?> <style> .mm-payment-service-box { margin-bottom: 5px; } </style> <form method='post'> <div class="mm-wrap" id="mm-form-container"> <div style='padding-left: 10px;'> <div style='width:650px'> <p> With MemberMouse you can configure two types of payment methods: onsite and offsite. Onsite payment methods allow you to collect credit card information right from your site which means that customers can complete the entire checkout process without leaving your site. Authorize.net and Stripe are examples of onsite payment methods. </p>
// last login date $userEngagement = MM_NO_DATA; $lastLoginDate = $user->getLastLoginDate(); if (!empty($lastLoginDate)) { $userEngagement = MM_Utils::getIcon('calendar-o', 'purple', '1.2em', '2px', "Last logged in {$user->getLastLoginDate(true)}", "margin-right:8px;"); } else { $userEngagement = MM_Utils::getIcon('calendar-o', 'purple', '1.2em', '2px', "Member hasn't logged in yet", "margin-right:8px;"); } $userEngagement .= MM_Utils::getIcon('key', 'yellow', '1.2em', '2px', "Logged in {$user->getLoginCount()} times"); $userEngagement .= " <span style='font-family:courier; font-size:12px; position:relative; top:1px; margin-right:8px;'>{$user->getLoginCount()}</span>"; $userEngagement .= MM_Utils::getIcon('file-o', 'turq', '1.2em', '2px', "Accessed {$user->getPageAccessCount()} pages"); $userEngagement .= " <span style='font-family:courier; font-size:12px; position:relative; top:1px;'>{$user->getPageAccessCount()}</span>"; // build datagrid row $row = array(); $row[] = array('content' => "<span title='ID [" . $user->getId() . "]' style='line-height:20px;'>" . $name . "</span>"); $row[] = array('content' => "<a href='" . MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_MEMBERS, MM_MODULE_MEMBER_DETAILS_GENERAL) . "&user_id={$user->getId()}'>" . MM_Utils::abbrevString($user->getEmail()) . "</a>"); $row[] = array('content' => $phone); $row[] = array('content' => $membershipStr); $row[] = array('content' => MM_Utils::abbrevString($bundles, 30)); if ($useCustomField) { if ($item->custom_field_value == MM_CustomField::$CHECKBOX_ON) { $customFieldContent = MM_Utils::getCheckIcon(); } else { if ($item->custom_field_value == MM_CustomField::$CHECKBOX_OFF) { $customFieldContent = MM_Utils::getCrossIcon(); } else { $customFieldContent = $item->custom_field_value; } } $row[] = array('content' => $customFieldContent); }
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; } #mm-upgrade-col-right { float: left; width: 470px; } </style> <div id="mm-upgrade-container"> <div id="mm-upgrade-col-left"> <div id="mm-upgrade-content"> <h2 class="mm-dashboard-title">Profit from the Advanced Reporting Suite!</h2>
} else { $actions .= MM_Utils::getDeleteIcon("This product is currently being used and cannot be deleted", 'margin-left:5px;', '', true); } $purchaseLinks = '<a title="Get purchase links" onclick="mmjs.showPurchaseLinks(' . $product->getId() . ',\'' . htmlentities(addslashes($product->getName()), ENT_QUOTES) . '\')" class="mm-ui-button" style="margin:0px;">' . MM_Utils::getIcon('money', '', '1.3em', '1px', '', 'margin-right:0px;') . '</a>'; // Associated Access $accessGranted = ""; $membership = $product->getAssociatedMembership(); if ($membership->isValid()) { $accessGranted .= MM_Utils::getAccessIcon(MM_OrderItemAccess::$ACCESS_TYPE_MEMBERSHIP); $accessGranted .= " <a href='" . MM_ModuleUtils::getUrl(MM_MODULE_PRODUCT_SETTINGS, MM_MODULE_MEMBERSHIP_LEVELS) . "&autoload=" . $membership->getId() . "'>" . $membership->getName() . "</a>"; } if (empty($accessGranted)) { $bundle = $product->getAssociatedBundle(); if ($bundle->isValid()) { $accessGranted .= MM_Utils::getAccessIcon(MM_OrderItemAccess::$ACCESS_TYPE_BUNDLE); $accessGranted .= " <a href='" . MM_ModuleUtils::getUrl(MM_MODULE_PRODUCT_SETTINGS, MM_MODULE_BUNDLES) . "&autoload=" . $bundle->getId() . "'>" . $bundle->getName() . "</a>"; } } if (empty($accessGranted)) { $accessGranted = MM_NO_DATA; } // Attributes $attributes = ""; if ($product->hasTrial()) { $attributes .= MM_Utils::getIcon('clock-o', 'beige', '1.3em', '0px', 'Has Trial', 'margin-right:5px;'); } else { $attributes .= "<img title='No Trial' style='margin-right:5px;' src='" . MM_Utils::getImageUrl("clear") . "' />"; } if ($product->isRecurring()) { if ($product->doLimitPayments()) { $attributes .= MM_Utils::getIcon('calendar-o', 'beige', '1.3em', '0px', 'Payment Plan', 'margin-right:5px;');
//dynamically modify button state based on field contents $(".limelight_required_for_product_config").keyup(validateLimeLightConfigButtons); $("#limelight_configure_products").click(function(e) { e.preventDefault(); window.location.href = "<?php echo MM_ModuleUtils::getUrl(MM_MODULE_PRODUCT_SETTINGS, MM_MODULE_LIMELIGHT_PRODUCTS); ?> "; }); $("#limelight_configure_shipping_methods").click(function(e) { e.preventDefault(); window.location.href = "<?php echo MM_ModuleUtils::getUrl(MM_MODULE_PRODUCT_SETTINGS, MM_MODULE_LIMELIGHT_SHIPPING_METHODS); ?> "; }); }); </script> <div style="padding:10px;"> <img src='https://dl.dropboxusercontent.com/u/265387542/plugin_images/logos/limelight.png' /> <div style="margin-top:5px; margin-bottom:10px;"> <a href='https://membermouse.uservoice.com/knowledgebase/articles/319049-configuring-lime-light' target='_blank'>Need help configuring Lime Light?</a> </div> <div style="margin-bottom:10px;"> Lime Light URL
<br/> <span style="font-size:11px"> Select Multiple Products: PC <code>ctrl + click</code> Mac <code><img width="9" height="9" src="http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1343/ks_command.gif" alt="Command key icon" data-hires="true"> (Command key) + click</code> </span> <?php } else { ?> <input type="hidden" id="mm-products[]" name="mm-products-list" /> <em>No products available.</em> <div style="font-size:11px; margin-top:10px;">Each product can only be associated with one membership level or bundle so once a product has been associated with an access type, it's no longer available for assignment. You must <a href="<?php echo MM_ModuleUtils::getUrl(MM_MODULE_PRODUCT_SETTINGS, MM_MODULE_PRODUCTS) . "&autoload=new"; ?> ">create a new product</a> in order to associate it with this bundle.</div> <?php } ?> </div> </td> </tr> <tr> <td colspan="2"> <div style="width: 600px; margin-top: 8px;" class="mm-divider"></div> </td> </tr>
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(); }
} else { $membershipLevel = MM_Utils::getIcon('dollar', 'red', '1.3em', '2px', 'Free Membership Level'); $productAssociations = MM_NO_DATA; $purchaseLinks = '<a title="Get purchase links" onclick="mmjs.showPurchaseLinks(' . $item->id . ',\'' . htmlentities(addslashes($item->name), ENT_QUOTES) . '\', \'\')" class="mm-ui-button" style="margin:0px;">' . MM_Utils::getIcon('money', '', '1.3em', '1px', '', 'margin-right:0px;') . '</a>'; } // Name / Subscribers if (!empty($item->member_count)) { $item->name .= '<p>' . MM_Utils::getIcon('users', 'blue', '1.2em', '1px', '', 'margin-right:2px; margin-left:25px;') . ' <a href="' . MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_MEMBERS, MM_MODULE_BROWSE_MEMBERS) . '&membershipId=' . $item->id . '">' . $item->member_count . ' Members</a></p>'; } else { $item->name .= '<p>' . MM_Utils::getIcon('users', 'grey', '1.2em', '1px', '', 'margin-right:2px; margin-left:25px;') . ' <i>No Subscribers</i></p>'; } // Bundles $bundles = array(); if (!empty($item->bundles)) { foreach ($item->bundles as $bundle) { $bundles[] = "<a href='" . MM_ModuleUtils::getUrl(MM_MODULE_PRODUCT_SETTINGS, MM_MODULE_BUNDLES) . "&autoload=" . $bundle->id . "'>" . $bundle->name . "</a>"; } } if (!empty($bundles)) { $item->bundles = MM_Utils::getAccessIcon(MM_OrderItemAccess::$ACCESS_TYPE_BUNDLE, '', 'margin-right:5px;'); $item->bundles .= join(', ', $bundles); } else { $item->bundles = MM_NO_DATA; } // Actions $editActionUrl = 'onclick="mmjs.edit(\'mm-member-types-dialog\', \'' . $item->id . '\')"'; $deleteActionUrl = 'onclick="mmjs.remove(\'' . $item->id . '\')"'; $actions = MM_Utils::getEditIcon("Edit Membership Level", '', $editActionUrl); if (!$membership->hasAssociations() && intval($item->member_count) <= 0) { $actions .= MM_Utils::getDeleteIcon("Delete Membership Level", 'margin-left:5px;', $deleteActionUrl); } else {
<div style="width:600px"> <input type="button" class="mm-ui-button blue" value="Update Member" onclick="mmjs.updateMember(<?php echo $user->getId(); ?> );"> <?php if ($user->getStatus() == MM_Status::$ERROR || $user->getStatus() == MM_Status::$PENDING_ACTIVATION || !$user->hasActiveSubscriptions()) { ?> <span style="float:right;"> <input type="button" class="mm-ui-button red" value="Delete Member" onclick="mmjs.deleteMember(<?php echo $user->getId(); ?> , '<?php echo MM_ModuleUtils::getUrl($crntPage, MM_MODULE_BROWSE_MEMBERS); ?> ');"> </span> <?php } ?> </div> </div> <div style='clear: both; height:20px;'></div> <script language="javascript"> var mm_nonce_name_checkout_form = '<?php echo MM_View::$MM_NONCE_NAME_CHECKOUT_FORM; ?> ';
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; } } $bundleType = MM_Utils::getIcon('dollar', 'green', '1.3em', '2px', 'Paid Bundle'); $productAssociations = MM_Utils::getIcon('shopping-cart', 'blue', '1.3em', '1px', 'Products', 'margin-right:5px;') . join(', ', $products); $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>'; } else { $bundleType = MM_Utils::getIcon('dollar', 'red', '1.3em', '2px', 'Free Bundle'); $productAssociations = MM_NO_DATA; $purchaseLinks = MM_NO_DATA; } // Name / Subscribers if (!empty($item->member_count)) { $item->name .= '<p>' . MM_Utils::getIcon('users', 'blue', '1.2em', '1px', '', 'margin-right:2px;') . ' <a href="' . MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_MEMBERS, MM_MODULE_BROWSE_MEMBERS) . '&bundleId=' . $item->id . '">' . $item->member_count . ' Subscribers</a></p>'; } else { $item->name .= '<p>' . MM_Utils::getIcon('users', 'grey', '1.2em', '1px', '', 'margin-right:2px;') . ' <i>No Subscribers</i></p>'; } // Actions $editActionUrl = 'onclick="mmjs.edit(\'mm-bundles-dialog\', \'' . $item->id . '\')"'; $deleteActionUrl = 'onclick="mmjs.remove(\'' . $item->id . '\')"'; $actions = MM_Utils::getEditIcon("Edit Bundle", '', $editActionUrl); if (!$tag->hasAssociations() && intval($item->member_count) <= 0) { $actions .= MM_Utils::getDeleteIcon("Delete Bundle", 'margin-left:5px;', $deleteActionUrl); } else { $actions .= MM_Utils::getDeleteIcon("This bundle is currently being used and cannot be deleted", 'margin-left:5px;', '', true); } $rows[] = array(array('content' => "<span title='ID [" . $item->id . "]'>" . $item->name . "</span>"), array('content' => $bundleType), array('content' => $productAssociations), array('content' => $purchaseLinks), array('content' => MM_Utils::getStatusImage($item->status)), array('content' => $actions)); } $headers = array('name' => array('content' => '<a onclick="mmjs.sort(\'name\');" href="#">Name / Subscribers</a>'), 'is_free' => array('content' => '<a onclick="mmjs.sort(\'is_free\');" href="#">Type</a>'), 'products' => array('content' => 'Products', 'attr' => 'style="width:500px;"'), 'purchaselinks' => array('content' => 'Purchase Links'), 'status' => array('content' => '<a onclick="mmjs.sort(\'status\');" href="#">Status</a>'), 'actions' => array('content' => 'Actions'));
$dataGrid->recordName = "duplicate"; // define datagrid headers $headers = array('member_name' => array('content' => 'Name', "attr" => "style='width:140px;'"), 'user_email' => array('content' => 'Email', "attr" => "style='width:200px;'"), 'order_number' => array('content' => 'Order#', "attr" => "style='width:80px;'"), 'product' => array('content' => 'Product'), 'date_added' => array('content' => 'Date', "attr" => "style='width:140px;'"), 'actions' => array('content' => 'Actions', "attr" => "style='width:160px;'")); $datagridRows = array(); $blankRow = array(array('content' => '', "attr" => "style='height:2px; background-color:#ECECEC'"), array('content' => '', "attr" => "style='background-color:#ECECEC'"), array('content' => '', "attr" => "style='background-color:#ECECEC'"), array('content' => '', "attr" => "style='background-color:#ECECEC'"), array('content' => '', "attr" => "style='background-color:#ECECEC'"), array('content' => '', "attr" => "style='background-color:#ECECEC'")); $lastUserId = ""; // process data foreach ($data as $key => $item) { if (!empty($lastUserId) && $item->user_id != $lastUserId) { $datagridRows[] = $blankRow; } $lastUserId = $item->user_id; // actions $actions = "<a onclick='mmjs.cancelSubscription(\"{$item->id}\",\"{$item->order_number}\")' style='margin-left: 5px; cursor:pointer;' class='mm-ui-button'>Cancel Subscription</a>"; // build datagrid row $row = array(); $row[] = array('content' => "<span title='User ID: [{$item->user_id}]' style='line-height:20px;'>{$item->member_name}</span>"); $row[] = array('content' => "<a href='" . MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_MEMBERS, MM_MODULE_MEMBER_DETAILS_TRANSACTION_HISTORY) . "&user_id={$item->user_id}' target='_blank'>{$item->user_email}"); $row[] = array('content' => "<span style='font-family:courier;'>{$item->order_number}</span>"); $row[] = array('content' => $item->product); $row[] = array('content' => MM_Utils::dateToLocal($item->date_added)); $row[] = array('content' => $actions); $datagridRows[] = $row; } $dataGrid->setHeaders($headers); $dataGrid->setRows($datagridRows); $dgHtml = $dataGrid->generateHtml(); if (empty($dgHtml)) { $dgHtml = "<p><i>No duplicate subscriptions found.</i></p>"; } echo "<div style='width:85%'>{$dgHtml}</div>";
<div style='padding-left: 10px;margin-top:10px;'> <div style='width:650px'> <p>On this page you can build a webform that can be included on any site. It allows prospects to sign up for a free membership on your site. To create the form, just select the free membership level you want prospects to sign up for, then check off the fields that you want to include in the form and click <i>Generate HTML</i>.</p> <p>The HTML for your webform will show up in a text box to the right. Just copy and paste this code to your site.</p> </div> </div> <div style="padding-left:10px; float:left; width:350px;"> <?php if (empty($freeMembershipList)) { echo "Please <a href=\"" . MM_ModuleUtils::getUrl(MM_MODULE_PRODUCT_SETTINGS, MM_MODULE_MEMBERSHIP_LEVELS) . "\">add a free membership level</a> in order to create a free member webform."; } else { ?> <h3>Membership Level</h3> <select name='membership_level'> <?php echo $freeMembershipList; ?> </select> <h3>Form Fields</h3> <table> <tr>
public function checkEmployeeAccess() { global $current_user; // determine is current employee has access to the current page if (class_exists("MM_Employee")) { $employee = MM_Employee::findByUserId($current_user->ID); if ($employee->isValid()) { $crntPage = MM_ModuleUtils::getPage(); $crntModule = MM_ModuleUtils::getModule(); if (empty($crntModule)) { $crntModule = $crntPage; } if (MM_ModuleUtils::isMemberMousePage($crntPage) && !$employee->hasPermission(array("module" => $crntModule))) { wp_redirect(MM_ModuleUtils::getUrl("mm_access_denied")); exit; } return true; } else { return false; } } else { return false; } }
?> Seeing the error page unexpectedly? <a href="https://membermouse.uservoice.com/knowledgebase/articles/319144-when-logged-in-as-an-administrator-i-m-seeing-an-e" target="_blank" style="color:rgb(62, 172, 207);">Make sure your settings are commited.</a> </span> <?php } ?> <?php if ($bundleCount > 0) { ?> <div id='mm-preview-access-tags' style='height: 70px;'> <div id='mm-preview-access-tag-results' > <select multiple="multiple" rows='6' style='width: 98%;' id='preview_access_tags' name='preview_access_tags[]' onchange="mmPreviewJs.changeBundles();"> <?php echo $bundlesList; ?> </select> </div> </div> <?php } ?> </div> <div style="float:right; margin-right:20px; "> <a href="<?php echo MM_ModuleUtils::getUrl(MM_MODULE_GENERAL_SETTINGS, MM_MODULE_OTHER_SETTINGS); ?> #preview-settings-bar-options" target="_blank" class="mm-button small black" style="margin-left: 15px; box-shadow: 0 0px 1px #EAEAEA, 0 1px 0 #868686 inset">Hide this bar</a> </div> </div>
?> <li><a href="<?php echo MM_ModuleUtils::getUrl($crntPage, MM_MODULE_REPAIR_MEMBERMOUSE); ?> "><i class="fa fa-wrench"></i> Repair MemberMouse (dev)</a></li> <?php } ?> </ul> </li> <?php } else { ?> <li> <a href="<?php echo MM_ModuleUtils::getUrl($crntPage, MM_MODULE_EXTENSIONS); ?> "> <i class="fa fa-chevron-left"></i> </a> </li> <?php } ?> <?php echo MM_SupportUtils::supportMenuItem($module); ?> </ul> </div> <?php
$affiliateId = MM_NO_DATA; $subAffiliateId = MM_NO_DATA; if (!empty($item->affiliate_id)) { $affiliateId = $item->affiliate_id; } if (!empty($item->sub_affiliate_id)) { $subAffiliateId = $item->sub_affiliate_id; } if ($item->is_test) { $transactionTypeIcons .= MM_Utils::getIcon('flask', 'grey', '1.3em', '2px', "Test Transaction", "padding-left:4px;"); } // build datagrid row $row = array(); $row[] = array('content' => $transactionTypeIcons); $row[] = array('content' => MM_Utils::dateToLocal($item->transaction_date)); $row[] = array('content' => "<a href='" . MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_MEMBERS, MM_MODULE_MEMBER_DETAILS_TRANSACTION_HISTORY) . "&user_id={$item->user_id}'>{$item->order_number}</a>"); $row[] = array('content' => _mmf($item->transaction_amount, $item->currency)); $row[] = array('content' => $fullName); $row[] = array('content' => "<a href='" . MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_MEMBERS, MM_MODULE_MEMBER_DETAILS_GENERAL) . "&user_id={$item->user_id}'>" . MM_Utils::abbrevString($item->user_email, 30) . "</a>"); $row[] = array('content' => "<span style='font-family:courier; font-size:11px;'>" . MM_Utils::abbrevString($affiliateId, 15) . "</span>"); $row[] = array('content' => "<span style='font-family:courier; font-size:11px;'>" . MM_Utils::abbrevString($subAffiliateId, 15) . "</span>"); $row[] = array('content' => MM_Utils::abbrevString($item->description, 30)); $datagridRows[] = $row; } $dataGrid->setHeaders($headers); $dataGrid->setRows($datagridRows); $dgHtml = $dataGrid->generateHtml(); if (empty($dgHtml)) { $dgHtml = "<p><i>No transactions found.</i></p>"; } echo $dgHtml;
<select id='mm-commission-profile-selector'> <option value="<?php MM_CommissionProfile::$DFLT_COMMISSION_PROFILE_ID; ?> " <?php echo $product->getCommissionProfileId() == MM_CommissionProfile::$DFLT_COMMISSION_PROFILE_ID ? "selected" : ""; ?> > — Use system default — </option> <?php echo $commissionProfileList; ?> </select> <?php $commissionProfileUrl = MM_ModuleUtils::getUrl(MM_MODULE_AFFILIATE_SETTINGS, MM_MODULE_COMMISSION_PROFILES); ?> <a href="<?php echo $commissionProfileUrl; ?> " style="font-size:10px" target="_blank">add commission profile</a> </div> <div id="mm-commission-profile-options-container" style="display:none"> <option value="<?php MM_CommissionProfile::$DFLT_COMMISSION_PROFILE_ID; ?> "> — Use system default — </option> <?php
Advanced Search</a> <a id="mm-hide-search-btn" onclick="mmjs.hideSearch()" class="mm-ui-button" <?php echo $showSearch ? "" : "style=\"display:none;\""; ?> ><?php echo MM_Utils::getIcon('search-minus'); ?> Advanced Search</a> <a onclick="mmjs.create('mm-create-member-dialog', 500, 360)" class="mm-ui-button green" style="margin-left:15px;"><?php echo MM_Utils::getIcon('user'); ?> Create Member</a> <a href="<?php echo MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_MEMBERS, MM_MODULE_IMPORT_WIZARD); ?> " class="mm-ui-button" style="margin-left:15px;"><?php echo MM_Utils::getIcon('upload'); ?> Import Members</a> <?php if ($showCsvExportButton) { ?> <a class="mm-ui-button" onclick="mmjs.csvExport(0);" style="margin-left:15px;"><?php echo MM_Utils::getIcon('download'); ?> Export Members</a> <?php }
<div id="litle-test-info" style="margin-bottom:10px; margin-left:10px;"> <div style="margin-bottom:5px;"> <?php echo MM_Utils::getIcon('credit-card', 'blue', '1.3em', '1px', "Test Credit Card Numbers", "margin-right:3px;"); ?> <a href="javascript:showLitleTestCardNumbers()">Test Credit Card Numbers</a> </div> <div> <?php echo MM_Utils::getIcon('flask', 'blue', '1.3em', '1px', 'Setup Test Data', "margin-right:3px;"); ?> <a href="<?php echo MM_ModuleUtils::getUrl(MM_ModuleUtils::getPage(), MM_MODULE_TEST_DATA); ?> " target="_blank">Configure Test Data</a> </div> </div> <div id="litle-credentials-section"> <div style="margin-bottom:10px;"> <span>Merchant ID</span> <p style="margin-left:10px; font-family:courier; font-size:11px;"> <input type='text' value='<?php echo $p->getPreLiveMerchantId(); ?> ' id='litle_prelive_merchant_id' name='payment_service[litle][prelive_merchant_id]' style='width: 275px;' /> </p>
<?php if (MM_SupportUtils::hasPhoneSupport() && false) { ?> <li><i class="fa fa-phone"></i> (512) 630-2219</li> <?php } ?> </ul> <h3><i class="fa fa-money" style="top:1px;"></i> Profit Alerts</h3> <ul class="tips"> <?php if (MM_MemberMouseService::hasPermission(MM_MemberMouseService::$FEATURE_REPORTING_SUITE) != MM_MemberMouseService::$ACTIVE) { ?> <li><i class="fa fa-check-square"></i> Learn more about the <a href="<?php echo MM_ModuleUtils::getUrl(MM_MODULE_GET_REPORTING); ?> ">Advanced Reporting Suite</a></li> <?php } ?> <li><i class="fa fa-check-square"></i> Learn how million dollar membership sites operate in <a href="http://membermouse.com/7-steps-to-seven-figures" target="_blank">7 Steps to Seven Figures</a></li> <li><i class="fa fa-check-square"></i> Earn 20% recurring commission with our <a href="http://membermouse.com/affiliate-program/" target="_blank">Affiliate Program</a></li> </ul> <h3><i class="fa fa-comments"></i> News</h3> <div class="mm-news-feed"> <?php function changeCachePeriod($secs) { return 7200; }