Fixed some layout issues

git-svn-id: file:///svn/phpbb/trunk@44 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-02-24 14:05:52 +00:00
parent 9f5ffef337
commit 7ee5829185

View file

@ -6,8 +6,7 @@
* copyright : (C) 2001 The phpBB Group * copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com * email : support@phpbb.com
* *
* $Id$ * $Id$ *
*
* *
***************************************************************************/ ***************************************************************************/
@ -28,9 +27,9 @@ include('common.'.$phpEx);
// If not give them a nice error page. // If not give them a nice error page.
if(isset($forum_id)) if(isset($forum_id))
{ {
$sql = "SELECT f.forum_type, f.forum_name $sql = "SELECT f.forum_type, f.forum_name
FROM ".FORUMS_TABLE." f FROM ".FORUMS_TABLE." f
WHERE forum_id = '$forum_id'"; WHERE forum_id = '$forum_id'";
} }
else else
{ {
@ -56,6 +55,7 @@ if(!$forum_row)
$forum_name = stripslashes($forum_row[0]["forum_name"]); $forum_name = stripslashes($forum_row[0]["forum_name"]);
$forum_moderators = "<a href=\"profile.$phpEx?mode=viewprofile&user_id=1\">james</a>"; $forum_moderators = "<a href=\"profile.$phpEx?mode=viewprofile&user_id=1\">james</a>";
$pagetype = "viewforum"; $pagetype = "viewforum";
$page_title = "View Forum - $forum_name"; $page_title = "View Forum - $forum_name";
include('page_header.'.$phpEx); include('page_header.'.$phpEx);
@ -70,10 +70,13 @@ if(!isset($start))
$start = 0; $start = 0;
} }
$sql = "SELECT t.*, u.username, p.post_time FROM " . TOPICS_TABLE ." t, ". USERS_TABLE. " u $sql = "SELECT t.*, u.username, p.post_time
LEFT JOIN ".POSTS_TABLE." p ON p.post_id = t.topic_last_post_id FROM " . TOPICS_TABLE ." t, ". USERS_TABLE. " u
WHERE t.forum_id = '$forum_id' AND t.topic_poster = u.user_id LEFT JOIN ".POSTS_TABLE." p ON p.post_id = t.topic_last_post_id
ORDER BY topic_time DESC LIMIT $start, $topics_per_page"; WHERE t.forum_id = '$forum_id'
AND t.topic_poster = u.user_id
ORDER BY topic_time DESC
LIMIT $start, $topics_per_page";
if(!$t_result = $db->sql_query($sql)) if(!$t_result = $db->sql_query($sql))
{ {
error_die($db, QUERY_ERROR); error_die($db, QUERY_ERROR);
@ -82,34 +85,32 @@ $total_topics = $db->sql_numrows();
if($total_topics) if($total_topics)
{ {
$topic_rowset = $db->sql_fetchrowset($t_result); $topic_rowset = $db->sql_fetchrowset($t_result);
for($x = 0; $x < $total_topics; $x++) for($x = 0; $x < $total_topics; $x++)
{ {
$topic_title = stripslashes($topic_rowset[$x]["topic_title"]); $topic_title = stripslashes($topic_rowset[$x]["topic_title"]);
$topic_id = $topic_rowset[$x]["topic_id"]; $topic_id = $topic_rowset[$x]["topic_id"];
$replies = $topic_rowset[$x]["topic_replies"]; $replies = $topic_rowset[$x]["topic_replies"];
$views = $topic_rowset[$x]["topic_views"]; $views = $topic_rowset[$x]["topic_views"];
$last_post_time = date($date_format, $topic_rowset[$x]["post_time"]); $last_post_time = date($date_format, $topic_rowset[$x]["post_time"]);
$last_post_user = $topic_rowset[$x]["username"]; $last_post_user = $topic_rowset[$x]["username"];
$folder_img = "<img src=\"images/folder.gif\">"; $folder_img = "<img src=\"images/folder.gif\">";
$template->set_var(array("FORUM_ID" => $forum_id, $template->set_var(array("FORUM_ID" => $forum_id,
"TOPIC_ID" => $topic_id, "TOPIC_ID" => $topic_id,
"FOLDER" => $folder_img, "FOLDER" => $folder_img,
"REPLIES" => $replies, "REPLIES" => $replies,
"TOPIC_TITLE" => $topic_title, "TOPIC_TITLE" => $topic_title,
"VIEWS" => $views, "VIEWS" => $views,
"LAST_POST" => $last_post_time . "<br>" . $last_post_user)); "LAST_POST" => $last_post_time . "<br>" . $last_post_user));
$template->parse("topics", "topicrow", true); $template->parse("topics", "topicrow", true);
} }
$template->pparse("output", array("topics", "body")); $template->pparse("output", array("topics", "body"));
} }
else else
{ {
error_die($db, NO_POSTS); error_die($db, NO_POSTS);
} }
include('page_tail.'.$phpEx); include('page_tail.'.$phpEx);
?> ?>