</li> </ul> <!-- END User avatar toggle--> <!-- START lock screen--> <!-- END lock screen--> </ul> <!-- END Left navbar--> <!-- START Right Navbar--> <ul class="nav navbar-nav navbar-right"> <!-- Fullscreen (only desktops)--> <!-- START Alert menu--> <?php $notifArray = getNotifications(); ?> <li class="dropdown dropdown-list"> <a href="#" data-toggle="dropdown" onclick="setNotificationsAsRead();"> <em class="icon-bell"></em> <div id="notifCount" class="label label-danger"><?php if ($notifArray['count'] !== 0) { echo $notifArray['count']; } ?> </div> </a> <!-- START Dropdown menu--> <ul class="dropdown-menu animated flipInX"> <li> <!-- START list group-->
<input type="text" name="search_text" placeholder="Search"> <input type="submit" name="search" value=""> </form> </div> <div class="user-name-top"><a href="user.php"><?php echo ucwords($_SESSION['display_name']); ?> </a> </div> <a href="#" class="top-messages allNotifications" user-id="<?php echo $_SESSION['uid']; ?> "> <?php require_once 'includes/app/users.php'; $notifications = getNotifications($_SESSION['uid']); $count = countNotifications($_SESSION['uid']); if ($notifications) { if ($count > 0) { echo '<p class="notifyNo">'; echo $count; echo '</p>'; } //echo sizeof($notifications); } ?> </a> <div class="popup-alerts"> <?php
} if (!isset($_SESSION['not_typing'])) { $_SESSION['not_typing'] = array(); } if (!isset($_SESSION['notifytime'])) { $_SESSION['notifytime'] = 0; } if (!isset($_SESSION['announcetime'])) { $_SESSION['announcetime'] = 0; } if (!isset($_SESSION['warntime'])) { $_SESSION['warntime'] = 0; } getTyping(); if ($notifications_on == 1 and !$popout) { getNotifications(); } if ($chatroom_check and !$popout) { getChatroom(); } if ($popout) { checkPopout(); } if (!$popout) { getAnnouncements(); } if ($enable_moderation == 1 and !$popout) { getWarnings(); } fetchMessages(); }
header('Content-Type: application/json'); } if (isset($_REQUEST['count'])) { } else { if (isset($_REQUEST['markRead'])) { $result = markNotificationRead((int) $_REQUEST['markRead'], $_SESSION['mid']); if ($jsonp) { echo "{$callback}("; } if ($result) { echo json_encode(array('message' => "Your notification was successfully updated.")); } else { json_encode(array('error' => "Your notification update failed.")); } if ($jsonp) { echo ")"; } } else { $notificationStatus = isset($_REQUEST['status']) ? (int) $_REQUEST['status'] : NOTIFICATION_STATUS_CURRENT; $notificationType = isset($_REQUEST['type']) ? (int) $_REQUEST['type'] : 0; $notifications = getNotifications($_SESSION['mid'], $notificationStatus, $notificationType); if ($jsonp) { echo "{$callback}("; } echo json_encode($notifications); if ($jsonp) { echo ")"; } } } }
$mobileswitch = ''; if ($mobileLayout) { $mobileswitch .= 'Mobile view - '; } if ($_COOKIE['forcelayout']) { $mobileswitch .= '<a href="?forcelayout=0" rel="nofollow">Auto view</a>'; } else { if ($mobileLayout) { $mobileswitch .= '<a href="?forcelayout=-1" rel="nofollow">Force normal view</a>'; } else { $mobileswitch .= '<a href="?forcelayout=1" rel="nofollow">Force mobile view [BETA]</a>'; } } //======================= // Notification bars $notifications = getNotifications(); //======================= // Misc stuff $layout_time = formatdatenow(); $layout_onlineusers = getOnlineUsersText(); $layout_birthdays = getBirthdaysText(); $layout_views = '<span id="viewCount">' . number_format($misc['views']) . '</span> ' . __('views'); $layout_title = htmlspecialchars(Settings::get('boardname')); if ($title != '') { $layout_title .= ' » ' . $title; } //======================= // Board logo and theme $layout_logopic = 'img/logo.png'; if (!file_exists($layout_logopic)) { $layout_logopic = 'img/logo.jpg';
function getNotificationsDataTable() { $notifications = getNotifications(6)['notifications']; if (sizeof($notifications) == 0) { return "{\"data\":[]}"; } foreach ($notifications as $notification) { $message = ""; $options = "<button class='btn btn-default' onclick='removeNotification(" . $notification['notification_id'] . ")'>Remove</button>"; if ($notification['is_href'] === "1") { $message = "<a href='" . $notification['onclick'] . "'>"; } $message .= "<span class='fa " . $notification['faicon'] . " " . getTextStyleByID($notification['severity']) . "'>" . $notification['message'] . "</span>"; if ($notification['is_href'] === "1") { $message .= "</a>"; } $data[] = array("message" => $message, "options" => $options, "DT_RowId" => $notification['notification_id']); } return "{\"data\":" . json_encode($data) . "}"; }
<?php include '../config.php'; include '../functions.php'; getNotifications($_POST['user']);
public function getNotifications() { $response['notifications'] = array(); $response['signed'] = false; $response['succeeded'] = false; if (isset($_SESSION["user_id"]) && strlen(trim($_SESSION["user_id"])) > 0) { $response['signed'] = true; $response['notifications'] = getNotifications($_SESSION["user_id"]); $response['succeeded'] = true; } echo json_encode($response); }
$addonSuiteMiniLimit = panelRequestManager::getAddonSuiteMiniLimit(); $IDToBeUpgradedFromMini = panelRequestManager::getIDToBeUpgradedFromMini(); $IDForAddonSuite = panelRequestManager::getIDForAddonSuite(); $priceForSuiteUpgradedFromMini = panelRequestManager::getPriceForSuiteUpgradedFromMini(); $priceForAddonSuite = panelRequestManager::getPriceForAddonSuite(); $addonSuiteLimitExceededIllegally = json_encode(Reg::get('addonSuiteLimitExceededIllegally')); $mainJson = json_encode(panelRequestManager::getSitesUpdates()); $toolTipData = json_encode(panelRequestManager::getUserHelp()); $favourites = json_encode(panelRequestManager::getFavourites()); $sitesData = json_encode(panelRequestManager::getSites()); $sitesListData = json_encode(panelRequestManager::getSitesList()); $groupData = json_encode(panelRequestManager::getGroupsSites()); $updateAvailable = json_encode(checkUpdate(false, false)); $updateAvailableNotify = json_encode(panelRequestManager::isUpdateHideNotify()); $totalSettings = json_encode(array("data" => panelRequestManager::requiredData(array("getSettingsAll" => 1)))); $fixedNotifications = json_encode(getNotifications(true)); $cronFrequency = json_encode(getRealSystemCronRunningFrequency()); $clientUpdatesAvailable = json_encode(panelRequestManager::getClientUpdateAvailableSiteIDs()); $purchasedAddons = json_encode(Reg::get('purchasedAddons')); $allAddonsBought = json_encode(Reg::get('addonDetails')); //$allAddonsBought = json_encode(Reg::get('activeAddons')); //$allAddonsBought = json_encode(Reg::get('allPurchasedAddonsNameAndSlug')); $multiUserAllowAccess = json_encode(panelRequestManager::requiredData(array("multiUserAllowAccess" => 1))); //for notification center html $notifCenterData = json_encode(panelRequestManager::requiredData(array("updateNotificationContent" => 1))); $min = '.min'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="//www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
switch ($method) { case "finaorecentposts": $userid = mysql_real_escape_string($_POST['userid']); if ($userid != null) { finaorecentposts($userid); } else { finaorecentposts($authuserid); } break; case "login": $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['password']); login($authuserid, $username, $password); break; case "getnotifications": getNotifications($authuserid); break; case "getowntiles": $userid = mysql_real_escape_string($_POST['userid']); if ($userid != null) { getowntiles($userid); } else { getowntiles($authuserid); } break; case "sorttiles": $tileid = mysql_real_escape_string($_POST['tileid']); $userid = mysql_real_escape_string($_POST['userid']); sorttiles($tileid, $userid); break; case "homepage_public":
$plants = array(); foreach ($users as $user) { $getPlants = mysql_query("SELECT `id` FROM `user_plants` WHERE `uid` = {$user}"); while ($result = mysql_fetch_assoc($getPlants)) { //echo($result['id']."\n"); array_push($plants, array($user => $result['id'])); } } //print_r($plants); foreach ($plants as $plant) { reset($plant); $uid = key($plant); $pid = current($plant); echo "THIS IS USER: {$pid}\n"; checkStats($pid); $notifications = getNotifications($pid); $light = 'good'; $temp = 'good'; $moisture = 'good'; foreach ($notifications as $notif) { reset($notif); switch (key($notif)) { case 'light': $light = current($notif); break; case 'temp': $temp = current($notif); break; case 'moisture': $moisture = current($notif); break;
public static function generalCheck(&$finalResponse) { if ($updateAvailable = checkUpdate()) { if (getOption('updateHideNotify') != $updateAvailable['newVersion'] && getOption('updateNotifySentToJS') != $updateAvailable['newVersion']) { $finalResponse['updateAvailable'] = $updateAvailable; updateOption('updateNotifySentToJS', $updateAvailable['newVersion']); } } $notifications = getNotifications(true); if (!empty($notifications)) { $finalResponse['notifications'] = $notifications; } $waitData = self::getWaitData(); if (!empty($waitData)) { $finalResponse['data']['getWaitData'] = $waitData; } $alertCount = getAddonAlertCount(); //$cookieAlertCount = manageCookies::cookieGet('addonAlertCount'); $cookieAlertCount = getOption('addonAlertCount'); if ($cookieAlertCount !== $alertCount) { //manageCookies::cookieSet('addonAlertCount',$alertCount,array('expire'=>0)); updateOption('addonAlertCount', $alertCount); $finalResponse['addonAlertCount'] = $alertCount; } }