* Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.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'];
$cID = $consoleObj->findConsoleIDByName("View Your Squads"); $consoleObj->select($cID); $consoleInfo = $consoleObj->get_info_filtered(); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $arrSquadPrivileges = $squadObj->arrSquadPrivileges; $squadObj = new Squad($mysqli); $squadAppObj = new Basic($mysqli, "squadapps", "squadapp_id"); // Check Login $LOGIN_FAIL = true; if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) { $LOGIN_FAIL = false; $memberInfo = $member->get_info_filtered(); if ($squadObj->select($_POST['sID']) && $squadObj->memberHasAccess($memberInfo['member_id'], "acceptapps") && $squadAppObj->select($_POST['saID'])) { $squadInfo = $squadObj->get_info_filtered(); $squadAppInfo = $squadAppObj->get_info(); $squadRankList = $squadObj->getRankList(); if ($squadAppInfo['squad_id'] == $_POST['sID'] && $squadAppInfo['status'] == 0 && count($squadRankList) > 1) { if ($_POST['action'] == "accept") { $squadRankKey = count($squadRankList) - 1; $newMemberSquadRank = $squadRankList[$squadRankKey]; $squadAppObj->update(array("dateaction", "status", "squadmember_id"), array(time(), "1", $memberInfo['member_id'])); $arrColumns = array("squad_id", "member_id", "squadrank_id", "datejoined"); $arrValues = array($squadAppInfo['squad_id'], $squadAppInfo['member_id'], $newMemberSquadRank, time()); $squadObj->objSquadMember->addNew($arrColumns, $arrValues); $intViewSquadsCID = $consoleObj->findConsoleIDByName("View Your Squads"); $member->select($squadAppInfo['member_id']); $member->postNotification("Congratulations! Your application for the squad <b>" . $squadInfo['name'] . "</b> has been approved. 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>."); $mysqli->query("DELETE FROM " . $dbprefix . "squadinvites WHERE receiver_id = '" . $squadAppInfo['member_id'] . "'"); echo "\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\$('#actionMessage').html(\"<p class='main' align='center' style='font-weight: bold'><span class='successFont'>Squad Application Approved!</span></p>\");\n\t\t\t\t\t\t});\n\t\t\t\t\t</script>\n\t\t\t\t"; } else {
$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(); $arrGroups['rankcategory'] = array(); foreach ($arrPMMID as $pmmID) { $multiMemPMObj->select($pmmID); $multiMemPMInfo = $multiMemPMObj->get_info(); if ($multiMemPMInfo['grouptype'] != "" && !in_array($multiMemPMInfo['group_id'], $arrGroups[$multiMemPMInfo['grouptype']])) { $arrGroups[$multiMemPMInfo['grouptype']][] = $multiMemPMInfo['group_id']; switch ($multiMemPMInfo['grouptype']) { case "rankcategory": $dispName = $rankCatObj->select($multiMemPMInfo['group_id']) ? $rankCatObj->get_info_filtered("name") . " - Category" : ""; $_SESSION['btComposeList'][$pmSessionID]['rankcategory'][] = $multiMemPMInfo['group_id']; $composeListJS .= "\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'rankcategory_" . $multiMemPMInfo['group_id'] . "'><div style='float: left'>" . $dispName . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'rankcategory_" . $multiMemPMInfo['group_id'] . "'>×</div></div>\");\n\t\t\t\t\t\t\t\t\t"; break; case "rank": $dispName = $member->objRank->select($multiMemPMInfo['group_id']) ? $member->objRank->get_info_filtered("name") . " - Rank" : ""; $_SESSION['btComposeList'][$pmSessionID]['rank'][] = $multiMemPMInfo['group_id']; $composeListJS .= "\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'rank_" . $multiMemPMInfo['group_id'] . "'><div style='float: left'>" . $dispName . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'rank_" . $multiMemPMInfo['group_id'] . "'>×</div></div>\");\n\t\t\t\t\t\t\t\t\t"; break; case "squad": $dispName = $squadObj->select($multiMemPMInfo['group_id']) ? $squadObj->get_info_filtered("name") . " Members" : "";
$dispMembersOnlyTagger = "\n\t\t\t\t<div id='membersOnlyTagger'>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t<div id='membersOnlyLoadingSpiral' style='display: none'>\n\t\t\t\t\t\t<p align='center' class='main'>\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\n\t\t\t\t\t<div id='membersOnlyTaggerHTML'>\n\t\t\t\t\t\t<p align='center' style='margin: 0px; margin-bottom: 15px'><b>Members Only Tagger: " . $actualPageName . "</b></p>\n\t\t\t\t\t\n\t\t\t\t\t\t<p align='center'>Current Status: " . $pageTagStatus . "<br>Return to <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $taggerCID . "'>Member's Only Pages</a></p>\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class='taggerBottomLeft'><a href='javascript:void(0)' onclick='setMembersOnlyTaggerStatus()'>Turn Off</a></div>\n\t\t\t\t\t\t<div class='taggerBottomRight'><a href='javascript:void(0)' onclick='setMembersOnlyPageStatus()'>" . $dispTagOrUntag . " Page</a></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\n\t\t\t\t\tfunction setMembersOnlyTaggerStatus() {\n\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/membersonlypagetagger.php', { setTaggerStatus: '1' }, function(data) {\n\t\t\t\t\t\t\t\t\$('#membersOnlyTagger').fadeOut(250);\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\n\t\t\t\t\tfunction setMembersOnlyPageStatus() {\n\t\t\t\t\t\n\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\$('#membersOnlyTaggerHTML').hide();\n\t\t\t\t\t\t\t\$('#membersOnlyLoadingSpiral').show();\n\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/membersonlypagetagger.php', { setPageStatus: '1', pageName: '" . filterText($actualPageName) . "', tagURL: '" . $pageTaggerURL . "' }, function(data) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#membersOnlyTaggerHTML').html(data);\n\t\t\t\t\t\t\t\t\$('#membersOnlyLoadingSpiral').hide();\n\t\t\t\t\t\t\t\t\$('#membersOnlyTaggerHTML').fadeIn(250);\n\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}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t"; } } } } if (!defined("LOGGED_IN")) { define("LOGGED_IN", false); } if ($taggerObj->select($_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'], false) && constant('LOGGED_IN') == false) { echo "\n\t\n\t\t<script type='text/javascript'>\n\t\t\n\t\t\twindow.location='" . $MAIN_ROOT . "login.php';\n\t\t\n\t\t</script>\n\t\n\t"; exit; } $hitCountObj = new Basic($mysqli, "hitcounter", "hit_id"); $result = $mysqli->query("SELECT * FROM " . $dbprefix . "hitcounter WHERE ipaddress = '" . $IP_ADDRESS . "'"); if ($result->num_rows > 0) { $hitCountRow = $result->fetch_assoc(); $hitCountObj->select($hitCountRow['hit_id']); $updateHits = $hitCountObj->get_info("totalhits") + 1; $updateColumns = array("totalhits", "pagename"); $updateValues = array($updateHits, $PAGE_NAME); if (time() > $hitCountObj->get_info("dateposted") + 1800) { $updateColumns[] = "dateposted"; $updateValues[] = time(); } $hitCountObj->update($updateColumns, $updateValues); } else { $hitCountObj->addNew(array("ipaddress", "dateposted", "pagename", "totalhits"), array($IP_ADDRESS, time(), $PAGE_NAME, 1)); } $blnDisplayNewsTicker = false; $breadcrumbObj = new BreadCrumb(); $hooksObj->addHook("worldclock-display", "displayDefaultWorldClock");
function sendPM($to, $subject, $message, $replypmID = 0, $arrGroups = array()) { $returnVal = false; if ($this->intTableKeyValue != "") { $pmObj = new Basic($this->MySQL, "privatemessages", "pm_id"); if (is_array($to)) { $multiMemPMObj = new Basic($this->MySQL, "privatemessage_members", "pmmember_id"); $arrColumns = array("sender_id", "datesent", "subject", "message", "originalpm_id"); $arrValues = array($this->intTableKeyValue, time(), $subject, $message, $replypmID); if ($pmObj->addNew($arrColumns, $arrValues)) { $pmInfo = $pmObj->get_info(); $arrColumns = array("pm_id", "member_id", "grouptype", "group_id"); foreach ($to as $memberID) { $groupType = is_array($arrGroups[$memberID]) ? $arrGroups[$memberID][0] : ""; $groupID = is_array($arrGroups[$memberID]) ? $arrGroups[$memberID][1] : ""; $arrValues = array($pmInfo['pm_id'], $memberID, $groupType, $groupID); $multiMemPMObj->addNew($arrColumns, $arrValues); } $returnVal = true; } } else { $arrColumns = array("sender_id", "receiver_id", "datesent", "subject", "message", "originalpm_id"); $arrValues = array($this->intTableKeyValue, $to, time(), $subject, $message, $replypmID); if ($pmObj->addNew($arrColumns, $arrValues)) { $returnVal = true; } } } return $returnVal; }
while ($arrConsoleCats = $consoleCategories->fetch_assoc()) { $tempNum = $arrConsoleCats['consolecategory_id']; $arrFormatOptions[$tempNum] = array(); } $consoleOptions = $mysqli->query("SELECT * FROM " . $dbprefix . "console ORDER BY sortnum"); $rankOptions = ""; while ($arrConsoleOptions = $consoleOptions->fetch_assoc()) { $tempCat = $arrConsoleOptions['consolecategory_id']; $arrFormatOptions[$tempCat][] = $arrConsoleOptions['console_id']; } $countConsoleCats = 0; $consoleCatObj = new Basic($mysqli, "consolecategory", "consolecategory_id"); $consoleJSCode = ""; foreach ($arrFormatOptions as $key => $arrOptions) { $consoleCatObj->select($key); $consoleCatInfo = $consoleCatObj->get_info(); if (count($arrOptions) > 0) { $countConsoleCats++; echo "<br>\n\t\t\t\t\t\t\t\t\t\t<u><b>" . $consoleCatInfo['name'] . "</b></u> - <a href='javascript:void(0)' onclick=\"selectAllCheckboxes('category" . $countConsoleCats . "', 1)\">Check All</a> - <a href='javascript:void(0)' onclick=\"selectAllCheckboxes('category" . $countConsoleCats . "', 0)\">Uncheck All</a><br>\n\t\t\t\t\t\t\t\t\t\t<div id='category" . $countConsoleCats . "'>\n\t\t\t\t\t\t\t\t\t"; foreach ($arrOptions as $consoleOption) { $consoleObj->select($consoleOption); $consoleOptionInfo = $consoleObj->get_info(); $consoleJSCode .= "arrConsoleIDs[" . $consoleOptionInfo['console_id'] . "] = \$('#consoleid_" . $consoleOptionInfo['console_id'] . "').attr('checked'); \n\t\t\t"; if ($consoleOptionInfo['pagetitle'] != "-separator-") { echo " <input type='checkbox' name='consoleid_" . $consoleOptionInfo['console_id'] . "' value='1'> " . $consoleOptionInfo['pagetitle'] . "<br>"; } elseif ($consoleOptionInfo['pagetitle'] == "-separator-") { $dispSeparator = "<div class='dashedLine' style='width: 250px; margin: 6px 1px; padding: 0px; float: left'></div>"; echo "<div style='float: left'> <input type='checkbox' name='consoleid_" . $consoleOptionInfo['console_id'] . "' value='1'> </div>" . $dispSeparator; echo "<div style='clear: both'></div>"; } }
$memberInfo = $member->get_info_filtered(); if ($member->hasAccess($consoleObj) && $customPageObj->select($_POST['cpID'])) { $countErrors = 0; // Check Page Name if (trim($_POST['pagename']) == "") { $countErrors++; $dispError .= " <b>·</b> You must enter a page name for your custom page.<br>"; } if ($countErrors == 0) { $_POST['wysiwygHTML'] = str_replace("<?", "", $_POST['wysiwygHTML']); $_POST['wysiwygHTML'] = str_replace("?>", "", $_POST['wysiwygHTML']); $_POST['wysiwygHTML'] = str_replace("<?", "", $_POST['wysiwygHTML']); $_POST['wysiwygHTML'] = str_replace("?>", "", $_POST['wysiwygHTML']); if ($customPageObj->update(array("pagename", "pageinfo"), array($_POST['pagename'], $_POST['wysiwygHTML']))) { $dispTime = date("l F j, Y g:i:s A"); $customPageInfo = $customPageObj->get_info(); echo "\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#loadingspiral').hide();\n\t\t\t\t\t\t\$('#saveMessage').html(\"<b><span class='successFont'>Custom Page Saved:</span> " . $dispTime . "</b>\");\n\t\t\t\t\t\n\t\t\t\t</script>\n\t\t\t\t"; } else { $dispError .= " <b>·</b> Unable to edit custom page. Please try again!<br>"; $countErrors++; } } } else { $dispError .= " <b>·</b> Unable to edit custom page. Invalid Custom Page ID!<br>"; $countErrors++; } } else { $dispError .= " <b>·</b> Unable to edit custom page. You are not authorized to edit custom pages!<br>"; $countErrors++; } if ($countErrors > 0) {
$appSelectOptionObj = new Basic($mysqli, "app_selectvalues", "appselectvalue_id"); $arrSelectValues = $appComponentObj->getAssociateIDs(); $tempArr = array(); foreach ($arrSelectValues as $selectValueID) { $appSelectOptionObj->select($selectValueID); $appSelectValue = $appSelectOptionObj->get_info_filtered("componentvalue"); $tempArr[$selectValueID] = $appSelectValue; } asort($tempArr); $_SESSION['btAppComponent']['cOptions'] = $tempArr; } elseif ($countErrors == 0) { $_SESSION['btAppComponent']['cOptions'] = array(); } } } else { echo "\n\t\t\t<script type='text/javascript'>\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\$('#appComponentForm').dialog('close');\n\t\t\t\t});\n\t\t\t</script>\n\t\t"; } $addAppForm->components['name']['value'] = $appCompInfo['name']; $addAppForm->components['type']['value'] = $appCompInfo['componenttype']; $addAppForm->components['required']['value'] = $appCompInfo['required']; $addAppForm->components['tooltip']['value'] = $appCompInfo['tooltip']; if ($appCompInfo['componenttype'] == "profile") { $appSelectValueID = $appComponentObj->getAssociateIDs(); $appSelectValueObj = new Basic($mysqli, "app_selectvalues", "appselectvalue_id"); $appSelectValueObj->select($appSelectValueID[0]); $addAppForm->components['profilecomponents']['components']['profileoption']['value'] = $appSelectValueObj->get_info("componentvalue"); } echo "<div id='addAppComponentFormDialog'>"; $addAppForm->show(); echo "</div>"; }
$posterRankObj = new Rank($mysqli); $downloadCatObj = new DownloadCategory($mysqli); $attachmentObj = new Download($mysqli); $consoleObj = new ConsoleOption($mysqli); $topicObj = new Basic($mysqli, "forum_topic", "forumtopic_id"); $intManagePostsCID = $consoleObj->findConsoleIDByName("Manage Forum Posts"); $intPostTopicCID = $consoleObj->findConsoleIDByName("Post Topic"); $downloadCatObj->selectBySpecialKey("forumattachments"); $blnShowAttachments = false; if (LOGGED_IN == true && $downloadCatObj->get_info("accesstype") == 1 || $downloadCatObj->get_info("accesstype") == 0) { $blnShowAttachments = true; } $postInfo = $this->get_info_filtered(); $topicInfo = $this->getTopicInfo(); $topicObj->select($postInfo['forumtopic_id']); $topicInfo['forumboard_id'] = $topicObj->get_info("forumboard_id"); $posterMemberObj->select($postInfo['member_id']); $postMemberInfo = $posterMemberObj->get_info_filtered(); $postMessage = $this->arrObjInfo['message']; $postMessage = str_replace("<?", "<?", $postMessage); $postMessage = str_replace("?>", "?>", $postMessage); $postMessage = str_replace("<script", "<script", $postMessage); $postMessage = str_replace("</script>", "</script>", $postMessage); $dispPostedOn = ""; if (time() - $postInfo['dateposted'] > 60 * 60 * 24) { $dispPostedOn = " on"; } $posterRankObj->select($postMemberInfo['rank_id']); $posterRankInfo = $posterRankObj->get_info_filtered(); $dispLastEdit = ""; if ($postInfo['lastedit_date'] != 0) {
<?php if (!defined("CONVERT_WEBSITEINFO")) { exit; } $websiteInfoObj = new Basic($mysqli, "websiteinfo", "websiteinfo_id"); $websiteInfoObj->select(1); $websiteInfo = $websiteInfoObj->get_info(); $mysqli->query("DROP TABLE " . $_POST['tableprefix'] . "websiteinfo"); $newWebsiteInfoSQL = "CREATE TABLE IF NOT EXISTS `" . $_POST['tableprefix'] . "websiteinfo` (\n `websiteinfo_id` int(11) NOT NULL AUTO_INCREMENT,\n `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,\n `value` text COLLATE utf8_unicode_ci NOT NULL,\n PRIMARY KEY (`websiteinfo_id`),\n UNIQUE KEY `name` (`name`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;"; $mysqli->query($newWebsiteInfoSQL); $skipColumns = array("websiteinfo_id", "name", "value"); foreach ($websiteInfo as $key => $value) { if (!in_array($key, $skipColumns)) { $websiteInfoObj->addNew(array("name", "value"), array($key, $value)); } } $websiteInfoObj->addNew(array("name", "value"), array("news_postsperpage", 10));
/* * 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 * */ if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") { exit; } else { $memberInfo = $member->get_info_filtered(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } $cID = $_GET['cID']; $customPageObj = new Basic($mysqli, "custompages", "custompage_id"); if (!$customPageObj->select($_GET['cpID'])) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "members';</script>"); } $customPageInfo = $customPageObj->get_info_filtered(); echo "\n\n<script type='text/javascript'>\n\$(document).ready(function() {\n\$('#breadCrumb').html(\"<a href='" . $MAIN_ROOT . "'>Home</a> > <a href='" . $MAIN_ROOT . "members'>My Account</a> > <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>Manage Custom Pages</a> > " . $customPageInfo['pagename'] . "\");\n});\n</script>\n"; $customPageHTML = addslashes($customPageObj->get_info("pageinfo")); $addMenuItemCID = $consoleObj->findConsoleIDByName("Add Menu Item"); echo "\n\t<form action='console.php?cID=" . $cID . "' method='post'>\n\t\t<div class='formDiv'>\n\t\t\t<div class='errorDiv' id='errorDiv' style='display: none'>\n\t\t\t\t<strong>Unable to edit custom page because the following errors occurred:</strong><br><br>\n\t\t\t\t<span id='errorInfo'></span>\n\t\t\t</div>\n\t\t\tUse the form below to edit the selected custom page. In order to display a custom page in the menu, go to the <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $addMenuItemCID . "'>Add Menu Item</a> page.\n\t\t\t<br><br>\n\t\t\t<table class='formTable'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formLabel'>Page Name:</td>\n\t\t\t\t\t<td class='main'><input type='text' id='pagename' class='textBox' value='" . $customPageInfo['pagename'] . "' style='width: 250px'></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formLabel'>Page URL: <a href='javascript:void(0)' onmouseover=\"showToolTip('This is the URL to use in your link to this custom page. You cannot edit this field.')\" onmouseout='hideToolTip()'>(?)</a></td>\n\t\t\t\t\t<td class='main'><input type='text' class='textBox' onclick=\"\$(this).select()\" value='" . $MAIN_ROOT . "custompage.php?pID=" . $customPageInfo['custompage_id'] . "' style='width: 250px'></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan='2' class='main'><br>\n\t\t\t\t\t\t<b>Page Information</b>\n\t\t\t\t\t\t<div class='dottedLine' style='width: 90%; padding-top: 3px; margin-bottom: 5px'></div>\n\t\t\t\t\t\t<div style='padding-left: 3px; padding-bottom: 15px'>\n\t\t\t\t\t\t\tUse the text editor below to format your custom page. You may also use HTML by clicking the HTML button. All formatting buttons are disabled when editing the HTML.\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan='2' style='padding-left: 10px' align='center'>\n\t\t\t\t\t\t<textarea id='tinymceTextArea' name='wysiwygHTML' rows='15' style='width: 80%'>" . $customPageInfo['pageinfo'] . "</textarea>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan='2' align='center'>\n\t\t\t\t\t<br>\n\t\t\t\t\t<input type='button' class='submitButton' onclick='editCustomPage()' name='submit' value='Save' style='width: 125px'>\n\t\t\t\t\t<br>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan='2' align='center'>\n\t\t\t\t\t\t<p align='center' class='main'><span id='loadingspiral' style='display: none'><br><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral2.gif' style='margin-bottom: 5px'><br><i>Saving...</i></span><span id='saveMessage'></span></p>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t</form>\n\t\n\t\n\t<div id='postResponse' style='display: none'></div>\n\t\n\t<script type='text/javascript'>\n\t\t\n\t\t\$('document').ready(function() {\n\t\t\t\$('#tinymceTextArea').tinymce({\n\t\t\n\t\t\t\tscript_url: '" . $MAIN_ROOT . "js/tiny_mce/tiny_mce.js',\n\t\t\t\ttheme: 'advanced',\n\t\t\t\ttheme_advanced_buttons1: 'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,link,unlink,image,code,|,forecolorpicker,fontselect,fontsizeselect',\n\t\t\t\ttheme_advanced_resizing: true\n\t\t\t\n\t\t\t});\n\t\t\n\t\t});\n\n\t\tfunction editCustomPage() {\n\t\t\t\n\t\t\t\$('#htmlButton').click();\n\t\t\t\$('#wysiwygHTML').val(\$('#wysiwygDiv').html());\n\t\t\t\$('#loadingspiral').show();\n\t\t\t\n\t\t\tif(\$('#wysiwygHTML').is(\":visible\")) {\n\t\t\t\t\$('#htmlButton').click();\n\t\t\t\t\$('#htmlButton').mouseout();\n\t\t\t}\n\t\t\t\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/custompages/edit_submit.php', {\n\t\t\t\twysiwygHTML: \$('#tinymceTextArea').val(), pagename: \$('#pagename').val(), cpID: '" . $_GET['cpID'] . "'\n\t\t\t\t}, function(data) {\n\t\t\t\t\t\$('#postResponse').html(data);\n\t\t\t\t});\n\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\n\t</script>\n";
include_once "../../../../classes/member.php"; $consoleObj = new ConsoleOption($mysqli); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $cID = $consoleObj->findConsoleIDByName("View Inactive Requests"); $consoleObj->select($cID); if (!$member->authorizeLogin($_SESSION['btPassword']) || !$member->hasAccess($consoleObj)) { exit; } $memberInfo = $member->get_info_filtered(); $iaRequestObj = new Basic($mysqli, "iarequest", "iarequest_id"); $checkRequestID = $iaRequestObj->select($_POST['iaRequestID']); if ($_POST['action'] == "postmessage" && trim($_POST['message']) != "" && $checkRequestID) { $iaRequestMessageObj = new Basic($mysqli, "iarequest_messages", "iamessage_id"); $arrColumns = array("iarequest_id", "member_id", "messagedate", "message"); $arrValues = array($iaRequestObj->get_info("iarequest_id"), $memberInfo['member_id'], time(), $_POST['message']); $iaRequestMessageObj->addNew($arrColumns, $arrValues); echo dispIAMessages($iaRequestObj->get_info("iarequest_id")); $requestIACID = $consoleObj->findConsoleIDByName("Inactive Request"); $member->select($iaRequestObj->get_info("member_id")); $member->postNotification("A new message was posted on your inactive request!<br><br><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $requestIACID . "'>View Messages</a>"); exit; } elseif (($_POST['action'] == "approve" || $_POST['action'] == "deny") && $checkRequestID) { $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"));
$arrayCol = array('username', 'email', 'changekey', 'timeofrq'); $arrayVal = array($username, $email, $changekey, $time); $forgotPassObj->addNew($arrayCol, $arrayVal); $subject = 'Your Forgotten Password Request - ' . $CLAN_NAME; $message = "\n<html>\n<body>\nHello,<br>\nYou've requested a change in your password on the clan website.<br>\n<br>\nPlease click the following link to continue and follow the instructions on the page it opens:<br>\n--------------------------------------------<br>\n<a href='{$url}?stage=validate&changekey={$changekey}'>{$url}?stage=validate&changekey={$changekey}</a><br>\n<br>\nThanks!\n"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: ' . $CLAN_NAME . ' <no-reply@' . $siteDomain . '>' . "\r\n"; mail($email, $subject, $message, $headers); echo "\n<div class='formDiv'>\nYour request has been successfully submitted. Please check your email for the link and further instructions.\n</div>\n"; } } elseif ($stage == "validate" && $countErrors == 0) { $changekey = $mysqli->real_escape_string($_GET['changekey']); $forgotPassObj->set_tableKey("changekey"); if ($forgotPassObj->select($changekey, false)) { $dataArr = $forgotPassObj->get_info(); $rqid = $dataArr['rqid']; $username = $dataArr['username']; $email = $dataArr['email']; $timeofrq = $dataArr['timeofrq']; $timeofrqcon = date('l jS \\of F Y h:i:s A', $timeofrq); echo "\n<form action='forgotpassword.php?stage=set' method='post'>\n<input type='hidden' name='changekey' value='{$changekey}' />\n<div class='formDiv'>\n<strong>Validated!</strong><br>Please type in your new password.<br><br>\n<strong>Data:</strong><br>\nRequest ID: {$rqid}<br>\nUsername: {$username}<br>\nEmail: {$email}<br>\nTime of Request: {$timeofrqcon} Server Time<br>\n<table class='formTable'>\n<tr>\n<td class='formLabel'>New Password:</td>\n<td class='main'><input type='password' class='textBox' name='newpass' id='newpassword'></td>\n</tr>\n<tr>\n<td class='formLabel'>Confirm New Password:</td>\n<td class='main'><input type='password' class='textBox' name='connewpass' id='newpassword1'><span id='checkPassword' style='padding-left: 5px'></span></td>\n</tr>\n<tr>\n<td class='main' colspan='2' align='center'><input type='submit' class='submitButton' style='width: 125px' value='Submit Change'></td>\n</tr>\n</table>\n</div>\n</form>\n\n<script type='text/javascript'>\n \n \$(document).ready(function() {\n \n \$('#newpassword1').keyup(function() {\n \n if(\$('#newpassword').val() != '') {\n \n if(\$('#newpassword1').val() == \$('#newpassword').val()) {\n \$('#checkPassword').toggleClass('successFont', true);\n \$('#checkPassword').toggleClass('failedFont', false);\n \$('#checkPassword').html('Passwords Match! OK!');\n }\n else {\n \$('#checkPassword').toggleClass('successFont', false);\n \$('#checkPassword').toggleClass('failedFont', true);\n \$('#checkPassword').html('Passwords Do Not Match!');\n }\n \n }\n else {\n \$('#checkPassword').html('');\n }\n \n });\n \n });\n \n </script>\n"; } else { $countErrors++; $dispError .= " <b>·</b> Not a Valid Changekey.<br>"; } } elseif ($stage == "set" && isset($_POST['newpass']) && isset($_POST['changekey']) && $countErrors == 0) { $newpass = $_POST['newpass']; $newpasscon = $_POST['connewpass']; $changekey = $_POST['changekey']; if ($newpass != $newpasscon) {
$profileCategoryObj = new ProfileCategory($mysqli); $profileOptionObj = new ProfileOption($mysqli); $gameObj = new Game($mysqli); $arrGames = $gameObj->getGameList(); $consoleCatSettingObj = new Basic($mysqli, "consolecategory", "consolecategory_id"); $arrSocialMediaInfo = $member->objSocial->get_entries(array(), "ordernum DESC"); // Setup Default Console Category Select Options $arrPrivileges = $memberRank->get_privileges(); $arrConsoleCats = array(); $consoleSettingObj = new ConsoleOption($mysqli); foreach ($arrPrivileges as $consoleOptionID) { $consoleSettingObj->select($consoleOptionID); $consoleCatID = $consoleSettingObj->get_info("consolecategory_id"); if (!in_array($consoleCatID, $arrConsoleCats)) { $consoleCatSettingObj->select($consoleCatID); $consoleCatOrder = $consoleCatSettingObj->get_info("ordernum"); $arrConsoleCats[$consoleCatOrder] = $consoleCatID; } } krsort($arrConsoleCats); foreach ($arrConsoleCats as $value) { $consoleCatSettingObj->select($value); $defaultConsoleOptions[$value] = $consoleCatSettingObj->get_info_filtered("name"); } // Setup Notification Settings Options $notificationOptions = array("Show notification with sound", "Show notification without sound", "Don't show notifications"); // Setup Forum Settings Options $forumPostsPerPage = array(10 => 10, 25 => 25, 50 => 50, 75 => 75, 100 => 100); // Setup Birthday $maxBirthdayYear = date("Y") - 8; $maxDate = mktime(0, 0, 0, 12, 31, $maxBirthdayYear);
// Start Page $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("View Squad Invitations"); $consoleObj->select($cID); $consoleInfo = $consoleObj->get_info_filtered(); $consoleTitle = $consoleInfo['pagetitle']; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $squadObj = new Squad($mysqli); $squadInviteObj = new Basic($mysqli, "squadinvites", "squadinvite_id"); // Check Login $LOGIN_FAIL = true; if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj) && $squadInviteObj->select($_POST['siID'])) { $memberInfo = $member->get_info(); $memberLink = $member->getMemberLink(); $squadInviteInfo = $squadInviteObj->get_info(); $squadObj->select($squadInviteInfo['squad_id']); $squadInfo = $squadObj->get_info_filtered(); $squadMemberList = $squadObj->getMemberList(); if ($squadInviteInfo['receiver_id'] == $memberInfo['member_id'] && $squadInviteInfo['status'] == 0 && !in_array($memberInfo['member_id'], $squadMemberList)) { 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"));