Esempio n. 1
0
 public function dispShoutbox($setWidth = 0, $setHeight = 0, $blnPercentWidth = false, $txtBoxWidth = 0, $blnPercentHeight = false)
 {
     global $MAIN_ROOT, $THEME;
     if ($setWidth > 0) {
         $this->intDispWidth = $setWidth;
     }
     if ($setHeight > 0) {
         $this->intDispHeight = $setHeight;
     }
     $dispWidthPX = "px";
     if ($blnPercentWidth) {
         $dispWidthPX = "%";
     }
     $dispHeightPX = "px";
     if ($blnPercentHeight) {
         $dispHeightPX = "%";
     }
     $result = $this->MySQL->query("SELECT * FROM " . $this->strTableName . " WHERE newstype = '3'" . $this->strSQLSort . " ORDER BY dateposted");
     while ($row = $result->fetch_assoc()) {
         if ($this->memberObj->select($row['member_id'])) {
             $memberLink = $this->memberObj->getMemberLink();
             $dispPost = nl2br(parseBBCode(wordwrap(filterText($row['newspost']), $this->intWordWrap)));
             $dispTime = "<p align='center' style='font-size: 9px'><br>" . getPreciseTime($row['dateposted']) . "</p>";
             $dispManagePost = "";
             if ($this->strEditLink != "" && $this->strDeleteLink != "") {
                 $dispManagePost = "<p align='center'><span class='loadingSpiral' id='" . $this->strDivID . "_loading_" . $row[$this->strTableKey] . "'><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral2.gif' width='30' height='30'></span><span class='tinyFont' id='" . $this->strDivID . "_manage_" . $row[$this->strTableKey] . "'><br><b><a href='" . $this->strEditLink . $row[$this->strTableKey] . "'>EDIT</a> - <a href='javascript:void(0)' onclick=\"deleteShoutbox('" . $row[$this->strTableKey] . "', '" . $this->strDeleteLink . "', '" . $this->strDivID . "')\">DELETE</a></b></span></p>";
             }
             $shoutBoxInfo .= "\n\t\t\t\t\t<b>" . $memberLink . ":</b><br>\n\t\t\t\t\t<div style='word-wrap: break-word;'>" . $dispPost . "</div>\n\t\t\t\t\t" . $dispTime . "\n\t\t\t\t\t" . $dispManagePost . "\n\t\t\t\t\t<div class='dottedLine' style='margin: 5px 0px'></div>\n\t\t\t\t";
         }
     }
     $addToReturn = "";
     $addToReturn2 = "";
     $setMainShoutbox = "";
     if ($this->blnMainShoutbox) {
         $setMainShoutbox = " data-shoutbox='main' ";
     }
     if (!$this->blnUpdateShoutbox) {
         $addToReturn = "<div class='shoutBox' id='" . $this->strDivID . "'" . $setMainShoutbox . " style='width: " . $this->intDispWidth . $dispWidthPX . "; height: " . $this->intDispHeight . $dispHeightPX . "'>";
         $addToReturn2 = "</div>";
     }
     $returnVal = $addToReturn . $shoutBoxInfo . $addToReturn2;
     if ($this->strPostLink != "") {
         $setTxtBoxWidth = $this->intDispWidth - 10;
         if ($txtBoxWidth > 0) {
             $setTxtBoxWidth = $txtBoxWidth;
         }
         $returnVal .= "\n\t\t\t<div class='shoutBoxPost' style='text-align: center; width: 100%' id='" . $this->strDivID . "_postShoutbox'>\n\t\t\t\t<div style='margin-left: auto; margin-right: auto; width: " . $setTxtBoxWidth . $dispWidthPX . "'>\n\t\t\t\t\t<textarea class='textBox' rows='1' style='margin-left: auto; margin-right: auto; width: 100%; height: 25px' id='" . $this->strDivID . "_message'></textarea>\n\t\t\t\t\t<p align='right' style='margin-right: -3px; padding-top: 1px; margin-top: 3px'><input type='button' class='submitButton' value='POST' onclick=\"postShoutbox('" . $this->strDivID . "', '" . $this->strPostLink . "')\" style='padding: 5px'></p>\n\t\t\t\t</div>\n\t\t\t</div>";
     }
     return $returnVal;
 }
