$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 {
            $mod_id_chk = null;
        }
    }
    if (!$mod_id_chk) {
Example #2
0
         }
     }
 }
 /* write file attachments */
 if ($perms & 256 && isset($attach_list)) {
     attach_finalize($attach_list, $msg_post->id);
 }
 if (!$msg_id && (!($frm->forum_opt & 2) || $MOD)) {
     $msg_post->approve($msg_post->id, true);
 }
 if (_uid && !$msg_id) {
     /* deal with notifications */
     if (isset($_POST['msg_poster_notif'])) {
         thread_notify_add(_uid, $msg_post->thread_id);
     } else {
         thread_notify_del(_uid, $msg_post->thread_id);
     }
     /* register a view, so the forum marked as read */
     if (isset($frm)) {
         user_register_forum_view($frm->id);
     }
 }
 /* where to redirect, to the treeview or the flat view and consider what to do for a moderated forum */
 if ($frm->forum_opt & 2 && !$MOD) {
     if ($FUD_OPT_2 & 262144) {
         $modl = array();
         $c = uq('SELECT u.email FROM phpgw_fud_mod mm INNER JOIN phpgw_fud_users u ON u.id=mm.user_id WHERE mm.forum_id=' . $frm->id);
         while ($r = db_rowarr($c)) {
             $modl[] = $r[0];
         }
         if ($modl) {