Example #1
0
        $cal->get_authorised_calendars($GO_SECURITY->user_id);
        $cal2 = new calendar();
        while ($cal->next_record()) {
            if ($view_id > 0 && $task != 'save') {
                $check = $cal2->calendar_is_in_view($cal->f('id'), $view_id);
            } else {
                $check = isset($_POST['calendars']) ? in_array($cal->f('id'), $_POST['calendars']) : false;
            }
            if ($has_write_permission) {
                echo '<tr><td>';
                $checkbox = new checkbox('calendars[]', $cal->f('id'), $cal->f('name'), $check);
                echo '</td><td>' . show_profile($cal->f('user_id')) . '</td></tr>';
            } else {
                if ($check) {
                    echo '<tr><td>' . htmlspecialchars($cal->f('name'));
                    echo '</td><td>' . show_profile($cal->f('user_id')) . '</td></tr>';
                }
            }
        }
        ?>
	</table>
	</td>
</tr>
<tr>
	<td colspan="2">
		<?php 
        if ($has_write_permission) {
            $button = new button($cmdOk, "javascript:document.forms[0].close.value='true';document.forms[0].task.value='save';document.forms[0].submit()");
            echo '&nbsp;&nbsp;';
            $button = new button($cmdApply, "javascript:document.forms[0].task.value='save';document.forms[0].submit()");
            echo '&nbsp;&nbsp;';
        $query = "select * from profile, user where profile.userid=user.id " . " and has_picture>0 " . " and verification=0 " . " limit 20";
    } else {
        $query = "select * from profile, user where profile.userid=user.id " . " and has_picture>0 " . " and verification=0 " . " and uotd_time is null " . " and expavg_credit>1 " . " and (response1 <> '' or response2 <> '') " . " order by recommend desc limit 20";
    }
}
$result = _mysql_query($query);
$n = 0;
echo "<form action=profile_screen_action.php>\n";
start_table();
$found = false;
while ($profile = _mysql_fetch_object($result)) {
    $found = true;
    echo "<tr><td valign=top>";
    buttons($n);
    echo "\n        <br>Name: {$profile->name}\n        <br>recommends: {$profile->recommend}\n        <br>rejects: {$profile->reject}\n        <br>RAC: {$profile->expavg_credit}\n        <br>\n    ";
    echo "</td><td><table border=2> ";
    show_profile($profile, $g_logged_in_user, true);
    echo "</table></td></tr>\n";
    echo "<input type=\"hidden\" name=\"userid{$n}\" value=\"{$profile->userid}\">\n";
    $n++;
}
end_table();
if ($found) {
    echo "\n        <input type=\"hidden\" name=\"n\" value=\"{$n}\">\n        <input type=\"submit\" value=\"OK\">\n    ";
} else {
    echo "No more profiles to screen.";
}
echo "\n    </form>\n";
admin_page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
                case SHOW_OWN:
                    $go_next = $uid == $GO_SECURITY->user_id;
                    break;
                case SHOW_SUB:
                    $go_next = $checked == 'checked';
                    break;
            }
            if (!$go_next) {
                continue;
            }
        }
        $subscr_count++;
        echo '<tr>';
        //    echo '<td align="center"><input type="radio" name="default_calendar_id" value="'.$cal->f('id').'"></td>';
        echo '<td nowrap><a href="index.php?calendar_id=' . $cal->f("id") . '" class="normal">' . htmlspecialchars($cal->f("name")) . '</a>&nbsp;</td>';
        echo '<td nowrap>' . show_profile($cal->f("user_id")) . '&nbsp;</td>';
        echo '<td align="center"><input type="checkbox" id="subscribed" name="subscribed[]" value="' . $cal->f('id') . '" ' . $checked . '></td>';
        echo '<td><a href="calendar.php?calendar_id=' . $cal->f("id") . '&return_to=' . rawurlencode($link_back) . '" title="' . $strEdit . ' \'' . htmlspecialchars(addslashes($cal->f("name"))) . '\'"><img src="' . $GO_THEME->images['edit'] . '" border="0" /></a></td>';
        if ($cal->f('user_id') != $GO_SECURITY->user_id) {
            echo "<td>&nbsp;</td></tr>\n";
        } else {
            echo "<td><a href='javascript:delete_calendar(\"" . $cal->f("id") . "\",\"" . div_confirm_id($strDeletePrefix . "'" . addslashes($cal->f("name")) . "'" . $strDeleteSuffix) . "\")' title=\"" . $strDeleteItem . " '" . htmlspecialchars($cal->f("name")) . "'\"><img src=\"" . $GO_THEME->images['delete'] . "\" border=\"0\"></a></td></tr>\n";
        }
    }
}
echo '</table>';
echo '<br /><br />';
$button = new button($cmdOk, "javascript:_save('subscribe', 'true', " . $subscr_count . ", '" . $sc_choice_calendar_msg . "')");
echo '&nbsp;&nbsp;';
$button = new button($cmdApply, "javascript:_save('subscribe', 'false', " . $subscr_count . ", '" . $sc_choice_calendar_msg . "')");
echo '&nbsp;&nbsp;';
Example #4
0
        $tabtable->add_tab('participants', $sc_participants);
    }
}
$tabtable->print_head();
echo '<br />';
switch ($tabtable->get_active_tab_id()) {
    case 'participants':
        echo '<input type="hidden" name="status" />';
        echo '<table border="0">';
        echo '<tr><td><h3>' . $strName . '</td>';
        echo '<td><h3>' . $strEmail . '</td>';
        echo '<td><h3>' . $sc_status . '</td></tr>';
        while ($cal->next_record()) {
            echo '<tr><td nowrap>';
            if ($cal->f('user_id') > 0) {
                echo show_profile($cal->f('user_id'), '', 'normal', $link_back);
            } else {
                echo show_profile_by_email($cal->f('email'), '', $link_back) . '&nbsp;</td>';
            }
            echo '<td nowrap>' . mail_to($cal->f('email')) . '&nbsp;</td><td>';
            switch ($cal->f('status')) {
                case '0':
                    echo $sc_not_responded;
                    break;
                case '1':
                    echo $sc_accepted;
                    break;
                case '2':
                    echo $sc_declined;
                    break;
            }
Example #5
0
        $user->has_profile = 1;
    } else {
        error_page(tra("This user has no profile"));
    }
}
$logged_in_user = get_logged_in_user(false);
check_whether_to_show_profile($user, $logged_in_user);
$cache_args = "userid={$userid}";
$cacheddata = get_cached_data(USER_PROFILE_TTL, $cache_args);
if ($cacheddata) {
    // Already got a cached version of the information
    $community_links_object = unserialize($cacheddata);
} else {
    // Need to generate a new bunch of data
    $community_links_object = get_community_links_object($user);
    set_cached_data(USER_PROFILE_TTL, serialize($community_links_object), $cache_args);
}
page_head(tra("Profile: %1", $user->name));
start_table();
echo "<tr><td valign=\"top\">";
start_table();
show_profile($user, $logged_in_user);
end_table();
echo "</td><td valign=\"top\">";
start_table();
row2(tra("Account data"), "<a href=\"show_user.php?userid=" . $userid . "\">" . tra("View") . "</a>");
community_links($community_links_object, $logged_in_user);
end_table();
echo "</td></tr>";
end_table();
page_tail();
Example #6
0
require "../Group-Office.php";
$GO_SECURITY->authenticate();
require $GO_LANGUAGE->get_fallback_base_language_file('groups');
$count = $GO_GROUPS->get_users_in_group($group_id);
$page_title = $count . ' ' . $groups_users_in1 . ' ' . $name;
require $GO_THEME->theme_path . "header.inc";
echo '<table border="0" cellpadding="10"><tr><td>';
echo '<table border="0" cellpadding="0" cellspacing="1">';
echo '<tr><td><h1>' . $page_title . '</h1></td></tr>';
if ($count > 0) {
    while ($GO_GROUPS->next_record()) {
        echo "<tr height=\"18\">\n";
        if ($GO_GROUPS->f('name')) {
            echo "<td>" . show_profile($GO_GROUPS->f("id"), $GO_GROUPS->f("name")) . "&nbsp;</a></td>\n";
        } else {
            require_once $GO_CONFIG->class_path . 'profiles.class.inc';
            $profiles = new profiles();
            if ($profile = $profiles->get_profile($GO_GROUPS->f('user_id'))) {
                echo "<td>" . show_profile($GO_GROUPS->f('user_id'), $profile["name"]) . "&nbsp;</a></td>\n";
            }
        }
        echo "</tr>\n";
    }
} else {
    echo "<tr><td colspan=\"99\">" . $groups_no_users . "</td></tr>";
}
echo '<tr><td><br />';
$button = new button($cmdClose, 'javascript:window.close()');
echo '</td></tr>';
echo "</table></td></tr></table>";
require $GO_THEME->theme_path . "footer.inc";
Example #7
0
}
if (isset($_POST['process'])) {
    if (!check_form_auth_ip()) {
        header("Location: http://" . get_server_name() . $globals['base_url'] . "profile.php");
        die;
    }
    $globals['secure_page'] = True;
    $save_messages = save_profile();
} else {
    $globals['secure_page'] = False;
}
do_header(_('edición del perfil del usuario') . ': ' . $user->username);
echo '<div id="singlewrap">' . "\n";
echo $save_messages;
// We do it later because teh profile could change header's info
show_profile();
echo "</div>\n";
do_footer();
function show_profile()
{
    global $user, $user_levels, $globals, $site_key, $current_user;
    echo '<div>';
    echo '<form  enctype="multipart/form-data" action="' . get_auth_link() . 'profile.php" method="post" id="thisform" AUTOCOMPLETE="off">';
    echo '<fieldset><legend>';
    echo '<span class="sign">' . _('opciones de usuario') . " <a href='" . get_user_uri($user->username) . "'>{$user->username}</a>: {$user->level}</span></legend>";
    echo '<img class="thumbnail" src="' . $globals['base_url'] . 'backend/get_avatar.php?id=' . $user->id . '&amp;size=80&amp;t=' . time() . '" width="80" height="80" alt="' . $user->username . '" />';
    echo '<input type="hidden" name="process" value="1" />';
    echo '<input type="hidden" name="user_id" value="' . $user->id . '" />';
    echo '<input type="hidden" name="form_hash" value="' . md5($site_key . $user->id . mnminclude) . '" />';
    get_form_auth_ip();
    echo '<p><label>' . _('usuario') . ':</label><br/>';
Example #8
0
				u.user_rank, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, 
				u.user_msnm, u.user_jabber, u.user_avatar, u.user_avatar_type, u.user_last_visit ' . $sql_fields . '
					FROM ' . USERS_TABLE . " u{$sql_from}\n\t\t\t\t\tWHERE u.user_type = " . USER_NORMAL . ' AND u.user_status = ' . STATUS_ACTIVE . "\n\t\t\t\t\t\t{$sql_where}\n\t\t\t\t\t\tORDER BY {$order_by}";
        $result = $_CLASS['core_db']->query_limit($sql, $config['topics_per_page'], $start);
        $id_cache = array();
        while ($row = $_CLASS['core_db']->fetch_row_assoc($result)) {
            if ($mode == 'group' && $row['member_status'] == STATUS_PENDING) {
                continue;
            }
            $row['session_time'] = !empty($session_times[$row['user_id']]) ? $session_times[$row['user_id']] : '';
            $id_cache[$row['user_id']] = $row;
        }
        $_CLASS['core_db']->free_result($result);
        foreach ($id_cache as $user_id => $row) {
            $option_row = $mode == 'group' && $row['member_status'] == STATUS_LEADER ? 'leader_row' : 'member_row';
            ${$option_row} = array_merge(show_profile($row), array('U_VIEWPROFILE' => generate_link('Members_List&amp;mode=viewprofile&amp;u=' . $row['user_id'])));
            $_CLASS['core_template']->assign_vars_array($option_row, ${$option_row});
            unset($id_cache[$user_id]);
        }
        // Generate page
        $_CLASS['core_template']->assign_array(array('PAGINATION' => generate_pagination($pagination_url2, $total_users, $config['topics_per_page'], $start), 'PAGE_NUMBER' => on_page($total_users, $config['topics_per_page'], $start), 'TOTAL_USERS' => $total_users == 1 ? $_CLASS['core_user']->lang['LIST_USER'] : sprintf($_CLASS['core_user']->lang['LIST_USERS'], $total_users), 'PROFILE_IMG' => $_CLASS['core_user']->img('btn_profile', $_CLASS['core_user']->lang['PROFILE']), 'PM_IMG' => $_CLASS['core_user']->img('btn_pm', $_CLASS['core_user']->lang['MESSAGE']), 'EMAIL_IMG' => $_CLASS['core_user']->img('btn_email', $_CLASS['core_user']->lang['EMAIL']), 'WWW_IMG' => $_CLASS['core_user']->img('btn_www', $_CLASS['core_user']->lang['WWW']), 'ICQ_IMG' => $_CLASS['core_user']->img('btn_icq', $_CLASS['core_user']->lang['ICQ']), 'AIM_IMG' => $_CLASS['core_user']->img('btn_aim', $_CLASS['core_user']->lang['AIM']), 'MSN_IMG' => $_CLASS['core_user']->img('btn_msnm', $_CLASS['core_user']->lang['MSNM']), 'YIM_IMG' => $_CLASS['core_user']->img('btn_yim', $_CLASS['core_user']->lang['YIM']), 'JABBER_IMG' => $_CLASS['core_user']->img('btn_jabber', $_CLASS['core_user']->lang['JABBER']), 'SEARCH_IMG' => $_CLASS['core_user']->img('btn_search', $_CLASS['core_user']->lang['SEARCH']), 'U_FIND_MEMBER' => !empty($config['load_search']) || $_CLASS['auth']->acl_get('a_') ? generate_link('Members_List&amp;mode=searchuser') : '', 'U_HIDE_FIND_MEMBER' => $mode == 'searchuser' ? generate_link($u_hide_find_member) : '', 'U_SORT_USERNAME' => generate_link($pagination_url . '&amp;sk=a&amp;sd=' . ($sort_key == 'a' && $sort_dir == 'a' ? 'd' : 'a')), 'U_SORT_FROM' => generate_link($pagination_url . '&amp;sk=b&amp;sd=' . ($sort_key == 'b' && $sort_dir == 'a' ? 'd' : 'a')), 'U_SORT_JOINED' => generate_link($pagination_url . '&amp;sk=c&amp;sd=' . ($sort_key == 'c' && $sort_dir == 'a' ? 'd' : 'a')), 'U_SORT_POSTS' => generate_link($pagination_url . '&amp;sk=d&amp;sd=' . ($sort_key == 'd' && $sort_dir == 'a' ? 'd' : 'a')), 'U_SORT_EMAIL' => generate_link($pagination_url . '&amp;sk=e&amp;sd=' . ($sort_key == 'e' && $sort_dir == 'a' ? 'd' : 'a')), 'U_SORT_WEBSITE' => generate_link($pagination_url . '&amp;sk=f&amp;sd=' . ($sort_key == 'f' && $sort_dir == 'a' ? 'd' : 'a')), 'U_SORT_ICQ' => generate_link($pagination_url . '&amp;sk=g&amp;sd=' . ($sort_key == 'g' && $sort_dir == 'a' ? 'd' : 'a')), 'U_SORT_AIM' => generate_link($pagination_url . '&amp;sk=h&amp;sd=' . ($sort_key == 'h' && $sort_dir == 'a' ? 'd' : 'a')), 'U_SORT_MSN' => generate_link($pagination_url . '&amp;sk=i&amp;sd=' . ($sort_key == 'i' && $sort_dir == 'a' ? 'd' : 'a')), 'U_SORT_YIM' => generate_link($pagination_url . '&amp;sk=j&amp;sd=' . ($sort_key == 'j' && $sort_dir == 'a' ? 'd' : 'a')), 'U_SORT_ACTIVE' => generate_link($pagination_url . '&amp;sk=k&amp;sd=' . ($sort_key == 'k' && $sort_dir == 'a' ? 'd' : 'a')), 'U_SORT_RANK' => generate_link($pagination_url . '&amp;sk=l&amp;sd=' . ($sort_key == 'l' && $sort_dir == 'a' ? 'd' : 'a')), 'U_LIST_CHAR' => generate_link($pagination_url . '&amp;sk=a&amp;sd=' . ($sort_key == 'l' && $sort_dir == 'a' ? 'd' : 'a')), 'S_SEND_MESSAGE' => $_CLASS['auth']->acl_get('u_sendpm') ? true : false, 'S_SHOW_GROUP' => $mode == 'group' ? true : false, 'S_MODE_SELECT' => $s_sort_key, 'S_ORDER_SELECT' => $s_sort_dir, 'S_CHAR_OPTIONS' => $s_char_options, 'S_MODE_ACTION' => generate_link($pagination_url . ($form ? "&amp;form={$form}" : ''))));
}
// Output the page
$_CLASS['core_template']->assign('DISPLAY_STYLESHEET_LINK', $window);
page_header();
$_CLASS['core_display']->display($page_title, 'modules/Members_List/' . $template_html);
script_close();
// ---------
// FUNCTIONS
//
function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img)
function get_user_info_func($xmlrpc_params)
{
    global $db, $user, $auth, $template, $config, $phpbb_root_path, $phpEx, $table_prefix;
    $user->setup(array('memberlist', 'groups'));
    if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) {
        if ($user->data['user_id'] != ANONYMOUS) {
            trigger_error('NO_VIEW_USERS');
        }
        trigger_error('LOGIN_EXPLAIN_VIEWPROFILE');
    }
    $params = php_xmlrpc_decode($xmlrpc_params);
    $username = $params[0];
    if (isset($params[1]) && !empty($params[1])) {
        $user_id = $params[1];
    } elseif (isset($params[0]) && !empty($params[0])) {
        $username = $params[0];
        $user_id = get_user_id_by_name($username);
    } else {
        $user_id = $user->data['user_id'];
    }
    $user_id = intval($user_id);
    // Display a profile
    if (!$user_id) {
        trigger_error('NO_USER');
    }
    // Get user...
    $sql = 'SELECT *
        FROM ' . USERS_TABLE . "\r\r\n        WHERE user_id = '{$user_id}'";
    $result = $db->sql_query($sql);
    $member = $db->sql_fetchrow($result);
    $db->sql_freeresult($result);
    if (!$member) {
        trigger_error('NO_USER');
    }
    // a_user admins and founder are able to view inactive users and bots to be able to manage them more easily
    // Normal users are able to see at least users having only changed their profile settings but not yet reactivated.
    if (!$auth->acl_get('a_user') && $user->data['user_type'] != USER_FOUNDER) {
        if ($member['user_type'] == USER_IGNORE) {
            trigger_error('NO_USER');
        } else {
            if ($member['user_type'] == USER_INACTIVE && $member['user_inactive_reason'] != INACTIVE_PROFILE) {
                trigger_error('NO_USER');
            }
        }
    }
    $user_id = (int) $member['user_id'];
    // Do the SQL thang
    $sql = 'SELECT g.group_id, g.group_name, g.group_type
        FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug\r\r\n        WHERE ug.user_id = {$user_id}\r\r\n            AND g.group_id = ug.group_id" . (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . '
            AND ug.user_pending = 0
        ORDER BY g.group_type, g.group_name';
    $result = $db->sql_query($sql);
    $group_options = '';
    while ($row = $db->sql_fetchrow($result)) {
        if ($row['group_type'] == GROUP_SPECIAL) {
            // Lookup group name in language dictionary
            if (isset($user->lang['G_' . $row['group_name']])) {
                $row['group_name'] = $user->lang['G_' . $row['group_name']];
            }
        } else {
            if (!$auth_hidden_groups && $row['group_type'] == GROUP_HIDDEN && !isset($user_groups[$row['group_id']])) {
                // Skip over hidden groups the user cannot see
                continue;
            }
        }
        $group_options .= $row['group_id'] == $member['group_id'] ? $row['group_name'] . " *\n" : $row['group_name'] . "\n";
    }
    $group_options = trim($group_options);
    $db->sql_freeresult($result);
    // What colour is the zebra
    $sql = 'SELECT friend, foe
        FROM ' . ZEBRA_TABLE . "\r\r\n        WHERE zebra_id = {$user_id}\r\r\n            AND user_id = {$user->data['user_id']}";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $foe = $row['foe'] ? true : false;
    $friend = $row['friend'] ? true : false;
    $db->sql_freeresult($result);
    if ($config['load_onlinetrack']) {
        if ($config['version'] < '3.0.3') {
            $sql = 'SELECT MAX(session_time) AS session_time, MIN(session_viewonline) AS session_viewonline, session_page
            FROM ' . SESSIONS_TABLE . "\r\r\n            WHERE session_user_id = {$user_id}\r\r\n            GROUP BY session_page\r\r\n            ORDER BY session_time DESC";
        } else {
            $sql = 'SELECT MAX(session_time) AS session_time, MIN(session_viewonline) AS session_viewonline, session_page, session_forum_id
            FROM ' . SESSIONS_TABLE . "\r\r\n            WHERE session_user_id = {$user_id}\r\r\n            GROUP BY session_page, session_forum_id\r\r\n            ORDER BY session_time DESC";
        }
        $result = $db->sql_query_limit($sql, 1);
        $row = $db->sql_fetchrow($result);
        $db->sql_freeresult($result);
        $member['session_time'] = isset($row['session_time']) ? $row['session_time'] : 0;
        $member['session_viewonline'] = isset($row['session_viewonline']) ? $row['session_viewonline'] : 0;
        $member['session_page'] = isset($row['session_page']) ? $row['session_page'] : 0;
        $member['session_forum_id'] = isset($row['session_forum_id']) ? $row['session_forum_id'] : 0;
        unset($row);
    }
    if ($config['load_user_activity']) {
        display_user_activity($member);
    }
    // Do the relevant calculations
    $memberdays = max(1, round((time() - $member['user_regdate']) / 86400));
    $posts_per_day = $member['user_posts'] / $memberdays;
    $percentage = $config['num_posts'] ? min(100, $member['user_posts'] / $config['num_posts'] * 100) : 0;
    if ($member['user_sig']) {
        $member['user_sig'] = censor_text($member['user_sig']);
        if ($member['user_sig_bbcode_bitfield']) {
            include_once $phpbb_root_path . 'includes/bbcode.' . $phpEx;
            $bbcode = new bbcode();
            $bbcode->bbcode_second_pass($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield']);
        }
        $member['user_sig'] = bbcode_nl2br($member['user_sig']);
        $member['user_sig'] = smiley_text($member['user_sig']);
    }
    $poster_avatar = get_user_avatar($member['user_avatar'], $member['user_avatar_type'], $member['user_avatar_width'], $member['user_avatar_height']);
    // We need to check if the modules 'zebra' ('friends' & 'foes' mode),  'notes' ('user_notes' mode) and  'warn' ('warn_user' mode) are accessible to decide if we can display appropriate links
    $zebra_enabled = $friends_enabled = $foes_enabled = $user_notes_enabled = $warn_user_enabled = false;
    // Only check if the user is logged in
    if ($user->data['is_registered']) {
        if (!class_exists('p_master')) {
            include $phpbb_root_path . 'includes/functions_module.' . $phpEx;
        }
        $module = new p_master();
        $module->list_modules('ucp');
        $module->list_modules('mcp');
        $user_notes_enabled = $module->loaded('notes', 'user_notes') ? true : false;
        $warn_user_enabled = $module->loaded('warn', 'warn_user') ? true : false;
        $zebra_enabled = $module->loaded('zebra') ? true : false;
        $friends_enabled = $module->loaded('zebra', 'friends') ? true : false;
        $foes_enabled = $module->loaded('zebra', 'foes') ? true : false;
        unset($module);
    }
    $template->assign_vars(show_profile($member, $user_notes_enabled, $warn_user_enabled));
    // Custom Profile Fields
    $profile_fields = array();
    if ($config['load_cpf_viewprofile']) {
        include_once $phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx;
        $cp = new custom_profile();
        $profile_fields = $cp->generate_profile_fields_template('grab', $user_id);
        $profile_fields = isset($profile_fields[$user_id]) ? $cp->generate_profile_fields_template('show', false, $profile_fields[$user_id]) : array();
    }
    // If the user has m_approve permission or a_user permission, then list then display unapproved posts
    if ($auth->acl_getf_global('m_approve') || $auth->acl_get('a_user')) {
        $sql = 'SELECT COUNT(post_id) as posts_in_queue
            FROM ' . POSTS_TABLE . '
            WHERE poster_id = ' . $user_id . '
                AND post_approved = 0';
        $result = $db->sql_query($sql);
        $member['posts_in_queue'] = (int) $db->sql_fetchfield('posts_in_queue');
        $db->sql_freeresult($result);
    } else {
        $member['posts_in_queue'] = 0;
    }
    $template->assign_vars(array('OCCUPATION' => !empty($member['user_occ']) ? censor_text($member['user_occ']) : '', 'INTERESTS' => !empty($member['user_interests']) ? censor_text($member['user_interests']) : '', 'SIGNATURE' => $member['user_sig'], 'POSTS_IN_QUEUE' => $member['posts_in_queue'], 'AVATAR_IMG' => $poster_avatar, 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']), 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']), 'WWW_IMG' => $user->img('icon_contact_www', $user->lang['WWW']), 'ICQ_IMG' => $user->img('icon_contact_icq', $user->lang['ICQ']), 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']), 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']), 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']), 'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']), 'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']), 'S_PROFILE_ACTION' => append_sid("{$phpbb_root_path}memberlist.{$phpEx}", 'mode=group'), 'S_GROUP_OPTIONS' => $group_options, 'S_CUSTOM_FIELDS' => isset($profile_fields['row']) && sizeof($profile_fields['row']) ? true : false, 'U_USER_ADMIN' => $auth->acl_get('a_user') ? append_sid("{$phpbb_root_path}adm/index.{$phpEx}", 'i=users&amp;mode=overview&amp;u=' . $user_id, true, $user->session_id) : '', 'U_USER_BAN' => $auth->acl_get('m_ban') && $user_id != $user->data['user_id'] ? append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'i=ban&amp;mode=user&amp;u=' . $user_id, true, $user->session_id) : '', 'U_MCP_QUEUE' => $auth->acl_getf_global('m_approve') ? append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'i=queue', true, $user->session_id) : '', 'S_USER_NOTES' => $user_notes_enabled ? true : false, 'S_WARN_USER' => $warn_user_enabled ? true : false, 'S_ZEBRA' => $user->data['user_id'] != $user_id && $user->data['is_registered'] && $zebra_enabled ? true : false, 'U_ADD_FRIEND' => !$friend && !$foe && $friends_enabled ? append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=zebra&amp;add=' . urlencode(htmlspecialchars_decode($member['username']))) : '', 'U_ADD_FOE' => !$friend && !$foe && $foes_enabled ? append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=zebra&amp;mode=foes&amp;add=' . urlencode(htmlspecialchars_decode($member['username']))) : '', 'U_REMOVE_FRIEND' => $friend && $friends_enabled ? append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=zebra&amp;remove=1&amp;usernames[]=' . $user_id) : '', 'U_REMOVE_FOE' => $foe && $foes_enabled ? append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=zebra&amp;remove=1&amp;mode=foes&amp;usernames[]=' . $user_id) : ''));
    if (!empty($profile_fields['row'])) {
        $template->assign_vars($profile_fields['row']);
    }
    if (!empty($profile_fields['blockrow'])) {
        foreach ($profile_fields['blockrow'] as $field_data) {
            $template->assign_block_vars('custom_fields', $field_data);
        }
    }
    // Inactive reason/account?
    if ($member['user_type'] == USER_INACTIVE) {
        $user->add_lang('acp/common');
        $inactive_reason = $user->lang['INACTIVE_REASON_UNKNOWN'];
        switch ($member['user_inactive_reason']) {
            case INACTIVE_REGISTER:
                $inactive_reason = $user->lang['INACTIVE_REASON_REGISTER'];
                break;
            case INACTIVE_PROFILE:
                $inactive_reason = $user->lang['INACTIVE_REASON_PROFILE'];
                break;
            case INACTIVE_MANUAL:
                $inactive_reason = $user->lang['INACTIVE_REASON_MANUAL'];
                break;
            case INACTIVE_REMIND:
                $inactive_reason = $user->lang['INACTIVE_REASON_REMIND'];
                break;
        }
        $template->assign_vars(array('S_USER_INACTIVE' => true, 'USER_INACTIVE_REASON' => $inactive_reason));
    }
    $custom_fields_list = get_custom_fields();
    if (!empty($member['user_sig'])) {
        $custom_fields_list[] = new xmlrpcval(array('name' => new xmlrpcval($user->lang['SIGNATURE'], 'base64'), 'value' => new xmlrpcval(basic_clean($member['user_sig']), 'base64')), 'struct');
    }
    if ($member['user_id'] == $user->data['user_id'] && push_table_exists()) {
        $sql = "SELECT * FROM " . $table_prefix . "tapatalk_users WHERE userid = '" . $member['user_id'] . "'";
        $result = $db->sql_query($sql);
        $row = $db->sql_fetchrow($result);
        if (!empty($row)) {
            array_push($custom_fields_list, new xmlrpcval(array('name' => new xmlrpcval('Notification - Message', 'base64'), 'value' => new xmlrpcval($row['pm'] ? 'On' : 'Off', 'base64')), 'struct'));
            array_push($custom_fields_list, new xmlrpcval(array('name' => new xmlrpcval('Notification - Quoted', 'base64'), 'value' => new xmlrpcval($row['quote'] ? 'On' : 'Off', 'base64')), 'struct'));
            array_push($custom_fields_list, new xmlrpcval(array('name' => new xmlrpcval('Notification - Mentioned', 'base64'), 'value' => new xmlrpcval($row['tag'] ? 'On' : 'Off', 'base64')), 'struct'));
            array_push($custom_fields_list, new xmlrpcval(array('name' => new xmlrpcval('Notification - New Topic', 'base64'), 'value' => new xmlrpcval($row['newtopic'] ? 'On' : 'Off', 'base64')), 'struct'));
            array_push($custom_fields_list, new xmlrpcval(array('name' => new xmlrpcval('Notification - Replies', 'base64'), 'value' => new xmlrpcval($row['subscribe'] ? 'On' : 'Off', 'base64')), 'struct'));
        }
    }
    $user_avatar_url = get_user_avatar_url($member['user_avatar'], $member['user_avatar_type']);
    // Forum info
    $sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id
        FROM ' . FORUMS_TABLE . '
        ORDER BY left_id ASC';
    $result = $db->sql_query($sql, 600);
    $forum_data = array();
    while ($row = $db->sql_fetchrow($result)) {
        $forum_data[$row['forum_id']] = $row;
    }
    $db->sql_freeresult($result);
    // get user current activity
    preg_match('#^([a-z0-9/_-]+)#i', $member['session_page'], $on_page);
    if (!sizeof($on_page)) {
        $on_page[1] = '';
    }
    switch ($on_page[1]) {
        case 'index':
            $location = $user->lang['INDEX'];
            break;
        case 'adm/index':
            $location = $user->lang['ACP'];
            break;
        case 'posting':
        case 'viewforum':
        case 'viewtopic':
            $forum_id = $member['session_forum_id'];
            if ($forum_id && $auth->acl_get('f_list', $forum_id)) {
                $location = '';
                if ($forum_data[$forum_id]['forum_type'] == FORUM_LINK) {
                    $location = sprintf($user->lang['READING_LINK'], $forum_data[$forum_id]['forum_name']);
                    break;
                }
                switch ($on_page[1]) {
                    case 'posting':
                        preg_match('#mode=([a-z]+)#', $member['session_page'], $on_page);
                        $posting_mode = !empty($on_page[1]) ? $on_page[1] : '';
                        switch ($posting_mode) {
                            case 'reply':
                            case 'quote':
                                $location = sprintf($user->lang['REPLYING_MESSAGE'], $forum_data[$forum_id]['forum_name']);
                                break;
                            default:
                                $location = sprintf($user->lang['POSTING_MESSAGE'], $forum_data[$forum_id]['forum_name']);
                                break;
                        }
                        break;
                    case 'viewtopic':
                        $location = sprintf($user->lang['READING_TOPIC'], $forum_data[$forum_id]['forum_name']);
                        break;
                    case 'viewforum':
                        $location = sprintf($user->lang['READING_FORUM'], $forum_data[$forum_id]['forum_name']);
                        break;
                }
            } else {
                $location = $user->lang['INDEX'];
            }
            break;
        case 'search':
            $location = $user->lang['SEARCHING_FORUMS'];
            break;
        case 'faq':
            $location = $user->lang['VIEWING_FAQ'];
            break;
        case 'viewonline':
            $location = $user->lang['VIEWING_ONLINE'];
            break;
        case 'memberlist':
            $location = strpos($member['session_page'], 'mode=viewprofile') !== false ? $user->lang['VIEWING_MEMBER_PROFILE'] : $user->lang['VIEWING_MEMBERS'];
            break;
        case 'mcp':
            $location = $user->lang['VIEWING_MCP'];
            break;
        case 'ucp':
            $location = $user->lang['VIEWING_UCP'];
            // Grab some common modules
            $url_params = array('mode=register' => 'VIEWING_REGISTER', 'i=pm&mode=compose' => 'POSTING_PRIVATE_MESSAGE', 'i=pm&' => 'VIEWING_PRIVATE_MESSAGES', 'i=profile&' => 'CHANGING_PROFILE', 'i=prefs&' => 'CHANGING_PREFERENCES');
            foreach ($url_params as $param => $lang) {
                if (strpos($member['session_page'], $param) !== false) {
                    $location = $user->lang[$lang];
                    break;
                }
            }
            break;
        case 'download/file':
            $location = $user->lang['DOWNLOADING_FILE'];
            break;
        case 'report':
            $location = $user->lang['REPORTING_POST'];
            break;
        case 'mobiquo/mobiquo':
            $location = 'On Tapatalk';
            break;
        default:
            $location = $user->lang['INDEX'];
            break;
    }
    $user_info = array('user_id' => new xmlrpcval($member['user_id']), 'username' => new xmlrpcval(basic_clean($member['username']), 'base64'), 'user_type' => check_return_user_type($member['username']), 'post_count' => new xmlrpcval($member['user_posts'], 'int'), 'reg_time' => new xmlrpcval(mobiquo_iso8601_encode($member['user_regdate']), 'dateTime.iso8601'), 'timestamp_reg' => new xmlrpcval($member['user_regdate'], 'string'), 'last_activity_time' => new xmlrpcval(mobiquo_iso8601_encode($template->_rootref['VISITED']), 'dateTime.iso8601'), 'timestamp' => new xmlrpcval($template->_rootref['VISITED'], 'string'), 'is_online' => new xmlrpcval($template->_rootref['S_ONLINE'], 'boolean'), 'accept_pm' => new xmlrpcval($template->_rootref['U_PM'] ? true : false, 'boolean'), 'display_text' => new xmlrpcval('', 'base64'), 'icon_url' => new xmlrpcval($user_avatar_url), 'current_activity' => new xmlrpcval($location, 'base64'), 'custom_fields_list' => new xmlrpcval($custom_fields_list, 'array'));
    $xmlrpc_user_info = new xmlrpcval($user_info, 'struct');
    return new xmlrpcresp($xmlrpc_user_info);
}
Example #10
0
        echo '<tr><td>' . $no_due_date . ':</td><td>';
        $datepicker->print_date_picker('due_date', $_SESSION['GO_SESSION']['date_format'], $due_date);
        echo '</td></tr>';
        $select = new select('user', 'notes_form', 'responsible_user_id', $responsible_user_id);
        echo '<tr><td>';
        $select->print_link($no_responsible);
        echo ':</td><td>';
        $select->print_field();
        echo '</td></tr>';
        ?>
	  </table>
	  </td>
	  <td valign="top">
	  <table border="0" cellspacing="0" cellpadding="4">
	  <?php 
        echo '<tr><td>' . $strOwner . ':</td><td>' . show_profile($user_id, '', 'normal', $link_back) . '</td></tr>';
        echo '<tr><td>' . $strCreatedAt . ':</td><td>' . $ctime . '</td><tr>';
        echo '<tr><td>' . $strModifiedAt . ':</td><td>' . $mtime . '</td><tr>';
        if ($project_id > 0) {
            $projects = new projects();
            if ($project = $projects->get_project($project_id)) {
                $project_name = $project['description'] == '' ? $project['name'] : $project['name'] . ' (' . $project['description'] . ')';
                if ($projects_module && ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $projects_module['acl_read']) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $projects_module['acl_write']))) {
                    echo '<tr><td>' . $no_project . ':</td><td><a href="' . $projects_module['url'] . 'project.php?project_id=' . $project_id . '&return_to=' . urlencode($_SERVER['REQUEST_URI']) . '" class="normal">' . htmlspecialchars($project_name) . '</a></td><tr>';
                } else {
                    echo '<tr><td>' . $no_project . ':</td><td>' . htmlspecialchars($project_name) . '</td><tr>';
                }
            }
        } elseif ($contact_id > 0) {
            echo '<tr><td>' . $no_contact . ':</td><td>' . show_contact($contact_id, '', $link_back) . '</td><tr>';
        } elseif ($file_path != '' && ($fs_module = $GO_MODULES->get_module('filesystem'))) {
Example #11
0
        $feedback = "<P class=\"Error\">" . $strAccessDenied . "</p>";
    }
}
$page_title = $groups_title;
require $GO_THEME->theme_path . "header.inc";
$tabtable = new tabtable('groups', $groups_title, '600', '300');
$tabtable->print_head();
echo '<table cellpadding="4" cellspacing="0" border="0">';
if (isset($feedback)) {
    echo $feedback;
}
echo '<tr height="30"><td colspan="3"><a href="' . $GO_CONFIG->host . 'configuration/groups/group.php" class="normal">' . $cmdAdd . '</a></td></tr>';
echo '<tr><td><h3>' . $strName . '</h3></td>';
echo '<td><h3>' . $strOwner . '</h3></td><td>&nbsp;</td></tr>';
//show the groups the user is in and owns.
$GO_GROUPS->get_authorised_groups($GO_SECURITY->user_id);
while ($GO_GROUPS->next_record()) {
    echo '<tr>';
    echo "<td><a class=\"normal\" href=\"group.php?group_id=" . $GO_GROUPS->f("id") . "&group_name=" . $GO_GROUPS->f("name") . "\">" . $GO_GROUPS->f("name") . "</a></td>\n";
    echo "<td>" . show_profile($GO_GROUPS->f("user_id")) . "</td>\n";
    echo "<td><a href='javascript:div_confirm_action(\"" . $_SERVER['PHP_SELF'] . "?delete_group=" . $GO_GROUPS->f("id") . "\",\"" . div_confirm_id($strDeletePrefix . "'" . $GO_GROUPS->f("name") . "'" . $strDeleteSuffix) . "\")' title=\"" . $strDeleteItem . " '" . $GO_GROUPS->f("name") . "'\"><img src=\"" . $GO_THEME->images['delete'] . "\" border=\"0\"></a></td>\n";
    echo "</tr>";
    if ($GO_GROUPS->f("id") == 2) {
        echo '<tr><td colspan=3><hr></td></tr>';
    }
}
echo '</table>';
echo '<br />';
$button = new button($cmdClose, "javascript:document.location='" . $GO_CONFIG->host . "configuration/'");
$tabtable->print_foot();
require $GO_THEME->theme_path . "footer.inc";
Example #12
0
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
require_once "../inc/util.inc";
require_once "../inc/uotd.inc";
require_once "../inc/profile.inc";
check_get_args(array());
db_init();
$profile = get_current_uotd();
if (!$profile) {
    echo tra("No user of the day has been chosen.");
} else {
    $d = gmdate("d F Y", time());
    $user = lookup_user_id($profile->userid);
    page_head(tra("User of the Day for %1: %2", $d, $user->name));
    start_table();
    show_profile($user, get_logged_in_user(false));
    end_table();
}
page_tail();
Example #13
0
                unlink($file);
            }
            if (move_uploaded_file($_FILES['profile_pic_upload']['tmp_name'], $FileDir)) {
                $connectedUser->_setPhoto(true);
            }
        }
    }
    setcookie("color", $_POST['editColor'], time() + 100000);
    setcookie("police", $_POST['editPolice'], time() + 100000);
    updateTouitos($bd, $connectedUser);
}
include 'nav.php';
?>

	<div id="pageDisplay">

	<?php 
