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


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


<!doctype html>
<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>
         	<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>
     <?
    		if ($_SESSION['ulevel'] == $_COORD || $_SESSION['ulevel'] == $_TUTOR)
			$force_council= "?council=".$_SESSION['council_id'];
   
   		if ($_SESSION['ulevel'] != $_TUTOR) 
   			echo "<a href=\"tutor_list.php".$force_council."\" class=\"btn lfl\">Tutor List</a>";
     ?>
	
  </header>
  <div role="main" id="main" class="clearfix">
  	<div id="location">
    <H2><span>Tutor:</span> <?=fetchTutorName($_GET['tid']);?></H2>
    
    </div> <!-- end of location -->
	  <h2>Overview</h2>
		<?
		if ($_SESSION['ulevel']!= $_TUTOR)
		{			
		
			$thestatus = fetchCurrentStatus(2, $_GET['tid']);

			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=2&frompg=tutoroverview&lid=".$_GET['tid']."\" rel=\{handler:'iframe',size:{x:545,y:".$h."}}\ class=\"active_m\">".$btn."</a></li>
	   		</ul>";
		}
		
		?>
		

        
        <ul>
            <li><a href="tutor_learner_list.php?tid=<?=$_GET['tid'];?>" class="btn lfl btnlrg">Learner List</a></li>
            <li><a href="tutor_volunteer_timelist.php?tid=<?=$_GET['tid'];?>" class="btn lfl btnlrg">Volunteer Time</a></li>
        </ul>
        <ul>
            <li><a href="tutor_personalinfo.php?mode=edit&tid=<?=$_GET['tid'];?>" class="btn lfl btnlrg">Personal Information </a></li>
            <li><a href="tutor_employmentinfo.php?tid=<?=$_GET['tid'];?>" class="btn lfl btnlrg">Employment Information </a></li>
            <li><a href="tutor_volunteerinfo.php?tid=<?=$_GET['tid'];?>" class="btn lfl btnlrg">Volunteer Organizations</a></li>
           

           <?
			 if ($_SESSION['ulevel']!= $_TUTOR)
			 {            
				echo "
				  <li><a href=\"tutor_tutormatchinfo.php?tid=".$_GET['tid']."\" class=\"btn lfl btnlrg\">Match Information </a></li>
				  <li><a href=\"tutor_status.php?tid=".$_GET['tid']."\" class=\"btn lfl btnlrg\">Status Information</a></li>
				  <li><a href=\"tutor_notes_list.php?tid=".$_GET['tid']."\" class=\"btn lfl btnlrg\">Notes</a></li>";
          	  }
            ?>
        </ul>
  </div><!-- end of main -->
    <div class="sidecolumn">
   	 <? 
   		 echo printTutorHRs($_GET['tid'], 1);
   		 echo printTutorHRs($_GET['tid'], 2);
   		 echo printVolunteerHRs($_GET['tid'], 2);
    	?>
  </div>
  
    <div style="clear:both;"></div>   
    
    
    
  <footer>
	<?php include('footer.php'); ?>
  </footer>
  </div> <!-- end of wrap -->


</body>
</html>