Example #1
0
 public function __construct()
 {
     global $template, $db, $board_config, $phpbb_seo, $lang;
     global $rcs, $get, $qte;
     $template->assign_vars(array('MARQUEE_TOPIC' => str_replace("%s", $board_config['topics_on_index'], $lang['marquee_topic'])));
     if (!($result = $db->sql_query($this->getFetchSql(), false, 'topics_recent_'))) {
         message_die(GENERAL_ERROR, 'Could not query recent posts marquee information', '', __LINE__, __FILE__);
     }
     if ($rows = $db->sql_fetchrowset($result)) {
         $db->sql_freeresult($result);
     }
     $topics = count($rows) <= $board_config['topics_on_index'] ? count($rows) : $board_config['topics_on_index'];
     for ($i = 0; $i < $topics; ++$i) {
         $topic = $rows[$i];
         $mar_title = $topic["topic_title"];
         // www.phpBB-SEO.com SEO TOOLKIT BEGIN
         if (!isset($phpbb_seo->seo_url['topic'][$topic['topic_id']])) {
             $phpbb_seo->seo_url['topic'][$topic['topic_id']] = $phpbb_seo->format_url($mar_title);
         }
         // www.phpBB-SEO.com SEO TOOLKIT END
         $mar_url = $get->url('viewtopic', array(POST_TOPIC_URL => $topic["topic_id"]));
         $mar_user = $topic["username"];
         $pic = pic_for_topic($topic);
         if ($board_config['allow_smilies']) {
             $topic["topic_title"] = smilies_pass($topic["topic_title"]);
         }
         $topic_title = $topic['topic_title'];
         $qte->attr($topic_title, $topic['topic_attribute']);
         $template->assign_block_vars('marqueerow', array('FOLD_URL' => $pic, 'TOPIC_TITLE' => $topic_title, 'TOPIC_URL' => $get->url('viewtopic', array(POST_TOPIC_URL => $topic["topic_id"]), true), 'POST_URL' => $get->url('viewtopic', array('p' => $topic["post_id"]), true) . '#' . $topic["post_id"], 'STYLE' => $rcs->get_colors($topic), 'USERNAME' => $topic["username"], 'USER_PROF' => $get->url('userlist', array('mode' => 'viewprofile', POST_USERS_URL => $topic["user_id"]), true), 'POST_DATE' => create_date($board_config['default_dateformat'], $topic["post_time"], $board_config['board_timezone'])));
     }
 }
Example #2
0
 public function __construct()
 {
     global $template, $announcement_centre_config;
     $this->config = $announcement_centre_config;
     $this->config['announcement_text'] = smilies_pass($this->config['announcement_text']);
     $announcement_text_uid = make_bbcode_uid();
     $this->config['announcement_text'] = bbencode_first_pass($this->config['announcement_text'], $announcement_text_uid);
     $this->config['announcement_text'] = bbencode_second_pass($this->config['announcement_text'], $announcement_text_uid);
     $this->config['announcement_text'] = str_replace("\n", "\n<br />\n", $this->config['announcement_text']);
     $this->config['announcement_guest_text'] = smilies_pass($this->config['announcement_guest_text']);
     $announcement_guest_text_uid = make_bbcode_uid();
     $this->config['announcement_guest_text'] = bbencode_first_pass($this->config['announcement_guest_text'], $announcement_guest_text_uid);
     $this->config['announcement_guest_text'] = bbencode_second_pass($this->config['announcement_guest_text'], $announcement_guest_text_uid);
     $this->config['announcement_guest_text'] = str_replace("\n", "\n<br />\n", $this->config['announcement_guest_text']);
     $announcement_guest_text = $this->config['announcement_guest_text'];
     $announcement_title = empty($this->config['announcement_title']) ? $lang['Site_announcement_block_title'] : str_replace("\n", "\n<br />\n", $this->config['announcement_title']);
     $announcement_guest_title = empty($this->config['announcement_guest_title']) ? $lang['Guest_announcement_block_title'] : str_replace("\n", "\n<br />\n", $this->config['announcement_guest_title']);
     // get the post information in case last topic or forum has been entered
     if (!$this->config['announcement_forum_id'] == '' || !$this->config['announcement_topic_id'] == '') {
         if (!($result = $db->sql_query($this->getFetchSql()))) {
             message_die(GENERAL_ERROR, 'Error in getting announcement post', '', __LINE__, __FILE__, $sql);
         }
         if ($row = $db->sql_fetchrow($result)) {
             $row['post_text'] = smilies_pass($row['post_text']);
             $row['post_text'] = bbencode_first_pass($row['post_text'], $row['bbcode_uid']);
             $row['post_text'] = bbencode_second_pass($row['post_text'], $row['bbcode_uid']);
             $row['post_text'] = str_replace("\n", "\n<br />\n", $row['post_text']);
             $announcement_text = $row['post_text'];
         }
     } else {
         $announcement_text = $this->config['announcement_text'];
     }
     // who sees the announcements
     if ($this->config['announcement_status'] == ANNOUNCEMENTS_LEFTY74_SHOW_YES) {
         switch ($this->getDisplay()) {
             case 'normal':
                 $template->assign_block_vars('announcement_displayed', array());
                 break;
             case 'guest':
                 $template->assign_block_vars('guest_announcement_displayed', array());
                 break;
             default:
                 $template->assign_block_vars('announcement_not_displayed', array());
         }
     }
     //BEGIN ACP Site Announcement Centre by lefty74
     $template->assign_vars(array('L_ANNOUNCEMENT_TITLE' => $announcement_title, 'SITE_ANNOUNCEMENTS_LEFTY74' => $announcement_text, 'L_ANNOUNCEMENT_GUEST_TITLE' => $announcement_guest_title, 'GUEST_ANNOUNCEMENTS_LEFTY74' => $announcement_guest_text));
 }
