function revokeMedalSave() { global $mysqli, $member, $medalObj, $memberInfo, $formObj; $revokeMedalObj = new Basic($mysqli, "medals_members", "medalmember_id"); $arrMemberMedals = $member->getMedalList(true); $memberMedalID = array_search($_POST['medal'], $arrMemberMedals); if ($revokeMedalObj->select($memberMedalID) && $revokeMedalObj->delete()) { // Check if medal is frozen for member already $arrFrozenMembers = $medalObj->getFrozenMembersList(); if (in_array($_POST['member'], $arrFrozenMembers)) { $frozenMedalID = array_search($_POST['member'], $arrFrozenMembers); $medalObj->objFrozenMedal->select($frozenMedalID); $medalObj->objFrozenMedal->delete(); } $frozenMessage = ""; if ($medalObj->get_info("autodays") != 0 || $medalObj->get_info("autorecruits") != 0) { $freezeTime = 86400 * $_POST['freezetime'] + time(); $medalObj->objFrozenMedal->addNew(array("medal_id", "member_id", "freezetime"), array($_POST['medal'], $_POST['member'], $freezeTime)); $dispDays = $_POST['freezetime'] == 1 ? "day" : "days"; $frozenMessage = " The medal will not be awarded again for " . $_POST['freezetime'] . " " . $dispDays . "."; } $logMessage = $member->getMemberLink() . " was stripped of the " . $medalObj->get_info_filtered("name") . " medal." . $frozenMessage . "<br><br><b>Reason:</b><br>" . filterText($_POST['reason']); $member->postNotification("You were stripped of the medal: <b>" . $medalObj->get_info_filtered("name") . "</b>"); $member->select($memberInfo['member_id']); $member->logAction($logMessage); } else { $formObj->blnSaveResult = false; $formObj->errors[] = "Unable to save information to the database. Please contact the website administrator."; } }
public function delete() { $returnVal = false; if ($this->intTableKeyValue != "") { $info = $this->arrObjInfo; $returnVal = parent::delete(); if ($returnVal) { if ($info['profilepic'] != "") { deleteFile(BASE_DIRECTORY . $info['profilepic']); } if ($info['avatar'] != "") { deleteFile(BASE_DIRECTORY . $info['avatar']); } } } return $returnVal; }
$dispError .= " <b>·</b> The selected member is not on IA.<br>"; } $arrColumns = array("onia"); $arrValues = $_POST['ia'] == 1 ? array(1) : array(0); if ($_POST['ia'] = "1") { $ia_NAME = "On Leave"; } else { $ia_NAME = "Off Leave"; } if ($member->update($arrColumns, $arrValues)) { // Check for pending IA request and delete $checkRequested = $member->requestedIA(true); if ($checkRequested !== false) { $requestIAObj = new Basic($mysqli, "iarequest", "iarequest_id"); $requestIAObj->select($checkRequested); $requestIAObj->delete(); } echo "\n\t\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\tSuccessfully Set Member's IA Status!\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t \n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\tpopupDialog('IA Options', '" . $MAIN_ROOT . "members', 'successBox');\n\t\t\t\t</script>\n\t\t\t"; if ($_POST['why'] != "I") { $reasonWHY = " Until {$reason}"; } else { $reasonWHY = ""; } $member->postNotification("You are " . $ia_NAME . $reasonWHY); $dispIAMember = $member->getMemberLink(); $member->select($memberInfo['member_id']); $member->logAction("Set " . $dispIAMember . " IA status to " . $ia_NAME); } else { $countErrors++; $dispError .= " <b>·</b> Unable to save information to database! Please contact the website administrator.<br>"; }
$checkAccess = $checkAccess1 || $checkAccess2; if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if ($checkAccess) { if (isset($_SESSION['btStatCache'][$_POST['sID']])) { $countErrors = 0; if ($_SESSION['btStatCache'][$_POST['sID']]['statType'] == "input") { foreach ($_SESSION['btStatCache'] as $statInfo) { if ($statInfo['statType'] == "calculate" and ($statInfo['firstStat'] == $_POST['sID'] or $statInfo['secondStat'] == $_POST['sID'])) { $countErrors++; } } } if ($countErrors == 0) { if ($gameStatsObj->select($_SESSION['btStatCache'][$_POST['sID']]['gamestatsID'])) { $gameStatsObj->delete(); } unset($_SESSION['btStatCache'][$_POST['sID']]); $x = 0; $tempArray = array(); foreach ($_SESSION['btStatCache'] as $statInfo) { $tempArray[$x] = $statInfo; $x++; } $_SESSION['btStatCache'] = $tempArray; } else { echo "\n\t\t\t\t\t<div id='errorPopup' style='display: none'><p align='center'>There is currently an auto-calculated stat using <b>" . filterText($_SESSION['btStatCache'][$_POST['sID']]['statName']) . "</b>. Please delete all auto-calculated stats that are using <b>" . filterText($_SESSION['btStatCache'][$_POST['sID']]['statName']) . "</b> to continue.</p></div>\n\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\$('#errorPopup').dialog({\n\t\t\t\t\t\t\t\ttitle: 'Add Game Statistics - Error',\n\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\twidth: 425,\n\t\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\t\tzIndex: 99999,\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\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\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\$('.ui-dialog :button').blur();\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t</script>\n\t\t\t\t\n\t\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\n\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\$('#statList').hide();\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/statcache/view.php', { }, function(data) {\n\t\t\t\t\t\t\$('#statList').html(data);\n\t\t\t\t\t\t\$('#statList').fadeOut(400);\n\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\$('#statList').fadeIn(400);\n\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t"; } }
public function delete() { $returnVal = false; if ($this->intTableKeyValue != "") { $blnDelete = parent::delete(); // Revoke access on Facebook $deleteURL = "https://graph.facebook.com/" . $this->arrFacebookInfo['id'] . "/permissions?access_token=" . $this->accessToken; $revokeAccess = $this->httpRequest($deleteURL, "DELETE", array(), "access_token=" . $this->accessToken); if ($blnDelete && $revokeAccess == "true") { $returnVal = true; } } return $returnVal; }
if ($_POST['action'] == "accept") { $arrRankList = $squadObj->getRankList(); if (!$squadObj->objSquadRank->select($squadInviteInfo['startingrank_id']) && count($arrRankList) > 1) { $rankKey = count($arrRankList) - 1; $squadInviteInfo['startingrank_id'] = $arrRankList[$rankKey]; } elseif (!$squadObj->objSquadRank->select($squadInviteInfo['startingrank_id']) && count($arrRankList) <= 1) { $member->select($squadInfo['member_id']); $member->postNotification("There are currently members in your squad, <b><a href='" . $MAIN_ROOT . "squads/profile.php?sID=" . $squadInfo['squad_id'] . "'>" . $squadInfo['name'] . "</a></b> without ranks!"); $member->select($memberInfo['member_id']); } $squadInviteObj->update(array("dateaction", "status"), array(time(), "1")); $arrColumns = array("squad_id", "member_id", "squadrank_id", "datejoined"); $arrValues = array($squadInviteInfo['squad_id'], $memberInfo['member_id'], $squadInviteInfo['startingrank_id'], time()); $squadObj->objSquadMember->addNew($arrColumns, $arrValues); $intViewSquadsCID = $consoleObj->findConsoleIDByName("View Your Squads"); $member->postNotification("Congratulations! You just joined the squad <b>" . $squadInfo['name'] . "</b>. View the Squads section of <a href='" . $MAIN_ROOT . "members'>My Account</a> to <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $intViewSquadsCID . "'>View Your Squads</a>."); $member->select($squadInviteInfo['sender_id']); $member->postNotification("<b>" . $memberLink . "</b> has accepted the invitation to join <b><a href='" . $MAIN_ROOT . "squads/profile.php?sID=" . $squadInfo['squad_id'] . "'>" . $squadInfo['name'] . "</a></b>"); $mysqli->query("DELETE FROM " . $dbprefix . "squadapps WHERE member_id = '" . $memberInfo['member_id'] . "'"); echo "\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\$('#actionMessage').html(\"<p class='main' align='center' style='font-weight: bold'><span class='successFont'>Squad Invitation Accepted!</span></p>\");\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t"; } else { $squadInviteObj->update(array("dateaction", "status"), array(time(), "2")); $member->select($squadInviteInfo['sender_id']); $member->postNotification("<b>" . $memberLink . "</b> has declined the invitation to join <b><a href='" . $MAIN_ROOT . "squads/profile.php?sID=" . $squadInfo['squad_id'] . "'>" . $squadInfo['name'] . "</a></b>"); echo "\n\t\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\$('#actionMessage').html(\"<p class='main' align='center' style='font-weight: bold'><span class='failedFont'>Squad Invitation Declined!</span></p>\");\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\n\t\t\t"; } } elseif (in_array($memberInfo['member_id'], $squadMemberList)) { $squadInviteObj->delete($_POST['siID']); } include "invitelist.php"; }
*/ // Config File $prevFolder = "../"; include $prevFolder . "_setup.php"; $diplomacyObj = new Basic($mysqli, "diplomacy", "diplomacy_id"); if (!$diplomacyObj->select($_GET['dID'])) { 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) {
} else { $_SESSION['btMembersOnlyTagger'] = 1; echo "\n\t\t\t\t\n\t\t\t\tThe member's only page tagger is currently <b>on</b>.<br><br>\n\t\t\t\n\t\t\t\t<a href='javascript:void(0)' onclick='setMembersOnlyTaggerStatus()'>Turn Off Member's Only Page Tagger</a>\n\t\t\t\n\t\t\t"; } } elseif ($_POST['setPageStatus'] == 1 && !isset($_POST['pageID']) && $_SESSION['btMembersOnlyTagger'] == 1) { $taggerObj = new Basic($mysqli, "membersonlypage", "pageurl"); if (!$taggerObj->select($_POST['tagURL'], false)) { $taggerObj->addNew(array("pagename", "pageurl", "dateadded"), array($_POST['pageName'], $_POST['tagURL'], time())); echo "\n\t\t\t\n\t\t\t\t<p align='center' style='margin: 0px; margin-bottom: 15px'><b>Members Only Tagger: " . $_POST['pageName'] . "</b></p>\n\t\t\t\t\n\t\t\t\t<p align='center'>Current Status: <span class='pendingFont'>Member's Only</span><br>Return to <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>Member's Only Pages</a></p>\n\t\t\t\n\t\t\t\t\n\t\t\t\t<div class='taggerBottomLeft'><a href='javascript:void(0)' onclick='setMembersOnlyTaggerStatus()'>Turn Off</a></div>\n\t\t\t\t<div class='taggerBottomRight'><a href='javascript:void(0)' onclick='setMembersOnlyPageStatus()'>Untag Page</a></div>\n\t\t\t\t\n\t\t\n\t\t\t"; } else { $taggerObj->delete(); echo "\n\t\t\t\n\t\t\t\t<p align='center' style='margin: 0px; margin-bottom: 15px'><b>Members Only Tagger: " . $_POST['pageName'] . "</b></p>\n\t\t\t\t\n\t\t\t\t<p align='center'>Current Status: <span class='publicNewsColor'>Public</span><br>Return to <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>Member's Only Pages</a></p>\n\t\t\t\n\t\t\t\t\n\t\t\t\t<div class='taggerBottomLeft'><a href='javascript:void(0)' onclick='setMembersOnlyTaggerStatus()'>Turn Off</a></div>\n\t\t\t\t<div class='taggerBottomRight'><a href='javascript:void(0)' onclick='setMembersOnlyPageStatus()'>Tag Page</a></div>\n\t\t\t\t\n\t\t\t\n\t\t\t"; } } elseif ($_POST['setPageStatus'] == 1 && isset($_POST['pageID'])) { $taggerObj = new Basic($mysqli, "membersonlypage", "page_id"); if ($taggerObj->select($_POST['pageID'])) { $taggerObj->delete(); include "membersonlypageslist.php"; } } elseif ($_POST['setSectionStatus'] == 1 && ($_POST['pageID'] == "profile" || $_POST['pageID'] == "forum") && ($_POST['pageStatusValue'] == 1 || $_POST['pageStatusValue'] == 0)) { $settingName = "private" . $_POST['pageID']; $arrColumn = array("value"); $arrValue = array($_POST['pageStatusValue']); $webInfoObj->select($webInfoObj->get_key($settingName)); if ($webInfoObj->update($arrColumn, $arrValue)) { echo "<span class='successFont'><i>section privacy updated!</i></span>"; } else { echo "<span class='failedFont'><i>unable to update privacy settings!</i></span>"; } } }
$consoleObj->select($cID); $consoleInfo = $consoleObj->get_info_filtered(); $consoleTitle = $consoleInfo['pagetitle']; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $squadObj = new Squad($mysqli); $arrSquadPrivileges = $squadObj->arrSquadPrivileges; $blnManageShoutbox = false; if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) { $LOGIN_FAIL = false; $memberInfo = $member->get_info_filtered(); if ($squadObj->select($_GET['sID']) && $squadObj->memberHasAccess($memberInfo['member_id'], "manageshoutbox")) { $squadInfo = $squadObj->get_info(); $squadNewsObj = new Basic($mysqli, "squadnews", "squadnews_id"); if ($squadNewsObj->select($_POST['postID'])) { $squadNewsObj->delete(); } $blnManageShoutbox = true; } } $squadMemberList = $squadObj->getMemberList(); $blnShowShoutBox = false; if (in_array($memberInfo['member_id'], $squadMemberList) && $squadInfo['privateshoutbox'] == 1) { $blnShowShoutBox = true; } elseif ($squadInfo['privateshoutbox'] == 0) { $blnShowShoutBox = true; } if ($blnShowShoutBox) { $shoutboxObj = new Shoutbox($mysqli, "squadnews", "squadnews_id"); $shoutboxObj->strDivID = "squadsShoutbox"; $shoutboxObj->intDispWidth = 205;
public function delete() { $returnVal = false; if ($this->intTableKeyValue != "" && $this->arrObjInfo['access_token'] != "") { $blnDelete = parent::delete(); if ($this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "youtube_videos WHERE youtube_id = '" . $this->intTableKeyValue . "'") && $blnDelete) { $returnVal = true; $this->MySQL->query("OPTIMIZE TABLE `" . $this->MySQL->get_tablePrefix() . "youtube_videos`"); file_get_contents("https://accounts.google.com/o/oauth2/revoke?token=" . $this->arrObjInfo['access_token']); } } return $returnVal; }
public function delete() { $returnVal = false; if ($this->intTableKeyValue != "") { $blnDeletePlugin = parent::delete(); $queries = array(); $queries['plugin_pages'] = "DELETE FROM " . $this->MySQL->get_tablePrefix() . "plugin_pages WHERE plugin_id = '" . $this->intTableKeyValue . "'"; $queries['plugin_config'] = "DELETE FROM " . $this->MySQL->get_tablePrefix() . "plugin_config WHERE plugin_id = '" . $this->intTableKeyValue . "'"; $deleteCount = 0; foreach ($queries as $tableName => $query) { if ($this->MySQL->query($query)) { $deleteCount++; $this->MySQL->query("OPTIMIZE TABLE `" . $this->MySQL->get_tablePrefix() . $tableName . "`"); } } if (count($queries) == $deleteCount && $blnDeletePlugin) { $returnVal = true; } } return $returnVal; }
$requestStatus = $_POST['action'] == "approve" ? 1 : 2; $iaRequestObj->update(array("reviewer_id", "reviewdate", "requeststatus"), array($memberInfo['member_id'], time(), $requestStatus)); if ($requestStatus == 1) { $member->select($iaRequestObj->get_info("member_id")); $member->update(array("onia", "inactivedate"), array(1, time())); $member->postNotification("Your inactive request was approved!"); } else { $member->select($iaRequestObj->get_info("member_id")); $member->update(array("onia", "inactivedate"), array(0, 0)); $member->postNotification("Your inactive request was denied!"); } $member->select($memberInfo['member_id']); } elseif ($_POST['action'] == "delete" && $checkRequestID) { $member->select($iaRequestObj->get_info("member_id")); $dispIAMemberName = $member->getMemberLink(); $iaRequestObj->delete(); $member->postNotification("Your inactive request was deleted!"); $member->select($memberInfo['member_id']); $member->logAction("Deleted " . $dispIAMemberName . "'s IA Request."); } } $iaMember = new Member($mysqli); $result = $mysqli->query("SELECT * FROM " . $dbprefix . "iarequest ORDER BY requestdate DESC"); while ($row = $result->fetch_assoc()) { $iaMessages = dispIAMessages($row['iarequest_id']); $iaMember->select($row['member_id']); if (trim($row['reason']) == "") { $row['reason'] = "None"; } $dispActions = ""; if ($row['requeststatus'] == 0) {
if ($memberObj->select($username)) { if ($memberObj->get_info("email") == $email) { $emailvalid = true; } else { $countErrors++; $dispError .= " <b>·</b> POST Validation Failed. Email Validation Error.<br>"; } } else { $countErrors++; $dispError .= " <b>·</b> POST Validation Failed. Username Validation Error.<br>"; } } else { $countErrors++; $dispError .= " <b>·</b> POST Validation Failed. Changekey Validation Error.<br>"; } if ($emailvalid == true && $countErrors == 0) { $memberObj->set_password($newpass); $forgotPassObj->delete(); echo "\n<div class='shadedBox' style='margin-left: auto; margin-right: auto; width: 40%'>\n\t<p class'main' align='center'>\n\t\t<b>Password Successfully Changed!</b> You can now log in to the site with your new password!\n\t</p>\n</div>\n"; } } } elseif ($countErrors == 0) { $dispError .= " <b>·</b> Not a proper setup definition.<br>"; } if ($dispError != "") { echo "\n\t\t<div class='errorDiv'>\n\t\t<strong>Unable to recover password because the following errors occurred:</strong><br><br>\n\t\t{$dispError}\n\t\t<br>\n\t\t</div>\n\t\t"; } ?> <?php include $prevFolder . "themes/" . $THEME . "/_footer.php";
function delete() { if ($this->intTableKeyValue != "") { $blnDelete = parent::delete(); $this->resortOrder(); } }
public function delete() { $returnVal = false; if ($this->intTableKeyValue != "") { $info = $this->arrObjInfo; $returnVal = parent::delete(); deleteFile(BASE_DIRECTORY . $info['splitfile1']); deleteFile(BASE_DIRECTORY . $info['splitfile2']); } return $returnVal; }
public function delete() { $returnVal = false; if ($this->intTableKeyValue != "") { $returnVal = parent::delete(); $downloadObj = new Download($this->MySQL); $arrAttachments = $this->getPostAttachements(); foreach ($arrAttachments as $attachment) { $downloadObj->select($attachment); $downloadObj->delete(); } } }
<?php /* * Bluethrust Clan Scripts v4 * Copyright 2014 * * 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); $manageClanCID = $consoleObj->findConsoleIDByName("Diplomacy: Manage Clans"); $consoleObj->select($manageClanCID); $diplomacyClanObj = new Basic($mysqli, "diplomacy", "diplomacy_id"); if ($member->authorizeLogin($_SESSION['btPassword']) && $diplomacyClanObj->select($_POST['dClanID']) && $member->hasAccess($consoleObj)) { $dClanName = $diplomacyClanObj->get_info_filtered("clanname"); if (isset($_POST['confirmDelete'])) { $diplomacyClanObj->delete(); $member->logAction("Deleted " . $dClanName . " from the diplomacy page."); include "main_manageclans.php"; } else { echo "<p class='main' align='center'>Are you sure you want to delete " . $dClanName . " from the diplomacy page?</p>"; } }
public function delete() { $returnVal = false; if ($this->intTableKeyValue != "") { $this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "app_values WHERE memberapp_id = '" . $this->intTableKeyValue . "'"); $returnVal = parent::delete(); } return $returnVal; }
* License: http://www.bluethrust.com/license.php * */ include_once "../../../_setup.php"; include_once "../../../classes/member.php"; include_once "../../../classes/rank.php"; include_once "../../../classes/news.php"; // Start Page $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage News"); $consoleObj->select($cID); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $memberInfo = $member->get_info_filtered(); $commentObj = new Basic($mysqli, "comments", "comment_id"); $newsObj = new News($mysqli); if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj) && $commentObj->select($_POST['commentID'])) { $commentInfo = $commentObj->get_info_filtered(); $newsObj->select($commentInfo['news_id']); $newsInfo = $newsObj->get_info_filtered(); $member->select($commentInfo['member_id']); $posterInfo = $member->get_info_filtered(); $logMessage = "Deleted comment by " . $member->getMemberLink() . " on news post: <b><a href='" . $MAIN_ROOT . "news/viewpost.php?nID=" . $newsInfo['news_id'] . "'>" . $newsInfo['postsubject'] . "</a></b>"; $member->select($memberInfo['member_id']); $member->logAction($logMessage); $commentObj->delete(); $arrComments = $newsObj->getComments(); $commentCount = $newsObj->countComments(); } include "../../../news/comments.php"; echo "\n\t<script type='text/javascript'>\n\t\t\$(document).ready(function() {\n\t\t\t\$('#commentCount').html('" . $commentCount . "');\n\t\t});\n\t</script>\n";
* 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"; include_once "../../../../classes/consoleoption.php"; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Custom Form Pages"); $consoleObj->select($cID); $customPageObj = new Basic($mysqli, "custompages", "custompage_id"); if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if ($member->hasAccess($consoleObj) && $customPageObj->select($_POST['cpID'])) { define('MEMBERRANK_ID', $memberInfo['rank_id']); $customPageInfo = $customPageObj->get_info_filtered(); if ($_POST['confirm'] == "1") { $customPageObj->delete(); include "main.php"; } else { echo "<p align='center'>Are you sure you want to delete the custom page <b>" . $customPageInfo['pagename'] . "</b>?"; } } elseif (!$customPageObj->select($_POST['cpID'])) { echo "<p align='center'>Unable find the selected custom page. Please try again or contact the website administrator.</p>"; } }
public function delete() { if ($this->intTableKeyValue != "") { $pollInfo = $this->arrObjInfo; $dbprefix = $this->MySQL->get_tablePrefix(); $this->MySQL->query("DELETE FROM " . $dbprefix . "poll_options WHERE poll_id = '" . $pollInfo['poll_id'] . "'"); $this->MySQL->query("DELETE FROM " . $dbprefix . "poll_memberaccess WHERE poll_id = '" . $pollInfo['poll_id'] . "'"); $this->MySQL->query("DELETE FROM " . $dbprefix . "poll_rankaccess WHERE poll_id = '" . $pollInfo['poll_id'] . "'"); $this->MySQL->query("DELETE FROM " . $dbprefix . "poll_votes WHERE poll_id = '" . $pollInfo['poll_id'] . "'"); $this->MySQL->query("OPTIMIZE TABLE `" . $dbprefix . "poll_options`"); $this->MySQL->query("OPTIMIZE TABLE `" . $dbprefix . "poll_memberaccess`"); $this->MySQL->query("OPTIMIZE TABLE `" . $dbprefix . "poll_rankaccess`"); $this->MySQL->query("OPTIMIZE TABLE `" . $dbprefix . "poll_votes`"); parent::delete(); } return true; }
* 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); $diplomacyRequestsCID = $consoleObj->findConsoleIDByName("View Diplomacy Requests"); $consoleObj->select($diplomacyRequestsCID); $diplomacyRequestObj = new Basic($mysqli, "diplomacy_request", "diplomacyrequest_id"); if ($member->authorizeLogin($_SESSION['btPassword']) && $diplomacyRequestObj->select($_POST['reqID']) && $member->hasAccess($consoleObj)) { $diplomacyRequestInfo = $diplomacyRequestObj->get_info_filtered(); if (isset($_POST['confirmDecline'])) { // Send E-mail Confirmation $emailTo = $diplomacyRequestInfo['email']; $emailFrom = "*****@*****.**"; $emailSubject = $websiteInfo['clanname'] . " - Diplomacy Request: Declined"; $emailMessage = "\nHi " . $diplomacyRequestInfo['name'] . ",\n\n\n\t\t\nYour diplomacy request has been declined.\n\n\n-" . $websiteInfo['clanname']; //mail($emailTo, $emailSubject, $emailMessage, "From: ".$emailFrom); $diplomacyRequestObj->delete(); include "diplomacyrequests.php"; $member->logAction("Declined " . $diplomacyRequestInfo['clanname'] . "'s diplomacy request."); } else { echo "\n\t\t\t<div id='confirmDialogBox' 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 <b>" . $diplomacyRequestInfo['clanname'] . "'s</b> diplomacy request?\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<script type='text/javascript'>\n\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\$('#confirmDialogBox').dialog({\n\t\t\t\t\t\n\t\t\t\t\t\ttitle: 'Decline Diplomacy Request',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/diplomacy/include/declinerequest.php', { reqID: " . $_POST['reqID'] . ", confirmDecline: 1 }, function(data) {\n\t\t\t\t\t\t\t\t\t\$('#diplomacyRequests').fadeOut(250);\n\t\t\t\t\t\t\t\t\t\$('#diplomacyRequests').html(data);\n\t\t\t\t\t\t\t\t\t\$('#diplomacyRequests').fadeIn(250);\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');\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\t\n\t\t\t\t\t});\n\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"; } }