if (isset($_GET['user'])) {
    $th = new TouitosHandler($bd);
    $usr = $th->getByAttr("pseudo", $_GET['user'], PDO::PARAM_STR);
    if ($usr != null) {
        show_profile($usr, $bd);
    }
} else {
    searchByName("", $bd);
}
?>

	</div>
</body>
</html>
Example #14
0
            echo '<tr><td>' . $pm_budget . ':</td><td>' . $budget . ' ' . $_SESSION['GO_SESSION']['currency'] . '</td></tr>';
        }
        $fee_count = $projects->get_fees();
        if ($fee_count > 0) {
            echo '<tr><td>' . $pm_fee . '</td><td>';
            $dropbox = new dropbox();
            while ($projects->next_record()) {
                $dropbox->add_value($projects->f('id'), $projects->f('name') . ' (' . htmlentities($_SESSION['GO_SESSION']['currency']) . '&nbsp;' . number_format($projects->f('value'), 2, $_SESSION['GO_SESSION']['decimal_seperator'], $_SESSION['GO_SESSION']['thousands_seperator']) . '&nbsp;/&nbsp;' . $projects->f('time') . '&nbsp;' . $pm_mins . ')');
            }
            $disabled = $project_id < 1 || $project['user_id'] == $GO_SECURITY->user_id ? '' : 'disabled';
            $dropbox->print_dropbox('fee_id', $fee_id, $disabled);
        } else {
            echo '<input type="hidden" name="fee_id" value="0" />';
        }
        if ($project_id > 0) {
            echo '<tr><td>' . $strOwner . ':</td><td>' . show_profile($project['user_id']) . '</td></tr>';
            echo '<tr><td>' . $strCreatedAt . ':</td><td>' . date($_SESSION['GO_SESSION']['date_format'] . ' ' . $_SESSION['GO_SESSION']['time_format'], $project['ctime'] + $_SESSION['GO_SESSION']['timezone'] * 3600) . '</td><tr>';
            echo '<tr><td>' . $strModifiedAt . ':</td><td>' . date($_SESSION['GO_SESSION']['date_format'] . ' ' . $_SESSION['GO_SESSION']['time_format'], $project['mtime'] + $_SESSION['GO_SESSION']['timezone'] * 3600) . '</td><tr>';
        }
        ?>
                  <tr>
                  <td valign="top"><?php 
        echo $strComments;
        ?>