function cleanUpPost($postText, $poster = "", $noSmilies = false, $noBr = false)
{
    global $postNoSmilies, $postNoBr, $smilies, $postPoster;
    static $orig, $repl;
    $postNoSmilies = $noSmilies;
    $postNoBr = $noBr;
    $postPoster = $poster;
    $s = $postText;
    $s = str_replace('<!--', '&lt;!--', $s);
    $s = str_replace('-->', '--&gt;', $s);
    $s = parseBBCode($s);
    // TODO do it more nicely
    $s = preg_replace_callback("@<a[^>]+href\\s*=\\s*\"(.*?)\"@si", 'ApplyNetiquetteToLinks', $s);
    $s = preg_replace_callback("@<a[^>]+href\\s*=\\s*'(.*?)'@si", 'ApplyNetiquetteToLinks', $s);
    $s = preg_replace_callback("@<a[^>]+href\\s*=\\s*([^\"'][^\\s>]*)@si", 'ApplyNetiquetteToLinks', $s);
    $s = str_ireplace('4shared', 'shittyfilehost', $s);
    //$s = str_ireplace('imageshack', 'imageshit', $s);
    $s = str_ireplace('autoplay', 'auto<i></i>play', $s);
    $s = securityPostFilter($s);
    return $s;
}
Esempio n. 3
0
        $query = mysql_query("UPDATE `posts` SET `views`='" . $update . "' WHERE `id`='" . $r1['id'] . "'");
        echo "<table width='98%' cellpadding='1' cellspacing='1' align='center' style='border: 1px solid black; text-align: left;'>\n<tr><td width='100%' style='border: 1px solid black;' colspan='2'><a href='../boards'>Index</a> --> <a href='../boards/viewforum.php?id=" . $r1['forum'] . "'>" . $r5['name'] . "</a> --> " . $r1['title'] . "</td></tr>\n<tr><td width='100%' style='border: 1px solid black;' colspan='2'>Topic: " . $r1['title'] . "</td></tr>\n<tr><th width='30%' style='border: 1px solid black;'>User Info</th><th width='60%' style='border: 1px solid black;'>Post</th></tr>\n<tr><td width='30%' style='border: 1px solid black;'><a href='../profile.php?id=" . $r2['id'] . "'><b>" . $r2['name'] . "</b></a><br>";
        echo rank($r2['rank']);
        echo "<br><img src='../images/sprites/" . $r2['avatar'] . ".png' alt='avy' /></td><td width='60%' valign='top' style='border: 1px solid black; text-align: left;'>";
        echo parseBBCode($r1['post']);
        echo "<br><br>______________<br>";
        echo parseBBCode($r2['sig']);
        echo "</td></tr></table><br><br>";
        $q3 = mysql_query("SELECT * FROM `posts` WHERE `type`='post' AND `topic`='" . $r1['id'] . "'");
        while ($row = mysql_fetch_array($q3)) {
            $q4 = mysql_query("SELECT * FROM `users` WHERE `name`='" . $row['poster'] . "'");
            $r4 = mysql_fetch_array($q4);
            echo "<table width='98%' cellpadding='1' cellspacing='1' align='center' style='border: 1px solid black; text-align: left;'>\n<tr><th width='30%' style='border: 1px solid black;'>User Info</th><th width='60%' style='border: 1px solid black;'>Post</th></tr>\n<tr><td width='30%' style='border: 1px solid black;'><a href='../profile.php?id=" . $r4['id'] . "'><b>" . $r4['name'] . "</b></a><br>";
            echo rank($r4['rank']);
            echo "<br><img src='../images/sprites/" . $r4['avatar'] . ".png' alt='avy' /></td><td width='60%' valign='top' style='border: 1px solid black; text-align: left;'>";
            echo parseBBCode($row['post']);
            echo "</td></tr></table><br><br>";
        }
        if (isset($_POST['submit'])) {
            $comment = safe($_POST['comment']);
            if ($comment == '') {
                echo "Please enter a reply.";
            } else {
                mysql_query("INSERT INTO `posts` (`poster`, `post`, `type`, `topic`, `forum`) VALUES ('" . $_SESSION['name'] . "', '" . $comment . "', 'post', '" . $r1['id'] . "', '" . $r5['id'] . "')") or die(mysql_error());
                $time = time();
                mysql_query("UPDATE `posts` SET `lastpost`='" . $time . "' WHERE `id`='" . $var . "'");
                echo "Reply posted!";
            }
        } else {
            ?>
Enter your comment below!<br>
Esempio n. 4
0
 */
include_once "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/imageslider.php";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Home Page Images");
$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$consoleTitle = $consoleInfo['pagetitle'];
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$imageSliderObj = new ImageSlider($mysqli);
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "imageslider ORDER BY ordernum DESC");
    echo "\n\t\t<table class='formTable' style='border-spacing: 0px; margin-top: 0px; margin-bottom: 20px'>\n\t\t\t<tr><td class='dottedLine' colspan='5'></td></tr>\n\t\t";
    $intHighestOrderNum = $imageSliderObj->getHighestOrderNum();
    $counter = 1;
    while ($row = $result->fetch_assoc()) {
        $dispUpArrow = $counter == 1 ? "<img src='" . $MAIN_ROOT . "images/transparent.png' class='manageListActionButton'>" : "<a href='javascript:void(0)' onclick=\"moveImg('" . $row['imageslider_id'] . "', 'up')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/uparrow.png' class='manageListActionButton'></a>";
        $dispDownArrow = $counter == $intHighestOrderNum ? "<img src='" . $MAIN_ROOT . "images/transparent.png' class='manageListActionButton'>" : "<a href='javascript:void(0)' onclick=\"moveImg('" . $row['imageslider_id'] . "', 'down')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/downarrow.png' class='manageListActionButton'></a>";
        echo "\n\t\t\t<tr>\n\t\t\t\t<td class='main manageList dottedLine' style='width: 76%; font-weight: bold'><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&imgID=" . $row['imageslider_id'] . "&action=edit'>" . parseBBCode(filterText($row['name'])) . "</a></td>\n\t\t\t\t<td class='main manageList dottedLine' style='width: 6%'>" . $dispUpArrow . "</td>\n\t\t\t\t<td class='main manageList dottedLine' style='width: 6%'>" . $dispDownArrow . "</td>\n\t\t\t\t<td class='main manageList dottedLine' style='width: 6%'><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&imgID=" . $row['imageslider_id'] . "&action=edit'><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/edit.png' class='manageListActionButton'></a></td>\n\t\t\t\t<td class='main manageList dottedLine' style='width: 6%'><a href='javascript:void(0)' onclick=\"deleteImg('" . $row['imageslider_id'] . "')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/delete.png' class='manageListActionButton'></a></td>\n\t\t\t</tr>\n\t\t";
        $counter++;
    }
    echo "</table>";
    if ($result->num_rows == 0) {
        echo "\n\n\t\t\t<div class='shadedBox' style='width: 50%; margin: 20px auto'>\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tNo images added yet!\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t";
    }
}
Esempio n. 5
0
            $member->select($row['member_id']);
            $posterInfo = $member->get_info_filtered();
            if ($posterInfo['avatar'] == "") {
                $posterInfo['avatar'] = $MAIN_ROOT . "themes/" . $THEME . "/images/defaultavatar.png";
            } else {
                $posterInfo['avatar'] = $MAIN_ROOT . $posterInfo['avatar'];
            }
            if ($row['newstype'] == 1) {
                $dispNewsType = " - <span class='publicNewsColor' style='font-style: italic'>public</span>";
            } elseif ($row['newstype'] == 2) {
                $dispNewsType = " - <span class='privateNewsColor' style='font-style: italic'>private</span>";
            } elseif ($row['newstype'] == 3) {
                $dispNewsType = "";
            }
            $dispLastEdit = "";
            if ($member->select($row['lasteditmember_id'])) {
                $checkHTMLAccess = $member->hasAccess($checkHTMLConsoleObj);
                $dispLastEditTime = getPreciseTime($row['lasteditdate']);
                $dispLastEdit = "<span style='font-style: italic'>last edited by " . $member->getMemberLink() . " - " . $dispLastEditTime . "</span>";
            }
            $member->select($row['member_id']);
            if (!isset($checkHTMLAccess)) {
                $checkHTMLAccess = $member->hasAccess($checkHTMLConsoleObj);
            }
            $dispNews = $checkHTMLAccess ? parseBBCode($row['newspost']) : nl2br(parseBBCode(filterText($row['newspost'])));
            echo "\n\t\t\t\n\t\t\t\t<div class='newsDiv' id='newsDiv_" . $row['news_id'] . "'>\n\t\t\t\t\t<div class='postInfo'>\n\t\t\t\t\t\t<div style='float: left'><img src='" . $posterInfo['avatar'] . "' class='avatarImg'></div>\n\t\t\t\t\t\t<div style='float: left; margin-left: 15px'>posted by " . $member->getMemberLink() . " - " . getPreciseTime($row['dateposted']) . $dispNewsType . "<br>\n\t\t\t\t\t\t<span class='subjectText'>" . filterText($row['postsubject']) . "</span></div>\n\t\t\t\t\t\t<div style='clear: both'></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<br>\n\t\t\t\t\t<div class='dottedLine' style='margin-top: 5px'></div>\n\t\t\t\t\t<div class='postMessage'>\n\t\t\t\t\t\t" . utf8_decode($dispNews) . "\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='dottedLine' style='margin-top: 5px; margin-bottom: 5px'></div>\n\t\t\t\t\t<div class='main' style='margin-top: 0px; margin-bottom: 10px; padding-left: 5px'>" . $dispLastEdit . "</div>\n\t\t\t\t\t<p style='padding: 0px; margin: 0px' align='right'><b><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&newsID=" . $row['news_id'] . "&action=edit'>EDIT</a> | <a href='javascript:void(0)' onclick=\"deleteNews('" . $row['news_id'] . "')\">DELETE</a></b></p>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t\n\t\t\t";
        }
    } else {
        echo "\n\t\t\t<div class='shadedBox' style='width: 300px; margin-left: auto; margin-right: auto'>\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\t<i>There are currently no news posts!</i>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t";
    }
}
Esempio n. 6
0
 public function show()
 {
     global $hooksObj;
     if ($this->intTableKeyValue != "") {
         $member = new Member($this->MySQL);
         $postInfo = $this->arrObjInfo;
         $checkHTMLAccess = "";
         if ($member->select($postInfo['lasteditmember_id'])) {
             $checkHTMLAccess = $member->hasAccess($this->consoleObj);
             $dispLastEditTime = getPreciseTime($postInfo['lasteditdate']);
             $dispLastEdit = "<span style='font-style: italic'>last edited by " . $member->getMemberLink() . " - " . $dispLastEditTime . "</span>";
         }
         $dispNewsType = "";
         if ($postInfo['newstype'] == 1) {
             $dispNewsType = " - <span class='publicNewsColor' style='font-style: italic'>public</span>";
         } elseif ($postInfo['newstype'] == 2) {
             $dispNewsType = " - <span class='privateNewsColor' style='font-style: italic'>private</span>";
         }
         $member->select($postInfo['member_id']);
         $checkHTMLAccess = $checkHTMLAccess == "" ? $member->hasAccess($this->consoleObj) : $checkHTMLAccess;
         $dispNews = $checkHTMLAccess ? parseBBCode($postInfo['newspost']) : nl2br(parseBBCode(filterText($postInfo['newspost'])));
         $GLOBALS['news_post']['id'] = $this->intTableKeyValue;
         $GLOBALS['news_post']['post'] = "\n\t\n\t\t\t\t<div class='newsDiv' id='newsDiv_" . $postInfo['news_id'] . "'>\n\t\t\t\t\t\n\t\t\t\t\t<div class='postInfo'>\n\t\t\t\t\t\t<div id='newsPostAvatar' style='float: left'>" . $member->getAvatar() . "</div>\n\t\t\t\t\t\t<div id='newsPostInfo' style='float: left; margin-left: 15px'>posted by " . $member->getMemberLink() . " - " . getPreciseTime($postInfo['dateposted']) . $dispNewsType . "<br>\n\t\t\t\t\t\t<span class='subjectText'>" . filterText($postInfo['postsubject']) . "</span></div>\n\t\t\t\t\t\t<div style='clear: both'></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<br>\n\t\t\t\t\t<div class='dottedLine' style='margin-top: 5px'></div>\n\t\t\t\t\t<div class='postMessage'>\n\t\t\t\t\t\t" . $dispNews . "\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='dottedLine' style='margin-top: 5px; margin-bottom: 5px'></div>\n\t\t\t\t\t<div class='main' style='margin-top: 0px; margin-bottom: 10px; padding-left: 5px'>" . $dispLastEdit . "</div>\n\t\t\t\t\t<p style='padding: 0px; margin: 0px' align='right'><b><a href='" . MAIN_ROOT . "news/viewpost.php?nID=" . $postInfo['news_id'] . "#comments'>Comments (" . $this->countComments() . ")</a></b></p>\n\t\t\t\t</div>\n\t\n\t\t\t";
         $hooksObj->run("newspost_show");
         echo $GLOBALS['news_post']['post'];
         unset($GLOBALS['news_POST']);
     }
 }
