Example #1
0
        } else {
            $threadQuery = $mysql->query("SELECT `id` FROM `threads` WHERE `section` = '" . $sectionData['id'] . "' AND `poster` = '" . $_SESSION['accountid'] . "' AND `hidden` != '1'");
        }
    }
    while ($threadData = $threadQuery->fetch_assoc()) {
        $threadAmount++;
        $commentQuery = $mysql->query("SELECT `id` FROM `comments` WHERE `thread` = '" . $threadData['id'] . "'");
        $commentAmount += $commentQuery->num_rows;
    }
    $threadQuery = $mysql->query("SELECT `id`, `poster`, `lastpost`, `title` FROM `threads` WHERE `section` = '" . $sectionData['id'] . "' ORDER BY `lastpost` DESC LIMIT 1");
    $threadData = $threadQuery->fetch_assoc();
    $commentQuery = $mysql->query("SELECT `poster` FROM `comments` WHERE `thread` = '" . $threadData['id'] . "' AND `date` = '" . $threadData['lastpost'] . "'");
    if ($commentQuery->num_rows) {
        $commentData = $commentQuery->fetch_assoc();
    } else {
        $commentData['poster'] = $threadData['poster'];
    }
    $accountQuery = $mysql->query("SELECT `displayname` FROM `accounts` WHERE `id` = '" . $commentData['poster'] . "'");
    $accountData = $accountQuery->fetch_assoc();
    echo "<a href='section?id=" . $sectionData['id'] . "'>\n\t\t\t<div class='sectionContainer'>\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class='sectionIcon'>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t<td width='500'>\n\t\t\t\t\t\t\t<div class='sectionName'>\n\t\t\t\t\t\t\t\t" . $sectionData['name'] . "\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class='sectionDescription'>\n\t\t\t\t\t\t\t\t" . $sectionData['description'] . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t<td width='100' class='sectionStats'>\n\t\t\t\t\t\t\tComments: {$commentAmount}<br>\n\t\t\t\t\t\t\tThreads: {$threadAmount}\n\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t<td class='sectionStats'>";
    if ($threadQuery->num_rows) {
        echo "<a href='thread?id=" . $threadData['id'] . "' class='sectionUser'>\n\t\t\t\t\t\t\t\t\t" . $threadData['title'] . "\n\t\t\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t\t\t<br>\n\n\t\t\t\t\t\t\t\t<div class='sectionDate'>\n\t\t\t\t\t\t\t\t\t" . customDate($threadData['lastpost']) . "\n\n\t\t\t\t\t\t\t\t\tby\n\n\t\t\t\t\t\t\t\t\t<a href='user?id=" . $commentData['poster'] . "'>\n\t\t\t\t\t\t\t\t\t\t" . userNameTags($commentData['poster'], $accountData['displayname']) . "\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</div>";
    } else {
        echo "Nothing to display";
    }
    echo "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</a>";
}
?>

<?php 
require_once "includes/footer.php";
Example #2
0
			</div>
		</td>

		<td width='20'></td>

		<td width='900'>
			<?php 