:</td>
                <td>
                <?php 
        if ($project_id < 1 || $project['user_id'] == $GO_SECURITY->user_id) {
            $disabled = isset($pstate) && $pstate == STATUS_DROP ? 'disabled' : '';
            echo '<textarea name="comments" cols="50" rows="4" class="textbox" ' . $disabled . '>' . $comments . '</textarea>';
        } else {
Example #15
0
            }
            // If we sort by last active date we need to adjust the id cache due to user_lastvisit not being the last active date...
            if ($sort_key == 'l') {
                //				uasort($id_cache, create_function('$first, $second', "return (\$first['last_visit'] == \$second['last_visit']) ? 0 : ((\$first['last_visit'] < \$second['last_visit']) ? $lesser_than : ($lesser_than * -1));"));
                usort($user_list, '_sort_last_active');
            }
            for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i) {
                $user_id = $user_list[$i];
                $row =& $id_cache[$user_id];
                $is_leader = isset($row['group_leader']) && $row['group_leader'] ? true : false;
                $leaders_set = $leaders_set || $is_leader;
                $cp_row = array();
                if ($config['load_cpf_memberlist']) {
                    $cp_row = isset($profile_fields_cache[$user_id]) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$user_id]) : array();
                }
                $memberrow = array_merge(show_profile($row), array('ROW_NUMBER' => $i + ($start + 1), 'S_CUSTOM_PROFILE' => isset($cp_row['row']) && sizeof($cp_row['row']) ? true : false, 'S_GROUP_LEADER' => $is_leader, 'U_VIEW_PROFILE' => append_sid("{$phpbb_root_path}memberlist.{$phpEx}", 'mode=viewprofile&amp;u=' . $user_id)));
                if (isset($cp_row['row']) && sizeof($cp_row['row'])) {
                    $memberrow = array_merge($memberrow, $cp_row['row']);
                }
                $template->assign_block_vars('memberrow', $memberrow);
                if (isset($cp_row['blockrow']) && sizeof($cp_row['blockrow'])) {
                    foreach ($cp_row['blockrow'] as $field_data) {
                        $template->assign_block_vars('memberrow.custom_fields', $field_data);
                    }
                }
                unset($id_cache[$user_id]);
            }
        }
        // Generate page
        $template->assign_vars(array('PAGINATION' => generate_pagination($pagination_url, $total_users, $config['topics_per_page'], $start), 'PAGE_NUMBER' => on_page($total_users, $config['topics_per_page'], $start), 'TOTAL_USERS' => $total_users == 1 ? $user->lang['LIST_USER'] : sprintf($user->lang['LIST_USERS'], $total_users), 'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['PROFILE']), 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']), 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']), 'WWW_IMG' => $user->img('icon_contact_www', $user->lang['WWW']), 'ICQ_IMG' => $user->img('icon_contact_icq', $user->lang['ICQ']), 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']), 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']), 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']), 'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']), 'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']), 'U_FIND_MEMBER' => $config['load_search'] || $auth->acl_get('a_') ? append_sid("{$phpbb_root_path}memberlist.{$phpEx}", 'mode=searchuser' . ($start ? "&amp;start={$start}" : '') . (!empty($params) ? '&amp;' . implode('&amp;', $params) : '')) : '', 'U_HIDE_FIND_MEMBER' => $mode == 'searchuser' ? $u_hide_find_member : '', 'U_SORT_USERNAME' => $sort_url . '&amp;sk=a&amp;sd=' . ($sort_key == 'a' && $sort_dir == 'a' ? 'd' : 'a'), 'U_SORT_FROM' => $sort_url . '&amp;sk=b&amp;sd=' . ($sort_key == 'b' && $sort_dir == 'a' ? 'd' : 'a'), 'U_SORT_JOINED' => $sort_url . '&amp;sk=c&amp;sd=' . ($sort_key == 'c' && $sort_dir == 'a' ? 'd' : 'a'), 'U_SORT_POSTS' => $sort_url . '&amp;sk=d&amp;sd=' . ($sort_key == 'd' && $sort_dir == 'a' ? 'd' : 'a'), 'U_SORT_EMAIL' => $sort_url . '&amp;sk=e&amp;sd=' . ($sort_key == 'e' && $sort_dir == 'a' ? 'd' : 'a'), 'U_SORT_WEBSITE' => $sort_url . '&amp;sk=f&amp;sd=' . ($sort_key == 'f' && $sort_dir == 'a' ? 'd' : 'a'), 'U_SORT_LOCATION' => $sort_url . '&amp;sk=b&amp;sd=' . ($sort_key == 'b' && $sort_dir == 'a' ? 'd' : 'a'), 'U_SORT_ICQ' => $sort_url . '&amp;sk=g&amp;sd=' . ($sort_key == 'g' && $sort_dir == 'a' ? 'd' : 'a'), 'U_SORT_AIM' => $sort_url . '&amp;sk=h&amp;sd=' . ($sort_key == 'h' && $sort_dir == 'a' ? 'd' : 'a'), 'U_SORT_MSN' => $sort_url . '&amp;sk=i&amp;sd=' . ($sort_key == 'i' && $sort_dir == 'a' ? 'd' : 'a'), 'U_SORT_YIM' => $sort_url . '&amp;sk=j&amp;sd=' . ($sort_key == 'j' && $sort_dir == 'a' ? 'd' : 'a'), 'U_SORT_ACTIVE' => $auth->acl_get('u_viewonline') ? $sort_url . '&amp;sk=l&amp;sd=' . ($sort_key == 'l' && $sort_dir == 'a' ? 'd' : 'a') : '', 'U_SORT_RANK' => $sort_url . '&amp;sk=m&amp;sd=' . ($sort_key == 'm' && $sort_dir == 'a' ? 'd' : 'a'), 'U_LIST_CHAR' => $sort_url . '&amp;sk=a&amp;sd=' . ($sort_key == 'l' && $sort_dir == 'a' ? 'd' : 'a'), 'S_SHOW_GROUP' => $mode == 'group' ? true : false, 'S_VIEWONLINE' => $auth->acl_get('u_viewonline'), 'S_LEADERS_SET' => $leaders_set, 'S_MODE_SELECT' => $s_sort_key, 'S_ORDER_SELECT' => $s_sort_dir, 'S_CHAR_OPTIONS' => $s_char_options, 'S_MODE_ACTION' => $pagination_url));
}
			}

			for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i)
			{
				$user_id = $user_list[$i];
				$row =& $id_cache[$user_id];
				$is_leader = (isset($row['group_leader']) && $row['group_leader']) ? true : false;
				$leaders_set = ($leaders_set || $is_leader);

				$cp_row = array();
				if ($config['load_cpf_memberlist'])
				{
					$cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$user_id]) : array();
				}

				$memberrow = array_merge(show_profile($row), array(
					'ROW_NUMBER'		=> $i + ($start + 1),

					'S_CUSTOM_PROFILE'	=> (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
					'S_GROUP_LEADER'	=> $is_leader,

					'U_VIEW_PROFILE'	=> append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $user_id))
				);

				if (isset($cp_row['row']) && sizeof($cp_row['row']))
				{
					$memberrow = array_merge($memberrow, $cp_row['row']);
				}

				$template->assign_block_vars('memberrow', $memberrow);
