Beispiel #1
0
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();
    $NewTorrents = $NotificationsManager->get_notifications();
    if (isset($NewTorrents[NotificationsManager::TORRENTS])) {
        $Alerts[] = NotificationsManagerView::format_traditional($NewTorrents[NotificationsManager::TORRENTS]);
    }
    $NotificationsManager->clear_notifications_array();
}
if (check_perms('users_mod')) {
    $ModBar[] = '<a href="tools.php">Toolbox</a>';
}
if (check_perms('users_mod') || G::$LoggedUser['PermissionID'] == FORUM_MOD) {
    $NumStaffPMs = G::$Cache->get_value('num_staff_pms_' . G::$LoggedUser['ID']);
    if ($NumStaffPMs === false) {
        if (check_perms('users_mod')) {
            G::$DB->query("\n\t\t\t\tSELECT COUNT(ID)\n\t\t\t\tFROM staff_pm_conversations\n\t\t\t\tWHERE Status = 'Unanswered'\n\t\t\t\t\tAND (AssignedToUser = "******"\n\t\t\t\t\t\tOR (Level >= " . max(700, $Classes[MOD]['Level']) . "\n\t\t\t\t\t\t\tAND Level <= " . G::$LoggedUser['Class'] . "))");
        }