<?php
include '../conector.php';
session_start();

if(isset($_SESSION["user"]) && $_SESSION["tipo"]=='D'){
$cuenta="select docente.teacher_id,docente.coordinador
	from usuarios,docente 
	where name='".$_SESSION["user"]."'
	and usuarios.cuenta=docente.email";
$res_cuenta=mysql_query($cuenta);
$rs_cta=mysql_fetch_array($res_cuenta);
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="../assets/ico/favicon.ico">

    <title>SOFTWARE DE GESTION ACADEMICA EN LINEA</title>

    <link href="../dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="../offcanvas.css" rel="stylesheet">
    <link rel="stylesheet" href="../calendar/css/calendar.css">

    <!--[if lt IE 9]><script src="../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>
    <div class="navbar navbar-fixed-top navbar-inverse" role="navigation">
      <div class="container">
         <div class="navbar-header">
          <button type="button" class="navbar-toggle hidden-xs" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
          </button>
          <a href="general.php" class='hidden-xs' ><img src='../img/logo1.png'  style='margin-top:5px;'></a>
	         <div align='' class='visible-xs'>
		         <a  href="general.php"  ><img src='../img/logo1.png' width='250px' style='margin-top:10px;margin-left:5px'></a>
		         <a href="../index.php" ><img src='../img/salir2.png' style='float:right;margin-top:15px;margin-right:10px'></a>
	         </div>
        </div>
      	<a href="../index.php" class='hidden-xs'><img src='../img/salir.png' style='float:right;margin-top:15px'>
         </a><span style='float:right;margin-right:10px; margin-top:15px' class='label label-success hidden-xs'><span class='glyphicon glyphicon-user'></span> <?php echo $_SESSION["user"]; ?></span>  
      </div>
    </div>

    <div class="container">
      <div class="row row-offcanvas row-offcanvas-left">
	<div class="collapse navbar-collapse">
          <ul class="nav navbar-nav"></ul>
        </div>

 <div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar" role="navigation">
          <div class="list-group">
            <a href="general.php" class="list-group-item active"><span class="glyphicon glyphicon-home"></span> General</a>
            <a href="estudiantes.php" class="list-group-item"><span class="glyphicon glyphicon-th"></span> Estudiantes</a>
            <a href="docentes.php" class="list-group-item"><span class="glyphicon glyphicon-user"></span> Docentes</a>
            <a href="horario.php" class="list-group-item "><span class="glyphicon glyphicon-edit"></span> Horario</a>
            <a href="logros.php" class="list-group-item"><span class="glyphicon glyphicon-edit"></span> Logros</a>            
            <a href="planilla.php" class="list-group-item "><span class="glyphicon glyphicon-file"></span> Planilla Notas</a>   
            <a href="planilla_asistencia.php" class="list-group-item "><span class="glyphicon glyphicon-file"></span> Asistencia</a>                     
            <a href="reportes.php" class="list-group-item"><span class="glyphicon glyphicon-file"></span> Informes</a>
            <a href="planilla_obs.php" class="list-group-item "><span class="glyphicon glyphicon-file"></span> Planilla Obs.</a>
            <a href="eventos.php" class="list-group-item "><span class="glyphicon glyphicon-edit"></span> Anuncios</a>
<?php if($rs_cta[1]==1){ ?>
            <a href="obs_disciplinarias.php" class="list-group-item "><span class="glyphicon glyphicon-file"></span> Registro Obs.</a>
<?php } ?>
          </div>        
        </div>
        
        <div class="col-xs-12 col-sm-9">
          <p class="pull-left visible-xs">
            <button type="button" class="btn btn-primary btn-xs" data-toggle="offcanvas">menu</button>
          </p>
          
          <div class="jumbotron" style="padding: 20px 30px; margin-bottom: 10px;">
                <h2 style="font-size: 36px !important; font-weight: bold !important; margin: 0 !important;">GESTOR ACADÉMICO</h2>
                <p style="font-size: 20px !important; margin: 10px 0 0 0 !important;">Bienvenido al Sistema de Gestión Académica del CDLE</p>
            </div>
          
        <div class="col-12 col-sm-12 col-lg-12" style="margin-top:20px;">          	
				<div>
					<div class="pull-right form-inline">
					<div class="btn-group">
						<button class="btn btn-info btn-sm" data-calendar-nav="prev"><< Ant.</button>
						<button class="btn btn-sm" data-calendar-nav="today">Hoy</button>
						<button class="btn btn-info btn-sm" data-calendar-nav="next">Sig. >></button>
					</div>
					<div class="btn-group">
						<button class="btn btn-success btn-sm" data-calendar-view="year">A&ntilde;o</button>
						<button class="btn btn-success btn-sm active" data-calendar-view="month">Mes</button>
						<button class="btn btn-success btn-sm" data-calendar-view="week">Semana</button>
					</div>
					</div>
				</div>
				<div class="span9">
					<h3 id="calendar-title"></h3>
					<div id="calendar"></div>
				</div>
				<div class="span3">
					<div class="row-fluid">
						<label class="checkbox"></label>
					</div>
					<h4></h4>
					<small></small>
					<ul id="eventlist" class="nav nav-list"></ul>
				</div>
	        </div>
        </div>
      </div>
      <hr>
      <footer><p>Todos los derechos reservados - Copyright &copy; CDLE</p></footer>
    </div>

    <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script src="../dist/js/bootstrap.min.js"></script>
    <script src="../offcanvas.js"></script>
    <script type="text/javascript" src="../calendar/components/underscore/underscore-min.js"></script>
    <script type="text/javascript" src="../calendar/components/jstimezonedetect/jstz.min.js"></script>
    <script type="text/javascript" src="../calendar/js/language/es-CO.js"></script>
    <script type="text/javascript" src="../calendar/js/calendar.js"></script>
    <script>
    $(document).ready(function() {
        var calendar = $("#calendar").calendar({
            events_source: "../calendar/event.php",
            view: "month",
            tmpl_path: "../calendar/tmpls/",
            day: "now",
            onAfterViewLoad: function(view) {
                $('#calendar-title').text(this.getTitle());
            }
        });
        
        $('button[data-calendar-nav]').click(function(e) {
            e.preventDefault();
            var action = $(this).data('calendar-nav');
            calendar.navigate(action);
        });

        $('button[data-calendar-view]').click(function(e) {
            e.preventDefault();
            var view = $(this).data('calendar-view');
            calendar.view(view);
        });
    });
    </script>
  </body>
</html>
<?php
}else{
echo "
<div class=\"alert alert-danger\" >
    <button type=\"button\" class=\"close\" data-dismiss=\"alert\">X</button>
    Debe registrase para usar la aplicaci&oacute;n <a href='../index.php' > Ingresar</a>
</div>";
}
?>