mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-08 17:56:52 +02:00
Centralise common includes and setup
git-svn-id: file:///svn/phpbb/trunk@38 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -22,17 +22,11 @@
|
||||
*
|
||||
***************************************************************************/
|
||||
include('extension.inc');
|
||||
include('config.'.$phpEx);
|
||||
include('template.inc');
|
||||
include('functions/sessions.'.$phpEx);
|
||||
include('functions/auth.'.$phpEx);
|
||||
include('functions/functions.'.$phpEx);
|
||||
include('functions/error.'.$phpEx);
|
||||
include('db.'.$phpEx);
|
||||
include('common.'.$phpEx);
|
||||
|
||||
$total_users = get_user_count($db, $users_table);
|
||||
$total_posts = get_total_posts($db, $forums_table);
|
||||
$newest_userdata = get_newest_user($db, $users_table);
|
||||
$total_users = get_user_count($db, "");
|
||||
$total_posts = get_total_posts($db, "");
|
||||
$newest_userdata = get_newest_user($db, "");
|
||||
$newest_user = $newest_userdata["username"];
|
||||
$newest_uid = $newest_userdata["user_id"];
|
||||
$users_browsing = "4 Users";
|
||||
@@ -63,7 +57,7 @@ if($total_categories)
|
||||
|
||||
$total_forums = $db->sql_numrows($q_forums);
|
||||
$forum_rows = $db->sql_fetchrowset($q_forums);
|
||||
|
||||
|
||||
for($i = 0; $i < $total_categories; $i++)
|
||||
{
|
||||
$template->set_var(array("CAT_ID" => $category_rows[$i]["cat_id"],
|
||||
@@ -107,11 +101,13 @@ if($total_categories)
|
||||
"TOPICS" => $topics,
|
||||
"LAST_POST" => $last_post,
|
||||
"MODERATORS" => $moderators));
|
||||
|
||||
$template->parse("forums", "forumrow", true);
|
||||
} // if ... then
|
||||
} // for total forums
|
||||
$template->parse("cats", "forums", true);
|
||||
$template->set_var("forums", "");
|
||||
|
||||
} // for ... categories
|
||||
|
||||
}// if ... total_categories
|
||||
|
Reference in New Issue
Block a user