aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/index.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-10-20 19:19:07 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-10-20 19:19:07 +0000
commit0e9f0ac4ecc636336603cc6932ce21a550c7087e (patch)
treefbcfca6602b37f80a51fba1d459f94b3d93ca08f /phpBB/index.php
parent4887cf1e49daa80a0736d753589c9995d7ddbd4b (diff)
downloadforums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.tar
forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.tar.gz
forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.tar.bz2
forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.tar.xz
forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.zip
Mostly changes to turn userdata into user->data, lang into user->lang + bitstring 2nd format + inheritance for permission admin and various other updates/fixes/changes ... note that user->lang & user->theme isn't final
git-svn-id: file:///svn/phpbb/trunk@2958 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/index.php')
-rw-r--r--phpBB/index.php78
1 files changed, 39 insertions, 39 deletions
diff --git a/phpBB/index.php b/phpBB/index.php
index 087ad7b4b7..a69ca0d71f 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -37,9 +37,9 @@ else
}
// Start session management
-$userdata = $session->start();
-$auth->acl($userdata);
-$user = new user($userdata);
+$user->start();
+$user->setup();
+$auth->acl($user->data);
// End session management
// Handle marking posts
@@ -54,14 +54,14 @@ if ($mark_read == 'forums')
'META' => '<meta http-equiv="refresh" content="3;url=' . "index.$phpEx$SID" . '">')
);
- $message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . "index.$phpEx$SID" . '">', '</a> ');
+ $message = $user->lang['Forums_marked_read'] . '<br /><br />' . sprintf($user->lang['Click_return_index'], '<a href="' . "index.$phpEx$SID" . '">', '</a> ');
message_die(MESSAGE, $message);
}
// End handle marking posts
// Topic/forum marked read info
-$mark_topics = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t'])) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t'])) : array();
-$mark_forums = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f'])) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f'])) : array();
+$mark_topics = (isset($_COOKIE[$board_config['cookie_name'] . '_t'])) ? unserialize(stripslashes($_COOKIE[$board_config['cookie_name'] . '_t'])) : array();
+$mark_forums = (isset($_COOKIE[$board_config['cookie_name'] . '_f'])) ? unserialize(stripslashes($_COOKIE[$board_config['cookie_name'] . '_f'])) : array();
// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
$total_users = $board_config['num_users'];
@@ -70,15 +70,15 @@ $newest_uid = $board_config['newest_user_id'];
if ($total_users == 0)
{
- $l_total_user_s = $lang['Registered_users_zero_total'];
+ $l_total_user_s = $user->lang['Registered_users_zero_total'];
}
else if ($total_users == 1)
{
- $l_total_user_s = $lang['Registered_user_total'];
+ $l_total_user_s = $user->lang['Registered_user_total'];
}
else
{
- $l_total_user_s = $lang['Registered_users_total'];
+ $l_total_user_s = $user->lang['Registered_users_total'];
}
// Forum moderators ... a static template var could allow us
@@ -117,7 +117,7 @@ else
if (!$auth->acl_get('f_list', $cat_id))
{
// TODO: Deal with hidden categories
- message_die(ERROR, $lang['Category_not_exist']);
+ message_die(ERROR, $user->lang['Category_not_exist']);
}
// NOTE: make sure that categories post count is set to 0
@@ -147,7 +147,7 @@ else
FROM ' . FORUMS_TABLE . ' f
LEFT JOIN ' . USERS_TABLE . ' u ON f.forum_last_poster_id = u.user_id
WHERE f.left_id BETWEEN ' . $catrow['left_id'] . ' AND ' . $catrow['right_id'] . '
- OR ' . $catrow['left_id'] . ' BETWEEN f.left_id AND f.right_id
+ OR ' . $catrow['left_id'] . ' BETWEEN f.left_id AND f.right_id
ORDER BY f.left_id';
}
}
@@ -205,44 +205,44 @@ include($phpbb_root_path . 'includes/forums_display.' . $phpEx);
if ($total_posts == 0)
{
- $l_total_post_s = $lang['Posted_articles_zero_total'];
+ $l_total_post_s = $user->lang['Posted_articles_zero_total'];
}
else if ($total_posts == 1)
{
- $l_total_post_s = $lang['Posted_article_total'];
+ $l_total_post_s = $user->lang['Posted_article_total'];
}
else
{
- $l_total_post_s = $lang['Posted_articles_total'];
+ $l_total_post_s = $user->lang['Posted_articles_total'];
}
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
- 'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="profile.' . $phpEx . $SID . '&amp;mode=viewprofile&amp;u=' . $newest_uid . '">', $newest_user, '</a>'),
-
- 'FORUM_IMG' => create_img($theme['forum'], $lang['No_new_posts']),
- 'FORUM_NEW_IMG' => create_img($theme['forum_new'], $lang['New_posts']),
- 'FORUM_LOCKED_IMG' => create_img($theme['forum_locked'], $lang['No_new_posts_locked']),
-
- 'L_FORUM' => $lang['Forum'],
- 'L_TOPICS' => $lang['Topics'],
- 'L_REPLIES' => $lang['Replies'],
- 'L_VIEWS' => $lang['Views'],
- 'L_POSTS' => $lang['Posts'],
- 'L_LASTPOST' => $lang['Last_Post'],
- 'L_MODERATORS' => $lang['Moderators'],
- 'L_NO_NEW_POSTS' => $lang['No_new_posts'],
- 'L_NEW_POSTS' => $lang['New_posts'],
- 'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
- 'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
- 'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
-
- 'L_VIEW_MODERATORS' => $lang['View_moderators'],
- 'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
- 'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'],
- 'L_LEGEND' => $lang['Legend'],
- 'L_NO_FORUMS' => $lang['No_forums'],
+ 'NEWEST_USER' => sprintf($user->lang['Newest_user'], '<a href="profile.' . $phpEx . $SID . '&amp;mode=viewprofile&amp;u=' . $newest_uid . '">', $newest_user, '</a>'),
+
+ 'FORUM_IMG' => $user->img('forum', $user->lang['No_new_posts']),
+ 'FORUM_NEW_IMG' => $user->img('forum_new', $user->lang['New_posts']),
+ 'FORUM_LOCKED_IMG' => $user->img('forum_locked', $user->lang['No_new_posts_locked']),
+
+ 'L_FORUM' => $user->lang['Forum'],
+ 'L_TOPICS' => $user->lang['Topics'],
+ 'L_REPLIES' => $user->lang['Replies'],
+ 'L_VIEWS' => $user->lang['Views'],
+ 'L_POSTS' => $user->lang['Posts'],
+ 'L_LASTPOST' => $user->lang['Last_Post'],
+ 'L_MODERATORS' => $user->lang['Moderators'],
+ 'L_NO_NEW_POSTS' => $user->lang['No_new_posts'],
+ 'L_NEW_POSTS' => $user->lang['New_posts'],
+ 'L_NO_NEW_POSTS_LOCKED' => $user->lang['No_new_posts_locked'],
+ 'L_NEW_POSTS_LOCKED' => $user->lang['New_posts_locked'],
+ 'L_ONLINE_EXPLAIN' => $user->lang['Online_explain'],
+
+ 'L_VIEW_MODERATORS' => $user->lang['View_moderators'],
+ 'L_FORUM_LOCKED' => $user->lang['Forum_is_locked'],
+ 'L_MARK_FORUMS_READ' => $user->lang['Mark_all_forums'],
+ 'L_LEGEND' => $user->lang['Legend'],
+ 'L_NO_FORUMS' => $user->lang['No_forums'],
'U_MARK_READ' => "index.$phpEx$SID&amp;mark=forums")
);
@@ -265,7 +265,7 @@ foreach ($nav_forums as $row)
}
// Start output of page
-$page_title = $lang['Index'];
+$page_title = $user->lang['Index'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(