$bundleMappings[$item->bundle_id] = $crntItem; } // generate rows $rows = array(); $export_url = MM_PLUGIN_URL . '/com/membermouse/esp/util/export_members.php'; foreach ($bundleMappings as $key => $item) { $bundle = new MM_Bundle($item->bundle_id); $bundleName = MM_NO_DATA; if (!$bundle->isValid()) { continue; } $bundleName = $bundle->getName(); // Actions $editActionUrl = 'onclick="mmjs.edit(\'mm-bundle-mapping-dialog\', \'' . $item->bundle_id . '\', 475, 235)"'; $deleteActionUrl = 'onclick="mmjs.remove(\'' . $item->bundle_id . '\')"'; $actions = MM_Utils::getEditIcon("Edit Bundle Mapping", '', $editActionUrl); $actions .= MM_Utils::getDeleteIcon("Delete Bundle Mapping", 'margin-left:5px;', $deleteActionUrl); $actions .= "<a onclick='mmjs.exportMembers(\"{$export_url}?bundle_id={$item->bundle_id}\"); return false;' style='cursor:pointer; margin-left:5px;' title='Export members with '{$bundleName}' bundle active on their account'>" . MM_Utils::getIcon('download', 'green', '1.3em', '2px') . "</a>"; $actions .= "<a onclick='mmjs.exportMembers(\"{$export_url}?bundle_id={$item->bundle_id}&export_type=canceled_bundles\"); return false;' style='cursor:pointer; margin-left:5px;' title='Export members with '{$bundleName}' bundle canceled on their account'>" . MM_Utils::getIcon('download', 'red', '1.3em', '2px') . "</a>"; $activeListName = MM_NO_DATA; if (isset($item->active_list_id) && !empty($listNames[$item->active_list_id])) { $activeListName = $listNames[$item->active_list_id]; } $canceledListName = MM_NO_DATA; if (isset($item->canceled_list_id) && !empty($listNames[$item->canceled_list_id])) { $canceledListName = $listNames[$item->canceled_list_id]; } $rows[] = array(array('content' => MM_Utils::abbrevString($bundleName, 30)), array('content' => MM_Utils::abbrevString($activeListName, 30)), array('content' => MM_Utils::abbrevString($canceledListName, 30)), array('content' => $actions)); } $headers = array('name' => array('content' => 'Bundle'), 'active_list' => array('content' => 'Active List', "attr" => ""), 'canceled_list' => array('content' => 'Canceled List', "attr" => ""), 'actions' => array('content' => 'Actions', "attr" => "style='width:86px;'")); $dataGrid->setHeaders($headers);
* * MemberMouse(TM) (http://www.membermouse.com) * (c) MemberMouse, LLC. All rights reserved. */ $view = new MM_ProductView(); $dataGrid = new MM_DataGrid($_REQUEST, "id", "desc", 10); $data = $view->getViewData($dataGrid); $dataGrid->setTotalRecords($data); $dataGrid->recordName = "product"; $rows = array(); foreach ($data as $key => $item) { $product = new MM_Product($item->id); // Actions $editActionUrl = 'onclick="mmjs.edit(\'mm-products-dialog\', \'' . $product->getId() . '\', 580, 600)"'; $deleteActionUrl = 'onclick="mmjs.remove(\'' . $product->getId() . '\')"'; $actions = MM_Utils::getEditIcon("Edit Product", '', $editActionUrl); if (!MM_Product::isBeingUsed($product->getId()) && !MM_Product::hasBeenPurchased($product->getId())) { $actions .= MM_Utils::getDeleteIcon("Delete Product", 'margin-left:5px;', $deleteActionUrl); } 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();
* * MemberMouse(TM) (http://www.membermouse.com) * (c) MemberMouse, LLC. All rights reserved. */ $view = new MM_PushNotificationView(); $dataGrid = new MM_DataGrid($_REQUEST, "event_type", "asc", 10); $data = $view->getViewData($dataGrid); $dataGrid->setTotalRecords($data); $dataGrid->width = "98%"; $dataGrid->recordName = "notification"; $rows = array(); $headers = array('event_type' => array('content' => '<a onclick="mmjs.sort(\'event_type\');" href="#">Event</a>'), 'action_type' => array('content' => '<a onclick="mmjs.sort(\'action_type\');" href="#">Action</a>'), 'status' => array('content' => '<a onclick="mmjs.sort(\'status\');" href="#">Status</a>'), 'actions' => array('content' => '')); foreach ($data as $key => $item) { $editActionUrl = 'onclick="mmjs.edit(\'mm-push-notification-dialog\', \'' . $item->id . '\', 510, 570)"'; $deleteActionUrl = 'onclick="mmjs.remove(\'' . $item->id . '\')"'; $actions = MM_Utils::getEditIcon("Edit Push Notification", '', $editActionUrl); $actions .= MM_Utils::getDeleteIcon("Delete Push Notification", 'margin-left:5px;', $deleteActionUrl); if ($item->status == "1") { $actions .= '<a title="Send Test Notification" style="margin-left: 5px; cursor:pointer" onclick="mmjs.sendTestNotification(\'' . $item->id . '\');">' . MM_Utils::getIcon('flask', 'green', '1.3em', '2px') . '</a>'; } else { $actions .= '<a title="Activate this push notification in order to send a test" style="margin-left: 5px;">' . MM_Utils::getIcon('flask', 'grey', '1.3em', '2px') . '</a>'; } $description = ""; $actionValue = unserialize($item->action_value); if ($item->action_type == MM_Action::$MM_ACTION_SEND_EMAIL) { $description .= MM_Utils::getIcon('paper-plane-o', 'green', '1.3em', '2px', '', 'margin-right:4px;'); $description .= " Send an email to "; if ($actionValue["emailToId"] == "-1") { $description .= "the current member"; } else { $employee = new MM_Employee($actionValue["emailToId"]);
$split = explode("-", $item->membermouse_shipping_option_key); $token = $split[0]; $mmShippingMethodName = MM_NO_DATA; //get the shipping method $shippingMethod = MM_ShippingMethod::getShippingMethodByToken($token); if ($shippingMethod) { $optionRetrievalResponse = $shippingMethod->getShippingOptionByKey(new MM_Order(), $item->membermouse_shipping_option_key); $shippingOption = $optionRetrievalResponse->message; if ($shippingOption) { $mmShippingMethodName = "{$shippingOption->getName()} ({$shippingOption->getRate(true)})"; } } // Actions $editActionUrl = 'onclick="mmjs.edit(\'mm-limelight-shipping-methods-dialog\', \'' . $item->id . '\', 550, 235)"'; $deleteActionUrl = 'onclick="mmjs.remove(\'' . $item->id . '\')"'; $actions = MM_Utils::getEditIcon("Edit Shipping Method Mapping", '', $editActionUrl); $actions .= MM_Utils::getDeleteIcon("Delete Shipping Method Mapping", 'margin-left:5px;', $deleteActionUrl); // 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">
} if ($profile->rebillCommissionsEnabled()) { $rebillCommissions = MM_Utils::getCheckIcon() . " "; $rebillCommissions .= "<span style='font-family:courier;'>{$profile->getRebillConfigDescription()}</span>"; } else { $rebillCommissions = MM_Utils::getCrossIcon(); } if ($profile->doReverseCommissions()) { $doReverseCommissions = MM_Utils::getCheckIcon(); } else { $doReverseCommissions = MM_Utils::getCrossIcon(); } // Actions $editActionUrl = 'onclick="mmjs.edit(\'mm-commission-profiles-dialog\', \'' . $item->id . '\')"'; $deleteActionUrl = 'onclick="mmjs.remove(\'' . $item->id . '\')"'; $actions = MM_Utils::getEditIcon("Edit Commission Profile", '', $editActionUrl); if (!$profile->hasAssociations()) { $actions .= MM_Utils::getDeleteIcon("Delete Commission Profile", 'margin-left:5px;', $deleteActionUrl); } else { $actions .= MM_Utils::getDeleteIcon("This commission profile is currently being used and cannot be deleted", 'margin-left:5px;', '', true); } $rows[] = array(array('content' => $defaultFlag . " <span title='ID [" . $item->id . "]'>" . $profile->getName() . "</span>"), array('content' => $initialCommission), array('content' => $rebillCommissions), array('content' => $doReverseCommissions), array('content' => $actions)); } $headers = array('name' => array('content' => '<a onclick="mmjs.sort(\'name\');" href="#">Name</a>'), 'initial_commission_enabled' => array('content' => '<a onclick="mmjs.sort(\'initial_commission_enabled\');" href="#">Initial Commission</a>'), 'rebill_commissions_enabled' => array('content' => '<a onclick="mmjs.sort(\'rebill_commissions_enabled\');" href="#">Rebill Commissions</a>'), 'do_reverse_commissions' => array('content' => '<a onclick="mmjs.sort(\'do_reverse_commissions\');" href="#">Cancel Commissions</a>'), 'actions' => array('content' => 'Actions')); $dataGrid->setHeaders($headers); $dataGrid->setRows($rows); $dataGrid->width = "85%"; $dgHtml = $dataGrid->generateHtml(); if ($dgHtml == "") { $dgHtml = "<p><i>No commission profiles.</i></p>"; }
$employee = new MM_Employee($item->id); $hasRestrictions = false; if ($employee->isValid()) { $membershipRestrictions = $employee->getAccessRescrictions(MM_Employee::$ACCESS_TYPE_MEMBERSHIP); if (count($membershipRestrictions) > 0) { $hasRestrictions = true; } } if ($hasRestrictions) { $item->role_name .= MM_Utils::getIcon('lock', 'yellow', '1.3em', '2px', 'This employee has additional access restrictions', 'margin-left:5px;'); } } // Actions $editActionUrl = 'onclick="mmjs.edit(\'mm-employee-accounts-dialog\', \'' . $item->id . '\', 540, 450)"'; $deleteActionUrl = 'onclick="mmjs.removeAccount(\'' . $item->id . '\')"'; $actions = MM_Utils::getEditIcon("Edit Employee", '', $editActionUrl); if (!MM_Employee::isBeingUsed($item->id)) { $actions .= MM_Utils::getDeleteIcon("Delete Employee", 'margin-left:5px;', $deleteActionUrl); } else { $actions .= MM_Utils::getDeleteIcon("This employee is currently being used and cannot be deleted", 'margin-left:5px;', '', true); } $rows[] = array(array('content' => $defaultFlag . " <span title='ID [" . $item->id . "]'>" . $item->display_name . "</span>"), array('content' => $realName), array('content' => $item->email), array('content' => $phone), array('content' => $item->role_name), array('content' => $actions)); } $headers = array('display_name' => array('content' => '<a onclick="mmjs.sort(\'display_name\');" href="#" style="margin-left:22px;">Display Name</a>'), 'first_name' => array('content' => '<a onclick="mmjs.sort(\'first_name\');" href="#">Real Name</a>'), 'email' => array('content' => '<a onclick="mmjs.sort(\'email\');" href="#">Email</a>'), 'phone' => array('content' => '<a onclick="mmjs.sort(\'phone\');" href="#">Phone</a>'), 'role_id' => array('content' => '<a onclick="mmjs.sort(\'role_id\');" href="#">Role</a>'), 'actions' => array('content' => 'Actions')); $dataGrid->setHeaders($headers); $dataGrid->setRows($rows); $dgHtml = $dataGrid->generateHtml(); if ($dgHtml == "") { $dgHtml = "<p><i>No employees.</i></p>"; } ?>
case MM_Coupon::$TYPE_FREE: $description = "<span style='font-family:courier;'>FREE</span>"; break; } if ($coupon->getCouponType() != MM_Coupon::$TYPE_FREE) { if ($coupon->getRecurringBillingSetting() == "all") { $description .= " all charges"; } else { $description .= " the first charge"; } } $editActionUrl = 'onclick="mmjs.edit(\'mm-coupons-dialog\', \'' . $coupon->getId() . '\', 620, 615)"'; $deleteActionUrl = 'onclick="mmjs.remove(\'' . $coupon->getId() . '\')"'; $archiveActionUrl = 'onclick="mmjs.archive(\'' . $coupon->getId() . '\')"'; $unarchiveActionUrl = 'onclick="mmjs.unarchive(\'' . $coupon->getId() . '\')"'; $actions = MM_Utils::getEditIcon("Edit Coupon", '', $editActionUrl); $archiveActions = ""; if (!MM_Coupon::isBeingUsed($coupon->getId())) { $actions .= MM_Utils::getDeleteIcon("Delete Coupon", 'margin-left:5px;', $deleteActionUrl); } else { $actions .= MM_Utils::getDeleteIcon("This coupon is currently being used and cannot be deleted.", 'margin-left:5px;', '', true); if (!$coupon->isArchived()) { $archiveMsg = "Archive this coupon to hide it and disable it from being used."; $archiveActions .= MM_Utils::getArchiveIcon($archiveMsg, 'margin-left:5px;', $archiveActionUrl); } else { if ($coupon->isArchived()) { $archiveMsg = "Unarchive this coupon to enable it to be used."; $archiveActions .= MM_Utils::getArchiveIcon($archiveMsg, 'margin-left:5px;', $unarchiveActionUrl, true); } } }
/** * * MemberMouse(TM) (http://www.membermouse.com) * (c) MemberMouse, LLC. All rights reserved. */ $view = new MM_UserDefinedPageView(); $dataGrid = new MM_DataGrid($_REQUEST, "id", "desc", 10); $data = $view->getViewData($dataGrid); $dataGrid->setTotalRecords($data); $dataGrid->recordName = "page"; $rows = array(); foreach ($data as $key => $item) { $coupon = new MM_UserDefinedPage($item->id); $editActionUrl = 'onclick="mmjs.edit(\'mm-page-dialog\', \'' . $item->id . '\', 580, 300)"'; $deleteActionUrl = 'onclick="mmjs.remove(\'' . $item->id . '\')"'; $actions = MM_Utils::getEditIcon("Edit User-Defined Page", '', $editActionUrl); $actions .= MM_Utils::getDeleteIcon("Delete User-Defined Page", 'margin-left:5px;', $deleteActionUrl); $rows[] = array(array('content' => "<span title='ID [" . $coupon->getId() . "]'>" . $item->name . "</span>"), array('content' => "<span style='font-family:courier;'>" . $item->url . "</span>"), array('content' => $actions)); } $headers = array('name' => array('content' => 'Name'), 'url' => array('content' => 'Page URL'), 'actions' => array('content' => 'Actions')); $dataGrid->setHeaders($headers); $dataGrid->setRows($rows); $dgHtml = $dataGrid->generateHtml(); if ($dgHtml == "") { $dgHtml = "<p><i>No user-defined pages</i></p>"; } ?> <div class="mm-wrap"> <div style="width:750px;" class="mm-info-box blue"> <p>Sometimes you may have customer data specific to your business that you'd like to display alongside member information in MemberMouse. User-defined pages give you the opportunity to load this proprietary customer data right
$showActivate = true; } } } if ($showActivate) { $actions .= "<a style=\"cursor: pointer;\" onclick=\"mmjs.changeBundleStatus('{$user->getId()}', '{$bundle->getId()}', '" . MM_Status::$ACTIVE . "')\" title=\"Activate {$bundle->getName()}\">" . MM_Utils::getIcon('play-circle', 'green', '1.3em', '3px', '', 'margin-right:3px;') . "</a> "; } if ($showCancel) { $actions .= "<a style=\"cursor: pointer;\" onclick=\"mmjs.changeBundleStatus('{$user->getId()}', '{$bundle->getId()}', '" . MM_Status::$CANCELED . "')\" title=\"Cancel {$bundle->getName()}\">" . MM_Utils::getIcon('stop', 'red', '1.2em', '2px', '', 'margin-right:3px;') . "</a> "; } if ($showPause) { $actions .= " <a style=\"cursor: pointer;\" onclick=\"mmjs.changeBundleStatus('{$user->getId()}', '{$bundle->getId()}', '" . MM_Status::$PAUSED . "')\" title=\"Pause {$bundle->getName()}\">" . MM_Utils::getIcon('pause', 'turq', '1.2em', '2px', '', 'margin-right:3px;') . "</a> "; } if ($showEditCalc) { $editActionUrl = 'onclick="mmjs.editBundleConfiguration(\'' . $user->getId() . '\', \'' . $bundle->getId() . '\')"'; $actions .= MM_Utils::getEditIcon("Edit Bundle Configuration", '', $editActionUrl); } $expirationDate = ""; if ($appliedBundle->doesExpire() && $appliedBundle->getStatus() == MM_Status::$ACTIVE) { $expirationDate = $appliedBundle->getExpirationDate(true); } else { $expirationDate = MM_NO_DATA; } $cancellationDate = ""; if ($appliedBundle->isPendingCancellation()) { $cancellationDate = $appliedBundle->getCancellationDate(true); } else { $cancellationDate = MM_NO_DATA; } $rows[] = array(array('content' => MM_Utils::abbrevString($bundle->getName())), array('content' => $status), array('content' => "<span style='font-family:courier;'>" . number_format($user->getDaysWithBundle($bundle->getId())) . "</span>"), array('content' => $appliedBundle->getApplyDate(true)), array('content' => $expirationDate), array('content' => $cancellationDate), array('content' => $actions)); }
* * MemberMouse(TM) (http://www.membermouse.com) * (c) MemberMouse, LLC. All rights reserved. */ $view = new MM_CustomFieldView(); $dataGrid = new MM_DataGrid($_REQUEST, "id", "desc", 10); $data = $view->getViewData($dataGrid); $dataGrid->setTotalRecords($data); $dataGrid->recordName = "custom field"; $rows = array(); foreach ($data as $key => $item) { $customField = new MM_CustomField($item->id); // Actions $editActionUrl = 'onclick="mmjs.edit(\'mm-custom-fields-dialog\', \'' . $customField->getId() . '\', 475, 335)"'; $deleteActionUrl = 'onclick="mmjs.remove(\'' . $customField->getId() . '\')"'; $actions = MM_Utils::getEditIcon("Edit Custom Field", '', $editActionUrl); if (!MM_CustomField::isBeingUsed($customField->getId())) { $actions .= MM_Utils::getDeleteIcon("Delete Custom Field", 'margin-left:5px;', $deleteActionUrl); } else { $actions .= MM_Utils::getDeleteIcon("This custom field is currently being used and cannot be deleted", 'margin-left:5px;', '', true); } if ($item->show_on_my_account) { $myAcctPage = MM_Utils::getCheckIcon("Show on My Account Page"); } else { $myAcctPage = MM_Utils::getCrossIcon("Hide on My Account Page"); } $smartTags = '<a title="Show Form SmartTag" onclick="mmjs.showCheckoutFormSmartTags(' . $customField->getId() . ',\'' . addslashes($customField->getDisplayName()) . '\')" class="mm-ui-button" style="margin:0px;">' . MM_Utils::getIcon('tag', '', '1.2em', '1px', '', 'margin-right:0px;') . '</a>'; $rows[] = array(array('content' => "<span title='ID [" . $customField->getId() . "]'>" . $customField->getDisplayName() . "</span>"), array('content' => MM_CustomField::getFieldTypeName($item->type)), array('content' => $myAcctPage), array('content' => $smartTags), array('content' => $actions)); } $headers = array('name' => array('content' => 'Name'), 'type' => array('content' => 'Type', "attr" => "style='width:110px;'"), 'show_on_my_account' => array('content' => 'My Account Page', "attr" => "style='width:125px;'"), '' => array('content' => 'Form SmartTag', "attr" => "style='width:145px;'"), 'actions' => array('content' => 'Actions', "attr" => "style='width:60px;'")); $dataGrid->setHeaders($headers);
$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 { $actions .= MM_Utils::getDeleteIcon("This membership level is currently being used and cannot be deleted", 'margin-left:5px;', '', true); } $rows[] = array(array('content' => $defaultFlag . " <span title='ID [" . $item->id . "]'>" . $item->name . "</span>"), array('content' => $membershipLevel), array('content' => $productAssociations), array('content' => $item->bundles), 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:400px;"'), 'bundles' => array('content' => 'Bundles', 'attr' => 'style="width:200px;"'), 'purchaselinks' => 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 membership levels.</i></p>"; } ?>
* MemberMouse(TM) (http://www.membermouse.com) * (c) MemberMouse, LLC. All rights reserved. */ $view = new MM_ApiView(); $dataGrid = new MM_DataGrid($_REQUEST, "id", "asc", 10); $data = $view->getViewData($dataGrid); $dataGrid->setTotalRecords($data); $dataGrid->width = "700px"; $dataGrid->recordName = "API credential"; $rows = array(); $headers = array('name' => array('content' => 'Name'), 'api_key' => array('content' => 'Key'), 'api_secret' => array('content' => 'Password'), 'status' => array('content' => 'Status'), 'actions' => array('content' => 'Actions')); foreach ($data as $key => $item) { // Actions $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">