public function getNewNotificationAction()
 {
     global $TNB_GLOBALS, $db;
     $data = $_POST;
     $token = isset($data['TOKEN']) ? trim($data['TOKEN']) : null;
     if (!$token) {
         return ['STATUS_CODE' => STATUS_CODE_BAD_REQUEST, 'DATA' => buckys_api_get_error_result('Api token should not be blank')];
     }
     if (!($userID = BuckysUsersToken::checkTokenValidity($token, "api"))) {
         return ['STATUS_CODE' => STATUS_CODE_UNAUTHORIZED, 'DATA' => buckys_api_get_error_result('Api token is not valid.')];
     }
     $notifications = BuckysActivity::getAppNotifications($userID, $data['page']);
     $results = [];
     foreach ($notifications as $row) {
         $item = [];
         $item['postID'] = $row['postID'];
         $item['userID'] = $row['userID'];
         $query = $db->prepare("SELECT\n                                u.firstName, \n                                u.lastName, \n                                u.userID, \n                                u.thumbnail, \n                                u.current_city, \n                                u.current_city_visibility,\n                                f.friendID \n                          FROM \n                                " . TABLE_USERS . " AS u\n                          LEFT JOIN " . TABLE_FRIENDS . " AS f ON f.userID=%d AND f.userFriendID=u.userID AND f.status='1'\n                          WHERE u.userID=%d", $userID, $item['userID']);
         $data = $db->getRow($query);
         $item['userName'] = $data['firstName'] . " " . $data['lastName'];
         $item['comment_content'] = $row['comment_content'];
         $item['userThumbnail'] = THENEWBOSTON_SITE_URL . BuckysUser::getProfileIcon($data);
         $item['type'] = $row['type'];
         $item['activityType'] = $row['activityType'];
         $item['post_date'] = buckys_api_format_date($userID, $row['post_date']);
         $item['isNew'] = $row['isNew'];
         $results[] = $item;
     }
     return ['STATUS_CODE' => STATUS_CODE_OK, 'DATA' => ["STATUS" => "SUCCESS", "RESULT" => $results]];
 }
 public function getListAction()
 {
     $request = $_GET;
     $token = isset($request['TOKEN']) ? trim($request['TOKEN']) : null;
     $lastDate = isset($request['lastDate']) ? $request['lastDate'] : null;
     if (!$token) {
         return ['STATUS_CODE' => STATUS_CODE_BAD_REQUEST, 'DATA' => buckys_api_get_error_result('Api token should not be blank')];
     }
     if (!($userID = BuckysUsersToken::checkTokenValidity($token, "api"))) {
         return ['STATUS_CODE' => STATUS_CODE_UNAUTHORIZED, 'DATA' => buckys_api_get_error_result('Api token is not valid.')];
     }
     $stream = BuckysPost::getUserPostsStream($userID, $lastDate);
     //Format Result Data
     $result = [];
     foreach ($stream as $post) {
         if ($post['pageID'] != BuckysPost::INDEPENDENT_POST_PAGE_ID) {
             $pageIns = new BuckysPage();
             $pageData = $pageIns->getPageByID($post['pageID']);
         }
         $pagePostFlag = false;
         if (isset($pageData)) {
             $pagePostFlag = true;
         }
         $item = [];
         $item['articleId'] = $post['postID'];
         $item['posterId'] = $post['poster'];
         $item['articleImage'] = "";
         $item['articleVideo'] = "";
         $item['articleVideoId'] = "";
         if ($pagePostFlag) {
             $item['posterName'] = $pageData['title'];
             $item['posterThumbnail'] = buckys_not_null($pageData['logo']) ? THENEWBOSTON_SITE_URL . DIR_WS_PHOTO . "users/" . $pageData['userID'] . "/resized/" . $pageData['logo'] : THENEWBOSTON_SITE_URL . DIR_WS_IMAGE . "newPagePlaceholder.jpg";
         } else {
             $item['posterName'] = $post['posterFullName'];
             $item['posterThumbnail'] = THENEWBOSTON_SITE_URL . BuckysUser::getProfileIcon($post['poster']);
         }
         $item['postedDate'] = buckys_api_format_date($userID, $post['post_date']);
         $item['purePostedDate'] = $post['post_date'];
         $item['articleContent'] = $post['content'];
         if ($post['type'] == 'video') {
             $item['articleVideo'] = $post['youtube_url'];
             $item['articleVideoId'] = buckys_get_youtube_video_id($post['youtube_url']);
         } else {
             if ($post['type'] == 'image') {
                 $item['articleImage'] = THENEWBOSTON_SITE_URL . DIR_WS_PHOTO . 'users/' . $post['poster'] . '/resized/' . $post['image'];
             }
         }
         $item['articleLikes'] = $post['likes'];
         $item['articleComments'] = $post['comments'];
         $item['isLiked'] = !$post['likeID'] ? "no" : "yes";
         $result[] = $item;
     }
     return ['STATUS_CODE' => STATUS_CODE_OK, 'DATA' => ["STATUS" => "SUCCESS", "RESULT" => $result]];
 }
 public function getFriendListAction()
 {
     global $TNB_GLOBALS, $db;
     $data = $_POST;
     $keyword = isset($data['keyword']) ? $data['keyword'] : null;
     $token = isset($data['TOKEN']) ? trim($data['TOKEN']) : null;
     $sort = "pop";
     $page = isset($data['page']) ? $data['page'] : null;
     if (!$token) {
         return ['STATUS_CODE' => STATUS_CODE_BAD_REQUEST, 'DATA' => buckys_api_get_error_result('Api token should not be blank')];
     }
     if (!($userID = BuckysUsersToken::checkTokenValidity($token, "api"))) {
         return ['STATUS_CODE' => STATUS_CODE_UNAUTHORIZED, 'DATA' => buckys_api_get_error_result('Api token is not valid.')];
     }
     //Search Results
     $searchIns = new BuckysSearch();
     $pageIns = new BuckysPage();
     $pageFollowerIns = new BuckysPageFollower();
     $db_results = $searchIns->search($keyword, BuckysSearch::SEARCH_TYPE_USER_AND_PAGE, $sort, $page);
     $results = [];
     foreach ($db_results as $item) {
         if ($item['type'] == "user") {
             //Getting Detail Information
             $query = $db->prepare("SELECT \n                                u.firstName, \n                                u.lastName, \n                                u.userID, \n                                u.thumbnail, \n                                u.current_city, \n                                u.current_city_visibility,\n                                f.friendID \n                          FROM \n                                " . TABLE_USERS . " AS u\n                          LEFT JOIN " . TABLE_FRIENDS . " AS f ON f.userID=%d AND f.userFriendID=u.userID AND f.status='1'\n                          WHERE u.userID=%d", $userID, $item['userID']);
             $data = $db->getRow($query);
             if ($data['friendID']) {
                 $row = [];
                 $row['id'] = $item['userID'];
                 $row['name'] = $data['firstName'] . " " . $data['lastName'];
                 $row['description'] = $data['current_city_visibility'] ? $data['current_city'] : "";
                 $row['friendType'] = "user";
                 $row['thumbnail'] = THENEWBOSTON_SITE_URL . BuckysUser::getProfileIcon($data);
                 $results[] = $row;
             }
         }
     }
     return ['STATUS_CODE' => STATUS_CODE_OK, 'DATA' => ["STATUS" => "SUCCESS", "RESULT" => $results]];
 }
 public function getPendingAction()
 {
     $request = $_GET;
     $token = isset($request['TOKEN']) ? trim($request['TOKEN']) : null;
     if (!$token) {
         return ['STATUS_CODE' => STATUS_CODE_BAD_REQUEST, 'DATA' => buckys_api_get_error_result('Api token should not be blank')];
     }
     if (!($userID = BuckysUsersToken::checkTokenValidity($token, "api"))) {
         return ['STATUS_CODE' => STATUS_CODE_UNAUTHORIZED, 'DATA' => buckys_api_get_error_result('Api token is not valid.')];
     }
     $friends = BuckysFriend::getPendingRequests($userID);
     $results = [];
     foreach ($friends as $row) {
         $item = [];
         $item['id'] = $row['userID'];
         $item['name'] = $row['fullName'];
         $item['thumbnail'] = THENEWBOSTON_SITE_URL . BuckysUser::getProfileIcon($row['userID']);
         $item['description'] = $row['city'];
         $item['friendType'] = $row['status'];
         $results[] = $item;
     }
     return ['STATUS_CODE' => STATUS_CODE_OK, 'DATA' => ["STATUS" => "SUCCESS", "RESULT" => $results]];
 }
