Beispiel #1
0
    }
}
$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");
        header("Content-Length: " . $downloadInfo['filesize'] . ";");
        header("Content-disposition: attachment; filename=" . $downloadInfo['filename']);
        header("Content-type: " . $downloadInfo['mimetype']);
        echo $fileContents1 . $fileContents2;
Beispiel #2
0
            break;
        }
    }
}
$setAvatarWidth = $websiteInfo['forum_avatarwidth'] > 0 ? $websiteInfo['forum_avatarwidth'] : "50";
$setAvatarWidthUnit = $websiteInfo['forum_avatarwidthunit'] == "%" ? "%" : "px";
$setAvatarHeight = $websiteInfo['forum_avatarheight'] > 0 ? $websiteInfo['forum_avatarheight'] : "50";
$setAvatarHeightUnit = $websiteInfo['forum_avatarheightunit'] == "%" ? "%" : "px";
$dispForumPostText = $websiteInfo['forum_linkimages'] == 1 ? autoLinkImage(parseBBCode($postMessage)) : parseBBCode($postMessage);
echo "<div class='forumPostContainer'>\n\t\t\t<div class='forumPostPosterInfo main'><a name='" . $postInfo['forumpost_id'] . "'></a>\n\t\t\t\t<span class='boardPosterName'>" . $posterMemberObj->getMemberLink() . "</span><br>\n\t\t\t\t" . $posterRankInfo['name'] . "\n\t\t\t\t<div id='forumShowAvatar'>" . $posterMemberObj->getAvatar($setAvatarWidth . $setAvatarWidthUnit, $setAvatarHeight . $setAvatarHeightUnit) . "</div>\n\t\t\t\t<div id='forumShowPostCount'>Posts: " . $posterMemberObj->countForumPosts() . "</div>\n\t\t\t\t" . $dispRankIMG . "\n\t\t\t\t<div id='forumShowMedals'>" . $dispMedals . "</div>\n\t\t\t</div>\n\t\t\t<div class='forumPostMessageInfo main'>\n\t\t\t\t<div class='dottedLine tinyFont'>Posted" . $dispPostedOn . " " . getPreciseTime($postInfo['dateposted']) . "</div><br>\n\t\t\t\t\n\t\t\t\n\t\t\t\t" . $dispForumPostText . $dispLastEdit . "\n\t\t\t\t\n\t\t\t\n\t\t\t</div>\n\t\t\t<div class='forumPostNewSection'></div>\n\t\t\t<div class='forumPostPosterInfo'></div>\n\t\t\t<div class='forumPostMessageExtras'>\n\t\t\t\t";
$arrAttachments = $this->getPostAttachments();
if (count($arrAttachments) > 0 && $blnShowAttachments) {
    echo "\n\t\t\t\t<div class='forumAttachmentsContainer'>\n\t\t\t\t\t<b>Attachments:</b><br>\n\t\t\t\t\t";
    foreach ($arrAttachments as $downloadID) {
        $attachmentObj->select($downloadID);
        $attachmentInfo = $attachmentObj->get_info_filtered();
        $addS = $attachmentInfo['downloadcount'] != 1 ? "s" : "";
        $dispFileSize = $attachmentInfo['filesize'] / 1024;
        if ($dispFileSize < 1) {
            $dispFileSize = $attachmentInfo['filesize'] . "B";
        } elseif ($dispFileSize / 1024 < 1) {
            $dispFileSize = round($dispFileSize, 2) . "KB";
        } else {
            $dispFileSize = round($dispFileSize / 1024, 2) . "MB";
        }
        echo "<a href='" . $MAIN_ROOT . "downloads/file.php?dID=" . $downloadID . "'>" . $attachmentInfo['filename'] . "</a> - downloaded " . $attachmentInfo['downloadcount'] . " time" . $addS . " - " . $dispFileSize . "<br>";
    }
    echo "\n\t\t\t\t\t</div>\n\t\t\t\t\t";
}
if ($postMemberInfo['forumsignature'] != "" && $websiteInfo['forum_hidesignatures'] == 0) {
    echo "\n\t\t\t\t<div class='forumSignatureContainer'>" . parseBBCode($posterMemberObj->get_info("forumsignature")) . "</div>\n\t\t\t";