aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/memberlist.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r--phpBB/memberlist.php86
1 files changed, 43 insertions, 43 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index bfa4e6eceb..3477e5ae4e 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -12,10 +12,10 @@
* @ignore
*/
define('IN_PHPBB', true);
-$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
-$phpEx = substr(strrchr(__FILE__, '.'), 1);
-include($phpbb_root_path . 'common.' . $phpEx);
-include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './');
+if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
+include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
+include(PHPBB_ROOT_PATH . 'includes/functions_display.' . PHP_EXT);
// Start session management
$user->session_begin();
@@ -72,7 +72,7 @@ switch ($mode)
{
case 'leaders':
// Display a listing of board admins, moderators
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT);
$page_title = $user->lang['THE_TEAM'];
$template_html = 'memberlist_leaders.html';
@@ -234,7 +234,7 @@ switch ($mode)
else
{
$group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
- $u_group = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']);
+ $u_group = append_sid('memberlist', 'mode=group&g=' . $row['group_id']);
}
$rank_title = $rank_img = '';
@@ -251,7 +251,7 @@ switch ($mode)
'RANK_IMG_SRC' => $rank_img_src,
'U_GROUP' => $u_group,
- 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
+ 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
@@ -297,7 +297,7 @@ switch ($mode)
$lang = 'JABBER';
$sql_field = 'user_jabber';
$s_select = (@extension_loaded('xml') && $config['jab_enable']) ? 'S_SEND_JABBER' : 'S_NO_SEND_JABBER';
- $s_action = append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=$action&u=$user_id");
+ $s_action = append_sid('memberlist', "mode=contact&action=$action&u=$user_id");
break;
default:
@@ -334,7 +334,7 @@ switch ($mode)
if (check_form_key('memberlist_messaging'))
{
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ include_once(PHPBB_ROOT_PATH . 'includes/functions_messenger.' . PHP_EXT);
$subject = sprintf($user->lang['IM_JABBER_SUBJECT'], $user->data['username'], $config['server_name']);
$message = utf8_normalize_nfc(request_var('message', '', true));
@@ -489,7 +489,7 @@ switch ($mode)
if ($member['user_sig_bbcode_bitfield'])
{
- include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ include_once(PHPBB_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
$bbcode = new bbcode();
$bbcode->bbcode_second_pass($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield']);
}
@@ -506,7 +506,7 @@ switch ($mode)
$profile_fields = array();
if ($config['load_cpf_viewprofile'])
{
- include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
+ include_once(PHPBB_ROOT_PATH . 'includes/functions_profile_fields.' . PHP_EXT);
$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();
@@ -517,7 +517,7 @@ switch ($mode)
if ($user->data['user_id'] != $user_id && $user->data['is_registered'])
{
- include_once($phpbb_root_path . 'includes/functions_module.' . $phpEx);
+ include_once(PHPBB_ROOT_PATH . 'includes/functions_module.' . PHP_EXT);
$module = new p_master();
$module->list_modules('ucp');
$module->set_active('zebra');
@@ -546,18 +546,18 @@ switch ($mode)
'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_PROFILE_ACTION' => append_sid('memberlist', '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&mode=overview&u=' . $user_id, true, $user->session_id) : '',
- 'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_id) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&u={$user_id}") : '',
+ 'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid(CONFIG_ADM_FOLDER . '/index', 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '',
+ 'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_id) ? append_sid('ucp', "mode=switch_perm&u={$user_id}") : '',
'S_ZEBRA' => ($user->data['user_id'] != $user_id && $user->data['is_registered'] && $zebra_enabled) ? true : false,
- 'U_ADD_FRIEND' => (!$friend) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&add=' . urlencode(htmlspecialchars_decode($member['username']))) : '',
- 'U_ADD_FOE' => (!$foe) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&mode=foes&add=' . urlencode(htmlspecialchars_decode($member['username']))) : '',
- 'U_REMOVE_FRIEND' => ($friend) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&usernames[]=' . $user_id) : '',
- 'U_REMOVE_FOE' => ($foe) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&mode=foes&usernames[]=' . $user_id) : '',
+ 'U_ADD_FRIEND' => (!$friend) ? append_sid('ucp', 'i=zebra&add=' . urlencode(htmlspecialchars_decode($member['username']))) : '',
+ 'U_ADD_FOE' => (!$foe) ? append_sid('ucp', 'i=zebra&mode=foes&add=' . urlencode(htmlspecialchars_decode($member['username']))) : '',
+ 'U_REMOVE_FRIEND' => ($friend) ? append_sid('ucp', 'i=zebra&remove=1&usernames[]=' . $user_id) : '',
+ 'U_REMOVE_FOE' => ($foe) ? append_sid('ucp', 'i=zebra&remove=1&mode=foes&usernames[]=' . $user_id) : '',
));
if (!empty($profile_fields['row']))
@@ -765,7 +765,7 @@ switch ($mode)
WHERE user_id = ' . $user->data['user_id'];
$result = $db->sql_query($sql);
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ include_once(PHPBB_ROOT_PATH . 'includes/functions_messenger.' . PHP_EXT);
$messenger = new messenger(false);
$email_tpl = ($user_id) ? 'profile_send_email' : 'email_notify';
@@ -832,15 +832,15 @@ switch ($mode)
{
$messenger->assign_vars(array(
'TOPIC_NAME' => htmlspecialchars_decode($row['topic_title']),
- 'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=" . $row['forum_id'] . "&t=$topic_id")
+ 'U_TOPIC' => generate_board_url() . '/viewtopic.' . PHP_EXT . '?f=' . $row['forum_id'] . "&t=$topic_id")
);
}
$messenger->send($notify_type);
}
- meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
- $message = ($user_id) ? sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>') : sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$row['forum_id']}&amp;t=$topic_id") . '">', '</a>');
+ meta_refresh(3, append_sid('index'));
+ $message = ($user_id) ? sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid('index') . '">', '</a>') : sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid('viewtopic', "f={$row['forum_id']}&amp;t=$topic_id") . '">', '</a>');
trigger_error($user->lang['EMAIL_SENT'] . '<br /><br />' . $message);
}
}
@@ -852,7 +852,7 @@ switch ($mode)
'USERNAME' => $row['username'],
'L_EMAIL_BODY_EXPLAIN' => $user->lang['EMAIL_BODY_EXPLAIN'],
- 'S_POST_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&amp;u=' . $user_id))
+ 'S_POST_ACTION' => append_sid('memberlist', 'mode=email&amp;u=' . $user_id))
);
}
else
@@ -863,7 +863,7 @@ switch ($mode)
'S_LANG_OPTIONS' => language_select($email_lang),
'L_EMAIL_BODY_EXPLAIN' => $user->lang['EMAIL_TOPIC_EXPLAIN'],
- 'S_POST_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&amp;t=' . $topic_id))
+ 'S_POST_ACTION' => append_sid('memberlist', 'mode=email&amp;t=' . $topic_id))
);
}
@@ -1135,7 +1135,7 @@ switch ($mode)
'RANK_IMG' => $rank_img,
'RANK_IMG_SRC' => $rank_img_src,
- 'U_PM' => ($auth->acl_get('u_sendpm') && $auth->acl_get('u_masspm') && $group_row['group_receive_pm'] && $config['allow_privmsg'] && $config['allow_mass_pm']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;g=' . $group_id) : '',)
+ 'U_PM' => ($auth->acl_get('u_sendpm') && $auth->acl_get('u_masspm') && $group_row['group_receive_pm'] && $config['allow_privmsg'] && $config['allow_mass_pm']) ? append_sid('ucp', 'i=pm&amp;mode=compose&amp;g=' . $group_id) : '',)
);
$sql_select = ', ug.group_leader';
@@ -1229,12 +1229,12 @@ switch ($mode)
}
}
- $u_hide_find_member = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&amp;', $params));
+ $u_hide_find_member = append_sid('memberlist', implode('&amp;', $params));
$params[] = "mode=$mode";
$sort_params[] = "mode=$mode";
- $pagination_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&amp;', $params));
- $sort_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&amp;', $sort_params));
+ $pagination_url = append_sid('memberlist', implode('&amp;', $params));
+ $sort_url = append_sid('memberlist', implode('&amp;', $sort_params));
unset($params, $sort_params);
@@ -1302,7 +1302,7 @@ switch ($mode)
'S_JOINED_TIME_OPTIONS' => $s_find_join_time,
'S_ACTIVE_TIME_OPTIONS' => $s_find_active_time,
'S_GROUP_SELECT' => $s_group_select,
- 'S_USER_SEARCH_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&amp;form=$form&amp;field=$field"))
+ 'S_USER_SEARCH_ACTION' => append_sid('memberlist', "mode=searchuser&amp;form=$form&amp;field=$field"))
);
}
@@ -1371,7 +1371,7 @@ switch ($mode)
// Load custom profile fields
if ($config['load_cpf_memberlist'])
{
- include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
+ include_once(PHPBB_ROOT_PATH . 'includes/functions_profile_fields.' . PHP_EXT);
$cp = new custom_profile();
// Grab all profile fields from users in id cache for later use - similar to the poster cache
@@ -1403,7 +1403,7 @@ switch ($mode)
'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
'S_GROUP_LEADER' => (isset($row['group_leader']) && $row['group_leader']) ? true : false,
- 'U_VIEW_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $user_id))
+ 'U_VIEW_PROFILE' => append_sid('memberlist', 'mode=viewprofile&amp;u=' . $user_id))
);
if (isset($cp_row['row']) && sizeof($cp_row['row']))
@@ -1442,7 +1442,7 @@ switch ($mode)
'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') : '',
+ 'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid('memberlist', 'mode=searchuser') : '',
'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'),
@@ -1474,7 +1474,7 @@ page_header($page_title);
$template->set_filenames(array(
'body' => $template_html)
);
-make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
+make_jumpbox(append_sid('viewforum'));
page_footer();
@@ -1483,7 +1483,7 @@ page_footer();
*/
function show_profile($data)
{
- global $config, $auth, $template, $user, $phpEx, $phpbb_root_path;
+ global $config, $auth, $template, $user;
$username = $data['username'];
$user_id = $data['user_id'];
@@ -1493,7 +1493,7 @@ function show_profile($data)
if (!empty($data['user_allow_viewemail']) || $auth->acl_get('a_email'))
{
- $email = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&amp;u=' . $user_id) : (($config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $data['user_email']);
+ $email = ($config['board_email_form'] && $config['email_enable']) ? append_sid('memberlist', 'mode=email&amp;u=' . $user_id) : (($config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $data['user_email']);
}
else
{
@@ -1566,17 +1566,17 @@ function show_profile($data)
'ICQ_STATUS_IMG' => (!empty($data['user_icq'])) ? '<img src="http://web.icq.com/whitepages/online?icq=' . $data['user_icq'] . '&amp;img=5" width="18" height="18" />' : '',
'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false,
- 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$user_id&amp;sr=posts") : '',
- 'U_NOTES' => $auth->acl_getf_global('m_') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $user_id, true, $user->session_id) : '',
- 'U_WARN' => $auth->acl_get('m_warn') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $user_id, true, $user->session_id) : '',
- 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $user_id) : '',
+ 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid('search', "author_id=$user_id&amp;sr=posts") : '',
+ 'U_NOTES' => $auth->acl_getf_global('m_') ? append_sid('mcp', 'i=notes&amp;mode=user_notes&amp;u=' . $user_id, true, $user->session_id) : '',
+ 'U_WARN' => $auth->acl_get('m_warn') ? append_sid('mcp', 'i=warn&amp;mode=warn_user&amp;u=' . $user_id, true, $user->session_id) : '',
+ 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&amp;mode=compose&amp;u=' . $user_id) : '',
'U_EMAIL' => $email,
'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '',
'U_ICQ' => ($data['user_icq']) ? 'http://www.icq.com/people/webmsg.php?to=' . urlencode($data['user_icq']) : '',
- 'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=aim&amp;u=' . $user_id) : '',
+ 'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&amp;action=aim&amp;u=' . $user_id) : '',
'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['user_yim']) . '&amp;.src=pg' : '',
- 'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=msnm&amp;u=' . $user_id) : '',
- 'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $user_id) : '',
+ 'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&amp;action=msnm&amp;u=' . $user_id) : '',
+ 'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&amp;action=jabber&amp;u=' . $user_id) : '',
'LOCATION' => ($data['user_from']) ? $data['user_from'] : '',
'USER_ICQ' => $data['user_icq'],