From 28a09fcc5065b9aff4a5db740f80e903d8f0a44d Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sat, 14 Jul 2001 20:00:27 +0000 Subject: New page headers, cleaned up code, etc. git-svn-id: file:///svn/phpbb/trunk@663 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/admin/index.php | 99 +++++++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 46 deletions(-) (limited to 'phpBB/admin/index.php') diff --git a/phpBB/admin/index.php b/phpBB/admin/index.php index 764205166f..6bdca81832 100644 --- a/phpBB/admin/index.php +++ b/phpBB/admin/index.php @@ -32,34 +32,33 @@ include($phpbb_root_path . 'common.'.$phpEx); $userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length); init_userprefs($userdata); // -// End sessionmanagement +// End session management // // -// Start Auth check +// Is user logged in? If yes are they an admin? // -if($userdata['user_level'] != ADMIN) +if( !$userdata['session_logged_in'] ) { - message_die(CRITICAL_MESSAGE, $lang['Not_Moderator'], $lang['Not_Authorised'], __LINE__, __FILE__); + header("Location: ../login.$phpEx?forward_page=/admin/"); } +else if( $userdata['user_level'] != ADMIN ) +{ + message_die(GENERAL_MESSAGE, "You are not authorised to administer this board"); +} + // -// End Auth check +// Generate relevant output // - - - -if ($pane == 'top') +if( $HTTP_GET_VARS['pane'] == 'top' ) { - $page_title = $lang['View_topic'] ." - $topic_title"; - $pagetype = "viewtopic"; - include($phpbb_root_path . 'includes/page_header.'.$phpEx); + $template_header = "admin/overall_header.tpl"; + include('page_header_admin.'.$phpEx); } -elseif ($pane == 'left') +elseif( $HTTP_GET_VARS['pane'] == 'left' ) { - $pagetype = "noheader"; - include($phpbb_root_path . 'includes/page_header.'.$phpEx); print ""; $dir = opendir("."); @@ -73,62 +72,70 @@ elseif ($pane == 'left') } } + while( list($cat, $action_array) = each($module) ) + { + print "

$cat

\n"; + print "\n"; + } + + /* $template->set_filenames(array( "body" => "admin/navigate.tpl") ); - - + while( list($cat, $action_array) = each($module) ) { $template->assign_block_vars("catrow", array( "CATNAME" => $cat) ); - while( list($action, $file) = each($action_array) ) + while( list($action, $file) = each($action_array) ) { $template->assign_block_vars("catrow.actionrow", array( - "ACTIONNAME" => $action, - "FILE" => $file) + "ACTIONNAME" => $action, + "FILE" => $file) ); } } //var_dump($module); - + $template->pparse("body"); + */ $setmodules = 0; } -elseif ($pane == 'right') +elseif( $HTTP_GET_VARS['pane'] == 'right' ) { - echo "This the right pane ;)"; + echo "This a right pane ;)"; } else { + // + // Generate frameset + // + $template->set_filenames(array( + "body" => "admin/index_frameset.tpl") + ); + + $template->assign_vars(array( + "S_FRAME_HEADER" => "index.$phpEx?pane=top", + "S_FRAME_NAV" => "index.$phpEx?pane=left", + "S_FRAME_MAIN" => "index.$phpEx?pane=right", + ) + ); + + $template->pparse("body"); -// Generate frameset - -?> - - -Admin - - - - - - - - - - - <body bgcolor="#FFFFFF"> - Sorry, your browser doesn't seem to support Frames.. -</body> - - - +?> \ No newline at end of file -- cgit v1.2.1