示例#1
0
    }
    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'));
$dataGrid->setHeaders($headers);
$dataGrid->setRows($rows);
示例#2
0
$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>";
}
?>
<div class="mm-wrap">
	<div class="mm-button-container">
示例#3
0
                    $id = preg_replace("/[^0-9]+/", "", $type->id);
                    $currentType = preg_match("/(mt_)/", $type->id) ? "member_type" : "access_tag";
                    $usedPages = array();
                    foreach ($pages as $page) {
                        $usedPages[$page->post_id] = 1;
                        if ($currentType == $page->access_type) {
                            if ($id == $page->access_id) {
                                $overallArr[] = MM_Utils::getCheckIcon();
                            }
                        }
                    }
                    if (count($overallArr) == count($usedPages)) {
                        $overall = MM_Utils::getCheckIcon();
                    } else {
                        if (count($overallArr) > 0) {
                            $overall = MM_Utils::getCheckIcon() . " " . MM_Utils::getCrossIcon();
                        }
                    }
                    $alt = "-alt";
                    if ($colNum % 2 == 0) {
                        $alt = "";
                    }
                    ?>
			    		<td class='mm-dsm-cell-types<?php 
                    echo $alt;
                    ?>
'>
			    			<table width='100%'  id='mm-dsm-row<?php 
                    echo $rowNum;
                    ?>
col<?php 
示例#4
0
         $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));
         break;
 }
 $row[] = array('content' => $userEngagement);