echo "\n\t\t<script type='text/javascript'>\n\t\t\twindow.location = '" . $MAIN_ROOT . "diplomacy'\n\t\t</script>\n\t"; exit; } $ipbanObj = new Basic($mysqli, "ipban", "ipaddress"); if ($ipbanObj->select($IP_ADDRESS, false)) { $ipbanInfo = $ipbanObj->get_info(); if (time() < $ipbanInfo['exptime'] or $ipbanInfo['exptime'] == 0) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "banned.php';</script>"); } else { $ipbanObj->delete(); } } $diplomacyInfo = $diplomacyObj->get_info_filtered(); $diplomacyStatusObj = new BasicOrder($mysqli, "diplomacy_status", "diplomacystatus_id"); $diplomacyStatusObj->select($diplomacyInfo['diplomacystatus_id']); $statusInfo = $diplomacyStatusObj->get_info_filtered(); if ($statusInfo['imageurl'] == "") { $dispStatus = $statusInfo['name']; } else { if (strpos($statusInfo['imageurl'], "http://") === false) { $statusInfo['imageurl'] = "../" . $statusInfo['imageurl']; } $dispImgWidth = ""; $dispImgHeight = ""; if ($statusInfo['imagewidth'] != 0) { $dispImgWidth = " width = '" . $statusInfo['imagewidth'] . "' "; } if ($statusInfo['imageheight'] != 0) { $dispImgWidth = " height = '" . $statusInfo['imageheight'] . "' "; } $dispStatus = "<img src='" . $statusInfo['imageurl'] . "'" . $dispImgWidth . $dispImgHeight . " title='" . $statusInfo['name'] . "'>";
include_once "../../../../classes/basicorder.php"; $consoleObj = new ConsoleOption($mysqli); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $cID = $consoleObj->findConsoleIDByName("Member Application"); $consoleObj->select($cID); if (!$member->authorizeLogin($_SESSION['btPassword']) || !$member->hasAccess($consoleObj)) { exit; } } echo "\n\n\t\t<table class='formTable' style='width: 90%; margin-top: 0px'>\n\t\t\t<tr>\n\t\t\t\t<td class='main' style='width: 50%'>Username</td>\n\t\t\t\t<td class='main' align='center' style='width: 25%'>Input</td>\n\t\t\t\t<td class='main' align='center' style='width: 25%; height: 24px'>N/A</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='main' style='width: 50%'>Password</td>\n\t\t\t\t<td class='main' align='center' style='width: 25%'>Input</td>\n\t\t\t\t<td class='main' align='center' style='width: 25%; height: 24px'>N/A</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='main' style='width: 50%'>E-mail Address</td>\n\t\t\t\t<td class='main' align='center' style='width: 25%'>Input</td>\n\t\t\t\t<td class='main' align='center' style='width: 25%; height: 24px'>N/A</td>\n\t\t\t</tr>\n\t\t\t"; $objAppComponent = new BasicOrder($mysqli, "app_components", "appcomponent_id"); $result = $mysqli->query("SELECT appcomponent_id FROM " . $dbprefix . "app_components ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) { $objAppComponent->select($row['appcomponent_id']); $appComponentInfo = $objAppComponent->get_info_filtered(); $dispUpArrow = "<a href='javascript:void(0)' onclick=\"moveAppComponent('up', '" . $row['appcomponent_id'] . "')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/uparrow.png' width='24' height='24' title='Move Up'></a>"; $dispDownArrow = "<a href='javascript:void(0)' onclick=\"moveAppComponent('down', '" . $row['appcomponent_id'] . "')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/downarrow.png' width='24' height='24' title='Move Down'></a>"; if ($appComponentInfo['ordernum'] == 1) { $dispDownArrow = "<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/transparent.png' width='24' height='24'>"; } if ($appComponentInfo['ordernum'] == $objAppComponent->getHighestOrderNum()) { $dispUpArrow = "<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/transparent.png' width='24' height='24'>"; } switch ($appComponentInfo['componenttype']) { case "multiselect": $appComponentInfo['componenttype'] = "Multi-Select"; break; case "largeinput": $appComponentInfo['componenttype'] = "Large-Input"; break;
// Check Name if (trim($_POST['catname']) == "") { $dispError .= " <b>·</b> Category name may not be blank.<br>"; $countErrors++; } // Check Order $intNewOrderSpot = $categoryObj->validateOrder($_POST['displayorder'], $_POST['beforeafter']); if ($intNewOrderSpot === false) { $dispError .= " <b>·</b> You selected an invalid display order.<br>"; $countErrors++; } if ($countErrors == 0) { $arrColumns = array("name", "ordernum"); $arrValues = array($_POST['catname'], $intNewOrderSpot); if ($categoryObj->addNew($arrColumns, $arrValues)) { $forumCatInfo = $categoryObj->get_info_filtered(); echo "\n\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t<p align='center'>\n\t\t\t\t\tSuccessfully Added New Forum Category: <b>" . $forumCatInfo['name'] . "</b>!\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\tpopupDialog('Add Forum Category', '" . $MAIN_ROOT . "members', 'successBox');\n\t\t\t</script>\n\t\t\t"; } else { $countErrors++; $dispError .= " <b>·</b> Unable to save category to the database. Please contact the website administrator.<br>"; } } if ($countErrors > 0) { $_POST = filterArray($_POST); $_POST['submit'] = false; } } if (!$_POST['submit']) { $orderoptions = ""; $result = $mysqli->query("SELECT * FROM " . $dbprefix . "forum_category ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) {
} else { $uploadImg = new BTUpload($_POST['statusimageurl'], "status_", "../images/diplomacy/", array(".jpg", ".png", ".gif", ".bmp"), 4, true); if (!$uploadImg->uploadFile()) { $countErrors++; $dispError .= " <b>·</b> Unable to download status image from remote url. You may need to first download the image and upload normally.<br>"; } else { $statusImageURL = "images/diplomacy/" . $uploadImg->getUploadedFileName(); } //$statusImageURL = $_POST['statusimageurl']; } // If there are still no errors after uploading the image, add to db if ($countErrors == 0) { $arrColumns = array("name", "imageurl", "imagewidth", "imageheight", "ordernum"); $arrValues = array($_POST['statusname'], $statusImageURL, $_POST['imagewidth'], $_POST['imageheight'], $intNewOrderNum); if ($diplomacyStatusObj->addNew($arrColumns, $arrValues)) { echo "\n\t\t\t\t\n\t\t\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\t\tSuccessfully added the " . $diplomacyStatusObj->get_info_filtered("name") . " status to the diplomacy page!\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\tpopupDialog('Add New Diplomacy Status', '" . $MAIN_ROOT . "members', 'successBox');\n\t\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t"; $member->logAction("Added the " . $_POST['statusname'] . " status to the diplomacy page."); } else { $countErrors++; $dispError .= " <b>·</b> Unable to save information to the database. Please contact the website administrator.<br>"; } } } if ($countErrors > 0) { $_POST = filterArray($_POST); $_POST['submit'] = false; } } if (!$_POST['submit']) { $orderoptions = ""; $result = $mysqli->query("SELECT * FROM " . $dbprefix . "diplomacy_status ORDER BY ordernum DESC");
* Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ $prevFolder = "../../../../"; include_once $prevFolder . "_setup.php"; $consoleObj = new ConsoleOption($mysqli); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $cID = $consoleObj->findConsoleIDByName("Member Application"); $consoleObj->select($cID); $appComponentObj = new BasicOrder($mysqli, "app_components", "appcomponent_id"); if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) { if ($appComponentObj->select($_POST['appCompID'])) { $appCompInfo = $appComponentObj->get_info_filtered(); $appComponentObj->set_assocTableName("app_selectvalues"); $appComponentObj->set_assocTableKey("appselectvalue_id"); include BASE_DIRECTORY . "members/include/membermanagement/include/appcomponent_form.php"; if ($_POST['saveComponent']) { // Check Component Name if (trim($_POST['saveComponentName']) == "") { $addAppForm->errors[] = "You can't have a blank component name.<br>"; } if (!in_array($_POST['saveComponentType'], array_keys($typeOptions))) { $addAppForm->errors[] .= "You selected an invalid component type.<br>"; } if (count($addAppForm->errors) == 0) { if ($_POST['saveComponentRequired'] != 0) { $_POST['saveComponentRequired'] = 1; }
* 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"; include_once "../../../../classes/member.php"; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $consoleObj = new ConsoleOption($mysqli); $manageStatusCID = $consoleObj->findConsoleIDByName("Manage Diplomacy Statuses"); $consoleObj->select($manageStatusCID); $diplomacyStatusObj = new BasicOrder($mysqli, "diplomacy_status", "diplomacystatus_id"); $diplomacyStatusObj->set_assocTableName("diplomacy"); $diplomacyStatusObj->set_assocTableKey("diplomacy_id"); if ($member->authorizeLogin($_SESSION['btPassword']) && $diplomacyStatusObj->select($_POST['sID']) && $member->hasAccess($consoleObj)) { $statusName = $diplomacyStatusObj->get_info_filtered("name"); $arrAssociates = $diplomacyStatusObj->getAssociateIDs(); if (count($arrAssociates) > 0) { echo "\n\t\t\t\n\t\t\t<div id='deleteDialogBox' style='display: none'>\n\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\tThere are currently clans on the diplomacy page with the " . $statusName . " status. You must change their status before deleting.\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#deleteDialogBox').dialog({\n\t\t\t\t\t\ttitle: 'Delete Diplomacy Status',\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\tresizable: false,\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\$(this).dialog('close');\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t},\n\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\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\n\t\t\t\n\t\t"; } elseif (count($arrAssociates) == 0 && !isset($_POST['confirmDelete'])) { echo "\n\t\t\t\n\t\t\t<div id='deleteDialogBox' style='display: none'>\n\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\tAre you sure you want to delete the <b>" . $statusName . "</b> diplomacy status?\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#deleteDialogBox').dialog({\n\t\t\t\t\t\ttitle: 'Delete Diplomacy Status',\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tbuttons: {\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\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\$('#statusListDiv').hide();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/diplomacy/include/deletestatus.php', { sID: '" . $_POST['sID'] . "', confirmDelete: 1 }, function(data1) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$('#statusListDiv').html(data1);\n\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\$('#statusListDiv').fadeIn(250);\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\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\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\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t"; } elseif (count($arrAssociates) == 0 && isset($_POST['confirmDelete'])) { $diplomacyStatusObj->set_assocTableName(""); $diplomacyStatusObj->delete(); $member->logAction("Deleted the " . $statusName . " diplomacy status."); include "main_managestatuses.php"; } }
* * Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include "../../../../_setup.php"; include_once "../../../../classes/member.php"; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $categoryObj = new BasicOrder($mysqli, "forum_category", "forumcategory_id"); $categoryObj->set_assocTableName("forum_board"); $categoryObj->set_assocTableKey("forumboard_id"); $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Forum Categories"); $consoleObj->select($cID); if ($member->authorizeLogin($_SESSION['btPassword']) && $categoryObj->select($_POST['catID'])) { $categoryInfo = $categoryObj->get_info_filtered(); $arrBoards = $categoryObj->getAssociateIDs(); if (count($arrBoards) > 0) { echo "\n\t\t\n\t\t\t<div id='deleteMessage' style='display: none'>\n\t\t\t\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tThere are currently boards with the category, <b>" . $categoryInfo['name'] . "</b>. You must move these boards to a different category before deleting.\n\t\t\t\t</p>\n\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$('#deleteMessage').dialog({\n\t\t\t\t\n\t\t\t\t\ttitle: 'Delete Forum Category',\n\t\t\t\t\twidth: 400,\n\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\tresizable: false,\n\t\t\t\t\tmodal: true,\n\t\t\t\t\tshow: 'scale',\n\t\t\t\t\tbuttons: {\n\t\t\t\t\t\n\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$(this).dialog('close');\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});\n\t\t\t\n\t\t\t</script>\n\t\t\n\t\t"; } elseif (count($arrBoards) == 0 && !isset($_POST['confirm'])) { echo "\n\t\t\n\t\t\t<div id='deleteMessage' style='display: none'>\n\t\t\t\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tAre you sure you want to delete the category, <b>" . $categoryInfo['name'] . "</b>?\n\t\t\t\t</p>\n\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$('#deleteMessage').dialog({\n\t\t\t\t\n\t\t\t\t\ttitle: 'Delete Forum Category',\n\t\t\t\t\twidth: 400,\n\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\tresizable: false,\n\t\t\t\t\tmodal: true,\n\t\t\t\t\tshow: 'scale',\n\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\n\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\$('#categoryList').fadeOut(250);\n\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/forum/include/delete_category.php', { catID: '" . $_POST['catID'] . "', confirm: 1 }, function(data) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#categoryList').html(data);\n\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\$('#categoryList').fadeIn(250);\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\$(this).dialog('close');\n\t\t\t\t\t\t\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$(this).dialog('close');\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});\n\t\t\t\n\t\t\t</script>\n\t\t\n\t\t\n\t\t"; } elseif (count($arrBoards) == 0 && isset($_POST['confirm'])) { $categoryObj->delete(); $categoryObj->resortOrder(); include "main_managecategory.php"; } }
public function get_info_filtered($returnSingleValue = "") { global $MAIN_ROOT; $result = parent::get_info_filtered($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; }