switch ($_GET['view']) {
    case "inbox":
        echo "<div class='categoryTitle'>\n\t\t\t\t\t\t\tPrivate Messages\n\t\t\t\t\t\t</div>";
        $mQuery = $mysql->query("SELECT * FROM `privatemessages` WHERE `to` = '" . $_SESSION['accountid'] . "' ORDER BY `date` DESC");
        while ($mData = $mQuery->fetch_assoc()) {
            $tooltip = $mData['read'] ? "You have read this message." : "You have not read this message.";
            $accountQuery = $mysql->query("SELECT `displayname` FROM `accounts` WHERE `id` = '" . $mData['from'] . "'");
            $accountData = $accountQuery->fetch_assoc();
            echo "<a href='viewmessage?id=" . $mData['id'] . "' data-tooltip='{$tooltip}'>\n\t\t\t\t\t\t\t\t<div class='sectionContainer'>\n\t\t\t\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class='sectionIcon'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class='sectionName'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . $mData['title'] . "\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<div class='sectionDescription'>\n\t\t\t\t\t\t\t\t\t\t\t\t\tSent by " . $accountData['displayname'] . " - " . customDate($mData['date']) . "\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</a>";
        }
        break;
    case "send":
        if ($_POST['sendmessage']) {
            $mQuery = $mysql->query("SELECT `id` FROM `accounts` WHERE `displayname` = '" . escape($_POST['to']) . "'");
            if ($mQuery->num_rows) {
                $mData = $mQuery->fetch_assoc();
                if (strlen($_POST['title']) >= 3) {
                    if (strlen($_POST['message']) >= 3) {
                        if (time() - $_SESSION['lastcomment'] >= 60) {
                            $mysql->query("INSERT INTO `privatemessages` (`to`, `from`, `date`, `title`, `message`) VALUES ('" . $mData['id'] . "', '" . $_SESSION['accountid'] . "', '" . time() . "', '" . escape($_POST['title']) . "', '" . escape($_POST['message']) . "')");
                            $_SESSION['lastcomment'] = time();
                            echo "Your message has been sent.";
                            redirect("settings?view=profile", 2);
                        } else {
Example #3
0
    }
}
$likesQuery = $mysql->query("SELECT `id` FROM `likes` WHERE `thread` = '0' AND `post` = '" . escape($mData['id']) . "' AND `like` = '1'");
$dislikesQuery = $mysql->query("SELECT `id` FROM `likes` WHERE `thread` = '0' AND `post` = '" . escape($mData['id']) . "' AND `like` = '0'");
$userLikesQuery = $mysql->query("SELECT `like` FROM `likes` WHERE `thread` = '0' AND `post` = '" . escape($mData['id']) . "' AND `user` = '" . $_SESSION['accountid'] . "'");
$userLikesData = $userLikesQuery->fetch_assoc();
if ($mData['hidden']) {
    $commentHiddenStyle = "Hidden";
} else {
    $commentHiddenStyle = "";
}
if ($permissions['viewip']) {
    $viewIP = " - IP: " . $accountData['ip'];
}
$bbParser->parse($mData['comment']);
echo "<div class='commentContainer'>\n\t\t<div class='commentDate{$commentHiddenStyle}'>\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width='887'>\n\t\t\t\t\t\t" . customDate($mData['date']) . " {$viewIP}\n\t\t\t\t\t</td>\n\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<a href='thread?id=" . $mData['thread'] . "#COMMENT-" . $mData['id'] . "'>\n\t\t\t\t\t\t\tView Thread\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\n\t\t<div class='commentMain' style='box-shadow: 0px 5px 20px " . getPostShadow($mData['poster']) . ";'>\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width='200'>\n\t\t\t\t\t\t<a href='user?id=" . $mData['poster'] . "' data-tooltip='View Profile: {$commentPoster}'>\n\t\t\t\t\t\t\t<div class='commentUser'>\n\t\t\t\t\t\t\t\t<div class='bold'>\n\t\t\t\t\t\t\t\t\t" . userNameTags($mData['poster'], $commentPoster) . "\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<br>\n\n\t\t\t\t\t\t\t\t" . $accountData['usertitle'] . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t<br> <br>\n\n\t\t\t\t\t\t<img src='" . $accountData['avatar'] . "' data-noenlarge='true' " . getAvatarStyle($mData['poster']) . ">\n\n\t\t\t\t\t\t<br> <br> <br>\n\n\t\t\t\t\t\t<span class='bold'>Posts:</span> " . getPostCount($mData['poster']) . " <br>\n\t\t\t\t\t\t<span class='bold'>Country:</span> " . $accountData['country'] . "\n\t\t\t\t\t</td>\n\n\t\t\t\t\t<td width='20'></td>\n\n\t\t\t\t\t<td width='900'>\n\t\t\t\t\t\t<div class='commentText'>\n\t\t\t\t\t\t\t" . nl2br(unescape($bbParser->getAsHtml())) . "";
storePermissions($mData['poster']);
if ($temporaryPermissions['allowsignature'] && $accountData['signature'] && strlen($accountData['signature']) <= $temporaryPermissions['maxsignature'] && substr_count($accountData['signature'], "\n") <= $temporaryPermissions['maxsignaturelines']) {
    echo "<br><br> ____________________________________________________________________ <br><br>";
    if ($temporaryPermissions['signaturebbcode']) {
        $bbParser->parse($accountData['signature']);
        if ($temporaryPermissions['signatureimage']) {
            echo nl2br(unescape($bbParser->getAsHtml()));
        } else {
            echo str_replace("<img", "[IMG", nl2br(unescape($bbParser->getAsHtml())));
        }
    }
}
echo "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <div align='left'>";
if ($permissions['downloadattachments']) {
    $attachmentsQuery = $mysql->query("SELECT `id`, `path` FROM `attachments` WHERE `thread` = '0' AND `post` = '" . escape($mData['id']) . "'");
Example #4
0
             $accountData = $accountQuery->fetch_assoc();
             $sectionIcon = $mData['locked'] ? "" : "";
             if ($mData['hidden']) {
                 $sectionIcon = "";
             }
             echo "<a href='thread?id=" . $mData['id'] . "'>\n\t\t\t\t\t\t<div class='sectionContainer'>\n\t\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<div class='sectionIcon'>\n\t\t\t\t\t\t\t\t\t\t\t{$sectionIcon}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\t\t\t<td width='500'>\n\t\t\t\t\t\t\t\t\t\t<div class='sectionName'>\n\t\t\t\t\t\t\t\t\t\t\t" . $mData['title'] . "\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div class='sectionDescription'>\n\t\t\t\t\t\t\t\t\t\t\tStarted by " . $accountData['displayname'] . " - " . customDate($mData['date']) . "\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\tThread By User\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</a>";
         }
     }
     $mQuery = $mysql->query("SELECT `id`, `poster`, `thread`, `date`, `hidden` FROM `comments` WHERE `poster` = '{$searchUser}'");
     while ($mData = $mQuery->fetch_assoc()) {
         if (!$mData['hidden'] || $permissions['viewhiddencomments'] || $permissions['viewownhiddencomments'] && $mData['poster'] == $_SESSION['accountid']) {
             $threadQuery = $mysql->query("SELECT `title` FROM `threads` WHERE `id` = '" . $mData['thread'] . "'");
             $threadData = $threadQuery->fetch_assoc();
             $accountQuery = $mysql->query("SELECT `displayname` FROM `accounts` WHERE `id` = '" . $mData['poster'] . "'");
             $accountData = $accountQuery->fetch_assoc();
             echo "<a href='comment?id=" . $mData['id'] . "'>\n\t\t\t\t\t\t<div class='sectionContainer'>\n\t\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td width='540'>\n\t\t\t\t\t\t\t\t\t\t<div class='sectionName'>\n\t\t\t\t\t\t\t\t\t\t\t" . $threadData['title'] . "\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div class='sectionDescription'>\n\t\t\t\t\t\t\t\t\t\t\tComment by " . $accountData['displayname'] . " - " . customDate($mData['date']) . "\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\tComment By User\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</a>";
         }
     }
 }
 if ($_POST['memberlist'] == "on") {
     $mQuery = $mysql->query("SELECT `id`, `displayname`, `usertitle` FROM `accounts` WHERE `displayname` LIKE '%" . escape($_POST['search']) . "%'");
     while ($mData = $mQuery->fetch_assoc()) {
         $accountData['usertitle'] = "";
         if ($accountQuery->num_rows) {
             $accountData = $accountQuery->fetch_assoc();
             $commentPoster = $accountData['displayname'];
         } else {
             $commentPoster = "Guest";
         }
         if (!$accountData['usertitle']) {
             $userTitleQuery = $mysql->query("SELECT `usergroup` FROM `usergroup_tracker` WHERE `user` = '" . $mData['id'] . "' ORDER BY `primary` DESC");
                $userGroupData = $userGroupQuery->fetch_assoc();
                if ($accountData['usertitle'] && $userGropuData['title']) {
                    $accountData['usertitle'] .= "<br>";
                }
                $accountData['usertitle'] .= $userGroupData['title'];
            }
        }
    }
    if (!$mData['read']) {
        $mysql->query("UPDATE `privatemessages` SET `read` = '1' WHERE `id` = '" . escape($_GET['id']) . "'");
    }
} else {
    die("You have followed an invalid link.");
}
$bbParser->parse($mData['message']);
echo "<div class='box'>\n\t\t<div class='boxHeading'>\n\t\t\t" . $mData['title'] . "\n\t\t</div>\n\n\t\t<div class='boxSubHeading'>\n\t\t\tSent by " . $accountData['displayname'] . " - " . customDate($mData['date']) . "\n\t\t</div>\n\n\t\t<div class='boxMain'>\n\t\t\t<table class='tdAlignTop'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width='200'>\n\t\t\t\t\t\t<a href='user?id=" . $mData['from'] . "' data-tooltip='View Profile: " . $accountData['displayname'] . "'>\n\t\t\t\t\t\t\t<div class='commentUser'>\n\t\t\t\t\t\t\t\t<div class='bold'>\n\t\t\t\t\t\t\t\t\t" . userNameTags($mData['from'], $accountData['displayname']) . "\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<br>\n\n\t\t\t\t\t\t\t\t" . $accountData['usertitle'] . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t<br> <br>\n\n\t\t\t\t\t\t<img src='" . $accountData['avatar'] . "' data-noenlarge='true' " . getAvatarStyle($mData['from']) . ">\n\n\t\t\t\t\t\t<br> <br> <br>\n\n\t\t\t\t\t\t<span class='bold'>Posts:</span> " . getPostCount($mData['from']) . " <br>\n\t\t\t\t\t\t<span class='bold'>Country:</span> " . $accountData['country'] . "\n\t\t\t\t\t</td>\n\n\t\t\t\t\t<td width='20'></td>\n\n\t\t\t\t\t<td width='900'>\n\t\t\t\t\t\t<div class='commentText'>\n\t\t\t\t\t\t\t" . nl2br(unescape($bbParser->getAsHtml())) . "";
storePermissions($mData['from']);
if ($temporaryPermissions['allowsignature'] && $accountData['signature'] && strlen($accountData['signature']) <= $temporaryPermissions['maxsignature'] && substr_count($accountData['signature'], "\n") <= $temporaryPermissions['maxsignaturelines']) {
    echo "<br><br> ____________________________________________________________________ <br><br>";
    if ($temporaryPermissions['signaturebbcode']) {
        $bbParser->parse($accountData['signature']);
        if ($temporaryPermissions['signatureimage']) {
            echo nl2br(unescape($bbParser->getAsHtml()));
        } else {
            echo str_replace("<img", "[IMG", nl2br(unescape($bbParser->getAsHtml())));
        }
    }
}
echo "</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t</div>";
if ($permissions['sendprivatemessage']) {
    echo "<br>\n\n\t\t<form action='sendmessage?to=" . $mData['from'] . "' method='POST'>\n\t\t\t<div class='box'>\n\t\t\t\t<div class='boxHeading'>\n\t\t\t\t\tReply\n\t\t\t\t</div>\n\n\t\t\t\t<div class='boxMain'>\n\t\t\t\t\t<div class='boxArea'>\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td width='100%'>Title:</td>\n\t\t\t\t\t\t\t\t<td><input type='text' name='title' placeholder='Title' value='" . $_POST['title'] . "' maxlength='200' class='boxFormInput' autofocus required></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class='boxArea'>\n\t\t\t\t\t\t<button type='button' data-tag='B' class='bbcode boxButton'>bold</button>\n\t\t\t\t\t\t<button type='button' data-tag='I' class='bbcode boxButton'>italic</button>\n\t\t\t\t\t\t<button type='button' data-tag='U' class='bbcode boxButton'>underline</button>\n\t\t\t\t\t\t<button type='button' data-tag='LEFT' class='bbcode boxButton'>left</button>\n\t\t\t\t\t\t<button type='button' data-tag='CENTER' class='bbcode boxButton'>center</button>\n\t\t\t\t\t\t<button type='button' data-tag='RIGHT' class='bbcode boxButton'>right</button>\n\t\t\t\t\t\t<button type='button' data-tag='LIST' class='bbcode boxButton'>bullet list</button>\n\t\t\t\t\t\t<button type='button' data-tag='NLIST' class='bbcode boxButton'>number list</button>\n\t\t\t\t\t\t<button type='button' data-tag='LI' class='bbcode boxButton'>list item</button>\n\t\t\t\t\t\t<button type='button' data-tag='EMAIL' class='bbcode boxButton'>email</button>\n\t\t\t\t\t\t<button type='button' data-tag='IMG' class='bbcode boxButton'>image</button>\n\t\t\t\t\t\t<button type='button' data-tag='QUOTE' class='bbcode boxButton'>quote</button>\n\t\t\t\t\t\t<button id='bbcode-link' type='button' data-tooltip='Example: [URL=http://example.com]Click here[/URL]' class='boxButton'>link</button>\n\t\t\t\t\t\t<button id='bbcode-font' type='button' data-tooltip='Example: [FONT=Arial]Hello world![/FONT]' class='boxButton'>font</button>\n\t\t\t\t\t\t<button id='bbcode-size' type='button' data-tooltip='Example: [SIZE=5]Hello world![/SIZE]' class='boxButton'>size</button>\n\t\t\t\t\t\t<button id='bbcode-color' type='button' data-tooltip='Example: [COLOR=RED]Hello[/COLOR] [COLOR=#00FF00]world![/COLOR]' class='boxButton'>color</button> ";
Example #6
0
            $_SESSION['lastcomment'] = time();
        } else {
            $timeBeforeComment = 60 - (time() - $_SESSION['lastcomment']);
            echo "<div class='box'>\n\t\t\t\t\t<div class='boxHeading'>\n\t\t\t\t\t\tYou must wait {$timeBeforeComment} seconds before posting another thread, comment, profile message, or private message.\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<br>";
        }
    } else {
        echo "<div class='box'>\n\t\t\t\t<div class='boxHeading'>\n\t\t\t\t\tYour profile message must be at least 3 characters long.\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<br>";
    }
}
echo "<div class='userBox'>\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td width='400'>\n\t\t\t\t\t<div class='userName bold'>\n\t\t\t\t\t\t" . userNameTags($mData['id'], $mData['displayname']) . "\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class='userTitles'>\n\t\t\t\t\t\t" . $mData['usertitle'] . "\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\n\t\t\t\t<td width='500'>\n\t\t\t\t\t<span class='bold'>Posts:</span> " . getPostCount($mData['id']) . " <br>\n\t\t\t\t\t<span class='bold'>Country:</span> " . $mData['country'] . "\n\t\t\t\t</td>\n\n\t\t\t\t<td>\n\t\t\t\t\t<img src='" . $mData['avatar'] . "' data-noenlarge='true' class='userAvatar'>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>\n\n\t<br>\n\n\t<h2>Profile Messages</h2>";
$mQuery = $mysql->query("SELECT `id`, `poster`, `date`, `message` FROM `profilemessages` WHERE `user` = '" . escape($_GET['id']) . "' ORDER BY `date` DESC");
while ($mData = $mQuery->fetch_assoc()) {
    $accountQuery = $mysql->query("SELECT `displayname`, `avatar` FROM `accounts` WHERE `id` = '" . $mData['poster'] . "'");
    $accountData = $accountQuery->fetch_assoc();
    $bbParser->parse($mData['message']);
    echo "<div data-user='******'displayname'] . "' class='mentionUser userMessageName bold inlineBlock'>\n\t\t\t" . $accountData['displayname'] . "\n\t\t</div>\n\n\t\t<div class='userMessageName bold inlineBlock'>\n\t\t\t - " . customDate($mData['date']) . "\n\t\t</div>\n\n\t\t<div class='userMessageBox'>\n\t\t\t" . nl2br(unescape($bbParser->getAsHtml())) . " <br><br><br><br><br><br> <div align='right'>";
    if ($permissions['editpost'] || $permissions['editownprofilemessage'] && $mData['poster'] == $_SESSION['accountid']) {
        echo "<a href='editpost?profilemessage=" . $mData['id'] . "' data-tooltip='Edit Profile Message' class='commentControlEx'>\n\t\t\t\t\t\n\t\t\t\t</a>";
    }
    if ($permissions['deletepost'] || $permissions['deleteownprofilemessage'] && $mData['poster'] == $_SESSION['accountid']) {
        echo "<a href='deletepost?profilemessage=" . $mData['id'] . "' data-tooltip='Delete Profile Message' data-warning='Are you sure you want to delete this profile message? Once it is deleted, you will not be able to restore it.' class='commentControlEx'>\n\t\t\t\t\t\n\t\t\t\t</a>";
    }
    echo "</div>\n\t\t</div>\n\n\t\t<br><br>";
}
if ($permissions['postprofilemessage'] || $permissions['postownprofilemessage'] && $_GET['id'] == $_SESSION['accountid']) {
    echo "<br>\n\n\t\t<form action='user?id=" . $_GET['id'] . "' method='POST'>\n\t\t\t<div id='commentBox' class='box'>\n\t\t\t\t<div class='boxHeading'>\n\t\t\t\t\tPost Profile Message\n\t\t\t\t</div>\n\n\t\t\t\t<div class='boxMain'>\n\t\t\t\t\t<button type='button' data-tag='B' class='bbcode boxButton'>bold</button>\n\t\t\t\t\t<button type='button' data-tag='I' class='bbcode boxButton'>italic</button>\n\t\t\t\t\t<button type='button' data-tag='U' class='bbcode boxButton'>underline</button>\n\t\t\t\t\t<button type='button' data-tag='LEFT' class='bbcode boxButton'>left</button>\n\t\t\t\t\t<button type='button' data-tag='CENTER' class='bbcode boxButton'>center</button>\n\t\t\t\t\t<button type='button' data-tag='RIGHT' class='bbcode boxButton'>right</button>\n\t\t\t\t\t<button type='button' data-tag='LIST' class='bbcode boxButton'>bullet list</button>\n\t\t\t\t\t<button type='button' data-tag='NLIST' class='bbcode boxButton'>number list</button>\n\t\t\t\t\t<button type='button' data-tag='LI' class='bbcode boxButton'>list item</button>\n\t\t\t\t\t<button type='button' data-tag='EMAIL' class='bbcode boxButton'>email</button>\n\t\t\t\t\t<button type='button' data-tag='IMG' class='bbcode boxButton'>image</button>\n\t\t\t\t\t<button type='button' data-tag='QUOTE' class='bbcode boxButton'>quote</button>\n\t\t\t\t\t<button id='bbcode-link' type='button' data-tooltip='Example: [URL=http://example.com]Click here[/URL]' class='boxButton'>link</button>\n\t\t\t\t\t<button id='bbcode-font' type='button' data-tooltip='Example: [FONT=Arial]Hello world![/FONT]' class='boxButton'>font</button>\n\t\t\t\t\t<button id='bbcode-size' type='button' data-tooltip='Example: [SIZE=5]Hello world![/SIZE]' class='boxButton'>size</button>\n\t\t\t\t\t<button id='bbcode-color' type='button' data-tooltip='Example: [COLOR=RED]Hello[/COLOR] [COLOR=#00FF00]world![/COLOR]' class='boxButton'>color</button> ";
    if ($permissions['mentionusers']) {
        echo "<button type='button' data-tag='MENTION' data-tooltip='Example: [MENTION]Jimmy[/MENTION]' class='bbcode boxButton'>mention</button>";
    }
    echo "<br><br>\n\n\t\t\t\t\t<textarea id='profilemessage' name='profilemessage' placeholder=' Profile Message' maxlength='5000' class='boxTextArea' required></textarea>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div align='right'>\n\t\t\t\t<input type='submit' name='postprofilemessage' value='Post Profile Message' class='boxButton'>\n\t\t\t</div>\n\t\t</form>\n\n\t\t<br>";
}
Example #7
0
        }
        $totalRating = round($totalRating / $ratingQuery->num_rows);
        $hasRatedQuery = $mysql->query("SELECT `id` FROm `rating` WHERE `thread` = '" . $mData['id'] . "' AND `user` = '" . $_SESSION['accountid'] . "'");
        echo "<a href='thread?id=" . $mData['id'] . "'>\n\t\t\t\t<div class='sectionContainer'>\n\t\t\t\t\t<table>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<div class='sectionIcon'>\n\t\t\t\t\t\t\t\t\t{$sectionIcon}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\t<td width='500'>\n\t\t\t\t\t\t\t\t<div class='sectionName'>\n\t\t\t\t\t\t\t\t\t" . $mData['title'] . "\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div class='sectionDescription'>\n\t\t\t\t\t\t\t\t\tStarted by {$threadPoster} - " . customDate($mData['date']) . "\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\t<td width='100' class='sectionStats'>\n\t\t\t\t\t\t\t\tReplies: {$commentAmount}<br>\n\t\t\t\t\t\t\t\tViews: " . $mData['views'] . "<br>";
        if ($permissions['ratethreads'] && !$hasRatedQuery->num_rows) {
            for ($ratingIndex = 1; $ratingIndex <= $totalRating; $ratingIndex++) {
                echo "<a href='rate?thread=" . $mData['id'] . "&rating={$ratingIndex}'>\n\t\t\t\t\t\t\t\t\t\t\t<span data-tooltip='Thread Rating: " . $totalRating . "/5' class='sectionRatingFill'></span>\n\t\t\t\t\t\t\t\t\t\t</a>";
            }
            for ($ratingIndex = $totalRating + 1; $ratingIndex <= 5; $ratingIndex++) {
                echo "<a href='rate?thread=" . $mData['id'] . "&rating={$ratingIndex}'>\n\t\t\t\t\t\t\t\t\t\t\t<span data-tooltip='Thread Rating: " . $totalRating . "/5' class='sectionRatingEmpty'></span>\n\t\t\t\t\t\t\t\t\t\t</a>";
            }
        } else {
            for ($ratingIndex = 1; $ratingIndex <= $totalRating; $ratingIndex++) {
                echo "<span data-tooltip='Thread Rating: " . $totalRating . "/5' class='sectionRatingFill'></span>";
            }
            for ($ratingIndex = $totalRating + 1; $ratingIndex <= 5; $ratingIndex++) {
                echo "<span data-tooltip='Thread Rating: " . $totalRating . "/5' class='sectionRatingEmpty'></span>";
            }
        }
        echo "</td>\n\n\t\t\t\t\t\t\t<td class='sectionStats'>\n\t\t\t\t\t\t\t\t<a href='user?id=" . $commentPosterData['id'] . "' class='sectionUser'>\n\t\t\t\t\t\t\t\t\t" . userNameTags($commentPosterData['id'], $commentPosterData['displayname']) . "\n\t\t\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t\t\t<br>\n\n\t\t\t\t\t\t\t\t<div class='sectionDate'>\n\t\t\t\t\t\t\t\t\t" . customDate($mData['lastpost']) . "\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t</a>";
    }
} else {
    echo "<div class='sectionContainer'>\n\t\t\tThere are no threads to display in this section.\n\t\t</div>";
}
if ($permissions['postthreads']) {
    echo "<div align='right'>\n\t\t\t<a href='newthread?section=" . $_GET['id'] . "'>\n\t\t\t\t<button class='sectionNewThread icon'> &nbsp;Create New Thread</button>\n\t\t\t</a>\n\t\t</div>";
}
?>

<?php 
require_once "includes/footer.php";