Ejemplo n.º 5
0
                                    <div class="i-title"><?php 
        echo $itemTitle;
        ?>
</div>
                                </div>
                                <div class="clear"></div>
                            </td>
                            <td>

                                <div class="f-user-image">
                                    <a href="/profile.php?user=<?php 
        echo $theirID;
        ?>
" class="profileLink"> <img
                                            src="<?php 
        echo BuckysUser::getProfileIcon($theirID);
        ?>
" class="postIcons"/>
                                    </a>
                                </div>
                                <div class="f-user-desc">
                                    <a href="/profile.php?user=<?php 
        echo $theirID;
        ?>
" class="profileLink">
                                        <span><?php 
        echo trim($theirInfo['firstName'] . ' ' . $theirInfo['lastName']);
        ?>
</span>
                                    </a> <br/>
                                    <?php 
Ejemplo n.º 6
0
function render_single_comment($comment, $userID = null, $isReturn = false)
{
    global $BUCKYS_GLOBALS;
    $timeOffset = 0;
    if (buckys_not_null($userID)) {
        $userInfo = BuckysUser::getUserBasicInfo($userID);
        $timeOffset = $BUCKYS_GLOBALS['timezone'][$userInfo['timezone']];
    }
    ob_start();
    ?>
    <div class="comment-item">                 
        <a href="/profile.php?user=<?php 
    echo $comment['commenter'];
    ?>
" class="thumb"><img src="<?php 
    echo BuckysUser::getProfileIcon($comment['commenter']);
    ?>
" class="replyToPostIcons" /></a>
        <div class="comment-content">
            <a href="/profile.php?user=<?php 
    echo $comment['commenter'];
    ?>
" style="font-weight:bold"><?php 
    echo $comment['fullName'];
    ?>
</a>
            <br/>
            <?php 
    echo $comment['content'];
    ?>
            <br/>
            <span style=" color:#999999; "><?php 
    echo buckys_format_date($comment['posted_date']);
    ?>
</span> 
            
            <?php 
    if ($comment['commenter'] == $userID || $comment['poster'] == $userID) {
        ?>
            &middot;
            <a href="/comments.php?action=delete-comment&userID=<?php 
        echo $userID;
        ?>
&commentID=<?php 
        echo $comment['commentID'];
        ?>
&postID=<?php 
        echo $comment['postID'];
        ?>
" class="remove-comment-link">Delete</a>
            <?php 
    }
    if (buckys_not_null($userID) && !$comment['reportID'] && ($comment['commenter'] != $userID && $comment['poster'] != $userID)) {
        ?>
            &middot; <a href="/report_object.php" data-type="comment" data-id="<?php 
        echo $comment['commentID'];
        ?>
" data-idHash="<?php 
        echo buckys_encrypt_id($comment['commentID']);
        ?>
" class="report-link" style="color:#999999;">Report</a>
            <?php 
    }
    ?>
        </div>        
    </div>
    <?php 
    $html = ob_get_contents();
    ob_end_clean();
    if (!$isReturn) {
        echo $html;
    } else {
        return $html;
    }
}
Ejemplo n.º 7
0
    ?>
