mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-19 15:17:16 +01:00
- some fixes here and there
git-svn-id: file:///svn/phpbb/trunk@5138 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
75012dec17
commit
be3bdf61d7
@ -204,14 +204,13 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
$attachment['mimetype'] = ($browser_agent == 'ie' || $browser_agent == 'opera') ? 'application/octetstream' : 'application/octet-stream';
|
||||
}
|
||||
|
||||
if ($config['gzip_compress'])
|
||||
if (@ob_get_length())
|
||||
{
|
||||
@ob_end_clean();
|
||||
}
|
||||
|
||||
// Now the tricky part... let's dance
|
||||
header('Pragma: public');
|
||||
// header('Content-Transfer-Encoding: none');
|
||||
|
||||
// Send out the Headers
|
||||
header('Content-Type: ' . $attachment['mimetype'] . '; name="' . $attachment['real_filename'] . '"');
|
||||
|
@ -43,7 +43,7 @@ $result = $db->sql_query($sql);
|
||||
$legend = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$legend .= (($legend != '') ? ', ' : '') . '<a style="color:#' . $row['group_colour'] . '" href="memberlist.' . $phpEx . $SID . '&mode=group&g=' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
|
||||
$legend .= (($legend != '') ? ', ' : '') . '<a style="color:#' . $row['group_colour'] . '" href="' . "{$phpbb_root_path}memberlist.$phpEx$SID" . '&mode=group&g=' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@ -62,7 +62,7 @@ if ($config['load_birthdays'])
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_colour = ($row['user_colour']) ? ' style="color:#' . $row['user_colour'] .'"' : '';
|
||||
$birthday_list .= (($birthday_list != '') ? ', ' : '') . '<a' . $user_colour . " href=\"memberlist.$phpEx$SID&mode=viewprofile&u=" . $row['user_id'] . '">' . $row['username'] . '</a>';
|
||||
$birthday_list .= (($birthday_list != '') ? ', ' : '') . '<a' . $user_colour . " href=\"{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=" . $row['user_id'] . '">' . $row['username'] . '</a>';
|
||||
|
||||
if ($age = (int)substr($row['user_birthday'], -4))
|
||||
{
|
||||
@ -77,7 +77,7 @@ $template->assign_vars(array(
|
||||
'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts),
|
||||
'TOTAL_TOPICS' => sprintf($user->lang[$l_total_topic_s], $total_topics),
|
||||
'TOTAL_USERS' => sprintf($user->lang[$l_total_user_s], $total_users),
|
||||
'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], "<a href=\"memberlist.$phpEx$SID&mode=viewprofile&u=$newest_uid \">", $newest_user, '</a>'),
|
||||
'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], "<a href=\"{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=$newest_uid \">", $newest_user, '</a>'),
|
||||
'LEGEND' => $legend,
|
||||
'BIRTHDAY_LIST' => $birthday_list,
|
||||
|
||||
@ -85,10 +85,10 @@ $template->assign_vars(array(
|
||||
'FORUM_NEW_IMG' => $user->img('forum_new', 'NEW_POSTS'),
|
||||
'FORUM_LOCKED_IMG' => $user->img('forum_locked', 'NO_NEW_POSTS_LOCKED'),
|
||||
|
||||
'S_LOGIN_ACTION' => "ucp.$phpEx$SID&mode=login",
|
||||
'S_LOGIN_ACTION' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=login",
|
||||
'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
|
||||
|
||||
'U_MARK_FORUMS' => "index.$phpEx$SID&mark=forums")
|
||||
'U_MARK_FORUMS' => "{$phpbb_root_path}index.$phpEx$SID&mark=forums")
|
||||
);
|
||||
|
||||
// Output page
|
||||
|
@ -38,7 +38,7 @@ switch ($mode)
|
||||
{
|
||||
if ($user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
trigger_error($user->lang['NO_VIEW_USERS']);
|
||||
trigger_error('NO_VIEW_USERS');
|
||||
}
|
||||
|
||||
login_box('', $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)]);
|
||||
@ -138,7 +138,7 @@ switch ($mode)
|
||||
|
||||
if (!($row = $db->sql_fetchrow($result)))
|
||||
{
|
||||
trigger_error($user->lang['NO_USER_DATA']);
|
||||
trigger_error('NO_USER_DATA');
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@ -207,7 +207,7 @@ switch ($mode)
|
||||
|
||||
if ($user_id == ANONYMOUS)
|
||||
{
|
||||
trigger_error($user->lang['NO_USER']);
|
||||
trigger_error('NO_USER');
|
||||
}
|
||||
|
||||
// Do the SQL thang
|
||||
@ -233,7 +233,7 @@ switch ($mode)
|
||||
|
||||
if (!($member = $db->sql_fetchrow($result)))
|
||||
{
|
||||
trigger_error($user->lang['NO_USER']);
|
||||
trigger_error('NO_USER');
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@ -386,13 +386,7 @@ switch ($mode)
|
||||
include($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 (sizeof($profile_fields))
|
||||
{
|
||||
$template->assign_vars($profile_fields);
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
@ -422,13 +416,26 @@ switch ($mode)
|
||||
|
||||
'S_PROFILE_ACTION' => "memberlist.$phpEx$SID&mode=group",
|
||||
'S_GROUP_OPTIONS' => $group_options,
|
||||
'S_CUSTOM_FIELDS' => (sizeof($profile_fields)) ? true : false,
|
||||
'S_CUSTOM_FIELDS' => (isset($profile_fields['row']) && sizeof($profile_fields['row'])) ? true : false,
|
||||
|
||||
'U_ADD_FRIEND' => "ucp.$phpEx$SID&i=zebra&add=" . urlencode($member['username']),
|
||||
'U_ADD_FOE' => "ucp.$phpEx$SID&i=zebra&mode=foes&add=" . urlencode($member['username']),
|
||||
'U_ACTIVE_FORUM' => "viewforum.$phpEx$SID&f=$active_f_id",
|
||||
'U_ACTIVE_TOPIC' => "viewtopic.$phpEx$SID&t=$active_t_id",)
|
||||
);
|
||||
|
||||
if (isset($profile_fields['row']) && sizeof($profile_fields['row']))
|
||||
{
|
||||
$template->assign_vars($profile_fields['row']);
|
||||
}
|
||||
|
||||
if (isset($profile_fields['blockrow']) && sizeof($profile_fields['blockrow']))
|
||||
{
|
||||
foreach ($profile_fields['blockrow'] as $field_data)
|
||||
{
|
||||
$template->assign_block_vars('custom_fields', $field_data);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'email':
|
||||
@ -436,25 +443,25 @@ switch ($mode)
|
||||
$page_title = $user->lang['SEND_EMAIL'];
|
||||
$template_html = 'memberlist_email.html';
|
||||
|
||||
if (empty($config['email_enable']))
|
||||
if (!$config['email_enable'])
|
||||
{
|
||||
trigger_error($user->lang['EMAIL_DISABLED']);
|
||||
trigger_error('EMAIL_DISABLED');
|
||||
}
|
||||
|
||||
if (($user_id == ANONYMOUS || empty($config['board_email_form'])) && !$topic_id)
|
||||
if (($user_id == ANONYMOUS || !$config['board_email_form']) && !$topic_id)
|
||||
{
|
||||
trigger_error($user->lang['NO_EMAIL']);
|
||||
trigger_error('NO_EMAIL');
|
||||
}
|
||||
|
||||
if (!$auth->acl_get('u_sendemail'))
|
||||
{
|
||||
trigger_error($user->lang['NO_EMAIL']);
|
||||
trigger_error('NO_EMAIL');
|
||||
}
|
||||
|
||||
// Are we trying to abuse the facility?
|
||||
if (time() - $user->data['user_emailtime'] < $config['flood_interval'])
|
||||
{
|
||||
trigger_error($lang['FLOOD_EMAIL_LIMIT']);
|
||||
trigger_error('FLOOD_EMAIL_LIMIT');
|
||||
}
|
||||
|
||||
$name = strip_tags(request_var('name', ''));
|
||||
@ -477,14 +484,14 @@ switch ($mode)
|
||||
|
||||
if (!($row = $db->sql_fetchrow($result)))
|
||||
{
|
||||
trigger_error($user->lang['NO_USER']);
|
||||
trigger_error('NO_USER');
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Can we send email to this user?
|
||||
if (empty($row['user_allow_viewemail']) && !$auth->acl_get('a_user'))
|
||||
if (!$row['user_allow_viewemail'] && !$auth->acl_get('a_user'))
|
||||
{
|
||||
trigger_error($user->lang['NO_EMAIL']);
|
||||
trigger_error('NO_EMAIL');
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -496,18 +503,18 @@ switch ($mode)
|
||||
|
||||
if (!($row = $db->sql_fetchrow($result)))
|
||||
{
|
||||
trigger_error($user->lang['NO_TOPIC']);
|
||||
trigger_error('NO_TOPIC');
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$auth->acl_get('f_read', $row['forum_id']))
|
||||
{
|
||||
trigger_error($user->lang['NO_FORUM_READ']);
|
||||
trigger_error('NO_FORUM_READ');
|
||||
}
|
||||
|
||||
if (!$auth->acl_get('f_email', $row['forum_id']))
|
||||
{
|
||||
trigger_error($user->lang['NO_EMAIL']);
|
||||
trigger_error('NO_EMAIL');
|
||||
}
|
||||
}
|
||||
|
||||
@ -579,8 +586,8 @@ switch ($mode)
|
||||
$messenger->assign_vars(array(
|
||||
'SITENAME' => $config['sitename'],
|
||||
'BOARD_EMAIL' => $config['board_contact'],
|
||||
'FROM_USERNAME' => $user->data['username'],
|
||||
'TO_USERNAME' => ($topic_id) ? $name : $row['username'],
|
||||
'FROM_USERNAME' => stripslashes($user->data['username']),
|
||||
'TO_USERNAME' => ($topic_id) ? stripslashes($name) : stripslashes($row['username']),
|
||||
'MESSAGE' => $message,
|
||||
'TOPIC_NAME' => ($topic_id) ? strtr($row['topic_title'], array_flip(get_html_translation_table(HTML_ENTITIES))) : '',
|
||||
|
||||
@ -603,18 +610,19 @@ switch ($mode)
|
||||
'NAME' => htmlspecialchars($name),
|
||||
'TOPIC_TITLE' => $row['topic_title'],
|
||||
|
||||
'U_TOPIC' => "viewtopic.$phpEx$SID&f=" . $row['forum_id'] . "&t=topic_id",
|
||||
'U_TOPIC' => "{$phpbb_root_path}viewtopic.$phpEx$SID&f={$row['forum_id']}&t=$topic_id",
|
||||
|
||||
'S_LANG_OPTIONS'=> ($topic_id) ? language_select($email_lang) : '')
|
||||
);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'USERNAME' => (!$topic_id) ? addslashes($row['username']) : '',
|
||||
'ERROR_MESSAGE' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
|
||||
'L_EMAIL_BODY_EXPLAIN' => (!$topic_id) ? $user->lang['EMAIL_BODY_EXPLAIN'] : $user->lang['EMAIL_TOPIC_EXPLAIN'],
|
||||
|
||||
'S_POST_ACTION' => (!$topic_id) ? "memberlist.$phpEx$SID&mode=email&u=$user_id" : "memberlist.$phpEx$SID&mode=email&f=$forum_id&t=$topic_id",
|
||||
'S_POST_ACTION' => (!$topic_id) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=email&u=$user_id" : "{$phpbb_root_path}memberlist.$phpEx$SID&mode=email&f=$forum_id&t=$topic_id",
|
||||
'S_SEND_USER' => (!$topic_id) ? true : false)
|
||||
);
|
||||
break;
|
||||
@ -744,7 +752,7 @@ switch ($mode)
|
||||
|
||||
if (!extract($db->sql_fetchrow($result)))
|
||||
{
|
||||
trigger_error($user->lang['NO_GROUP']);
|
||||
trigger_error('NO_GROUP');
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@ -801,7 +809,7 @@ switch ($mode)
|
||||
'AVATAR_IMG' => $avatar_img,
|
||||
'RANK_IMG' => $rank_img,
|
||||
|
||||
'U_PM' => ($auth->acl_get('u_sendpm') && $group_receive_pm && $config['allow_mass_pm']) ? "ucp.$phpEx$SID&i=pm&mode=compose&g=$group_id" : '',)
|
||||
'U_PM' => ($auth->acl_get('u_sendpm') && $group_receive_pm && $config['allow_mass_pm']) ? "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=compose&g=$group_id" : '',)
|
||||
);
|
||||
|
||||
$sql_from = ', ' . USER_GROUP_TABLE . ' ug ';
|
||||
@ -827,12 +835,8 @@ switch ($mode)
|
||||
$total_users = $config['num_users'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Pagination string
|
||||
$pagination_url = "memberlist.$phpEx$SID&mode=$mode";
|
||||
$pagination_url = "{$phpbb_root_path}memberlist.$phpEx$SID&mode=$mode";
|
||||
|
||||
// Build a relevant pagination_url
|
||||
$global_var = ($submit) ? '_POST' : '_GET';
|
||||
@ -845,9 +849,6 @@ switch ($mode)
|
||||
$pagination_url .= '&' . $key . '=' . urlencode(htmlspecialchars($var));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Some search user specific data
|
||||
if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
|
||||
{
|
||||
@ -872,7 +873,7 @@ switch ($mode)
|
||||
// 'S_USERNAME_OPTIONS' => $username_list,
|
||||
'S_JOINED_TIME_OPTIONS' => $s_find_join_time,
|
||||
'S_ACTIVE_TIME_OPTIONS' => $s_find_active_time,
|
||||
'S_SEARCH_ACTION' => "memberlist.$phpEx$SID&mode=searchuser&form=$form&field=$field")
|
||||
'S_SEARCH_ACTION' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=searchuser&form=$form&field=$field")
|
||||
);
|
||||
}
|
||||
|
||||
@ -898,60 +899,95 @@ switch ($mode)
|
||||
ORDER BY $order_by";
|
||||
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
$id_cache = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$i = 0;
|
||||
do
|
||||
$row['session_time'] = (!empty($session_times[$row['user_id']])) ? $session_times[$row['user_id']] : '';
|
||||
|
||||
$id_cache[$row['user_id']] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Load custom profile fields
|
||||
if ($config['load_cpf_memberlist'])
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
|
||||
$cp = new custom_profile();
|
||||
|
||||
// Grab all profile fields from users in id cache for later use - similar to the poster cache
|
||||
$profile_fields_cache = $cp->generate_profile_fields_template('grab', array_keys($id_cache));
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
foreach ($id_cache as $user_id => $row)
|
||||
{
|
||||
$cp_row = array();
|
||||
if ($config['load_cpf_memberlist'])
|
||||
{
|
||||
$row['session_time'] = (!empty($session_times[$row['user_id']])) ? $session_times[$row['user_id']] : '';
|
||||
|
||||
$template->assign_block_vars('memberrow', array_merge(show_profile($row), array(
|
||||
'ROW_NUMBER' => $i + ($start + 1),
|
||||
|
||||
'U_VIEWPROFILE' => "memberlist.$phpEx$SID&mode=viewprofile&u=" . $row['user_id']))
|
||||
);
|
||||
|
||||
$i++;
|
||||
$cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$user_id]) : array();
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
}
|
||||
|
||||
// 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),
|
||||
$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,
|
||||
'U_VIEWPROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=$user_id")
|
||||
);
|
||||
|
||||
'PROFILE_IMG' => $user->img('btn_profile', $user->lang['PROFILE']),
|
||||
'PM_IMG' => $user->img('btn_pm', $user->lang['MESSAGE']),
|
||||
'EMAIL_IMG' => $user->img('btn_email', $user->lang['EMAIL']),
|
||||
'WWW_IMG' => $user->img('btn_www', $user->lang['WWW']),
|
||||
'ICQ_IMG' => $user->img('btn_icq', $user->lang['ICQ']),
|
||||
'AIM_IMG' => $user->img('btn_aim', $user->lang['AIM']),
|
||||
'MSN_IMG' => $user->img('btn_msnm', $user->lang['MSNM']),
|
||||
'YIM_IMG' => $user->img('btn_yim', $user->lang['YIM']),
|
||||
'JABBER_IMG' => $user->img('btn_jabber', $user->lang['JABBER']),
|
||||
'SEARCH_IMG' => $user->img('btn_search', $user->lang['SEARCH']),
|
||||
if (isset($cp_row['row']) && sizeof($cp_row['row']))
|
||||
{
|
||||
$memberrow = array_merge($memberrow, $cp_row['row']);
|
||||
}
|
||||
|
||||
'U_FIND_MEMBER' => (!empty($config['load_search']) || $auth->acl_get('a_')) ? "memberlist.$phpEx$SID&mode=searchuser" : '',
|
||||
'U_SORT_USERNAME' => $pagination_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_FROM' => $pagination_url . '&sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_JOINED' => $pagination_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_POSTS' => $pagination_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_EMAIL' => $pagination_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_WEBSITE' => $pagination_url . '&sk=f&sd=' . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_ICQ' => $pagination_url . '&sk=g&sd=' . (($sort_key == 'g' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_AIM' => $pagination_url . '&sk=h&sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_MSN' => $pagination_url . '&sk=i&sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_YIM' => $pagination_url . '&sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_ACTIVE' => $pagination_url . '&sk=k&sd=' . (($sort_key == 'k' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_RANK' => $pagination_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
$template->assign_block_vars('memberrow', $memberrow);
|
||||
|
||||
'S_SHOW_GROUP' => ($mode == 'group') ? true : false,
|
||||
'S_MODE_SELECT' => $s_sort_key,
|
||||
'S_ORDER_SELECT' => $s_sort_dir,
|
||||
'S_MODE_ACTION' => $pagination_url . "&form=$form")
|
||||
);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
$i++;
|
||||
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('btn_profile', $user->lang['PROFILE']),
|
||||
'PM_IMG' => $user->img('btn_pm', $user->lang['MESSAGE']),
|
||||
'EMAIL_IMG' => $user->img('btn_email', $user->lang['EMAIL']),
|
||||
'WWW_IMG' => $user->img('btn_www', $user->lang['WWW']),
|
||||
'ICQ_IMG' => $user->img('btn_icq', $user->lang['ICQ']),
|
||||
'AIM_IMG' => $user->img('btn_aim', $user->lang['AIM']),
|
||||
'MSN_IMG' => $user->img('btn_msnm', $user->lang['MSNM']),
|
||||
'YIM_IMG' => $user->img('btn_yim', $user->lang['YIM']),
|
||||
'JABBER_IMG' => $user->img('btn_jabber', $user->lang['JABBER']),
|
||||
'SEARCH_IMG' => $user->img('btn_search', $user->lang['SEARCH']),
|
||||
|
||||
'U_FIND_MEMBER' => (!empty($config['load_search']) || $auth->acl_get('a_')) ? "memberlist.$phpEx$SID&mode=searchuser" : '',
|
||||
'U_SORT_USERNAME' => $pagination_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_FROM' => $pagination_url . '&sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_JOINED' => $pagination_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_POSTS' => $pagination_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_EMAIL' => $pagination_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_WEBSITE' => $pagination_url . '&sk=f&sd=' . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_ICQ' => $pagination_url . '&sk=g&sd=' . (($sort_key == 'g' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_AIM' => $pagination_url . '&sk=h&sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_MSN' => $pagination_url . '&sk=i&sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_YIM' => $pagination_url . '&sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_ACTIVE' => $pagination_url . '&sk=k&sd=' . (($sort_key == 'k' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_RANK' => $pagination_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
|
||||
'S_SHOW_GROUP' => ($mode == 'group') ? true : false,
|
||||
'S_MODE_SELECT' => $s_sort_key,
|
||||
'S_ORDER_SELECT' => $s_sort_dir,
|
||||
'S_MODE_ACTION' => $pagination_url . "&form=$form")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -1022,7 +1058,7 @@ function show_profile($data)
|
||||
|
||||
'ONLINE_IMG' => (intval($data['session_time']) >= time() - ($config['load_online_time'] * 60)) ? $user->img('btn_online', $user->lang['USER_ONLINE']) : $user->img('btn_offline', $user->lang['USER_ONLINE']),
|
||||
'RANK_IMG' => $rank_img,
|
||||
'ICQ_STATUS_IMG'=> (!empty($data['user_icq'])) ? '<img src="http://web.icq.com/whitepages/online?icq=' . $data['user_icq'] . '&img=5" width="18" height="18" border="0" />' : '',
|
||||
'ICQ_STATUS_IMG'=> (!empty($data['user_icq'])) ? '<img src="http://web.icq.com/whitepages/online?icq=' . $data['user_icq'] . '&img=5" width="18" height="18" border="0" />' : '',
|
||||
|
||||
'U_PROFILE' => "memberlist.$phpEx$SID&mode=viewprofile&u=$user_id",
|
||||
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? "search.$phpEx$SID&search_author=" . urlencode($username) . "&show_results=posts" : '',
|
||||
|
@ -542,6 +542,7 @@ if ($submit || $preview || $refresh)
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
$sql = 'DELETE FROM ' . POLL_OPTIONS_TABLE . ', ' . POLL_VOTES_TABLE . "
|
||||
WHERE topic_id = $topic_id";
|
||||
$db->sql_query($sql);
|
||||
@ -1360,7 +1361,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
'post_text' => $data['message'],
|
||||
'post_checksum' => $data['message_md5'],
|
||||
'post_encoding' => $user->lang['ENCODING'],
|
||||
'post_attachment' => (isset($data['filename_data']) && sizeof($data['filename_data'])) ? 1 : 0, // sizeof($data['filename_data']['physical_filename'])
|
||||
'post_attachment' => (isset($data['filename_data']['physical_filename']) && sizeof($data['filename_data'])) ? 1 : 0,
|
||||
'bbcode_bitfield' => $data['bbcode_bitfield'],
|
||||
'bbcode_uid' => $data['bbcode_uid'],
|
||||
'post_edit_locked' => $data['post_edit_locked']
|
||||
@ -1412,7 +1413,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
'post_edit_user' => (int) $data['post_edit_user'],
|
||||
'post_checksum' => $data['message_md5'],
|
||||
'post_encoding' => $user->lang['ENCODING'],
|
||||
'post_attachment' => (isset($data['filename_data']) && sizeof($data['filename_data'])) ? 1 : 0,
|
||||
'post_attachment' => (isset($data['filename_data']['physical_filename']) && sizeof($data['filename_data'])) ? 1 : 0,
|
||||
'bbcode_bitfield' => $data['bbcode_bitfield'],
|
||||
'bbcode_uid' => $data['bbcode_uid'],
|
||||
'post_edit_locked' => $data['post_edit_locked'])
|
||||
@ -1440,7 +1441,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
'topic_first_poster_name' => (!$user->data['is_registered'] && $username) ? stripslashes($username) : $user->data['username'],
|
||||
'topic_type' => $topic_type,
|
||||
'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0,
|
||||
'topic_attachment' => (isset($data['filename_data']) && sizeof($data['filename_data'])) ? 1 : 0
|
||||
'topic_attachment' => (isset($data['filename_data']['physical_filename']) && sizeof($data['filename_data'])) ? 1 : 0
|
||||
);
|
||||
|
||||
if (isset($poll['poll_options']) && !empty($poll['poll_options']))
|
||||
@ -1493,7 +1494,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
'poll_length' => ($poll['poll_options']) ? ($poll['poll_length'] * 86400) : 0,
|
||||
'poll_vote_change' => $poll['poll_vote_change'],
|
||||
|
||||
'topic_attachment' => ($post_mode == 'edit_topic') ? ((isset($data['filename_data']) && sizeof($data['filename_data'])) ? 1 : 0) : $data['topic_attachment']
|
||||
'topic_attachment' => ($post_mode == 'edit_topic') ? ((isset($data['filename_data']['physical_filename']) && sizeof($data['filename_data'])) ? 1 : 0) : $data['topic_attachment']
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
@ -713,7 +713,7 @@ if ($search_keywords || $search_author || $search_id)
|
||||
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
|
||||
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
|
||||
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', sprintf($user->lang['TOTAL_ATTACHMENTS'], $row['topic_attachment'])) : '',
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
|
||||
'S_TOPIC_TYPE' => $row['topic_type'],
|
||||
'S_USER_POSTED' => (!empty($row['mark_type'])) ? true : false,
|
||||
|
@ -61,7 +61,7 @@
|
||||
|
||||
<!-- BEGIN THUMBNAIL -->
|
||||
<span class="gensmall"><b>{L_FILE_COMMENT}:</b> {COMMENT}</span><hr />
|
||||
<a href="{U_DOWNLOAD_LINK}" target="_blank"><img src="{THUMB_IMG}" alt="{DOWNLOAD_NAME}" border="0" /></a></span><br clear="all" />
|
||||
<a href="{U_DOWNLOAD_LINK}" target="_blank"><img src="{THUMB_IMG}" alt="{DOWNLOAD_NAME}" border="0" /></a><br clear="all" />
|
||||
<span class="gensmall">{DOWNLOAD_NAME} - {L_DOWNLOADED_VIEWED} {L_DOWNLOAD_COUNT}</span>
|
||||
<!-- END THUMBNAIL -->
|
||||
|
||||
|
@ -48,8 +48,11 @@
|
||||
<td class="gen" align="center"> <!-- IF memberrow.U_PM --><a href="{memberrow.U_PM}">{PM_IMG}</a><!-- ENDIF --> </td>
|
||||
<td class="gen" align="center"> <!-- IF memberrow.U_EMAIL --><a href="{memberrow.U_EMAIL}">{EMAIL_IMG}</a><!-- ENDIF --> </td>
|
||||
<td class="gen" align="center"> <!-- IF memberrow.U_WWW --><a href="{memberrow.U_WWW}" target="_blank">{WWW_IMG}</a><!-- ENDIF --> </td>
|
||||
<!-- IF memberrow.S_PROFILE_FIELD1 -->
|
||||
<!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
|
||||
<td class="gen" align="center"> {memberrow.PROFILE_FIELD1_VALUE}</td>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_SEARCH_USER --><td align="center"><input type="checkbox" name="user" value="{memberrow.USERNAME}" /></td><!-- ENDIF -->
|
||||
|
||||
</tr>
|
||||
|
||||
<!-- BEGINELSE -->
|
||||
|
@ -127,6 +127,12 @@
|
||||
<td><b class="genmed">{PROFILE_FIELD1_VALUE}</b></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- BEGIN custom_fields -->
|
||||
<tr>
|
||||
<td class="gen" align="right" nowrap="nowrap">{custom_fields.PROFILE_FIELD_NAME}: </td>
|
||||
<td><b class="genmed">{custom_fields.PROFILE_FIELD_VALUE}</b></td>
|
||||
</tr>
|
||||
<!-- END custom_fields -->
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -24,7 +24,7 @@
|
||||
<!-- IF S_USER_PM_POPUP -->
|
||||
if ({S_NEW_PM})
|
||||
{
|
||||
window.open('{U_POPUP_PM}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');
|
||||
window.open('{U_JS_POPUP_PM}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');
|
||||
}
|
||||
<!-- ENDIF -->
|
||||
|
||||
@ -64,7 +64,7 @@ function jumpto()
|
||||
|
||||
<div id="menubar"><table width="100%" cellspacing="0">
|
||||
<tr>
|
||||
<td class="genmed"><a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" /> {L_LOGIN_LOGOUT}</a> <!-- IF S_USER_LOGGED_IN --><!-- IF S_DISPLAY_PM --> <a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a><!-- ENDIF --><!-- ELSE --> <a href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" /> {L_REGISTER}</a><!-- ENDIF --></td>
|
||||
<td class="genmed"><a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" /> {L_LOGIN_LOGOUT}</a> <!-- IF S_USER_LOGGED_IN --><!-- IF S_DISPLAY_PM --> <a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{L_PRIVATE_MESSAGES}" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a><!-- ENDIF --><!-- ELSE --> <a href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" /> {L_REGISTER}</a><!-- ENDIF --></td>
|
||||
<td class="genmed" align="right"><a href="{U_FAQ}"><img src="{T_THEME_PATH}/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" /> {L_FAQ}</a><!-- IF S_DISPLAY_SEARCH --> <a href="{U_SEARCH}"><img src="{T_THEME_PATH}/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" /> {L_SEARCH}</a><!-- ENDIF --><!-- IF S_DISPLAY_MEMBERLIST --> <a href="{U_MEMBERLIST}"><img src="{T_THEME_PATH}/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" /> {L_MEMBERLIST}</a><!-- ENDIF --><!-- IF S_USER_LOGGED_IN --> <a href="{U_PROFILE}"><img src="{T_THEME_PATH}/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" /> {L_PROFILE}</a><!-- ENDIF --></td>
|
||||
</tr>
|
||||
</table></div>
|
||||
|
@ -33,7 +33,7 @@
|
||||
<td class="row1"><b class="genmed">{L_FILE_COMMENT}</b></td>
|
||||
<td class="row2"><table border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><textarea class="post" name="filecomment" rows="3" cols="35" wrap="virtual" size=40>{FILE_COMMENT}</textarea> </td>
|
||||
<td><textarea class="post" name="filecomment" rows="3" cols="35" size="40">{FILE_COMMENT}</textarea> </td>
|
||||
<td valign="top"><table border="0" cellspacing="4" cellpadding="0">
|
||||
<tr>
|
||||
<td><input class="btnlite" type="submit" style="width:150px" name="add_file" value="{L_ADD_FILE}" onclick="javascript:popup_progress_bar();" /></td>
|
||||
|
@ -439,7 +439,7 @@ function checkForm()
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
<tr>
|
||||
<td class="cat"><span class="cattitle">{L_WHO_IS_ONLINE}</span></td>
|
||||
<td class="cat"><h4>{L_WHO_IS_ONLINE}</h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><span class="gensmall">{LOGGED_IN_USER_LIST}</span></td>
|
||||
|
@ -31,7 +31,7 @@
|
||||
<tr valign="middle">
|
||||
<td class="row1" width="25" align="center">{searchresults.TOPIC_FOLDER_IMG}</td>
|
||||
<td class="row1" width="25" align="center">
|
||||
<!-- IF {searchresults.TOPIC_ICON_IMG} -->
|
||||
<!-- IF searchresults.TOPIC_ICON_IMG -->
|
||||
<img src="{T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}" width="{searchresults.TOPIC_ICON_IMG_WIDTH}" height="{searchresults.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" />
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
|
@ -170,7 +170,13 @@
|
||||
<!-- IF postrow.POSTER_POSTS --><br /><b>{L_JOINED}:</b> {postrow.POSTER_JOINED}<!-- ENDIF -->
|
||||
<!-- IF postrow.POSTER_POSTS --><br /><b>{L_POSTS}:</b> {postrow.POSTER_POSTS}<!-- ENDIF -->
|
||||
<!-- IF postrow.POSTER_FROM --><br /><b>{L_LOCATION}:</b> {postrow.POSTER_FROM}<!-- ENDIF -->
|
||||
<!-- IF postrow.S_PROFILE_FIELD_1 --><br /><b>{postrow.PROFILE_FIELD_1_NAME}:</b> {postrow.PROFILE_FIELD_1_VALUE}<!-- ENDIF -->
|
||||
<!-- IF postrow.S_PROFILE_FIELD1 -->
|
||||
<!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
|
||||
<br /><b>{postrow.PROFILE_FIELD1_NAME}:</b> {postrow.PROFILE_FIELD1_VALUE}
|
||||
<!-- ENDIF -->
|
||||
<!-- BEGIN custom_fields -->
|
||||
<br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
|
||||
<!-- END custom_fields -->
|
||||
</span>
|
||||
|
||||
</td>
|
||||
|
@ -350,7 +350,7 @@ while ($row = $db->sql_fetchrow($result))
|
||||
$which = (time() - $update_time < $row['online_time']) ? 'online' : 'offline';
|
||||
|
||||
$template->assign_block_vars("friends_{$which}", array(
|
||||
'U_PROFILE' => "memberlist.$phpEx$SID&mode=viewprofile&u=" . $row['user_id'],
|
||||
'U_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=" . $row['user_id'],
|
||||
|
||||
'USER_ID' => $row['user_id'],
|
||||
'USERNAME' => $row['username'])
|
||||
|
@ -301,7 +301,7 @@ $result = $db->sql_query($sql);
|
||||
$legend = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$legend .= (($legend != '') ? ', ' : '') . '<a style="color:#' . $row['group_colour'] . '" href="memberlist.' . $phpEx . $SID . '&mode=group&g=' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
|
||||
$legend .= (($legend != '') ? ', ' : '') . '<a style="color:#' . $row['group_colour'] . '" href="' . "{$phpbb_root_path}memberlist.$phpEx$SID" . '&mode=group&g=' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user