Beispiel #1
0
        $markers[] = '?';
    }
    // Select topics
    $ps = $db->run('SELECT u.id AS uid, u.group_id, up.id AS up_id, up.group_id AS up_group_id, u.use_gravatar, u.email, t.id, t.poster, t.subject, t.question, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to FROM ' . $db->prefix . 'topics AS t LEFT JOIN ' . $db->prefix . 'users AS u ON (t.last_poster=u.username) LEFT JOIN ' . $db->prefix . 'users AS up ON (t.poster=up.username) WHERE t.id IN (' . implode(',', $markers) . ')' . ' ORDER BY t.sticky DESC, t.' . $sort_by . ', t.id DESC', $topic_ids);
    $topic_count = 0;
    foreach ($ps as $cur_topic) {
        $url_subject = url_friendly($cur_topic['subject']);
        // Preg match is slow!
        if ($panther_config['o_censoring'] == '1') {
            $cur_topic['subject'] = censor_words($cur_topic['subject']);
        }
        $ghost_topic = !is_null($cur_topic['moved_to']) ? true : false;
        $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $panther_user['disp_posts']);
        $topics[$cur_topic['id']] = array('count' => ++$topic_count, 'topic_count' => forum_number_format($topic_count + $start_from), 'cur_topic' => $cur_topic, 'topic_poster' => $cur_topic['up_id'] > 1 ? colourize_group($cur_topic['poster'], $cur_topic['up_group_id'], $cur_topic['up_id']) : colourize_group($cur_topic['poster'], PANTHER_GUEST), 'moved_to' => $cur_topic['moved_to'], 'subject' => $cur_topic['subject'], 'sticky' => $cur_topic['sticky'], 'closed' => $cur_topic['closed'], 'topic_link' => panther_link($panther_url['topic'], array($cur_topic['id'], $url_subject)), 'num_pages' => $num_pages_topic, 'pagination' => paginate($num_pages_topic, -1, $panther_url['topic_paginate'], array($cur_topic['id'], $url_subject)), 'new' => !$ghost_topic && $cur_topic['last_post'] > $panther_user['last_visit'] && (!isset($tracked_topics['topics'][$cur_topic['id']]) || $tracked_topics['topics'][$cur_topic['id']] < $cur_topic['last_post']) && (!isset($tracked_topics['forums'][$fid]) || $tracked_topics['forums'][$fid] < $cur_topic['last_post']) ? '1' : '0');
        if (is_null($cur_topic['moved_to'])) {
            $topics[$cur_topic['id']]['last_post_avatar'] = generate_avatar_markup($cur_topic['uid'], $cur_topic['email'], $cur_topic['use_gravatar'], array(32, 32));
            $topics[$cur_topic['id']]['last_post_link'] = panther_link($panther_url['post'], array($cur_topic['last_post_id']));
            $topics[$cur_topic['id']]['last_post'] = format_time($cur_topic['last_post']);
            $topics[$cur_topic['id']]['last_poster'] = $cur_topic['uid'] > 1 ? colourize_group($cur_topic['last_poster'], $cur_topic['group_id'], $cur_topic['uid']) : colourize_group($cur_topic['last_poster'], PANTHER_GUEST);
            $topics[$cur_topic['id']]['num_replies'] = forum_number_format($cur_topic['num_replies']);
            if ($panther_config['o_topic_views'] == '1') {
                $topics[$cur_topic['id']]['num_views'] = forum_number_format($cur_topic['num_views']);
            }
        } else {
            $topics[$cur_topic['id']]['topic_link'] = panther_link($panther_url['topic'], array($cur_topic['moved_to'], $url_subject));
        }
        if ($topics[$cur_topic['id']]['new'] == '1') {
            $topics[$cur_topic['id']]['new_link'] = panther_link($panther_url['topic_new_posts'], array($cur_topic['id'], $url_subject));
        }
    }
}
Beispiel #2
0
 // Generate the post heading
 $forum_page['post_ident']['num'] = '<span class="post-num">' . forum_number_format($forum_page['start_from'] + $forum_page['item_count']) . '</span>';
 if ($cur_post['poster_id'] > 1) {
     $forum_page['post_ident']['byline'] = '<span class="post-byline">' . sprintf($cur_post['id'] == $cur_topic['first_post_id'] ? $lang_topic['Topic byline'] : $lang_topic['Reply byline'], $forum_user['g_view_users'] == '1' ? '<a title="' . sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])) . '" href="' . forum_link($forum_url['user'], $cur_post['poster_id']) . '">' . forum_htmlencode($cur_post['username']) . '</a>' : '<strong>' . forum_htmlencode($cur_post['username']) . '</strong>') . '</span>';
 } else {
     $forum_page['post_ident']['byline'] = '<span class="post-byline">' . sprintf($cur_post['id'] == $cur_topic['first_post_id'] ? $lang_topic['Topic byline'] : $lang_topic['Reply byline'], '<strong>' . forum_htmlencode($cur_post['username']) . '</strong>') . '</span>';
 }
 $forum_page['post_ident']['link'] = '<span class="post-link"><a class="permalink" rel="bookmark" title="' . $lang_topic['Permalink post'] . '" href="' . forum_link($forum_url['post'], $cur_post['id']) . '">' . format_time($cur_post['posted']) . '</a></span>';
 ($hook = get_hook('vt_row_pre_post_ident_merge')) ? eval($hook) : null;
 if (isset($user_data_cache[$cur_post['poster_id']]['author_ident'])) {
     $forum_page['author_ident'] = $user_data_cache[$cur_post['poster_id']]['author_ident'];
 } else {
     // Generate author identification
     if ($cur_post['poster_id'] > 1) {
         if ($forum_config['o_avatars'] == '1' && $forum_user['show_avatars'] != '0') {
             $forum_page['avatar_markup'] = generate_avatar_markup($cur_post['poster_id']);
             if (!empty($forum_page['avatar_markup'])) {
                 $forum_page['author_ident']['avatar'] = '<li class="useravatar">' . $forum_page['avatar_markup'] . '</li>';
             }
         }
         $forum_page['author_ident']['username'] = '******' . ($forum_user['g_view_users'] == '1' ? '<a title="' . sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])) . '" href="' . forum_link($forum_url['user'], $cur_post['poster_id']) . '">' . forum_htmlencode($cur_post['username']) . '</a>' : '<strong>' . forum_htmlencode($cur_post['username']) . '</strong>') . '</li>';
         $forum_page['author_ident']['usertitle'] = '<li class="usertitle"><span>' . get_title($cur_post) . '</span></li>';
         if ($cur_post['is_online'] == $cur_post['poster_id']) {
             $forum_page['author_ident']['status'] = '<li class="userstatus"><span>' . $lang_topic['Online'] . '</span></li>';
         } else {
             $forum_page['author_ident']['status'] = '<li class="userstatus"><span>' . $lang_topic['Offline'] . '</span></li>';
         }
     } else {
         $forum_page['author_ident']['username'] = '******' . forum_htmlencode($cur_post['username']) . '</strong></li>';
         $forum_page['author_ident']['usertitle'] = '<li class="usertitle"><span>' . get_title($cur_post) . '</span></li>';
     }