Esempio n. 7
0
        echo "Here you can view the current news.<br><table border='1' width='90%' style='border: 1px solid black;' cellpadding='1' cellspacing='1' align='center'>\n<tr><td width='90%' style='border: 1px solid black;' colspan='2'>Title: " . $result['title'] . "</td></tr>\n<tr><td width='30%' style='border: 1px solid black;'>Avatar</td><td width='60%' style='border: 1px solid black;'>News Post</td></tr>\n<tr><td width='30%' style='border: 1px solid black;'><img src='images/sprites/";
        echo $avy;
        echo ".png' alt='Avatar' /></td><td width='60%' style='border: 1px solid black;'>";
        echo parseBBCode($result['post']);
        echo "</td></tr>\n<tr><td width='30%' style='border: 1px solid black;'>Posted By</td><td width='60%' style='border: 1px solid black;'>" . $result['poster'] . "</td></tr>\n<tr><td width='30%' style='border: 1px solid black;'>Date Posted</td><td width='60%' style='border: 1px solid black;'>" . $result['date'] . "th</td></tr>\n<tr><td width='30%' style='border: 1px solid black;'>Time Posted</td><td width='60%' style='border: 1px solid black;'>" . $result['time'] . "</td></tr>\n<tr><td width='90%' style='border: 1px solid black;' colspan='2'><a href=''>News Comments (x" . $check2 . ")</a></td></tr>\n</table><br>";
        echo "<br><div id='load'><a style='cursor: pointer;' onclick=\"loadXMLDoc('postcomment.php');\">Post a Comment</a></div><br>";
        while ($row = mysql_fetch_array($query2)) {
            echo "<table border='1' width='90%' cellpadding='1' cellspacing='1' style='border: 1px solid black;' align='center'>\n<tr><td width='30%' style='border: 1px solid black;'>Post ID: #";
            echo $row['id'];
            echo "</td><td width='60%' style='border: 1px solid black;'>Posted By: ";
            echo $row['poster'];
            echo "(";
            echo rank($row['rank']);
            echo ")</td></tr>";
            if ($row['poster'] == $_SESSION['name']) {
                echo "<tr><td width='90%' style='border: 1px solid black;' colspan='2'><a href=\"?select=edit&id=" . $row['id'] . "\">Edit Comment</a></td></tr>";
            } else {
                echo "";
            }
            echo "<tr><td width='30%' style='border: 1px solid black;'><img src='images/sprites/";
            echo $row['avatar'];
            echo ".png' alt='Post Avatar' /></td><td width='60%' style='border: 1px solid black;'>";
            echo parseBBCode($row['comment']);
            echo "</td></tr></table><br>";
        }
    } else {
    }
} else {
    echo "You are unallowed to view this page.";
}
require 'stuff/bottom.php';
Esempio n. 8
0
                }
            }
            if ($countErrors > 0) {
                $_POST = filterArray($_POST);
                $_POST['submit'] = false;
            }
        }
        if (!$_POST['submit'] && !$_POST['cancel']) {
            $squadNewsInfo = $squadNewsObj->get_info_filtered();
            if ($dispError != "") {
                echo "\n\t\t\t\t<div class='errorDiv'>\n\t\t\t\t<strong>Unable to edit shoutbox post because the following errors occurred:</strong><br><br>\n\t\t\t\t{$dispError}\n\t\t\t\t</div>\n\t\t\t\t";
            }
            echo "\n\t\t\t\n\t\t\t\t\t<table class='formTable'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class='formLabel' valign='top'>Message:</td>\n\t\t\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t\t\t<textarea rows='10' cols='55' class='textBox' id='message_" . $squadNewsInfo['squadnews_id'] . "'>" . $squadNewsInfo['newspost'] . "</textarea>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class='main' align='center' colspan='2'><br><br>\n\t\t\t\t\t\t\t\t<input type='button' onclick=\"saveNewsPost('" . $squadNewsInfo['squad_id'] . "', '" . $squadNewsInfo['squadnews_id'] . "')\" value='Save' class='submitButton' style='width: 90px'><br><br>\n\t\t\t\t\t\t\t\t<a href='javascript:void(0)' onclick=\"cancelEdit('" . $squadNewsInfo['squad_id'] . "', '" . $squadNewsInfo['squadnews_id'] . "')\">Cancel</a>\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</form>\n\t\t\t\n\t\t\t";
        }
        if ($_POST['cancel']) {
            $squadNewsInfo = $squadNewsObj->get_info_filtered();
            $member->select($squadNewsInfo['member_id']);
            $squadMemberInfo = $member->get_info_filtered();
            if ($squadMemberInfo['avatar'] == "") {
                $squadMemberInfo['avatar'] = $MAIN_ROOT . "themes/" . $THEME . "/images/defaultavatar.png";
            }
            $dispLastEdit = "";
            if ($member->select($squadNewsInfo['lasteditmember_id'])) {
                $dispLastEditTime = getPreciseTime($squadNewsInfo['lasteditdate']);
                $dispLastEdit = "<span style='font-style: italic'>last edited by " . $member->getMemberLink() . " - " . $dispLastEditTime . "</span>";
            }
            $member->select($squadNewsInfo['member_id']);
            echo "\n\t\t\t<img src='" . $squadMemberInfo['avatar'] . "' class='avatarImg'>\n\t\t\t<div class='postInfo'>\n\t\t\tposted by " . $member->getMemberLink() . " - " . getPreciseTime($squadNewsInfo['dateposted']) . "\n\t\t\t</div>\n\t\t\t<br>\n\t\t\t<div class='dottedLine' style='margin-top: 5px'></div>\n\t\t\t<div class='postMessage'>\n\t\t\t" . nl2br(parseBBCode(filterText($squadNewsInfo['newspost']))) . "\n\t\t\t</div>\n\t\t\t<div class='dottedLine' style='margin-top: 5px; margin-bottom: 5px'></div>\n\t\t\t<div class='main' style='margin-top: 0px; margin-bottom: 10px; padding-left: 5px'>" . $dispLastEdit . "</div>\n\t\t\t<p style='padding: 0px; margin: 0px' align='right'><b><a href='javascript:void(0)' onclick=\"editNews('" . $squadNewsInfo['squad_id'] . "', '" . $squadNewsInfo['squadnews_id'] . "')\">EDIT</a> | <a href='javascript:void(0)' onclick=\"deleteNews('" . $squadNewsInfo['squad_id'] . "', '" . $squadNewsInfo['squadnews_id'] . "')\">DELETE</a></b></p>\n\t\t\t";
        }
    }
}
Esempio n. 9
0
        $member->select($newsInfo['member_id']);
        $posterInfo = $member->get_info_filtered();
        if ($posterInfo['avatar'] == "") {
            $posterInfo['avatar'] = $MAIN_ROOT . "themes/" . $THEME . "/images/defaultavatar.png";
        }
        $dispNewsType = " - <span class='publicNewsColor' style='font-style: italic'>public</span>";
        $dispLastEdit = "";
        if ($member->select($newsInfo['lasteditmember_id'])) {
            $dispLastEditTime = getPreciseTime($newsInfo['lasteditdate']);
            $dispLastEdit = "<span style='font-style: italic'>last edited by " . $member->getMemberLink() . " - " . $dispLastEditTime . "</span>";
        }
        $member->select($newsInfo['member_id']);
        if (!isset($checkHTMLAccess)) {
            $checkHTMLAccess = $member->hasAccess($checkHTMLConsoleObj);
        }
        $dispNews = $checkHTMLAccess ? parseBBCode($newsObj->get_info("newspost")) : nl2br(parseBBCode(filterText($newsInfo['newspost'])));
        $dispHPNews .= "\t\t\n\t\t\t<div class='newsDiv' id='newsDiv_" . $newsInfo['news_id'] . "'>\n\t\t\t\t<div class='postInfo'>\n\t\t\t\t\t<div id='newsPostAvatar' style='float: left'><img src='" . $posterInfo['avatar'] . "' class='avatarImg'></div>\n\t\t\t\t\t<div id='newsPostInfo' style='float: left; margin-left: 15px'>posted by " . $member->getMemberLink() . " - " . getPreciseTime($newsInfo['dateposted']) . $dispNewsType . "<br>\n\t\t\t\t\t<span class='subjectText'>" . $newsInfo['postsubject'] . "</span></div>\n\t\t\t\t</div>\n\t\t\t\t<br>\n\t\t\t\t<div class='dottedLine' style='margin-top: 5px'></div>\n\t\t\t\t<div class='postMessage'>\n\t\t\t\t\t" . $dispNews . "\n\t\t\t\t</div>\n\t\t\t\t<div class='dottedLine' style='margin-top: 5px; margin-bottom: 5px'></div>\n\t\t\t\t<div class='main' style='margin-top: 0px; margin-bottom: 10px; padding-left: 5px'>" . $dispLastEdit . "</div>\n\t\t\t\t<p style='padding: 0px; margin: 0px' align='right'><b><a href='" . $MAIN_ROOT . "news/viewpost.php?nID=" . $newsInfo['news_id'] . "#comments'>Comments (" . $newsObj->countComments() . ")</a></b></p>\n\t\t\t</div>\n\t\t\n\t\t\n\t\t";
    }
}
if ($dispAnnouncements != "") {
    echo "<p class='main' style='font-size: 18px; font-weight: bold; padding-left: 15px'>Announcements</p>";
    echo $dispAnnouncements;
    if ($dispHPNews != "") {
        echo "<br>";
    }
}
if ($dispHPNews != "") {
    echo "<p class='main' style='font-size: 18px; font-weight: bold; padding-left: 15px'>Latest News</p>";
    echo $dispHPNews;
}
echo "\n<div>\n\n<table class='formTable' style='width: 65%; margin-left: auto; margin-right: auto; border-spacing: 0px' align='center'>\n\t<tr>\n\t\t<td class='formTitle' align='center'>Members Online Statistics</td>\n\t</tr>\n\t<tr>\n\t\t<td class='main solidBox' style='border-top-width: 0px' align='center'>\n\t\t\t<b>Members Online:</b> " . $membersOnlineCount . "<br>\n\t\t\t<p>\n\t\t\t\t";
Esempio n. 10
0
 *
 * 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;
    }
}
$consoleCatID = $consoleObj->get_info("consolecategory_id");
$imageSliderInfo = $imageSliderObj->get_info_filtered();
$breadcrumbObj->popCrumb();
$breadcrumbObj->addCrumb($consoleObj->get_info_filtered("pagetitle"), $MAIN_ROOT . "members/console.php?cID=" . $cID);
$breadcrumbObj->addCrumb(parseBBCode($imageSliderInfo['name']));
$breadcrumbObj->updateBreadcrumb();
define("HPIMAGE_FORM", true);
include BASE_DIRECTORY . "members/include/news/hpimage_form.php";
$imageOrder = $imageSliderObj->findBeforeAfter();
$imageSliderObj->select($imageSliderInfo['imageslider_id']);
$arrComponents['displayorder']['before_after_value'] = $imageOrder[0];
$arrComponents['displayorder']['after_selected'] = $imageOrder[1];
$arrComponents['submit']['value'] = "Save";
$setupFormArgs['components'] = $arrComponents;
$setupFormArgs['saveType'] = "update";
$setupFormArgs['prefill'] = true;
$setupFormArgs['attributes']['action'] .= "&imgID=" . $imageSliderInfo['imageslider_id'] . "&action=edit";
$setupFormArgs['saveMessage'] = "Successfully saved home page image!";
Esempio n. 11
0
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$squadObj = new Squad($mysqli);
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $LOGIN_FAIL = false;
    $memberInfo = $member->get_info_filtered();
    $counter = 0;
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "squadinvites WHERE receiver_id = '" . $memberInfo['member_id'] . "' AND status = '0' ORDER BY datesent DESC");
    while ($row = $result->fetch_assoc()) {
        $member->select($row['sender_id']);
        $squadMemberInfo = $member->get_info_filtered();
        $squadObj->select($row['squad_id']);
        $squadInfo = $squadObj->get_info_filtered();
        if ($squadMemberInfo['avatar'] == "") {
            $squadMemberInfo['avatar'] = $MAIN_ROOT . "themes/" . $THEME . "/images/defaultavatar.png";
        } else {
            $squadMemberInfo['avatar'] = $MAIN_ROOT . $squadMemberInfo['avatar'];
        }
        if (trim($row['message']) == "") {
            $row['message'] = "None";
        }
        $squadObj->objSquadRank->select($row['startingrank_id']);
        echo "\n\t\t\t<div class='newsDiv'>\n\t\t\t\n\t\t\t\t<div class='postInfo'>\n\t\t\t\t\t<div id='newsPostAvatar' style='float: left'><img src='" . $squadMemberInfo['avatar'] . "' class='avatarImg'></div>\n\t\t\t\t\t<div id='newsPostInfo' style='float: left; margin-left: 15px'>\n\t\t\t\t\t\tFrom: " . $member->getMemberLink() . " - " . getPreciseTime($row['datesent']) . "<br>\n\t\t\t\t\t\tSquad: <b><a href='" . $MAIN_ROOT . "squads/profile.php?sID=" . $row['squad_id'] . "'>" . $squadInfo['name'] . "</a></b><br>\n\t\t\t\t\t\tStarting Rank: " . $squadObj->objSquadRank->get_info_filtered("name") . "\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style='clear: both'></div>\n\t\t\t\t</div>\n\t\t\t\t<br>\n\t\t\t\t<div class='dottedLine' style='margin-top: 5px'></div>\n\t\t\t\t<div class='postMessage'>\n\t\t\t\t\t<b>Message:</b><br><br>\n\t\t\t\t\t<div style='padding-left: 15px'>" . nl2br(parseBBCode(filterText($row['message']))) . "</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='dottedLine' style='margin-top: 5px; margin-bottom: 5px'></div>\n\t\t\t\t<p style='padding: 0px; margin: 0px' align='right'><b><a href='javascript:void(0)' onclick=\"inviteClicked('" . $row['squadinvite_id'] . "', 'accept')\">ACCEPT</a> | <a href='javascript:void(0)' onclick=\"inviteClicked('" . $row['squadinvite_id'] . "', 'decline')\">DECLINE</a></b></p>\n\t\t\t</div>\n\n\t\t";
        $counter++;
    }
    if ($counter == 0) {
        echo "\n\t\t\t<div class='shadedBox' style='width: 300px; margin-top: 50px; margin-left: auto; margin-right: auto; font-style: italic'>\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tYou currently have no squad invitiations!\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<br>\n\t\t";
    }
}
Esempio n. 12
0
 if ($pmInfo['originalpm_id'] == 0) {
     $replyID = $pmInfo['pm_id'];
     $threadID = $pmInfo['pm_id'];
 } else {
     $replyID = $pmInfo['pm_id'];
     $threadID = $pmInfo['originalpm_id'];
     $pmObj->select($threadID);
     $originalPMInfo = $pmObj->get_info_filtered();
     $member->select($originalPMInfo['receiver_id']);
     $oldPMObj->select($originalPMInfo['pm_id']);
     $dispToPrevMember = $originalPMInfo['receiver_id'] != 0 ? $member->getMemberLink() : $oldPMObj->getRecipients(true);
     $member->select($originalPMInfo['sender_id']);
     $dispFromPrevMember = $member->getMemberLink();
     $dispPreviousMessages .= "\n\t\t\t\n\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formLabel'>To:</td>\n\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t" . $dispToPrevMember . "\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 class='formLabel'>Date:</td>\n\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t" . getPreciseTime($originalPMInfo['datesent']) . "\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 class='formLabel'>From:</td>\n\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t" . $dispFromPrevMember . "\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 class='formLabel'>Subject:</td>\n\t\t\t\t\t<td class='main'>" . $originalPMInfo['subject'] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan='2'><br></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formLabel' valign='top'>Message:</td>\n\t\t\t\t\t<td class='main'>\n\t\t\t\t\t<div style='position: relative; word-wrap:break-word'>\n\t\t\t\t\t\t" . nl2br(parseBBCode($originalPMInfo['message'])) . "\n\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' class='main'>\n\t\t\t\t\t\t<div class='dottedLine' style='width: 90%; margin-top: 30px; margin-bottom: 30px'></div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\n\t\t\t\n\t\t\t";
 }
 echo "\n\t\t\n\t\t\t<div class='formDiv'>\n\t\t\t\t<p style='padding: 0px; margin: 0px; padding-right: 20px; padding-top: 10px' class='main' align='right'>\n\t\t\t\t\t<a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&folder=" . $pmFolderID . "'>Return to " . $pmFolderInfo['name'] . "</a>\n\t\t\t\t</p>\n\t\t\t\n\t\t\t\t<table class='formTable' style='margin-top: 0px; table-layout: fixed'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>To:</td>\n\t\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t\t" . $dispToMember . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>Date:</td>\n\t\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t\t" . getPreciseTime($pmInfo['datesent']) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>From:</td>\n\t\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t\t" . $dispFromMember . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>Subject:</td>\n\t\t\t\t\t\t<td class='main'>" . $pmInfo['subject'] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td colspan='2'><br></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel' valign='top'>Message:</td>\n\t\t\t\t\t\t<td class='main'>\n\t\t\t\t\t\t<div style='position: relative; word-wrap:break-word'>\n\t\t\t\t\t\t\t" . nl2br(parseBBCode($pmInfo['message'])) . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='main' colspan='2' align='center'><br>\n\t\t\t\t\t\t\t<div class='dottedLine' style='width: 75%'></div><br>\n\t\t\t\t\t\t\t<input type='button' id='replyButton' class='submitButton' value='Reply'>\n\t\t\t\t\t\t\t";
 if ($blnMultiPM) {
     echo "<input type='button' id='replyAllButton' class='submitButton' style='margin-left: 20px' value='Reply All'>";
 }
 echo "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . $dispPreviousMessages . "\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t\t\n\t\t\t</div>\n\t\t\n\t\t\t";
 $member->select($memberInfo['member_id']);
 $totalPMs = $member->countPMs();
 $totalNewPMs = $member->countPMs(true);
 if ($totalNewPMs > 0) {
     $dispPMCount = "PM Inbox <b>(" . $totalNewPMs . ")</b> <img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/pmalert.gif'>";
     $intPMCount = $totalNewPMs;
 } else {
     $dispPMCount = "PM Inbox (" . $totalPMs . ")";
     $intPMCount = $totalPMs;
 }
 echo "\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#replyButton').click(function() {\n\t\t\t\t\t\twindow.location = '" . $MAIN_ROOT . "members/privatemessages/compose.php?replyID=" . $replyID . "&threadID=" . $threadID . "';\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\$('#replyAllButton').click(function() {\n\t\t\t\t\t\twindow.location = '" . $MAIN_ROOT . "members/privatemessages/compose.php?replyID=" . $replyID . "&threadID=" . $threadID . "&replyall=1';\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\$('#pmLoggedInLink').html(\"" . $dispPMCount . "\");\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\n\t\t\t\n\t\t";
