<?php
	$break = explode('/', $_SERVER["SCRIPT_NAME"]);
	if($break[count($break) - 1] != "index.php") { header("Location: ../index.php"); exit(); } 
?>
			<div class="componentheading">Universe Administration</div>
<?php
	if(isset($_SESSION['errormsg']))
	{
?>
			<div class="module_menu">
				<div>
					<div>
						<div>
							<h3>Notification</h3>
								<b><?php echo $_SESSION['errormsg']; ?></b>
						</div>
					</div>
				</div>
			</div>
<?php
		unset($_SESSION['errormsg']);
	}
?>
			<div class="module_menu">
				<div>
					<div>
						<div>
							<h3>Universe Administration</h3>
							<p align="center"><a href="index.php?p=admin&admin=members">Member List</a>&nbsp;&nbsp;&#9679;&nbsp;&nbsp;<a href="index.php?p=admin&admin=privilegedmembers">Privileged Members</a>&nbsp;&nbsp;&#9679;&nbsp;&nbsp;<a href="index.php?p=admin&admin=search">Search Users</a>&nbsp;&nbsp;&#9679;&nbsp;&nbsp;<a href="index.php?p=admin&admin=servers">UT Server Configuration</a></p>
							<br>
<?php
if(isset($_GET['p']))
{
	$requestPage = $_GET['admin'];
		
	switch($requestPage)
	{
		case "":
			include('pages/admin/home.php');
			break;
		case "home":
			include('pages/admin/home.php');
			break;
		case "members":
			include('pages/admin/members.php');
			break;
		case "privilegedmembers":
			include('pages/admin/privilegedmembers.php');
			break;
		case "servers":
			include('pages/admin/servers.php');
			break;
		case "modify":
			include('pages/admin/modify.php');
			break;
		case "search":
			include('pages/admin/search.php');
			break;
		default:
			include('pages/admin/home.php');
			break;
	}
}
else
{
	include('pages/admin/home.php');
}
?>
						</div>
					</div>
				</div>
			</div>