public function displayDownloadPageLink() { $downloadCatObj = new DownloadCategory($this->MySQL); $menuDownloadLinkInfo = $this->menuItemObj->objCustomPage->get_info(); $downloadCatObj->select($menuDownloadLinkInfo['custompage_id']); echo "\n\t\t\t<div style='text-align: " . $menuDownloadLinkInfo['textalign'] . "'>\n\t\t\t" . $menuDownloadLinkInfo['prefix'] . "<a href='" . MAIN_ROOT . "downloads/index.php?catID=" . $menuDownloadLinkInfo['custompage_id'] . "' target='" . $menuDownloadLinkInfo['linktarget'] . "'>" . $downloadCatObj->get_info_filtered("name") . "</a>\n\t\t\t</div>\n\t\t\t"; }
public function displayDownloadPageLink() { $downloadCatObj = new DownloadCategory($this->MySQL); $menuDownloadLinkInfo = $this->menuItemObj->objCustomPage->get_info(); $downloadCatObj->select($menuDownloadLinkInfo['custompage_id']); $menuItemInfo = $downloadCatObj->get_info_filtered(); $menuDownloadLinkInfo['link'] = MAIN_ROOT . "downloads/?catID=" . $menuItemInfo['downloadcategory_id']; $this->formatLink($menuItemInfo, $menuDownloadLinkInfo); }
if (time() < $ipbanInfo['exptime'] or $ipbanInfo['exptime'] == 0) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "banned.php';</script>"); } else { $ipbanObj->delete(); } } $LOGGED_IN = false; if (isset($_SESSION['btUsername']) and isset($_SESSION['btPassword'])) { $memberObj = new Member($mysqli); if ($memberObj->select($_SESSION['btUsername'])) { if ($memberObj->authorizeLogin($_SESSION['btPassword'])) { $LOGGED_IN = true; } } } $downloadCatObj = new DownloadCategory($mysqli); $downloadObj = new Download($mysqli); $blnShowDownload = false; if ($downloadObj->select($_GET['dID'])) { $downloadInfo = $downloadObj->get_info_filtered(); $downloadCatObj->select($downloadInfo['downloadcategory_id']); $accessType = $downloadCatObj->get_info("accesstype"); if ($accessType == 1 && $LOGGED_IN) { $blnShowDownload = true; } elseif ($accessType == 0) { $blnShowDownload = true; } $fileContents1 = file_get_contents($downloadInfo['splitfile1']); $fileContents2 = file_get_contents($downloadInfo['splitfile2']); if ($blnShowDownload && $fileContents1 !== false && $fileContents2 !== false) { header("Content-Description: File Transfer");
function checkForAttachments() { global $formObj, $mysqli, $blnCheckForumAttachments, $prevFolder; $returnVal = false; if ($blnCheckForumAttachments) { $attachmentObj = new Download($mysqli); $downloadCatObj = new DownloadCategory($mysqli); $downloadCatObj->selectBySpecialKey("forumattachments"); $forumAttachmentCatID = $downloadCatObj->get_info("downloadcategory_id"); $arrDownloadID = array(); $arrDLColumns = array("downloadcategory_id", "member_id", "dateuploaded", "filename", "mimetype", "filesize", "splitfile1", "splitfile2"); for ($i = 1; $i <= $_POST['numofattachments']; $i++) { $tempPostName = "forumattachment_" . $i; if ($_FILES[$tempPostName]['name'] != "" && $attachmentObj->uploadFile($_FILES[$tempPostName], $prevFolder . "downloads/files/forumattachment/", $forumAttachmentCatID)) { $splitFiles = $attachmentObj->getSplitNames(); $fileSize = $attachmentObj->getFileSize(); $mimeType = $attachmentObj->getMIMEType(); $arrDLValues = array($forumAttachmentCatID, $memberInfo['member_id'], time(), $_FILES[$tempPostName]['name'], $mimeType, $fileSize, "downloads/files/forumattachment/" . $splitFiles[0], "downloads/files/forumattachment/" . $splitFiles[1]); if ($attachmentObj->addNew($arrDLColumns, $arrDLValues)) { $arrDownloadID[] = $attachmentObj->get_info("download_id"); } } elseif ($_FILES[$tempPostName]['name'] != "") { $countErrors++; $dispError .= " <b>·</b> Unable to upload attachment #" . $i . ": " . $_FILES[$tempPostName]['name'] . ".<br>"; } } $returnVal = $arrDownloadID; } return $returnVal; }
include_once "../../../../classes/member.php"; include_once "../../../../classes/download.php"; include_once "../../../../classes/downloadcategory.php"; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Downloads"); $consoleObj->select($cID); // Check Login if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) { $memberInfo = $member->get_info(); } else { exit; } $downloadObj = new Download($mysqli); $downloadCatObj = new DownloadCategory($mysqli); } echo "\n\t<table class='formTable' style='margin-top: 0px; border-spacing: 0px'>\n\t\t<tr><td class='dottedLine' colspan='4'></td></tr>\n"; $result = $mysqli->query("SELECT * FROM " . $dbprefix . "downloadcategory WHERE specialkey = '' ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) { $arrDownloadCat[$row['downloadcategory_id']] = filterText($row['name']); } $dispOrderBY = isset($_POST['orderby']) && $_POST['orderby'] == "name" ? "ORDER BY name" : "ORDER BY dateuploaded "; $dispOrderBY .= isset($_POST['dir']) && $_POST['dir'] == "asc" ? "ASC" : "DESC"; $editCatCID = $consoleObj->findConsoleIDByName("Manage Download Categories"); $addDLCID = $consoleObj->findConsoleIDByName("Add Download"); $totalDownloads = 0; foreach ($arrDownloadCat as $catID => $catName) { $downloadCatObj->select($catID); $arrDownloads = $downloadCatObj->getAssociateIDs($dispOrderBY); if (count($arrDownloads) > 0) {
* 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/rank.php"; include_once "../../../../classes/consoleoption.php"; include_once "../../../../classes/downloadcategory.php"; $consoleObj = new ConsoleOption($mysqli); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $downloadCatObj = new DownloadCategory($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Download Categories"); $consoleObj->select($cID); $_GET['cID'] = $cID; if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if ($member->hasAccess($consoleObj) && $downloadCatObj->select($_POST['catID'])) { define('MEMBERRANK_ID', $memberInfo['rank_id']); $downloadCatInfo = $downloadCatObj->get_info_filtered(); $arrCats = $downloadCatObj->getAssociateIDs(); if (count($arrCats) > 0) { echo "<div id='newDeleteMessage' style='display: none'><p align='center'>There are currently downloads with the download category <b>" . $downloadCatInfo['name'] . "</b>. Please move all downloads out of this category before deleting it.</p></div>"; 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\$('#deleteMessage').dialog('close');\n\t\t\t\t\t\t\$('#newDeleteMessage').dialog({\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle: 'Manage Download Categories - Delete',\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\tzIndex: 9999,\n\t\t\t\t\t\t\tresizable: false,\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\tbuttons: {\n\t\t\t\t\t\t\t\t'OK': function() {\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\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t"; } elseif ($_POST['confirm'] == "1") { $downloadCatObj->delete(); include "main.php";
<?php // Download Page Options $downloadPageObj = new DownloadCategory($mysqli); $arrDownloadPages = $downloadPageObj->get_entries(array("specialkey" => "")); $downloadPageOptions = array(); foreach ($arrDownloadPages as $eachDownloadPage) { $downloadPageOptions[$eachDownloadPage['downloadcategory_id']] = $eachDownloadPage['name']; } if (count($downloadPageOptions) == 0) { $downloadPageOptions = array("No Download Categories"); } $downloadOptionComponents = array("downloadpage" => array("type" => "select", "attributes" => array("class" => "textBox formInput"), "options" => $downloadPageOptions, "sortorder" => $i++, "display_name" => "Download Page"));
* * 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; } } include_once $prevFolder . "classes/downloadcategory.php"; $cID = $_GET['cID']; $downloadCatObj = new DownloadCategory($mysqli); $downloadExtObj = new Basic($mysqli, "download_extensions", "extension_id"); if ($_POST['submit']) { // Check Category Name if (trim($_POST['catname']) == "") { $countErrors++; $dispError .= " <b>·</b> You must enter a Category Name.<br>"; } // Check Extensions $arrExtensions = explode(",", trim($_POST['catexts'])); if (count($arrExtensions) <= 0) { $countErrors++; $dispError .= " <b>·</b> You must enter at least one download extension.<br>"; } // Check Cat Order $intNewOrderSpot = "";
* 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(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } include_once $prevFolder . "classes/downloadcategory.php"; include_once $prevFolder . "classes/download.php"; $downloadObj = new Download($mysqli); $downloadCatObj = new DownloadCategory($mysqli); if (isset($_GET['dlID']) && $downloadObj->select($_GET['dlID'])) { $downloadInfo = $downloadObj->get_info_filtered(); $downloadCatObj->select($downloadInfo['downloadcategory_id']); $downloadCatInfo = $downloadCatObj->get_info_filtered(); include "include/edit.php"; } else { $addDLCID = $consoleObj->findConsoleIDByName("Add Download"); echo "\n\t\t\t\n\t\t\t<table class='formTable'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='main' colspan='3' align='right'>» <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $addDLCID . "'>Add New Download</a> «</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formTitle' style='width: 46%'>Download:</td>\n\t\t\t\t\t<td class='formTitle' style='width: 30%'>Date Uploaded:</td>\n\t\t\t\t\t<td class='formTitle' style='width: 24%'>Actions:</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<div id='loadingSpiral' class='loadingSpiral'>\n\t\t\t\t<p align='center'>\n\t\t\t\t\t<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral.gif'><br>Loading\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<div id='downloadList'>\n\t\t\t\n\t\t\t\t"; include "include/downloadlist.php"; echo "\n\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<div id='deleteMessage' style='display: none'></div>\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\tfunction deleteDL(intDLID) {\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/downloads/include/delete.php', { dlID: intDLID }, function(data) {\n\t\t\t\t\t\t\t\$('#deleteMessage').html(data);\n\t\t\t\t\t\t\t\$('#deleteMessage').dialog({\n\t\t\t\t\t\t\t\ttitle: 'Delete Download - Confirm',\n\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\t\t\t\t\$('#downloadList').fadeOut(200);\n\t\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/downloads/include/delete.php', { dlID: intDLID, confirm: 1 }, function(data1) {\n\t\t\t\t\t\t\t\t\t\t\t\$('#downloadList').html(data1);\n\t\t\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\t\t\$('#downloadList').fadeIn(200);\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\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\t'Cancel': 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\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}\n\t\t\t\n\t\t\t</script>\n\t"; }
/* * 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"; include_once "../../../../classes/rank.php"; include_once "../../../../classes/consoleoption.php"; include_once "../../../../classes/downloadcategory.php"; $consoleObj = new ConsoleOption($mysqli); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $downloadCatObj = new DownloadCategory($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Download Categories"); $consoleObj->select($cID); if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if ($member->hasAccess($consoleObj) && $downloadCatObj->select($_POST['catID'])) { define('MEMBERRANK_ID', $memberInfo['rank_id']); $downloadCatObj->move($_POST['cDir']); $_GET['cID'] = $cID; include "main.php"; } }
* */ // Config File $prevFolder = "../"; include $prevFolder . "_setup.php"; $consoleObj = new ConsoleOption($mysqli); $boardObj = new ForumBoard($mysqli); $member = new Member($mysqli); $postMemberObj = new Member($mysqli); $posterRankObj = new Rank($mysqli); $intPostTopicCID = $consoleObj->findConsoleIDByName("Post Topic"); $intManagePostsCID = $consoleObj->findConsoleIDByName("Manage Forum Posts"); $categoryObj = new BasicOrder($mysqli, "forum_category", "forumcategory_id"); $categoryObj->set_assocTableName("forum_board"); $categoryObj->set_assocTableKey("forumboard_id"); $downloadCatObj = new DownloadCategory($mysqli); $attachmentObj = new Download($mysqli); $downloadCatObj->selectBySpecialKey("forumattachments"); $moveTopicCID = $consoleObj->findConsoleIDByName("Move Topic"); $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(); } } if (!$boardObj->objTopic->select($_GET['tID'])) { echo "\n\t<script type='text/javascript'>window.location = 'index.php';</script>\n\t"; exit;
* * 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; } } include_once $prevFolder . "classes/downloadcategory.php"; $cID = $_GET['cID']; $downloadCatObj = new DownloadCategory($mysqli); $downloadExtensionObj = new Basic($mysqli, "download_extensions", "extension_id"); if (!$downloadCatObj->select($_GET['catID'])) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "members';</script>"); } $downloadCatInfo = $downloadCatObj->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 Download Categories</a> > " . $downloadCatInfo['name'] . "\");\n});\n</script>\n"; if ($_POST['submit']) { $resortOrder = false; // Check Category Name if (trim($_POST['catname']) == "") { $countErrors++; $dispError .= " <b>·</b> You must enter a Category Name.<br>"; } // Check Extensions $arrExtensions = explode(",", trim($_POST['catexts']));
* License: http://www.bluethrust.com/license.php * */ if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") { exit; } else { $memberInfo = $member->get_info(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } include_once $prevFolder . "classes/downloadcategory.php"; include_once $prevFolder . "classes/download.php"; $downloadObj = new Download($mysqli); $downloadCatObj = new DownloadCategory($mysqli); $downloadExtObj = new Basic($mysqli, "download_extensions", "extension_id"); $cID = $_GET['cID']; $dispError = ""; $countErrors = 0; $result = $mysqli->query("SELECT * FROM " . $dbprefix . "downloadcategory WHERE specialkey = '' ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) { $arrDownloadCat[] = $row['downloadcategory_id']; $dispSelected = isset($_GET['catID']) && $_GET['catID'] == $row['downloadcategory_id'] ? " selected" : ""; $downloadcatoptions .= "<option value='" . $row['downloadcategory_id'] . "'" . $dispSelected . ">" . $row['name'] . "</option>"; $downloadCatObj->select($row['downloadcategory_id']); $arrExtensions = array(); foreach ($downloadCatObj->getExtensions() as $downloadExtID) { $downloadExtObj->select($downloadExtID); $arrExtensions[] = $downloadExtObj->get_info_filtered("extension"); }
/* * 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 * */ // Config File $prevFolder = "../"; include_once $prevFolder . "_setup.php"; $downloadCatObj = new DownloadCategory($mysqli); $downloadObj = new Download($mysqli); if (!$downloadCatObj->select($_GET['catID'])) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "';</script>"); } $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(); } } $downloadCatInfo = $downloadCatObj->get_info_filtered(); // Start Page