<!-- ?php
session_start();

include("lib/db.inc");
include("lib/util.php");
include("api/soap.php");

foreach($_GET as $key=>$value)
{
	$_SESSION[$key] = $value;
}

header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");


? -->
<!DOCTYPE html>
  <html>
    <head>
      <!--Import Google Icon Font-->
      <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
      <!--Import materialize.css-->
	  
	  <link type="text/css" rel="stylesheet" href="css/responsive.dataTables.min.css"  media="screen,projection"/>
      <link type="text/css" rel="stylesheet" href="css/materialize.min.css"  media="screen,projection"/>
	   <link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
	   
      <!--Let browser know website is optimized for mobile-->
      <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	  <script type="text/javascript" src="js/jquery-1.12.3.js"></script>
	  <script type="text/javascript" src="js/jquery.session.js"></script>
      <script type="text/javascript" src="js/materialize.min.js"></script>
	  <script type="text/javascript" src="js/numericInput.min.js"></script>
	  <script src="js/init.js"></script>
	  
	  <link rel="stylesheet" type="text/css" href="js/media/css/jquery.dataTables.css">
	<link rel="stylesheet" type="text/css" href="js/resources/syntax/shCore.css">
	<link rel="stylesheet" type="text/css" href="js/resources/demo.css">
	<style type="text/css" class="init">
	
	</style>
	
	<script type="text/javascript" language="javascript" src="js/media/js/jquery.dataTables.js">
	</script>
	<script type="text/javascript" language="javascript" src="js/dataTables.responsive.min.js">
	</script>
	
	<script type="text/javascript" language="javascript" src="js/resources/syntax/shCore.js">
	</script>
	<script type="text/javascript" language="javascript" src="js/resources/demo.js">
	</script>
	<script type="text/javascript" language="javascript" src="js/jscode.js">
	</script>

	<style>
	
	.loader {
			border: 16px solid #f3f3f3; /* Light grey */
			border-top: 16px solid #3498db; /* Blue */
			border-radius: 50%;
			width: 120px;
			height: 120px;
			animation: spin 2s linear infinite;
		}

		@keyframes spin {
			0% { transform: rotate(0deg); }
			100% { transform: rotate(360deg); }
		}
	</style>
	
	  

	  
	  
    </head>

    <body>
		
		 <nav class="white" role="navigation">
    <div class="nav-wrapper container">
      <a id="logo-container" href="?page=home" class="brand-logo"> &nbsp;</a>
      <ul class="right hide-on-med-and-down">
	  		<li><a href="?page=topics&id=8423">Maths</a></li>
			<li><a href="?page=topics&id=11635">Science</a></li>
      </ul>

      <ul id="nav-mobile" class="side-nav">
	  		<li><a href="?page=topics&id=8423">Maths</a></li>
			<li><a href="?page=topics&id=11635">Science</a></li>
      </ul>
      <a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
    </div>
  </nav>

  <?php

		extract($_GET);


		//echo $page;

		$thefile = "pages/";
		if(isset($page))
		{
			$thefile .= "$page.php";
		}
		else{
			$thefile .= "home.php";
		}

		if(file_exists($thefile))
		{
			include($thefile);
			/*
			if(!isset($_SESSION["user_id"]))
			{
				include("pages/home.php"); //re direct to login
			}
			else{
				include($thefile);
			}*/
		}
		else{	
			include("pages/invalid.php");
		}


		?> 

  <footer class="page-footer teal">
   
    <div class="footer-copyright">
	<center>
		  <div class="container">
			Powered by <a class="brown-text text-lighten-3" href="#" target="_blank">Phumlani M Foundation </a>
		  </div>
	 </center>
    </div>
  </footer>
	
      <!--Import jQuery before materialize.js-->
      
    </body>
  </html>