Beispiel #3
0
require FORUM_ROOT . 'include/utf8/ucwords.php';
// utf8_ucwords needs utf8_substr_replace
require FORUM_ROOT . 'include/utf8/strcasecmp.php';
$action = isset($_GET['action']) ? $_GET['action'] : null;
$type = isset($_GET['type']) ? $_GET['type'] : null;
$id = $luna_user['id'];
if ($id < 2) {
    message(__('Bad request. The link you followed is incorrect, outdated or you are simply not allowed to hang around here.', 'luna'), false, '404 Not Found');
}
$result = $db->query('SELECT u.username, u.email, u.title, u.realname, u.url, u.facebook, u.msn, u.twitter, u.google, u.location, u.signature, u.disp_topics, u.disp_posts, u.email_setting, u.notify_with_post, u.auto_notify, u.show_smilies, u.show_img, u.show_img_sig, u.show_avatars, u.show_sig, u.timezone, u.dst, u.language, u.style, u.num_posts, u.last_post, u.registered, u.registration_ip, u.admin_note, u.date_format, u.time_format, u.last_visit, u.color_scheme, u.accent, g.g_id, g.g_user_title, g.g_moderator FROM ' . $db->prefix . 'users AS u LEFT JOIN ' . $db->prefix . 'groups AS g ON g.g_id=u.group_id WHERE u.id=' . $id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
if (!$db->num_rows($result)) {
    message(__('Bad request. The link you followed is incorrect, outdated or you are simply not allowed to hang around here.', 'luna'), false, '404 Not Found');
}
$user = $db->fetch_assoc($result);
$user_username = luna_htmlspecialchars($user['username']);
$avatar_field = generate_avatar_markup($id);
$avatar_user_card = draw_user_avatar($id);
if ($action == 'readnoti') {
    set_user_notifications_viewed($id);
    confirm_referrer('notifications.php');
    redirect('notifications.php?id=' . $id);
} elseif ($action == 'delnoti') {
    delete_user_notifications($id, $viewed = 1);
    confirm_referrer('notifications.php');
    redirect('notifications.php?id=' . $id);
}
$viewed_notifications = array();
$unviewed_notifications = array();
$num_viewed = has_viewed_notifications();
$num_unviewed = has_unviewed_notifications();
if ($num_viewed) {
Beispiel #4
0
 public function display($id, $section = null)
 {
     global $lang_common, $lang_prof_reg, $lang_profile, $pd, $forum_time_formats, $forum_date_formats;
     // Include UTF-8 function
     require FEATHER_ROOT . 'include/utf8/substr_replace.php';
     require FEATHER_ROOT . 'include/utf8/ucwords.php';
     // utf8_ucwords needs utf8_substr_replace
     require FEATHER_ROOT . 'include/utf8/strcasecmp.php';
     // Load the prof_reg.php language file
     require FEATHER_ROOT . 'lang/' . $this->user->language . '/prof_reg.php';
     // Load the profile.php language file
     require FEATHER_ROOT . 'lang/' . $this->user->language . '/profile.php';
     if ($this->request->post('update_group_membership')) {
         if ($this->user->g_id > FEATHER_ADMIN) {
             message($lang_common['No permission'], '403');
         }
         $this->model->update_group_membership($id, $this->feather);
     } elseif ($this->request->post('update_forums')) {
         if ($this->user->g_id > FEATHER_ADMIN) {
             message($lang_common['No permission'], '403');
         }
         $this->model->update_mod_forums($id, $this->feather);
     } elseif ($this->request->post('ban')) {
         if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) {
             message($lang_common['No permission'], '403');
         }
         $this->model->ban_user($id);
     } elseif ($this->request->post('delete_user') || $this->request->post('delete_user_comply')) {
         if ($this->user->g_id > FEATHER_ADMIN) {
             message($lang_common['No permission'], '403');
         }
         $this->model->delete_user($id, $this->feather);
         $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Confirm delete user']);
         define('FEATHER_ACTIVE_PAGE', 'profile');
         $this->header->setTitle($page_title)->display();
         $this->feather->render('profile/delete_user.php', array('lang_common' => $lang_common, 'username' => $this->model->get_username($id), 'lang_profile' => $lang_profile, 'id' => $id));
         $this->footer->display();
     } elseif ($this->request->post('form_sent')) {
         // Fetch the user group of the user we are editing
         $info = $this->model->fetch_user_group($id);
         if ($this->user->id != $id && (!$this->user->is_admmod || $this->user->g_id != FEATHER_ADMIN && ($this->user->g_mod_edit_users == '0' || $info['group_id'] == FEATHER_ADMIN || $info['is_moderator']))) {
             // or the user is another mod
             message($lang_common['No permission'], '403');
         }
         $this->model->update_profile($id, $info, $section, $this->feather);
     }
     $user = $this->model->get_user_info($id);
     $last_post = format_time($user['last_post']);
     if ($user['signature'] != '') {
         require FEATHER_ROOT . 'include/parser.php';
         $parsed_signature = parse_signature($user['signature']);
     }
     // View or edit?
     if ($this->user->id != $id && (!$this->user->is_admmod || $this->user->g_id != FEATHER_ADMIN && ($this->user->g_mod_edit_users == '0' || $user['g_id'] == FEATHER_ADMIN || $user['g_moderator'] == '1'))) {
         // or the user is another mod
         $user_info = $this->model->parse_user_info($user);
         $page_title = array(feather_escape($this->config['o_board_title']), sprintf($lang_profile['Users profile'], feather_escape($user['username'])));
         define('FEATHER_ALLOW_INDEX', 1);
         define('FEATHER_ACTIVE_PAGE', 'profile');
         $this->header->setTitle($page_title)->display();
         $this->feather->render('profile/view_profile.php', array('lang_common' => $lang_common, 'lang_profile' => $lang_profile, 'user_info' => $user_info));
         $this->footer->display();
     } else {
         if (!$section || $section == 'essentials') {
             $user_disp = $this->model->edit_essentials($id, $user);
             $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section essentials']);
             $required_fields = array('req_username' => $lang_common['Username'], 'req_email' => $lang_common['Email']);
             define('FEATHER_ACTIVE_PAGE', 'profile');
             $this->header->setTitle($page_title)->setRequiredFields($required_fields)->display();
             $this->model->generate_profile_menu('essentials', $id);
             $this->feather->render('profile/section_essentials.php', array('lang_common' => $lang_common, 'lang_profile' => $lang_profile, 'lang_prof_reg' => $lang_prof_reg, 'feather' => $this->feather, 'id' => $id, 'user' => $user, 'user_disp' => $user_disp, 'forum_time_formats' => $forum_time_formats, 'forum_date_formats' => $forum_date_formats));
         } elseif ($section == 'personal') {
             if ($this->user->g_set_title == '1') {
                 $title_field = '<label>' . $lang_common['Title'] . ' <em>(' . $lang_profile['Leave blank'] . ')</em><br /><input type="text" name="title" value="' . feather_escape($user['title']) . '" size="30" maxlength="50" /><br /></label>' . "\n";
             }
             $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section personal']);
             define('FEATHER_ACTIVE_PAGE', 'profile');
             $this->header->setTitle($page_title)->display();
             $this->model->generate_profile_menu('personal', $id);
             $this->feather->render('profile/section_personal.php', array('lang_common' => $lang_common, 'lang_profile' => $lang_profile, 'user' => $user, 'feather' => $this->feather));
         } elseif ($section == 'messaging') {
             $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section messaging']);
             define('FEATHER_ACTIVE_PAGE', 'profile');
             $this->header->setTitle($page_title)->display();
             $this->model->generate_profile_menu('messaging', $id);
             $this->feather->render('profile/section_messaging.php', array('lang_common' => $lang_common, 'lang_profile' => $lang_profile, 'user' => $user));
         } elseif ($section == 'personality') {
             if ($this->config['o_avatars'] == '0' && $this->config['o_signatures'] == '0') {
                 message($lang_common['Bad request'], '404');
             }
             $avatar_field = '<span><a href="' . get_link('user/' . $id . '/action/upload_avatar/') . '">' . $lang_profile['Change avatar'] . '</a></span>';
             $user_avatar = generate_avatar_markup($id);
             if ($user_avatar) {
                 $avatar_field .= ' <span><a href="' . get_link('user/' . $id . '/action/delete_avatar/') . '">' . $lang_profile['Delete avatar'] . '</a></span>';
             } else {
                 $avatar_field = '<span><a href="' . get_link('user/' . $id . '/action/upload_avatar/') . '">' . $lang_profile['Upload avatar'] . '</a></span>';
             }
             if ($user['signature'] != '') {
                 $signature_preview = '<p>' . $lang_profile['Sig preview'] . '</p>' . "\n\t\t\t\t\t\t\t" . '<div class="postsignature postmsg">' . "\n\t\t\t\t\t\t\t\t" . '<hr />' . "\n\t\t\t\t\t\t\t\t" . $parsed_signature . "\n\t\t\t\t\t\t\t" . '</div>' . "\n";
             } else {
                 $signature_preview = '<p>' . $lang_profile['No sig'] . '</p>' . "\n";
             }
             $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section personality']);
             define('FEATHER_ACTIVE_PAGE', 'profile');
             $this->header->setTitle($page_title)->display();
             $this->model->generate_profile_menu('personality', $id);
             $this->feather->render('profile/section_personality.php', array('lang_common' => $lang_common, 'lang_profile' => $lang_profile, 'user_avatar' => $user_avatar, 'avatar_field' => $avatar_field, 'signature_preview' => $signature_preview, 'user' => $user, 'feather' => $this->feather));
         } elseif ($section == 'display') {
             $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section display']);
             define('FEATHER_ACTIVE_PAGE', 'profile');
             $this->header->setTitle($page_title)->display();
             $this->model->generate_profile_menu('display', $id);
             $this->feather->render('profile/section_display.php', array('lang_common' => $lang_common, 'lang_profile' => $lang_profile, 'user' => $user));
         } elseif ($section == 'privacy') {
             $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section privacy']);
             define('FEATHER_ACTIVE_PAGE', 'profile');
             $this->header->setTitle($page_title)->display();
             $this->model->generate_profile_menu('privacy', $id);
             $this->feather->render('profile/section_privacy.php', array('lang_common' => $lang_common, 'lang_profile' => $lang_profile, 'lang_prof_reg' => $lang_prof_reg, 'user' => $user));
         } elseif ($section == 'admin') {
             if (!$this->user->is_admmod || $this->user->g_moderator == '1' && $this->user->g_mod_ban_users == '0') {
                 message($lang_common['Bad request'], false, '403 Forbidden');
             }
             $page_title = array(feather_escape($this->config['o_board_title']), $lang_common['Profile'], $lang_profile['Section admin']);
             define('FEATHER_ACTIVE_PAGE', 'profile');
             $this->header->setTitle($page_title)->display();
             $this->model->generate_profile_menu('admin', $id);
             $this->feather->render('profile/section_admin.php', array('lang_common' => $lang_common, 'lang_profile' => $lang_profile, 'user' => $user, 'forum_list' => $this->model->get_forum_list($id), 'group_list' => $this->model->get_group_list($user), 'feather' => $this->feather));
         } else {
             message($lang_common['Bad request'], '404');
         }
         $this->footer->display();
     }
 }
                    echo $lang_profile['Update profile'];
                    ?>
" /></span>
			</div>
		</form>
	</div>
<?php 
                    ($hook = get_hook('pf_change_details_signature_end')) ? eval($hook) : null;
                    $tpl_temp = forum_trim(ob_get_contents());
                    $tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);
                    ob_end_clean();
                    // END SUBST - <!-- forum_main -->
                    require FORUM_ROOT . 'footer.php';
                } else {
                    if ($section == 'avatar' && $forum_config['o_avatars'] == '1') {
                        $forum_page['avatar_markup'] = generate_avatar_markup($id, $user['avatar'], $user['avatar_width'], $user['avatar_height'], $user['username'], TRUE);
                        // Setup breadcrumbs
                        $forum_page['crumbs'] = array(array($forum_config['o_board_title'], forum_link($forum_url['index'])), array(sprintf($lang_profile['Users profile'], $user['username']), forum_link($forum_url['user'], $id)), $lang_profile['Section avatar']);
                        // Setup the form
                        $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
                        $forum_page['form_action'] = forum_link($forum_url['profile_avatar'], $id);
                        $forum_page['hidden_fields'] = array('form_sent' => '<input type="hidden" name="form_sent" value="1" />', 'max_file_size' => '<input type="hidden" name="MAX_FILE_SIZE" value="' . $forum_config['o_avatars_size'] . '" />', 'csrf_token' => '<input type="hidden" name="csrf_token" value="' . generate_form_token($forum_page['form_action']) . '" />');
                        // Setup form information
                        $forum_page['frm_info'] = array();
                        if (!empty($forum_page['avatar_markup'])) {
                            $forum_page['frm_info']['avatar_replace'] = '<li><span>' . $lang_profile['Avatar info replace'] . '</span></li>';
                            $forum_page['frm_info']['avatar_type'] = '<li><span>' . $lang_profile['Avatar info type'] . '</span></li>';
                            $forum_page['frm_info']['avatar_size'] = '<li><span>' . sprintf($lang_profile['Avatar info size'], $forum_config['o_avatars_width'], $forum_config['o_avatars_height'], forum_number_format($forum_config['o_avatars_size']), forum_number_format(ceil($forum_config['o_avatars_size'] / 1024))) . '</span></li>';
                            $forum_page['avatar_demo'] = $forum_page['avatar_markup'];
                        } else {
                            $forum_page['frm_info']['avatar_none'] = '<li><span>' . $lang_profile['Avatar info none'] . '</span></li>';
Beispiel #6
0
foreach ($ps as $cur_post) {
    $user_avatar = '';
    $user_info = array();
    $user_contacts = array();
    $post_actions = array();
    $actions = array();
    $signature = '';
    // If the poster is a registered user
    if ($cur_post['poster_id'] > 1) {
        $username = colourize_group($cur_post['username'], $cur_post['g_id'], $cur_post['poster_id']);
        $user_title = get_title($cur_post);
        if ($panther_config['o_censoring'] == '1') {
            $user_title = censor_words($user_title);
        }
        if ($panther_config['o_avatars'] == '1' && $panther_user['show_avatars'] != '0') {
            $user_avatar = generate_avatar_markup($cur_post['poster_id'], $cur_post['email'], $cur_post['use_gravatar']);
        }
        // We only show location, register date, post count and the contact links if "Show user info" is enabled
        if ($panther_config['o_show_user_info'] == '1') {
            if ($cur_post['location'] != '') {
                if ($panther_config['o_censoring'] == '1') {
                    $cur_post['location'] = censor_words($cur_post['location']);
                }
                $user_info[] = array('title' => $lang_topic['From'], 'value' => $cur_post['location']);
            }
            $user_info[] = array('title' => $lang_topic['Registered'], 'value' => format_time($cur_post['registered'], true));
            if ($panther_config['o_show_post_count'] == '1' || $panther_user['is_admmod']) {
                $user_info[] = array('title' => $lang_topic['Posts'], 'value' => forum_number_format($cur_post['num_posts']));
            }
            // Now let's deal with the contact links (Email and URL)
            if (($cur_post['email_setting'] == '0' && !$panther_user['is_guest'] || $panther_user['is_admmod']) && $panther_user['g_send_email'] == '1') {
Beispiel #7
0
                ?>
" /> <?php 
                echo $lang_profile['Instructions'];
                ?>
</p>
			</form>
		</div>
	</div>
<?php 
            } else {
                if ($section == 'personality') {
                    if ($pun_config['o_avatars'] == '0' && $pun_config['o_signatures'] == '0') {
                        message($lang_common['Bad request']);
                    }
                    $avatar_field = '<span><a href="profile.php?action=upload_avatar&amp;id=' . $id . '">' . $lang_profile['Change avatar'] . '</a></span>';
                    $user_avatar = generate_avatar_markup($id);
                    if ($user_avatar) {
                        $avatar_field .= ' <span><a href="profile.php?action=delete_avatar&amp;id=' . $id . '">' . $lang_profile['Delete avatar'] . '</a></span>';
                    } else {
                        $avatar_field = '<span><a href="profile.php?action=upload_avatar&amp;id=' . $id . '">' . $lang_profile['Upload avatar'] . '</a></span>';
                    }
                    if ($user['signature'] != '') {
                        $signature_preview = '<p>' . $lang_profile['Sig preview'] . '</p>' . "\n\t\t\t\t\t\t\t" . '<div class="postsignature postmsg">' . "\n\t\t\t\t\t\t\t\t" . '<hr />' . "\n\t\t\t\t\t\t\t\t" . $parsed_signature . "\n\t\t\t\t\t\t\t" . '</div>' . "\n";
                    } else {
                        $signature_preview = '<p>' . $lang_profile['No sig'] . '</p>' . "\n";
                    }
                    $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_common['Profile'], $lang_profile['Section personality']);
                    define('PUN_ACTIVE_PAGE', 'profile');
                    require PUN_ROOT . 'header.php';
                    generate_profile_menu('personality');
                    ?>
Beispiel #8
0
<?php

/**
 *
 * CMS osRealty 2.1.x
 * Autor: Roman Chernyshov
 * E-mail: support@osRealty.ru
 * URL: www.osRealty.ru
 *
 */
defined('_JEXEC') or die('Restricted access');
$err = 0;
$userid = intval($_GET['value']);
if ($userid == 0) {
    $err = 1;
}
if ($err == 0) {
    $all = $DB->getAll('SELECT `#__users`.*,`#__groups`.`g_title`, (SELECT `city_name_ru` FROM `#__cities` WHERE `#__cities`.`id_city`=`#__users`.`city`) as `city_name_ru`
				FROM `#__users` 	
				LEFT JOIN `#__groups` ON `#__groups`.`g_id`=`#__users`.`group_id`
				WHERE `#__users`.`id`=' . $userid);
    if (generate_avatar_markup($userid) == '') {
        $img_path = '<img src="/' . $theme . 'images/no_photo125x100.png" alt="" class="photo" width="' . $avator_width_profile . '" height="' . $avator_height_profile . '"/>';
    } else {
        $img_path = generate_avatar_markup($userid);
    }
}
Beispiel #9
0
$cur_announcement = $ps->fetch();
if ($cur_announcement['password'] != '') {
    check_forum_login_cookie($cur_announcement['fid'], $cur_announcement['password']);
}
$user_avatar = '';
$user_info = $user_contacts = $post_actions = array();
if ($panther_user['is_admmod'] == '1' && $panther_user['g_mod_cp'] == '1' || $panther_user['is_admin']) {
    $post_actions[] = array('class' => 'delete', 'href' => panther_link($panther_url['delete_announcement'], array($id)), 'title' => $lang_topic['Delete']);
    $post_actions[] = array('class' => 'edit', 'href' => panther_link($panther_url['edit_announcement'], array($id)), 'title' => $lang_topic['Edit']);
}
$cur_announcement['user_title'] = get_title($cur_announcement);
if ($panther_config['o_censoring'] == '1') {
    $cur_announcement['user_title'] = censor_words($cur_announcement['user_title']);
}
if ($panther_config['o_avatars'] == '1' && $panther_user['show_avatars'] != '0') {
    $user_avatar = generate_avatar_markup($cur_announcement['user_id'], $cur_announcement['email'], $cur_announcement['use_gravatar']);
}
// We only show location, register date, post count and the contact links if "Show user info" is enabled
if ($panther_config['o_show_user_info'] == '1') {
    if ($cur_announcement['location'] != '') {
        if ($panther_config['o_censoring'] == '1') {
            $cur_announcement['location'] = censor_words($cur_announcement['location']);
        }
        $user_info[] = array('title' => $lang_topic['From'], 'value' => $cur_announcement['location']);
    }
    $user_info[] = array('title' => $lang_topic['Registered'], 'value' => format_time($cur_announcement['registered'], true));
    if ($panther_config['o_show_post_count'] == '1' || $panther_user['is_admmod']) {
        $user_info[] = array('title' => $lang_topic['Posts'], 'value' => forum_number_format($cur_announcement['num_posts']));
    }
    // Now let's deal with the contact links (Email and URL)
    if (($cur_announcement['email_setting'] == '0' && !$panther_user['is_guest'] || $panther_user['is_admmod']) && $panther_user['g_send_email'] == '1') {
Beispiel #10
0
     $forum_page['post_ident']['byline'] = '<span class="post-byline">' . sprintf($cur_post['id'] == $cur_topic['first_post_id'] ? $lang_topic['Topic byline'] : $lang_topic['Reply byline'], $forum_user['g_view_users'] == '1' ? '<a title="' . sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])) . '" href="' . forum_link($forum_url['user'], $cur_post['poster_id']) . '">' . forum_htmlencode($cur_post['username']) . '</a>' : '<strong>' . forum_htmlencode($cur_post['username']) . '</strong>') . '</span>';
 } else {
     $forum_page['post_ident']['byline'] = '<span class="post-byline">' . sprintf($cur_post['id'] == $cur_topic['first_post_id'] ? $lang_topic['Topic byline'] : $lang_topic['Reply byline'], '<strong>' . forum_htmlencode($cur_post['username']) . '</strong>') . '</span>';
 }
 $forum_page['post_ident']['link'] = '<span class="post-link"><a class="permalink" rel="bookmark" title="' . $lang_topic['Permalink post'] . '" href="' . forum_link($forum_url['post'], $cur_post['id']) . '">' . format_time($cur_post['posted']) . '</a></span>';
 if ($cur_post['edited'] != '') {
     $forum_page['post_ident']['edited'] = '<span class="post-edit">' . sprintf($lang_topic['Last edited'], forum_htmlencode($cur_post['edited_by']), format_time($cur_post['edited'])) . '</span>';
 }
 ($hook = get_hook('vt_row_pre_post_ident_merge')) ? eval($hook) : null;
 if (isset($user_data_cache[$cur_post['poster_id']]['author_ident'])) {
     $forum_page['author_ident'] = $user_data_cache[$cur_post['poster_id']]['author_ident'];
 } else {
     // Generate author identification
     if ($cur_post['poster_id'] > 1) {
         if ($forum_config['o_avatars'] == '1' && $forum_user['show_avatars'] != '0') {
             $forum_page['avatar_markup'] = generate_avatar_markup($cur_post['poster_id'], $cur_post['avatar'], $cur_post['avatar_width'], $cur_post['avatar_height'], $cur_post['username']);
             if (!empty($forum_page['avatar_markup'])) {
                 $forum_page['author_ident']['avatar'] = '<li class="useravatar">' . $forum_page['avatar_markup'] . '</li>';
             }
         }
         $forum_page['author_ident']['username'] = '******' . ($forum_user['g_view_users'] == '1' ? '<a title="' . sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])) . '" href="' . forum_link($forum_url['user'], $cur_post['poster_id']) . '">' . forum_htmlencode($cur_post['username']) . '</a>' : '<strong>' . forum_htmlencode($cur_post['username']) . '</strong>') . '</li>';
         $forum_page['author_ident']['usertitle'] = '<li class="usertitle"><span>' . get_title($cur_post) . '</span></li>';
         if ($cur_post['is_online'] == $cur_post['poster_id']) {
             $forum_page['author_ident']['status'] = '<li class="userstatus"><span>' . $lang_topic['Online'] . '</span></li>';
         } else {
             $forum_page['author_ident']['status'] = '<li class="userstatus"><span>' . $lang_topic['Offline'] . '</span></li>';
         }
     } else {
         $forum_page['author_ident']['username'] = '******' . forum_htmlencode($cur_post['username']) . '</strong></li>';
         $forum_page['author_ident']['usertitle'] = '<li class="usertitle"><span>' . get_title($cur_post) . '</span></li>';
     }
Beispiel #11
0
    $sql .= $where_cond;
    $sql1 .= $where_cond;
}
// Fetch user count
$ps = $db->run($sql, $data);
$num_users = $ps->fetchColumn();
// Determine the user offset (based on $_GET['p'])
$num_pages = ceil($num_users / 50);
$p = !isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages ? 1 : intval($_GET['p']);
$start_from = 50 * ($p - 1);
$data[':start'] = $start_from;
$sql1 .= " ORDER BY " . $sort_by . " " . $sort_dir . ", u.id ASC LIMIT :start, 50";
$page_title = array($panther_config['o_board_title'], $lang_common['User list']);
if ($panther_user['g_search_users'] == '1') {
    $focus_element = array('userlist', 'username');
}
($hook = get_extensions('userlist_before_header')) ? eval($hook) : null;
define('PANTHER_ALLOW_INDEX', 1);
define('PANTHER_ACTIVE_PAGE', 'userlist');
require PANTHER_ROOT . 'header.php';
$users = array();
$ps = $db->run($sql1, $data);
if ($ps->rowCount()) {
    foreach ($ps as $user_data) {
        $users[] = array('avatar' => generate_avatar_markup($user_data['id'], $user_data['email'], $user_data['use_gravatar'], array(32, 32)), 'is_online' => $user_data['is_online'] == $user_data['id'] ? true : false, 'username' => colourize_group($user_data['username'], $user_data['g_id'], $user_data['id']), 'title' => get_title($user_data), 'num_posts' => forum_number_format($user_data['num_posts']), 'registered' => format_time($user_data['registered'], true));
    }
}
$tpl = load_template('userlist.tpl');
echo $tpl->render(array('lang_search' => $lang_search, 'lang_ul' => $lang_ul, 'lang_common' => $lang_common, 'lang_online' => $lang_online, 'panther_groups' => $panther_groups, 'show_post_count' => $show_post_count, 'userlist_link' => panther_link($panther_url['userlist']), 'panther_user' => $panther_user, 'username' => $username, 'show_group' => $show_group, 'sort_by' => $sort_by, 'sort_dir' => $sort_dir, 'pagination' => paginate($num_pages, $p, $panther_url['userlist_result'], array(urlencode($username), $show_group, $sort_by, $sort_dir)), 'users' => $users, 'panther_config' => $panther_config));
($hook = get_extensions('userlist_after_output')) ? eval($hook) : null;
require PANTHER_ROOT . 'footer.php';
Beispiel #12
0
$data = array(':fid' => $box_id, ':uid' => $panther_user['id']);
$ps = $db->run('SELECT COUNT(c.id) FROM ' . $db->prefix . 'conversations AS c INNER JOIN ' . $db->prefix . 'pms_data AS cd ON c.id=cd.topic_id WHERE cd.user_id=:uid AND cd.deleted=0 AND (cd.folder_id=:fid ' . ($box_id == 1 ? 'OR cd.viewed=0)' : ')'), $data);
$messages = $ps->fetchColumn();
$num_pages = ceil($messages / $panther_user['disp_topics']);
$p = !isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages ? 1 : intval($_GET['p']);
$start_from = $panther_user['disp_topics'] * ($p - 1);
$data = array(':uid' => $panther_user['id'], ':fid' => $box_id, ':start' => $start_from);
$ps = $db->run('SELECT c.id, c.subject, c.poster, c.poster_id, c.num_replies, c.last_post, c.last_poster, c.last_post_id, cd.viewed, u.group_id AS poster_gid, u.email, u.use_gravatar, l.id AS last_poster_id, l.group_id AS last_poster_gid FROM ' . $db->prefix . 'conversations AS c INNER JOIN ' . $db->prefix . 'pms_data AS cd ON c.id=cd.topic_id LEFT JOIN ' . $db->prefix . 'users AS u ON u.id=c.poster_id LEFT JOIN ' . $db->prefix . 'users AS l ON l.username=c.last_poster WHERE cd.user_id=:uid AND cd.deleted=0 AND (cd.folder_id=:fid ' . ($box_id == 1 ? 'OR cd.viewed=0)' : ')') . 'ORDER BY c.last_post DESC LIMIT :start, ' . $panther_user['disp_topics'], $data);
define('COMMON_JAVASCRIPT', true);
$page_title = array($panther_config['o_board_title'], $lang_common['PM'], $lang_pm['PM Inbox']);
define('PANTHER_ALLOW_INDEX', 1);
define('PANTHER_ACTIVE_PAGE', 'pm');
require PANTHER_ROOT . 'header.php';
($hook = get_extensions('inbox_before_display')) ? eval($hook) : null;
$topics = array();
foreach ($ps as $cur_topic) {
    $data = array(':tid' => $cur_topic['id']);
    $users = array();
    $ps1 = $db->run('SELECT cd.user_id AS id, u.username, u.group_id FROM ' . $db->prefix . 'pms_data AS cd INNER JOIN ' . $db->prefix . 'users AS u ON cd.user_id=u.id WHERE topic_id=:tid', $data);
    foreach ($ps1 as $user_data) {
        $users[] = colourize_group($user_data['username'], $user_data['group_id'], $user_data['id']);
    }
    if ($panther_config['o_censoring'] == '1') {
        $cur_topic['subject'] = censor_words($cur_topic['subject']);
    }
    $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $panther_user['disp_posts']);
    $topics[] = array('viewed' => $cur_topic['viewed'], 'id' => $cur_topic['id'], 'poster' => colourize_group($cur_topic['poster'], $cur_topic['poster_gid'], $cur_topic['poster_id']), 'users' => $users, 'last_post_avatar' => generate_avatar_markup($cur_topic['last_poster_id'], $cur_topic['email'], $cur_topic['use_gravatar'], array(32, 32)), 'last_post_link' => panther_link($panther_url['pms_post'], array($cur_topic['last_post_id'])), 'last_post' => format_time($cur_topic['last_post']), 'last_poster' => colourize_group($cur_topic['last_poster'], $cur_topic['last_poster_gid'], $cur_topic['last_poster_id']), 'num_replies' => forum_number_format($cur_topic['num_replies']), 'new_post_link' => panther_link($panther_url['pms_new'], array($cur_topic['id'])), 'pagination' => paginate($num_pages_topic, -1, $panther_url['pms_paginate'], array($cur_topic['id'])), 'num_pages' => $num_pages_topic, 'url' => panther_link($panther_url['pms_view'], array($cur_topic['id'])), 'subject' => $cur_topic['subject']);
}
$tpl = load_template('inbox.tpl');
echo $tpl->render(array('lang_common' => $lang_common, 'lang_pm' => $lang_pm, 'index_link' => panther_link($panther_url['index']), 'inbox_link' => panther_link($panther_url['inbox']), 'box_link' => panther_link($panther_url['box'], array($box_id)), 'message_link' => panther_link($panther_url['send_message']), 'box_name' => $box_name, 'pm_menu' => generate_pm_menu($box_id), 'csrf_token' => generate_csrf_token(), 'page' => $p, 'pagination' => paginate($num_pages, $p, $panther_url['box'], array($box_id)), 'box_id' => $box_id, 'topics' => $topics));
require PANTHER_ROOT . 'footer.php';
Beispiel #13
0
                    $new_topics[$cur_forum['fid']] = $cur_subforum['last_post'];
                    $cur_forum['search_link'] = panther_link($panther_url['search_new_results'], array($cur_subforum['id']));
                }
            }
            $subforum_list[] = array('fid' => $cur_subforum['id'], 'name' => $cur_subforum['forum_name'], 'link' => panther_link($panther_url['forum'], array($cur_subforum['id'], url_friendly($cur_subforum['forum_name']))));
        }
    }
    if ($cur_forum['redirect_url'] != '') {
        $num_topics = $num_posts = '-';
    } else {
        $num_topics = forum_number_format($num_topics);
        $num_posts = forum_number_format($num_posts);
    }
    $forums[$cur_forum['fid']] = array('cid' => $cur_forum['cid'], 'fid' => $cur_forum['fid'], 'moderators' => $moderators, 'last_post' => $cur_forum['last_post'] ? format_time($cur_forum['last_post']) : '', 'num_topics' => $num_topics, 'num_posts' => $num_posts, 'link' => panther_link($panther_url['forum'], array($cur_forum['fid'], url_friendly($cur_forum['forum_name']))), 'forum_name' => $cur_forum['forum_name'], 'forum_desc' => $cur_forum['forum_desc'], 'search_forum' => $cur_forum['search_link'], 'redirect_url' => $cur_forum['redirect_url'], 'show_post_info' => $cur_forum['show_post_info'], 'subforum_list' => $subforum_list);
    if ($cur_forum['last_post']) {
        $forums[$cur_forum['fid']]['last_post_avatar'] = generate_avatar_markup($cur_forum['uid'], $cur_forum['email'], $cur_forum['use_gravatar'], array(32, 32));
        $forums[$cur_forum['fid']]['last_post_link'] = panther_link($panther_url['post'], array($cur_forum['last_post_id']));
        $forums[$cur_forum['fid']]['last_topic_link'] = panther_link($panther_url['topic'], array($cur_forum['last_topic_id'], url_friendly($cur_forum['last_topic'])));
        $forums[$cur_forum['fid']]['last_topic'] = panther_strlen($cur_forum['last_topic']) > 30 ? utf8_substr($cur_forum['last_topic'], 0, 30) . ' …' : $cur_forum['last_topic'];
        $forums[$cur_forum['fid']]['last_poster'] = isset($cur_forum['group_id']) ? colourize_group($cur_forum['last_poster'], $cur_forum['group_id'], $cur_forum['uid']) : colourize_group($cur_forum['last_poster'], PANTHER_GUEST);
    }
}
if ($panther_config['o_users_online'] == '1') {
    // Collect some statistics from the database
    if (file_exists(FORUM_CACHE_DIR . 'cache_users_info.php')) {
        include FORUM_CACHE_DIR . 'cache_users_info.php';
    }
    if (!defined('PANTHER_USERS_INFO_LOADED')) {
        if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
            require PANTHER_ROOT . 'include/cache.php';
        }
Beispiel #14
0
                ?>
_box">
	<?php 
                echo $message[1];
                ?>
     </div>
<?php 
            }
            ?>
