<?php
session_start();
     if( (isset($_SESSION['IdDoc'])) &&($_SESSION['IdDoc']>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" />
<meta name="description" content="" />
<meta name="keywords" content="">
<meta name="author" content="IESTPVAH" />

<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/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="bower_components/animate/css/animate.css">
<link rel="stylesheet" href="assets/pages/notification/notification.css">
<link rel="stylesheet" href="assets/icon/icofont/css/icofont.css">
<link rel="stylesheet"  href="assets/css/style.css">

<?php
include("script_funciones.php");
include('db___cn.php');
$mysqli=conex_db_mysql();

$docente="SELECT IdDocente,Apellidos,Nombres,UrlFoto
              FROM tb_docentes 
              WHERE IdDocente='".$_SESSION['IdDoc']."'";
$rs=$mysqli->query($docente);
$fila_docente=mysqli_fetch_array($rs);

$tipo_estudio="SELECT * FROM tb_tipo_estudio_docente";
$rs_tipo_estudio=$mysqli->query($tipo_estudio);

$formacion="SELECT IdFormacionDocente,CentroEstudios,NumOrden,Especialidad,TipoEstudio,NivelDocente,Inicio,Termino,Lugar 
FROM  tb_formacion_docente,tb_tipo_estudio_docente,tb_nivel_academico_docente
WHERE tb_formacion_docente.IdTipoEstudio=tb_tipo_estudio_docente.IdTipoEstudio 
and tb_formacion_docente.IdNivelDocente=tb_nivel_academico_docente.IdNivelDocente
 and tb_formacion_docente.IdDocente='".$_SESSION['IdDoc']."'";
$rs_formacion=$mysqli->query($formacion);
$fila_formacion=mysqli_fetch_array($rs_formacion);

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_docente['Nombres'],$fila_docente['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">
					
				</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="#">Carpeta Personal</a>
								</li>
								<li class="breadcrumb-item">
								  <a href="#">Formaci&#243;n Acad&#233;mica</a>
								</li>
								<li class="breadcrumb-item">
								  <a href="#">Ver Formaci&#243;n Acad&#233;mica</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="page-body">
				    <div class="row">
						<div class="col-lg-12">
							<div class="card">
								<div class="card-header bg-primary">
									<h5 class="card-header-text">Orden de Registro</h5>
								</div>
								<div class="card-block">
									<form name="formactualizarOrdenRegistro" method="post" action="" onsubmit="actualizarOrdenRegistro(); return false">
											  <input type="hidden" name="Id3" id="Id3" value="<?php echo $fila_formacion['IdFormacionDocente'];  ?>">
											  <div class="form-group row">
												   <label class="col-sm-2 col-form-label text-right">Orden de Registro :</label>
													<div class="col-sm-2">
													<input type="text" id="txt_orden" readonly class="form-control" value="<?php echo $fila_formacion['NumOrden'] ?>">
													</div>
													<label class="col-sm-2 col-form-label text-right">Cambiar A :</label>
													<div class="col-sm-2">
													     <select name="cb_num_orden" id="cb_num_orden" class="form-control form-control-primary">
															  <option value="1">1</option>
															  <option value="2">2</option>
															  <option value="3">3</option>
															  <option value="4">4</option>
															  <option value="5">5</option>
															  <option value="6">6</option>
															  <option value="7">7</option>
															  <option value="8">8</option>
															  <option value="9">9</option>
															  <option value="10">10</option>
													  </select>
													</div>
													<label class="col-sm-4 col-form-label text-right"></label>
												</div>
											    <div class="form-group row">
												    <label class="col-sm-2"></label>
													<div class="col-sm-3">
                                                      <input type="submit" class="btn btn-primary m-b-0" name="bt_actualizar_orden" id="bt_actualizar_orden" value="Actualizar Orden">
													</div>
													<label class="col-sm-7">
														<div id="mensajes3"></div>
													</label>
												</div>
									</form>
								</div>
							</div>
						</div>
				   </div>
					<div class="row">
						<div class="col-lg-12">
							<div class="card">
								<div class="card-header bg-primary">
									<h5 class="card-header-text">Formaci&#243;n Acad&#233;mica</h5>
								</div>
								<div class="card-block">
									<form name="formActualizarFormacionAcademica" method="post" action="" onsubmit="actualizarFormacionAcademica(); return false">
											  <input type="hidden" name="Id1" id="Id1" value="<?php echo $fila_formacion['IdFormacionDocente'];  ?>">
											  <div class="form-group row">
												   <label class="col-sm-2 col-form-label">Centro de Estudios :</label>
													<div class="col-sm-10">
													<input type="text" id="txt_centro_estudio" required class="form-control" value="<?php echo $fila_formacion['CentroEstudios'] ?>">
													</div>
												</div>
												<div class="form-group row">
												   <label class="col-sm-2 col-form-label text-right">Especialidad :</label>
													<div class="col-sm-10">
													<input type="text" id="txt_especialidad" required class="form-control" value="<?php echo $fila_formacion['Especialidad'] ?>">
													</div>
												</div>
												<div class="form-group row">
												   <label class="col-sm-2 col-form-label text-right">A&#241;o inicio :</label>
													<div class="col-sm-2">
													<input type="number" id="txt_inicio" required class="form-control" value="<?php echo $fila_formacion['Inicio'] ?>">
													</div>
													<label class="col-sm-2 col-form-label text-right">A&#241;o T&#233;rmino :</label>
													<div class="col-sm-2">
													  <input type="number" id="txt_termino" required class="form-control" value="<?php echo $fila_formacion['Termino'] ?>">
													</div>
													<label class="col-sm-4 col-form-label"></label>
												</div>
												
												<div class="form-group row">
												   <label class="col-sm-2 col-form-label text-right">Lugar/Ciudad :</label>
													<div class="col-sm-10">
													<input type="text" id="txt_lugar" required class="form-control" value="<?php echo $fila_formacion['Lugar'] ?>">
													</div>
												</div>
											    <div class="form-group row">
												    <label class="col-sm-2"></label>
													<div class="col-sm-3">
                                                      <input type="submit" class="btn btn-primary m-b-0" name="bt_actualizar_formacion" id="bt_actualizar_formacion" value="Actualizar Formaci&#243;n">
													</div>
													<label class="col-sm-7">
														<div id="mensajes1"></div>
													</label>
												</div>
									</form>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-lg-12">
							<div class="card">
								<div class="card-header bg-primary">
									<h5 class="card-header-text">Tipo de Estudio</h5>
								</div>
								<div class="card-block">
									<form name="formactualizarTipoEstudio" method="post" action="" onsubmit="actualizarTipoEstudio(); return false">
											  <input type="hidden" name="Id2" id="Id2" value="<?php echo $fila_formacion['IdFormacionDocente'];  ?>">
											  <div class="form-group row">
												   <label class="col-sm-2 col-form-label text-right">Tipo de Estudio :</label>
													<div class="col-sm-4">
													<input type="text" id="txt_tipo_estudio" readonly class="form-control" value="<?php echo $fila_formacion['TipoEstudio'] ?>">
													</div>
													<label class="col-sm-2 col-form-label text-right">Nivel Acad&#233;mico :</label>
													<div class="col-sm-4">
													<input type="text" id="txt_nivel_academico" readonly class="form-control" value="<?php echo $fila_formacion['NivelDocente'] ?>">
													</div>
												</div>
												
												<div class="form-group row">
												   <label class="col-sm-2 col-form-label text-right">Cambiar A :</label>
													<div class="col-sm-4">
													  <select name="cb_tipo_estudio" id="cb_tipo_estudio" class="form-control form-control-primary">
														   <option value="0">Seleccionar</option>
															<?php 
															  while($fila_tipo=mysqli_fetch_array($rs_tipo_estudio))
											                {
															   echo '<option value="'.$fila_tipo['IdTipoEstudio'].'">'.$fila_tipo['TipoEstudio'].'</option>';
														     }
															?>
												        </select>
													</div>
                                                     <label class="col-sm-2 col-form-label text-right">Cambiar A :</label>
                                                     <div class="col-sm-4">
													    <select name="cb_nivel" id="cb_nivel" class="form-control form-control-primary">
														   
												        </select>
													</div>
												</div>
											    <div class="form-group row">
												    <label class="col-sm-2"></label>
													<div class="col-sm-3">
                                                      <input type="submit" class="btn btn-primary m-b-0" name="bt_actualizar_tipo" id="bt_actualizar_tipo" value="Actualizar Tipo Estudio">
													</div>
													<label class="col-sm-7">
														<div id="mensajes2"></div>
													</label>
												</div>
									</form>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-lg-12">
							<div class="card">
								<div class="card-header bg-primary">
									<h5 class="card-header-text">Formaci&#243;n Acad&#233;mica</h5>
								</div>
								<div class="card-block">
									<form name="formEliminarFormacionAcademica" method="post" action="" onsubmit="eliminarFormacionAcademica(); return false">
											  <input type="hidden" name="Id4" id="Id4" value="<?php echo $fila_formacion['IdFormacionDocente'];  ?>">
											    <div class="form-group row">
												    <label class="col-sm-2"></label>
													<div class="col-sm-3">
                                                      <input type="submit" class="btn btn-danger m-b-0" name="bt_eliminar" id="bt_eliminar" value="Eliminar Formaci&#243;n">
													</div>
													<label class="col-sm-7">
														<div id="mensajes4"></div>
													</label>
												</div>
									</form>
								</div>
							</div>
						</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/jquery-ui/js/jquery-ui.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="assets/pages/waves/js/waves.min.js"></script>
<script  src="bower_components/jquery-slimscroll/js/jquery.slimscroll.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.min.js"></script>
<script src="js/ajax.js"></script>
<script  src="assets/js/bootstrap-growl.min.js"></script>
<script src="assets/pages/accordion/accordion.js"></script>
<script src="js/document.ready.js"></script>

</body>
</html>
<?php
}
else
{ 

echo "Error Ud. Debe Iniciar Sesion.................";

}
?>