>Highest Rated</a>
                            </div>
                        </td>
                    </tr>
                    <?php 
    foreach ($replies as $row) {
        ?>
                    <tr class="reply-tr">
                        <td>
                            <a href='/profile.php?user=<?php 
        echo $row['creatorID'];
        ?>
'>
                                <img class="profileIcon" src="<?php 
        echo BuckysUser::getProfileIcon(array('thumbnail' => $row['thumbnail'], 'userID' => $row['creatorID']));
        ?>
" />
                            </a>
                        </td>
                        <td class="post-content">
                            <a style="font-weight:bold;" href='/profile.php?user=<?php 
        echo $row['creatorID'];
        ?>
'>
                                <?php 
        echo $row['creatorName'];
        ?>
                            </a>
							<br/>
                            <div>
Ejemplo n.º 8
0
    ?>
"></a>
						<!-- <a href="#" class="thumb-down" data-id="<?php 
    echo $row['candidateID'];
    ?>
" data-hashed="<?php 
    echo buckys_encrypt_id($row['candidateID']);
    ?>
"></a> -->
                        <div class="loading-wrapper"></div>
                    </div>
                    <a href="/profile.php?user=<?php 
    echo $row['userID'];
    ?>
"><img src="<?php 
    echo BuckysUser::getProfileIcon($row);
    ?>
" class="candidateImg" /></a>
                    <div class="candidate-detail">
                        <a style="font-weight:bold;" href="/profile.php?user=<?php 
    echo $row['userID'];
    ?>
"><?php 
    echo $row['firstName'] . " " . $row['lastName'];
    ?>
</a>
                        <p><?php 
    echo $row['candidateText'];
    ?>
</p>
                        <?php 
Ejemplo n.º 9
0
        ?>
                        Posts on <?php 
        echo $userData['firstName'];
        ?>
's Profile
                    <?php 
    }
    ?>

                </h3>
                <a href="/profile.php?user=<?php 
    echo $userID;
    ?>
"><img
                        src="<?php 
    echo BuckysUser::getProfileIcon($userID);
    ?>
" class="postIcons"/></a>

                <div class="new-post-row">
                    <form method="post" id="newpostform" action="/manage_post.php">
                        <div id="new-post-nav">
                            <a href="#" class="post-text selected">Text</a> <span>|</span> <a href="#"
                                class="post-image">Photo</a> <span>|</span> <a href="#" class="post-video">Video</a>
                        </div>
                        <textarea name="content" class="newPost" placeholder="Create a new post..."></textarea>

                        <div id="new-video-url">
                            <label style="font-weight:bold;font-size:11px;" for="video-url">YouTube URL:</label> <input
                                type="text" name="youtube_url" id="youtube_url" class="input" value=""/></div>
                        <div class='privacy-row'>
Ejemplo n.º 10
0
?>
                <?php 
render_report_link($productData['productID'], 'shop_item', $productData['userID'], $userID, $productData['reportID']);
?>
            </div>

        </div>

        <div class="shop-view-owner">
            <div><span class="titles">Owner Information</span></div>
            <a href="/profile.php?user=<?php 
echo $productData['userID'];
?>
" class="profileLink"> <img
                    src="<?php 