Example #17
0
     echo 'Message:';
     echo '<br/>';
     echo '<textarea  cols="70" rows="4" class="textbox" name="message"></textarea>';
     echo '<br/>';
     echo '<br/>';
     $button = new button();
     echo $button->get_button('Send', "document.forms[0].task.value='send';document.forms[0].submit();");
     break;
 case 'messages':
     echo '<br/>';
     echo '<br/>';
     echo '<table width="100%" cellpadding="0" cellspacing="0">';
     echo '<tr><td class="TableHead2"><input name="dummy" value="dummy" onclick="javascript:invert_selection()" type="checkbox"></td><td class="TableHead2" width="30%">Sender</td><td class="TableHead2" width="100%">Message</td></tr>';
     $db->query("SELECT * FROM messages_messages WHERE user_id='{$GO_SECURITY->user_id}'ORDER BY ctime DESC");
     while ($db->next_record()) {
         $sender = show_profile($db->f('user_id'), '', 'normal', $link_back);
         $message = htmlspecialchars($db->f('text'));
         echo "<tr id=\"" . $db->f('id') . "\"><td><input id=\"C_" . $db->f('id') . "\" type=\"checkbox\" name=\"msgs[]\" value=\"" . $db->f('id') . "\" onclick=\"javascript:item_click(this)\" /></td><td>{$sender}</td><td>{$message}</td></tr>";
         echo '<tr><td colspan="99" height="1"><img src="' . $GO_THEME->images['cccccc'] . '" border="0" height="1" width="100%" /></td></tr>';
     }
     echo '</table>';
     $button = new button();
     echo '<br/>';
     echo $button->get_button('Delete', "document.forms[0].task.value='delete';document.forms[0].submit();");
     break;
 case 'properties':
     if (!$db->query("SELECT * from messages_users WHERE user_id={$GO_SECURITY->user_id}") || !$db->next_record()) {
         $acl_write = $GO_SECURITY->get_new_acl('message write: ' . $GO_SECURITY->user_id);
         if ($acl_write > 0) {
             $db->query("INSERT INTO messages_users (user_id,acl_write) VALUES ('{$GO_SECURITY->user_id}','{$acl_write}')");
         }
		<td><?php 
echo $strName;
?>
:</td>
		<td><?php 
echo $event['name'];
?>
</td>
	</tr>
	<tr>
		<td><?php 
echo $strOwner;
?>
:</td>
		<td><?php 
echo show_profile($event['user_id'], '', 'normal');
?>
</td>
	</tr>

	<?php 
if ($event['contact_id'] > 0) {
    echo '<tr><td>' . $sc_client . ':</td>';
    echo '<td>' . show_contact($event['contact_id'], '', rawurlencode($_SERVER['REQUEST_URI'])) . '</td></tr>';
}
if ($event['description'] != '') {
    echo '<tr><td valign="top">' . $strDescription . ':</td>';
    echo '<td>' . text_to_html($event['description']) . '</td></tr>';
}
if ($event['location'] != '') {
    echo '<tr><td>' . $sc_location . ':</td>';