* * 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"; } }
$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(); } } else { $statusImageURL = $diplomacyStatusInfo['imageurl']; } // 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); $diplomacyStatusObj->select($diplomacyStatusInfo['diplomacystatus_id']); if ($diplomacyStatusObj->update($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 edited the " . $diplomacyStatusObj->get_info_filtered("name") . " diplomacy status!\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('Edit Diplomacy Status', '" . $MAIN_ROOT . "members', 'successBox');\n\t\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t"; $diplomacyStatusObj->resortOrder(); $member->logAction("Edited the " . $_POST['statusname'] . " diplomacy status."); } else { $countErrors++; $dispError .= " <b>·</b> Unable to save information to the database. Please contact the website administrator.<br>"; } } } if ($countErrors > 0) { $_POST['submit'] = false; } } if (!$_POST['submit']) { $arrBeforeAfter = $diplomacyStatusObj->findBeforeAfter(); $afterSelected = ""; if ($arrBeforeAfter[1] == "after") {
* License: http://www.bluethrust.com/license.php * */ include_once "../../../../_setup.php"; include_once "../../../../classes/member.php"; 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); $appComponentObj = new BasicOrder($mysqli, "app_components", "appcomponent_id"); $appComponentObj->set_assocTableName("app_selectvalues"); $appComponentObj->set_assocTableKey("appselectvalue_id"); if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) { if ($appComponentObj->select($_POST['acID'])) { $arrCompInfo = $appComponentObj->get_info_filtered(); if (!$_POST['confirmDelete']) { echo "\n\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\tAre you sure you want to delete <b>" . $arrCompInfo['name'] . "</b> from the member application?\n\t\t\t\t</p>\n\t\t\t"; } elseif ($_POST['confirmDelete']) { if ($appComponentObj->delete()) { $appComponentObj->resortOrder(); $member->logAction("Deleted a member application component."); echo "\n\t\t\t\t\t\n\t\t\t\t\t<div id='confirmDeleteMessage' style='display: none'>\n\t\t\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\t\t\t<b>" . $arrCompInfo['name'] . "</b> was successfully deleted from 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\n\t\t\t\t\t\tfunction reloadAppCompList() {\n\t\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\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\$('#appComponentList').fadeOut(250);\n\t\t\t\t\t\t\t\t\n\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\$('#appComponentList').html(data);\n\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\$('#appComponentList').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});\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t</script>\n\t\t\t\t\t"; } else { echo "\n\t\t\t\t\n\t\t\t\t\t<div id='confirmDeleteMessage' style='display: none'>\n\t\t\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\t\t\tUnable to delete <b>" . $arrCompInfo['name'] . "</b> from the member application! You may need to delete it manually.\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\t<script type='text/javascript'>\n\t\t\t\t\t\tfunction reloadAppCompList() {\n\t\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"; } echo "\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#confirmDeleteMessage').dialog({\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle: 'Delete Application Component',\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\treloadAppCompList();\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t}\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\t\$('#appComponentForm').dialog('close');\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t</script>\n\t\t\t\t"; } } }