<?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/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
              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>
		</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">
				
				</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">
		  <div class="card-header bg-primary">
		    <h5>Actualizar fotograf&#237;a</h5>
			<div class="card-header-right">
			</div>
		  </div>
		  <div class="card-block">
	           <form name="formAdjuntarFotografia" action="uploadFotografia.php" method="post" id="formAdjuntarFotografia" enctype="multipart/form-data">
	                 <input type="hidden" name="IdEst" id="IdEst" value="<?php echo $fila_estudiante['IdEstudiante'];  ?>">     
						<input type="hidden" name="dni" id="dni" value="<?php echo $fila_estudiante['Dni'];  ?>">
						<div class="form-group row">
								   
									<div class="col-sm-12">
										 <p>Las dimensiones de la fotograf&#237;a deben tener como m&#237;nimo la siguiente medida : Ancho de 200px y de Alto de 280px, y debe ser en formato jpeg. 
										 </p>
									</div>
						</div>
					    <div class="form-group row">
								   
									<div class="col-sm-12">
									<input type="file" id="file_fotografia" class="form-control" required name="file_fotografia">
									</div>
						</div>
						<div class="form-group row">
						    
							<div class="col-sm-12">
	                            <div class="progress">
	                                 <div class="bar bg-success"></div>
	                                 <div class="percent">0%</div>
	                            </div>
	                            
							</div>
						</div>
						<div class="form-group row">
						    
							<div class="col-sm-2">
	                          <input type="submit" class="btn btn-primary m-b-0" name="bt_actualizar_fotografia" id="bt_actualizar_fotografia" value="Actualizar">
							</div>
							<label class="col-sm-10">
								<div id="status"></div>
							</label>
						</div>
					</form>								    	
                                   
		  </div>
	  </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/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/jquery.form.js"></script>
<script src="js/progressBar.js"></script>
</body>
</html>
<?php
}
else
{ 

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

}
?>