echo BuckysUser::getProfileIcon($productData['userID']);
?>
" class="postIcons"/> <span
                    style="font-weight:bold;"><?php 
echo trim($productData['userInfo']['firstName'] . ' ' . $productData['userInfo']['lastName']);
?>
</span>
            </a>

            <div>
                <?php 
if (is_numeric($totalRating)) {
    echo sprintf('<a href="%s" class="rating">(%d ratings)</a> %s', '/feedback.php?user='******'userID'], $totalRating, $positiveRating);
} else {
    echo sprintf('(%s ratings)', $totalRating);
}
 public function getMessageInfoAction()
 {
     $request = $_GET;
     $token = isset($request['TOKEN']) ? trim($request['TOKEN']) : null;
     $messageId = isset($request['messageID']) ? trim($request['messageID']) : null;
     $messageType = isset($request['messageType']) ? trim($request['messageType']) : null;
     if (!$token) {
         return ['STATUS_CODE' => STATUS_CODE_BAD_REQUEST, 'DATA' => buckys_api_get_error_result('Api token should not be blank')];
     }
     if (!($userID = BuckysUsersToken::checkTokenValidity($token, "api"))) {
         return ['STATUS_CODE' => STATUS_CODE_UNAUTHORIZED, 'DATA' => buckys_api_get_error_result('Api token is not valid.')];
     }
     BuckysMessage::changeMessageStatus($messageId);
     $row = BuckysMessage::getMessageById($messageId);
     if (empty($row)) {
         return ['STATUS_CODE' => STATUS_CODE_UNAUTHORIZED, 'DATA' => buckys_api_get_error_result('No record found.')];
     }
     $results = [];
     $results['messageID'] = $row['messageID'];
     $results['body'] = $row['body'];
     $results['subject'] = $row['subject'];
     $results['status'] = $row['status'];
     $results['type'] = $messageType;
     $results['sender'] = $row['sender'];
     $results['senderName'] = $row['senderName'];
     $results['senderThumbnail'] = THENEWBOSTON_SITE_URL . BuckysUser::getProfileIcon($row['sender']);
     $results['receiver'] = $row['receiver'];
     $results['receiverName'] = $row['receiverName'];
     $results['receiverThumbnail'] = THENEWBOSTON_SITE_URL . BuckysUser::getProfileIcon($row['receiver']);
     $results['created_date'] = buckys_api_format_date($userID, $row['created_date']);
     $results['nextId'] = BuckysMessage::getNextID($userID, $messageId, $messageType);
     $results['prevId'] = BuckysMessage::getPrevID($userID, $messageId, $messageType);
     return ['STATUS_CODE' => STATUS_CODE_OK, 'DATA' => ["STATUS" => "SUCCESS", "RESULT" => $results]];
 }
 /**
  * Get Messenger Messages HTMl
  * 
  * @param Int $userID
  * @param Int $buddyID
  * @param String $type: 'new', 'old', 'all'
  */
 public function getMessagesHTML($userID, $buddyID, $type = 'new')
 {
     global $db;
     $rows = BuckysPrivateMessenger::getMessages($userID, $buddyID, $type);
     $html = '';
     $userData = BuckysUser::getUserBasicInfo($userID);
     foreach ($rows as $row) {
         $html .= '<div class="single_private_message">
                     <img src="' . BuckysUser::getProfileIcon($row['messageType'] == 1 ? $row : $userData) . '" />
                     <div class="private_message_text"><span class="username">' . ($row['messageType'] == 1 ? $row['fullName'] : $userData['firstName'] . ' ' . $userData['lastName']) . '</span>' . $row['message'] . ' <span class="date">' . BuckysPrivateMessenger::formatDate(strtotime($row['createdDate'])) . '</span></div>
                   </div>';
     }
     return $html;
 }
Ejemplo n.º 13
0
                    <div class="">This item has been traded.</div>
                <?php 
}
?>
            </div>

        </div>

        <div class="trade-view-owner">
            <div><span class="titles">Owner Information</span></div>
            <a href="/profile.php?user=<?php 
echo $itemData['userID'];
?>
" class="profileLink"> <img
                    src="<?php 
echo BuckysUser::getProfileIcon($itemData['userID']);
?>
" class="postIcons"/> <span
                    style="font-weight:bold;"><?php 
echo trim($itemData['userInfo']['firstName'] . ' ' . $itemData['userInfo']['lastName']);
?>
</span>
            </a>

            <div>
                <?php 
