$s_hidden_fields .= '<input type="hidden" name="location" value="' . $location . '" />'; $s_hidden_fields .= '<input type="hidden" name="user_flag" value="' . $user_flag . '" />'; $s_hidden_fields .= '<input type="hidden" name="occupation" value="' . $occupation . '" />'; $s_hidden_fields .= '<input type="hidden" name="interests" value="' . $interests . '" />'; $s_hidden_fields .= '<input type="hidden" name="phone" value="' . $phone . '" />'; $s_hidden_fields .= '<input type="hidden" name="selfdes" value="' . htmlspecialchars($selfdes) . '" />'; $s_hidden_fields .= '<input type="hidden" name="b_day" value="' . $birthday_day . '" />'; $s_hidden_fields .= '<input type="hidden" name="b_md" value="' . $birthday_month . '" />'; $s_hidden_fields .= '<input type="hidden" name="b_year" value="' . $birthday_year . '" />'; $s_hidden_fields .= '<input type="hidden" name="gender" value="' . $gender . '" />'; $s_hidden_fields .= '<input type="hidden" name="signature" value="' . $signature . '" />'; $profile_data = get_fields('WHERE users_can_view = ' . ALLOW_VIEW); // Custom Profile Fields - BEGIN foreach ($profile_data as $field) { $field_name = $field['field_name']; $name = text_to_column($field_name); if ($field['is_required'] == REQUIRED) { $required = true; } switch ($field['field_type']) { case TEXT_FIELD: $value = $user->data[$name]; $length = $field['text_field_maxlen']; $field_html_code = '<input type="text" class="post" style="width: 200px" name="' . $name . '" size="35" maxlength="' . $length . '" value="' . $value . '" />'; $hidden_fields_custom_name = $name; $hidden_fields_custom_value = $value; break; case TEXTAREA: $value = $user->data[$name]; $field_html_code = '<textarea name="' . $name . '" style="width: 300px" rows="6" cols="30" class="post">' . $value . '</textarea>'; $hidden_fields_custom_name = $name;
$ajax_chat_page = !empty($config['ajax_chat_link_type']) ? CMS_PAGE_AJAX_CHAT : CMS_PAGE_AJAX_SHOUTBOX; $ajax_chat_room = 'chat_room=' . (min($user->data['user_id'], $profiledata['user_id']) . '|' . max($user->data['user_id'], $profiledata['user_id'])); $ajax_chat_link = append_sid($ajax_chat_page . '?' . $ajax_chat_room); $ajax_chat_ref = !empty($config['ajax_chat_link_type']) ? $ajax_chat_link . '" target="_chat' : '#" onclick="window.open(\'' . $ajax_chat_link . '\', \'_chat\', \'width=720,height=600,resizable=yes\'); return false;'; $template->assign_vars(array('U_AJAX_SHOUTBOX_PVT_LINK' => $ajax_chat_ref, 'ICON_CHAT' => $all_ims['chat']['icon'], 'U_CHAT' => $all_ims['chat']['url'])); } } // Custom Profile Fields - BEGIN // Include Language setup_extra_lang(array('lang_profile_fields')); include_once IP_ROOT_PATH . 'includes/functions_profile.' . PHP_EXT; $profile_data = get_fields('WHERE view_in_profile = ' . VIEW_IN_PROFILE . ' AND users_can_view = ' . ALLOW_VIEW); $profile_names = array(); foreach ($profile_data as $field) { $name = $field['field_name']; $col_name = text_to_column($field['field_name']); $id = $profiledata['user_id']; $type = $field['field_type']; $location = $field['profile_location']; $field_id = $field['field_id']; $field_name = $field['field_name']; if (isset($lang[$field_id . '_' . $field_name])) { $field_name = $lang[$field_id . '_' . $field_name]; } $sql = "SELECT {$col_name} FROM " . USERS_TABLE . "\n\t\tWHERE user_id = {$id}"; $result = $db->sql_query($sql); $temp = $db->sql_fetchrow($result); $profile_names[$name] = displayable_field_data($temp[$col_name], $field['field_type']); $tmp_field = $profile_names[$name]; if (isset($lang[$field_id . '_' . $tmp_field])) { $profile_names[$name] = $lang[$field_id . '_' . $tmp_field];
function get_udata_txt($profile_data, $add = '') { $cp_sql_txt = ''; foreach ($profile_data as $field) { $cp_sql_txt .= ', ' . $add . text_to_column($field['field_name']); } return $cp_sql_txt; }