<?php  include 'conector.php';
session_start();
$men="";$val1="";$val2="";$val3="";$val4="";$cur1="";$cur2="";$cur3="";$cur4="";
$class1="";$class2="";$class3="";$class4="";$act1="";$act2="";$act3="";$act4="";$tbody="";

if(isset($_SESSION["user"])&& $_SESSION["tipo"]=='A'){
?>
<!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>GESTOR ACADEMICO CDLE</title>

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

    <style>
    .sidebar-offcanvas {
        transition: transform 0.3s ease-in-out;
    }
    .sidebar-hidden {
        transform: translateX(-100%);
    }
    .main-content-full {
        width: 100% !important;
    }
    #menu-toggle {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 9999;
        background: #333;
        border: none;
        color: white;
        font-size: 16px;
        cursor: pointer;
        padding: 8px 10px;
        border-radius: 3px;
        width: 40px;
        height: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
    }
    #menu-toggle:hover {
        background: #555;
        color: white;
    }
    #menu-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: white;
        border-radius: 1px;
    }
    .navbar-fixed-top {
        padding-left: 60px;
    }
    .header-title {
        margin: 0;
        font-weight: 600;
        font-size: 32px !important;
    }
    .header-subtitle {
        margin: 5px 0 0 0;
        font-size: 18px !important;
    }
    </style>

    <!--[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>
    <button type="button" id="menu-toggle" onclick="toggleMenu()">
        <span></span>
        <span></span>
        <span></span>
    </button>

    <div class="navbar navbar-fixed-top navbar-inverse" role="navigation">
      <div class="container-fluid">
        <div class="navbar-header">
          <a href="general.php"><img src="img/logo1.png" style="margin-top:5px;margin-left:5px;"></a>
        </div>
        <div style="float:right;display:flex;align-items:center;">
            <span style="margin-right:10px; margin-top:15px" class="label label-success"><span class="glyphicon glyphicon-user"></span> '.$_SESSION["user"].'</span> 
            <a href="index.php"><img src="img/salir.png" style="margin-right:15px;margin-top:5px"></a>
        </div>
      	
      </div>
    </div>

    <div class="container-fluid" style="margin-top:50px;">

      <div class="row">
        <div class="sidebar-offcanvas col-sm-3" 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="acudiente.php" class="list-group-item "><span class="glyphicon glyphicon-user"></span> Acudientes</a>                      
            <a href="asignaturas.php" class="list-group-item"><span class="glyphicon glyphicon-book"></span> Asignaturas</a>
            <a href="cursos.php" class="list-group-item"><span class="glyphicon glyphicon-list"></span> Cursos</a>
            <a href="pensum.php" class="list-group-item"><span class="glyphicon glyphicon-edit"></span> Pensum</a>    
            <a href="logros.php" class="list-group-item "><span class="glyphicon glyphicon-edit"></span> Logros</a>                        
            <a href="observaciones.php" class="list-group-item "><span class="glyphicon glyphicon-edit"></span> Indicadores de Comportamiento</a>                                    
            <a href="horario.php" class="list-group-item "><span class="glyphicon glyphicon-edit"></span> Horario</a>
            <a href="horario_atencion.php" class="list-group-item"><span class="glyphicon glyphicon-edit"></span> Horario de Atenci&oacute;n</a>            
            <a href="planilla_asistencia.php" class="list-group-item"><span class="glyphicon glyphicon-file"></span> Control de Asistencia</a>            
            <a href="planilla.php" class="list-group-item "><span class="glyphicon glyphicon-file"></span> Registro de Calificaciones</a>            
            <a href="planilla_obs.php" class="list-group-item "><span class="glyphicon glyphicon-file"></span> Observador del Estudiante</a>                        
            <a href="pagos.php" class="list-group-item"><span class="glyphicon glyphicon-list"></span> Pagos</a>                  
            <a href="reportes.php" class="list-group-item"><span class="glyphicon glyphicon-file"></span> Boletines</a>            
            <a href="eventos.php" class="list-group-item "><span class="glyphicon glyphicon-edit"></span> Anuncios</a>           
            <a href="config.php" class="list-group-item"><span class="glyphicon glyphicon-wrench"></span> Configuraci&oacute;n</a>
          </div>
        </div>

        <div class="col-sm-9 main-content" id="main-content">
            <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">          	
				<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>
        </div>
      </div>

    </div>

    <script>
    var menuVisible = true;
    function toggleMenu() {
        var sidebar = document.getElementById("sidebar");
        var mainContent = document.getElementById("main-content");
        var toggleBtn = document.getElementById("menu-toggle");
        
        if (menuVisible) {
            sidebar.classList.add("sidebar-hidden");
            mainContent.classList.add("main-content-full");
            mainContent.classList.remove("col-sm-9");
            toggleBtn.innerHTML = "<span style='transform: rotate(45deg); position: absolute;'></span><span style='opacity: 0;'></span><span style='transform: rotate(-45deg); position: absolute;'></span>";
        } else {
            sidebar.classList.remove("sidebar-hidden");
            mainContent.classList.remove("main-content-full");
            mainContent.classList.add("col-sm-9");
            toggleBtn.innerHTML = "<span></span><span></span><span></span>";
        }
        menuVisible = !menuVisible;
}
    </script>

    <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="calendar/css/calendar.css">
    <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>

<?php
}
else{
echo "<script>window.location='index.php';</script>";
}
?>