if (is_numeric($totalRating)) {
    echo sprintf('<a href="%s" class="rating">(%d ratings)</a> %s', '/feedback.php?user='******'(%s ratings)', $totalRating);
}
 public function getFriendsAction()
 {
     $data = $_POST;
     $token = isset($data['TOKEN']) ? trim($data['TOKEN']) : null;
     $page = isset($data['page']) ? $data['page'] : 1;
     $profileID = isset($data['profileId']) ? $data['profileId'] : null;
     if (!$token) {
         return ['STATUS_CODE' => STATUS_CODE_BAD_REQUEST, 'DATA' => buckys_api_get_error_result('Api token should not be blank')];
     }
     if (!($userID = BuckysUsersToken::checkTokenValidity($token, "api"))) {
         return ['STATUS_CODE' => STATUS_CODE_UNAUTHORIZED, 'DATA' => buckys_api_get_error_result('Api token is not valid.')];
     }
     $userData = BuckysUser::getUserData($profileID);
     if (!buckys_not_null($profileID) || !buckys_not_null($userData) || !BuckysUser::checkUserID($profileID, true)) {
         return ['STATUS_CODE' => STATUS_CODE_OK, 'DATA' => buckys_api_get_error_result(MSG_INVALID_REQUEST)];
     }
     $canViewPrivate = $userID == $profileID || BuckysFriend::isFriend($userID, $profileID) || BuckysFriend::isSentFriendRequest($profileID, $userID);
     //Getting Photos
     //Get Friends
     $friends = BuckysFriend::getAllFriends($profileID, $page, BuckysFriend::$COUNT_PER_PAGE);
     $resultFriends = [];
     foreach ($friends as $data) {
         $row['id'] = $data['userID'];
         $row['name'] = $data['firstName'] . " " . $data['lastName'];
         $row['description'] = $data['current_city_visibility'] ? $data['current_city'] : "";
         $row['friendType'] = BuckysFriend::getRelationType($userID, $data['userID']);
         $row['thumbnail'] = THENEWBOSTON_SITE_URL . BuckysUser::getProfileIcon($data);
         $resultFriends[] = $row;
     }
     return ['STATUS_CODE' => STATUS_CODE_OK, 'DATA' => ["STATUS" => "SUCCESS", "FRIENDS" => $resultFriends]];
 }
