Exemplo n.º 1
0
        $post_link .= ' / <a href="post.php?tid=' . $id . '">' . $lang_topic['Post reply'] . '</a>';
    }
    $post_link = "\t\t\t" . '<p class="postlink conr">' . $post_link . '</p>' . "\n";
}
// Add/update this topic in our list of tracked topics
if (!$pun_user['is_guest']) {
    $tracked_topics = get_tracked_topics();
    $tracked_topics['topics'][$id] = time();
    set_tracked_topics($tracked_topics);
}
// Determine the post offset (based on $_GET['p'])
$num_pages = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);
$p = !isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages ? 1 : intval($_GET['p']);
$start_from = $pun_user['disp_posts'] * ($p - 1);
// Generate paging links
$paging_links = '<span class="pages-label">' . $lang_common['Pages'] . ': </span>' . paginate_rewritten($num_pages, $p, clean_url($cur_topic['subject']) . '-t' . $id);
if ($pun_config['o_censoring'] == '1') {
    $cur_topic['subject'] = censor_words($cur_topic['subject']);
}
$quickpost = false;
if ($pun_config['o_quickpost'] == '1' && ($cur_topic['post_replies'] == '1' || $cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1') && ($cur_topic['closed'] == '0' || $is_admmod)) {
    // Load the post.php language file
    require PUN_ROOT . 'lang/' . $pun_user['language'] . '/post.php';
    $required_fields = array('req_message' => $lang_common['Message']);
    if ($pun_user['is_guest']) {
        $required_fields['req_username'] = $lang_post['Guest name'];
        if ($pun_config['p_force_guest_email'] == '1') {
            $required_fields['req_email'] = $lang_common['Email'];
        }
    }
    $quickpost = true;
Exemplo n.º 2
0
                if ($cur_search['closed'] != '0') {
                    $status_text[] = '<span class="closedtext">' . $lang_forum['Closed'] . '</span>';
                    $item_status .= ' iclosed';
                }
                if (!$pun_user['is_guest'] && $cur_search['last_post'] > $pun_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'])) {
                    $item_status .= ' inew';
                    $icon_type = 'icon icon-new';
                    $subject = '<strong>' . $subject . '</strong>';
                    $subject_new_posts = '<span class="newtext">[ <a href="' . fluxrewrite($cur_search['tid'], $cur_search['subject'], 't', false, true, false) . '" title="' . $lang_common['New posts info'] . '">' . $lang_common['New posts'] . '</a> ]</span>';
                } else {
                    $subject_new_posts = null;
                }
                // Insert the status text before the subject
                $subject = implode(' ', $status_text) . ' ' . $subject;
                if ($num_pages_topic > 1) {
                    $subject_multipage = '<span class="pagestext">[ ' . paginate_rewritten($num_pages_topic, -1, clean_url($cur_search['subject']) . '-t' . $cur_search['tid']) . ' ]</span>';
                } else {
                    $subject_multipage = null;
                }
                $last_post = '<a href="' . fluxrewrite($cur_search['tid'], $cur_search['subject'], 't', $num_pages_topic, false, $cur_search['last_post_id']) . '">' . format_time($cur_search['last_post']) . '</a> <span class="byuser">' . $lang_common['by'] . ' ' . pun_htmlspecialchars($cur_search['last_poster']) . '</span>';
                // Should we show the "New posts" and/or the multipage links?
                if (!empty($subject_new_posts) || !empty($subject_multipage)) {
                    $subject .= !empty($subject_new_posts) ? ' ' . $subject_new_posts : '';
                    $subject .= !empty($subject_multipage) ? ' ' . $subject_multipage : '';
                }
                ?>
				<tr class="<?php 
                echo $item_status;
                ?>
">
					<td class="tcl">