<div class="menu-body5">
	<form method="post" action="" enctype="multipart/form-data"/>
		<?php 
            if (generate_avatar_markup($user->get_property('userID')) == '') {
                $img_path = '<img src="/img/no_avatar.png" alt="" class="photo" width="150" />';
            } else {
                $img_path = generate_avatar_markup($user->get_property('userID'));
            }
            ?>
		<table class="user-table">
		<tr><td width="250" align="center" valign="top">
			<?php 
            echo $img_path;
            ?>
<br/>
			<input type="checkbox" name="del_ava" value="1"/> <span class="link1n">Удалить аватор</span><br />
			Загрузить аватор: <input type="file" name="photo"/>
		</td><td valign="top">
		<input type="hidden" name="event" value="setup"/>
		<input type="hidden" name="update" value="1"/>
		
		<table>
Beispiel #15
0
 public function print_posts($topic_id, $start_from, $cur_topic, $is_admmod)
 {
     global $lang_topic, $lang_common, $pd;
     $post_data = array();
     $post_count = 0;
     // Keep track of post numbers
     // Retrieve a list of post IDs, LIMIT is (really) expensive so we only fetch the IDs here then later fetch the remaining data
     $result = DB::for_table('posts')->select('id')->where('topic_id', $topic_id)->order_by('id')->limit($this->user->disp_topics)->offset($start_from)->find_many();
     $post_ids = array();
     foreach ($result as $cur_post_id) {
         $post_ids[] = $cur_post_id['id'];
     }
     if (empty($post_ids)) {
         error('The post table and topic table seem to be out of sync!', __FILE__, __LINE__);
     }
     // Retrieve the posts (and their respective poster/online status)
     $select_print_posts = array('u.email', 'u.title', 'u.url', 'u.location', 'u.signature', 'u.email_setting', 'u.num_posts', 'u.registered', 'u.admin_note', 'p.id', 'username' => 'p.poster', 'p.poster_id', 'p.poster_ip', 'p.poster_email', 'p.message', 'p.hide_smilies', 'p.posted', 'p.edited', 'p.edited_by', 'g.g_id', 'g.g_user_title', 'g.g_promote_next_group', 'is_online' => 'o.user_id');
     $result = DB::for_table('posts')->table_alias('p')->select_many($select_print_posts)->inner_join('users', array('u.id', '=', 'p.poster_id'), 'u')->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g')->raw_join('LEFT OUTER JOIN ' . $this->feather->prefix . 'online', "o.user_id!=1 AND o.idle=0 AND o.user_id=u.id", 'o')->where_in('p.id', $post_ids)->order_by('p.id')->find_array();
     foreach ($result as $cur_post) {
         $post_count++;
         $cur_post['user_avatar'] = '';
         $cur_post['user_info'] = array();
         $cur_post['user_contacts'] = array();
         $cur_post['post_actions'] = array();
         $cur_post['is_online_formatted'] = '';
         $cur_post['signature_formatted'] = '';
         // If the poster is a registered user
         if ($cur_post['poster_id'] > 1) {
             if ($this->user->g_view_users == '1') {
                 $cur_post['username_formatted'] = '<a href="' . get_base_url() . '/user/' . $cur_post['poster_id'] . '/">' . feather_escape($cur_post['username']) . '</a>';
             } else {
                 $cur_post['username_formatted'] = feather_escape($cur_post['username']);
             }
             $cur_post['user_title_formatted'] = get_title($cur_post);
             if ($this->config['o_censoring'] == '1') {
                 $cur_post['user_title_formatted'] = censor_words($cur_post['user_title_formatted']);
             }
             // Format the online indicator
             $cur_post['is_online_formatted'] = $cur_post['is_online'] == $cur_post['poster_id'] ? '<strong>' . $lang_topic['Online'] . '</strong>' : '<span>' . $lang_topic['Offline'] . '</span>';
             if ($this->config['o_avatars'] == '1' && $this->user->show_avatars != '0') {
                 if (isset($avatar_cache[$cur_post['poster_id']])) {
                     $cur_post['user_avatar'] = $avatar_cache[$cur_post['poster_id']];
                 } else {
                     $cur_post['user_avatar'] = $avatar_cache[$cur_post['poster_id']] = generate_avatar_markup($cur_post['poster_id']);
                 }
             }
             // We only show location, register date, post count and the contact links if "Show user info" is enabled
             if ($this->config['o_show_user_info'] == '1') {
                 if ($cur_post['location'] != '') {
                     if ($this->config['o_censoring'] == '1') {
                         $cur_post['location'] = censor_words($cur_post['location']);
                     }
                     $cur_post['user_info'][] = '<dd><span>' . $lang_topic['From'] . ' ' . feather_escape($cur_post['location']) . '</span></dd>';
                 }
                 $cur_post['user_info'][] = '<dd><span>' . $lang_topic['Registered'] . ' ' . format_time($cur_post['registered'], true) . '</span></dd>';
                 if ($this->config['o_show_post_count'] == '1' || $this->user->is_admmod) {
                     $cur_post['user_info'][] = '<dd><span>' . $lang_topic['Posts'] . ' ' . forum_number_format($cur_post['num_posts']) . '</span></dd>';
                 }
                 // Now let's deal with the contact links (Email and URL)
                 if (($cur_post['email_setting'] == '0' && !$this->user->is_guest || $this->user->is_admmod) && $this->user->g_send_email == '1') {
                     $cur_post['user_contacts'][] = '<span class="email"><a href="mailto:' . feather_escape($cur_post['email']) . '">' . $lang_common['Email'] . '</a></span>';
                 } elseif ($cur_post['email_setting'] == '1' && !$this->user->is_guest && $this->user->g_send_email == '1') {
                     $cur_post['user_contacts'][] = '<span class="email"><a href="' . get_link('mail/' . $cur_post['poster_id'] . '/') . '">' . $lang_common['Email'] . '</a></span>';
                 }
                 if ($cur_post['url'] != '') {
                     if ($this->config['o_censoring'] == '1') {
                         $cur_post['url'] = censor_words($cur_post['url']);
                     }
                     $cur_post['user_contacts'][] = '<span class="website"><a href="' . feather_escape($cur_post['url']) . '" rel="nofollow">' . $lang_topic['Website'] . '</a></span>';
                 }
             }
             if ($this->user->g_id == FEATHER_ADMIN || $this->user->g_moderator == '1' && $this->user->g_mod_promote_users == '1') {
                 if ($cur_post['g_promote_next_group']) {
                     $cur_post['user_info'][] = '<dd><span><a href="' . get_base_url() . '/user/' . $cur_post['poster_id'] . '/action/promote/pid/' . $cur_post['id'] . '">' . $lang_topic['Promote user'] . '</a></span></dd>';
                 }
             }
             if ($this->user->is_admmod) {
                 $cur_post['user_info'][] = '<dd><span><a href="' . get_link('moderate/get-host/post/' . $cur_post['id'] . '/') . '" title="' . feather_escape($cur_post['poster_ip']) . '">' . $lang_topic['IP address logged'] . '</a></span></dd>';
                 if ($cur_post['admin_note'] != '') {
                     $cur_post['user_info'][] = '<dd><span>' . $lang_topic['Note'] . ' <strong>' . feather_escape($cur_post['admin_note']) . '</strong></span></dd>';
                 }
             }
         } else {
             $cur_post['username_formatted'] = feather_escape($cur_post['username']);
             $cur_post['user_title_formatted'] = get_title($cur_post);
             if ($this->user->is_admmod) {
                 $cur_post['user_info'][] = '<dd><span><a href="moderate.php?get_host=' . $cur_post['id'] . '" title="' . feather_escape($cur_post['poster_ip']) . '">' . $lang_topic['IP address logged'] . '</a></span></dd>';
             }
             if ($this->config['o_show_user_info'] == '1' && $cur_post['poster_email'] != '' && !$this->user->is_guest && $this->user->g_send_email == '1') {
                 $cur_post['user_contacts'][] = '<span class="email"><a href="mailto:' . feather_escape($cur_post['poster_email']) . '">' . $lang_common['Email'] . '</a></span>';
             }
         }
         // Generation post action array (quote, edit, delete etc.)
         if (!$is_admmod) {
             if (!$this->user->is_guest) {
                 $cur_post['post_actions'][] = '<li class="postreport"><span><a href="' . get_link('report/' . $cur_post['id'] . '/') . '">' . $lang_topic['Report'] . '</a></span></li>';
             }
             if ($cur_topic['closed'] == '0') {
                 if ($cur_post['poster_id'] == $this->user->id) {
                     if ($start_from + $post_count == 1 && $this->user->g_delete_topics == '1' || $start_from + $post_count > 1 && $this->user->g_delete_posts == '1') {
                         $cur_post['post_actions'][] = '<li class="postdelete"><span><a href="' . get_link('edit/' . $cur_post['id'] . '/') . '">' . $lang_topic['Delete'] . '</a></span></li>';
                     }
                     if ($this->user->g_edit_posts == '1') {
                         $cur_post['post_actions'][] = '<li class="postedit"><span><a href="' . get_link('edit/' . $cur_post['id'] . '/') . '">' . $lang_topic['Edit'] . '</a></span></li>';
                     }
                 }
                 if ($cur_topic['post_replies'] == '' && $this->user->g_post_replies == '1' || $cur_topic['post_replies'] == '1') {
                     $cur_post['post_actions'][] = '<li class="postquote"><span><a href="' . get_link('post/reply/' . $topic_id . '/quote/' . $cur_post['id'] . '/') . '">' . $lang_topic['Quote'] . '</a></span></li>';
                 }
             }
         } else {
             $cur_post['post_actions'][] = '<li class="postreport"><span><a href="' . get_link('report/' . $cur_post['id'] . '/') . '">' . $lang_topic['Report'] . '</a></span></li>';
             if ($this->user->g_id == FEATHER_ADMIN || !in_array($cur_post['poster_id'], $admin_ids)) {
                 $cur_post['post_actions'][] = '<li class="postdelete"><span><a href="' . get_link('delete/' . $cur_post['id'] . '/') . '">' . $lang_topic['Delete'] . '</a></span></li>';
                 $cur_post['post_actions'][] = '<li class="postedit"><span><a href="' . get_link('edit/' . $cur_post['id'] . '/') . '">' . $lang_topic['Edit'] . '</a></span></li>';
             }
             $cur_post['post_actions'][] = '<li class="postquote"><span><a href="' . get_link('post/reply/' . $topic_id . '/quote/' . $cur_post['id'] . '/') . '">' . $lang_topic['Quote'] . '</a></span></li>';
         }
         // Perform the main parsing of the message (BBCode, smilies, censor words etc)
         $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);
         // Do signature parsing/caching
         if ($this->config['o_signatures'] == '1' && $cur_post['signature'] != '' && $this->user->show_sig != '0') {
             if (isset($avatar_cache[$cur_post['poster_id']])) {
                 $cur_post['signature_formatted'] = $avatar_cache[$cur_post['poster_id']];
             } else {
                 $cur_post['signature_formatted'] = parse_signature($cur_post['signature']);
                 $avatar_cache[$cur_post['poster_id']] = $cur_post['signature_formatted'];
             }
         }
         $post_data[] = $cur_post;
     }
     return $post_data;
 }