Ejemplo n.º 15
0
function render_footer_link_content($type, $data, $outFlag = true)
{
    $userID = buckys_is_logged_in();
    ob_start();
    switch ($type) {
        case 'my':
            foreach ($data as $row) {
                echo BuckysActivity::getActivityHTML($row, $userID);
            }
            echo '<a class="view-detail-links" href="/account.php">View All Notifications</a>';
            break;
        case 'friend':
            $count = 0;
            foreach ($data as $row) {
                $count++;
                if ($count > 5) {
                    break;
                }
                ?>
                <div class="activityComment">
                    <a href="/profile.php?user=<?php 
                echo $row['userID'];
                ?>
"><img
                            src="<?php 
                echo BuckysUser::getProfileIcon($row);
                ?>
"
                            class="dropDownNotificationImages"/></a> <a
                        href="/profile.php?user=<?php 
                echo $row['userID'];
                ?>
"><?php 
                echo $row['fullName'];
                ?>
</a> sent you new friend request
                    <a href="/myfriends.php?action=decline&friendID=<?php 
                echo $row['userID'];
                echo buckys_get_token_param();
                ?>
&return=<?php 
                echo base64_encode("/profile.php?user="******"
                        class="redButton">Decline</a> <a
                        href="/myfriends.php?action=accept&friendID=<?php 
                echo $row['userID'];
                echo buckys_get_token_param();
                ?>
&return=<?php 
                echo base64_encode("/profile.php?user="******"
                        class="redButton">Approve</a> <br clear="all"/>
                </div>
            <?php 
            }
            ?>
            <a class="view-detail-links" href="/myfriends.php?type=requested"> View All Requests </a>
            <?php 
            break;
        case 'forum':
            foreach ($data as $idx => $row) {
                ?>
                <?php 
                if ($row['activityType'] == 'topic_approved' || $row['activityType'] == 'reply_approved') {
                    ?>
                    <div class="activityComment">
                            <span>                 
                                <a href="/profile.php?user=<?php 
                    echo $row['userID'];
                    ?>
"><img
                                        src="<?php 
                    echo BuckysUser::getProfileIcon($TNB_GLOBALS['user']['userID']);
                    ?>
"
                                        class="dropDownNotificationImages"/></a>
                                <!-- <span class="redBold"><?php 
                    echo $TNB_GLOBALS['user']['firstName'] . " " . $TNB_GLOBALS['user']['lastName'];
                    ?>
</span> <br />-->
                                <?php 
                    if ($row['activityType'] == 'topic_approved') {
                        ?>
                                    Your topic
                                    <a href="/forum/topic.php?id=<?php 
                        echo $row['activityType'] == 'topic_approved' ? $row['objectID'] : $row['actionID'];
                        ?>
"><?php 
                        echo buckys_truncate_string($row['topicTitle'], 30);
                        ?>
</a> has been approved
                                <?php 
                    } else {
                        ?>
                                    Your reply to
                                    <a href="/forum/topic.php?id=<?php 
                        echo $row['activityType'] == 'reply_approved' ? $row['objectID'] : $row['actionID'];
                        ?>
"><?php 
                        echo buckys_truncate_string($row['topicTitle'], 30);
                        ?>
</a> has been approved
                                <?php 
                    }
                    ?>
                                <span class="createdDate"><?php 
                    echo buckys_format_date($row['createdDate']);
                    ?>
</span>                                                        
                                <br clear="all"/>
                            </span>
                    </div>
                <?php 
                } else {
                    ?>
                    <div class="activityComment">
                            <span>                 
                                <a href="/profile.php?user=<?php 
                    echo $row['replierID'];
                    ?>
"><img
                                        src="<?php 
                    echo BuckysUser::getProfileIcon(['userID' => $row['replierID'], 'thumbnail' => $row['rThumbnail']]);
                    ?>
"
                                        class="dropDownNotificationImages"/></a>
                                <a href="/profile.php?user=<?php 
                    echo $row['replierID'];
                    ?>
"><?php 
                    echo $row['rName'];
                    ?>
</a>
                                replied to <?php 
                    echo $row['activityType'] == "replied_to_topic" ? "your" : "the";
                    ?>
 topic 
								<a href="/forum/topic.php?id=<?php 
                    echo $row['objectID'];
                    ?>
&page=9999"><?php 
                    echo buckys_truncate_string($row['topicTitle'], 30);
                    ?>
</a>
                                <span class="createdDate"><?php 
                    echo buckys_format_date($row['createdDate']);
                    ?>
</span>                                                        
                                <br clear="all"/>
                            </span>
                    </div>
                <?php 
                }
                ?>


            <?php 
            }
            ?>
            <a class="view-detail-links" href="/forum"> Go to Forum </a>

            <?php 
            break;
        case 'mail':
            foreach ($data as $idx => $row) {
                ?>
                <a class="singleNotificationListItem" href="/messages_read.php?message=<?php 
                echo $row['messageID'];
                ?>
">
                    <span>
                        <img src="<?php 
                echo BuckysUser::getProfileIcon($row['sender']);
                ?>
"
                            class="dropDownNotificationImages"/>
                        <span class="redBold" style="font-weight:normal;"><?php 
                echo $row['senderName'];
                ?>
</span>
                        <span
                            style="font-size:11px; color:#888; float:right;"><?php 
                echo buckys_format_date($row['created_date']);
                ?>
</span>
                        <br/>
                        <?php 
                echo substr($row['body'], 0, 120);
                if (strlen($row['body']) > 120) {
                    echo "...";
                }
                ?>
                    </span> </a>
                <?php 
                if ($idx > 4) {
                    break;
                }
            }
            ?>
            <a class="view-detail-links" href="/messages_inbox.php">Go to Inbox</a>
            <?php 
            break;
        case 'trade':
            foreach ($data as $idx => $row) {
                $htmlBodyContent = '';
                if ($row['activityType'] == BuckysTradeNotification::ACTION_TYPE_OFFER_ACCEPTED) {
                    $actionUrl = '/trade/traded.php';
                    $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">%s</span>', $row['senderName']);
                    $htmlBodyContent .= sprintf('<span> accepted your </span>');
                    $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">offer</span>');
                } else {
                    if ($row['activityType'] == BuckysTradeNotification::ACTION_TYPE_OFFER_DECLINED) {
                        $actionUrl = '/trade/offer_declined.php';
                        $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">%s</span>', $row['senderName']);
                        $htmlBodyContent .= sprintf('<span> declined your </span>');
                        $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">offer</span>');
                    } else {
                        if ($row['activityType'] == BuckysTradeNotification::ACTION_TYPE_OFFER_RECEIVED) {
                            $actionUrl = '/trade/offer_received.php';
                            $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">%s</span>', $row['senderName']);
                            $htmlBodyContent .= sprintf('<span> made you an </span>');
                            $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">offer</span>');
                        } else {
                            if ($row['activityType'] == BuckysTradeNotification::ACTION_TYPE_FEEDBACK) {
                                $actionUrl = '/feedback.php?user='******'<span class="redBold" style="font-weight:normal;">%s</span>', $row['senderName']);
                                $htmlBodyContent .= sprintf('<span> left you </span>');
                                $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">feedback</span>');
                                $row['feedback'] = strip_tags($row['feedback']);
                                if (strlen($row['feedback']) > 120) {
                                    $row['feedback'] = substr($row['feedback'], 0, 120) . '...';
                                }
                                $htmlBodyContent .= sprintf('<span> "%s"</span>', $row['feedback']);
                            } else {
                                $actionUrl = '#';
                                //not sure if we can be here.
                            }
                        }
                    }
                }
                ?>
                <a class="singleNotificationListItem" href="<?php 
                echo $actionUrl;
                ?>
"> <img
                        src="<?php 
                echo BuckysUser::getProfileIcon($row['senderID']);
                ?>
"
                        class="dropDownNotificationImages"/>
                    <?php 
                echo $htmlBodyContent;
                ?>
                </a>
            <?php 
            }
            ?>
            <a class="view-detail-links" href="/trade/available.php">My Trading Account</a>
            <?php 
            break;
        case 'shop':
            foreach ($data as $idx => $row) {
                $htmlBodyContent = '';
                if ($row['activityType'] == BuckysShopNotification::ACTION_TYPE_PRODUCT_SOLD) {
                    $actionUrl = '/shop/sold.php';
                    $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">%s</span>', $row['senderName']);
                    $htmlBodyContent .= sprintf('<span> purchased your </span>');
                    $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">product</span>');
                } else {
                    $actionUrl = '#';
                    //not sure if we can be here.
                }
                ?>
                <a class="singleNotificationListItem" href="<?php 
                echo $actionUrl;
                ?>
"> <img
                        src="<?php 
                echo BuckysUser::getProfileIcon($row['senderID']);
                ?>
"
                        class="dropDownNotificationImages"/>
                    <?php 
                echo $htmlBodyContent;
                ?>
                </a>
            <?php 
            }
            ?>
            <a class="view-detail-links" href="/shop/available.php">My Shop Account</a>
            <?php 
            break;
    }
    $output = ob_get_contents();
    ob_end_clean();
    if ($outFlag == true) {
        echo $output;
        return true;
    } else {
        return $output;
    }
}
    <?php 
$moderators = BuckysForumModerator::getForumModerators($category['categoryID']);
?>

    <h4>Moderators</h4>
    <table class="moderators">
        <tr>
            <td style="width: 35px;">
                <a href="/profile.php?user=<?php 
echo !$category['creatorID'] ? TNB_USER_ID : $category['creatorID'];
?>
">
                    <img
                        src="<?php 
echo BuckysUser::getProfileIcon(!$category['creatorID'] ? TNB_USER_ID : $category['creatorID']);
?>
"
                        class="poster-icon"/> </a>
            </td>
            <td>
                <a href="/profile.php?user=<?php 
echo !$category['creatorID'] ? TNB_USER_ID : $category['creatorID'];
?>
">
                    <b><?php 
echo buckys_get_user_name(!$category['creatorID'] ? TNB_USER_ID : $category['creatorID']);
?>
</b>
                </a><br/> <span>Administrator</span>
            </td>
Ejemplo n.º 17
0
        } else {
            echo 'None';
        }
        ?>
                                            </div>
                                        </div>

                                        <!--
										<div class="f-user" style="margin:10px 0px;">
											<div class="f-user-image">
												<a href="/profile.php?user=<?php 
        echo $tradeData[$theirPrefix . 'ID'];
        ?>
