Code: Alles auswählen
else
{
$member['posts_in_queue'] = 0;
}
// check 4 plz entry of this user - GeoMap Mod
$sql_geomap = 'SELECT COUNT(user_id) user_count FROM ' . PROFILE_FIELDS_DATA_TABLE . '
WHERE pf_plz != 0 AND pf_land != 0 AND user_id = ' . $user_id;
$result_geomap = $db->sql_query($sql_geomap);
$poster_plz = $db->sql_fetchfield('user_count');
$db->sql_freeresult($result_geomap);
$template->assign_vars(array(
'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $member['posts_in_queue']),
'POSTS_DAY' => sprintf($user->lang['POST_DAY'], $posts_per_day),
'POSTS_PCT' => sprintf($user->lang['POST_PCT'], $percentage),
'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']),
'GEOMAP_IMG' => $phpbb_root_path . 'styles/' . $user->theme['imageset_path'] . '/imageset/' . $user->img_lang . '/icon_contact_geomap.gif',
'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&mode=overview&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&mode=user&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) : '',
'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}&hash=" . generate_link_hash('switchperm')) : '',
'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&add=' . urlencode(htmlspecialchars_decode($member['username']))) : '',
'U_ADD_FOE' => (!$friend && !$foe && $foes_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&mode=foes&add=' . urlencode(htmlspecialchars_decode($member['username']))) : '',
'U_REMOVE_FRIEND' => ($friend && $friends_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&usernames[]=' . $user_id) : '',
'U_REMOVE_FOE' => ($foe && $foes_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&mode=foes&usernames[]=' . $user_id) : '',
// phpBB Arcade Start
include($phpbb_root_path . 'includes/arcade/arcade_constants.' . $phpEx);
include($phpbb_root_path . 'includes/arcade/arcade_cache.' . $phpEx);
include($phpbb_root_path . 'includes/arcade/functions_arcade.' . $phpEx);
$user->add_lang('mods/arcade');
$arcade_data = display_arcade_highscores($user_id, basename(__FILE__, '.' . $phpEx));
if (sizeof($arcade_data))
{
$template->assign_vars($arcade_data);
}
// phpBB Arcade End
// show user's position on map - geomap mod
'U_GEOMAP_PROFILE' => ($poster_plz ? append_sid("{$phpbb_root_path}geomap.$phpEx", 'mode=profile&u=' . $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)
);
}
// Now generate page title
$page_title = sprintf($user->lang['VIEWING_PROFILE'], $member['username']);
$template_html = 'memberlist_view.html';
break;
case 'email':
// Send an email
$page_title = $user->lang['SEND_EMAIL'];
$template_html = 'memberlist_email.html';
add_form_key('memberlist_email');
if (!$config['email_enable'])
{
trigger_error('EMAIL_DISABLED');
}
if (!$auth->acl_get('u_sendemail'))
{
trigger_error('NO_EMAIL');
}
// Are we trying to abuse the facility?
if (time() - $user->data['user_emailtime'] < $config['flood_interval'])
{
trigger_error('FLOOD_EMAIL_LIMIT');
}
// Determine action...
$user_id = request_var('u', 0);
$topic_id = request_var('t', 0);
// Send email to user...
if ($user_id)
{
if ($user_id == ANONYMOUS || !$config['board_email_form'])
{
trigger_error('NO_EMAIL');
}
// Get the appropriate username, etc.
$sql = 'SELECT username, user_email, user_allow_viewemail, user_lang, user_jabber, user_notify_type
FROM ' . USERS_TABLE . "
WHERE user_id = $user_id
AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row)
{
trigger_error('NO_USER');
}
// Can we send email to this user?
if (!$row['user_allow_viewemail'] && !$auth->acl_get('a_user'))
{
trigger_error('NO_EMAIL');
}
}
else if ($topic_id)
{
// Send topic heads-up to email address
$sql = 'SELECT forum_id, topic_title
FROM ' . TOPICS_TABLE . "
WHERE topic_id = $topic_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row)
{
trigger_error('NO_TOPIC');
}
if ($row['forum_id'])
{
if (!$auth->acl_get('f_read', $row['forum_id']))
{
trigger_error('SORRY_AUTH_READ');
}
if (!$auth->acl_get('f_email', $row['forum_id']))
{
trigger_error('NO_EMAIL');
}
}
else
{
habe jetzt noch mal die install.xml angesehen aber ich glaube das es dort hingehört.