<?php
session_start();
      if( (isset($_SESSION['IdAdmin'])) &&($_SESSION['IdAdmin']>0))
   {  
?>
<!DOCTYPE html>
<html>
<head>
<title>IESTP-Abancay-Docente</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<link rel="icon" href="assets/images/favicon.ico" type="image/x-icon">

<link rel="stylesheet" href="bower_components/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/pages/waves/css/waves.min.css" media="all">
<link rel="stylesheet" href="assets/icon/feather/css/feather.css">

<link rel="stylesheet" href="assets/icon/icofont/css/icofont.css">
<link rel="stylesheet" href="assets/icon/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="assets/css/jquery.dataTables.min.css">

<?php
include("script_funciones.php");
include('db___cn.php');
$mysqli=conex_db_mysql();
$administrador="SELECT IdAdministrador,Apellidos,Nombres,UrlFoto
              FROM tb_administrador 
              WHERE IdAdministrador='".$_SESSION['IdAdmin']."'";
$rs=$mysqli->query($administrador);
$fila_administrador=mysqli_fetch_array($rs);

 $listar_programas_estudio="SELECT IdCarrera,CarreraProfesional FROM tb_carrera";
 $rs_programas_estudio=$mysqli->query($listar_programas_estudio);
mysqli_close($mysqli);
?>
</head>
<body>

<div class="loader-bg">
     <div class="loader-bar"></div>
</div>

<div id="pcoded" class="pcoded">
     <div class="pcoded-overlay-box"></div>
<div class="pcoded-container navbar-wrapper">
	
	<nav class="navbar header-navbar pcoded-header">
		<div class="navbar-wrapper">
			<div class="navbar-logo">
				<?php logo(); ?>	
			</div>
			<div class="navbar-container container-fluid">
			    <?php menuSuperior($fila_administrador['Nombres'],$fila_administrador['UrlFoto']); ?>
			</div>
		</div>
	</nav>

<div class="pcoded-main-container"><!-- inicio pcoded-main-container -->
  <div class="pcoded-wrapper"><!-- inicio pcoded-wrapper -->

	<nav class="pcoded-navbar">
	  <div class="nav-list">
	     <div class="pcoded-inner-navbar main-menu">
	        <div class="pcoded-navigation-label">Panel Navegaci&#243;n</div>
	          <?php  MenuPrincipal(); ?>
	     </div>
	  </div>
	</nav>

<div class="pcoded-content"><!-- inicio pcoded-content -->

	<div class="page-header card"> <!-- inicio page-header card - encabezado -->
		<div class="row align-items-end">
				<div class="col-lg-4">
				  <a href="registrarProgramaEstudio.php" class="btn btn-success"><i class="icofont icofont-files-stack icofont-lg"></i>Nuevo ProgramaEstudio</a>
				</div>
				<div class="col-lg-8">
					<div class="page-header-breadcrumb">
							<ul class=" breadcrumb breadcrumb-title">
								<li class="breadcrumb-item">
								<a href="principal.php"><i class="feather icon-home"></i></a>
								</li>
								<li class="breadcrumb-item">
								<a href="#">Gestor Bolsa Laboral</a>
								</li>
								<li class="breadcrumb-item">
								  <a href="#">Programas de Estudio</a>
								</li>
							</ul>
					</div>
				</div>
		</div>
	</div><!-- fin page-header card - encabezado -->

	<div class="pcoded-inner-content"><!-- inicio pcoded-inner-content - contenido dinamico -->
		<div class="main-body">
			<div class="page-wrapper">
                <div class="card">
					<div class="card-header bg-primary">
					  <h5>Programas de Estudio</h5>
					</div>
					<div class="card-block">
					  <div class="table-responsive">
						<table id="tb_entidades" class="display" style="width:100%">
							<thead>
							<tr>
							<th>N&#176;</th>
							<th>Programa de Estudio</th>
							
							<th>Acciones</th>
							</tr>
							</thead>
							<tbody>
							<?php
							 $contador=1;
			                while($fila_programa_estudio=mysqli_fetch_array($rs_programas_estudio))
			                {
							 echo'<tr>';
				                  echo'<td>'.$contador.'</td>';
				                  echo'<td>'.$fila_programa_estudio['CarreraProfesional'].'</td>';
				                  echo'<td>
	                                   <a href="actualizarProgramaEstudio.php?id='.base64_encode($fila_programa_estudio['IdCarrera']).'" class="btn btn-outline-primary" data-toggle="tooltip" data-placement="top" title="" data-original-title="Modificar"><i class="icofont icofont-ui-edit"></i></a> 
	                                   <a href="eliminarProgramaEstudio.php?id='.base64_encode($fila_programa_estudio['IdCarrera']).'" class="btn btn-outline-primary" data-toggle="tooltip" data-placement="top" title="" data-original-title="Eliminar"><i class="icofont icofont-trash"></i></a>  
				                      </td>';
				             echo'</tr>';
				                $contador++;
							}
							?>
							</tbody>
						 </table>
					   </div>
					<div class="card-footer">
                    </div>
		          </div>
                </div>
			</div>
		</div>
	</div><!-- fin pcoded-inner-content - contenido dinamico -->
</div> <!-- fin pcoded-content -->

</div><!-- fin pcoded-wrapper -->

</div> <!-- fin pcoded-main-container -->

</div>
</div>

<script src="bower_components/jquery/js/jquery.min.js"></script>
<script src="bower_components/popper/js/popper.min.js"></script>
<script src="bower_components/bootstrap/js/bootstrap.min.js"></script>
<script  src="bower_components/jquery-slimscroll/js/jquery.slimscroll.js"></script>

<script src="assets/pages/waves/js/waves.min.js"></script>
<script src="assets/js/pcoded.min.js"></script>
<script src="assets/js/vertical/vertical-layout.min.js"></script>
<script src="assets/js/script.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script type="text/javascript">
	new DataTable('#tb_entidades', {
    info: false,
    ordering: false,
    paging: true,
    responsive: true,language: {
                    "url": "//cdn.datatables.net/plug-ins/1.13.4/i18n/es-ES.json",
                    "paginate": {
                        "previous": "<<",
                        "next": ">>",
                        "first": "<",
                        "last": ">"
                    },
                },              
 });

</script>

</body>
</html>
<?php
}
else
{ 
header("Location: LoginAdmin.php");
}
?>
