Ejemplo n.º 1
0
         $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>)";
                 }
             }
         }
         if (empty($eventNameAttributes)) {
Ejemplo n.º 2
0
                        if (strpos($k, 'helper') === false) {
                            $fieldId = preg_replace("/[^0-9]+/", "", $k);
                            $response = $user->setCustomData($fieldId, $v);
                            if (MM_Response::isError($response)) {
                                if (!empty($v)) {
                                    $message = $response->message;
                                }
                            }
                        }
                    }
                }
                // does account update event need to be dispatched?
                $fields = MM_CustomField::getCustomFieldsList();
                foreach ($fields as $id => $val) {
                    if (MM_CustomFieldData::wasRecentlyUpdated($id, $user->getId())) {
                        do_action(MM_Event::$MEMBER_ACCOUNT_UPDATE, MM_Event::packageMemberData($user->getId()));
                        break;
                    }
                }
                if (empty($message)) {
                    $message = "Custom fields updated successfully";
                }
            }
            $fields = MM_CustomField::getCustomFieldDataByUser($user->getId());
            ?>
<style>
	.mm-short-text-field { width: 250px; }
	.mm-long-text-field { width:400px; height:75px; }
	.mm-radio-button { display:block; clear:both; }
</style>
<form name='mm_custom_post' method='post'>