<?
include('auth.php');
include('common.php');
?>


<!doctype html>

<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
  <meta charset="utf-8">

  <!-- Use the .htaccess and remove these lines to avoid edge case issues.
       More info: h5bp.com/i/378 -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  <title>LLNB System</title>
  <meta name="description" content="">

  <!-- Mobile viewport optimized: h5bp.com/viewport -->
  <meta name="viewport" content="width=device-width, maximum-scale=1.0">

  <!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons -->
  <link rel="SHORTCUT ICON" href="favicon.ico">

  <link rel="stylesheet" href="css/style.css">
  <link rel="stylesheet" href="css/llnb-style.css">

  <!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->

  <script src="js/libs/modernizr-2.5.3.min.js"></script>
</head>
<body>
<div id="wrap">
  <!-- Prompt IE 6 users to install Chrome Frame. Remove this if you support IE 6.
       chromium.org/developers/how-tos/chrome-frame-getting-started -->
  <!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
  <header><a href="logout.php" class="btn lfr" style="position:relative; top: 15px; right: 0;">Logout</a>
	<h1>Laubach Literacy - <?=uType();?></h1> 
	<h3><?=fetchCouncilName($_SESSION['council_id']);?></h3>
	<nav id="menu" class="clearfix navmenu"><a href="home.php" class="btn lfl">Home</a></nav>
  </header>
  <div role="main" id="main" class="clearfix">
  	<div id="location">
    <H2>Home</H2>
    
    </div> <!-- end of location -->
	<ul>
    	<?
    		if ($_SESSION['ulevel'] == $_COORD || $_SESSION['ulevel'] == $_TUTOR )
			$force_council="&council=".$_SESSION['council_id'];
	?>

   	<li><a href="learner_list.php?active=1<?=$force_council;?>" class="btn lfl btnlrg">Learner List</a></li>
   	<?
		if ($_SESSION['ulevel'] == $_TUTOR)
		{
			$tutorbutton = "Tutor Overview";	
			$turl = "tutor_overview.php?tid=".$_SESSION['user_id'];
		}
		else
		{	
			$tutorbutton = "Tutors";	
			$turl = "tutor_list.php?active=1";
		}
		
		echo "<li><a href=\"".$turl."\" class=\"btn lfl btnlrg\">".$tutorbutton."</a></li>";
	?>
	
	</ul>
	
	
	<ul>
	<?
	
    		//concils
		if ($_SESSION['ulevel'] != $_TUTOR)
    		{	
    			if ($_SESSION['ulevel'] == $_COORD)
			{
					$cbutton = "Council Overview";	
					$curl = "council_overview.php?cid=".$_SESSION['council_id'];
			}
			else
			{	
					$cbutton = "Councils";	
					$curl = "council_list.php";
			}
			echo "<li><a href=\"".$curl."\" class=\"btn lfl btnlrg\">".$cbutton."</a></li>";
	    	}    	
    	
    		//coordinators
    		if ($_SESSION['ulevel'] != $_TUTOR)
    		{	
    			if ($_SESSION['ulevel'] == $_COORD)
			{
					$cbutton = "Coordinator Overview";	
					$curl = "coordinator_overview.php?coordid=".$_SESSION['user_id'];
			}
			else
			{	
					$cbutton = "Coordinators";	
					$curl = "coordinator_list.php?cid=-1";
			}
			echo "<li><a href=\"".$curl."\" class=\"btn lfl btnlrg\">".$cbutton."</a></li>";
	    	}
    	?>
    	
    </ul>
    
	<ul>
    	<?
    	if ($_SESSION['ulevel'] == $_EXECDIR)
    		echo	"<li><a href=\"executive_director_overview.php\" class=\"btn lfl btnlrg\">Executive Director Overview</a></li>";

	if ($_SESSION['ulevel'] == $_EXECDIR || $_SESSION['ulevel'] == $_COORD )
	{
		if ($_SESSION['ulevel'] == $_COORD )
			$force_council="?council=".$_SESSION['council_id'];
			
		echo "<li><a href=\"volunteer_list.php".$force_council."\" class=\"btn lfl btnlrg\">Volunteers</a></li>";
	}
	?>
	</ul> 

   	<?
    	if ($_SESSION['ulevel'] == $_EXECDIR)   
	   echo 
		"<ul>
		<li><a href=\"setting_overview.php\" class=\"btn lfl btnlrg\">Adjust Setting</a></li>
	    </ul>";
    ?>
    
    
  </div><!-- end of main -->
  <div class="sidecolumn">
  <?
  	if ($_SESSION['ulevel'] == $_EXECDIR || $_SESSION['ulevel'] == $_COORD )
  	{
  		
  		if ($_SESSION['ulevel'] == $_EXECDIR)
  			$nbgov = "<a href=\"report_main.php?r=1\" class=\"btn btncnt\">NB Gov Report</a>";
  		
  		$number = rand();
  		echo "
		<div class=\"graybox\">
		  <h3>Actions</h3>
		  <a href=\"learner_personalinfo.php?mode=new\" class=\"btn btncnt\">Add Learner</a>
		  <a href=\"tutor_personalinfo.php?mode=new\" class=\"btn btncnt\">Add Tutor</a>
		  <a href=\"volunteer_personalinfo.php?mode=new\" class=\"btn btncnt\">Add Volunteer</a>
		</div>

		<div class=\"graybox\">
		<h3>Reports</h3>
		".$nbgov."
		<a href=\"report_main.php?r=2\" class=\"btn btncnt\">Internal Report</a>
		<a href=\"report_mailinglist.php\" class=\"btn btncnt\">Mailing List</a>
		</div>	

		<div class=\"graybox\">
		  <h3>Forms</h3>
		  <a href=\"forms/learner_intake.pdf?=".$number."\" target=\"_new\" class=\"btn btncnt\">Learner Intake</a>
		  <a href=\"forms/tutor_intake.pdf?=".$number."\" target=\"_new\"  class=\"btn btncnt\">Tutor Intake</a>
		  <a href=\"forms/volunteer_intake.pdf?=".$number."\" target=\"_new\"  class=\"btn btncnt\">Volunteer Intake</a>
		  <a href=\"forms/WOW_portfolio.pdf?=".$number."\" target=\"_new\"  class=\"btn btncnt\">WOW Portfolio</a>
		  <a href=\"forms/essential_skills.pdf?=".$number."\" target=\"_new\"  class=\"btn btncnt\">Essential Skills</a>
		</div>"; //report_provincal.php  report_internal.php   report_mailinglist.php
	}
	else if  ($_SESSION['ulevel'] == $_TUTOR)
	{
		
		echo "<div class=\"graybox\">
			  <h3>Forms</h3>
			  <a href=\"forms/WOW_portfolio.pdf?=".$number."\" target=\"_new\"  class=\"btn btncnt\">WOW Portfolio</a>
			  <a href=\"forms/essential_skills.pdf?=".$number."\" target=\"_new\"  class=\"btn btncnt\">Essential Skills</a>
		</div>";
	
	}
	?>
	
  </div>
    <div style="clear:both;"></div>
  <footer>
	<?php include('footer.php'); ?>
  </footer>
  </div> <!-- end of wrap -->

  <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  <script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>

  <!-- scripts concatenated and minified via build script -->
  <script src="js/plugins.js"></script>
  <script src="js/script.js"></script>
  <!-- end scripts -->

</body>
</html>