コード例 #1
0
ファイル: privateheader.php プロジェクト: jasxonfx/Gazelle
    if (!$LatestSBlogTime && ($LatestSBlogTime = G::$Cache->get_value('staff_blog_latest_time')) === false) {
        G::$DB->query("\n\t\t\tSELECT MAX(Time)\n\t\t\tFROM staff_blog");
        list($LatestSBlogTime) = G::$DB->next_record();
        if ($LatestSBlogTime) {
            $LatestSBlogTime = strtotime($LatestSBlogTime);
        } else {
            $LatestSBlogTime = 0;
        }
        G::$Cache->cache_value('staff_blog_latest_time', $LatestSBlogTime, 1209600);
    }
    if ($SBlogReadTime < $LatestSBlogTime) {
        $Alerts[] = '<a href="staffblog.php">New staff blog post!</a>';
    }
}
// Inbox
if ($NotificationsManager->is_traditional(NotificationsManager::INBOX)) {
    $NotificationsManager->load_inbox();
    $NewMessages = $NotificationsManager->get_notifications();
    if (isset($NewMessages[NotificationsManager::INBOX])) {
        $Alerts[] = NotificationsManagerView::format_traditional($NewMessages[NotificationsManager::INBOX]);
    }
    $NotificationsManager->clear_notifications_array();
}
if (G::$LoggedUser['RatioWatch']) {
    $Alerts[] = '<a href="rules.php?p=ratio">Ratio Watch</a>: You have ' . time_diff(G::$LoggedUser['RatioWatchEnds'], 3) . ' to get your ratio over your required ratio or your leeching abilities will be disabled.';
} elseif (G::$LoggedUser['CanLeech'] != 1) {
    $Alerts[] = '<a href="rules.php?p=ratio">Ratio Watch</a>: Your downloading privileges are disabled until you meet your required ratio.';
}
// Torrents
if ($NotificationsManager->is_traditional(NotificationsManager::TORRENTS)) {
    $NotificationsManager->load_torrent_notifications();