mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
Most of profile and registration done
git-svn-id: file:///svn/phpbb/trunk@171 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1,36 +1,37 @@
|
||||
<?php
|
||||
/***************************************************************************
|
||||
/***************************************************************************
|
||||
* page_header.php
|
||||
* -------------------
|
||||
* begin : Saturday, Feb 13, 2001
|
||||
* copyright : (C) 2001 The phpBB Group
|
||||
* email : support@phpbb.com
|
||||
*
|
||||
* -------------------
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
/***************************************************************************
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
DEFINE(HEADER_INC, TRUE);
|
||||
define(HEADER_INC, TRUE);
|
||||
|
||||
// Parse and show the overall header.
|
||||
|
||||
// Parse and show the overall header.
|
||||
$template->set_filenames(array("overall_header" => "overall_header.tpl",
|
||||
"overall_footer" => "overall_footer.tpl"));
|
||||
|
||||
if($userdata['session_logged_in'])
|
||||
{
|
||||
$logged_in_status = "You are logged in as <b>".$userdata["username"]."</b>.";
|
||||
$logged_in_status = "You are logged in as <b>".$userdata["username"]."</b>.";
|
||||
$logged_in_status .= " [<A HREF=\"login.php?submit=logout\">Logout</A>]";
|
||||
}
|
||||
else
|
||||
@@ -73,39 +74,39 @@ $template->assign_vars(array("SITENAME" => $sitename,
|
||||
$template->pparse("overall_header");
|
||||
|
||||
// Do a switch on page type, this way we only load the templates that we need at the time
|
||||
switch($pagetype)
|
||||
switch($pagetype)
|
||||
{
|
||||
case 'index':
|
||||
$template->set_filenames(array("header" => "index_header.tpl",
|
||||
"body" => "index_body.tpl",
|
||||
"footer" => "index_footer.tpl"));
|
||||
|
||||
|
||||
$template->assign_vars(array("TOTAL_POSTS" => $total_posts,
|
||||
"TOTAL_USERS" => $total_users,
|
||||
"NEWEST_USER" => $newest_user,
|
||||
"NEWEST_UID" => $newest_uid,
|
||||
"USERS_BROWSING" => $users_browsing));
|
||||
|
||||
|
||||
$template->pparse("header");
|
||||
break;
|
||||
|
||||
|
||||
case 'viewforum':
|
||||
$template->set_filenames(array("header" => "viewforum_header.tpl",
|
||||
"body" => "viewforum_body.tpl",
|
||||
"jumpbox" => "jumpbox.tpl",
|
||||
"footer" => "viewforum_footer.tpl"));
|
||||
|
||||
|
||||
$jumpbox = make_jumpbox($db);
|
||||
$template->assign_vars(array("JUMPBOX_LIST" => $jumpbox,
|
||||
"JUMPBOX_ACTION" => "viewforum.".$phpEx,
|
||||
"SELECT_NAME" => POST_FORUM_URL));
|
||||
|
||||
|
||||
$template->assign_var_from_handle("JUMPBOX", "jumpbox");
|
||||
|
||||
|
||||
$template->assign_vars(array("FORUM_ID" => $forum_id,
|
||||
"FORUM_NAME" => $forum_name,
|
||||
"MODERATORS" => $forum_moderators));
|
||||
|
||||
|
||||
$template->pparse("header");
|
||||
break;
|
||||
case 'viewtopic':
|
||||
@@ -117,9 +118,9 @@ switch($pagetype)
|
||||
$template->assign_vars(array("JUMPBOX_LIST" => $jumpbox,
|
||||
"JUMPBOX_ACTION" => "viewforum.".$phpEx,
|
||||
"SELECT_NAME" => POST_FORUM_URL));
|
||||
|
||||
|
||||
$template->assign_var_from_handle("JUMPBOX", "jumpbox");
|
||||
|
||||
|
||||
$template->assign_vars(array("FORUM_ID" => $forum_id,
|
||||
"FORUM_NAME" => $forum_name,
|
||||
"TOPIC_ID" => $topic_id,
|
||||
@@ -144,7 +145,7 @@ switch($pagetype)
|
||||
$template->assign_var_from_handle("JUMPBOX", "jumpbox");
|
||||
$template->pparse("header");
|
||||
break;
|
||||
|
||||
|
||||
case 'newtopic':
|
||||
$template->set_filenames(array("header" => "newtopic_header.tpl",
|
||||
"body" => "posting_body.tpl"));
|
||||
@@ -161,13 +162,16 @@ switch($pagetype)
|
||||
$coppa = FALSE;
|
||||
}
|
||||
$template->set_filenames(array("body" => "agreement.tpl"));
|
||||
$template->assign_vars(array("COPPA" => $coppa));
|
||||
$template->assign_vars(array("COPPA" => $coppa));
|
||||
}
|
||||
else
|
||||
{
|
||||
$template->set_filenames(array("body" => "profile_add_body.tpl"));
|
||||
}
|
||||
break;
|
||||
case 'profile':
|
||||
$template->set_filenames(array("body" => "profile_view_body.tpl"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user