コード例 #1
0
<?php

$Skip = array();
$Skip[] = db_string($_GET['skip']);
$NotificationsManager = new NotificationsManager($LoggedUser['ID'], $Skip);
json_die("success", $NotificationsManager->get_notifications());
//echo '{"status":"success","response":[[{"message":"1st notification","url":"https:\/\/www.google.com\/","importance":"alert","AutoExpire":false},{"message":"2nd notification","url":"","importance":"alert","AutoExpire":true}]]}';
コード例 #2
0
ファイル: privateheader.php プロジェクト: jasxonfx/Gazelle
			type="text/javascript"></script>
<?php 
}
if ($Mobile) {
    ?>
	<script src="<?php 
    echo STATIC_SERVER;
    ?>
styles/mobile/style.js" type="text/javascript"></script>
<?php 
}
global $ClassLevels;
// Get notifications early to change menu items if needed
global $NotificationSpans;
$NotificationsManager = new NotificationsManager(G::$LoggedUser['ID']);
$Notifications = $NotificationsManager->get_notifications();
$UseNoty = $NotificationsManager->use_noty();
$NewSubscriptions = false;
$NotificationSpans = array();
foreach ($Notifications as $Type => $Notification) {
    if ($Type === NotificationsManager::SUBSCRIPTIONS) {
        $NewSubscriptions = true;
    }
    if ($UseNoty) {
        $NotificationSpans[] = "<span class=\"noty-notification\" style=\"display: none;\" data-noty-type=\"{$Type}\" data-noty-id=\"{$Notification['id']}\" data-noty-importance=\"{$Notification['importance']}\" data-noty-url=\"{$Notification['url']}\">{$Notification['message']}</span>";
    }
}
if ($UseNoty && !empty($NotificationSpans)) {
    NotificationsManagerView::load_js();
}
if ($NotificationsManager->is_skipped(NotificationsManager::SUBSCRIPTIONS)) {