?> '> <i class="fa fa-plus-square"></i> </a> <ul> <li><a href="<?php echo MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_MEMBERS, MM_MODULE_USER_DEFINED_PAGES); ?> &user_id=<?php echo $user->getId(); ?> "><i class="fa fa-cog"></i> <em>Manage User-Defined Pages</em></a></li> <?php $udPages = MM_UserDefinedPage::getPageList(); foreach ($udPages as $udPage) { ?> <li><a href="<?php echo MM_ModuleUtils::getUrl($crntPage, MM_MODULE_MEMBER_DETAILS_USER_DEFINED); ?> &user_id=<?php echo $user->getId(); ?> &page_id=<?php echo $udPage->getId(); ?> "><i class="fa fa-file"></i> <?php echo $udPage->getName(); ?> </a></li>
<?php /** * * MemberMouse(TM) (http://www.membermouse.com) * (c) MemberMouse, LLC. All rights reserved. */ $view = new MM_UserDefinedPageView(); $dataGrid = new MM_DataGrid($_REQUEST, "id", "desc", 10); $data = $view->getViewData($dataGrid); $dataGrid->setTotalRecords($data); $dataGrid->recordName = "page"; $rows = array(); foreach ($data as $key => $item) { $coupon = new MM_UserDefinedPage($item->id); $editActionUrl = 'onclick="mmjs.edit(\'mm-page-dialog\', \'' . $item->id . '\', 580, 300)"'; $deleteActionUrl = 'onclick="mmjs.remove(\'' . $item->id . '\')"'; $actions = MM_Utils::getEditIcon("Edit User-Defined Page", '', $editActionUrl); $actions .= MM_Utils::getDeleteIcon("Delete User-Defined Page", 'margin-left:5px;', $deleteActionUrl); $rows[] = array(array('content' => "<span title='ID [" . $coupon->getId() . "]'>" . $item->name . "</span>"), array('content' => "<span style='font-family:courier;'>" . $item->url . "</span>"), array('content' => $actions)); } $headers = array('name' => array('content' => 'Name'), 'url' => array('content' => 'Page URL'), 'actions' => array('content' => 'Actions')); $dataGrid->setHeaders($headers); $dataGrid->setRows($rows); $dgHtml = $dataGrid->generateHtml(); if ($dgHtml == "") { $dgHtml = "<p><i>No user-defined pages</i></p>"; } ?> <div class="mm-wrap"> <div style="width:750px;" class="mm-info-box blue">
<?php $id = 0; if (isset($p->id)) { $id = $p->id; } $udPage = new MM_UserDefinedPage($id); ?> <div id="mm-pages-container"> <table cellspacing="10"> <tr> <td width="140">Name*</td> <td> <input type='hidden' id='id' value='<?php echo $udPage->getId(); ?> ' /> <input id="mm_page_name" type="text" value='<?php echo $udPage->getName(); ?> ' style='width:300px;' /> </td> </tr> <tr> <td width="140">Page URL*</td> <td> <input id="mm_page_url" type="text" value='<?php echo $udPage->getUrl(); ?> ' style='width:400px;' /> </td>
if (isset($_REQUEST[MM_Session::$PARAM_USER_ID])) { $user = new MM_User($_REQUEST[MM_Session::$PARAM_USER_ID]); if ($user->isValid()) { // 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>