Exemplo n.º 1
0
 public function getBundles($rest)
 {
     $post = $rest->getRequest()->getPost();
     MM_LogApi::logRequest(json_encode($post), "/getBundles");
     if (!Utils::isAuthenticated($post)) {
         return new Response($rest, null, RESPONSE_ERROR_MESSAGE_AUTH, RESPONSE_ERROR_CODE_AUTH, RESPONSE_ERROR_MESSAGE_AUTH);
     }
     $result = MM_APIService::getBundles();
     if (MM_Response::isError($result)) {
         return new Response($rest, null, $result->message, RESPONSE_ERROR_CODE_CONFLICT, RESPONSE_ERROR_MESSAGE_CONFLICT);
     }
     return new Response($rest, $result->message);
 }
Exemplo n.º 2
0
        // check to make sure current employee has access to manage this member
        global $current_user;
        $employee = MM_Employee::findByUserId($current_user->ID);
        $allowAccess = true;
        if ($employee->isValid()) {
            $allowAccess = $employee->canManageMember($user);
        }
        if ($allowAccess) {
            ?>
<div id="mm-form-container">
	<?php 
            if (isset($_GET["page_id"])) {
                $udPage = new MM_UserDefinedPage($_GET["page_id"]);
                $data = new stdClass();
                $data->member_id = $user->getId();
                $userData = MM_APIService::getMember($data);
                if ($udPage->isValid()) {
                    echo "<iframe src='" . $udPage->getUrl() . "?" . http_build_query($userData->message) . "' width='98%' height='650px'></iframe>";
                } else {
                    echo "<em>ERROR: User-defined page not found.</em>";
                }
            } else {
                echo "<em>ERROR: User-defined page not found.</em>";
            }
            ?>
</div>

<div style='clear: both; height:20px;'></div>

<?php 
        } else {