2001-02-21 07:38:38 +00:00
|
|
|
<?php
|
|
|
|
/***************************************************************************
|
|
|
|
* page_header.php
|
|
|
|
* -------------------
|
|
|
|
* begin : Saturday, Feb 13, 2001
|
|
|
|
* copyright : (C) 2001 The phpBB Group
|
|
|
|
* email : support@phpbb.com
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
*
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
***************************************************************************/
|
|
|
|
|
2001-03-19 01:35:04 +00:00
|
|
|
DEFINE(HEADER_INC, TRUE);
|
|
|
|
|
2001-02-22 07:53:34 +00:00
|
|
|
// Parse and show the overall header.
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->set_filenames(array("overall_header" => "overall_header.tpl",
|
2001-02-22 07:53:34 +00:00
|
|
|
"overall_footer" => "overall_footer.tpl"));
|
2001-02-25 04:02:12 +00:00
|
|
|
|
2001-03-21 23:25:03 +00:00
|
|
|
if($userdata['session_logged_in'])
|
2001-02-25 04:02:12 +00:00
|
|
|
{
|
|
|
|
$logged_in_status = "You are logged in as <b>".$userdata["username"]."</b>.";
|
2001-03-21 23:25:03 +00:00
|
|
|
$logged_in_status .= " [<A HREF=\"login.php?submit=logout\">Logout</A>]";
|
2001-02-25 04:02:12 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$logged_in_status = "You are not logged in.";
|
|
|
|
}
|
2001-02-27 18:50:36 +00:00
|
|
|
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->assign_vars(array("SITENAME" => $sitename,
|
2001-02-23 18:10:49 +00:00
|
|
|
"PHPEX" => $phpEx,
|
2001-02-22 07:53:34 +00:00
|
|
|
"PAGE_TITLE" => $page_title,
|
2001-02-25 04:02:12 +00:00
|
|
|
"LOGIN_STATUS" => $logged_in_status,
|
2001-03-02 05:46:32 +00:00
|
|
|
"META_INFO" => $meta_tags,
|
|
|
|
"L_USERNAME" => $l_username,
|
|
|
|
"L_PASSWORD" => $l_password,
|
|
|
|
"L_WELCOMETO" => $l_welcometo,
|
|
|
|
"L_REGISTER" => $l_register,
|
|
|
|
"L_PROFILE" => $l_profile,
|
|
|
|
"L_SEARCH" => $l_search,
|
|
|
|
"L_PRIVATEMSGS" => $l_privmsgs,
|
|
|
|
"L_MEMBERLIST" => $l_memberslist,
|
|
|
|
"L_FAQ" => $l_faq,
|
|
|
|
"L_FORUM" => $l_forum,
|
|
|
|
"L_TOPICS" => $l_topics,
|
|
|
|
"L_REPLIES" => $l_replies,
|
|
|
|
"L_VIEWS" => $l_views,
|
|
|
|
"L_POSTS" => $l_posts,
|
|
|
|
"L_LASTPOST" => $l_lastpost,
|
|
|
|
"L_MODERATOR" => $l_moderator,
|
|
|
|
"L_MESSAGES" => $l_messages,
|
|
|
|
"L_POSTEDTOTAL" => $l_postedtotal,
|
|
|
|
"L_WEHAVE" => $l_wehave,
|
|
|
|
"L_REGUSERS" => $l_regedusers,
|
|
|
|
"L_NEWESTUSER" => $l_newestuser,
|
|
|
|
"L_BROWSING" => $l_browsing,
|
|
|
|
"L_ARECURRENTLY" => $l_arecurrently,
|
|
|
|
"L_THEFORUMS" => $l_theforums,
|
|
|
|
"L_NONEWPOSTS" => $l_nonewposts,
|
|
|
|
"L_NEWPOSTS" => $l_newposts));
|
|
|
|
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->pparse("overall_header");
|
2001-02-21 07:38:38 +00:00
|
|
|
|
2001-02-22 07:53:34 +00:00
|
|
|
// Do a switch on page type, this way we only load the templates that we need at the time
|
2001-02-22 06:10:12 +00:00
|
|
|
switch($pagetype)
|
|
|
|
{
|
2001-03-04 04:17:02 +00:00
|
|
|
case 'index':
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->set_filenames(array("header" => "index_header.tpl",
|
2001-03-04 04:17:02 +00:00
|
|
|
"body" => "index_body.tpl",
|
|
|
|
"footer" => "index_footer.tpl"));
|
|
|
|
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->assign_vars(array("TOTAL_POSTS" => $total_posts,
|
2001-03-04 04:17:02 +00:00
|
|
|
"TOTAL_USERS" => $total_users,
|
|
|
|
"NEWEST_USER" => $newest_user,
|
|
|
|
"NEWEST_UID" => $newest_uid,
|
|
|
|
"USERS_BROWSING" => $users_browsing));
|
|
|
|
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->pparse("header");
|
2001-03-04 04:17:02 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 'viewforum':
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->set_filenames(array("header" => "viewforum_header.tpl",
|
2001-03-04 04:17:02 +00:00
|
|
|
"body" => "viewforum_body.tpl",
|
|
|
|
"jumpbox" => "jumpbox.tpl",
|
|
|
|
"footer" => "viewforum_footer.tpl"));
|
|
|
|
|
|
|
|
$jumpbox = make_jumpbox($db);
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->assign_vars(array("JUMPBOX_LIST" => $jumpbox,
|
2001-03-04 04:17:02 +00:00
|
|
|
"JUMPBOX_ACTION" => "viewforum.".$phpEx,
|
2001-04-16 01:11:40 +00:00
|
|
|
"SELECT_NAME" => POST_FORUM_URL));
|
2001-03-04 04:17:02 +00:00
|
|
|
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->assign_var_from_handle("JUMPBOX", "jumpbox");
|
|
|
|
|
|
|
|
$template->assign_vars(array("FORUM_ID" => $forum_id,
|
2001-03-04 04:17:02 +00:00
|
|
|
"FORUM_NAME" => $forum_name,
|
|
|
|
"MODERATORS" => $forum_moderators));
|
|
|
|
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->pparse("header");
|
2001-03-04 04:17:02 +00:00
|
|
|
break;
|
|
|
|
case 'viewtopic':
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->set_filenames(array("header" => "viewtopic_header.tpl",
|
2001-03-04 04:17:02 +00:00
|
|
|
"body" => "viewtopic_body.tpl",
|
|
|
|
"jumpbox" => "jumpbox.tpl",
|
|
|
|
"footer" => "viewtopic_footer.tpl"));
|
|
|
|
$jumpbox = make_jumpbox($db);
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->assign_vars(array("JUMPBOX_LIST" => $jumpbox,
|
2001-03-04 04:17:02 +00:00
|
|
|
"JUMPBOX_ACTION" => "viewforum.".$phpEx,
|
2001-04-16 01:11:40 +00:00
|
|
|
"SELECT_NAME" => POST_FORUM_URL));
|
2001-03-04 04:17:02 +00:00
|
|
|
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->assign_var_from_handle("JUMPBOX", "jumpbox");
|
|
|
|
|
|
|
|
$template->assign_vars(array("FORUM_ID" => $forum_id,
|
2001-03-04 04:17:02 +00:00
|
|
|
"FORUM_NAME" => $forum_name,
|
|
|
|
"TOPIC_ID" => $topic_id,
|
2001-04-16 01:11:40 +00:00
|
|
|
"TOPIC_TITLE" => $topic_title,
|
|
|
|
"POST_FORUM_URL" => POST_FORUM_URL));
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->pparse("header");
|
2001-03-04 04:17:02 +00:00
|
|
|
break;
|
2001-04-16 00:02:06 +00:00
|
|
|
|
|
|
|
case 'viewonline':
|
|
|
|
$template->set_filenames(array("header" => "viewonline_header.tpl",
|
|
|
|
"body" => "viewonline_body.tpl",
|
|
|
|
"jumpbox" => "jumpbox.tpl",
|
|
|
|
"footer" => "viewonline_footer.tpl"));
|
|
|
|
$jumpbox = make_jumpbox($db);
|
|
|
|
$template->assign_vars(array("TOTAL_POSTS" => $total_posts,
|
|
|
|
"TOTAL_USERS" => $total_users,
|
|
|
|
"NEWEST_USER" => $newest_user,
|
|
|
|
"NEWEST_UID" => $newest_uid,
|
|
|
|
"JUMPBOX_LIST" => $jumpbox,
|
|
|
|
"JUMPBOX_ACTION" => "viewforum.".$phpEx,
|
|
|
|
"SELECT_NAME" => POST_FORUM_URL));
|
|
|
|
$template->assign_var_from_handle("JUMPBOX", "jumpbox");
|
|
|
|
$template->pparse("header");
|
|
|
|
break;
|
|
|
|
|
2001-03-07 06:53:39 +00:00
|
|
|
case 'newtopic':
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->set_filenames(array("header" => "newtopic_header.tpl",
|
2001-03-07 06:53:39 +00:00
|
|
|
"body" => "posting_body.tpl"));
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->assign_vars(array("FORUM_ID" => $forum_id,
|
2001-03-07 06:53:39 +00:00
|
|
|
"FORUM_NAME" => $forum_name,
|
|
|
|
"L_POSTNEWIN" => $l_postnewin));
|
2001-03-17 00:46:26 +00:00
|
|
|
$template->pparse("header");
|
2001-03-07 06:53:39 +00:00
|
|
|
break;
|
2001-03-19 01:35:04 +00:00
|
|
|
case 'register':
|
|
|
|
if(!isset($agreed))
|
|
|
|
{
|
|
|
|
if(!isset($coppa))
|
|
|
|
{
|
|
|
|
$coppa = FALSE;
|
|
|
|
}
|
|
|
|
$template->set_filenames(array("body" => "agreement.tpl"));
|
|
|
|
$template->assign_vars(array("COPPA" => $coppa));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$template->set_filenames(array("body" => "profile_add_body.tpl"));
|
|
|
|
}
|
|
|
|
break;
|
2001-02-22 06:10:12 +00:00
|
|
|
}
|
|
|
|
|
2001-02-21 07:38:38 +00:00
|
|
|
?>
|