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


$SQL="SELECT * FROM learner WHERE id=".$_GET['lid'];
$results = llnb_query($SQL);
$row = llnb_fetch_assoc($results);
		
		
?>


<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[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">
  <link rel="stylesheet" href="css/llnb-style-extra.css">

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

  <script src="js/libs/modernizr-2.5.3.min.js"></script>
       	<link href="scripts/SqueezeBox.css" rel="stylesheet" type="text/css" />
      	<script src="scripts/mootools.js" type="text/javascript" ></script>
	<script src="scripts/SqueezeBox.js" type="text/javascript"></script>
	
	  
	 <script language="javascript">
	  
	  
	window.addEvent('domready', function()
	{
		SqueezeBox.assign($$('a.active_m'), {
			parse: 'rel'
		});
	});
	
	
</script>  
</head>
<body>

<div id="wrap">
 
  <header><a href="index.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>
	
	<a href="learner_list.php" class="btn lfl">Learner List</a>
	</nav>
  </header>
  <div role="main" id="main" class="clearfix">
  	<div id="location">
    <H2><span>Learner:</span> <? echo $row['firstname']." ".$row['lastname']; ?></H2>
    
    </div> <!-- end of location -->
	  <h2>Overview</h2>
		
		<?
		if ($_SESSION['ulevel']!= $_TUTOR)
		{	
			$thestatus = fetchCurrentStatus(1, $_GET['lid']);

			if ( $thestatus == 0)	
			{	$btn= "Make Active";
				$thepg = "make_active_m";
				$h="310";

			}
			else
			{	$btn = "Make Inactive";
				$thepg = "make_inactive_m";
				$h="575";

			}

			echo "
			  <ul>
				 <li><a href=\"".$thepg.".php?utype=1&frompg=learneroverview&lid=".$_GET['lid']."\" rel=\"{handler:'iframe',size:{x:545,y:".$h."}}\" class=\"active_m\">".$btn."</a></li>
			  </ul>";
        }
        ?>
        
        <ul>
            <li><a href="learner_timelist.php?lid=<?=$_GET['lid'];?>" class="btn lfl btnlrg">Session Information</a></li>
            <li><a href="learner_personalinfo.php?lid=<?=$row['id'];?>&mode=edit" class="btn lfl btnlrg">Personal Information </a></li>
         
            <?
			 if ($_SESSION['ulevel']!= $_TUTOR)
			 {
			         echo "
			         <li><a href=\"learner_employmentinfo.php?lid=".$_GET['lid']."\" class=\"btn lfl btnlrg\">Employment Information </a></li>
           			 <li><a href=\"learner_educationinfo.php?lid=".$_GET['lid']."\" class=\"btn lfl btnlrg\">Education Information </a></li>
			         ";
			 }
           ?>
         

          
          
          
            <li><a href="learner_learningplan.php?lid=<?=$_GET['lid'];?>" class="btn lfl btnlrg">Learning Plan</a></li>
            
            <?
			 if ($_SESSION['ulevel']!= $_TUTOR)
			 {
			         echo "
			         <li><a href=\"learner_tutormatchinfo.php?lid=".$_GET['lid']."\" class=\"btn lfl btnlrg\">Match Information </a></li>
			         <li><a href=\"learner_assignedtutor.php?lid=".$_GET['lid']."\" class=\"btn lfl btnlrg\">Assigned Tutor Information </a></li>";
			 }
           ?>
            
            <li><a href="learner_resources.php?lid=<?=$_GET['lid'];?>" class="btn lfl btnlrg">Assigned Resources</a></li>
            <li><a href="learner_progressnotes.php?lid=<?=$_GET['lid'];?>" class="btn lfl btnlrg">Progress Notes</a></li>
           
           <?
           if ($_SESSION['ulevel']!= $_TUTOR)
		 {
           	echo "<li><a href=\"learner_status.php?lid=".$_GET['lid']."\" class=\"btn lfl btnlrg\">Status Information</a></li>";
           }
           ?>
        </ul>
  </div><!-- end of main -->
  <div class="sidecolumn">
   	 <? 
   		 echo printLearnHRs($_GET['lid']);
    	?>
  </div>



    <div style="clear:both;"></div>
  <footer>
	<?php include('footer.php'); ?>
  </footer>
  </div>

</body>
</html>