示例#1
0
    // 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 &apos;{$bundleName}&apos; 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 &apos;{$bundleName}&apos; 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);
$dataGrid->setRows($rows);
$dataGrid->width = "600px";
$dgHtml = $dataGrid->generateHtml();
if ($dgHtml == "") {
    $dgHtml = "<p><i>No bundle mappings.</i></p>";
}
?>
					<div class="mm-button-container">
						<a onclick="mmjs.create('mm-bundle-mapping-dialog', 475, 235)" class="mm-ui-button green"><?php 
echo MM_Utils::getIcon('plus-circle', '', '1.2em', '1px');
?>
 Create Bundle Mapping</a>
    $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;
示例#3
0
         $description .= "<span style='font-family:courier;'>" . $employee->getEmail() . "</span>";
     }
     if (!empty($actionValue["emailCC"])) {
         $ccEmails = explode(",", $actionValue["emailCC"]);
         if (count($ccEmails) > 0) {
             if (count($ccEmails) == 1) {
                 $description .= ", CC <span style='font-family:courier;'>" . $ccEmails[0] . "</span>";
             } else {
                 $description .= ", CC " . count($ccEmails) . " others";
             }
         }
     }
 } else {
     if ($item->action_type == MM_Action::$MM_ACTION_CALL_SCRIPT) {
         $description .= MM_Utils::getIcon('file-code-o', 'turq', '1.3em', '2px', '', 'margin-right:4px;');
         $description .= " Call script <span style='font-family:courier;'>" . MM_Utils::abbrevString($actionValue["scriptUrl"], 80) . "</span>";
     }
 }
 $eventName = MM_Event::getName($item->event_type);
 $eventNameAttributes = "";
 $eventAttributes = unserialize($item->event_attributes);
 // add event attributes
 switch ($item->event_type) {
     case MM_Event::$MEMBER_ADD:
         if (is_array($eventAttributes) && isset($eventAttributes["membership_level_id"])) {
             $membershipLevelId = $eventAttributes["membership_level_id"];
             if (intval($membershipLevelId) > 0) {
                 $membership = new MM_MembershipLevel($membershipLevelId);
                 if ($membership->isValid()) {
                     $eventNameAttributes = " (<em>" . $membership->getName() . "</em>)";
                 }
示例#4
0
                ?>
    				<td  class='mm-dsm-header-access-types'>
    					<?php 
                if (!empty($type->image)) {
                    ?>
    					<?php 
                    echo $type->image;
                    ?>
    					<?php 
                }
                ?>
    					<span title='<?php 
                echo $type->value;
                ?>
'><?php 
                echo MM_Utils::abbrevString($type->value, $maxHeaderLength);
                ?>
 </span>
    					
    					<a title="Grant Access" onclick="mmjs.addAccessRights('<?php 
                echo $type->id;
                ?>
','<?php 
                echo preg_replace("/[\"\\']+/", "", $type->value);
                ?>
');" class='mm-dsm-imagelink'><?php 
                echo MM_Utils::getIcon('plus-circle', 'white', '1.4em', '2px');
                ?>
</a> 
    					</td>
    				<?php 
         $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));
 }
 // membership level bundles
 $membershipBundles = $membership->getBundles();
 foreach ($membershipBundles as $id => $name) {
     $status = MM_Utils::getIcon('user', 'blue', '1.3em', '2px', "Bundle applied through membership");
     $rows[] = array(array('content' => $name), array('content' => $status), array('content' => MM_NO_DATA), array('content' => MM_NO_DATA), array('content' => MM_NO_DATA), array('content' => MM_NO_DATA), array('content' => MM_NO_DATA));
 }
 $headers = array('bundle' => array('content' => 'Bundle'), 'status' => array('content' => 'Status'), 'days' => array('content' => '<span title=\'Days with Bundle\'>Days...</span>'), 'date_added' => array('content' => 'First Applied'), 'date_expires' => array('content' => 'Expires On'), 'date_cancels' => array('content' => 'Cancels On'), 'actions' => array('content' => 'Actions'));
 $dataGrid->setHeaders($headers);
 $dataGrid->setRows($rows);
 $dgHtml = $dataGrid->generateHtml();
 if ($dgHtml == "") {
     $dgHtml = "<p><em>No bundles applied.</em></p>";
 }
 ?>
示例#6
0
		From: <span style="font-family:courier;"><?php 
                            echo $params[MM_ActivityLog::$PARAM_EMAIL_FROM_ADDRESS];
                            ?>
</span><br/>
		Subject: <span style="font-family:courier;"><?php 
                            echo $params[MM_ActivityLog::$PARAM_EMAIL_SUBJECT];
                            ?>
</span></p>
		<p><span style="font-family:courier;"><?php 
                            echo nl2br($params[MM_ActivityLog::$PARAM_EMAIL_BODY]);
                            ?>
</span></p>
	</div>
						<?php 
                            $details .= " &mdash; ";
                            $details .= " <a onclick=\"viewInfo({$item->id})\" style='cursor: pointer;' title='View Email'>" . MM_Utils::getIcon('file-text', 'blue', '1.2em', '1px', '', 'margin-right:4px;') . "<span style='font-family:courier;'>" . MM_Utils::abbrevString($params[MM_ActivityLog::$PARAM_EMAIL_SUBJECT]) . "</span></a>";
                        }
                    } else {
                        $details .= $urlParts[0];
                    }
                }
                break;
        }
    }
    $row = array();
    $row[] = array('content' => $eventType);
    if (!$isMemberDetailsArea) {
        $row[] = array('content' => $memberLink);
    }
    $row[] = array('content' => $details);
    $row[] = array('content' => $ipAddress);
    $action = '<a title="Insert ID \'' . $item->id . '\'" onclick="stl_js.insertContent(\'' . $item->id . '\')" style="cursor:pointer;">' . MM_Utils::getIcon('plus-circle', 'green', '1.4em', '1px') . '</a>';
    $row_array = array(array('content' => $action), array('content' => $item->id), array('content' => MM_Utils::abbrevString($item->name, 25)));
    if ($p->objectType == MM_TYPE_PRODUCT) {
        $product = new MM_Product($item->id);
        // Associated Access
        $accessGranted = "";
        $membership = $product->getAssociatedMembership();
        if ($membership->isValid()) {
            $accessGranted .= MM_Utils::getAccessIcon(MM_OrderItemAccess::$ACCESS_TYPE_MEMBERSHIP);
            $accessGranted .= " " . MM_Utils::abbrevString($membership->getName(), 25) . "</a>";
        }
        if (empty($accessGranted)) {
            $bundle = $product->getAssociatedBundle();
            if ($bundle->isValid()) {
                $accessGranted .= MM_Utils::getAccessIcon(MM_OrderItemAccess::$ACCESS_TYPE_BUNDLE);
                $accessGranted .= " " . MM_Utils::abbrevString($bundle->getName(), 25) . "</a>";
            }
        }
        if (empty($accessGranted)) {
            $accessGranted = MM_NO_DATA;
        }
        $row_array[] = array('content' => $accessGranted);
    }
    $rows[] = $row_array;
}
$dataGrid->setHeaders($headers);
$dataGrid->setRows($rows);
$dgHtml = $dataGrid->generateHtml();
if ($dgHtml == "") {
    $dgHtml = "<p><i>No " . $dataGrid->recordName . "s found.</i></p>";
}
示例#8
0
 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 ($useCustomField2) {
     if ($item->custom_field_value2 == MM_CustomField::$CHECKBOX_ON) {
         $customFieldContent = MM_Utils::getCheckIcon();