$_POST = filterArray($_POST); $_POST['submit'] = false; } unset($_SESSION['btComposeList'][$pmSessionID]); } if (!$_POST['submit']) { $pmSessionID = uniqid(); $composeListJS = ""; $_SESSION['btComposeList'][$pmSessionID]['member'] = array(); $_SESSION['btComposeList'][$pmSessionID]['rankcategory'] = array(); $_SESSION['btComposeList'][$pmSessionID]['rank'] = array(); $_SESSION['btComposeList'][$pmSessionID]['squad'] = array(); $_SESSION['btComposeList'][$pmSessionID]['tournament'] = array(); $_SESSION['btComposeList'][$pmSessionID]['exptime'] = time() + 3600; if (isset($_GET['threadID']) && $pmObj->select($_GET['threadID']) && isset($_GET['replyID']) && $pmObj->select($_GET['replyID'])) { $replyPMInfo = $pmObj->get_info(); $arrReceivers = $pmObj->getAssociateIDs(); $_POST['subject'] = "RE: " . filterText($replyPMInfo['subject']); if ($replyPMInfo['receiver_id'] != 0 && ($replyPMInfo['sender_id'] == $memberInfo['member_id'] || $replyPMInfo['receiver_id'] == $memberInfo['member_id'])) { $member->select($replyPMInfo['sender_id']); $member->objRank->select($member->get_info("rank_id")); $_SESSION['btComposeList'][$pmSessionID]['member'][] = $replyPMInfo['sender_id']; $composeListJS = "\n\t\t\t\t\n\t\t\t\t\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'member_" . $replyPMInfo['sender_id'] . "'><div style='float: left'>" . $member->objRank->get_info_filtered("name") . " " . $member->get_info_filtered("username") . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'member_" . $replyPMInfo['sender_id'] . "'>×</div></div>\");\n\t\t\t\t\n\t\t\t\t"; } elseif ($replyPMInfo['receiver_id'] == 0 && ($replyPMInfo['sender_id'] == $memberInfo['member_id'] || in_array($memberInfo['member_id'], $arrReceivers))) { if (isset($_GET['replyall'])) { $pmObj->set_assocTableKey("pmmember_id"); $arrPMMID = $pmObj->getAssociateIDs(); $arrGroups['list'] = array(); $arrGroups['rank'] = array(); $arrGroups['squad'] = array(); $arrGroups['tournament'] = array();
if (count($addAppForm->errors) == 0) { if ($appComponentObj->getHighestOrderNum() == "") { $componentOrderNum = $appComponentObj->validateOrder("first", "before"); } else { $appComponentObj->selectByOrder(1); $componentOrderNum = $appComponentObj->makeRoom("after"); } if ($_POST['newComponentRequired'] != 0) { $_POST['newComponentRequired'] = 1; } $arrColumns = array("name", "componenttype", "ordernum", "required", "tooltip"); $arrValues = array($_POST['newComponentName'], $_POST['newComponentType'], $componentOrderNum, $_POST['newComponentRequired'], $_POST['newComponentTooltip']); if ($appComponentObj->addNew($arrColumns, $arrValues)) { if ($_POST['newComponentType'] == "select" || $_POST['newComponentType'] == "multiselect") { $appComponentSelectOptionObj = new Basic($mysqli, "app_selectvalues", "appselectvalue_id"); $newComponentID = $appComponentObj->get_info("appcomponent_id"); foreach ($_SESSION['btAppComponent']['cOptions'] as $optionValue) { $appComponentSelectOptionObj->addNew(array("appcomponent_id", "componentvalue"), array($newComponentID, $optionValue)); } } elseif ($_POST['newComponentType'] == "profile") { $appComponentSelectOptionObj = new Basic($mysqli, "app_selectvalues", "appselectvalue_id"); $newComponentID = $appComponentObj->get_info("appcomponent_id"); $appComponentSelectOptionObj->addNew(array("appcomponent_id", "componentvalue"), array($newComponentID, $_POST['profileOptionID'])); } $member->logAction("Added a new member application component."); echo "\n\t\t\t\t\t<div id='addAppComponentSuccess' style='display: none'>\n\t\t\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\t\t\tNew Member Application Component Added!<br><br>\n\t\t\t\t\t\t\tClick OK to continue modifying the member application.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#addAppComponentSuccess').dialog({\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttitle: 'Add Application Component',\n\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\t\twidth: 450,\n\t\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\t\t\$('#appComponentList').fadeOut(250);\n\t\t\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/membermanagement/include/appcomponentlist.php', { }, function(data) {\n\t\t\t\t\t\t\t\t\t\t\t\$('#appComponentList').html(data);\n\t\t\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\t\t\$('#appComponentList').fadeIn(250);\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\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\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#appComponentForm').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</script>\n\t\t\t\t\t\n\t\t\t\t"; } else { $addAppForm->errors[] = "nable to save information to the database. Please contact the website administrator."; } } if (count($addAppForm->errors) == 0) {
public function get_info($returnSingleValue = "") { global $MAIN_ROOT; $result = parent::get_info($returnSingleValue); if (substr($result['imageurl'], 0, 4) != "http") { if ($returnSingleValue == "") { $fullImageURL = $MAIN_ROOT . $result['imageurl']; $result['imageurl'] = $fullImageURL; } elseif ($returnSingleValue == "imageurl") { $fullImageURL = $MAIN_ROOT . $result; $result = $fullImageURL; } } return $result; }
<?php include "../_setup.php"; include_once "../classes/member.php"; include_once "../classes/basicorder.php"; $member = new Member($mysqli); $appComponentObj = new BasicOrder($mysqli, "app_components", "appcomponent_id"); $appComponentObj->set_assocTableName("app_selectvalues"); $appComponentObj->set_assocTableKey("appselectvalue_id"); if ($_GET['appCompID'] != -1 && !$appComponentObj->select($_GET['appCompID']) || $_GET['appCompID'] != -1 && ($appComponentObj->get_info("componenttype") != "captcha" && $appComponentObj->get_info("componenttype") != "captchaextra")) { exit; } if (isset($_GET['display'])) { echo "<img src='" . $MAIN_ROOT . "images/captcha.php?appCompID=" . $_GET['appCompID'] . "&new=" . time() . "' width='440' height='90'>"; } else { header('Content-Type: image/png'); if ($_GET['appCompID'] == -1) { $appCompInfo['appcomponent_id'] = -1; } else { $appCompInfo = $appComponentObj->get_info_filtered(); } $captchaObj = new Basic($mysqli, "app_captcha", "appcaptcha_id"); $filterIP = $mysqli->real_escape_string($IP_ADDRESS); $mysqli->query("DELETE FROM " . $dbprefix . "app_captcha WHERE appcomponent_id = '" . $appCompInfo['appcomponent_id'] . "' AND ipaddress = '" . $filterIP . "'"); // Create the image $im = imagecreatetruecolor(440, 90); // Colors $black = imagecolorallocate($im, 9, 9, 9); $blackAlpha = imagecolorallocatealpha($im, 9, 9, 9, 25); $redAlpha = imagecolorallocatealpha($im, 255, 0, 0, 15); $white = imagecolorallocate($im, 255, 255, 255);
// Check Category if (!$categoryObj->select($_POST['forumcat'])) { $dispError .= " <b>·</b> You selected an invalid forum category.<br>"; $countErrors++; } // Check Subforum if ($_POST['subforum'] == 1 && $boardObj->select($_POST['subforumboard'])) { $setSubForum = $_POST['subforumboard']; } else { $setSubForum = 0; } $boardObj = new ForumBoard($mysqli); // Reset boardObj $boardObj->setSubForumID($setSubForum); // Check Order $boardObj->setCategoryKeyValue($categoryObj->get_info("forumcategory_id")); $intNewOrderSpot = $boardObj->validateOrder($_POST['displayorder'], $_POST['beforeafter']); if ($intNewOrderSpot === false) { $dispError .= " <b>·</b> You selected an invalid display order.<br>"; $countErrors++; } // Forum Access if ($_POST['accesstype'] != 1) { $_POST['accesstype'] = 0; $arrRanks = array(); $arrMembers = array(); } else { $result = $mysqli->query("SELECT rank_id FROM " . $dbprefix . "ranks WHERE rank_id != '1'"); while ($row = $result->fetch_assoc()) { $checkboxName = "rankaccess_" . $row['rank_id']; if ($_SESSION['btRankAccessCache'][$checkboxName] == "1") {