" class="profileLink">
													<img src="<?php 
        echo BuckysUser::getProfileIcon($tradeData[$theirPrefix . 'ID']);
        ?>
" class="postIcons" />                                    
												</a>
											</div>
											<div class="f-user-desc">
												<a href="/profile.php?user=<?php 
        echo $tradeData[$theirPrefix . 'ID'];
        ?>
" class="profileLink">
													<span><?php 
        echo trim($tradeData['theirBasicInfo']['firstName'] . ' ' . $tradeData['theirBasicInfo']['lastName']);
        ?>
</span>
												</a> <br/>
												<?php 
Ejemplo n.º 18
0
     //Getting Conversation List
     $convList = isset($_SESSION['converation_list']) ? $_SESSION['converation_list'] : array();
     foreach ($messages as $row) {
         if (!isset($result[$row['userID']])) {
             //Init Array
             $result[$row['userID']] = array('html' => '', 'count' => 0, 'name' => '');
             //If there is a user that has sent new message and is not on the conversation list, add him to the conversation list and get all old messages
             if (!in_array($row['userID'], $convList)) {
                 //Add to conversation list
                 if (is_array(BuckysPrivateMessenger::openConversationBox($userID, $row['userID']))) {
                     $result[$row['userID']]['html'] = BuckysPrivateMessenger::getMessagesHTML($userID, $row['userID'], 'old');
                 }
             }
         }
         $result[$row['userID']]['html'] .= '<div class="single_private_message">
                     <img src="' . BuckysUser::getProfileIcon($row) . '" />
                     <div class="private_message_text"><span class="username">' . $row['fullName'] . '</span>' . $row['message'] . ' <span class="date">' . BuckysPrivateMessenger::formatDate(strtotime($row['createdDate'])) . '</span></div>
                   </div>';
         $result[$row['userID']]['count']++;
         $result[$row['userID']]['name'] = $row['fullName'];
     }
 }
 echo '<result>';
 echo '<users><![CDATA[' . $newUserHTML . ']]></users>';
 echo '<messages>';
 foreach ($result as $id => $row) {
     echo '<message id="' . $id . '" encrypted="' . buckys_encrypt_id($id) . '" count="' . $row['count'] . '" name="' . $row['name'] . '"><![CDATA[' . $row['html'] . ']]></message>';
 }
 echo '</messages>';
 echo '</result>';
 exit;
Ejemplo n.º 19
0
</a><br />
                            <a href="/reported.php?action=ban-users&reportID=<?php 
        echo $row['reportID'];
        ?>
&type=<?php 
        echo $reportType;
        ?>