Esempio n. 13
0
foreach ($arrAllNews as $newsPostID) {
    $squadNewsObj->select($newsPostID);
    $squadNewsInfo = $squadNewsObj->get_info_filtered();
    $member->select($squadNewsInfo['member_id']);
    $newsMemberInfo = $member->get_info_filtered();
    $dispMemberLink = $member->getMemberLink();
    if ($newsMemberInfo['avatar'] == "") {
        $newsMemberInfo['avatar'] = $MAIN_ROOT . "themes/" . $THEME . "/images/defaultavatar.png";
    } else {
        $newsMemberInfo['avatar'] = $MAIN_ROOT . $newsMemberInfo['avatar'];
    }
    $dispNewsType = "<span class='publicNewsColor' style='font-style: italic'>Public News</span>";
    if ($squadNewsInfo['newstype'] == 2) {
        $dispNewsType = "<span class='privateNewsColor' style='font-style: italic'>Private News</span>";
    }
    $dispSquadNews .= "\n\t\t\n\t\t<div class='squadNewsPost'>\n\t\t\t<img src='" . $newsMemberInfo['avatar'] . "' class='avatarImg'>\n\t\t\t<div class='squadNewsInfo'>\n\t\t\t\tposted by: " . $dispMemberLink . " - " . getPreciseTime($squadNewsInfo['dateposted']) . "<br>\n\t\t\t\t<span class='squadNewsSubject'>" . $squadNewsInfo['postsubject'] . "</span><br>\n\t\t\t\t" . $dispNewsType . "\n\t\t\t</div>\n\t\t\t<div class='dottedLine' style='margin: 10px 0px; clear: both'></div>\n\t\t\t<div style='padding-left: 5px'>\n\t\t\t\t" . nl2br(parseBBCode($squadNewsInfo['newspost'])) . "\n\t\t\t</div>\n\t\t\t<div class='dottedLine' style='margin: 5px 0px'></div>\n\t\t</div>\n\t\n\t";
}
if ($dispSquadNews == "") {
    $dispSquadNews = "<p align='center' class='main'><i>No Squad News Posted!</i></p>";
}
$squadRankList = $squadObj->getRankList();
$dispSquadRanks = "";
$countRanks = 1;
foreach ($squadRankList as $squadRankID) {
    $squadObj->objSquadRank->select($squadRankID);
    $dispSquadRanks .= $countRanks . ". " . $squadObj->objSquadRank->get_info_filtered("name") . "<br>";
    $countRanks++;
}
$arrSquadMembers = array();
foreach ($squadMemberList as $realMemberID) {
    $squadMemberID = $squadObj->getSquadMemberID($realMemberID);
Esempio n. 14
0
include_once "../../../../classes/forumboard.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$rankObj = new Rank($mysqli);
$boardObj = new ForumBoard($mysqli);
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Post Topic");
$consoleObj->select($cID);
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $memberInfo = $member->get_info_filtered();
    $rankObj->select($memberInfo['rank_id']);
    $posterRankInfo = $rankObj->get_info_filtered();
    $_POST['wysiwygHTML'] = str_replace("<?", "&lt;?", $_POST['wysiwygHTML']);
    $_POST['wysiwygHTML'] = str_replace("?>", "?&gt;", $_POST['wysiwygHTML']);
    $_POST['wysiwygHTML'] = str_replace("<script", "&lt;script", $_POST['wysiwygHTML']);
    $_POST['wysiwygHTML'] = str_replace("</script>", "&lt;/script&gt;", $_POST['wysiwygHTML']);
    if ($memberInfo['avatar'] == "") {
        $memberInfo['avatar'] = $MAIN_ROOT . "themes/" . $THEME . "/images/defaultavatar.png";
    } else {
        $memberInfo['avatar'] = $MAIN_ROOT . $memberInfo['avatar'];
    }
    $dispSetAvatarWidth = "";
    $dispSetAvatarHeight = "";
    if ($websiteInfo['forum_avatarwidth'] > 0) {
        $dispSetAvatarWidth = " width: " . $websiteInfo['forum_avatarwidth'] . $websiteInfo['forum_avatarwidthunit'] . ";";
    }
    if ($websiteInfo['forum_avatarheight'] > 0) {
        $dispSetAvatarHeight = " height: " . $websiteInfo['forum_avatarheight'] . $websiteInfo['forum_avatarheightunit'] . ";";
    }
    echo "\n\t\t<div class='breadCrumbTitle'>Preview - " . filterText($_POST['previewSubject']) . "</div>\n\t\t<table class='forumTable'>\n\t\t\t<tr>\n\t\t\t\t<td class='boardPosterInfo' valign='top'>\n\t\t\t\t\t<span class='boardPosterName'>" . $member->getMemberLink() . "</span><br>\n\t\t\t\t\t" . $posterRankInfo['name'] . "<br>\n\t\t\t\t\t<img src='" . $memberInfo['avatar'] . "' style='margin-top: 5px; margin-bottom: 5px;" . $dispSetAvatarWidth . $dispSetAvatarHeight . "'><br>\n\t\t\t\t\tPosts: " . $member->countForumPosts() . "\n\t\t\t\t</td>\n\t\t\t\t<td class='boardPostInfo' valign='top'>\n\t\t\t\t<div class='postTime'>Posted " . getPreciseTime(time()) . "</div>\n\t\t\t\t\n\t\t\t\t" . parseBBCode($_POST['wysiwygHTML']) . "\n\t\t\t\t\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='boardPosterInfoFooter'></td>\n\t\t\t\t<td class='boardPostInfoFooter'></td>\n\t\t\t</tr>\n\t\t</table>\n\t";
}
Esempio n. 15
0
     $slot6 = "images/maps/nothing.png";
     $stats6 = "Empty";
     $link6 = "Slot 6";
 }
 $sb = mysql_query("SELECT * FROM `pokemon` WHERE `owner`='" . $result['name'] . "' AND `position`='box'");
 $cb = mysql_num_rows($sb);
 echo "<table width='90%' cellpadding='1' cellspacing='1' style='border: 1px solid black;' align='center'>\n<tr><td width='90%' style='border: 1px solid black;' colspan='6'>" . $result['name'] . "'s Profile</td></tr>\n<tr><td width='90%' style='border: 1px solid black;' colspan='6'><img src=\"images/sprites/" . $result['avatar'] . ".png\" alt='Avatar' /></td></tr>\n<tr><td width='90%' style='border: 1px solid black;' colspan='6'><a href=\"trade.php?select=choose&id=" . $result['id'] . "\">Trade with " . $result['name'] . "</a></td></tr>\n<tr><td width='30%' style='border: 1px solid black;' colspan='2'>User ID</td><td width='60%' colspan='4' style='border: 1px solid black;'>#" . $result['id'] . "</td></tr>\n<tr><td width='30%' style='border: 1px solid black;' colspan='2'>User Email</td><td width='60%' style='border: 1px solid black;' colspan='4'>";
 if ($result['emailopt'] == "Show") {
     echo $result['email'];
 } else {
     echo "<i>Hidden</i>";
 }
 echo "</td></tr>\n<tr><td width='30%' colspan='2' style='border: 1px solid black;'>User Rank</td><td colspan='4' width='60%' style='border: 1px solid black;'>";
 echo rank($result['rank']);
 echo "</td></tr>\n<tr><td width='90%' colspan='6' style='border: 1px solid black;'>User Signature</td></tr>\n<tr><td width='90%' colspan='6' style='border: 1px solid black;'>";
 echo parseBBCode($result['sig']);
 echo "</td></tr>\n<tr><td width='90%' colspan='6' style='border: 1px solid black;'>User's Party</td></tr>\n<tr><td width='16%' colspan='1' style='border: 1px solid black;' onmouseover=\"gettip('{$slot1}')\" onmouseout=''>" . $link1 . "</td><td width='16%' colspan='1' style='border: 1px solid black;' onmouseover=\"gettip('{$slot2}')\" onmouseout=''>" . $link2 . "</td><td width='16%' colspan='1' style='border: 1px solid black;' onmouseover=\"gettip('{$slot3}')\" onmouseout=''>" . $link3 . "</td><td width='16%' colspan='1' style='border: 1px solid black;' onmouseover=\"gettip('{$slot4}')\" onmouseout=''>" . $link4 . "</td><td width='16%' colspan='1' style='border: 1px solid black;' onmouseover=\"gettip('{$slot5}')\" onmouseout=''>" . $link5 . "</td><td width='16%' colspan='1' style='border: 1px solid black;' onmouseover=\"gettip('{$slot6}')\" onmouseout=''>" . $link6 . "</td></tr>\n<tr><td width='16%' colspan='1' style='border: 1px solid black;'>" . $stats1 . "</td><td width='16%' colspan='1' style='border: 1px solid black;'>" . $stats2 . "</td><td width='16%' colspan='1' style='border: 1px solid black;'>" . $stats3 . "</td><td width='16%' colspan='1' style='border: 1px solid black;'>" . $stats4 . "</td><td width='16%' colspan='1' style='border: 1px solid black;'>" . $stats5 . "</td><td width='16%' colspan='1' style='border: 1px solid black;'>" . $stats6 . "</td></tr>\n<tr><td width='90%' colspan='6' style='border: 1px solid black;' id='tip' height='90'><font color='red'>Mouse over one of the slots to see which pokemon is there.</font></td></tr>\n<tr><td width='100%' colspan='6' style='border: 1px solid black;'>User Box</td></tr>\n<tr><td width='100%' colspan='6' style='border: 1px solid black;'>";
 if ($cb >= "1") {
     while ($rowb = mysql_fetch_array($sb)) {
         $sdb = mysql_query("SELECT * FROM `data` WHERE `name`='" . $rowb['name'] . "'");
         $rdb = mysql_fetch_array($sdb);
         echo "<a href='battle.php?select=create&opp=";
         echo $rowb['id'];
         echo "'><img src='images/sprites/icons/";
         echo $rdb['icon'];
         echo ".gif' alt='' onmouseover=\"Tip('";
         echo $rdb['name'];
         echo " - Level: ";
         echo $rowb['level'];
         echo "')\" onmouseout='UnTip()' /></a>";
     }
Esempio n. 16
0
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$arrSquadPrivileges = $squadObj->arrSquadPrivileges;
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $LOGIN_FAIL = false;
    $memberInfo = $member->get_info_filtered();
    if ($squadObj->memberHasAccess($memberInfo['member_id'], "acceptapps")) {
        $squadInfo = $squadObj->get_info_filtered();
        $counter = 0;
        $result = $mysqli->query("SELECT * FROM " . $dbprefix . "squadapps WHERE squad_id = '" . $squadInfo['squad_id'] . "' AND status = '0' ORDER BY applydate DESC");
        while ($row = $result->fetch_assoc()) {
            $member->select($row['member_id']);
            $newMemberInfo = $member->get_info_filtered();
            $squadObj->select($row['squad_id']);
            $squadInfo = $squadObj->get_info_filtered();
            if ($newMemberInfo['avatar'] == "") {
                $newMemberInfo['avatar'] = $MAIN_ROOT . "themes/" . $THEME . "/images/defaultavatar.png";
            }
            if (trim($row['message']) == "") {
                $row['message'] = "None";
            }
            echo "\n\t\t\t<div class='newsDiv'>\n\t\t\t\t<img src='" . $newMemberInfo['avatar'] . "' class='avatarImg'>\n\t\t\t\t<div class='postInfo'>\n\t\t\t\t\tFrom: " . $member->getMemberLink() . " - " . getPreciseTime($row['applydate']) . "<br>\n\t\t\t\t</div>\n\t\t\t\t<br>\n\t\t\t\t<div class='dottedLine' style='margin-top: 5px'></div>\n\t\t\t\t<div class='postMessage'>\n\t\t\t\t\t<b>Message:</b><br><br>\n\t\t\t\t\t<div style='padding-left: 15px'>" . nl2br(parseBBCode(filterText($row['message']))) . "</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='dottedLine' style='margin-top: 5px; margin-bottom: 5px'></div>\n\t\t\t\t<p style='padding: 0px; margin: 0px' align='right'><b><a href='javascript:void(0)' onclick=\"decisionClicked('" . $row['squadapp_id'] . "', 'accept')\">APPROVE</a> | <a href='javascript:void(0)' onclick=\"decisionClicked('" . $row['squadapp_id'] . "', 'decline')\">DECLINE</a></b></p>\n\t\t\t</div>\n\n\t\t\t";
            $counter++;
        }
        if ($counter == 0) {
            echo "\n\t\t\t<div class='shadedBox' style='width: 300px; margin-top: 50px; margin-left: auto; margin-right: auto; font-style: italic'>\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tThere are currently no pending squad applications!\n\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t<br>\n\t\t\t";
        }
    }
}
Esempio n. 17
0
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";
}
echo "<div class='forumManageLinks'>";
if ($this->blnManageable || $postMemberInfo['member_id'] == $memberInfo['member_id']) {
    echo "&raquo; <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $intManagePostsCID . "&pID=" . $postInfo['forumpost_id'] . "'>EDIT POST</a> &laquo;&nbsp&nbsp;&nbsp;";
    echo "&raquo; <a href='javascript:void(0)' onclick=\"deletePost('" . $postInfo['forumpost_id'] . "')\">DELETE POST</a> &laquo;&nbsp&nbsp;&nbsp;";
    $countManagablePosts++;
}
if (LOGGED_IN && $topicInfo['lockstatus'] == 0) {
    echo "&raquo; <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $intPostTopicCID . "&bID=" . $topicInfo['forumboard_id'] . "&tID=" . $topicInfo['forumtopic_id'] . "&quote=" . $postInfo['forumpost_id'] . "'>QUOTE</a> &laquo;";
}
echo "\n\t\t\t</div>\n\t\t\t</div>\n\t\t</div>";
Esempio n. 18
0
function displayDonationMenuModule()
{
    $menuItemInfo = $GLOBALS['menu_item_info'];
    if ($menuItemInfo['itemtype'] != "donation") {
        return false;
    }
    global $mysqli;
    if (!class_exists("DonationCampaign")) {
        include BASE_DIRECTORY . "plugins/donations/classes/campaign.php";
    }
    $campaignObj = new DonationCampaign($mysqli);
    $donationObj = new btPlugin($mysqli);
    if ($campaignObj->select($menuItemInfo['itemtype_id']) && $donationObj->selectByName("Donations")) {
        $progressBarColor = $donationObj->getConfigInfo("goalprogresscolor");
        $progressBarBackColor = $donationObj->getConfigInfo("goalprogressbackcolor");
        $campaignInfo = $campaignObj->get_info_filtered();
        $campaignDesc = $campaignObj->get_info("description");
        $dispCampaignDesc = substr($campaignDesc, 0, 100);
        $dispCampaignDesc = $campaignDesc != $dispCampaignDesc ? $dispCampaignDesc . "..." : $dispCampaignDesc;
        $dispCampaignDesc = nl2br(parseBBCode(filterText($dispCampaignDesc)));
        $daysLeft = "";
        if ($campaignInfo['dateend'] != 0 || $campaignInfo['dateend'] == 0 && $campaignInfo['currentperiod'] != 0) {
            $daysLeft = $campaignObj->getDaysLeft();
        }
        $dispGoal = "";
        if ($campaignInfo['goalamount'] > 0) {
            // Graph
            $goalCompletePercent = round($campaignObj->getTotalDonationAmount() / $campaignInfo['goalamount'] * 100);
            $goalCompletePercent = $goalCompletePercent > 100 ? "100%" : $goalCompletePercent . "%";
            $dispGoal = " of " . $campaignObj->formatAmount($campaignInfo['goalamount'], 2) . " goal";
            $dispProgressBar = "\n\t\t\t\t\t<div class='donationProgressContainer' style='background-color: " . $progressBarBackColor . "'>\n\t\t\t\t\t\t<div style='width: " . $goalCompletePercent . "; background-color: " . $progressBarColor . "'></div>\n\t\t\t\t\t</div>\n\t\t\t\t";
        }
        $donationsInfo = $campaignObj->getDonationInfo();
        $totalDonations = count($donationsInfo);
        $donationsFormatted = $campaignObj->formatAmount($campaignObj->getTotalDonationAmount());
        $currentEndDate = $campaignObj->getCurrentEndDate();
        $dispEndingDate = "";
        if ($currentEndDate != 0) {
            $dispExclaimation = $daysLeft < 3 ? "!" : "";
            $dispEndingDate = "<div class='donateMenuItemStat'><b>" . $campaignObj->getFormattedEndDate() . " left" . $dispExclaimation . "</b></div>";
        }
        echo "\n\t\t\t\n\t\t\t\t<div class='donateMenuItemContainer'>\n\t\t\t\t\t<div class='donateMenuItemTitle'><a href='" . $campaignObj->getLink() . "'>" . $campaignInfo['title'] . "</a></div>\n\t\t\t\t\t<div class='donateMenuItemDesc main'>\n\t\t\t\t\t\t" . $dispCampaignDesc . "\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\t<a href='" . $campaignObj->getLink() . "'><input type='button' value='Donate!' class='submitButton'></a>\n\t\t\t\t\t</p>\n\t\t\t\t\t<div class='donateMenuItemStatsDiv main'>" . $dispProgressBar . "\n\t\t\t\t\t\t<div class='donateMenuItemStat'><b>" . $donationsFormatted . "</b><br>raised" . $dispGoal . "</div>\n\t\t\t\t\t\t" . $dispEndingDate . "\n\t\t\t\t\t\t<div style='clear: both'></div>\n\t\t\t\t\t</div>\n\t\t\t";
        if (count($donationsInfo) > 0) {
            echo "<p class='donateMenuItemTitle'><b>Latest Donators:</b></p>";
            $campaignObj->showDonatorList(false, 2);
        }
        echo "\n\t\t\t\t</div>\n\t\t\t\n\t\t\t";
    }
}
Esempio n. 19
0
function parseString($str)
{
    $str = str_replace(array("[br]", "[br /]"), array("<br>", "<br />"), $str);
    $str = parseBBCode($str);
    return $str;
}
Esempio n. 20
0
    $arrMessageComments = $eventObj->objEventMessage->getComments(" ORDER BY dateposted ASC");
    foreach ($arrMessageComments as $commentID) {
        if ($eventObj->objEventMessageComment->select($commentID) && $objMember->select($row['member_id'])) {
            $commentInfo = $eventObj->objEventMessageComment->get_info_filtered();
            $objMember->select($commentInfo['member_id']);
            $memInfo = $objMember->get_info_filtered();
            if ($memInfo['profilepic'] == "") {
                $dispProfilePic = $MAIN_ROOT . "themes/" . $THEME . "/images/defaultprofile.png";
            } else {
                $dispProfilePic = $MAIN_ROOT . $memInfo['profilepic'];
            }
            $dispDeleteMessage = "";
            if ($eventObj->memberHasAccess($memberInfo['member_id'], "managemessages")) {
                $dispDeleteMessage = " - <a href='javascript:void(0)' onclick=\"deleteMessage('" . $commentID . "', 'c')\">Delete</a>";
            }
            echo "\n\n\t\t\t<li class='dottedLine'>\n\t\t\t\t<div class='profilePic'><img src='" . $dispProfilePic . "'></div>\n\t\t\t\t<div class='main messageDiv'><b>" . $objMember->getMemberLink() . "</b><br>\n\t\t\t\t\t" . nl2br(parseBBCode($commentInfo['comment'])) . "<br>\n\t\t\t\t\t<div class='tinyFont' style='margin-top: 5px'>" . getPreciseTime($commentInfo['dateposted']) . $dispDeleteMessage . "</div>\n\t\t\t\t</div>\n\t\t\t\t<div style='clear: both'></div>\n\t\t\t</li>\n\n\t\t\t";
        }
    }
    echo "\n\t</ul>\n\t</li>\n\t";
    if ($eventObj->memberHasAccess($memberInfo['member_id'], "postmessages")) {
        $tempTextAreaID = "txtComment_" . $row['eventmessage_id'];
        $dispComment = "";
        if ($_POST['commentBox'][$tempTextAreaID] != "") {
            $dispComment = filterText($_POST['commentBox'][$tempTextAreaID]);
            $focusID = "#" . $tempTextAreaID;
        }
        echo "\n\t\t<li class='dashedLine'>\n\t\tComment:<br>\n\t\n\t\t<textarea id='txtComment_" . $row['eventmessage_id'] . "' class='textBox'>" . $dispComment . "</textarea>\n\t\t<p align='right' style='margin-top: 2px; margin-right: 3px;'><input type='button' onclick=\"postComment('" . $row['eventmessage_id'] . "')\" class='submitButton' value='Comment' style='width: 80px'></p>\n\t\n\t\t</li>\n\t\t";
    } else {
        echo "<li class='dashedLine'></li>";
    }
}
<?php

