<?php
session_start();
     if( (isset($_SESSION['IdStudent'])) &&($_SESSION['IdStudent']>0))
   {  
?>
<!DOCTYPE html>
<html>
<head>
<title>IESTP-Abancay</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/font-awesome/css/font-awesome.min.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();

$estudiante="SELECT IdEstudiante,Apellidos,Nombres,UrlFoto,Dni,Email,NumCelular,FechaNac,Edad,Domicilio
              FROM tb_estudiantes 
              WHERE IdEstudiante='".$_SESSION['IdStudent']."'";
$rs=$mysqli->query($estudiante);
$fila_estudiante=mysqli_fetch_array($rs);

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">
        <?php
           MenuSuperior($fila_estudiante['Nombres'],$fila_estudiante['UrlFoto'],$_SESSION['Carrera']);
         ?>
<div class="pcoded-main-container">
  <div class="pcoded-wrapper">
    <?php
       MenuPrincipal();
     ?>
<div class="pcoded-content">
  <div class="page-header card">
      <div class="row align-items-end">
		<div class="col-lg-8">
			<div class="page-header-title">
				<div class="d-inline">
				</div>
			</div>
		</div>
		<div class="col-lg-4">
			<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="#">Actualizar Datos Personales</a>
				</li>
				</ul>
			</div>
		</div>
      </div>
  </div>
<div class="pcoded-inner-content">
<div class="main-body">
<div class="page-wrapper">
<div class="page-body">
	  <div class="card">
        <form name="formDatosPersonales" method="post" action="" onsubmit="actualizarDatosPersonales(); return false">
		<input type="hidden" name="IdEst" id="IdEst" value="<?php echo $fila_estudiante['IdEstudiante'];  ?>">
		<div class="card-header bg-primary">
		    <h5>Actualizar Datos Personales</h5>
		</div>
		  <div class="card-block pt-1 pb-1">
			  <div class="form-group row">
			      <div class="col-sm-3">
			        <label class="f-14 f-w-600 f-s-italic" for="txt_dni">DNI :</label>
			        <input type="text" id="txt_dni" class="form-control" readonly value="<?php echo $fila_estudiante['Dni']; ?>">
			      </div>
			      <div class="col-sm-4">
					<label class="f-14 f-w-600 f-s-italic" for="txt_apellidos">Nombres :</label>
                     <input type="text" id="txt_nombres" class="form-control" readonly value="<?php echo $fila_estudiante['Nombres']; ?>" >
				  </div>
				  <div class="col-sm-5">
				     <label class="f-14 f-w-600 f-s-italic" for="txt_apellidos">Apellidos :</label>
				     <input type="text" id="txt_apellidos" class="form-control" readonly value="<?php echo $fila_estudiante['Apellidos']; ?>" >
				  </div>
			  </div>
				<div class="form-group row">
				   <div class="col-sm-3">
                    <label class="f-14 f-w-600 f-s-italic" for="txt_fecha_nac">Fecha Nac.:</label>
				     <input type="date" id="txt_fecha_nac" class="form-control"  required value="<?php echo $fila_estudiante['FechaNac']; ?>">
				   </div>
				   <div class="col-sm-1">
                    <label class="f-14 f-w-600 f-s-italic" for="txt_edad">Edad:</label>
				    <input type="text" id="txt_edad" class="form-control" readonly value="<?php echo $fila_estudiante['Edad']; ?>">
				   </div>
                    <div class="col-sm-3">
                     <label class="f-14 f-w-600 f-s-italic" for="txt_celular">NumCelular:</label>
                     <input type="number" id="txt_celular" class="form-control" placeholder="Ingrese Celular" maxlength="10" value="<?php echo $fila_estudiante['NumCelular']; ?>">
                    </div>
                    <div class="col-sm-5">
                     <label class="f-14 f-w-600 f-s-italic" for="txt_email">Email:</label>
                     <input type="email" id="txt_email" class="form-control" required maxlength="60" placeholder="Ingrese Email" value="<?php echo $fila_estudiante['Email']; ?>">
				   </div>
				</div>
				<div class="form-group row">
				   <div class="col-sm-7">
                     <label class="f-14 f-w-600 f-s-italic" for="txt_domicilio">Domicilio:</label>
                     <input type="txt" id="txt_domicilio" class="form-control" required maxlength="100" placeholder="Ingrese domicilio" value="<?php echo $fila_estudiante['Domicilio']; ?>">
				   </div>
				   <div class="col-sm-5">
                     
				   </div>
				</div>
		  </div>
		  <div class="card-footer pt-0 pb-2">
		  	<div class="form-group row">
				<div class="col-sm-12 text-center b-t-default pt-3">
                  <input type="submit" class="btn btn-primary" name="bt_actualizar_personal" id="bt_actualizar_personal" value="Actualizar">
				</div>
			</div>
		  </div>
        </form>
	  </div>
</div>
</div>
</div>
</div>
</div>

</div>
</div>
</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/bootstrap-growl.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.min.js"></script>
<script src="js/ajax.js"></script>
</body>
</html>
<?php
}
else
{ 
header("Location: index.php");
}
?>
