array_shift($args);
        $GLOBALS['_ALTERNATOR_'][$key] = array('p' => 1, 't' => count($args), 'v' => $args);
        return $args[0];
    }
    $k =& $GLOBALS['_ALTERNATOR_'][$key];
    if ($k['p'] == $k['t']) {
        $k['p'] = 0;
    }
    return $k['v'][$k['p']++];
}
if (!_uid) {
    std_error('login');
}
/* delete forum subscription */
if (isset($_GET['frm_id']) && ($_GET['frm_id'] = (int) $_GET['frm_id'])) {
    forum_notify_del(_uid, $_GET['frm_id']);
}
/* delete thread subscription */
if (isset($_GET['th']) && ($_GET['th'] = (int) $_GET['th'])) {
    thread_notify_del(_uid, $_GET['th']);
}
ses_update_status($usr->sid, 'Browsing own subscriptions');
$tabs = '';
if (_uid) {
    $tablist = array('Settings' => 'register', 'Subscriptions' => 'subscribed', 'Referrals' => 'referals', 'Buddy List' => 'buddy_list', 'Ignore List' => 'ignore_list');
    if (isset($_POST['mod_id'])) {
        $mod_id_chk = $_POST['mod_id'];
    } else {
        if (isset($_GET['mod_id'])) {
            $mod_id_chk = $_GET['mod_id'];
        } else {
Exemplo n.º 2
0
    $ann_cols = '5';
    $cur_frm_page = $start + 1;
} else {
    $ann_cols = '6';
    $cur_frm_page = floor($start / $THREADS_PER_PAGE) + 1;
}
$thread_printable_pdf = $FUD_OPT_2 & 2097152 ? '&nbsp;[ <a href="' . $GLOBALS['WWW_ROOT'] . 'pdf.php?frm=' . $frm->id . '&amp;page=' . $cur_frm_page . '" class="GenLink">Generate printable PDF</a> ]' : '';
$thread_syndicate = $FUD_OPT_2 & 1048576 ? '&nbsp;[ <a href="/egroupware/fudforum/3814588639/index.php?t=help_index&amp;section=boardusage#syndicate" class="GenLink">Syndicate this forum (XML)</a> ]' : '';
/* do various things for registered users */
if (_uid) {
    if (isset($_GET['sub'])) {
        forum_notify_add(_uid, $frm->id);
        $frm->subscribed = 1;
    } else {
        if (isset($_GET['unsub'])) {
            forum_notify_del(_uid, $frm->id);
            $frm->subscribed = 0;
        }
    }
    $subscribe = $frm->subscribed ? '<a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=' . $_GET['t'] . '&amp;unsub=1&amp;frm_id=' . $frm->id . '&amp;start=' . $start . '&amp;' . _rsid . '" title="Stop receiving notifications about new topics in the forum">Unsubscribe</a>' : '<a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=' . $_GET['t'] . '&amp;sub=1&amp;frm_id=' . $frm->id . '&amp;start=' . $start . '&amp;' . _rsid . '" title="Receive notifications when someone creates a new topic in this forum">Subscribe</a>';
    $mark_all_read = '<div align="right"><font class="SmallText">[<a href="/egroupware/fudforum/3814588639/index.php?t=markread&amp;' . _rsid . '&id=' . $frm->id . '" class="GenLink" title="All unread messages inside this forum will be marked read">mark all unread forum messages read</a>]' . $thread_printable_pdf . $thread_syndicate . '</font></div>';
    $merget = $MOD || $frm->group_cache_opt & 2048 ? '&nbsp;<a href="/egroupware/fudforum/3814588639/index.php?t=merge_th&amp;frm=' . $frm->id . '&amp;' . _rsid . '" class="GenLink">Merge Topics</a>' : '';
} else {
    $merget = $subscribe = '';
    $mark_all_read = '<div align="right"><font class="SmallText">' . $thread_printable_pdf . $thread_syndicate . '</font></div>';
}
$ppg = $usr->posts_ppg ? $usr->posts_ppg : $POSTS_PER_PAGE;
function &get_all_read_perms($uid, $mod)
{
    $limit = array(0);
    $r = uq('SELECT resource_id, group_cache_opt FROM phpgw_fud_group_cache WHERE user_id=' . _uid);