if (!defined("MAIN_ROOT")) {
    exit;
}
$donationMember = new Member($mysqli);
$dispMemberName = $donationMember->select($donationInfo['member_id']) ? $donationMember->getMemberLink() : "";
$dispName = $donationInfo['name'];
if ($donationInfo['name'] == "" && $dispMemberName == "") {
    $dispName = "Anonymous";
} elseif ($donationInfo['name'] != "" && $dispMemberName != "") {
    $dispName = $dispMemberName . " <i>(" . $donationInfo['name'] . ")</i>";
}
$dispMessage = $donationInfo['message'] == "" ? "None" : nl2br(parseBBCode($donationInfo['message']));
$i = 0;
$arrComponents = array("campaign" => array("type" => "custom", "html" => "<div class='formInput main'><a href='" . $campaignObj->getLink() . "'>" . $campaignInfo['title'] . "</a></div>", "sortorder" => $i++, "display_name" => "Campaign"), "datesent" => array("type" => "custom", "html" => "<div class='formInput main'>" . getPreciseTime($donationInfo['datesent']) . "</div>", "sortorder" => $i++, "display_name" => "Date Sent"), "paypalid" => array("type" => "custom", "html" => "<div class='formInput main'>" . $donationInfo['transaction_id'] . "</div>", "sortorder" => $i++, "display_name" => "PayPal Transaction ID"), "amount" => array("type" => "custom", "html" => "<div class='formInput main'>" . $campaignObj->formatAmount($donationInfo['amount']) . "</div>", "sortorder" => $i++, "display_name" => "Amount"), "donationfrom" => array("type" => "custom", "html" => "<div class='formInput main'>" . $dispName . "</div>", "sortorder" => $i++, "display_name" => "Donated From"), "message" => array("type" => "custom", "html" => "<div class='formInput main'>" . $dispMessage . "</div><br>", "sortorder" => $i++, "display_name" => "Message"));
$setupFormArgs = array("name" => "console-" . $cID . "-donationdetails-" . $donationInfo['donation_id'], "components" => $arrComponents);
Esempio n. 22
0
<?php

