$LOGIN_FAIL = true; if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) { $memberInfo = $member->get_info_filtered(); $arrPM = array(); $arrPMMID = array(); $pmFolderObj = new PMFolder($mysqli); $pmFolderObj->intMemberID = $memberInfo['member_id']; // Stick Folder Conditions in variables $isFolderSet = isset($_POST['folder']); $selectedFolder = $pmFolderObj->select($_POST['folder']); $condition1 = !$selectedFolder || $selectedFolder && !$pmFolderObj->isMemberFolder(); $arrStandardFolders = array(0, -1, -2); // Folder Checks if (!$isFolderSet) { $_POST['folder'] = 0; $pmFolderObj->setFolder($_POST['folder']); } elseif ($isFolderSet && $condition1 && !in_array($_POST['folder'], $arrStandardFolders)) { exit; } elseif (in_array($_POST['folder'], $arrStandardFolders)) { $pmFolderObj->setFolder($_POST['folder']); } $pmFolderObj->setFolder($_POST['folder']); $arrFolderContents = $pmFolderObj->getFolderContents(); $arrPM = $arrFolderContents[0]; $arrPMMID = $arrFolderContents[1]; echo "<table class='formTable' style='border-spacing: 0px; table-layout: fixed'>"; foreach ($arrPM as $key => $value) { $pmObj->select($key); $pmInfo = $pmObj->get_info_filtered(); $useAltBG = " alternateBGColor"; if (isset($arrPMMID[$key]) && $multiMemPMObj->select($arrPMMID[$key]) && $multiMemPMObj->get_info("seenstatus") == 1) {
include_once "../../../_setup.php"; include_once "../../../classes/member.php"; include_once "../../../classes/rank.php"; include_once "../../../classes/pmfolder.php"; include_once "../../../classes/privatemessage.php"; // Start Page $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Private Messages"); $consoleObj->select($cID); $consoleInfo = $consoleObj->get_info_filtered(); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $memberInfo = $member->get_info_filtered(); $pmFolderObj = new PMFolder($mysqli); $checkFolder = $pmFolderObj->select($_POST['newFolder']); $pmFolderObj->setFolder($_POST['newFolder']); $pmFolderObj->intMemberID = $memberInfo['member_id']; // Check Login $LOGIN_FAIL = true; if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj) && ($checkFolder || $pmFolderObj->isMemberFolder())) { $pmObj = new PrivateMessage($mysqli); $arrPMIDS = json_decode($_POST['movePMs']); foreach ($arrPMIDS as $pmID) { $pmMID = ""; if (strpos($pmID, "_") !== false) { $tempPMID = substr($pmID, 0, strpos($pmID, "_")); $pmMID = str_replace($tempPMID . "_", "", $pmID); $pmID = $tempPMID; } if ($pmObj->select($pmID)) { $tempPMInfo = $pmObj->get_info_filtered();