">Ban User</a><br />
                        </div>
                        <div class="td td-reporter">
                            <a href="/profile.php?user=<?php 
        echo $row['reporterID'];
        ?>
">
                                <img src="<?php 
        echo BuckysUser::getProfileIcon(array('thumbnail' => $row['reporterThumb'], 'userID' => $row['reporterID']));
        ?>
" />
                            </a>
                        </div>
                        <div class="clear"></div>
                    </div>
                    <?php 
    }
    ?>
                </div>                
                <div class="btn-row">
                    <input type="button" class="redButton" value="Delete <?php 
    echo $reportLabel[$reportType][1];
    ?>
" id="delete-objects" />
Ejemplo n.º 20
0
        echo $subCat['categoryID'];
        ?>
"
                                    style="font-weight:bold;"><?php 
        echo $subCat['categoryName'];
        ?>
</a> <br/> <span
                                    style="color:#999999;font-size:11px;"><?php 
        echo $categoryDescription;
        ?>
</span>
                            </td>
                            <td>
                                <?php 
        if ($subCat['lastTopicID'] > 0) {
            echo '<a href="/profile.php?user='******'lastPosterID'] . '"><img src="' . BuckysUser::getProfileIcon($subCat['lastPosterID']) . '" class="poster-icon" /></a>';
            echo "<a href='/forum/topic.php?id=" . $subCat['lastTopicID'] . "'>";
            if (strlen($subCat['lastPostTitle']) > 200) {
                echo substr($subCat['lastPostTitle'], 0, 195) . "...";
            } else {
                echo $subCat['lastPostTitle'];
            }
            echo "</a><br />";
            ?>
                                    <a style="font-weight:bold;"
                                        href="/profile.php?user=<?php 
            echo $subCat['lastPosterID'];
            ?>
"><?php 
            echo $subCat['lastPosterName'];
            ?>
Ejemplo n.º 21
0
?>
                    </td>
                </tr>
                <?php 
if (buckys_check_user_acl(USER_ACL_REGISTERED) && !BuckysForumModerator::isBlocked($TNB_GLOBALS['user']['userID'], $topic['categoryID'])) {
    ?>
                    <tr>
                        <td style="background:#fff;">&nbsp;</td>
                        <td class="icon-column" style="background:#fff;">
                            <a href='/profile.php?user=<?php 
    echo $TNB_GLOBALS['user']['userID'];
    ?>
'> <img
                                    class="profileIcon topic-icon"
                                    src="<?php 
    echo BuckysUser::getProfileIcon(['thumbnail' => $TNB_GLOBALS['user']['thumbnail'], 'userID' => $TNB_GLOBALS['user']['userID']]);
    ?>
"
                                    class="poster-icon"/> </a>
                        </td>
                        <td class="post-content" style="width:100%;background:#fff">
                            <form name="postreplyform" id="postreplyform"
                                action="/forum/post_reply.php?id=<?php 
    echo $topic['topicID'];
    ?>
" method="post">
                                <input type="hidden" name="action" value="post-reply"/> <input type="hidden"
                                    name="topicID" value="<?php 
    echo $topic['topicID'];
    ?>
"/> <textarea cols="20"
Ejemplo n.º 22
0
        echo $targetItemLink;
        ?>
"><?php 
        echo $offerData['targetTitle'];
        ?>
</a>
											<div class="clear"></div>
											<div class="f-user" style="margin-top:10px;">
												<!--
												<div class="f-user-image">
													<a href="/profile.php?user=<?php 
        echo $offerData['targetUserID'];
        ?>
" class="profileLink">
														<img src="<?php 
        echo BuckysUser::getProfileIcon($offerData['targetUserID']);
        ?>
" class="postIcons" />                                    
													</a>
												</div>
												-->
												<div class="f-user-desc">
													<a href="/profile.php?user=<?php 
        echo $offerData['targetUserID'];
        ?>
" class="profileLink">
														<span><?php 
        echo trim($offerData['basicInfo']['firstName'] . ' ' . $offerData['basicInfo']['lastName']);
        ?>
</span>
													</a> <br/>
                                    <a href="/banned_users.php?action=unban&bannedID=<?php 
        echo $row['bannedID'];
        ?>
">Unban User</a><br/>
                                    <a href="/banned_users.php?action=delete&bannedID=<?php 
        echo $row['bannedID'];
        ?>
">Delete User</a><br/>
                                </div>
                                <div class="td td-reporter">
                                    <a href="/profile.php?user=<?php 
        echo $row['moderatorID'];
        ?>
"> <img
                                            src="<?php 
        echo BuckysUser::getProfileIcon(['thumbnail' => $row['moderatorThumb'], 'userID' => $row['moderatorID']]);
        ?>
"/>
                                        <?php 
        echo $row['moderatorName'];
        ?>
                                    </a>
                                </div>
                                <div class="clear"></div>
                            </div>
                        <?php 
    }
    ?>
                    </div>
                    <div class="btn-row">
                        <input type="button" class="redButton" value="Delete Users" id="delete-users"/> <input