if (!defined("MAIN_ROOT")) {
    exit;
}
?>

<div class='donationMessage dottedLine<?php 
echo $css;
?>
'>

	<div class='donationMessagePic'>
	
		<?php 
echo $member->getProfilePic();
?>
	
	</div>

	<div class='donationMessageText'>
	
		<?php 
echo nl2br(parseBBCode($donationInfo['message'])) . "\n\t\t\t\n\t\t\t\t<br><br>\n\t\t\t\t\n\t\t\t\t<div class='tinyFont'><span class='donatorAmount'>" . $this->formatAmount($donationInfo['amount']) . "</span> donated by " . $dispDonatorName . "\n\t\t\t\t<br>\n\t\t\t\t" . getPreciseTime($donationInfo['datesent']) . "</div>\n\t\t\t\n\t\t\t";
?>
	
	</div>

</div>
Esempio n. 23
0
$breadcrumbObj->setTitle($downloadCatInfo['name']);
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
$breadcrumbObj->addCrumb("Downloads: " . $downloadCatInfo['name']);
include $prevFolder . "include/breadcrumb.php";
$posterMemberObj = new Member($mysqli);
$arrDownloads = $downloadCatObj->getAssociateIDs("ORDER BY dateuploaded DESC");
foreach ($arrDownloads as $dlID) {
    $downloadObj->select($dlID);
    $downloadInfo = $downloadObj->get_info_filtered();
    $posterMemberObj->select($downloadInfo['member_id']);
    $posterInfo = $posterMemberObj->get_info_filtered();
    if ($posterInfo['avatar'] == "") {
        $posterInfo['avatar'] = $MAIN_ROOT . "themes/" . $THEME . "/images/defaultavatar.png";
    } else {
        $posterInfo['avatar'] = $MAIN_ROOT . $posterInfo['avatar'];
    }
    $dispFileSize = $downloadInfo['filesize'] / 1024;
    if ($dispFileSize < 1) {
        $dispFileSize = $downloadInfo['filesize'] . "B";
    } elseif ($dispFileSize / 1024 < 1) {
        $dispFileSize = round($dispFileSize, 2) . "KB";
    } else {
        $dispFileSize = round($dispFileSize / 1024, 2) . "MB";
    }
    $addS = $downloadInfo['downloadcount'] == 1 ? "" : "s";
    echo "\n\t\t<div class='downloadDiv'>\n\t\t\t\t\t\n\t\t<div class='downloadInfo'>\n\t\t\t<div style='float: left'><img src='" . $posterInfo['avatar'] . "' class='avatarImg'></div>\n\t\t\t<div style='float: left; margin-left: 15px'>posted by " . $posterMemberObj->getMemberLink() . " - " . getPreciseTime($downloadInfo['dateuploaded']) . " - downloaded " . $downloadInfo['downloadcount'] . " time" . $addS . "<br>\n\t\t\t<span class='nameText'>" . $downloadInfo['name'] . "</span></div>\n\t\t\t<div style='clear: both'></div>\n\t\t</div>\n\t\t<br>\n\t\t<div class='dottedLine' style='margin-top: 5px'></div>\n\t\t<div class='downloadDescription'>\n\t\t\tFile Name: " . $downloadInfo['filename'] . "<br>\n\t\t\tFile Size: " . $dispFileSize . "<br><br>\n\t\t\t" . nl2br(parseBBCode($downloadInfo['description'])) . "\n\t\t</div>\n\t\t<div class='dottedLine' style='margin-top: 5px; margin-bottom: 5px'></div>\n\t\t<p style='padding: 0px; margin: 0px' align='right'><b><a href='" . $MAIN_ROOT . "downloads/file.php?dID=" . $downloadInfo['download_id'] . "'>Download</a></b></p>\n\t</div>\n\t";
}
if (count($arrDownloads) == 0) {
    echo "<div class='shadedBox' style='width: 50%; margin: 20px auto'><p align='center' class='main'><i>No downloads added to " . $downloadCatInfo['name'] . " yet!</i></p></div>";
}
include $prevFolder . "themes/" . $THEME . "/_footer.php";