diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/config.php | 5 | ||||
-rw-r--r-- | phpBB/index.php | 55 | ||||
-rw-r--r-- | phpBB/page_tail.php | 3 |
3 files changed, 34 insertions, 29 deletions
diff --git a/phpBB/config.php b/phpBB/config.php index 99d08332e3..0310369f88 100644 --- a/phpBB/config.php +++ b/phpBB/config.php @@ -69,6 +69,9 @@ $dbname = "mydbname"; $dbuser = "imanidiot"; $dbpasswd = "imanidiotspassword"; +// Date format (needs to go into DB) +$date_format = "M d, Y h:i:s a"; + // DB table config $banlist_table = "phpbb_banlist"; $categories_table = "phpbb_categories"; @@ -89,4 +92,4 @@ $users_table = "phpbb_users"; $whosonline_table = "phpbb_whosonline"; $words_table = "phpbb_words"; -?>
\ No newline at end of file +?> diff --git a/phpBB/index.php b/phpBB/index.php index 9669bf7f75..c6e834f94b 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -70,35 +70,36 @@ if($total_rows) $template->parse("cats", "catrow", true); for($y = 0; $y < $total_forums; $y++) { - $folder_image = "<img src=\"images/folder.gif\">"; - $posts = 150; - $topics = 35; - $last_post = "05-10-2000 12:34:33pm<br>by theFinn"; - $moderators = "<a href=\"profile.$phpEx?mode=viewprofile&user_id=1\">theFinn</a>"; - if($row_color == "#DDDDDD") - { - $row_color = "#CCCCCC"; - } - else - { - $row_color = "#DDDDDD"; - } - $template->set_var(array("FOLDER" => $folder_image, - "FORUM_NAME" => stripslashes($forum_rows[$y]["forum_name"]), - "FORUM_ID" => $forum_rows[$y]["forum_id"], - "FORUM_DESC" => stripslashes($forum_rows[$y]["forum_desc"]), - "ROW_COLOR" => $row_color, - "PHPEX" => $phpEx, - "POSTS" => $posts, - "TOPICS" => $topics, - "LAST_POST" => $last_post, - "MODERATORS" => $moderators)); - $template->parse("forums", "forumrow", true); + $folder_image = "<img src=\"images/folder.gif\">"; + $posts = $forum_rows[$y]["forum_posts"]; + $topics = $forum_rows[$y]["forum_topics"]; + $last_post = $forum_rows[$y]["forum_last_post"]; + $last_post = date($date_format, $last_post); + $moderators = "<a href=\"profile.$phpEx?mode=viewprofile&user_id=1\">theFinn</a>"; + if($row_color == "#DDDDDD") + { + $row_color = "#CCCCCC"; + } + else + { + $row_color = "#DDDDDD"; + } + $template->set_var(array("FOLDER" => $folder_image, + "FORUM_NAME" => stripslashes($forum_rows[$y]["forum_name"]), + "FORUM_ID" => $forum_rows[$y]["forum_id"], + "FORUM_DESC" => stripslashes($forum_rows[$y]["forum_desc"]), + "ROW_COLOR" => $row_color, + "PHPEX" => $phpEx, + "POSTS" => $posts, + "TOPICS" => $topics, + "LAST_POST" => $last_post, + "MODERATORS" => $moderators)); + $template->parse("forums", "forumrow", true); } - $template->parse("cats", "forums", true); - $template->set_var("forums", ""); + $template->parse("cats", "forums", true); + $template->set_var("forums", ""); } - } + } } $template->pparse("output", "body"); diff --git a/phpBB/page_tail.php b/phpBB/page_tail.php index 6384f8fb76..2c9cfeb221 100644 --- a/phpBB/page_tail.php +++ b/phpBB/page_tail.php @@ -39,5 +39,6 @@ $template->set_var(array("PHPBB_VERSION" => "2.0-alpha", "ADMIN_LINK" => $admin_link)); $template->pparse("output", "overall_footer"); - +// Close our DB connection. +$db->close(); ?> |