* Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include_once "../../../../_setup.php"; $consoleObj = new ConsoleOption($mysqli); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $memberInfo = $member->get_info_filtered(); $newMemberObj = new Member($mysqli); $cID = $consoleObj->findConsoleIDByName("View Member Applications"); $consoleObj->select($cID); $memberAppObj = new MemberApp($mysqli); if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj) && $memberAppObj->select($_POST['mAppID'])) { $arrMemAppInfo = $memberAppObj->get_info_filtered(); if ($_POST['confirmDecline'] && $arrMemAppInfo['memberadded'] == 0) { if ($memberAppObj->delete()) { $memberAppObj->notifyNewMember(false); $member->logAction("Declined " . $arrMemAppInfo['username'] . "'s member application."); echo "\n\t\t\t\n\t\t\t\t<div id='resultDeclineMessage' style='display: none'>\n\t\t\t\t\t<p class='main' align='center'>" . $arrMemAppInfo['username'] . "'s member application has been declined!</p>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t"; } else { echo "\n\t\t\t\n\t\t\t<div id='resultDeclineMessage' style='display: none'>\n\t\t\t\t<p class='main' align='center'>Unable to decline " . $arrMemAppInfo['username'] . "'s member application! Please contact the website administrator.</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t"; } echo "\n\t\t\t<script type='text/javascript'>\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\$('#resultDeclineMessage').dialog({\n\t\t\t\t\t\ttitle: 'Decline Member Application',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\$('#memberApplications').fadeOut(250);\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/membermanagement/include/memberapplist.php', { }, function(data) {\n\t\t\t\t\t\t\t\t\t\$('#memberApplications').html(data);\n\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\$('#memberApplications').fadeIn(250);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\$('#confirmDeclineMessage').dialog('close');\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t</script>\n\t\t"; } else { echo "\n\t\t\t<div id='confirmDeclineMessage' style='display: none'>\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tAre you sure you want to decline " . $arrMemAppInfo['username'] . "'s application?\n\t\t\t\t\n\t\t\t\t\t<div id='declineLoadingSpiral' style='display: none'>\n\t\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\t\t<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral2.gif'><br>Loading\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t</p>\n\t\t\t\t\n\t\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#confirmDeclineMessage').dialog({\n\t\t\t\t\t\n\t\t\t\t\t\ttitle: 'Decline Member Application - Confirm',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#declineLoadingSpiral').show();\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/membermanagement/include/declinememberapp.php', { mAppID: '" . $_POST['mAppID'] . "', confirmDecline: 1 }, function(data) {\n\t\t\t\t\t\t\t\t\t\$('#declineLoadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\$('#confirmDeclineMessage').html(data);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\t\$('.ui-dialog :button').blur();\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t</script>\n\t\t"; } }
$consoleObj = new ConsoleOption($mysqli); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $cID = $consoleObj->findConsoleIDByName("View Member Applications"); $consoleObj->select($cID); if (!$member->authorizeLogin($_SESSION['btPassword']) || !$member->hasAccess($consoleObj)) { exit; } } $memberAppObj = new MemberApp($mysqli); $appComponentObj = $memberAppObj->objAppComponent; $memberAppForm = $memberAppObj->objSignUpForm; $setupMemberAppForm = array("name" => "display-member-app", "wrapper" => array("<div class='dottedBox' style='margin-top: 20px; width: 90%; margin-left: auto; margin-right: auto;'>", "</div>")); $result = $mysqli->query("SELECT memberapp_id FROM " . $dbprefix . "memberapps ORDER BY applydate DESC"); while ($row = $result->fetch_assoc()) { $memberAppObj->select($row['memberapp_id']); $memberAppInfo = $memberAppObj->get_info_filtered(); $dispApplyDate = getPreciseTime($memberAppInfo['applydate']); // Default Info $i = 0; $arrDefaultInfo = array("dateapplied" => array("type" => "custom", "sortorder" => $i++, "display_name" => "Date Applied", "html" => "<div class='main formInput'>" . $dispApplyDate . "</div>"), "username" => array("type" => "custom", "sortorder" => $i++, "display_name" => "Username", "html" => "<div class='main formInput'>" . $memberAppInfo['username'] . "</div>"), "ipaddress" => array("type" => "custom", "sortorder" => $i++, "display_name" => "IP Address", "html" => "<div class='main formInput'>" . $memberAppInfo['ipaddress'] . "</div>"), "email" => array("type" => "custom", "sortorder" => $i++, "display_name" => "E-mail", "html" => "<div class='main formInput'><a href='mailto:" . $memberAppInfo['email'] . "'>" . $memberAppInfo['email'] . "</a></div>")); // Custom Info $customAppInfo = $memberAppObj->getAppValues(); $arrCompInfo = array(); foreach ($customAppInfo as $componentID => $customInfo) { $appComponentObj->select($componentID); $appCompName = $appComponentObj->get_info_filtered("name"); $compName = "appcomponent_" . $componentID; $dispCompValue = ""; if (count($customInfo['display_values']) > 1) { $displayValueCounter = 1;