コード例 #1
0
		pot.id AS cant_vote
	FROM
		phpgw_fud_msg m
		INNER JOIN phpgw_fud_thread t ON m.thread_id=t.id
		INNER JOIN phpgw_fud_forum f ON t.forum_id=f.id
		LEFT JOIN phpgw_fud_users u ON m.poster_id=u.id
		LEFT JOIN phpgw_fud_level l ON u.level_id=l.id
		LEFT JOIN phpgw_fud_poll p ON m.poll_id=p.id
		LEFT JOIN phpgw_fud_poll_opt_track pot ON pot.poll_id=p.id AND pot.user_id=' . _uid . '
	WHERE
		m.id=' . $mid . ' AND m.apr=1');
if (!isset($_GET['prevloaded'])) {
    th_inc_view_count($th);
    if (_uid) {
        if ($frm->last_view < $msg_obj->post_stamp) {
            user_register_thread_view($th, $msg_obj->post_stamp, $mid);
        }
        if ($frm->last_forum_view < $msg_obj->post_stamp) {
            user_register_forum_view($frm->forum_id);
        }
    }
    $subscribe_status = $frm->subscribed ? '| <a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=tree&amp;th=' . $th . '&amp;notify=' . $usr->id . '&amp;' . _rsid . '&amp;opt=off&amp;mid=' . $mid . '" title="Stop receiving notifications about new posts in this topic">Unsubscribe from topic</a>&nbsp;' : '| <a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=tree&amp;th=' . $th . '&amp;notify=' . $usr->id . '&amp;' . _rsid . '&amp;opt=on&amp;mid=' . $mid . '" title="Receive notification about new posts inside this topic">Subscribe to topic</a>&nbsp;';
} else {
    $subscribe_status = '';
}
ses_update_status($usr->sid, 'Browsing topic (tree view) <a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=tree&amp;th=' . $frm->id . '&amp;' . _rsid . '">' . $frm->subject . '</a>', $frm->id);
function tmpl_create_forum_select($frm_id, $mod)
{
    $prev_cat_id = 0;
    $selection_options = '';
    if (!isset($_GET['t']) || $_GET['t'] != 'thread' && $_GET['t'] != 'threadt') {
コード例 #2
0
}
if (!_uid) {
    /* these options are restricted to registered users */
    unset($_GET['sub_forum_limit'], $_GET['sub_th_limit'], $_GET['unread']);
}
$unread_limit = isset($_GET['unread']) && _uid ? ' AND m.post_stamp > ' . $usr->last_read . ' AND (r.id IS NULL OR r.last_view < m.post_stamp) ' : '';
$th = isset($_GET['th']) ? (int) $_GET['th'] : 0;
$frm_id = isset($_GET['frm_id']) ? (int) $_GET['frm_id'] : 0;
$perm_limit = $usr->users_opt & 1048576 ? '' : ' AND (mm.id IS NOT NULL OR ' . (_uid ? '((CASE WHEN g2.id IS NOT NULL THEN g2.group_cache_opt ELSE g1.group_cache_opt END)' : '(g1.group_cache_opt') . ' & 2) > 0)';
/* mark messages read for registered users */
if (_uid && isset($_GET['mr']) && !empty($usr->data) && count($usr->data)) {
    foreach ($usr->data as $ti => $mi) {
        if (!(int) $ti || !(int) $mi) {
            break;
        }
        user_register_thread_view($ti, __request_timestamp__, $mi);
    }
}
ses_putvar((int) $usr->sid, null);
/* no other limiters are present, assume 'today' limit */
if (!$unread_limit && !isset($_GET['date']) && !isset($_GET['reply_count'])) {
    $_GET['date'] = 1;
}
/* date limit */
$dt_opt = isset($_GET['date']) ? str_replace('&date=' . $_GET['date'], '', $_SERVER['QUERY_STRING']) : $_SERVER['QUERY_STRING'] . '&amp;date=1';
$rp_opt = isset($_GET['reply_count']) ? str_replace('&reply_count=' . $_GET['reply_count'], '', $_SERVER['QUERY_STRING']) : $_SERVER['QUERY_STRING'] . '&amp;reply_count=0';
$s_today = valstat(isset($_GET['date']));
/* reply limit */
$s_unu = valstat(isset($_GET['reply_count']));
if (_uid) {
    $un_opt = isset($_GET['unread']) ? str_replace('&unread=' . $_GET['unread'], '', $_SERVER['QUERY_STRING']) : $_SERVER['QUERY_STRING'] . '&amp;unread=1';
コード例 #3
0
$usr->md = $frm->md;
$m_num = 0;
while ($obj = db_rowobj($result)) {
    $message_data .= tmpl_drawmsg($obj, $usr, $perms, false, $m_num, array($_GET['start'], $count));
    $obj2 = $obj;
}
unset($result);
un_register_fps();
if (!isset($_GET['prevloaded'])) {
    th_inc_view_count($frm->id);
    if (_uid && $obj2) {
        if ($frm->last_forum_view < $obj2->post_stamp) {
            user_register_forum_view($frm->forum_id);
        }
        if ($frm->last_view < $obj2->post_stamp) {
            user_register_thread_view($frm->id, $obj2->post_stamp, $obj2->id);
        }
    }
}
$page_pager = tmpl_create_pager($_GET['start'], $count, $total, '/egroupware/fudforum/3814588639/index.php?t=msg&amp;th=' . $_GET['th'] . '&amp;prevloaded=1&amp;' . _rsid . reveal_lnk . unignore_tmp);
get_prev_next_th_id($frm, $prev_thread_link, $next_thread_link);
$pdf_link = $FUD_OPT_2 & 2097152 ? '[ <a href="' . $GLOBALS['WWW_ROOT'] . 'pdf.php?th=' . $_GET['th'] . '">Generate printable PDF</a> ]' : '';
$xml_link = $FUD_OPT_2 & 1048576 ? '[ <a href="/egroupware/fudforum/3814588639/index.php?t=help_index&amp;section=boardusage#syndicate">Syndicate this forum (XML)</a> ]' : '';
if ($FUD_OPT_2 & 2) {
    $page_gen_end = gettimeofday();
    $page_gen_time = sprintf('%.5f', $page_gen_end['sec'] - $PAGE_TIME['sec'] + ($page_gen_end['usec'] - $PAGE_TIME['usec']) / 1000000);
    $page_stats = '<br /><div align="left" class="SmallText">Total time taken to generate the page: ' . $page_gen_time . ' seconds</div>';
} else {
    $page_stats = '';
}
echo $GLOBALS['fud_egw_hdr'];