} else { $defaultFlag = MM_Utils::getDefaultFlag("Set as Default Commission Profile\n\n{$defaultDescription}", "onclick='mmjs.setDefault(\"" . $item->id . "\")'", false, 'margin-right:5px;'); } if ($profile->initialCommissionEnabled()) { $initialCommission = MM_Utils::getCheckIcon(); } else { $initialCommission = MM_Utils::getCrossIcon(); } 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'));
$usedPages[$page->post_id] = array(); } if ($currentType == $page->access_type) { if ($id == $page->access_id) { $usedPages[$page->post_id][] = array('id' => $id, 'type' => $currentType); } } } $index = 0; $subRows = $rowNum; foreach ($usedPages as $pageId => $accessItems) { $image = ""; foreach ($accessItems as $item) { if ($item["type"] == $currentType) { if ($item["id"] == $id) { $image = MM_Utils::getCheckIcon(); } } } $className = "mm-dsm-cell-content-expanded"; if ($index == count($usedPages) - 1) { $className = "mm-dsm-cell-content-expanded-none"; } ?> <tr> <?php if (empty($image)) { $key = $id . "_" . $currentType . "_" . $subRows; $obj = getObject($currentType . "_" . $id); $post = get_post($pageId); ?>
$pluginActive = true; } ?> <div style="width: 600px; margin-top: 8px;" class="mm-divider"></div> <div class="mm-wrap"> <p class="mm-header-text">Limit Login Attempts</p> <div style="margin-top:10px;"> <p>MemberMouse integrates with a popular plugin for <a href="http://wordpress.org/plugins/limit-login-attempts/" target="_blank">limiting login attempts</a> written by <a href="http://devel.kostdoktorn.se/" target="_blank">Johan Eenfeldt</a>.</p> <?php if ($pluginActive) { ?> <p> <?php echo MM_Utils::getCheckIcon(); ?> <strong>Plugin activated</strong> </p> <?php } else { ?> <p> <a href="<?php echo esc_url(network_admin_url('plugin-install.php?tab=plugin-information&plugin=limit-login-attempts&TB_iframe=true&width=650&height=600')); ?> " class="mm-ui-button green thickbox">Install Plugin</a> <a href="<?php echo esc_url(network_admin_url('plugin-install.php?tab=plugin-information&plugin=limit-login-attempts&TB_iframe=true&width=650&height=600')); ?> " class="mm-ui-button thickbox">Learn more</a>
$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); $dataGrid->setRows($rows); $dataGrid->width = "750px"; $dgHtml = $dataGrid->generateHtml(); if ($dgHtml == "") { $dgHtml = "<p><i>No custom fields.</i></p>"; } ?>
$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 ($useCustomField2) { if ($item->custom_field_value2 == MM_CustomField::$CHECKBOX_ON) { $customFieldContent = MM_Utils::getCheckIcon(); } else { if ($item->custom_field_value2 == MM_CustomField::$CHECKBOX_OFF) { $customFieldContent = MM_Utils::getCrossIcon(); } else { $customFieldContent = $item->custom_field_value2; } } $row[] = array('content' => $customFieldContent); } switch ($searchByDate) { case "user_registered": $row[] = array('content' => $user->getRegistrationDate(true)); break; case "status_updated": $row[] = array('content' => MM_Utils::dateToLocal($item->status_updated));