aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/admin/index.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-07-14 20:00:27 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-07-14 20:00:27 +0000
commit28a09fcc5065b9aff4a5db740f80e903d8f0a44d (patch)
tree6d593802892bee57fc8836554b70c264f8d3dacf /phpBB/admin/index.php
parent92074fdd8c86a53bc438df766798f29c7f5db39a (diff)
downloadforums-28a09fcc5065b9aff4a5db740f80e903d8f0a44d.tar
forums-28a09fcc5065b9aff4a5db740f80e903d8f0a44d.tar.gz
forums-28a09fcc5065b9aff4a5db740f80e903d8f0a44d.tar.bz2
forums-28a09fcc5065b9aff4a5db740f80e903d8f0a44d.tar.xz
forums-28a09fcc5065b9aff4a5db740f80e903d8f0a44d.zip
New page headers, cleaned up code, etc.
git-svn-id: file:///svn/phpbb/trunk@663 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/index.php')
-rw-r--r--phpBB/admin/index.php99
1 files changed, 53 insertions, 46 deletions
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 "<BASE TARGET=\"main\">";
$dir = opendir(".");
@@ -73,62 +72,70 @@ elseif ($pane == 'left')
}
}
+ while( list($cat, $action_array) = each($module) )
+ {
+ print "<H3>$cat</H3>\n";
+ print "<ul>\n";
+
+ while( list($action, $file) = each($action_array) )
+ {
+ print "<li><a href=\"$file\">$action</a></li>\n";
+ }
+
+ print "</ul>\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
-
-?>
-<html>
-<head>
-<title>Admin</title>
-</head>
-
-<frameset rows="150,*" border="0" frameborder="0">
- <frame src="index.<?php echo $phpEx?>?pane=top" name="top" SCROLLING="NO">
- <frameset cols="150,*" border="0" frameborder="0">
- <frame src="index.<?php echo $phpEx?>?pane=left" name="nav">
- <frame src="index.<?php echo $phpEx?>?pane=right" name="main">
- </frameset>
-</frameset>
-<noframes>
- <body bgcolor="#FFFFFF">
- Sorry, your browser doesn't seem to support Frames..
-</body>
-</noframes>
-</html>
-<?
+ exit;
}
-?>
+?> \ No newline at end of file