2001-02-17 08:37:32 +00:00
|
|
|
<?php
|
2001-03-07 06:53:39 +00:00
|
|
|
/***************************************************************************
|
2001-07-06 17:47:10 +00:00
|
|
|
* viewtopic.php
|
2001-03-07 06:53:39 +00:00
|
|
|
* -------------------
|
|
|
|
* begin : Saturday, Feb 13, 2001
|
|
|
|
* copyright : (C) 2001 The phpBB Group
|
|
|
|
* email : support@phpbb.com
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
*
|
|
|
|
***************************************************************************/
|
|
|
|
|
2001-09-07 22:56:50 +00:00
|
|
|
/***************************************************************************
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
***************************************************************************/
|
2001-08-30 22:07:08 +00:00
|
|
|
|
2001-07-13 16:14:37 +00:00
|
|
|
$phpbb_root_path = "./";
|
|
|
|
include($phpbb_root_path . 'extension.inc');
|
|
|
|
include($phpbb_root_path . 'common.'.$phpEx);
|
|
|
|
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
|
2001-03-04 04:17:02 +00:00
|
|
|
|
2001-05-27 22:08:47 +00:00
|
|
|
//
|
|
|
|
// Start initial var setup
|
|
|
|
//
|
2001-07-05 17:39:38 +00:00
|
|
|
if(isset($HTTP_GET_VARS[POST_TOPIC_URL]))
|
2001-03-09 15:23:03 +00:00
|
|
|
{
|
|
|
|
$topic_id = $HTTP_GET_VARS[POST_TOPIC_URL];
|
|
|
|
}
|
2001-05-29 18:16:46 +00:00
|
|
|
if(isset($HTTP_GET_VARS[POST_POST_URL]))
|
|
|
|
{
|
|
|
|
$post_id = $HTTP_GET_VARS[POST_POST_URL];
|
|
|
|
}
|
2001-05-24 20:10:34 +00:00
|
|
|
|
2001-07-05 17:39:38 +00:00
|
|
|
$start = (isset($HTTP_GET_VARS['start'])) ? $HTTP_GET_VARS['start'] : 0;
|
2001-07-03 00:33:20 +00:00
|
|
|
//
|
|
|
|
// End initial var setup
|
|
|
|
//
|
|
|
|
|
2001-08-09 22:21:55 +00:00
|
|
|
if(!isset($topic_id) && !isset($post_id))
|
|
|
|
{
|
|
|
|
message_die(GENERAL_MESSAGE, $lang['Topic_post_not_exist']);
|
|
|
|
}
|
|
|
|
|
2001-05-16 06:45:44 +00:00
|
|
|
//
|
2001-07-05 17:39:38 +00:00
|
|
|
// Find topic id if user requested a newer
|
|
|
|
// or older topic
|
|
|
|
//
|
2001-07-06 00:03:51 +00:00
|
|
|
if( isset($HTTP_GET_VARS["view"]) && empty($HTTP_GET_VARS[POST_POST_URL]) )
|
2001-05-16 00:49:06 +00:00
|
|
|
{
|
2001-07-05 17:39:38 +00:00
|
|
|
if($HTTP_GET_VARS["view"] == "next")
|
2001-05-16 00:49:06 +00:00
|
|
|
{
|
2001-07-05 17:39:38 +00:00
|
|
|
$sql_condition = ">";
|
|
|
|
$sql_ordering = "ASC";
|
2001-05-16 00:49:06 +00:00
|
|
|
}
|
2001-07-05 17:39:38 +00:00
|
|
|
else if($HTTP_GET_VARS["view"] == "previous")
|
2001-05-16 00:49:06 +00:00
|
|
|
{
|
2001-07-05 17:39:38 +00:00
|
|
|
$sql_condition = "<";
|
|
|
|
$sql_ordering = "DESC";
|
2001-05-16 00:56:59 +00:00
|
|
|
}
|
|
|
|
|
2001-08-02 08:36:38 +00:00
|
|
|
$sql = "SELECT t.topic_id
|
|
|
|
FROM " . TOPICS_TABLE . " t, " . TOPICS_TABLE . " t2, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2
|
|
|
|
WHERE t2.topic_id = $topic_id
|
|
|
|
AND p2.post_id = t2.topic_last_post_id
|
|
|
|
AND t.forum_id = t2.forum_id
|
|
|
|
AND p.post_id = t.topic_last_post_id
|
|
|
|
AND p.post_time $sql_condition p2.post_time
|
|
|
|
AND p.topic_id = t.topic_id
|
|
|
|
ORDER BY p.post_time $sql_ordering
|
2001-07-05 17:39:38 +00:00
|
|
|
LIMIT 1";
|
|
|
|
if(!$result = $db->sql_query($sql))
|
2001-05-16 00:56:59 +00:00
|
|
|
{
|
2001-07-05 17:39:38 +00:00
|
|
|
message_die(GENERAL_ERROR, "Couldn't obtain newer/older topic information", "", __LINE__, __FILE__, $sql);
|
|
|
|
}
|
2001-08-02 08:36:38 +00:00
|
|
|
|
2001-08-23 15:30:12 +00:00
|
|
|
if( !$row = $db->sql_fetchrow($result) )
|
2001-07-05 17:39:38 +00:00
|
|
|
{
|
|
|
|
if($HTTP_GET_VARS["view"] == "next")
|
|
|
|
{
|
|
|
|
message_die(GENERAL_MESSAGE, $lang['No_newer_topics']);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
message_die(GENERAL_MESSAGE, $lang['No_older_topics']);
|
|
|
|
}
|
2001-05-16 00:49:06 +00:00
|
|
|
}
|
2001-08-23 15:30:12 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
$topic_id = $row['topic_id'];
|
|
|
|
}
|
2001-05-16 00:49:06 +00:00
|
|
|
}
|
2001-07-05 17:39:38 +00:00
|
|
|
|
2001-05-16 00:49:06 +00:00
|
|
|
//
|
2001-07-05 17:39:38 +00:00
|
|
|
// This rather complex gaggle of code handles querying for topics but
|
|
|
|
// also allows for direct linking to a post (and the calculation of which
|
|
|
|
// page the post is on and the correct display of viewtopic)
|
2001-05-16 00:49:06 +00:00
|
|
|
//
|
2001-07-05 17:39:38 +00:00
|
|
|
$join_sql_table = (!isset($post_id)) ? "" : "" . POSTS_TABLE . " p, " . POSTS_TABLE . " p2,";
|
|
|
|
$join_sql = (!isset($post_id)) ? "t.topic_id = $topic_id" : "p.post_id = $post_id AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= $post_id";
|
|
|
|
$count_sql = (!isset($post_id)) ? "" : ", COUNT(p2.post_id) AS prev_posts";
|
2001-05-27 22:08:47 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$order_sql = (!isset($post_id)) ? "" : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, f.forum_name, f.forum_status, 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 ORDER BY p.post_id ASC";
|
2001-06-05 21:15:19 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, f.forum_name, f.forum_status, 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" . $count_sql . "
|
2001-07-05 17:39:38 +00:00
|
|
|
FROM $join_sql_table " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
|
|
|
|
WHERE $join_sql
|
|
|
|
AND f.forum_id = t.forum_id
|
|
|
|
$order_sql";
|
2001-03-04 04:17:02 +00:00
|
|
|
|
|
|
|
if(!$result = $db->sql_query($sql))
|
2001-03-07 06:53:39 +00:00
|
|
|
{
|
2001-07-05 17:39:38 +00:00
|
|
|
message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql);
|
2001-03-04 04:17:02 +00:00
|
|
|
}
|
2001-05-27 22:08:47 +00:00
|
|
|
|
2001-03-04 04:17:02 +00:00
|
|
|
if(!$total_rows = $db->sql_numrows($result))
|
|
|
|
{
|
2001-07-03 22:53:31 +00:00
|
|
|
message_die(GENERAL_MESSAGE, $lang['Topic_post_not_exist'], "", __LINE__, __FILE__, $sql);
|
2001-03-04 04:17:02 +00:00
|
|
|
}
|
2001-07-22 20:32:05 +00:00
|
|
|
$forum_row = $db->sql_fetchrow($result);
|
2001-07-05 17:39:38 +00:00
|
|
|
|
2001-07-22 20:32:05 +00:00
|
|
|
$forum_id = $forum_row['forum_id'];
|
|
|
|
|
2001-04-15 14:14:56 +00:00
|
|
|
//
|
|
|
|
// Start session management
|
|
|
|
//
|
|
|
|
$userdata = session_pagestart($user_ip, $forum_id, $session_length);
|
|
|
|
init_userprefs($userdata);
|
|
|
|
//
|
|
|
|
// End session management
|
|
|
|
//
|
|
|
|
|
2001-08-09 22:21:55 +00:00
|
|
|
$forum_name = stripslashes($forum_row['forum_name']);
|
|
|
|
$topic_title = stripslashes($forum_row['topic_title']);
|
|
|
|
$topic_id = $forum_row['topic_id'];
|
|
|
|
$topic_time = $forum_row['topic_time'];
|
|
|
|
|
|
|
|
if(!empty($post_id))
|
|
|
|
{
|
|
|
|
$start = floor(($forum_row['prev_posts'] - 1) / $board_config['posts_per_page']) * $board_config['posts_per_page'];
|
|
|
|
}
|
|
|
|
|
2001-05-30 20:21:42 +00:00
|
|
|
//
|
|
|
|
// Start auth check
|
|
|
|
//
|
2001-07-22 20:32:05 +00:00
|
|
|
$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_row);
|
2001-05-30 20:21:42 +00:00
|
|
|
|
2001-07-20 15:16:03 +00:00
|
|
|
if(!$is_auth['auth_view'] || !$is_auth['auth_read'])
|
2001-05-30 20:21:42 +00:00
|
|
|
{
|
|
|
|
//
|
2001-07-05 17:39:38 +00:00
|
|
|
// The user is not authed to read this forum ...
|
2001-05-30 20:21:42 +00:00
|
|
|
//
|
2001-07-05 17:39:38 +00:00
|
|
|
$msg = $lang['Sorry_auth'] . $is_auth['auth_read_type'] . $lang['can_read'] . $lang['this_forum'];
|
2001-05-30 20:21:42 +00:00
|
|
|
|
2001-07-03 00:33:20 +00:00
|
|
|
message_die(GENERAL_MESSAGE, $msg);
|
2001-05-30 20:21:42 +00:00
|
|
|
}
|
|
|
|
//
|
|
|
|
// End auth check
|
2001-06-03 23:10:07 +00:00
|
|
|
//
|
2001-05-30 20:21:42 +00:00
|
|
|
|
2001-08-14 00:29:39 +00:00
|
|
|
//
|
2001-09-07 22:56:50 +00:00
|
|
|
// Is user watching this thread? This could potentially
|
2001-08-14 00:29:39 +00:00
|
|
|
// be combined into the above query but the LEFT JOIN causes
|
|
|
|
// a number of problems which will probably end up in this
|
|
|
|
// solution being practically as fast and certainly simpler!
|
|
|
|
//
|
|
|
|
if($userdata['user_id'] != ANONYMOUS)
|
|
|
|
{
|
|
|
|
$can_watch_topic = TRUE;
|
|
|
|
|
2001-09-07 22:56:50 +00:00
|
|
|
$sql = "SELECT notify_status
|
|
|
|
FROM " . TOPICS_WATCH_TABLE . "
|
|
|
|
WHERE topic_id = $topic_id
|
2001-08-14 00:29:39 +00:00
|
|
|
AND user_id = " . $userdata['user_id'];
|
|
|
|
if( !$result = $db->sql_query($sql) )
|
|
|
|
{
|
|
|
|
message_die(GENERAL_ERROR, "Couldn't obtain topic watch information", "", __LINE__, __FILE__, $sql);
|
|
|
|
}
|
|
|
|
else if( $db->sql_numrows($result) )
|
|
|
|
{
|
2001-08-14 13:45:42 +00:00
|
|
|
if( isset($HTTP_GET_VARS['unwatch']) )
|
2001-08-14 00:29:39 +00:00
|
|
|
{
|
2001-08-14 13:45:42 +00:00
|
|
|
if( $HTTP_GET_VARS['unwatch'] == "topic" )
|
2001-08-14 00:29:39 +00:00
|
|
|
{
|
|
|
|
$is_watching_topic = 0;
|
|
|
|
|
|
|
|
$sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : "";
|
2001-09-07 22:56:50 +00:00
|
|
|
$sql = "DELETE $sql_priority FROM " . TOPICS_WATCH_TABLE . "
|
|
|
|
WHERE topic_id = $topic_id
|
2001-08-14 00:29:39 +00:00
|
|
|
AND user_id = " . $userdata['user_id'];
|
|
|
|
if( !$result = $db->sql_query($sql) )
|
|
|
|
{
|
|
|
|
message_die(GENERAL_ERROR, "Couldn't delete topic watch information", "", __LINE__, __FILE__, $sql);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$is_watching_topic = TRUE;
|
|
|
|
|
|
|
|
$watch_data = $db->sql_fetchrow($result);
|
|
|
|
|
|
|
|
if( $watch_data['notify_status'] )
|
|
|
|
{
|
|
|
|
$sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : "";
|
2001-09-07 22:56:50 +00:00
|
|
|
$sql = "UPDATE $sql_priority " . TOPICS_WATCH_TABLE . "
|
|
|
|
SET notify_status = 0
|
|
|
|
WHERE topic_id = $topic_id
|
2001-08-14 00:29:39 +00:00
|
|
|
AND user_id = " . $userdata['user_id'];
|
|
|
|
if( !$result = $db->sql_query($sql) )
|
|
|
|
{
|
|
|
|
message_die(GENERAL_ERROR, "Couldn't update topic watch information", "", __LINE__, __FILE__, $sql);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( isset($HTTP_GET_VARS['watch']) )
|
|
|
|
{
|
2001-08-14 13:45:42 +00:00
|
|
|
if( $HTTP_GET_VARS['watch'] == "topic" )
|
2001-08-14 00:29:39 +00:00
|
|
|
{
|
|
|
|
$is_watching_topic = TRUE;
|
|
|
|
|
|
|
|
$sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : "";
|
2001-09-07 22:56:50 +00:00
|
|
|
$sql = "INSERT $sql_priority INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status)
|
2001-08-14 00:29:39 +00:00
|
|
|
VALUES (" . $userdata['user_id'] . ", $topic_id, 0)";
|
|
|
|
if( !$result = $db->sql_query($sql) )
|
|
|
|
{
|
|
|
|
message_die(GENERAL_ERROR, "Couldn't insert topic watch information", "", __LINE__, __FILE__, $sql);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$is_watching_topic = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-08-14 13:45:42 +00:00
|
|
|
if( isset($HTTP_GET_VARS['unwatch']) )
|
|
|
|
{
|
|
|
|
if( $HTTP_GET_VARS['unwatch'] == "topic" )
|
|
|
|
{
|
|
|
|
header("Location: login.$phpEx?forward_page=viewtopic.$phpEx&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$can_watch_topic = 0;
|
|
|
|
$is_watching_topic = 0;
|
|
|
|
}
|
2001-08-14 00:29:39 +00:00
|
|
|
}
|
|
|
|
|
2001-07-31 18:37:25 +00:00
|
|
|
//
|
|
|
|
// Generate a 'Show posts in previous x days' select box. If the postdays var is POSTed
|
|
|
|
// then get it's value, find the number of topics with dates newer than it (to properly
|
|
|
|
// handle pagination) and alter the main query
|
|
|
|
//
|
|
|
|
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
|
|
|
|
$previous_days_text = array($lang['All_Posts'], "1 " . $lang['Day'], "7 " . $lang['Days'], "2 " . $lang['Weeks'], "1 " . $lang['Month'], "3 ". $lang['Months'], "6 " . $lang['Months'], "1 " . $lang['Year']);
|
|
|
|
|
|
|
|
if(!empty($HTTP_POST_VARS['postdays']) || !empty($HTTP_GET_VARS['postdays']))
|
|
|
|
{
|
|
|
|
$post_days = (!empty($HTTP_POST_VARS['postdays'])) ? $HTTP_POST_VARS['postdays'] : $HTTP_GET_VARS['postdays'];
|
|
|
|
$min_post_time = time() - ($post_days * 86400);
|
|
|
|
|
|
|
|
$sql = "SELECT COUNT(post_id) AS num_posts
|
2001-08-02 08:36:38 +00:00
|
|
|
FROM " . POSTS_TABLE . "
|
|
|
|
WHERE topic_id = $topic_id
|
2001-07-31 18:37:25 +00:00
|
|
|
AND post_time >= $min_post_time";
|
|
|
|
if(!$result = $db->sql_query($sql))
|
|
|
|
{
|
|
|
|
message_die(GENERAL_ERROR, "Couldn't obtain limited topics count information", "", __LINE__, __FILE__, $sql);
|
|
|
|
}
|
2001-09-06 00:29:07 +00:00
|
|
|
|
|
|
|
$total_replies = ( $row = $db->sql_fetchrow($result) ) ? $row['num_posts'] : 0;
|
2001-07-31 18:37:25 +00:00
|
|
|
|
|
|
|
$limit_posts_time = "AND p.post_time >= $min_post_time ";
|
|
|
|
|
|
|
|
if(!empty($HTTP_POST_VARS['postdays']))
|
|
|
|
{
|
|
|
|
$start = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$total_replies = $forum_row['topic_replies'] + 1;
|
|
|
|
|
|
|
|
$limit_posts_time = "";
|
|
|
|
$post_days = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$select_post_days = "<select name=\"postdays\">";
|
|
|
|
for($i = 0; $i < count($previous_days); $i++)
|
|
|
|
{
|
|
|
|
$selected = ($post_days == $previous_days[$i]) ? " selected=\"selected\"" : "";
|
|
|
|
$select_post_days .= "<option value=\"" . $previous_days[$i] . "\"$selected>" . $previous_days_text[$i] . "</option>";
|
|
|
|
}
|
|
|
|
$select_post_days .= "</select>";
|
|
|
|
|
|
|
|
//
|
|
|
|
// Decide how to order the post display
|
|
|
|
//
|
|
|
|
if(!empty($HTTP_POST_VARS['postorder']) || !empty($HTTP_GET_VARS['postorder']))
|
|
|
|
{
|
|
|
|
$post_order = (!empty($HTTP_POST_VARS['postorder'])) ? $HTTP_POST_VARS['postorder'] : $HTTP_GET_VARS['postorder'];
|
|
|
|
$post_time_order = ($post_order == "asc") ? "ASC" : "DESC";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$post_time_order = "ASC";
|
|
|
|
}
|
|
|
|
|
|
|
|
$select_post_order = "<select name=\"postorder\">";
|
|
|
|
if($post_time_order == "ASC")
|
|
|
|
{
|
|
|
|
$select_post_order .= "<option value=\"asc\" selected=\"selected\">" . $lang['Oldest_First'] . "</option><option value=\"desc\">" . $lang['Newest_First'] . "</option>";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$select_post_order .= "<option value=\"asc\">" . $lang['Oldest_First'] . "</option><option value=\"desc\" selected=\"selected\">" . $lang['Newest_First'] . "</option>";
|
|
|
|
}
|
|
|
|
$select_post_order .= "</select>";
|
|
|
|
|
2001-05-27 22:08:47 +00:00
|
|
|
//
|
|
|
|
// Go ahead and pull all data for this topic
|
|
|
|
//
|
2001-09-07 00:23:40 +00:00
|
|
|
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_avatar, p.*, pt.post_text, pt.post_subject
|
2001-07-05 17:39:38 +00:00
|
|
|
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
|
2001-05-13 16:02:30 +00:00
|
|
|
WHERE p.topic_id = $topic_id
|
2001-06-03 23:10:07 +00:00
|
|
|
AND p.poster_id = u.user_id
|
2001-08-02 08:36:38 +00:00
|
|
|
AND p.post_id = pt.post_id
|
|
|
|
$limit_posts_time
|
2001-07-31 18:37:25 +00:00
|
|
|
ORDER BY p.post_time $post_time_order
|
2001-05-03 22:10:23 +00:00
|
|
|
LIMIT $start, ".$board_config['posts_per_page'];
|
2001-03-04 04:17:02 +00:00
|
|
|
if(!$result = $db->sql_query($sql))
|
|
|
|
{
|
2001-07-03 22:53:31 +00:00
|
|
|
message_die(GENERAL_ERROR, "Couldn't obtain post/user information.", "", __LINE__, __FILE__, $sql);
|
2001-03-04 04:17:02 +00:00
|
|
|
}
|
2001-07-05 17:39:38 +00:00
|
|
|
|
2001-03-04 04:17:02 +00:00
|
|
|
if(!$total_posts = $db->sql_numrows($result))
|
|
|
|
{
|
2001-07-03 22:53:31 +00:00
|
|
|
message_die(GENERAL_ERROR, "There don't appear to be any posts for this topic.", "", __LINE__, __FILE__, $sql);
|
2001-03-04 04:17:02 +00:00
|
|
|
}
|
2001-08-15 16:00:57 +00:00
|
|
|
$postrow = $db->sql_fetchrowset($result);
|
2001-07-05 17:39:38 +00:00
|
|
|
|
2001-04-02 14:36:36 +00:00
|
|
|
$sql = "SELECT *
|
2001-07-05 17:39:38 +00:00
|
|
|
FROM " . RANKS_TABLE . "
|
|
|
|
ORDER BY rank_special, rank_min";
|
2001-04-02 14:36:36 +00:00
|
|
|
if(!$ranks_result = $db->sql_query($sql))
|
|
|
|
{
|
2001-07-03 22:53:31 +00:00
|
|
|
message_die(GENERAL_ERROR, "Couldn't obtain ranks information.", "", __LINE__, __FILE__, $sql);
|
2001-04-02 14:36:36 +00:00
|
|
|
}
|
|
|
|
$ranksrow = $db->sql_fetchrowset($ranksresult);
|
2001-03-04 04:17:02 +00:00
|
|
|
|
2001-08-15 01:46:27 +00:00
|
|
|
//
|
2001-08-15 16:00:57 +00:00
|
|
|
// Define censored word matches
|
2001-08-15 01:46:27 +00:00
|
|
|
//
|
2001-09-06 00:29:07 +00:00
|
|
|
$orig_word = array();
|
|
|
|
$replacement_word = array();
|
|
|
|
obtain_word_list($orig_word, $replacement_word);
|
2001-08-15 01:46:27 +00:00
|
|
|
|
2001-05-27 22:08:47 +00:00
|
|
|
//
|
2001-07-22 20:32:05 +00:00
|
|
|
// Dump out the page header and load viewtopic body template
|
2001-05-27 22:08:47 +00:00
|
|
|
//
|
2001-08-14 00:29:39 +00:00
|
|
|
setcookie('phpbb2_' . $forum_id . '_' . $topic_id, time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
|
2001-08-15 01:46:27 +00:00
|
|
|
|
2001-07-22 20:32:05 +00:00
|
|
|
$page_title = $lang['View_topic'] ." - $topic_title";
|
2001-07-13 16:14:37 +00:00
|
|
|
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
2001-05-27 22:08:47 +00:00
|
|
|
|
|
|
|
$template->set_filenames(array(
|
|
|
|
"body" => "viewtopic_body.tpl",
|
|
|
|
"jumpbox" => "jumpbox.tpl")
|
|
|
|
);
|
2001-07-05 17:39:38 +00:00
|
|
|
|
2001-05-27 22:08:47 +00:00
|
|
|
$jumpbox = make_jumpbox();
|
|
|
|
$template->assign_vars(array(
|
2001-08-02 08:36:38 +00:00
|
|
|
"L_GO" => $lang['Go'],
|
|
|
|
"L_JUMP_TO" => $lang['Jump_to'],
|
|
|
|
"L_SELECT_FORUM" => $lang['Select_forum'],
|
2001-09-07 22:56:50 +00:00
|
|
|
|
2001-09-07 12:32:47 +00:00
|
|
|
"S_JUMPBOX_LIST" => $jumpbox,
|
|
|
|
"S_JUMPBOX_ACTION" => append_sid("viewforum.$phpEx"))
|
2001-05-27 22:08:47 +00:00
|
|
|
);
|
|
|
|
$template->assign_var_from_handle("JUMPBOX", "jumpbox");
|
2001-07-05 17:39:38 +00:00
|
|
|
|
2001-05-27 22:08:47 +00:00
|
|
|
$template->assign_vars(array(
|
|
|
|
"FORUM_ID" => $forum_id,
|
|
|
|
"FORUM_NAME" => $forum_name,
|
|
|
|
"TOPIC_ID" => $topic_id,
|
|
|
|
"TOPIC_TITLE" => $topic_title,
|
2001-07-31 18:37:25 +00:00
|
|
|
|
2001-09-07 22:56:50 +00:00
|
|
|
"L_DISPLAY_POSTS" => $lang['Display_posts'],
|
|
|
|
"L_RETURN_TO_TOP" => $lang['Return_to_top'],
|
2001-07-31 18:37:25 +00:00
|
|
|
|
|
|
|
"S_SELECT_POST_DAYS" => $select_post_days,
|
|
|
|
"S_SELECT_POST_ORDER" => $select_post_order,
|
|
|
|
"S_POST_DAYS_ACTION" => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$start"))
|
|
|
|
|
2001-05-27 22:08:47 +00:00
|
|
|
);
|
|
|
|
//
|
|
|
|
// End header
|
|
|
|
//
|
|
|
|
|
2001-05-03 22:10:23 +00:00
|
|
|
//
|
2001-05-16 06:45:44 +00:00
|
|
|
// Post, reply and other URL generation for
|
2001-05-03 22:10:23 +00:00
|
|
|
// templating vars
|
|
|
|
//
|
2001-07-31 18:37:25 +00:00
|
|
|
$new_topic_url = append_sid("posting.$phpEx?mode=newtopic&" . POST_FORUM_URL . "=$forum_id");
|
|
|
|
$reply_topic_url = append_sid("posting.$phpEx?mode=reply&" . POST_TOPIC_URL . "=$topic_id");
|
2001-07-05 17:39:38 +00:00
|
|
|
|
2001-06-11 00:43:15 +00:00
|
|
|
$view_forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id");
|
2001-07-05 17:39:38 +00:00
|
|
|
|
2001-07-31 18:37:25 +00:00
|
|
|
$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=previous");
|
|
|
|
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=next");
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-07-24 17:34:40 +00:00
|
|
|
$reply_img = ($forum_row['forum_status'] == FORUM_LOCKED || $forum_row['topic_status'] == TOPIC_LOCKED) ? $images['reply_locked'] : $images['reply_new'];
|
|
|
|
$post_img = ($forum_row['forum_status'] == FORUM_LOCKED) ? $images['post_locked'] : $images['post_new'];
|
|
|
|
|
2001-08-15 16:15:26 +00:00
|
|
|
//
|
|
|
|
// Censor topic title
|
|
|
|
//
|
|
|
|
if( count($orig_word) )
|
|
|
|
{
|
|
|
|
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
|
|
|
|
}
|
|
|
|
|
2001-05-03 22:10:23 +00:00
|
|
|
$template->assign_vars(array(
|
2001-05-24 20:10:34 +00:00
|
|
|
"FORUM_NAME" => $forum_name,
|
|
|
|
"TOPIC_TITLE" => $topic_title,
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-08-02 08:36:38 +00:00
|
|
|
"L_POSTED" => $lang['Posted'],
|
|
|
|
"L_POST_SUBJECT" => $lang['Post_subject'],
|
2001-07-05 17:39:38 +00:00
|
|
|
"L_VIEW_NEXT_TOPIC" => $lang['View_next_topic'],
|
|
|
|
"L_VIEW_PREVIOUS_TOPIC" => $lang['View_previous_topic'],
|
|
|
|
|
2001-08-02 08:36:38 +00:00
|
|
|
"IMG_POST" => $post_img,
|
|
|
|
"IMG_REPLY" => $reply_img,
|
2001-07-14 01:19:21 +00:00
|
|
|
|
2001-05-03 22:10:23 +00:00
|
|
|
"U_VIEW_FORUM" => $view_forum_url,
|
2001-05-27 22:08:47 +00:00
|
|
|
"U_VIEW_OLDER_TOPIC" => $view_prev_topic_url,
|
|
|
|
"U_VIEW_NEWER_TOPIC" => $view_next_topic_url,
|
2001-07-05 17:39:38 +00:00
|
|
|
"U_POST_NEW_TOPIC" => $new_topic_url,
|
2001-07-06 00:03:51 +00:00
|
|
|
"U_POST_REPLY_TOPIC" => $reply_topic_url)
|
|
|
|
);
|
2001-05-03 22:10:23 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
//
|
|
|
|
// Does this topic contain a voting element?
|
|
|
|
//
|
|
|
|
if( !empty($forum_row['topic_vote']) )
|
|
|
|
{
|
2001-09-07 22:56:50 +00:00
|
|
|
$sql = "SELECT vd.vote_id, vd.vote_text, vd.vote_start, vd.vote_length, vr.vote_option_id, vr.vote_option_text, vr.vote_result
|
|
|
|
FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
|
|
|
|
WHERE vd.topic_id = $topic_id
|
|
|
|
AND vr.vote_id = vd.vote_id
|
2001-09-06 00:29:07 +00:00
|
|
|
ORDER BY vr.vote_option_id ASC";
|
|
|
|
if( !$result = $db->sql_query($sql) )
|
|
|
|
{
|
|
|
|
message_die(GENERAL_ERROR, "Couldn't obtain vote data for this topic", "", __LINE__, __FILE__, $sql);
|
|
|
|
}
|
|
|
|
|
|
|
|
if( $vote_options = $db->sql_numrows($result) )
|
|
|
|
{
|
|
|
|
$vote_info = $db->sql_fetchrowset($result);
|
|
|
|
|
|
|
|
$vote_id = $vote_info[0]['vote_id'];
|
|
|
|
$vote_title = $vote_info[0]['vote_text'];
|
|
|
|
|
2001-09-07 22:56:50 +00:00
|
|
|
$sql = "SELECT vote_id
|
|
|
|
FROM " . VOTE_USERS_TABLE . "
|
|
|
|
WHERE vote_id = $vote_id
|
2001-09-06 00:29:07 +00:00
|
|
|
AND vote_user_id = " . $userdata['user_id'];
|
|
|
|
if( !$result = $db->sql_query($sql) )
|
|
|
|
{
|
|
|
|
message_die(GENERAL_ERROR, "Couldn't obtain user vote data for this topic", "", __LINE__, __FILE__, $sql);
|
|
|
|
}
|
|
|
|
|
|
|
|
$user_voted = ( $db->sql_numrows($result) ) ? TRUE : 0;
|
|
|
|
|
|
|
|
if( isset($HTTP_GET_VARS['vote']) || isset($HTTP_POST_VARS['vote']) )
|
|
|
|
{
|
|
|
|
$view_result = ( ( ( isset($HTTP_GET_VARS['vote']) ) ? $HTTP_GET_VARS['vote'] : $HTTP_POST_VARS['vote'] ) == "viewresult" ) ? TRUE : 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$view_result = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$poll_expired = ( $vote_info[0]['vote_length'] ) ? ( ( $vote_info[0]['vote_start'] + $vote_info[0]['vote_length'] < time() ) ? TRUE : 0 ) : 0;
|
|
|
|
|
|
|
|
if( $user_voted || $view_result || $poll_expired || !$is_auth['auth_vote'] )
|
|
|
|
{
|
|
|
|
|
|
|
|
$template->set_filenames(array(
|
|
|
|
"pollbox" => "viewtopic_poll_result.tpl")
|
|
|
|
);
|
|
|
|
|
|
|
|
$vote_results_sum = 0;
|
|
|
|
|
|
|
|
for($i = 0; $i < $vote_options; $i++)
|
|
|
|
{
|
|
|
|
$vote_results_sum += $vote_info[$i]['vote_result'];
|
|
|
|
}
|
|
|
|
|
|
|
|
$vote_graphic = 0;
|
|
|
|
$vote_graphic_max = count($images['voting_graphic']);
|
|
|
|
|
|
|
|
for($i = 0; $i < $vote_options; $i++)
|
|
|
|
{
|
|
|
|
$vote_percent = ( $vote_results_sum > 0 ) ? $vote_info[$i]['vote_result'] / $vote_results_sum : 0;
|
|
|
|
$vote_graphic_length = round($vote_percent * $board_config['vote_graphic_length']);
|
|
|
|
|
|
|
|
$vote_graphic_img = $images['voting_graphic'][$vote_graphic];
|
|
|
|
$vote_graphic = ($vote_graphic < $vote_graphic_max - 1) ? $vote_graphic + 1 : 0;
|
2001-09-07 22:56:50 +00:00
|
|
|
|
2001-09-07 00:23:40 +00:00
|
|
|
if( count($orig_word) )
|
|
|
|
{
|
|
|
|
$vote_info[$i]['vote_option_text'] = preg_replace($orig_word, $replacement_word, $vote_info[$i]['vote_option_text']);
|
|
|
|
}
|
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$template->assign_block_vars("poll_option", array(
|
2001-09-07 22:56:50 +00:00
|
|
|
"POLL_OPTION_CAPTION" => $vote_info[$i]['vote_option_text'],
|
|
|
|
"POLL_OPTION_RESULT" => $vote_info[$i]['vote_result'],
|
|
|
|
"POLL_OPTION_PERCENT" => sprintf("%.1d%%", ($vote_percent * 100)),
|
2001-09-06 00:29:07 +00:00
|
|
|
|
2001-09-07 22:56:50 +00:00
|
|
|
"POLL_OPTION_IMG" => $vote_graphic_img,
|
2001-09-06 00:29:07 +00:00
|
|
|
"POLL_OPTION_IMG_WIDTH" => $vote_graphic_length)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
$template->assign_vars(array(
|
|
|
|
"TOTAL_VOTES" => $vote_results_sum)
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$template->set_filenames(array(
|
|
|
|
"pollbox" => "viewtopic_poll_ballot.tpl")
|
|
|
|
);
|
|
|
|
|
|
|
|
for($i = 0; $i < $vote_options; $i++)
|
|
|
|
{
|
2001-09-07 00:23:40 +00:00
|
|
|
if( count($orig_word) )
|
|
|
|
{
|
|
|
|
$vote_info[$i]['vote_option_text'] = preg_replace($orig_word, $replacement_word, $vote_info[$i]['vote_option_text']);
|
|
|
|
}
|
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$template->assign_block_vars("poll_option", array(
|
2001-09-07 22:56:50 +00:00
|
|
|
"POLL_OPTION_ID" => $vote_info[$i]['vote_option_id'],
|
2001-09-06 00:29:07 +00:00
|
|
|
"POLL_OPTION_CAPTION" => $vote_info[$i]['vote_option_text'])
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
$template->assign_vars(array(
|
|
|
|
"L_SUBMIT_VOTE" => $lang['Submit_vote'],
|
|
|
|
"L_VIEW_RESULTS" => $lang['View_results'],
|
2001-09-07 22:56:50 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
"U_VIEW_RESULTS" => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order&vote=viewresult"))
|
|
|
|
);
|
|
|
|
|
|
|
|
$s_hidden_fields = '<input type="hidden" name="topic_id" value="' . $topic_id . '"><input type="hidden" name="mode" value="vote">';
|
|
|
|
}
|
|
|
|
|
2001-09-07 00:23:40 +00:00
|
|
|
if( count($orig_word) )
|
|
|
|
{
|
|
|
|
$vote_title = preg_replace($orig_word, $replacement_word, $vote_title);
|
|
|
|
}
|
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$template->assign_vars(array(
|
2001-09-07 22:56:50 +00:00
|
|
|
"POLL_QUESTION" => $vote_title,
|
|
|
|
|
|
|
|
"S_HIDDEN_FIELDS" => $s_hidden_fields,
|
2001-09-06 00:29:07 +00:00
|
|
|
"S_VOTE_ACTION" => append_sid("posting.$phpEx?" . POST_TOPIC_URL . "=$topic_id"))
|
|
|
|
);
|
|
|
|
|
|
|
|
$template->assign_var_from_handle("POLL_DISPLAY", "pollbox");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-05-24 20:10:34 +00:00
|
|
|
//
|
2001-05-27 22:08:47 +00:00
|
|
|
// Update the topic view counter
|
2001-05-24 20:10:34 +00:00
|
|
|
//
|
2001-07-05 17:39:38 +00:00
|
|
|
$sql = "UPDATE " . TOPICS_TABLE . "
|
2001-06-03 23:10:07 +00:00
|
|
|
SET topic_views = topic_views + 1
|
2001-05-27 22:08:47 +00:00
|
|
|
WHERE topic_id = $topic_id";
|
|
|
|
if(!$update_result = $db->sql_query($sql))
|
|
|
|
{
|
2001-07-03 22:53:31 +00:00
|
|
|
message_die(GENERAL_ERROR, "Couldn't update topic views.", "", __LINE__, __FILE__, $sql);
|
2001-05-27 22:08:47 +00:00
|
|
|
}
|
2001-05-24 20:10:34 +00:00
|
|
|
|
2001-05-03 22:10:23 +00:00
|
|
|
//
|
|
|
|
// Okay, let's do the loop, yeah come on baby let's do the loop
|
|
|
|
// and it goes like this ...
|
|
|
|
//
|
2001-07-05 17:39:38 +00:00
|
|
|
for($i = 0; $i < $total_posts; $i++)
|
2001-03-04 04:17:02 +00:00
|
|
|
{
|
2001-07-05 17:39:38 +00:00
|
|
|
$poster_id = $postrow[$i]['user_id'];
|
2001-09-06 00:29:07 +00:00
|
|
|
$poster = $postrow[$i]['username'];
|
2001-07-05 17:39:38 +00:00
|
|
|
|
|
|
|
$post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['default_timezone']);
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-07-05 17:39:38 +00:00
|
|
|
$poster_posts = ($postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Posts'] . ": " . $postrow[$i]['user_posts'] : "";
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$poster_from = ($postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS) ? $lang['From'] . ": " . $postrow[$i]['user_from'] : "";
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-07-05 17:39:38 +00:00
|
|
|
$poster_joined = ($postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Joined'] . ": " . create_date($board_config['default_dateformat'], $postrow[$i]['user_regdate'], $board_config['default_timezone']) : "";
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-07-14 01:19:21 +00:00
|
|
|
if($postrow[$i]['user_avatar'] != "" && $poster_id != ANONYMOUS)
|
2001-07-05 17:39:38 +00:00
|
|
|
{
|
2001-09-06 00:29:07 +00:00
|
|
|
$poster_avatar = (eregi("http", $postrow[$i]['user_avatar']) && $board_config['allow_avatar_remote']) ? "<br /><img src=\"" . $postrow[$i]['user_avatar'] . "\"><br />" : "<br /><img src=\"" . $board_config['avatar_path'] . "/" . $postrow[$i]['user_avatar'] . "\" alt=\"\" /><br />";
|
2001-07-05 17:39:38 +00:00
|
|
|
}
|
2001-07-06 00:03:51 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
$poster_avatar = "";
|
|
|
|
}
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-07-05 17:39:38 +00:00
|
|
|
//
|
|
|
|
// Generate ranks
|
|
|
|
//
|
2001-07-10 22:32:39 +00:00
|
|
|
if( $postrow[$i]['user_id'] == ANONYMOUS )
|
2001-04-02 14:36:36 +00:00
|
|
|
{
|
2001-07-05 17:39:38 +00:00
|
|
|
$poster_rank = "";
|
|
|
|
$rank_image = "";
|
|
|
|
}
|
|
|
|
else if( $postrow[$i]['user_rank'] )
|
|
|
|
{
|
|
|
|
for($j = 0; $j < count($ranksrow); $j++)
|
2001-04-02 14:36:36 +00:00
|
|
|
{
|
2001-07-06 00:03:51 +00:00
|
|
|
if($postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'])
|
2001-04-02 14:36:36 +00:00
|
|
|
{
|
2001-09-06 00:29:07 +00:00
|
|
|
$poster_rank = $ranksrow[$j]['rank_title'];
|
|
|
|
$rank_image = ($ranksrow[$j]['rank_image']) ? "<img src=\"" . $ranksrow[$j]['rank_image'] . "\"><br />" : "";
|
2001-04-02 14:36:36 +00:00
|
|
|
}
|
|
|
|
}
|
2001-06-05 21:15:19 +00:00
|
|
|
}
|
2001-08-02 08:36:38 +00:00
|
|
|
else
|
2001-06-05 21:15:19 +00:00
|
|
|
{
|
2001-07-05 17:39:38 +00:00
|
|
|
for($j = 0; $j < count($ranksrow); $j++)
|
2001-04-02 14:36:36 +00:00
|
|
|
{
|
2001-07-06 00:03:51 +00:00
|
|
|
if($postrow[$i]['user_posts'] > $ranksrow[$j]['rank_min'] && $postrow[$i]['user_posts'] < $ranksrow[$j]['rank_max'] && !$ranksrow[$j]['rank_special'])
|
2001-05-13 16:02:30 +00:00
|
|
|
{
|
2001-09-06 00:29:07 +00:00
|
|
|
$poster_rank = $ranksrow[$j]['rank_title'];
|
|
|
|
$rank_image = ($ranksrow[$j]['rank_image']) ? "<img src=\"" . $ranksrow[$j]['rank_image'] . "\"><br />" : "";
|
2001-05-13 16:02:30 +00:00
|
|
|
}
|
2001-04-02 14:36:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-07-05 17:39:38 +00:00
|
|
|
//
|
2001-06-11 00:58:08 +00:00
|
|
|
// Handle anon users posting with usernames
|
2001-07-05 17:39:38 +00:00
|
|
|
//
|
|
|
|
if($poster_id == ANONYMOUS && $postrow[$i]['post_username'] != '')
|
2001-06-11 00:58:08 +00:00
|
|
|
{
|
2001-09-06 00:29:07 +00:00
|
|
|
$poster = $postrow[$i]['post_username'];
|
2001-06-11 00:58:08 +00:00
|
|
|
$poster_rank = $lang['Guest'];
|
|
|
|
}
|
|
|
|
|
2001-07-09 23:31:33 +00:00
|
|
|
if($poster_id != ANONYMOUS)
|
|
|
|
{
|
2001-07-31 18:37:25 +00:00
|
|
|
$profile_img = "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id") . "\"><img src=\"" . $images['icon_profile'] . "\" alt=\"" . $lang['Read_profile'] . " $poster\" border=\"0\" /></a>";
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-07-31 18:37:25 +00:00
|
|
|
$pm_img = "<a href=\"" . append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=$poster_id") . "\"><img src=\"". $images['icon_pm'] . "\" alt=\"" . $lang['Private_messaging'] . "\" border=\"0\" /></a>";
|
2001-07-05 17:39:38 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$email_addr = str_replace("@", " at ", $postrow[$i]['user_email']);
|
2001-08-18 12:38:05 +00:00
|
|
|
$email_img = ($postrow[$i]['user_viewemail']) ? "<a href=\"mailto:$email_addr\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . " $poster\" border=\"0\" /></a>" : "";
|
2001-06-17 23:53:04 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$www_img = ($postrow[$i]['user_website']) ? "<a href=\"" . $postrow[$i]['user_website'] . "\" target=\"_userwww\"><img src=\"" . $images['icon_www'] . "\" alt=\"" . $lang['Visit_website'] . "\" border=\"0\" /></a>" : "";
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-07-09 23:31:33 +00:00
|
|
|
if($postrow[$i]['user_icq'])
|
|
|
|
{
|
2001-09-06 00:29:07 +00:00
|
|
|
$icq_status_img = "<a href=\"http://wwp.icq.com/" . $postrow[$i]['user_icq'] . "#pager\"><img src=\"http://online.mirabilis.com/scripts/online.dll?icq=" . $postrow[$i]['user_icq'] . "&img=5\" border=\"0\" /></a>";
|
2001-03-09 14:04:48 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$icq_add_img = "<a href=\"http://wwp.icq.com/scripts/search.dll?to=" . $postrow[$i]['user_icq'] . "\"><img src=\"" . $images['icon_icq'] . "\" alt=\"" . $lang['ICQ'] . "\" border=\"0\" /></a>";
|
2001-07-09 23:31:33 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$icq_status_img = "";
|
|
|
|
$icq_add_img = "";
|
|
|
|
}
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-08-09 22:21:55 +00:00
|
|
|
$aim_img = ($postrow[$i]['user_aim']) ? "<a href=\"aim:goim?screenname=" . stripslashes($postrow[$i]['user_aim']) . "&message=Hello+Are+you+there?\"><img src=\"" . $images['icon_aim'] . "\" border=\"0\" alt=\"" . $lang['AIM'] . "\" /></a>" : "";
|
2001-07-09 23:31:33 +00:00
|
|
|
|
2001-09-07 00:23:40 +00:00
|
|
|
$msn_img = ($postrow[$i]['user_msnm']) ? "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id") . "\"><img src=\"" . $images['icon_msnm'] . "\" border=\"0\" alt=\"" . $lang['MSNM'] . "\" /></a>" : "";
|
2001-07-09 23:31:33 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$yim_img = ($postrow[$i]['user_yim']) ? "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=" . $postrow[$i]['user_yim'] . "&.src=pg\"><img src=\"" . $images['icon_yim'] . "\" border=\"0\" alt=\"" . $lang['YIM'] . "\" /></a>" : "";
|
2001-03-09 14:04:48 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-07-09 23:31:33 +00:00
|
|
|
$profile_img = "";
|
|
|
|
$pm_img = "";
|
|
|
|
$email_img = "";
|
|
|
|
$www_img = "";
|
2001-03-09 14:04:48 +00:00
|
|
|
$icq_status_img = "";
|
|
|
|
$icq_add_img = "";
|
2001-07-09 23:31:33 +00:00
|
|
|
$aim_img = "";
|
|
|
|
$msn_img = "";
|
|
|
|
$yim_img = "";
|
2001-03-09 14:04:48 +00:00
|
|
|
}
|
2001-05-16 06:45:44 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$quote_img = "<a href=\"" . append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_quote'] . "\" alt=\"" . $lang['Reply_with_quote'] ."\" border=\"0\" /></a>";
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$search_img = "<a href=\"" . append_sid("search.$phpEx?a=" . urlencode($poster) . "&f=all&b=0&d=DESC&c=100&dosearch=1") . "\"><img src=\"" . $images['icon_search'] . "\" border=\"0\" /></a>";
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
if( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] )
|
|
|
|
{
|
|
|
|
$edit_img = "<a href=\"" . append_sid("posting.$phpEx?mode=editpost&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_edit'] . "\" alt=\"" . $lang['Edit_delete_post'] . "\" border=\"0\" /></a>";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$edit_img = "";
|
|
|
|
}
|
2001-05-16 06:45:44 +00:00
|
|
|
|
2001-07-16 20:07:20 +00:00
|
|
|
if( $is_auth['auth_mod'] )
|
2001-03-09 14:04:48 +00:00
|
|
|
{
|
2001-09-07 22:56:50 +00:00
|
|
|
$ip_img = "<a href=\"" . append_sid("modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_TOPIC_URL . "=" . $topic_id) . "\"><img src=\"" . $images['icon_ip'] . "\" alt=\"" . $lang['View_IP'] . "\" border=\"0\" /></a>";
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-07-31 18:37:25 +00:00
|
|
|
$delpost_img = "<a href=\"" . append_sid("topicadmin.$phpEx?mode=delpost&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_delpost'] . "\" alt=\"" . $lang['Delete_post'] . "\" border=\"0\" /></a>";
|
2001-03-09 14:04:48 +00:00
|
|
|
}
|
2001-09-06 00:29:07 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
$ip_img = "";
|
|
|
|
$delpost_img = "";
|
|
|
|
}
|
2001-09-07 22:56:50 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$message = $postrow[$i]['post_text'];
|
|
|
|
$post_subject = ( $postrow[$i]['post_subject'] != "" ) ? $postrow[$i]['post_subject'] : $topic_title;
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-07-05 17:39:38 +00:00
|
|
|
$bbcode_uid = $postrow[$i]['bbcode_uid'];
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
$user_sig = $postrow[$i]['user_sig'];
|
2001-03-23 01:39:26 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
//
|
|
|
|
// If the board has HTML off but the post has HTML
|
|
|
|
// on then we process it, else leave it alone
|
|
|
|
//
|
2001-09-07 22:56:50 +00:00
|
|
|
if( !$board_config['allow_html'] )
|
2001-03-09 14:04:48 +00:00
|
|
|
{
|
2001-09-07 00:23:40 +00:00
|
|
|
if( $user_sig != "" && $postrow[$i]['enable_sig'] )
|
2001-07-15 15:45:09 +00:00
|
|
|
{
|
2001-09-06 00:29:07 +00:00
|
|
|
$user_sig = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $user_sig);
|
|
|
|
}
|
|
|
|
|
|
|
|
if( $postrow[$i]['enable_html'] )
|
|
|
|
{
|
|
|
|
$message = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $message);
|
2001-07-15 15:45:09 +00:00
|
|
|
}
|
2001-03-09 14:04:48 +00:00
|
|
|
}
|
2001-07-05 17:39:38 +00:00
|
|
|
|
2001-09-06 00:29:07 +00:00
|
|
|
if( $board_config['allow_bbcode'] && $bbcode_uid != "" )
|
2001-03-09 14:04:48 +00:00
|
|
|
{
|
2001-09-07 00:23:40 +00:00
|
|
|
if( $user_sig != "" && $postrow[$i]['enable_sig'] )
|
2001-07-15 15:45:09 +00:00
|
|
|
{
|
|
|
|
$sig_uid = make_bbcode_uid();
|
|
|
|
$user_sig = bbencode_first_pass($user_sig, $sig_uid);
|
|
|
|
$user_sig = bbencode_second_pass($user_sig, $sig_uid);
|
|
|
|
}
|
2001-05-16 06:45:44 +00:00
|
|
|
|
2001-08-10 00:23:39 +00:00
|
|
|
$message = bbencode_second_pass($message, $bbcode_uid);
|
2001-08-10 22:00:12 +00:00
|
|
|
}
|
2001-09-06 00:29:07 +00:00
|
|
|
else if( !$board_config['allow_bbcode'] && $bbcode != "" )
|
2001-08-10 22:00:12 +00:00
|
|
|
{
|
|
|
|
$message = preg_replace("/\:[0-9a-z\:]+\]/si", "]", $message);
|
2001-03-09 14:04:48 +00:00
|
|
|
}
|
2001-05-16 06:45:44 +00:00
|
|
|
|
2001-09-07 00:23:40 +00:00
|
|
|
if( $postrow[$i]['enable_sig'] )
|
|
|
|
{
|
|
|
|
$message .= "<br /><br />_________________<br />" . $user_sig;
|
|
|
|
}
|
2001-08-15 16:00:57 +00:00
|
|
|
|
|
|
|
if( count($orig_word) )
|
|
|
|
{
|
2001-08-15 16:15:26 +00:00
|
|
|
$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
|
2001-08-15 16:00:57 +00:00
|
|
|
$message = preg_replace($orig_word, $replacement_word, $message);
|
|
|
|
}
|
2001-07-15 15:45:09 +00:00
|
|
|
|
2001-08-17 00:32:43 +00:00
|
|
|
$message = make_clickable($message);
|
|
|
|
|
2001-08-09 22:21:55 +00:00
|
|
|
if($board_config['allow_smilies'] && $postrow[$i]['enable_smilies'])
|
2001-07-24 17:34:40 +00:00
|
|
|
{
|
2001-08-08 19:42:45 +00:00
|
|
|
$message = smilies_pass($message);
|
2001-07-24 17:34:40 +00:00
|
|
|
}
|
|
|
|
|
2001-08-15 16:00:57 +00:00
|
|
|
$message = str_replace("\n", "<br />", $message);
|
|
|
|
|
2001-07-15 15:45:09 +00:00
|
|
|
//
|
|
|
|
// Editing information
|
|
|
|
//
|
|
|
|
if($postrow[$i]['post_edit_count'])
|
|
|
|
{
|
2001-07-20 15:16:03 +00:00
|
|
|
$l_edit_total = ($postrow[$i]['post_edit_count'] == 1) ? $lang['time_in_total'] : $lang['times_in_total'];
|
|
|
|
|
|
|
|
$message = $message . "<br /><br /><font size=\"-2\">" . $lang['Edited_by'] . " " . $poster . " " . $lang['on'] . " " . create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['default_timezone']) . ", " . $lang['edited'] . " " . $postrow[$i]['post_edit_count'] . " $l_edit_total</font>";
|
2001-07-15 15:45:09 +00:00
|
|
|
}
|
|
|
|
|
2001-05-27 22:08:47 +00:00
|
|
|
//
|
|
|
|
// Again this will be handled by the templating
|
|
|
|
// code at some point
|
|
|
|
//
|
2001-08-09 22:21:55 +00:00
|
|
|
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
|
2001-07-31 18:37:25 +00:00
|
|
|
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
|
2001-05-16 06:45:44 +00:00
|
|
|
|
2001-05-03 22:10:23 +00:00
|
|
|
$template->assign_block_vars("postrow", array(
|
2001-08-09 22:21:55 +00:00
|
|
|
"ROW_COLOR" => "#" . $row_color,
|
2001-08-02 08:36:38 +00:00
|
|
|
"ROW_CLASS" => $row_class,
|
2001-03-17 00:46:26 +00:00
|
|
|
"POSTER_NAME" => $poster,
|
|
|
|
"POSTER_RANK" => $poster_rank,
|
|
|
|
"RANK_IMAGE" => $rank_image,
|
|
|
|
"POSTER_JOINED" => $poster_joined,
|
|
|
|
"POSTER_POSTS" => $poster_posts,
|
|
|
|
"POSTER_FROM" => $poster_from,
|
2001-06-03 23:10:07 +00:00
|
|
|
"POSTER_AVATAR" => $poster_avatar,
|
2001-03-17 00:46:26 +00:00
|
|
|
"POST_DATE" => $post_date,
|
2001-05-27 03:11:27 +00:00
|
|
|
"POST_SUBJECT" => $post_subject,
|
2001-03-17 00:46:26 +00:00
|
|
|
"MESSAGE" => $message,
|
|
|
|
"PROFILE_IMG" => $profile_img,
|
2001-08-02 08:36:38 +00:00
|
|
|
"SEARCH_IMG" => $search_img,
|
2001-06-17 23:53:04 +00:00
|
|
|
"PM_IMG" => $pm_img,
|
2001-03-17 00:46:26 +00:00
|
|
|
"EMAIL_IMG" => $email_img,
|
|
|
|
"WWW_IMG" => $www_img,
|
|
|
|
"ICQ_STATUS_IMG" => $icq_status_img,
|
|
|
|
"ICQ_ADD_IMG" => $icq_add_img,
|
|
|
|
"AIM_IMG" => $aim_img,
|
|
|
|
"MSN_IMG" => $msn_img,
|
|
|
|
"YIM_IMG" => $yim_img,
|
|
|
|
"EDIT_IMG" => $edit_img,
|
|
|
|
"QUOTE_IMG" => $quote_img,
|
|
|
|
"PMSG_IMG" => $pmsg_img,
|
|
|
|
"IP_IMG" => $ip_img,
|
2001-05-06 17:39:01 +00:00
|
|
|
"DELPOST_IMG" => $delpost_img,
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-07-05 17:39:38 +00:00
|
|
|
"U_POST_ID" => $postrow[$i]['post_id'])
|
|
|
|
);
|
2001-03-04 04:17:02 +00:00
|
|
|
}
|
2001-03-05 01:40:39 +00:00
|
|
|
|
2001-07-08 21:42:43 +00:00
|
|
|
//
|
|
|
|
// User authorisation levels output
|
|
|
|
//
|
|
|
|
$s_auth_can = $lang['You'] . " " . ( ($is_auth['auth_read']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['read_posts'] . "<br />";
|
|
|
|
$s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_post']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['post_topics'] . "<br />";
|
|
|
|
$s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_reply']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['reply_posts'] . "<br />";
|
|
|
|
$s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_edit']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['edit_posts'] . "<br />";
|
|
|
|
$s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_delete']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['delete_posts'] . "<br />";
|
2001-08-09 22:21:55 +00:00
|
|
|
/*
|
|
|
|
$s_auth_read_img = "<img src=\"" . ( ($is_auth['auth_read']) ? $image['auth_can_read'] : $image['auth_cannot_read'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_read']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['read_posts'] . "\" />";
|
|
|
|
$s_auth_post_img = "<img src=\"" . ( ($is_auth['auth_post']) ? $image['auth_can_post'] : $image['auth_cannot_post'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_post']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['post_topics'] . "\" />";
|
|
|
|
$s_auth_reply_img = "<img src=\"" . ( ($is_auth['auth_reply']) ? $image['auth_can_reply'] : $image['auth_cannot_reply'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_reply']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['reply_posts'] . "\" />";
|
|
|
|
$s_auth_edit_img = "<img src=\"" . ( ($is_auth['auth_edit']) ? $image['auth_can_edit'] : $image['auth_cannot_edit'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_edit']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['edit_posts'] . "\" />";
|
|
|
|
$s_auth_delete_img = "<img src=\"" . ( ($is_auth['auth_delete']) ? $image['auth_can_delete'] : $image['auth_cannot_delete'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_delete']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['delete_posts'] . "\" />";
|
|
|
|
*/
|
2001-05-31 15:39:59 +00:00
|
|
|
|
2001-07-16 20:07:20 +00:00
|
|
|
if( $is_auth['auth_mod'] )
|
2001-06-05 21:15:19 +00:00
|
|
|
{
|
2001-07-09 23:31:33 +00:00
|
|
|
$s_auth_can .= $lang['You'] . " " . $lang['can'] . " <a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">" . $lang['moderate_forum'] . "</a><br />";
|
|
|
|
|
2001-08-09 22:21:55 +00:00
|
|
|
// $s_auth_mod_img = "<a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\"><img src=\"" . $images['auth_mod'] . "\" alt=\"" . $lang['You'] . " " . $lang['can'] . " " . $lang['moderate_forum'] . "\" border=\"0\"/></a>";
|
|
|
|
|
2001-07-31 18:37:25 +00:00
|
|
|
$topic_mod = "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete&quick_op=1") . "\"><img src=\"" . $images['topic_mod_delete'] . "\" alt = \"" . $lang['Delete_topic'] . "\" border=\"0\" /></a> ";
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-07-31 18:37:25 +00:00
|
|
|
$topic_mod .= "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=move&quick_op=1"). "\"><img src=\"" . $images['topic_mod_move'] . "\" alt = \"" . $lang['Move_topic'] . "\" border=\"0\" /></a> ";
|
2001-06-11 00:43:15 +00:00
|
|
|
|
2001-07-22 20:32:05 +00:00
|
|
|
if($forum_row['topic_status'] == TOPIC_UNLOCKED)
|
2001-06-05 21:15:19 +00:00
|
|
|
{
|
2001-07-31 18:37:25 +00:00
|
|
|
$topic_mod .= "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=lock&quick_op=1") . "\"><img src=\"" . $images['topic_mod_lock'] . "\" alt = \"" . $lang['Lock_topic'] . "\" border=\"0\" /></a> ";
|
2001-06-05 21:15:19 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-07-31 18:37:25 +00:00
|
|
|
$topic_mod .= "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=unlock&quick_op=1") . "\"><img src=\"" . $images['topic_mod_unlock'] . "\" alt = \"" . $lang['Unlock_topic'] . "\" border=\"0\" /></a> ";
|
2001-06-05 21:15:19 +00:00
|
|
|
}
|
2001-07-31 18:37:25 +00:00
|
|
|
$topic_mod .= "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=split") . "\"><img src=\"" . $images['topic_mod_split'] . "\" alt = \"" . $lang['Split_topic'] . "\" border=\"0\" /></a> ";
|
2001-06-05 21:15:19 +00:00
|
|
|
}
|
|
|
|
|
2001-08-14 00:29:39 +00:00
|
|
|
//
|
|
|
|
// Topic watch information
|
|
|
|
//
|
|
|
|
if($can_watch_topic)
|
|
|
|
{
|
|
|
|
if($is_watching_topic)
|
|
|
|
{
|
2001-09-07 00:23:40 +00:00
|
|
|
$s_watching_topic = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start") . "\">" . $lang['Stop_watching_topic'] . "</a>";
|
|
|
|
$s_watching_topic_img = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start") . "\"><img src=\"" . $images['Topic_un_watch'] . "\" alt=\"" . $lang['Stop_watching_topic'] . "\" border=\"0\"></a>";
|
2001-08-14 00:29:39 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-09-07 00:23:40 +00:00
|
|
|
$s_watching_topic = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start") . "\">" . $lang['Start_watching_topic'] . "</a>";
|
|
|
|
$s_watching_topic_img = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start") . "\"><img src=\"" . $images['Topic_watch'] . "\" alt=\"" . $lang['Start_watching_topic'] . "\" border=\"0\"></a>";
|
2001-08-14 00:29:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$s_watching_topic = "";
|
|
|
|
}
|
|
|
|
|
2001-05-03 22:10:23 +00:00
|
|
|
$template->assign_vars(array(
|
2001-08-09 22:21:55 +00:00
|
|
|
"PAGINATION" => generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start),
|
2001-07-03 00:33:20 +00:00
|
|
|
"ON_PAGE" => ( floor( $start / $board_config['posts_per_page'] ) + 1 ),
|
|
|
|
"TOTAL_PAGES" => ceil( $total_replies / $board_config['posts_per_page'] ),
|
2001-06-03 23:10:07 +00:00
|
|
|
|
2001-09-07 22:56:50 +00:00
|
|
|
"S_AUTH_LIST" => $s_auth_can,
|
|
|
|
"S_AUTH_READ_IMG" => $s_auth_read_img,
|
|
|
|
"S_AUTH_POST_IMG" => $s_auth_post_img,
|
|
|
|
"S_AUTH_REPLY_IMG" => $s_auth_reply_img,
|
|
|
|
"S_AUTH_EDIT_IMG" => $s_auth_edit_img,
|
2001-08-09 22:21:55 +00:00
|
|
|
"S_AUTH_MOD_IMG" => $s_auth_mod_img,
|
2001-09-07 22:56:50 +00:00
|
|
|
"S_TOPIC_ADMIN" => $topic_mod,
|
|
|
|
"S_WATCH_TOPIC" => $s_watching_topic,
|
|
|
|
"S_WATCH_TOPIC_IMG" => $s_watching_topic_img,
|
2001-05-31 15:39:59 +00:00
|
|
|
|
2001-05-28 15:25:23 +00:00
|
|
|
"L_OF" => $lang['of'],
|
|
|
|
"L_PAGE" => $lang['Page'],
|
|
|
|
"L_GOTO_PAGE" => $lang['Goto_page'])
|
|
|
|
);
|
2001-03-17 00:46:26 +00:00
|
|
|
|
|
|
|
$template->pparse("body");
|
2001-02-17 08:37:32 +00:00
|
|
|
|
2001-07-13 16:14:37 +00:00
|
|
|
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
|
2001-02-17 08:37:32 +00:00
|
|
|
|
2001-08-15 01:46:27 +00:00
|
|
|
?>
|