aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/index.php
diff options
context:
space:
mode:
authorJames Atkinson <thefinn@users.sourceforge.net>2001-02-22 06:10:12 +0000
committerJames Atkinson <thefinn@users.sourceforge.net>2001-02-22 06:10:12 +0000
commit8918532a1329157916e539ee84cd711fd3f267bc (patch)
tree0bfcb465225f44365a137d76a1dd077ea0a7161d /phpBB/index.php
parent658df35cd4c176916e7cd0bd766bb8c8e0cc77d1 (diff)
downloadforums-8918532a1329157916e539ee84cd711fd3f267bc.tar
forums-8918532a1329157916e539ee84cd711fd3f267bc.tar.gz
forums-8918532a1329157916e539ee84cd711fd3f267bc.tar.bz2
forums-8918532a1329157916e539ee84cd711fd3f267bc.tar.xz
forums-8918532a1329157916e539ee84cd711fd3f267bc.zip
phpBB 2 is started
git-svn-id: file:///svn/phpbb/trunk@13 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/index.php')
-rw-r--r--phpBB/index.php82
1 files changed, 81 insertions, 1 deletions
diff --git a/phpBB/index.php b/phpBB/index.php
index b4278d1182..7ed32e597e 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -1,6 +1,6 @@
<?php
/***************************************************************************
- *
+ * index.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
@@ -21,7 +21,87 @@
*
*
***************************************************************************/
+include('extension.inc');
+include('config.'.$phpEx);
+include('template.inc');
+include('functions/error.'.$phpEx);
+include('functions/sessions.'.$phpEx);
+include('functions/auth.'.$phpEx);
+include('db.'.$phpEx);
+$total_users = 10;
+$total_posts = 55668;
+$newest_user = "Dave";
+$newest_uid = 10;
+$users_browsing = "4 Users";
+$pagetype = "index";
+include('page_header.'.$phpEx);
+$template->set_block("body", "catrow", "cats");
+$template->set_block("catrow", "forumrow", "forums");
+
+$sql = "SELECT * FROM catagories ORDER BY cat_order";
+if(!$result = $db->sql_query($sql))
+{
+ error_die($db, QUERY_ERROR);
+}
+$total_rows = $db->sql_numrows();
+if($total_rows)
+{
+ $rows = $db->sql_fetchrowset($result);
+ for($x = 0; $x < $total_rows; $x++)
+ {
+
+ $template->set_var(array("CAT_ID" => $rows[$x]["cat_id"],
+ "PHP_SELF" => $PHP_SELF,
+ "CAT_DESC" => stripslashes($rows[$x]["cat_title"])));
+
+ $sub_sql = "SELECT f.* FROM forums f WHERE f.cat_id = '".$rows[$x]["cat_id"]."' ORDER BY forum_id";
+ if(!$sub_result = $db->sql_query($sub_sql))
+ {
+ error_die($db, QUERY_ERROR);
+ }
+ $total_forums = $db->sql_numrows($sub_result);
+ $forum_rows = $db->sql_fetchrowset($sub_result);
+
+ if($total_forums)
+ {
+ $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);
+ }
+ $template->parse("cats", "forums", true);
+ $template->set_var("forums", "");
+ }
+ }
+}
+$template->pparse("output", "body");
+
+
+include('page_tail.'.$phpEx);
?>