Example #3
0
function _sf_display_nav($forum_id, $tpl_switch = '')
{
    global $db, $template;
    global $phpbb_root_path, $phpEx;
    // read forum
    $sql = 'SELECT f.forum_id, f.forum_name, f.forum_desc, f.forum_parent, c.cat_id, c.cat_title
				FROM ' . FORUMS_TABLE . ' f, ' . CATEGORIES_TABLE . ' c, ' . FORUMS_TABLE . ' fo
				WHERE fo.forum_id = ' . intval($forum_id) . '
					AND c.cat_id = fo.cat_id
					AND f.cat_id = c.cat_id
					AND f.forum_order <= fo.forum_order
				ORDER BY f.forum_order DESC';
    if (!($result = $db->sql_query($sql, false, 'forums'))) {
        message_die(GENERAL_ERROR, 'Could not query forums data', '', __LINE__, __FILE__, $sql);
    }
    $nav = array();
    $find_id = $forum_id;
    while ($row = $db->sql_fetchrow($result)) {
        if (empty($cat)) {
            $cat = array('forum_id' => intval($row['cat_id']), 'forum_name' => $row['cat_title'], 'forum_desc' => '', 'forum_parent' => 0, 'forum_type' => POST_CAT_URL);
        }
        unset($row['cat_id']);
        unset($row['cat_title']);
        if (intval($row['forum_id']) == $find_id) {
            $row['forum_type'] = POST_FORUM_URL;
            $find_id = intval($row['forum_parent']);
            unset($row['forum_parent']);
            $nav[] = $row;
        }
        if (!$find_id) {
            break;
        }
    }
    $db->sql_freeresult($result);
    if (!empty($nav)) {
        $nav[] = $cat;
        $nav = array_reverse($nav);
    }
    // display
    if ($count_nav = count($nav)) {
        for ($i = 0; $i < $count_nav; $i++) {
            $template->assign_block_vars('nav', array('U_NAV' => append_sid(($nav[$i]['forum_type'] == POST_CAT_URL ? 'index.' : 'viewforum.') . $phpEx . '?' . $nav[$i]['forum_type'] . '=' . $nav[$i]['forum_id']), 'L_NAV' => smilies_pass($nav[$i]['forum_name']), 'L_NAV_DESC' => $nav[$i]['forum_desc'], 'L_NAV_DESC_HTML' => $nav[$i]['forum_desc'] ? htmlspecialchars(preg_replace('#<[\\/\\!]*?[^<>]*?>#si', '', $nav[$i]['forum_desc'])) : ''));
            if ($tpl_switch) {
                $template->assign_block_vars('nav.' . $tpl_switch, array());
            }
        }
    }
}
Example #4
0
     $on_off_hidden = '<img src="' . $images['icon_online'] . '" alt="' . $lang['Online'] . '" title="' . $lang['Online'] . '" border="0" />';
 } else {
     if ($postrow[$i]['user_allow_viewonline'] == 0) {
         $on_off_hidden = '<img src="' . $images['icon_hidden'] . '" alt="' . $lang['Hidden'] . '" title="' . $lang['Hidden'] . '" border="0" />';
     } else {
         if ($poster_id == ANONYMOUS) {
             $on_off_hidden = '';
         } else {
             $on_off_hidden = '<img src="' . $images['icon_offline'] . '" alt="' . $lang['Offline'] . '" title="' . $lang['Offline'] . '" border="0" />';
         }
     }
 }
 //Online/Offline
 // Start Smilies Invasion Mod
 if ($board_config['allow_smilies']) {
     $post_subject = smilies_pass($post_subject);
 }
 // End Smilies Invasion Mod
 $message = AddClicksCounter($message);
 $template->assign_block_vars('postrow', array('ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'ADR_TOPIC_BOX' => $adr_topic_box, 'RABBITOSHI_LINK' => $rabbitoshi_link, 'POSTER_NAME' => $poster_id == ANONYMOUS ? $postrow[$i]['post_username'] != '' ? $postrow[$i]['post_username'] : $lang['Guest'] : $rcs->get_colors($postrow[$i], $postrow[$i]['username']), 'PAGERANK' => $PageRank, 'POSTER_RANK' => $poster_rank, 'POSTER_GENDER' => $gender_image, 'RANK_IMAGE' => $rank_image, 'POSTER_JOINED' => $poster_joined, 'POSTER_POSTS' => $poster_posts, 'POSTER_FROM' => $poster_from, 'POSTER_AVATAR' => $poster_avatar, 'POSTER_ONLINE' => $on_off_hidden, 'POST_DATE' => $post_date, 'POST_SUBJECT' => $post_subject, 'MESSAGE' => $message, 'POST_NUMBER' => $post_number, 'POST_ID' => $post_id, 'SIGNATURE' => $user_sig, 'EDITED_MESSAGE' => $l_edited_by, 'S_NUM_ROW' => $num_row, 'S_NAV_BUTTONS' => $nav_buttons, 'I_MINITIME' => $images['icon_minitime'], 'MINI_POST_IMG' => $mini_post_img, 'PROFILE_IMG' => $profile_img, 'PROFILE' => $profile, 'MINI_PROFILE_IMG' => $mini_profile_img, 'MINI_PROFILE' => $mini_profile, 'SEARCH_IMG' => $search_img, 'SEARCH' => $search, 'PM_IMG' => $pm_img, 'PM' => $pm, 'EMAIL_IMG' => $email_img, 'EMAIL' => $email, 'WWW_IMG' => $www_img, 'WWW' => $www, 'ICQ_STATUS_IMG' => $icq_status_img, 'ICQ_IMG' => $icq_img, 'ICQ' => $icq, 'AIM_IMG' => $aim_img, 'AIM' => $aim, 'MSN_IMG' => $msn_img, 'MSN' => $msn, 'YIM_IMG' => $yim_img, 'YIM' => $yim, 'EDIT_IMG' => $edit_img, 'EDIT' => $edit, 'QUOTE_IMG' => $quote_img, 'QUOTE' => $quote, 'IP_IMG' => $ip_img, 'IP' => $ip, 'DELETE_IMG' => $delpost_img, 'DELETE' => $delpost, 'I_QP_QUOTE' => $qp_quote_img, 'L_GENDER' => $lang['Gender'], 'POINTS' => $user_points, 'DONATE_POINTS' => $donate_points, 'USER_WARNINGS' => $user_warnings, 'CARD_IMG' => $card_img, 'CARD_HIDDEN_FIELDS' => $card_hidden, 'CARD_EXTRA_SPACE' => $r_card_img || $y_card_img || $g_card_img || $b_card_img ? ' ' : '', 'L_MINI_POST_ALT' => $mini_post_alt, 'KEEP_UNREAD_IMG' => $keep_unread_img, 'L_POST' => $lang['Post'], 'U_MINI_POST' => $mini_post_url, 'U_G_CARD' => $g_card_img, 'U_Y_CARD' => $y_card_img, 'U_R_CARD' => $r_card_img, 'U_B_CARD' => $b_card_img, 'S_CARD' => append_sid("card." . $phpEx), 'U_VIEW_POSTER_PROFILE' => $userdata['user_level'] != ADMIN ? append_sid("profile.{$phpEx}?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $poster_id) : append_sid("admin/admin_users.{$phpEx}?mode=edit&amp;" . POST_USERS_URL . "=" . $poster_id . "&amp;sid=" . $userdata['session_id']), 'POSTER_STYLE' => $poster_style_color, 'U_POST_ID' => $postrow[$i]['post_id']));
 display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']);
 //-- mod : birthday ------------------------------------------------------------
 $birthday->display_details($poster_birthday, $poster_zodiac, false, 'postrow');
 //-- mod : flags ---------------------------------------------------------------
 display_flag($poster_flag, false, 'postrow');
 //-- mod : post description ----------------------------------------------------
 display_sub_title('postrow', $post_sub_title, $board_config['sub_title_length']);
 //-- mod : topics enhanced -----------------------------------------------------
 if ($i != $total_posts - 1) {
     $template->assign_block_vars('postrow.spacing', array());
 }
function topic_review($topic_id, $is_inline_review)
{
    global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path;
    global $userdata, $user_ip;
    global $orig_word, $replacement_word;
    global $starttime;
    if (!$is_inline_review) {
        if (!isset($topic_id)) {
            message_die(GENERAL_MESSAGE, 'Topic_not_exist');
        }
        //
        // Get topic info ...
        //
        $sql = "SELECT t.topic_title, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments \n\t\t\tFROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f \n\t\t\tWHERE t.topic_id = {$topic_id}\n\t\t\t\tAND f.forum_id = t.forum_id";
        if (!($result = $db->sql_query($sql))) {
            message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
        }
        if (!($forum_row = $db->sql_fetchrow($result))) {
            message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
        }
        $db->sql_freeresult($result);
        $forum_id = $forum_row['forum_id'];
        $topic_title = $forum_row['topic_title'];
        //
        // Start session management
        //
        $userdata = session_pagestart($user_ip, $forum_id);
        init_userprefs($userdata);
        //
        // End session management
        //
        $is_auth = array();
        $is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_row);
        if (!$is_auth['auth_read']) {
            message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']));
        }
    }
    //
    // Define censored word matches
    //
    if (empty($orig_word) && empty($replacement_word)) {
        $orig_word = array();
        $replacement_word = array();
        obtain_word_list($orig_word, $replacement_word);
    }
    //
    // Dump out the page header and load viewtopic body template
    //
    if (!$is_inline_review) {
        $gen_simple_header = TRUE;
        $page_title = $lang['Topic_review'] . ' - ' . $topic_title;
        include $phpbb_root_path . 'includes/page_header.' . $phpEx;
        $template->set_filenames(array('reviewbody' => 'posting_topic_review.tpl'));
    }
    //
    // Go ahead and pull all data for this topic
    //
    $sql = "SELECT u.username, u.user_id, p.*,  pt.post_text, pt.post_subject, pt.bbcode_uid\n\t\tFROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt\n\t\tWHERE p.topic_id = {$topic_id}\n\t\t\tAND p.poster_id = u.user_id\n\t\t\tAND p.post_id = pt.post_id\n\t\tORDER BY p.post_time DESC\n\t\tLIMIT " . $board_config['posts_per_page'];
    if (!($result = $db->sql_query($sql))) {
        message_die(GENERAL_ERROR, 'Could not obtain post/user information', '', __LINE__, __FILE__, $sql);
    }
    //
    // Okay, let's do the loop, yeah come on baby let's do the loop
    // and it goes like this ...
    //
    if ($row = $db->sql_fetchrow($result)) {
        $mini_post_img = $images['icon_minipost'];
        $mini_post_alt = $lang['Post'];
        $i = 0;
        do {
            $poster_id = $row['user_id'];
            $poster = $row['username'];
            $post_date = create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']);
            //
            // Handle anon users posting with usernames
            //
            if ($poster_id == ANONYMOUS && $row['post_username'] != '') {
                $poster = $row['post_username'];
                $poster_rank = $lang['Guest'];
            } elseif ($poster_id == ANONYMOUS) {
                $poster = $lang['Guest'];
                $poster_rank = '';
            }
            $post_subject = $row['post_subject'] != '' ? $row['post_subject'] : '';
            $message = $row['post_text'];
            $bbcode_uid = $row['bbcode_uid'];
            //
            // If the board has HTML off but the post has HTML
            // on then we process it, else leave it alone
            //
            if (!$board_config['allow_html'] && $row['enable_html']) {
                $message = preg_replace('#(<)([\\/]?.*?)(>)#is', '&lt;\\2&gt;', $message);
            }
            if ($bbcode_uid != "") {
                $message = $board_config['allow_bbcode'] ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\\:[0-9a-z\\:]+\\]/si', ']', $message);
            }
            $message = make_clickable($message);
            if (count($orig_word)) {
                $post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
                $message = preg_replace($orig_word, $replacement_word, $message);
            }
            if ($board_config['allow_smilies'] && $row['enable_smilies']) {
                $message = smilies_pass($message);
            }
            $message = str_replace("\n", '<br />', $message);
            //
            // Again this will be handled by the templating
            // code at some point
            //
            $row_color = !($i % 2) ? $theme['td_color1'] : $theme['td_color2'];
            $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2'];
            $template->assign_block_vars('postrow', array('ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'MINI_POST_IMG' => $mini_post_img, 'POSTER_NAME' => $poster, 'POST_DATE' => $post_date, 'POST_SUBJECT' => $post_subject, 'MESSAGE' => $message, 'L_MINI_POST_ALT' => $mini_post_alt));
            $i++;
        } while ($row = $db->sql_fetchrow($result));
    } else {
        message_die(GENERAL_MESSAGE, 'Topic_post_not_exist', '', __LINE__, __FILE__, $sql);
    }
    $db->sql_freeresult($result);
    $template->assign_vars(array('L_AUTHOR' => $lang['Author'], 'L_MESSAGE' => $lang['Message'], 'L_POSTED' => $lang['Posted'], 'L_POST_SUBJECT' => $lang['Post_subject'], 'L_TOPIC_REVIEW' => $lang['Topic_review']));
    if (!$is_inline_review) {
        $template->pparse('reviewbody');
        include $phpbb_root_path . 'includes/page_tail.' . $phpEx;
    }
}
Example #6
0
 $_sf_last_child_idx = array();
 $display_categories = _sf_get_last_stacked_data($forum_data, $is_auth_ary, $_sf_root_forum_id, $_sf_cat_first, $_sf_last_sub_id, $_sf_last_child_idx);
 if (empty($display_categories)) {
     if (defined('IN_VIEWFORUM')) {
         return;
     }
     message_die(GENERAL_MESSAGE, $lang['No_forums']);
 }
 //-- mod: sf - end
 //
 // Okay, let's build the index
 //
 for ($i = 0; $i < $total_categories; $i++) {
     $cat_id = $category_rows[$i]['cat_id'];
     if ($board_config['allow_smilies']) {
         $category_rows[$i]['cat_title'] = smilies_pass($category_rows[$i]['cat_title']);
     }
     //
     // Yes, we should, so first dump out the category
     // title, then, if appropriate the forum list
     //
     if (isset($display_categories[$cat_id]) && $display_categories[$cat_id]) {
         if (!isset($phpbb_seo->seo_url['cat'][$cat_id])) {
             $phpbb_seo->seo_url['cat'][$cat_id] = $phpbb_seo->format_url($category_rows[$i]['cat_title'], $phpbb_seo->seo_static['cat']);
         }
         $template->assign_block_vars('catrow', array('DISPLAY' => is_category_collapsed($cat_id) ? '' : 'none', 'CAT_ID' => $cat_id, 'CAT_DESC' => trim($category_rows[$i]['cat_title']), 'CAT_DESC_NOHTML' => trim(preg_replace('#<([^>]+)>(([^<]+)<\\/([^>]+)>)?#iU', '', $category_rows[$i]['cat_title'])), 'U_VIEWCAT' => append_sid("index.{$phpEx}?" . POST_CAT_URL . "={$cat_id}")));
         //-- mod: sf
         if (!defined('IN_VIEWFORUM')) {
             $template->assign_block_vars('catrow.cat', array());
             $_sf_prev_forum_id = 0;
         } else {
Example #7
0
 // Highlight active words (primarily for search)
 //
 if ($highlight_match) {
     $shout = str_replace('\\"', '"', substr(@preg_replace('#(\\>(((?>([^><]+|(?R)))*)\\<))#se', "@preg_replace('#\\b(" . str_replace('\\', '\\\\', addslashes($highlight_match)) . ")\\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $shout . '<'), 1, -1));
 }
 //
 // Replace naughty words
 //
 if (count($orig_word)) {
     if ($user_sig != '') {
         $user_sig = preg_replace($orig_word, $replacement_word, $user_sig);
     }
     $shout = preg_replace($orig_word, $replacement_word, $shout);
 }
 if ($smilies_on && $shout != '' && $shout_row['enable_smilies']) {
     $shout = smilies_pass($shout);
 }
 $shout = bbencode_second_pass($shout, $shout_row['shout_bbcode_uid']);
 $shout = str_replace("\n", "\n<br />\n", $shout);
 if ($is_auth['auth_mod'] && $is_auth['auth_delete']) {
     $temp_url = append_sid("shoutbox_max.{$phpEx}?mode=ip&amp;" . POST_POST_URL . "=" . $shout_row['shout_id']);
     $ip_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_ip'] . '" alt="' . $lang['View_IP'] . '" title="' . $lang['View_IP'] . '" border="0" /></a>';
     $ip = '<a href="' . $temp_url . '">' . $lang['View_IP'] . '</a>';
     $temp_url = append_sid("shoutbox_max.{$phpEx}?mode=delete&amp;" . POST_POST_URL . "=" . $shout_row['shout_id']);
     $delshout_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>&nbsp;';
     $delshout = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
     $temp_url = append_sid("shoutbox_max.{$phpEx}?mode=censor&amp;" . POST_POST_URL . "=" . $shout_row['shout_id']);
     $censorshout_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_censor'] . '" alt="' . $lang['Censor'] . '" title="' . $lang['Censor'] . '" border="0" /></a>&nbsp;';
     $censorshout = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
 } else {
     $ip_img = '';
if (!($result = $db->sql_query($sql))) {
    message_die(GENERAL_ERROR, 'Could not query battle list', '', __LINE__, __FILE__, $sql);
}
$player_details = $db->sql_fetchrow($result);
// Get player 2 infos
$sql = "SELECT character_name FROM " . ADR_CHARACTERS_TABLE . "\n\t\tWHERE character_id = '{$purple}'";
if (!($result = $db->sql_query($sql))) {
    message_die(GENERAL_ERROR, 'Could not query battle list', '', __LINE__, __FILE__, $sql);
}
$player_2_details = $db->sql_fetchrow($result);
// Set name colours
$new_blue = $player_details['character_name'];
$new_purple = $player_2_details['character_name'];
$new_orange = $player_details['monster_name'];
/* Start: Format chat */
$log = smilies_pass($log);
$format_chat = str_replace('%ST%', '<tr><td class="row2" align="left" width="100%" cellpadding="3"><span class="genmed"><i>', $log);
$format_chat2 = str_replace('%END%', '</i></span></td></tr>', $format_chat);
$format_chat3 = str_replace('%APOS%', '\'', $format_chat2);
$format_chat4 = str_replace($new_orange, '<font color="orange"><b>' . $new_orange . '</b></font>', $format_chat3);
$format_chat5 = str_replace($new_purple, '<font color="purple"><b>' . $new_purple . '</b></font>', $format_chat4);
$format_chat6 = str_replace($new_blue, '<font color="blue"><b>' . $new_blue . '</b></font>', $format_chat5);
$format_chat7 = str_replace('%BSS%', '<tr><td class="row2" align="left" width="100%"><span class="genmed"><font color="red"><i>', $format_chat6);
$format_chat8 = str_replace('%BSE%', '</i></font></span></td></tr>', $format_chat7);
$formatted = $format_chat8;
$formatted = stripslashes($formatted);
/* End: Format chat */
if (empty($formatted)) {
    $formatted = '<tr><td class="row2" align="left" width="100%"><span class="genmed"><font color="red"><i>The battle has begun!<i></font></span></td></tr>';
}
$template->assign_vars(array('LOG' => $formatted));
Example #9
0
 /**
  * format_rss_txt() will put together BBcodes and smilies before the output
  * @access private
  */
 function format_rss_txt($subject, $message, $msg_sumarize = 0, $message_url, $bbcode_uid, $allow_smiles = TRUE, $allow_html = FALSE, $allow_sig = FALSE)
 {
     global $board_config, $userdata, $lang;
     // Since &apos; is not HTML, but is XML convert.
     $message = ' ' . str_replace("’", "'", $message);
     if (!empty($this->rss_config['rss_bbcode_filters'])) {
         $patterns = $this->rss_config['rss_bbcode_filters']['pattern'];
         $replaces = $this->rss_config['rss_bbcode_filters']['replace'];
         if (!empty($patterns)) {
             $message = preg_replace($patterns, $replaces, $message);
             // Take care of nested bbcode tags when filtering all
             if (strpos($this->rss_config['rss_strip_bbcode'], 'all') !== FALSE) {
                 $nested_cnt = preg_match_all("`(\\[[a-z]([^\\[\\]]*)\\])`i", $message, $matches);
                 for ($i = 1; $i <= $nested_cnt; $i++) {
                     $message = preg_replace($patterns, $replaces, $message);
                 }
             }
         }
     }
     if ($msg_sumarize > 0) {
         $message = $this->summarize($message, $msg_sumarize, $this->rss_config['msg_sumarize_method']);
     }
     // Close all possibly broken quote tags after summarize, since they could break the layout.
     if (strpos($message, "[quote:{$bbcode_uid}") !== FALSE) {
         $open_count = preg_match_all("#\\[quote\\:{$bbcode_uid}#si", $message, $open_matches);
         $close_count = preg_match_all("#\\[/quote\\:{$bbcode_uid}#si", $message, $close_matches);
         $tags_to_close = $open_count - $close_count;
         if ($tags_to_close > 0) {
             for ($i = 1; $i <= $tags_to_close; $i++) {
                 $message .= ($i == $tags_to_close ? '<br/><br/><b>...</b>' : '') . " [/quote:{$bbcode_uid}]";
             }
         }
     }
     // If the board has HTML off but the post has HTML
     // on then we process it, else leave it alone
     // Left commented for now as it would only be usefull for atom feed format
     // And everything goes through htmlspecialchars anyway
     //if ( $board_config['allow_html'] || !$userdata['user_allowhtml']) {
     //	if ( !$allow_html ) {
     //		$message = preg_replace('#(<)([\/]?.*?)(>)#is', "&lt;\\2&gt;", $message);
     //	}
     //}
     if ($bbcode_uid != '') {
         if ($this->rss_config['rss_allow_bbcode']) {
             if (!$this->rss_config['rss_allow_links']) {
                 $message = preg_replace("`\\[/?url(=.*?)?\\]`si", "", $message);
             }
             $message = bbencode_second_pass($message, $bbcode_uid);
             if ($msg_sumarize > 0 || !empty($this->rss_config['rss_bbcode_filters'])) {
                 // Clean all possible bbcode_uids left
                 $message = preg_replace('`\\:[0-9a-z\\:=\\"]+\\]`si', ']', $message);
             }
         } else {
             $message = preg_replace("`\\:[0-9a-z\\:=\"]+\\]`i", "]", $message);
         }
     }
     if ($this->rss_config['rss_allow_links']) {
         $message = make_clickable($message);
     }
     // Parse smilies
     if ($this->rss_config['rss_allow_smilies']) {
         if ($allow_smiles) {
             $message = smilies_pass($message);
             $message = preg_replace('`' . $this->path_config['smilies_path'] . '`', $this->path_config['smilies_url'], $message);
         }
     }
     // Replace naughty words
     if (count($orig_word)) {
         $message = str_replace('\\"', '"', substr(@preg_replace('#(\\>(((?>([^><]+|(?R)))*)\\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1));
     }
     $message .= '<br/><br/><a href="' . $message_url . '" title="' . $subject . '"><b>' . $lang['rss_more'] . '</b></a>';
     $message = str_replace("\n", "\n<br/>\n", $message);
     $message = str_replace("span", "div class=\"detail\"", $message);
     $message = preg_replace('|[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1f]|', '', $message);
     return $message;
 }
foreach ($k_blocks as $blk) {
    if ($blk['html_file_name'] == 'block_top_topics.html') {
        $block_cache_time = $blk['block_cache_time'];
    }
}
$block_cache_time = isset($block_cache_time) ? $block_cache_time : $k_config['block_cache_time_default'];
$max_top_topics = $k_config['max_top_topics'];
$days_top_topics = $k_config['days_top_topics'];
$sql = 'SELECT topic_id, topic_title, topic_replies, forum_id
	FROM ' . TOPICS_TABLE . '
	WHERE topic_approved = 1
		AND topic_replies <> 0
		AND topic_status <> 2
		AND topic_last_post_time > ' . (time() - $days_top_topics * 86400) . '
	ORDER BY topic_replies DESC';
$result = $db->sql_query_limit($sql, $max_top_topics, 0, $block_cache_time);
while ($row = $db->sql_fetchrow($result)) {
    if (!$row['topic_title']) {
        continue;
    }
    if ($auth->acl_gets('f_list', 'f_read', $row['forum_id'])) {
        // reduce length and pad with ... if too long //
        $my_title = smilies_pass($row['topic_title']);
        if (strlen($my_title) > 16) {
            $my_title = sgp_checksize($my_title, 14);
        }
        $template->assign_block_vars('top_topics', array('TOPIC_TITLE' => $my_title, 'FULL_T_TITLE' => smilies_pass($row['topic_title']), 'S_SEARCH_ACTION' => append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']), 'TOPIC_REPLIES' => $row['topic_replies']));
    }
}
$db->sql_freeresult($result);
$template->assign_vars(array('TOP_TOPICS_DAYS' => sprintf($user->lang['TOP_TOPICS_DAYS'], $k_config['days_top_topics']), 'TOP_TOPICS_DEBUG' => sprintf($user->lang['PORTAL_DEBUG_QUERIES'], $queries ? $queries : '0', $cached_queries ? $cached_queries : '0', $total_queries ? $total_queries : '0')));
Example #11
0
     $portal_page = $row;
 }
 $db->sql_freeresult($result);
 if ($portal_page['enable_bbcode'] !== '0') {
     include_once $phpbb_root_path . 'includes/bbcode.' . $phpEx;
     $bbcode = new bbcode(base64_encode($bbcode_bitfield));
     $bbcode->bbcode_second_pass($portal_page['page_content'], $portal_page['enable_bbcode'], $portal_page['enable_smilies']);
     // Always process smilies after parsing bbcodes
     //		$page_content = smilie_text($portal_page['page_content']);
     // Parse the message and subject
     $page_content = censor_text($portal_page['page_content']);
     //        $page_content = str_replace("\n", '<br />', $page_content);
     // strips tags
     //		$page_content = strip_tags($page_content);
     // show embedded smilies
     $page_content = smilies_pass($page_content);
 }
 $template->assign_vars(array('PORTAL_PAGE_TITLE' => $portal_page['page_alias'], 'PORTAL_PAGE_CONTENT' => htmlspecialchars_decode($page_content), 'L_PAGE_TITLE' => $user->lang['PAGES_NONE_EXIST']));
 // ==========
 $type = $type == 7 ? '[' . $user->lang['TYPE_POKAT_COMMERCE'] . ']' : '[' . $user->lang['TYPE_POKAT_' . $type] . ']';
 // Informer
 if (file_exists($phpbb_root_path . "userpix/image/informer" . $id . ".png") && $meeting_informer == 1) {
     $is_informer = TRUE;
 } else {
     $is_informer = FALSE;
 }
 page_header($user->lang['Meeting_admin'] . ' "' . $meeting_subject . '"');
 $template->assign_vars(array('URL_ID' => generate_board_url() . '/pokat.php?mode=detail&id=' . $id, 'URL_ID_ENC' => urlencode(generate_board_url() . '/pokat.php?mode=detail&id=' . $id), 'POSTER_REPUTATION' => $config['rp_enable'] && !$hidereputation ? $reputation : '', 'REP_TEXT' => $config['rp_enable'] && !$hidereputation ? $reputation_text : '', 'U_VIEW_REP' => append_sid("{$phpbb_root_path}viewreputation.{$phpEx}", 'id=' . $meeting_by_id), 'U_REPUTATION' => append_sid("{$phpbb_root_path}reputation.{$phpEx}", 'm=' . $id), 'U_REP_NEG' => append_sid("{$phpbb_root_path}reputation.{$phpEx}", 'm=' . $id . '&amp;mode=negative'), 'S_REP_TEXT' => $config['rp_display'] == 1 ? true : false, 'S_REP_BLOCK' => $config['rp_display'] == 2 ? true : false, 'S_REP_BOTH' => $config['rp_display'] == 3 ? true : false, 'COORG_REPUTATION' => $config['rp_enable'] && !$coorg_hidereputation ? $coorg_reputation : '', 'COORG_REP_TEXT' => $config['rp_enable'] && !$coorg_hidereputation ? $coorg_reputation_text : '', 'U_VIEW_COORG_REP' => append_sid("{$phpbb_root_path}viewreputation.{$phpEx}", 'id=' . $meeting_by_id_coorg), 'U_COORG_REPUTATION' => append_sid("{$phpbb_root_path}reputation.{$phpEx}", 'm=' . $id . '&amp;c=' . $meeting_by_id_coorg), 'U_REP_NEG' => append_sid("{$phpbb_root_path}reputation.{$phpEx}", 'm=' . $id . '&amp;mode=negative&amp;c=' . $meeting_by_id_coorg)));
 $template->assign_vars(array('START' => $urlstart, 'MY_NAME' => $user->data['username'], 'BTN_SIGNOFF' => $signoff_btn_ajax, 'S_REPUTATION' => $meeting_check_time < time() && $meeting_otmena == 0 && $meeting_moder > time() || $auth->acl_get('aa_meetings') ? true : false, 'L_MEETING_ALBUM_ADD' => $user->lang['Album_add_link'], 'L_MEETING_NAME_F' => $user->lang['Meeting_edit_Albumname'], 'L_MEETING_NAME_V' => $user->lang['Meeting_edit_Videoname'], 'L_MEETING_ALBUM_DESCR' => $user->lang['Meeting_edit_descr'], 'L_MEETING_ALBUM_LINK_F' => $user->lang['Meeting_edit_link_F'], 'L_MEETING_ALBUM_LINK_V' => $user->lang['Meeting_edit_link_V'], 'L_MEETING_ALBUM' => $user->lang['Meeting_album'], 'L_SUBMIT' => $user->lang['Submit_link'], 'L_EDIT_ALBUM_LINK' => $user->lang['Album_edit_link'], 'L_EDIT_SIZE' => $user->lang['Meeting_edit_size'], 'L_MB' => $user->lang['Album_Mb'], 'L_EDIT_CHOICE' => $user->lang['Meeting_edit_choice'], 'L_PHOTO_CHK' => $user->lang['photo_chk'], 'L_VIDEO_CHK' => $user->lang['video_chk'], 'L_ADDED' => $user->lang['Added'], 'L_ALBUM_NEW_CATEGORY' => $user->lang['Album_new_category'], 'L_MEETING_NAME_BLOG' => $user->lang['Meeting_edit_name_blog'], 'L_MEETING_DESCR_BLOG' => $user->lang['Meeting_edit_descr'], 'L_MEETING_LINK_BLOG' => $user->lang['Meeting_edit_link_blog'], 'L_MEETING_BLOG' => $user->lang['Meeting_blog'], 'L_EDIT_BLOG_LINK' => $user->lang['Album_edit_link'], 'L_USER_WEBLOG' => $weblog, 'L_MEETING_PRINT' => $user->lang['MEETING_PRINT'], 'L_MEETING_PRINT_FULL' => $user->lang['MEETING_PRINT_FULL'], 'L_WORKING' => $user->lang['WORKING'], 'L_MEETING_TIPS' => $user->lang['MEETING_TIPS'], 'L_MEETING_TIPS_POKAT' => $user->lang['MEETING_TIPS_POKAT'], 'L_MEETING_TIPS_DESCR' => $user->lang['MEETING_TIPS_DESCR'], 'L_MEETING_TIPS_2' => $user->lang['MEETING_TIPS_2'], 'L_MEETING_TIPS_DESCR_2' => $user->lang['MEETING_TIPS_DESCR_2'], 'L_GOTO_LINK' => $user->lang['GOTO_LINK'], 'L_MEETING' => $user->lang['Meeting'], 'L_MEETING_ORGS' => !$meeting_creator_coorg || $meeting_creator_coorg == 1 ? $user->lang['Meeting_org1'] : $user->lang['Meeting_org2'], 'L_MEETING_DETAIL' => $user->lang['Meeting_detail'], 'L_MEETING_TIME' => $user->lang['Time'], 'L_MEETING_UNTIL' => $user->lang['Meeting_until'], 'L_MEETING_LOCATION' => $user->lang['Meeting_location'], 'L_MEETING_REGION' => $user->lang['Region'], 'L_MEETING_SUBJECT' => $user->lang['Meeting_subject'], 'L_MEETING_LINK' => $user->lang['Meeting_link'], 'L_MEETING_PLACES' => $user->lang['Meeting_places'], 'L_MEETING_PHONE' => $user->lang['Meeting_contact_phone'], 'L_MEETING_FREE_PLACES' => $user->lang['Meeting_free_places'], 'L_MEETING_SURE_TOTAL' => $user->lang['Meeting_sure_total'], 'L_MEETING_SURE_TOTAL_USER' => $user->lang['Meeting_sure_total_user'], 'L_MEETING_STATISTIC' => $user->lang['Meeting_statistic'], 'L_MEETING_REMAIN_GUESTS' => $guest_places, 'L_MEETING_REMAIN_GUESTS_PLACES' => $remain_guest_places, 'L_MEETING_FREE_GUESTS' => $meeting_free_guests, 'L_MEETING_UCHASTNIKI' => $user->lang['Meeting_yes_signons'], 'L_MESTO_PROVEDENIA' => $user->lang['L_MESTO_PROVEDENIA'], 'L_MEETING_OPISANIE' => $user->lang['L_MEETING_OPISANIE'], 'L_GUESTS' => $user->lang['Meeting_owm_guests'], 'L_GUEST_PRENAMES' => $user->lang['Meeting_prenames'], 'L_GUEST_NAMES' => $user->lang['Meeting_names'], 'L_MEETING_TOWN' => $user->lang['Town_m'], 'L_MEETING_VIEWS' => $user->lang['meeting_views'], 'L_MEETING_KM' => $user->lang['Meeting_km'], 'L_MEETING_PLAIN' => $user->lang['MEETING_PLAIN'], 'L_MEETING_PLAIN_ROAD_DESCR' => $meeting_plain_road_descr, 'L_NO_FOTO' => $mess1, 'L_ELKA' => $meeting_el_time != '03:00' ? $meeting_elka : '', 'L_ELKA_OT' => $meeting_el_ot != '' ? $user->lang['Meeting_Elka_ot'] : '', 'L_ELKA_DO' => $meeting_el_do != '' ? $user->lang['Meeting_Elka_do'] : '', 'L_ELKA_IN' => $meeting_el_time != '03:00' ? $user->lang['Meeting_Elka_in'] : '', 'L_WATCH_TITLE' => $user->lang['Watch_title'], 'L_TRBOVANIA' => $user->lang['Meeting_Trebovania'], 'L_SAVE' => $user->lang['Save'], 'L_CODE' => $user->lang['CODE'], 'L_MESS_SS' => $user->lang['MESS_SS'], 'MEETING_NOPLACE' => $meeting_noplace, 'L_CODES_FORUM' => $user->lang['CODES_FORUM'], 'L_NEW_MEET' => $user->lang['NEW_MEETING'], 'L_MEET_SIGN' => $user->lang['YOUR_MEETING'], 'ELKA_OT' => $meeting_el_ot, 'ELKA_DO' => $meeting_el_do, 'ELKA_RASPIS' => $meeting_el_raspis, 'U_ELKA_RASPIS' => $meeting_el_BBraspis, 'ELKA_TIME' => $meeting_el_time != '03:00' ? $meeting_el_time : '', 'MEETING_BAGAZ' => $meeting_edit_bagaze, 'MEETING_SUBSCR' => $meeting_subscr, 'MEETING_SUBSCR_POP' => $meeting_subscr_popup, 'ID' => $id, 'MEETING_ID' => $id, 'USER_ID' => $user->data['user_id'], 'MEETING_BAGAZE_DESCR' => $bagaze_descr, 'S_ACTION_BAGAZ' => append_sid("{$phpbb_root_path}pokat.{$phpEx}?id={$id}"), 'S_SEND_ALBUM' => !$album ? false : true, 'ALBUM_THUMB_ID' => $album, 'S_NEW_ALBUM' => !$album_old ? true : false, 'MEETING_BOOKMARK_CLASS' => $bookmark == 1 ? 'bookmark_off' : 'bookmark_on', 'L_BOOKMARK' => $bookmark == 1 ? $user->lang['OFF_BOOKMARK'] : $user->lang['ADD_BOOKMARK'], 'BOOKMARK_AJAX' => $bookmark == 1 ? 'ajax_bookmark_delete(' . $id . ',' . $user->data['user_id'] . ')' : 'ajax_bookmark_add(' . $id . ',' . $user->data['user_id'] . ')', 'MEETING_REGION_SEARCH' => $meeting_region_uri, 'MEETING_REGION' => $meeting_region_name, 'COUNTRY' => $country, 'MEETING_VIEWS' => $meeting_views, 'MEETING_TIME' => $meeting_time, 'MEETING_UNTIL' => $meeting_until, 'MEETING_SBOR' => $meeting_sbor ? ', ' . $user->lang['INt'] . ' ' . $meeting_sbor : '', 'MEETING_LOCATION' => $meeting_location, 'MEETING_SUBJECT' => $meeting_subject, 'MEETING_TYPE' => $type, 'MEETING_DESC' => $meeting_desc, 'MEETING_DESC_2' => $meeting_desc_2, 'CLEARMEETING_DESC_2' => $meeting_desc_clear, 'MEETING_DESC_PRINT' => $meeting_desc_print, 'MEETING_DESC_PRINT2' => $meeting_desc_print2, 'MEETING_DESC_META' => $meeting_desc_meta, 'MEETING_LINK' => $meeting_link, 'MEETING_PLACES' => $meeting_places, 'MEETING_TOWN' => $meeting_town == '' ? $user->lang['No_town'] : $meeting_town, 'MEETING_PHONE' => $meeting_phone, 'MEETING_COORG_AVATAR' => $meeting_coorg_avatar, 'MEETING_COORG_AUTH' => $meeting_by_coorg_auth, 'MEETING_COORG_UCHAST' => $meeting_by_coorg_uchast, 'MEETING_COORG_KM' => $meeting_by_coorg_km, 'MEETING_AUTH_AVATAR' => $meeting_auth_avatar, 'MEETING_AUTH_AUTH' => $meeting_by_user_auth, 'MEETING_AUTH_UCHAST' => $meeting_by_user_uchast, 'MEETING_AUTH_KM' => $meeting_by_user_km, 'MEETING_EDIT_M' => $meeting_edit_m, 'MEETING_EDIT_MINI' => $meeting_edit_mini, 'MEETING_DELETE' => $meeting_delete, 'MEETING_CLOSED_STRING' => $meeting_closed_string, 'MEETING_SURE_TOTAL' => $meeting_sure_total, 'MEETING_SURE_TOTAL_USER' => $meeting_sure_total_user, 'MEETING_SURE_USER' => $meeting_sure_user, 'MEETING_FREE_PLACES' => $meeting_free_places, 'MEETING_BY_USER' => $meeting_by_user, 'MEETING_BY_COORG' => $meeting_by_coorg, 'MEETING_ORG' => $meeting_org, 'MEETING_ORG_NAME' => $meeting_by_username, 'MEETING_TAGS' => $meeting_tags, 'MEETING_ATTR' => $attributes, 'MEETING_BY_COORG' => $meeting_by_coorg, 'MEETING_COORG' => $meeting_coorg, 'MEETING_COORG_NAME' => $meeting_by_coorgname, 'MEETING_PRIVATE' => $private_meeting == 2 ? true : false, 'MEETING_EDIT_BY_USER' => $meeting_edit_by_user, 'MEETING_MAP' => $fotoblock, 'MEETING_DAYS' => $user->lang['MEETING_DAYSS'] . ': ' . $meeting_days, 'U_MEETING_MAP' => $meeting_link, 'IMG_MEETING_MAP' => '<img src="' . $phpbb_root_path . 'images/screen_map.jpg" alt="' . $user->lang['Meeting_link_f'] . '" title="' . $user->lang['Meeting_link_f'] . '" border="0" target="_blank" />', 'MEETENG_GPS' => $gps, 'MEETING_GPSIES' => '<img src="' . $phpbb_root_path . 'images/gpss.gif" alt="' . $user->lang['Meeting_GPS'] . '" title="' . $user->lang['Meeting_GPS'] . '" border="0" target="_blank" align="absmiddle" />' . $user->lang['Meeting_GPS_detail'], 'IMG_MAP_SBOR' => '<img src="' . $phpbb_root_path . 'images/google_map/img/map.png" align="absmiddle" alt="' . $user->lang['Map'] . '" />', 'URL_MAP_SBOR' => append_sid("{$phpbb_root_path}window_geocode.{$phpEx}", 's=' . $meeting_location . '&id=' . $id), 'MARSHRUT_IFRAME' => $marshrut_iframe, 'MARSHRUTMAP' => '//www.velocat.ru/velo/phpBB3/styles/prosilver/template/meeting/minimap_GgeoXml.html', 'MEET_KM' => $meeting_km, 'MEETING_KM' => $meeting_check_time < time() && $meeting_otmena == 0 ? $meeting_km . $user->lang['Km'] : '', 'MEETING_PLAIN_KM' => $meeting_plain_km ? $user->lang['Meeting_km'] . ': ' . $meeting_plain_km : '', 'MEETING_COMEBACK' => $meeting_comeback ? $user->lang['Meeting_comeback'] . ': ' . $meeting_comeback : '', 'MEETING_COMEBACK_MESTO' => $meeting_comeback_mesto ? $user->lang['MEETING_COMEBACK_M'] . ': ' . $meeting_comeback_mesto : '', 'L_MEETING_PLAIN_ROAD' => !$meeting_plain_road || $meeting_plain_road == '0-0-0' || $meeting_plain_road == '0-0-0-0-0' || $meeting_onbike == 4 ? '' : $user->lang['MEETING_PLAIN_ROAD'] . ':', 'MEETING_PLAIN_ROAD_1' => $meeting_plain_road_1, 'MEETING_PLAIN_ROAD_2' => $meeting_plain_road_2, 'MEETING_PLAIN_ROAD_3' => $meeting_plain_road_3, 'MEETING_PLAIN_ROAD_4' => $meeting_plain_road_4, 'MEETING_PLAIN_ROAD_5' => $meeting_plain_road_5, 'MEETING_MARSHRUT' => $marshrut, 'MEETING_TREBOVANIA' => $meeting_trebovania != '' ? $meeting_trebovania : $user->lang['No_trebovania'], 'MEETING_FOR_MARSHRUT' => sprintf($user->lang['PO_MARSH'], $u_marshrut, $meeting_marshrut), 'MEETING_GEO_LINK' => $geo_link, 'MEETING_GEO_LINK_PLAIN' => $geo_link_plain, 'MEETING_GEO_EDITICON' => $geo_editicon, 'MEETING_HARD_TITLE' => $hard_title, 'MEETING_HARD_IMG' => $hard_image, 'U_MEETING' => append_sid('meeting.' . $phpEx), 'U_MEETING_PRINT_FULL' => append_sid('meeting_printview.' . $phpEx, 'mode=comm&id=' . $id), 'U_MEETING_PRINT_SHORT' => append_sid('meeting_printview.' . $phpEx, 'mode=detail&id=' . $id), 'MEETING_PRINT_IMG' => $images['news_print'], 'MEETING_PRINT_IMG_PLUS' => $images['news_print_plus'], 'MEETING_EDIT_OPISAN' => $auth->acl_get('a_meetings') || $user->data['user_id'] == $meeting_by_id || $coorg_allow_edit == 1 ? $icon_edit_clear : '', 'MEETING_EDIT_NITKA' => $auth->acl_get('a_meetings') || $user->data['user_id'] == $meeting_by_id || $coorg_allow_edit == 1 ? $icon_edit_clear : '', 'U_EMAIL_TOPIC' => $config['email_enable'] ? append_sid("{$phpbb_root_path}memberlist.{$phpEx}", "mode=email") : '', 'U_MEETING_DETAIL' => append_sid($phpbb_root_path . 'meeting.' . $phpEx . '?mode=detail&amp;id=' . $id), 'U_MEETING_USER' => $meeting_user, 'U_MEETING_USER_OWN' => $meeting_user_own, 'U_BAGAZ_POPUP' => $bagaze_popup, 'U_GUEST_POPUP' => $guest_popup, 'L_SUBSCRIBE' => $user_subscribe_comment == 1 ? $user->lang['unwatch_comm'] : $user->lang['watch_comm'] . ' <img src="' . $phpbb_root_path . 'images/new.gif">', 'S_SUBSCR' => $user_subscribe_comment == 1 ? $phpbb_root_path . 'pokat.php?mode=detail&amp;id=' . $id . '&amp;unwatch=comment' : $phpbb_root_path . 'pokat.php?mode=detail&amp;id=' . $id . '&amp;watch=comment', 'WATCH' => $user_subscribe_comment == 1 ? 'unwatch' : 'watch', 'WATCH_AJAX' => $user_subscribe_comment == 1 ? 0 : 1, 'WATCH_ALT' => $user_subscribe_comment == 1 ? $user->lang['unwatch_comm_alt'] : $user->lang['watch_comm_alt'], 'SUBSCR_ALERT' => $user_subscribe_comment == 1 ? $user->lang['watch_alert'] : $user->lang['unwatch_alert'], 'S_MEETING_FOR_MARSHRUT' => $meeting_for_marshrut == 1 ? true : false, 'S_MARSHRUT_IFRAME' => !$marshrut_iframe ? false : true, 'S_COORG' => !$meeting_creator_coorg || $meeting_creator_coorg == 1 ? false : true, 'S_ADMIN_AUTH' => $user->data['user_id'] == 2 ? true : false, 'S_MEETING_ONBEKE_N' => $meeting_onbike, 'S_OTMENA' => $meeting_otmena == 1 ? true : false, 'S_RANGE_ROAD' => $range_road, 'S_MEETING_ANONCE' => $meeting_anonce == 1 ? true : false, 'ANONCE_CLASS' => $anonce_image_class, 'ANONCE_IMG' => $anonce_image, 'ANONCE_URL' => $anonce, 'ANONCE_ORG' => $anonce_org_id == 2374 ? $anonce_org_id : '', 'ANONSE_TXT' => $anonse_text, 'COMMERCE_IMG' => $commerce_image, 'S_INFORMER' => $is_informer, 'INFORMER_SRC' => generate_board_url() . '/userpix/image/informer' . $id . '.png', 'IMG_TOOGLE' => '<img src="' . $phpbb_root_path . 'images/toggle_open.gif" align="absmiddle" alt="' . $user->lang['Meeting_owm_guests'] . '" />', 'STAT_HIDDEN_FIELDS' => $stat_hidden_fields));
 if ($user->data['user_id'] != ANONYMOUS) {
     $template->assign_vars(array('SIGNED_ON_EDIT' => $signed_on_edit, 'SIGNED_OFF' => $signed_off, 'SIGNED_GUEST' => $signed_on_guest, 'MEETING_SURE_USER' => $meeting_sure_user, 'S_REMAIN_GUESTS' => $s_remain_guests, 'S_HIDDEN_FIELDS_M' => '<input type="hidden" name="id" value="' . $id . '"><input type="hidden" name="' . POST_USERS_URL . '" value="' . $user->data['user_id'] . '">', 'S_ACTION' => append_sid("{$phpbb_root_path}pokat.{$phpEx}"), 'S_ONLINE_AUTH' => !$config['load_onlinetrack'] ? false : ($author_online ? true : false), 'S_ONLINE_COORG' => !$config['load_onlinetrack'] ? false : ($coorg_online ? true : false), 'L_MEETING_COMMENT' => $user->lang['Meeting_comment'], 'L_SUBMIT' => $user->lang['Submit'], 'MEETING_COMMENT' => stripslashes($meeting_comment), 'U_MEETING' => append_sid('meeting.' . $phpEx), 'U_MEETING_DETAIL' => append_sid($phpbb_root_path . 'pokat.' . $phpEx . '?mode=detail&amp;id=' . $id), 'U_MEETING_COMMENT' => append_sid($phpbb_root_path . 'pokat.' . $phpEx . '?mode=edit_comment&amp;id=' . $id . '&amp;comment_user_id=' . $comment_user_id), 'S_ADMIN_MEETING' => $auth->acl_get('a_meetings') ? 1 : '', 'S_AUTHOR_MEETING' => $meeting_by_user_id == $user->data['user_id'] ? 1 : '', 'S_ACTION_COMM' => append_sid("{$phpbb_root_path}meeting.{$phpEx}", "action=subm_comment&amp;id={$meeting_id}"), 'S_ACTION_A' => append_sid("{$phpbb_root_path}pokat.{$phpEx}?id={$id}&amp;album_id={$album_id}&amp;album_user_id={$album_user_id}&amp;new_album=" . intval($new_album)), 'S_ACTION_V' => append_sid("{$phpbb_root_path}pokat.{$phpEx}?id={$id}&amp;video_id={$video_id}&amp;video_user_id={$video_user_id}&amp;new_video=" . intval($new_video)), 'S_ACTION_B' => append_sid("{$phpbb_root_path}pokat.{$phpEx}?id={$id}&amp;blog_id={$blog_id}&amp;blog_user_id={$blog_user_id}&amp;new_blog=" . intval($new_blog))));
                $row++;
            } else {
                $col++;
            }
        }
        if ($mode == 'inline' && $num_smilies > $inline_rows * $inline_columns) {
            $template->assign_block_vars('switch_smilies_extra', array());
            $template->assign_vars(array('L_MORE_SMILIES' => $lang['More_emoticons'], 'U_MORE_SMILIES_ANNOUNCEMENT_TEXT' => append_sid("../posting.{$phpEx}?mode=smilies_announcement_text")));
        }
        $template->assign_vars(array('L_EMOTICONS' => $lang['Emoticons'], 'L_CLOSE_WINDOW' => $lang['Close_window'], 'S_SMILIES_COLSPAN' => $s_colspan));
    }
}
$template->set_filenames(array("body" => "admin/announcement_centre_config_body.tpl"));
//
// Escape any quotes in the site description for proper display in the text
// box on the Announcement Box page
//
$new['announcement_text'] = str_replace('"', '&quot;', $new['announcement_text']);
$new['announcement_guest_text'] = str_replace('"', '&quot;', $new['announcement_guest_text']);
$new['announcement_text_draft'] = str_replace('"', '&quot;', $new['announcement_text_draft']);
$new['announcement_title'] = str_replace('"', '&quot;', $new['announcement_title']);
$new['announcement_guest_title'] = str_replace('"', '&quot;', $new['announcement_guest_title']);
$preview_announcement = $new['announcement_text_draft'];
$preview_announcement_uid = make_bbcode_uid();
$preview_announcement = bbencode_first_pass($preview_announcement, $preview_announcement_uid);
$preview_announcement = bbencode_second_pass($preview_announcement, $preview_announcement_uid);
$preview_announcement = smilies_pass($preview_announcement, './../');
$preview_announcement = str_replace("\n", "\n<br />\n", $preview_announcement);
$template->assign_vars(array("S_ANNOUNCEMENT_ACTION" => append_sid("admin_announcement_centre.{$phpEx}"), "L_BBCODE_B_HELP" => $lang['bbcode_b_help'], "L_BBCODE_I_HELP" => $lang['bbcode_i_help'], "L_BBCODE_U_HELP" => $lang['bbcode_u_help'], "L_BBCODE_Q_HELP" => $lang['bbcode_q_help'], "L_BBCODE_C_HELP" => $lang['bbcode_c_help'], "L_BBCODE_L_HELP" => $lang['bbcode_l_help'], "L_BBCODE_O_HELP" => $lang['bbcode_o_help'], "L_BBCODE_P_HELP" => $lang['bbcode_p_help'], "L_BBCODE_W_HELP" => $lang['bbcode_w_help'], "L_BBCODE_A_HELP" => $lang['bbcode_a_help'], "L_BBCODE_S_HELP" => $lang['bbcode_s_help'], "L_BBCODE_F_HELP" => $lang['bbcode_f_help'], "L_EMPTY_MESSAGE" => $lang['Empty_message'], "L_FONT_COLOR" => $lang['Font_color'], "L_COLOR_DEFAULT" => $lang['color_default'], "L_COLOR_DARK_RED" => $lang['color_dark_red'], "L_COLOR_RED" => $lang['color_red'], "L_COLOR_ORANGE" => $lang['color_orange'], "L_COLOR_BROWN" => $lang['color_brown'], "L_COLOR_YELLOW" => $lang['color_yellow'], "L_COLOR_GREEN" => $lang['color_green'], "L_COLOR_OLIVE" => $lang['color_olive'], "L_COLOR_CYAN" => $lang['color_cyan'], "L_COLOR_BLUE" => $lang['color_blue'], "L_COLOR_DARK_BLUE" => $lang['color_dark_blue'], "L_COLOR_INDIGO" => $lang['color_indigo'], "L_COLOR_VIOLET" => $lang['color_violet'], "L_COLOR_WHITE" => $lang['color_white'], "L_COLOR_BLACK" => $lang['color_black'], "L_FONT_SIZE" => $lang['Font_size'], "L_FONT_TINY" => $lang['font_tiny'], "L_FONT_SMALL" => $lang['font_small'], "L_FONT_NORMAL" => $lang['font_normal'], "L_FONT_LARGE" => $lang['font_large'], "L_FONT_HUGE" => $lang['font_huge'], "L_BBCODE_CLOSE_TAGS" => $lang['Close_Tags'], "L_STYLES_TIP" => $lang['Styles_tip'], "L_ANNOUNCEMENT_MAIN_TITLE" => $lang['Announcement_main_title'], "L_ANNOUNCEMENT_MAIN_TITLE_EXPLAIN" => $lang['Announcement_main_title_explain'], "L_ANNOUNCEMENT_BLOCK_TITLE" => $lang['Announcement_block_title'], "L_ANNOUNCEMENT_DRAFT_TEXT" => $lang['Announcement_draft_text'], "L_ANNOUNCEMENT_DRAFT_TEXT_EXPLAIN" => $lang['Announcement_draft_text_explain'], "L_SHOW_ANNOUNCEMENT_TEXT" => $lang['Show_announcement_text'], "L_ANNOUNCEMENT_TITLE" => $lang['Announcement_title'], "L_ANNOUNCEMENT_TITLE_EXPLAIN" => $lang['Announcement_title_explain'], "L_ANNOUNCEMENT_DEFAULT_TITLE_EXPLAIN" => $lang['Announcement_default_title_explain'] . $lang['Site_announcement_block_title'], "L_ANNOUNCEMENT_TEXT" => $lang['Announcement_text'], "L_ANNOUNCEMENT_TEXT_EXPLAIN" => $lang['Announcement_text_explain'], "L_FORUM_ID" => $lang['Forum_ID'], "L_TOPIC_ID" => $lang['Topic_ID'], "L_ANNOUNCEMENT_FORUM_TOPIC_LATEST" => $lang['Announcement_forum_topic_latest'], "L_ANNOUNCEMENT_FORUM_TOPIC_FIRST" => $lang['Announcement_forum_topic_first'], "L_ANNOUNCEMENT_GUEST_TITLE" => $lang['Announcement_guest_title'], "L_ANNOUNCEMENT_DEFAULT_GUEST_TITLE_EXPLAIN" => $lang['Announcement_default_title_explain'] . $lang['Guest_announcement_block_title'], "L_ANNOUNCEMENT_GUEST_TITLE_EXPLAIN" => $lang['Announcement_guest_title_explain'], "L_ANNOUNCEMENT_GUEST_TEXT" => $lang['Announcement_guest_text'], "L_SELECT_ALL" => $lang['Select_all'], "L_COPY_TO_ANNOUNCEMENT" => $lang['Copy_to_Announcement'], "L_COPY_TO_GUEST_ANNOUNCEMENT" => $lang['Copy_to_Guest_Announcement'], "L_SUBMIT" => $lang['Submit'], "L_PREVIEW" => $lang['Preview'], "L_RESET" => $lang['Reset'], "L_YES" => $lang['Yes'], "L_NO" => $lang['No'], "ANNOUNCEMENT_VERSION" => sprintf($announcement_centre_config['announcement_mod_version']), "L_SHOW_ANNOUNCEMENT_ALL" => $lang['Show_announcement_all'], "L_SHOW_ANNOUNCEMENT_REG" => $lang['Show_announcement_reg'], "L_SHOW_ANNOUNCEMENT_MOD" => $lang['Show_announcement_mod'], "L_SHOW_ANNOUNCEMENT_ADM" => $lang['Show_announcement_adm'], "L_SHOW_ANNOUNCEMENT_WHO" => $lang['Show_announcement_who'], "L_ANNOUNCEMENT_GUESTS_ONLY" => $lang['Announcement_guests_only'], "L_ANNOUNCEMENT_GUESTS_ONLY_EXPLAIN" => $lang['Announcement_guests_only_explain'], "ANNOUNCEMENT_FORUM_ID" => $new['announcement_forum_id'], "ANNOUNCEMENT_TOPIC_ID" => $new['announcement_topic_id'], "ANNOUNCEMENT_TITLE" => $new['announcement_title'], "ANNOUNCEMENT_TEXT" => $new['announcement_text'], "ANNOUNCEMENT_GUEST_TITLE" => $new['announcement_guest_title'], "ANNOUNCEMENT_GUEST_TEXT" => $new['announcement_guest_text'], "ANNOUNCEMENT_TEXT_DRAFT" => $new['announcement_text_draft'], "ANNOUNCEMENT_PREVIEW" => $preview_announcement, "S_ANNOUNCEMENT_STATUS_YES" => $announcement_status_yes, "SHOW_ANNOUNCEMENT_YES" => ANNOUNCEMENTS_LEFTY74_SHOW_YES, "S_ANNOUNCEMENT_STATUS_NO" => $announcement_status_no, "SHOW_ANNOUNCEMENT_NO" => ANNOUNCEMENTS_LEFTY74_SHOW_NO, "S_ANNOUNCEMENT_FORUM_TOPIC_LATEST" => $announcement_forum_topic_latest, "ANNOUNCEMENT_FORUM_TOPIC_LATEST" => ANNOUNCEMENTS_LEFTY74_FORUM_TOPIC_LATEST, "S_ANNOUNCEMENT_FORUM_TOPIC_FIRST" => $announcement_forum_topic_first, "ANNOUNCEMENT_FORUM_TOPIC_FIRST" => ANNOUNCEMENTS_LEFTY74_FORUM_TOPIC_FIRST, "ANNOUNCEMENT_GUEST_SEPARATE_STATUS_YES" => ANNOUNCEMENTS_LEFTY74_GUEST_YES, "S_ANNOUNCEMENT_GUEST_SEPARATE_STATUS_YES" => $announcement_guestannouncement_status_yes, "ANNOUNCEMENT_GUEST_SEPARATE_STATUS_NO" => ANNOUNCEMENTS_LEFTY74_GUEST_NO, "S_ANNOUNCEMENT_GUEST_SEPARATE_STATUS_NO" => $announcement_guestannouncement_status_no, "SHOW_ANNOUNCEMENT_ALL" => ANNOUNCEMENTS_LEFTY74_SHOW_ALL, "S_SHOW_ANNOUNCEMENT_ALL_CHECKED" => $show_announcement_all, "SHOW_ANNOUNCEMENT_REG" => ANNOUNCEMENTS_LEFTY74_SHOW_REG, "S_SHOW_ANNOUNCEMENT_REG_CHECKED" => $show_announcement_reg, "SHOW_ANNOUNCEMENT_MOD" => ANNOUNCEMENTS_LEFTY74_SHOW_MOD, "S_SHOW_ANNOUNCEMENT_MOD_CHECKED" => $show_announcement_mod, "SHOW_ANNOUNCEMENT_ADM" => ANNOUNCEMENTS_LEFTY74_SHOW_ADM, "S_SHOW_ANNOUNCEMENT_ADM_CHECKED" => $show_announcement_adm));
$template->pparse("body");
include './page_footer_admin.' . $phpEx;
Example #13
0
function phpbb_parse_text($text = null, $bbcode_uid = null, $enable_smilies = true, $enable_bbcode = true, $enable_html = true, $hide_images = false, $replace_images = '')
{
    global $CFG;
    if (!$text) {
        return;
    }
    //
    // remove slashes
    //
    stripslashes($text);
    //
    // remove images if requested
    //
    if ($hide_images) {
        if ($replace_images) {
            $replacement = '[url=\\1]' . $replace_images . '[/url]';
        } else {
            $replacement = '';
        }
        $text = preg_replace("#\\[img:{$bbcode_uid}\\](.*?)\\[/img:{$bbcode_uid}\\]#si", $replacement, $text);
    }
    //
    // parse html
    //
    if (!$enable_html) {
        $text = preg_replace('#(<)([\\/]?.*?)(>)#is', "&lt;\\2&gt;", $text);
    }
    //
    // parse bbcode
    //
    if ($enable_bbcode) {
        $text = bbencode_second_pass($text, $bbcode_uid);
    } else {
        $text = preg_replace('/\\:[0-9a-z\\:]+\\]/si', ']', $text);
    }
    //
    // parse smilies if requested
    //
    if ($enable_smilies == 1 and $CFG['enable_smilies'] == true) {
        $text = smilies_pass($text);
        //
        // need to overwrite the smilie path since we might not be
        // within the phpBB directory
        //
        $text = preg_replace("/images\\/smiles/", $CFG['smilie_url'], $text);
    }
    //
    // parse url's
    //
    $text = make_clickable($text);
    //
    // change newlines to HTML
    //
    $text = str_replace("\n", "\n<br />\n", $text);
    return $text;
}
Example #14
0
    }
    #==== Generic BBCode Pass ===================================== |
    # Did it this way so i wouldn't have to use bbcode_uid for each post
    $todays_chat = str_replace('[b]', '<b>', $todays_chat);
    $todays_chat = str_replace('[/b]', '</b>', $todays_chat);
    $todays_chat = str_replace('[i]', '<i>', $todays_chat);
    $todays_chat = str_replace('[/i]', '</i>', $todays_chat);
    #==== HTML Block Pass ========================================= |
    # This is done to prevent stretching the page or a redirect exploit.
    $allowed = '<b><i><a><font>';
    $todays_chat = strip_tags($todays_chat, $allowed);
    #==== Starting Pass =========================================== |
    $todays_chat = str_replace('%S%', '<tr><td class="row2" align="left" width="100%"><span class="genmed">', $todays_chat);
    #==== Closing Pass ============================================ |
    $todays_chat = str_replace('%E%', '</span></td></tr>', $todays_chat);
    #==== Smilies Pass ============================================ |
    if ($board_config['allow_smilies']) {
        $todays_chat = smilies_pass($todays_chat);
    }
    #==== Unquote where necessary ===================================== |
    $todays_chat = stripslashes($todays_chat);
    $chat_session = $todays_chat;
    $error_messages = $_POST['err'] ? $_POST['err'] : $_POST['err'];
    if (!$error_messages) {
        $error_messages = $_GET['err'] ? $_GET['err'] : $_GET['err'];
    }
    $error_messages = !$error_messages ? '' : $error_[$error_messages];
    $template->assign_block_vars('chat_body', array('FORM' => append_sid("adr_global_chat.{$phpEx}"), 'TOP_L' => sprintf($lang['Adr_shoutbox_archive'], date('Y-m-d')), 'TOP_M' => ' : ', 'TOP_R' => '<a href="' . append_sid('adr_global_chat.' . $phpEx . '?mode=archives') . '">Archives</a>', 'MSG' => $lang['Adr_shoutbox_enter'], 'BUTTON' => $lang['Adr_shoutbox_shout'], 'ERROR' => $error_messages, 'TXT' => $chat_session, 'U_CHAT_VIEW' => append_sid("adr_global_chat.{$phpEx}")));
}
$template->assign_vars(array('U_CHAT_VIEW' => append_sid("adr_global_chat.{$phpEx}")));
$template->pparse('body');
Example #15
0
         message_die(GENERAL_ERROR, $lang['Error_Posts_Table'], '', __LINE__, __FILE__);
     }
     $privmsg = $db->sql_fetchrow($result);
     /************************/
     /* Just stole all the phpBB code for message processing :) And edited a ton of it out since we are all admins here */
     /**********************/
     $private_message = $privmsg['privmsgs_text'];
     $bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
     if ($bbcode_uid != '') {
         $private_message = bbencode_second_pass($private_message, $bbcode_uid);
     }
     $private_message = make_clickable($private_message);
     if ($privmsg['privmsgs_enable_smilies']) {
         $old_config = $board_config['smilies_path'];
         $board_config['smilies_path'] = '../' . $board_config['smilies_path'];
         $private_message = smilies_pass($private_message);
         $board_config['smilies_path'] = $old_config;
     }
     $private_message = str_replace("\n", '<br />', $private_message);
     $template->set_filenames(array('viewmsg_body' => 'admin/admin_priv_msgs_view_body.tpl'));
     $template->assign_vars(array('L_SUBJECT' => $lang['Subject'], 'L_TO' => $lang['To'], 'L_FROM' => $lang['From'], 'L_SENT_DATE' => $lang['Sent_Date'], 'L_PRIVATE_MESSAGES' => $aprvmUtil->modName));
     $template->assign_vars(array('SUBJECT' => $privmsg['privmsgs_subject'], 'FROM' => $aprvmUtil->id_2_name($privmsg['privmsgs_from_userid']), 'FROM_IP' => $board_config['aprvmIP'] ? ' : (' . decode_ip($privmsg['privmsgs_ip']) . ')' : '', 'TO' => $aprvmUtil->id_2_name($privmsg['privmsgs_to_userid']), 'DATE' => create_date($lang['DATE_FORMAT'], $privmsg['privmsgs_date'], $board_config['board_timezone']), 'MESSAGE' => $private_message));
     if ($board_config['aprvmView']) {
         $template->assign_block_vars('popup_switch', array());
         $template->pparse('viewmsg_body');
         $aprvmUtil->copyright();
         break;
     } else {
         $template->assign_var_from_handle('PM_MESSAGE', 'viewmsg_body');
     }
 case 'remove_old':
Example #16
0
     $sqlN = "SELECT * FROM " . ADR_CLANS_NEWS_TABLE . " WHERE clan = '" . intval($_GET['clan']) . "' ORDER BY " . $order . " " . $asc . " LIMIT " . $start . ", " . $board_config['posts_per_page'];
     if (!($resultN = $db->sql_query($sqlN))) {
         message_die(GENERAL_ERROR, 'Error retrieving data', '', __LINE__, __FILE__, $sqlN);
     }
     $x = 1;
     while ($rowN = $db->sql_fetchrow($resultN)) {
         $sqlU = "SELECT character_name FROM " . ADR_CHARACTERS_TABLE . "\r\n\t\t\t\t\tWHERE character_id = '" . $rowN['poster'] . "' ";
         if (!($resultU = $db->sql_query($sqlU))) {
             message_die(GENERAL_ERROR, 'Error retrieving data', '', __LINE__, __FILE__, $sqlU);
         }
         while ($rowU = $db->sql_fetchrow($resultU)) {
             $poster = $rowU['character_name'];
         }
         $text = stripslashes($rowN['text']);
         $text = nl2br($text);
         $template->assign_block_vars('news', array('FILE' => $file, 'BULLET' => $lang['clans_clp_news_bullet'], 'ID' => $rowN['id'], 'NID' => $rowN['id'], 'TITLE' => smilies_pass($rowN['title']), 'TEXT' => smilies_pass($text), 'ROW' => $x, 'POSTER' => $poster, 'POSTERID' => $rowN['poster'], 'BY' => $lang['clans_postedby'], 'DATE' => create_date($board_config['default_dateformat'], $rowN['date'], $board_config['board_timezone']), 'L_BACK_TO_CLANPAGE' => sprintf($lang['clans_clp_back_to_clanpage'], '<a href="' . $file . '?action=clanpage&clan=' . $_GET['clan'] . '">', '</a>'), 'L_ID' => $lang['clans_clp_news_postid'], 'ORDER' => $order, 'START' => $start, 'ASC' => $asc, 'CLAN' => $_GET['clan']));
         $x++;
         if ($x > 2) {
             $x = 1;
         }
     }
     $template->assign_vars(array('FILE' => $file, 'L_HEADER' => $lang['clans_clp'], 'L_INTRO' => $lang['clans_clp_intro'], 'L_DETAILS' => $lang['clans_clp_details'], 'L_MEMBERS' => $lang['clans_clp_members'], 'L_NEWS' => $lang['clans_clp_news'], 'L_TITLE' => $lang['clans_title'], 'L_NEWSPOST' => $lang['clans_message'], 'L_EDIT' => $lang['clans_edit'], 'AUTHOR' => $lang['clans_clp_news_author'], 'DATE' => $lang['clans_clp_news_date'], 'GO' => $lang['clans_clp_news_go'], 'L_SORT_BY' => $lang['clans_clp_news_sortby'], 'ASC' => $lang['clans_clp_news_asc'], 'DESC' => $lang['clans_clp_news_desc'], 'D_SELECTED' => $d_selected, 'A_SELECTED' => $a_selected, 'T_SELECTED' => $t_selected, 'ASC_SELECTED' => $asc_selected, 'DESC_SELECTED' => $desc_selected, 'U_ORDER' => $order, 'U_START' => $start, 'U_ASC' => $asc, 'NEWPOST_IMG' => $images['pm_postmsg'], 'MINIPOST_IMG' => $images['icon_minipost'], 'EDIT_IMG' => $images['icon_edit'], 'DELETE_IMG' => $images['icon_delpost'], 'CLAN' => $_GET['clan']));
     //		$template->set_filenames(array('body' => 'adr_clans_clp_news_body.tpl'));
     adr_template_file('adr_clans_clp_news_body.tpl');
 }
 if ($_GET['a'] == "new") {
     $this_title = $lang['clans_clp_news_new'];
     $sqlN = "SELECT name FROM " . ADR_CLANS_TABLE . "\r\n\t\t\t\tWHERE id = '" . intval($_GET['clan']) . "' ";
     if (!($resultN = $db->sql_query($sqlN))) {
         message_die(GENERAL_ERROR, 'Error retrieving data', '', __LINE__, __FILE__, $sqlN);
     }
Example #17
0
        $views = $topic_rowset[$i]['topic_views'];
        $row_color = !($i % 2) ? $theme['td_color1'] : $theme['td_color2'];
        $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2'];
        $topic_mod = '';
        if ($is_auth['auth_mod']) {
            $topic_mod .= '<div style="float:right; margin-right: 10px; display: inline-block;">';
            $topic_mod .= '<span class="topicmod" id="tmod_' . $topic_id . '">';
            $topic_mod .= "<a href=\"modcp.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}&amp;mode=delete&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_delete'] . '" alt="' . $lang['Delete_topic'] . '" title="' . $lang['Delete_topic'] . '" border="0" /></a>&nbsp;';
            $topic_mod .= "<a href=\"modcp.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}&amp;mode=move&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_move'] . '" alt="' . $lang['Move_topic'] . '" title="' . $lang['Move_topic'] . '" border="0" /></a>&nbsp;';
            $topic_mod .= $topic_rowset[$i]['topic_status'] == TOPIC_UNLOCKED ? "<a href=\"modcp.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}&amp;mode=lock&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_lock'] . '" alt="' . $lang['Lock_topic'] . '" title="' . $lang['Lock_topic'] . '" border="0" /></a>&nbsp;' : "<a href=\"modcp.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}&amp;mode=unlock&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_unlock'] . '" alt="' . $lang['Unlock_topic'] . '" title="' . $lang['Unlock_topic'] . '" border="0" /></a>&nbsp;';
            $topic_mod .= "<a href=\"modcp.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}&amp;mode=split&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_split'] . '" alt="' . $lang['Split_topic'] . '" title="' . $lang['Split_topic'] . '" border="0" /></a>&nbsp;';
            $topic_mod .= '</span>';
            $topic_mod .= '</div>';
        }
        if ($board_config['allow_smilies']) {
            $topic_title = smilies_pass($topic_title);
        }
        $template->assign_block_vars('topicrow', array('ROW_COLOR' => $row_color, 'ROW_CLASS' => $row_class, 'FORUM_ID' => $forum_id, 'TOPIC_ID' => $topic_id, 'TOPIC_FOLDER_IMG' => $folder_image, 'HYPERCELL_CLASS' => get_hypercell_class($topic_rowset[$i]['topic_status'], $folder_image == $folder_new, $topic_rowset[$i]['topic_type'], $replies), 'TOPIC_AUTHOR' => $topic_author, 'GOTO_PAGE' => $goto_page, 'REPLIES' => $replies, 'NEWEST_POST_IMG' => $newest_post_img, 'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($topic_rowset[$i]['topic_attachment']), 'TOPIC_TITLE' => $topic_title, 'TOPIC_TYPE' => $topic_type, 'VIEWS' => $views, 'FIRST_POST_TIME' => $first_post_time, 'LAST_POST_TIME' => $last_post_time, 'LAST_POST_AUTHOR' => $last_post_author, 'LAST_POST_IMG' => $last_post_url, 'TOPIC_MOD' => $topic_mod, 'L_TOPIC_FOLDER_ALT' => $folder_alt, 'U_VIEW_TOPIC' => $view_topic_url));
        display_sub_title('topicrow', $topic_sub_title, $board_config['sub_title_length']);
        if (array_key_exists($i, $dividers)) {
            $template->assign_block_vars('topicrow.divider', array('L_DIV_HEADERS' => $dividers[$i]));
        }
    }
    $topics_count -= $total_announcements;
    $topics_count += $total_global_announcements;
    $template->assign_vars(array('PAGINATION' => generate_pagination("viewforum.{$phpEx}?" . POST_FORUM_URL . "={$forum_id}&amp;topicdays={$topic_days}&amp;sort={$sort_value}&amp;order={$order_value}", $topics_count, $board_config['topics_per_page'], $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], floor($start / $board_config['topics_per_page']) + 1, ceil($topics_count / $board_config['topics_per_page'])), 'L_GOTO_PAGE' => $lang['Goto_page']));
    // V: better add a switch rather than an ugly empty line at the bottom when no topics
    $template->assign_var('HAS_TOPICS', true);
} else {
    //
    // No topics
Example #18
0
function includeNewsBlock()
{
    global $template, $lang, $db, $board_config, $auction_config_data;
    global $orig_word, $replacement_word;
    include './extension.inc';
    include './includes/bbcode.' . $phpEx;
    if ($auction_config_data['auction_block_display_news'] == 1) {
        $template->assign_block_vars('news_block', array('L_AUCTION_NEWS' => $lang['auction_news']));
        $sql = "SELECT t.*,\r\n                                   u.username,\r\n                                   u.user_id,\r\n                                   p.*,\r\n                                   x.*\r\n                            FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " x\r\n                            WHERE t.forum_id = " . $auction_config_data['auction_news_forum_id'] . " AND\r\n                                  t.topic_poster = u.user_id AND\r\n                                  p.post_id = t.topic_first_post_id AND\r\n                                  x.post_id = t.topic_first_post_id\r\n                            ORDER BY t.topic_first_post_id DESC\r\n                            LIMIT 0,3";
        if (!($result = $db->sql_query($sql))) {
            message_die(GENERAL_ERROR, 'Could not query news block information', '', __LINE__, __FILE__, $sql);
        }
        $total_topics = 0;
        while ($row = $db->sql_fetchrow($result)) {
            $topic_rowset[] = $row;
            $total_topics++;
        }
        $db->sql_freeresult($result);
        // Dump out the news
        if ($total_topics) {
            for ($i = 0; $i < $total_topics; $i++) {
                $topic_id = $topic_rowset[$i]['topic_id'];
                $post_subject = count($orig_word) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
                $topic_poster_url = $topic_rowset[$i]['user_id'] != ANONYMOUS ? append_sid("profile.{$phpEx}?mode=viewprofile&" . POST_USERS_URL . "=" . $topic_rowset[$i]['user_id']) : '';
                $topic_poster = $topic_rowset[$i]['user_id'] != ANONYMOUS ? $topic_rowset[$i]['username'] : ($topic_rowset[$i]['post_username'] != "" ? $topic_rowset[$i]['post_username'] : $lang['Guest']);
                $topic_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['topic_time'], $board_config['board_timezone']);
                $bbcode_uid = $topic_rowset[$i]['bbcode_uid'];
                // Format the message
                $message = $topic_rowset[$i]['post_text'];
                if (!$board_config['allow_html'] && $topic_rowset[$i]['enable_html']) {
                    $message = preg_replace("#(<)([\\/]?.*?)(>)#is", "&lt;\\2&gt;", $message);
                }
                if ($board_config['allow_bbcode'] && $bbcode_uid != "") {
                    $message = $board_config['allow_bbcode'] ? bbencode_second_pass($message, $bbcode_uid) : preg_replace("/\\:[0-9a-z\\:]+\\]/si", "]", $message);
                }
                $message = make_clickable($message);
                // Define censored word matches
                if (empty($orig_word) && empty($replacement_word)) {
                    $orig_word = array();
                    $replacement_word = array();
                    obtain_word_list($orig_word, $replacement_word);
                }
                // Replace naughty words
                if (count($orig_word)) {
                    $post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
                    $message = preg_replace($orig_word, $replacement_word, $message);
                }
                // Parse smilies
                if ($board_config['allow_smilies']) {
                    if ($topic_rowset[$i]['enable_smilies']) {
                        $message = smilies_pass($message);
                    }
                }
                // Replace newlines
                $message = str_replace("\n", "\n<br />\n", $message);
                $view_topic_url = append_sid("viewtopic.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}");
                $template->assign_block_vars('news_block.content_block', array('TOPIC_TITLE' => $post_subject, 'POST_TEXT' => $message, 'TOPIC_POSTER' => $topic_poster, 'U_TOPIC_POSTER' => $topic_poster_url, 'TOPIC_TIME' => $no_date ? '' : $topic_time, 'L_VIEW_TOPIC' => $lang['auction_news_more'], 'U_VIEW_TOPIC' => $view_topic_url));
            }
        }
    }
}
function pcp_output_sig($field_name, $view_userdata, $map_name = '')
{
    global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata;
    global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields;
    $txt = '';
    $img = '';
    $res = '';
    if (!empty($view_userdata[$field_name]) && $view_userdata['user_id'] != ANONYMOUS && $view_userdata['user_allow_sig'] && $userdata['user_viewsig']) {
        $user_sig = $view_userdata[$field_name];
        $user_sig_bbcode_uid = $view_userdata[$field_name . '_bbcode_uid'];
        if (!$board_config['allow_html'] && $userdata['user_allowhtml']) {
            $user_sig = preg_replace('#(<)([\\/]?.*?)(>)#is', "&lt;\\2&gt;", $user_sig);
        }
        if ($board_config['allow_bbcode'] && $user_sig_bbcode_uid != '') {
            $user_sig = $board_config['allow_bbcode'] ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace('/\\:[0-9a-z\\:]+\\]/si', ']', $user_sig);
        }
        $user_sig = make_clickable($user_sig);
        if ($board_config['allow_smilies'] && $view_userdata['user_allowsmile']) {
            $user_sig = smilies_pass($user_sig);
        }
        if (count($orig_word) > 0) {
            $user_sig = str_replace('\\"', '"', substr(preg_replace('#(\\>(((?>([^><]+|(?R)))*)\\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1));
        }
        $txt = str_replace("\n", "\n<br />\n", $user_sig);
        // result
        $res = pcp_output_format($field_name, $txt, $img, $map_name);
    }
    return $res;
}
 if ($bbcode_uid != '') {
     $message = $board_config['allow_bbcode'] ? bbencode_second_pass($message, $bbcode_uid) : preg_replace("/\\:{$bbcode_uid}/si", '', $message);
 }
 if ($user_sig != '') {
     $user_sig = make_clickable($user_sig);
 }
 $message = make_clickable($message);
 //
 // Parse smilies
 //
 if ($board_config['allow_smilies']) {
     if ($postrow[$i]['user_allowsmile'] && $user_sig != '') {
         $user_sig = smilies_pass($user_sig);
     }
     if ($postrow[$i]['enable_smilies']) {
         $message = smilies_pass($message);
     }
 }
 //
 // Highlight active words (primarily for search)
 //
 if ($highlight_match) {
     // This has been back-ported from 3.0 CVS
     $message = preg_replace('#(?!<.*)(?<!\\w)(' . $highlight_match . ')(?!\\w|[^<>]*>)#i', '<b style="color:#' . $theme['fontcolor3'] . '">\\1</b>', $message);
 }
 //
 // Replace naughty words
 //
 if (count($orig_word)) {
     $post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
     if ($user_sig != '') {
    } else {
        $template->assign_vars(array('PROCESS' => true));
    }
}
for ($i = 0; $i < $display_this_many; $i++) {
    if ($recent_topic_row[$i]['user_id'] != -1) {
        // this is a left or right block ? //
        if ($display_center != 'C') {
            $my_title_long = $recent_topic_row[$i]['topic_title'];
            $recent_topic_row[$i]['topic_title'] = sgp_checksize($recent_topic_row[$i]['topic_title'], 20);
            // Michaelo's function to stop page from stretching due to long names in form select options... Names are truncated//
        }
        $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", 'f=' . ($recent_topic_row[$i]['forum_id'] ? $recent_topic_row[$i]['forum_id'] : $forum_id));
        // add spaces for nice scrolling
        $my_title = smilies_pass($recent_topic_row[$i]['topic_title']);
        $length = strlen($my_title);
        // Truncate title and padd with ... if too long
        if ($length > 25) {
            sgp_checksize($my_title, 25);
        }
        $my_forum = smilies_pass($recent_topic_row[$i]['forum_name']);
        $length = strlen($my_forum);
        if ($length > 25) {
            sgp_checksize($my_forum, 25);
        }
        $forum_image = isset($recent_topic_row[$i]['forum_image']) ? $recent_topic_row[$i]['forum_image'] : 'images/forum_icons/default.png';
        $template->assign_block_vars($style_row . '_recent_topic_row', array('U_FORUM' => append_sid("viewforum.{$phpEx}", POST_FORUM_URL . '=' . $recent_topic_row[$i]['forum_id']), 'U_TITLE' => append_sid("viewtopic.{$phpEx}", POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']), 'U_LAST_POST' => append_sid($view_topic_url . '&amp;p=' . $recent_topic_row[$i]['topic_last_post_id'] . '#p' . $recent_topic_row[$i]['topic_last_post_id']), 'S_POSTER' => get_username_string('full', $recent_topic_row[$i]['user_id'], $recent_topic_row[$i]['username'], $recent_topic_row[$i]['user_colour']), 'S_POSTTIME' => $user->format_date($recent_topic_row[$i]['post_time']), 'S_ROW_COUNT' => $i, 'S_FORUM' => $last_forum_name == $my_forum ? '' : $my_forum, 'S_TITLE' => $my_title, 'S_TITLE_LONG' => $my_title_long, 'LAST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_LATEST_POST'), 'FORUM_IMG' => '', 'FORUM_LNK' => append_sid("{$phpbb_root_path}viewforum.{$phpEx}", 'f=' . $recent_topic_row[$i]['forum_id'])));
        $last_forum_name = $my_forum;
    }
}
$template->assign_vars(array('S_DISPLAY_CENTRE' => $display_center, 'S_COUNT' => $display_this_many, 'RECENT_TOPICS_DEBUG' => sprintf($user->lang['PORTAL_DEBUG_QUERIES'], $queries ? $queries : '0', $cached_queries ? $cached_queries : '0', $total_queries ? $total_queries : '0')));
Example #22
0
         $user_sig = bbencode_second_pass($user_sig, $userdata['user_sig_bbcode_uid']);
     }
     if ($bbcode_on) {
         $preview_message = bbencode_second_pass($preview_message, $bbcode_uid);
     }
     if ($attach_sig && $user_sig != '') {
         $preview_message = $preview_message . '<br /><br />_________________<br />' . $user_sig;
     }
     if (count($orig_word)) {
         $preview_subject = preg_replace($orig_word, $replacement_word, $privmsg_subject);
         $preview_message = preg_replace($orig_word, $replacement_word, $preview_message);
     } else {
         $preview_subject = $privmsg_subject;
     }
     if ($smilies_on) {
         $preview_message = smilies_pass($preview_message);
     }
     $preview_message = make_clickable($preview_message);
     $preview_message = str_replace("\n", '<br />', $preview_message);
     $s_hidden_fields = '<input type="hidden" name="folder" value="' . $folder . '" />';
     $s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />';
     if (isset($privmsg_id)) {
         $s_hidden_fields .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $privmsg_id . '" />';
     }
     $template->set_filenames(array("preview" => 'privmsgs_preview.tpl'));
     $template->assign_vars(array('TOPIC_TITLE' => $preview_subject, 'POST_SUBJECT' => $preview_subject, 'MESSAGE_TO' => $to_username, 'MESSAGE_FROM' => $userdata['username'], 'POST_DATE' => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']), 'MESSAGE' => $preview_message, 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'L_SUBJECT' => $lang['Subject'], 'L_DATE' => $lang['Date'], 'L_FROM' => $lang['From'], 'L_TO' => $lang['To'], 'L_PREVIEW' => $lang['Preview'], 'L_POSTED' => $lang['Posted']));
     $template->assign_var_from_handle('POST_PREVIEW_BOX', 'preview');
 }
 //
 // Start error handling
 //
Example #23
0
$page_title = $postreport || $lock_subject ? $lang['Post_a_report'] : $page_title;
// Generate smilies listing for page output
generate_smilies('inline', PAGE_POSTING);
//
// Include page header
//
include $phpbb_root_path . 'includes/page_header.' . $phpEx;
//-- mod : bbcode box reloaded -------------------------------------------------
//-- add
include $phpbb_root_path . 'includes/bbc_box_tags.' . $phpEx;
//-- fin mod : bbcode box reloaded ---------------------------------------------
$template->set_filenames(array('body' => 'posting_body.tpl', 'pollbody' => 'posting_poll_body.tpl', 'reviewbody' => 'posting_topic_review.tpl'));
make_jumpbox('viewforum.' . $phpEx);
// Start Smilies Invasion Mod
if ($board_config['allow_smilies']) {
    $forum_name = smilies_pass($forum_name);
}
// End Smilies Invasion Mod
$template->assign_vars(array('FORUM_NAME' => $forum_name, 'TOPIC_SUBJECT' => $topic_title, 'L_POST_A' => $page_title, 'L_POST_SUBJECT' => $lang['Post_subject'], 'U_VIEW_TOPIC' => append_sid("viewtopic.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}"), 'U_VIEW_FORUM' => append_sid("viewforum.{$phpEx}?" . POST_FORUM_URL . "={$forum_id}")));
//
// This enables the forum/topic title to be output for posting
// but not for privmsg (where it makes no sense)
//
$template->assign_block_vars('switch_not_privmsg', array());
//-- mod: sf
include $phpbb_root_path . 'includes/functions_sf.' . $phpEx;
_sf_display_nav($forum_id, 'switch_not_privmsg');
//-- mod: sf - end
// Begin View Topic Name While Posting MOD
if ($mode == 'reply' || $mode == 'quote' || $mode == 'editpost') {
    $template->assign_block_vars('switch_not_privmsg.reply_mode', array());
Example #24
0
        //-- add
        $u_from_user_profile = $get->url('userlist', array('mode' => 'viewprofile', POST_USERS_URL => $msg_userid), true);
        //-- fin mod : rank color system -----------------------------------------------
        $msg_subject = $row['privmsgs_subject'];
        if (count($orig_word)) {
            $msg_subject = preg_replace($orig_word, $replacement_word, $msg_subject);
        }
        $u_subject = append_sid("privmsg.{$phpEx}?folder={$folder}&amp;mode=read&amp;" . POST_POST_URL . "={$privmsg_id}");
        $msg_date = create_date($board_config['default_dateformat'], $row['privmsgs_date'], $board_config['board_timezone']);
        if ($flag == PRIVMSGS_NEW_MAIL && $folder == 'inbox') {
            $msg_subject = '<b>' . $msg_subject . '</b>';
            $msg_date = '<b>' . $msg_date . '</b>';
            $msg_username = '******' . $msg_username . '</b>';
        }
        $row_color = !($i % 2) ? $theme['td_color1'] : $theme['td_color2'];
        $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2'];
        $i++;
        // Start Smilies Invasion Mod
        if ($board_config['allow_smilies']) {
            $msg_subject = smilies_pass($msg_subject);
        }
        // End Smilies Invasion Mod
        $template->assign_block_vars('listrow', array('ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'STYLE' => $rcs->get_colors($row), 'FROM' => $msg_username, 'SUBJECT' => $msg_subject, 'DATE' => $msg_date, 'PRIVMSG_ATTACHMENTS_IMG' => privmsgs_attachment_image($privmsg_id), 'PRIVMSG_FOLDER_IMG' => $icon_flag, 'L_PRIVMSG_FOLDER_ALT' => $icon_flag_alt, 'S_MARK_ID' => $privmsg_id, 'U_READ' => $u_subject, 'U_FROM_USER_PROFILE' => $u_from_user_profile));
    } while ($row = $db->sql_fetchrow($result));
    $template->assign_vars(array('PAGINATION' => generate_pagination("privmsg.{$phpEx}?folder={$folder}", $pm_total, $board_config['topics_per_page'], $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], floor($start / $board_config['topics_per_page']) + 1, ceil($pm_total / $board_config['topics_per_page'])), 'L_GOTO_PAGE' => $lang['Goto_page']));
} else {
    $template->assign_vars(array('L_NO_MESSAGES' => $lang['No_messages_folder']));
    $template->assign_block_vars("switch_no_messages", array());
}
$template->pparse('body');
include $phpbb_root_path . 'includes/page_tail.' . $phpEx;
    $next_img = '<img src="' . $phpbb_root_path . "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/images/next_line.gif" height="9px" width="11px" alt="" />';
} else {
    $next_img = '<img src="' . $phpbb_root_path . 'images/next_line.gif" height="9px" width="11px" alt="" />';
}
for ($i = 0; $i < $display_this_many; $i++) {
    $unique = $row[$i]['forum_id'] == $last_forum ? false : true;
    //echo 'Forum ID = ' . $row[$i]['forum_id'] . ' Compare to: '; echo $row[$i - $number_of_topics_per_forum]['forum_id'] . '<br />';
    if ($i >= $number_of_topics_per_forum && $row[$i]['forum_id'] == $row[$i - $number_of_topics_per_forum]['forum_id']) {
        continue;
    }
    // reduce length and pad with ... if too long //
    $my_title = smilies_pass($row[$i]['topic_title']);
    if (strlen($my_title) > 25) {
        sgp_checksize($my_title, 25);
    }
    // reduce length and pad with ... if too long //
    $forum_name = smilies_pass($row[$i]['forum_name']);
    if (strlen($forum_name) > 25) {
        sgp_checksize($forum_name, 25);
    }
    //$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row[$i]['forum_id']) ? $row[$i]['forum_id'] : $forum_id) );
    $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", 'f=' . $row[$i]['forum_id']);
    if ($row[$i]['post_edit_time'] > $row[$i]['topic_last_post_time']) {
        $this_post_time = '*<span style="font-style:italic">' . $user->format_date($row[$i]['post_edit_time']) . '</span>';
    } else {
        $this_post_time = $user->format_date($row[$i]['topic_last_post_time']);
    }
    $template->assign_block_vars($style_row . 'recent_topic_row', array('LAST_POST_IMG_W' => $user->img('icon_topic_newest', 'VIEW_LATEST_POST'), 'LAST_POST_IMG_W' => $next_img, 'FORUM_W' => $forum_name, 'U_FORUM_W' => append_sid("viewforum.{$phpEx}?" . POST_FORUM_URL . '=' . $row[$i]['forum_id']), 'TITLE_W' => censor_text($my_title), 'U_TITLE_W' => $view_topic_url . '&amp;p=' . $row[$i]['topic_last_post_id'] . '#p' . $row[$i]['topic_last_post_id'], 'POSTER_FULL_W' => get_username_string('full', $row[$i]['topic_last_poster_id'], $row[$i]['topic_last_poster_name'], $row[$i]['topic_last_poster_colour']), 'POSTTIME_W' => $this_post_time, 'S_ROW_COUNT_W' => $i, 'S_UNIQUE_W' => $unique, 'S_TYPE_W' => $row[$i]['topic_type'], 'TOOLTIP_W' => bbcode_strip($row[$i]['post_text']), 'TOOLTIP2_W' => bbcode_strip($row[$i]['forum_desc'])));
    $last_forum = $row[$i]['forum_id'];
}
$template->assign_vars(array('S_COUNT_RECENT' => $i > 0 ? true : false, 'SEARCH_TYPE' => !$search_days ? $user->lang['FULL_SEARCH'] : $user->lang['SEARCH_DAYS'] . $search_days, 'SEARCH_LIMIT' => $user->lang['T_LIMITS'] . $number_of_topics_per_forum . $user->lang['TOPICS_PER_FORUM_DISPLAY'] . $display_this_many . ' ' . $user->lang['POSTS'], 'RECENT_TOPICS_WIDE_DEBUG' => sprintf($user->lang['PORTAL_DEBUG_QUERIES'], $queries ? $queries : '0', $cached_queries ? $cached_queries : '0', $total_queries ? $total_queries : '0')));