Exemplo n.º 1
0
}
if (!isset($_GET['id']) || !($tmp = db_saq('SELECT id, alias, posted_msg_count, join_date FROM phpgw_fud_users WHERE id=' . (int) $_GET['id']))) {
    invl_inp_err();
} else {
    $uid = $tmp[0];
    $u_alias = $tmp[1];
    $u_pcount = $tmp[2];
    $u_reg_date = $tmp[3];
}
$TITLE_EXTRA = ': Show Posts by: ' . $u_alias;
ses_update_status($usr->sid, 'Viewing posts by: <a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=usrinfo&amp;id=' . $uid . '">' . $u_alias . '</a>');
if (!isset($_GET['start']) || !($start = (int) $_GET['start'])) {
    $start = 0;
}
if (!($usr->users_opt & 1048576)) {
    $fids = implode(',', array_keys(get_all_read_perms(_uid, $usr->users_opt & 524288)));
}
if (isset($_GET['so']) && !strcasecmp($_GET['so'], 'asc')) {
    $SORT_ORDER = 'ASC';
    $SORT_ORDER_R = 'DESC';
} else {
    $SORT_ORDER = 'DESC';
    $SORT_ORDER_R = 'ASC';
}
$post_entry = '';
if ($usr->users_opt & 1048576 || $fids) {
    $qry_limit = $usr->users_opt & 1048576 ? '' : 'f.id IN (' . $fids . ') AND ';
    /* we need the total for the pager & we don't trust the user to pass it via GET or POST */
    $total = q_singleval("SELECT count(*)\n\t\t\t\t\tFROM phpgw_fud_msg m\n\t\t\t\t\tINNER JOIN phpgw_fud_thread t ON m.thread_id=t.id\n\t\t\t\t\tINNER JOIN phpgw_fud_forum f ON t.forum_id=f.id\n\t\t\t\t\tINNER JOIN phpgw_fud_cat c ON c.id=f.cat_id\n\t\t\t\t\tWHERE " . $qry_limit . " m.apr=1 AND m.poster_id=" . $uid);
    $c = uq("SELECT f.name, f.id, m.subject, m.id, m.post_stamp\n\t\t\tFROM phpgw_fud_msg m\n\t\t\tINNER JOIN phpgw_fud_thread t ON m.thread_id=t.id\n\t\t\tINNER JOIN phpgw_fud_forum f ON t.forum_id=f.id\n\t\t\tINNER JOIN phpgw_fud_cat c ON c.id=f.cat_id\n\t\t\tWHERE " . $qry_limit . " m.apr=1 AND m.poster_id=" . $uid . "\n\t\t\tORDER BY m.post_stamp " . $SORT_ORDER . " LIMIT " . qry_limit($THREADS_PER_PAGE, $start));
    while ($r = db_rowarr($c)) {
Exemplo n.º 2
0
if (!isset($_GET['id']) || !(int) $_GET['id']) {
    invl_inp_err();
}
if (!($u = db_sab('SELECT u.*, l.name AS level_name, l.level_opt, l.img AS level_img FROM phpgw_fud_users u LEFT JOIN phpgw_fud_level l ON l.id=u.level_id WHERE u.id=' . (int) $_GET['id']))) {
    std_error('user');
}
$avatar = $FUD_OPT_1 & 28 && $u->users_opt & 8388608 && !($u->level_opt & 2) ? '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td nowrap valign="top" class="GenText">Avatar:</td><td class="GenText">' . $u->avatar_loc . '</td></tr>' : '';
if ($avatar && $u->level_opt & 1) {
    $level_name = $level_image = '';
} else {
    $level_name = $u->level_name ? '' . $u->level_name . '<br />' : '';
    $level_image = $u->level_img ? '<img src="images/' . $u->level_img . '" /><br />' : '';
}
$custom_tags = $u->custom_status ? '' . $u->custom_status . '<br />' : '';
if (!($usr->users_opt & 1048576)) {
    $frm_perms = get_all_read_perms(_uid, $usr->users_opt & 524288);
}
$moderation = '';
if ($u->users_opt & 524288) {
    $c = uq('SELECT f.id, f.name FROM phpgw_fud_mod mm INNER JOIN phpgw_fud_forum f ON mm.forum_id=f.id INNER JOIN phpgw_fud_cat c ON f.cat_id=c.id WHERE ' . ($usr->users_opt & 1048576 ? '' : 'f.id IN(' . implode(',', array_keys($frm_perms)) . ') AND ') . 'mm.user_id=' . $u->id);
    while ($r = db_rowarr($c)) {
        $moderation .= '<a href="/egroupware/fudforum/3814588639/index.php?t=' . t_thread_view . '&amp;frm_id=' . $r[0] . '&amp;' . _rsid . '" class="GenLink">' . htmlspecialchars($r[1]) . '</a>&nbsp;';
    }
    if ($moderation) {
        $moderation = 'Moderatore di:&nbsp;' . $moderation;
    }
}
$TITLE_EXTRA = ': Informazioni utente ' . $user_info;
ses_update_status($usr->sid, 'Guarda il profilo di <a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=usrinfo&id=' . $u->id . '">' . $user_info . '</a>');
$status = !empty($level_name) || !empty($moderation) || !empty($level_image) || !empty($custom_tags) ? '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td nowrap valign="top" class="GenText">Status:</td><td class="GenText">
<font class="LevelText">
Exemplo n.º 3
0
        $fid = 'f.id';
    }
    if (_uid) {
        $join = ' INNER JOIN phpgw_fud_group_cache g1 ON g1.user_id=2147483647 AND g1.resource_id=' . $fid . ' LEFT JOIN phpgw_fud_group_cache g2 ON g2.user_id=' . _uid . ' AND g2.resource_id=' . $fid . ' ';
        $fields = ' (CASE WHEN g2.id IS NOT NULL THEN g2.group_cache_opt ELSE g1.group_cache_opt END) AS group_cache_opt ';
    } else {
        $join = ' INNER JOIN phpgw_fud_group_cache g1 ON g1.user_id=0 AND g1.resource_id=' . $fid . ' ';
        $fields = ' g1.group_cache_opt ';
    }
}
if (!($FUD_OPT_1 & 536870912)) {
    std_error('disabled');
}
ses_update_status($usr->sid, 'Quelli che si fanno gli affari degli altri, proprio come te');
$rand_val = get_random_value();
$limit =& get_all_read_perms(_uid, $usr->users_opt & (524288 | 1048576));
$c = uq('SELECT
			s.action, s.user_id, s.forum_id,
			u.alias, u.custom_color, s.time_sec, u.users_opt,
			m.id, m.subject, m.post_stamp,
			t.forum_id,
			mm1.id, mm2.id
		FROM phpgw_fud_ses s
		LEFT JOIN phpgw_fud_users u ON s.user_id=u.id
		LEFT JOIN phpgw_fud_msg m ON u.u_last_post_id=m.id
		LEFT JOIN phpgw_fud_thread t ON m.thread_id=t.id
		LEFT JOIN phpgw_fud_mod mm1 ON mm1.forum_id=t.forum_id AND mm1.user_id=' . _uid . '
		LEFT JOIN phpgw_fud_mod mm2 ON mm2.forum_id=s.forum_id AND mm2.user_id=' . _uid . '
		WHERE s.time_sec>' . (__request_timestamp__ - $LOGEDIN_TIMEOUT * 60) . ' AND s.user_id!=' . _uid . ' ORDER BY u.alias, s.time_sec DESC');
$action_data = '';
while ($r = db_rowarr($c)) {