<a class="view-detail-links" href="/myfriends.php?type=requested"> View All Requests </a> </span> </span> <?php } ?> <!-- End Friend Request Notification --> <!-- Start Forum Notifications --> <?php $objForumNotify = new BuckysForumNotification(); $newNoticeCount = $objForumNotify->getNumOfNewNotifications($userID); if ($newNoticeCount > 0) { $newNotices = $objForumNotify->getNewNotifications($userID); ?> <span class="notificationLinks" id="forum-notifications-icon"> <span class="dropDownNotificationList"> <?php foreach ($newNotices as $idx => $row) { ?> <?php if ($row['activityType'] == 'topic_approved' || $row['activityType'] == 'reply_approved') { ?> <a class="singleNotificationListItem" href="/forum/topic.php?id=<?php echo $row['activityType'] == 'topic_approved' ? $row['objectID'] : $row['actionID']; ?> "> <span>
echo '<span class="notificationLinks inactive-notify no-data" id="friend-notifications-icon"><span class="dropDownNotificationList"><a href="/myfriends.php?type=requested" class="nodata">No one wants to be your friend</a></span></span>'; } ?> <!-- End Friend Request Notification --> <!-- Start Forum Notifications --> <?php $objForumNotify = new BuckysForumNotification(); $newMsgFlag = 1; $newNoticeCount = $objForumNotify->getNumOfNewNotifications($userID, $newMsgFlag); if ($newNoticeCount == 0) { $newMsgFlag = 0; $newNoticeCount = $objForumNotify->getNumOfNewNotifications($userID, $newMsgFlag); } if ($newNoticeCount > 0) { $newNotices = $objForumNotify->getNewNotifications($userID, $newMsgFlag, $notificationLimit); ?> <span class="notificationLinks <?php if ($newMsgFlag == 0) { echo 'inactive-notify'; } ?> " id="forum-notifications-icon"> <span class="dropDownNotificationList"> <?php render_footer_link_content('forum', $newNotices); ?> </span> </span> <?php } else {
exit; } $notificationLimit = 5; //This module will make the notifications as read. $result = ['success' => 1, 'content' => '']; $type = isset($_REQUEST['type']) ? strtolower($_REQUEST['type']) : null; if (isset($_POST['action']) && $_POST['action'] == 'read') { switch ($type) { case 'my': BuckysActivity::markReadNotifications($userID); $notiData = BuckysActivity::getNotifications($userID, $notificationLimit, 0); $result['content'] = render_footer_link_content($type, $notiData, false); break; case 'forum': BuckysForumNotification::makeNotificationsToRead($userID); $notiData = BuckysForumNotification::getNewNotifications($userID, 0, $notificationLimit); $result['content'] = render_footer_link_content($type, $notiData, false); break; case 'trade': $tradeNotiIns = new BuckysTradeNotification(); $tradeNotiIns->markAsRead($userID); $notiData = $tradeNotiIns->getReceivedMessages($userID, null, 0, $notificationLimit); $result['content'] = render_footer_link_content($type, $notiData, false); break; case 'shop': $shopNotiIns = new BuckysShopNotification(); $shopNotiIns->markAsRead($userID); $notiData = $shopNotiIns->getReceivedMessages($userID, null, 0, $notificationLimit); $result['content'] = render_footer_link_content($type, $notiData, false); break; }