Beispiel #16
0
		<input type="hidden" name="update" value="1"/>



		<h2><?php 
            echo $num['username'];
            ?>
</h2>
		<table class="formadd">
            <tr><td class="td1">ფოტო</td>
                <td>
                    <?php 
            if (generate_avatar_markup($num['id'], 1) == '') {
                $img_path = '<img src="/img/no_avatar.png" alt="" class="photo" width="100"/>';
            } else {
                $img_path = generate_avatar_markup($num['id'], 1);
            }
            ?>
                    <?php 
            echo $img_path;
            ?>
                </td>
            </tr>
            <tr><td class="td1">მომხმარებელი</td><td><input type="text" name="username" value="<?php 
            echo $num['username'];
            ?>
" <?php 
            if ($registry['onmy'] == 1) {
                ?>
disabled<?php 
            }
Beispiel #17
0
 if ($pun_user['g_view_users'] == '1') {
     $username = '******' . $cur_post['poster_id'] . '">' . pun_htmlspecialchars($cur_post['username']) . '</a>';
 } else {
     $username = pun_htmlspecialchars($cur_post['username']);
 }
 $user_title = get_title($cur_post);
 if ($pun_config['o_censoring'] == '1') {
     $user_title = censor_words($user_title);
 }
 // Format the online indicator
 $is_online = $cur_post['is_online'] == $cur_post['poster_id'] ? '<strong>' . $lang->t('Online') . '</strong>' : '<span>' . $lang->t('Offline') . '</span>';
 if ($pun_config['o_avatars'] == '1' && $pun_user['show_avatars'] != '0') {
     if (isset($user_avatar_cache[$cur_post['poster_id']])) {
         $user_avatar = $user_avatar_cache[$cur_post['poster_id']];
     } else {
         $user_avatar = $user_avatar_cache[$cur_post['poster_id']] = generate_avatar_markup($cur_post['poster_id']);
     }
 }
 // We only show location, register date, post count and the contact links if "Show user info" is enabled
 if ($pun_config['o_show_user_info'] == '1') {
     if ($cur_post['location'] != '') {
         if ($pun_config['o_censoring'] == '1') {
             $cur_post['location'] = censor_words($cur_post['location']);
         }
         $user_info[] = '<dd><span>' . $lang->t('From') . ' ' . pun_htmlspecialchars($cur_post['location']) . '</span></dd>';
     }
     $user_info[] = '<dd><span>' . $lang->t('Registered date') . ' ' . format_time($cur_post['registered'], true) . '</span></dd>';
     if ($pun_config['o_show_post_count'] == '1' || $pun_user['is_admmod']) {
         $user_info[] = '<dd><span>' . $lang->t('Num posts') . ' ' . forum_number_format($cur_post['num_posts']) . '</span></dd>';
     }
     // Now let's deal with the contact links (Email and URL)
Beispiel #18
0
                    echo $lang_profile['Instructions'];
                    ?>
</span>
			</div>
		</form>
	</div>
<?php 
                    ($hook = get_hook('pf_change_details_signature_end')) ? eval($hook) : null;
                    $tpl_temp = forum_trim(ob_get_contents());
                    $tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);
                    ob_end_clean();
                    // END SUBST - <!-- forum_main -->
                    require FORUM_ROOT . 'footer.php';
                } else {
                    if ($section == 'avatar' && $forum_config['o_avatars'] == '1') {
                        $forum_page['avatar_markup'] = generate_avatar_markup($id);
                        // Setup breadcrumbs
                        $forum_page['crumbs'] = array(array($forum_config['o_board_title'], forum_link($forum_url['index'])), array(sprintf($lang_profile['Users profile'], $user['username']), forum_link($forum_url['user'], $id)), array($lang_profile['Section avatar'], forum_link($forum_url['profile_avatar'], $id)));
                        // Setup the form
                        $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
                        $forum_page['form_action'] = forum_link($forum_url['profile_avatar'], $id);
                        $forum_page['hidden_fields'] = array('form_sent' => '<input type="hidden" name="form_sent" value="1" />', 'max_file_size' => '<input type="hidden" name="MAX_FILE_SIZE" value="' . $forum_config['o_avatars_size'] . '" />', 'csrf_token' => '<input type="hidden" name="csrf_token" value="' . generate_form_token($forum_page['form_action']) . '" />');
                        // Setup form information
                        $forum_page['frm_info'] = array();
                        if (!empty($forum_page['avatar_markup'])) {
                            $forum_page['frm_info']['avatar_replace'] = '<li><span>' . $lang_profile['Avatar info replace'] . '</span></li>';
                            $forum_page['frm_info']['avatar_type'] = '<li><span>' . $lang_profile['Avatar info type'] . '</span></li>';
                            $forum_page['frm_info']['avatar_size'] = '<li><span>' . sprintf($lang_profile['Avatar info size'], $forum_config['o_avatars_width'], $forum_config['o_avatars_height'], forum_number_format($forum_config['o_avatars_size']), forum_number_format(ceil($forum_config['o_avatars_size'] / 1024))) . '</span></li>';
                            $forum_page['avatar_demo'] = $forum_page['avatar_markup'];
                        } else {
                            $forum_page['frm_info']['avatar_none'] = '<li><span>' . $lang_profile['Avatar info none'] . '</span></li>';
Beispiel #19
0
function draw_response_list()
{
    global $result, $db, $luna_config, $id, $comment_ids, $is_admmod, $start_from, $comment_count, $admin_ids, $luna_user, $inbox;
    while ($cur_comment = $db->fetch_assoc($result)) {
        $comment_count++;
        $user_avatar = '';
        $user_info = array();
        $user_contacts = array();
        $comment_actions = array();
        $is_online = '';
        $signature = '';
        // If the commenter is a registered user
        if ($cur_comment['id']) {
            if ($luna_user['g_view_users'] == '1') {
                $username = '******' . $cur_comment['sender_id'] . '">' . luna_htmlspecialchars($cur_comment['sender']) . '</a>';
            } else {
                $username = luna_htmlspecialchars($cur_comment['sender']);
            }
            $user_title = get_title($cur_comment);
            if ($luna_config['o_censoring'] == '1') {
                $user_title = censor_words($user_title);
            }
            // Format the online indicator
            $is_online = $cur_comment['is_online'] == $cur_comment['sender_id'] ? '<strong>' . __('Online:', 'luna') . '</strong>' : '<span>' . __('Offline', 'luna') . '</span>';
            if ($luna_config['o_avatars'] == '1' && $luna_user['show_avatars'] != '0') {
                if (isset($user_avatar_cache[$cur_comment['sender_id']])) {
                    $user_avatar = $user_avatar_cache[$cur_comment['sender_id']];
                } else {
                    $user_avatar = $user_avatar_cache[$cur_comment['sender_id']] = generate_avatar_markup($cur_comment['sender_id']);
                }
            }
            // We only show location, register date, comment count and the contact links if "Show user info" is enabled
            if ($luna_config['o_show_user_info'] == '1') {
                if ($cur_comment['location'] != '') {
                    if ($luna_config['o_censoring'] == '1') {
                        $cur_comment['location'] = censor_words($cur_comment['location']);
                    }
                    $user_info[] = '<dd><span>' . __('From:', 'luna') . ' ' . luna_htmlspecialchars($cur_comment['location']) . '</span></dd>';
                }
                $user_info[] = '<dd><span>' . __('Registered since', 'luna') . ' ' . format_time($cur_comment['registered'], true) . '</span></dd>';
                if ($luna_config['o_show_comment_count'] == '1' || $luna_user['is_admmod']) {
                    $user_info[] = '<dd><span>' . __('Comments:', 'luna') . ' ' . forum_number_format($cur_comment['num_comments']) . '</span></dd>';
                }
                // Now let's deal with the contact links (Email and URL)
                if (($cur_comment['email_setting'] == '0' && !$luna_user['is_guest'] || $luna_user['is_admmod']) && $luna_user['g_send_email'] == '1') {
                    $user_contacts[] = '<span class="email"><a href="mailto:' . $cur_comment['email'] . '">' . __('Email', 'luna') . '</a></span>';
                } elseif ($cur_comment['email_setting'] == '1' && !$luna_user['is_guest'] && $luna_user['g_send_email'] == '1') {
                    $user_contacts[] = '<span class="email"><a href="misc.php?email=' . $cur_comment['sender_id'] . '">' . __('Email', 'luna') . '</a></span>';
                }
                if ($luna_config['o_enable_inbox'] == '1' && !$luna_user['is_guest'] && $luna_user['g_inbox'] == '1' && $luna_user['use_inbox'] == '1' && $cur_comment['use_inbox'] == '1') {
                    $pid = isset($cur_comment['sender_id']) ? $cur_comment['sender_id'] : $cur_comment['sender_id'];
                    $user_contacts[] = '<span class="email"><a href="new_inbox.php?uid=' . $pid . '">' . __('PM', 'luna') . '</a></span>';
                }
                if ($cur_comment['url'] != '') {
                    $user_contacts[] = '<span class="website"><a href="' . luna_htmlspecialchars($cur_comment['url']) . '">' . __('Website', 'luna') . '</a></span>';
                }
            }
            if ($luna_user['is_admmod']) {
                $user_info[] = '<dd><span><a href="backstage/moderate.php?get_host=' . $cur_comment['sender_ip'] . '" title="' . $cur_comment['sender_ip'] . '">' . __('IP log', 'luna') . '</a></span></dd>';
                if ($cur_comment['admin_note'] != '') {
                    $user_info[] = '<dd><span>' . __('Note:', 'luna') . ' <strong>' . luna_htmlspecialchars($cur_comment['admin_note']) . '</strong></span></dd>';
                }
            }
        } else {
            // If the commenter is a guest (or a user that has been deleted)
            $username = luna_htmlspecialchars($cur_comment['username']);
            $user_title = get_title($cur_comment);
            if ($luna_user['is_admmod']) {
                $user_info[] = '<dd><span><a href="backstage/moderate.php?get_host=' . $cur_comment['sender_id'] . '" title="' . $cur_comment['sender_ip'] . '">' . __('IP log', 'luna') . '</a></span></dd>';
            }
            if ($luna_config['o_show_user_info'] == '1' && $cur_comment['commenter_email'] != '' && !$luna_user['is_guest'] && $luna_user['g_send_email'] == '1') {
                $user_contacts[] = '<span class="email"><a href="mailto:' . $cur_comment['commenter_email'] . '">' . __('Email', 'luna') . '</a></span>';
            }
        }
        $username_quickreply = luna_htmlspecialchars($cur_comment['username']);
        $comment_actions[] = '<a href="new_inbox.php?reply=' . $cur_comment['shared_id'] . '&amp;quote=' . $cur_comment['mid'] . '">' . __('Quote', 'luna') . '</a>';
        // Perform the main parsing of the message (BBCode, smilies, censor words etc)
        $cur_comment['message'] = parse_message($cur_comment['message']);
        // Do signature parsing/caching
        if ($luna_config['o_signatures'] == '1' && $cur_comment['signature'] != '' && $luna_user['show_sig'] != '0') {
            if (isset($signature_cache[$cur_comment['id']])) {
                $signature = $signature_cache[$cur_comment['id']];
            } else {
                $signature = parse_signature($cur_comment['signature']);
                $signature_cache[$cur_comment['id']] = $signature;
            }
        }
        require get_view_path('comment.php');
    }
}
Beispiel #20
0
     if ($panther_config['o_avatars'] == '0' && $panther_config['o_signatures'] == '0') {
         message($lang_common['Bad request'], false, '404 Not Found');
     }
     $page_title = array($panther_config['o_board_title'], $lang_common['Profile'], $lang_profile['Section personality']);
     define('POSTING', 1);
     define('PANTHER_ACTIVE_PAGE', 'profile');
     require PANTHER_ROOT . 'header.php';
     generate_profile_menu('personality');
     if ($user['signature'] != '') {
         require PANTHER_ROOT . 'include/parser.php';
         $signature = $parser->parse_signature($user['signature']);
     } else {
         $signature = '';
     }
     $csrf_token = generate_csrf_token();
     $user_avatar = generate_avatar_markup($id, $user['email'], $user['use_gravatar']);
     $tpl = load_template('profile_personality.tpl');
     echo $tpl->render(array('lang_profile' => $lang_profile, 'lang_common' => $lang_common, 'user' => $user, 'form_action' => panther_link($panther_url['profile_personality'], array($id)), 'csrf_token' => $csrf_token, 'panther_config' => $panther_config, 'avatar_link' => panther_link($panther_url['upload_avatar'], array($id, $csrf_token)), 'user_avatar' => $user_avatar, 'can_delete' => stristr($user_avatar, '1.' . $panther_config['o_avatar']) === false && $user['use_gravatar'] == '0' ? true : false, 'delete_link' => panther_link($panther_url['delete_avatar'], array($id, $csrf_token)), 'upload_link' => panther_link($panther_url['upload_avatar'], array($id, $csrf_token)), 'gravatar_link' => panther_link($panther_url['use_gravatar'], array($id, generate_csrf_token())), 'signature_length' => forum_number_format($panther_config['p_sig_length']), 'signature' => $signature, 'quickpost' => array('bbcode' => panther_link($panther_url['help'], array('bbcode')), 'url' => panther_link($panther_url['help'], array('url')), 'img' => panther_link($panther_url['help'], array('img')), 'smilies' => panther_link($panther_url['help'], array('smilies')))));
 } else {
     if ($section == 'display') {
         $page_title = array($panther_config['o_board_title'], $lang_common['Profile'], $lang_profile['Section display']);
         define('PANTHER_ACTIVE_PAGE', 'profile');
         require PANTHER_ROOT . 'header.php';
         generate_profile_menu('display');
         $checkboxes = array();
         if ($panther_config['o_smilies'] == '1' || $panther_config['o_smilies_sig'] == '1') {
             $checkboxes[] = array('name' => 'show_smilies', 'checked' => $user['show_smilies'] == '1' ? true : false, 'title' => $lang_profile['Show smilies']);
         }
         if ($panther_config['o_signatures'] == '1') {
             $checkboxes[] = array('name' => 'show_sig', 'checked' => $user['show_sig'] == '1' ? true : false, 'title' => $lang_profile['Show sigs']);
         }
Beispiel #21
0
        $results = array();
        foreach ($search_set as $cur_search) {
            if ($panther_config['o_censoring'] == '1') {
                $cur_search['subject'] = censor_words($cur_search['subject']);
            }
            if ($show_as == 'posts') {
                ++$post_count;
                if ($panther_config['o_censoring'] == '1') {
                    $cur_search['message'] = censor_words($cur_search['message']);
                }
                $results[] = array('pid' => $cur_search, 'message' => $parser->parse_message($cur_search['message'], $cur_search['hide_smilies']), 'posted' => format_time($cur_search['pposted']), 'topic_url' => panther_link($panther_url['topic'], array($cur_search['tid'], url_friendly($cur_search['subject']))), 'post_url' => panther_link($panther_url['post'], array($cur_search['pid'])), 'post_no' => $start_from + $post_count, 'post_count' => $post_count, 'forum' => array('url' => panther_link($panther_url['forum'], array($cur_search['forum_id'], url_friendly($cur_search['forum_name']))), 'name' => $cur_search['forum_name']), 'subject' => $cur_search['subject'], 'poster' => $cur_search['poster_id'] > 1 ? colourize_group($cur_search['pposter'], $cur_search['group_id'], $cur_search['poster_id']) : '', 'post_id' => $cur_search['pid'], 'first_post_id' => $cur_search['first_post_id'], 'num_replies' => forum_number_format($cur_search['num_replies']), 'viewed' => !$panther_user['is_guest'] && $cur_search['last_post'] > $panther_user['last_visit'] && (!isset($tracked_topics['topics'][$cur_search['tid']]) || $tracked_topics['topics'][$cur_search['tid']] < $cur_search['last_post']) && (!isset($tracked_topics['forums'][$cur_search['forum_id']]) || $tracked_topics['forums'][$cur_search['forum_id']] < $cur_search['last_post']) ? false : true);
            } else {
                ++$topic_count;
                $url_subject = url_friendly($cur_search['subject']);
                $num_pages_topic = ceil(($cur_search['num_replies'] + 1) / $panther_user['disp_posts']);
                $results[$cur_search['tid']] = array('count' => ++$topic_count, 'topic_count' => forum_number_format($topic_count + $start_from), 'cur_search' => $cur_search, 'topic_poster' => $cur_search['up_id'] > 1 ? colourize_group($cur_search['poster'], $cur_search['up_group_id'], $cur_search['up_id']) : colourize_group($cur_search['poster'], PANTHER_GUEST), 'subject' => $cur_search['subject'], 'sticky' => $cur_search['sticky'], 'closed' => $cur_search['closed'], 'question' => $cur_search['question'], 'topic_link' => panther_link($panther_url['topic'], array($cur_search['tid'], $url_subject)), 'num_pages' => $num_pages_topic, 'pagination' => paginate($num_pages_topic, -1, $panther_url['topic_paginate'], array($cur_search['tid'], $url_subject)), 'new' => !$panther_user['is_guest'] && $cur_search['last_post'] > $panther_user['last_visit'] && (!isset($tracked_topics['topics'][$cur_search['tid']]) || $tracked_topics['topics'][$cur_search['tid']] < $cur_search['last_post']) && (!isset($tracked_topics['forums'][$cur_search['forum_id']]) || $tracked_topics['forums'][$cur_search['forum_id']] < $cur_search['last_post']) ? '1' : '0', 'last_post_avatar' => generate_avatar_markup($cur_search['uid'], $cur_search['email'], $cur_search['use_gravatar'], array(32, 32)), 'last_post_link' => panther_link($panther_url['post'], array($cur_search['last_post_id'])), 'last_post' => format_time($cur_search['last_post']), 'last_poster' => $cur_search['uid'] > 1 ? colourize_group($cur_search['last_poster'], $cur_search['group_id'], $cur_search['uid']) : colourize_group($cur_search['last_poster'], PANTHER_GUEST), 'num_replies' => forum_number_format($cur_search['num_replies']), 'forum' => array('url' => panther_link($panther_url['forum'], array($cur_search['forum_id'], url_friendly($cur_search['forum_name']))), 'name' => $cur_search['forum_name']));
                if ($results[$cur_search['tid']]['new'] == '1') {
                    $results[$cur_search['tid']]['new_link'] = panther_link($panther_url['topic_new_posts'], array($cur_search['tid'], $url_subject));
                }
            }
        }
        $tpl = load_template('search_results.tpl');
        echo $tpl->render(array('forum_actions' => $forum_actions, 'index_link' => panther_link($panther_url['index']), 'lang_common' => $lang_common, 'search_link' => panther_link($panther_url['search']), 'show_as' => $show_as, 'lang_search' => $lang_search, 'lang_topic' => $lang_topic, 'lang_forum' => $lang_forum, 'pagination' => paginate($num_pages, $p, $panther_url['search_pagination'], array($search_id)), 'crumbs_text' => $crumbs_text, 'results' => $results, 'panther_config' => $panther_config));
        require PANTHER_ROOT . 'footer.php';
    } else {
        message($lang_search['No hits']);
    }
}
($hook = get_extensions('search_form_before_header')) ? eval($hook) : null;
$page_title = array($panther_config['o_board_title'], $lang_search['Search']);
$focus_element = array('search', 'keywords');
Beispiel #22
0
 public function parse_user_info($user)
 {
     global $lang_common, $lang_profile;
     $user_info = array();
     $user_info['personal'][] = '<dt>' . $lang_common['Username'] . '</dt>';
     $user_info['personal'][] = '<dd>' . feather_escape($user['username']) . '</dd>';
     $user_title_field = get_title($user);
     $user_info['personal'][] = '<dt>' . $lang_common['Title'] . '</dt>';
     $user_info['personal'][] = '<dd>' . ($this->config['o_censoring'] == '1' ? censor_words($user_title_field) : $user_title_field) . '</dd>';
     if ($user['realname'] != '') {
         $user_info['personal'][] = '<dt>' . $lang_profile['Realname'] . '</dt>';
         $user_info['personal'][] = '<dd>' . feather_escape($this->config['o_censoring'] == '1' ? censor_words($user['realname']) : $user['realname']) . '</dd>';
     }
     if ($user['location'] != '') {
         $user_info['personal'][] = '<dt>' . $lang_profile['Location'] . '</dt>';
         $user_info['personal'][] = '<dd>' . feather_escape($this->config['o_censoring'] == '1' ? censor_words($user['location']) : $user['location']) . '</dd>';
     }
     if ($user['url'] != '') {
         $user['url'] = feather_escape($this->config['o_censoring'] == '1' ? censor_words($user['url']) : $user['url']);
         $user_info['personal'][] = '<dt>' . $lang_profile['Website'] . '</dt>';
         $user_info['personal'][] = '<dd><span class="website"><a href="' . $user['url'] . '" rel="nofollow">' . $user['url'] . '</a></span></dd>';
     }
     if ($user['email_setting'] == '0' && !$this->user->is_guest && $this->user->g_send_email == '1') {
         $user['email_field'] = '<a href="mailto:' . feather_escape($user['email']) . '">' . feather_escape($user['email']) . '</a>';
     } elseif ($user['email_setting'] == '1' && !$this->user->is_guest && $this->user->g_send_email == '1') {
         $user['email_field'] = '<a href="' . get_link('email/' . $user['id'] . '/') . '">' . $lang_common['Send email'] . '</a>';
     } else {
         $user['email_field'] = '';
     }
     if ($user['email_field'] != '') {
         $user_info['personal'][] = '<dt>' . $lang_common['Email'] . '</dt>';
         $user_info['personal'][] = '<dd><span class="email">' . $user['email_field'] . '</span></dd>';
     }
     if ($user['jabber'] != '') {
         $user_info['messaging'][] = '<dt>' . $lang_profile['Jabber'] . '</dt>';
         $user_info['messaging'][] = '<dd>' . feather_escape($this->config['o_censoring'] == '1' ? censor_words($user['jabber']) : $user['jabber']) . '</dd>';
     }
     if ($user['icq'] != '') {
         $user_info['messaging'][] = '<dt>' . $lang_profile['ICQ'] . '</dt>';
         $user_info['messaging'][] = '<dd>' . $user['icq'] . '</dd>';
     }
     if ($user['msn'] != '') {
         $user_info['messaging'][] = '<dt>' . $lang_profile['MSN'] . '</dt>';
         $user_info['messaging'][] = '<dd>' . feather_escape($this->config['o_censoring'] == '1' ? censor_words($user['msn']) : $user['msn']) . '</dd>';
     }
     if ($user['aim'] != '') {
         $user_info['messaging'][] = '<dt>' . $lang_profile['AOL IM'] . '</dt>';
         $user_info['messaging'][] = '<dd>' . feather_escape($this->config['o_censoring'] == '1' ? censor_words($user['aim']) : $user['aim']) . '</dd>';
     }
     if ($user['yahoo'] != '') {
         $user_info['messaging'][] = '<dt>' . $lang_profile['Yahoo'] . '</dt>';
         $user_info['messaging'][] = '<dd>' . feather_escape($this->config['o_censoring'] == '1' ? censor_words($user['yahoo']) : $user['yahoo']) . '</dd>';
     }
     if ($this->config['o_avatars'] == '1') {
         $avatar_field = generate_avatar_markup($user['id']);
         if ($avatar_field != '') {
             $user_info['personality'][] = '<dt>' . $lang_profile['Avatar'] . '</dt>';
             $user_info['personality'][] = '<dd>' . $avatar_field . '</dd>';
         }
     }
     if ($this->config['o_signatures'] == '1') {
         if (isset($parsed_signature)) {
             $user_info['personality'][] = '<dt>' . $lang_profile['Signature'] . '</dt>';
             $user_info['personality'][] = '<dd><div class="postsignature postmsg">' . $parsed_signature . '</div></dd>';
         }
     }
     $posts_field = '';
     if ($this->config['o_show_post_count'] == '1' || $this->user->is_admmod) {
         $posts_field = forum_number_format($user['num_posts']);
     }
     if ($this->user->g_search == '1') {
         $quick_searches = array();
         if ($user['num_posts'] > 0) {
             $quick_searches[] = '<a href="' . get_link('search/?action=show_user_topics&amp;user_id=' . $user['id']) . '">' . $lang_profile['Show topics'] . '</a>';
             $quick_searches[] = '<a href="' . get_link('search/?action=show_user_posts&amp;user_id=' . $user['id']) . '">' . $lang_profile['Show posts'] . '</a>';
         }
         if ($this->user->is_admmod && $this->config['o_topic_subscriptions'] == '1') {
             $quick_searches[] = '<a href="' . get_link('search/?action=show_subscriptions&amp;user_id=' . $user['id']) . '">' . $lang_profile['Show subscriptions'] . '</a>';
         }
         if (!empty($quick_searches)) {
             $posts_field .= ($posts_field != '' ? ' - ' : '') . implode(' - ', $quick_searches);
         }
     }
     if ($posts_field != '') {
         $user_info['activity'][] = '<dt>' . $lang_common['Posts'] . '</dt>';
         $user_info['activity'][] = '<dd>' . $posts_field . '</dd>';
     }
     if ($user['num_posts'] > 0) {
         $user_info['activity'][] = '<dt>' . $lang_common['Last post'] . '</dt>';
         $user_info['activity'][] = '<dd>' . format_time($user['last_post']) . '</dd>';
     }
     $user_info['activity'][] = '<dt>' . $lang_common['Registered'] . '</dt>';
     $user_info['activity'][] = '<dd>' . format_time($user['registered'], true) . '</dd>';
     return $user_info;
 }