<?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" />

<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/css/style.css">
<link rel="stylesheet" href="assets/pages/notification/notification.css">
<link rel="stylesheet" href="assets/css/wysihtml5.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);

 $convocatoria="SELECT IdBolsaLaboral,Titulo,Detalles,RazonSocial,CarreraProfesional,Departamento,Vacantes,TipoHorario,Sueldo,Horario,FechaPublicacion,FechaLimite,TipoEntidad,FechaRegistro,EstadoConvocatoria 
                        FROM tb_bolsa_laboral,tb_carrera,tb_departamentos,tb_entidades
                         WHERE tb_bolsa_laboral.IdCarrera=tb_carrera.IdCarrera
                         and tb_bolsa_laboral.IdDepartamento= tb_departamentos.IdDepartamento
                         and tb_bolsa_laboral.IdRazonSocial=tb_entidades.IdRazonSocial
                         and IdBolsaLaboral='".base64_decode($_GET['id'])."'";
 $rs_convocatoria=$mysqli->query($convocatoria);
 $fila_ver_convocatoria=mysqli_fetch_array($rs_convocatoria);
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="#">Bolsa laboral</a>
								</li>
								<li class="breadcrumb-item">
								<a href="#">Ver Convocatorias</a>
								</li>
                <li class="breadcrumb-item">
               
                </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>Detalles de la Oferta Laboral</h5>
					  </div>
					  <div class="card-block">
			          <div class="row">
                         <div class="col-sm-12">
                          <h4 class="f-14 f-w-600 f-s-italic">T&#237;tulo :</h4>
                           <div class="p-4 mb-2 b-default rounded">
			                       <p class="mb-0"><?php echo $fila_ver_convocatoria['Titulo'];?></p>
			                     </div>
                         </div>
                      </div>
                      <div class="row">
                         <div class="col-sm-12">
                         <h4 class="f-14 f-w-600 f-s-italic">Detalle :</h4>
                           <div class="p-4 mb-3 b-default rounded">
			                         <?php echo $fila_ver_convocatoria['Detalles'];?>
                           </div>
                         </div>
                      </div>
                       <div class="row">
	                        <div class="col-sm-8">
	                            <h4 class="f-14 f-w-600 f-s-italic">Entidad Solicitante:</h4>
	                             <div class="p-2 mb-2 b-default rounded">
				                   <p><?php echo $fila_ver_convocatoria['RazonSocial'];?></p>
				                 </div>
	                         </div>
	                         <div class="col-sm-4">
	                            <h4 class="f-14 f-w-600 f-s-italic">Tipo de Entidad:</h4>
	                             <div class="p-2 mb-2 b-default rounded">
				                        <p><?php echo $fila_ver_convocatoria['TipoEntidad'];?></p>
				                       </div>
	                         </div> 
                        </div>
                        <div class="row">
                             <div class="col-sm-12">
                                <h4 class="f-14 f-w-600 f-s-italic">Dirigido a estudiantes / egresados de:</h4>
                                <div class="p-2 mb-2 b-default rounded">
			                             <p><?php echo $fila_ver_convocatoria['CarreraProfesional'];?></p>
                                </div>
                             </div>
                        </div>          
                        <div class="row">
                             <div class="col-sm-3">
                               <h4 class="f-14 f-w-600 f-s-italic">Ciudad:</h4>
                                 <div class="p-2 mb-2 b-default rounded">
                                   <p><?php echo $fila_ver_convocatoria['Departamento'];?></p>
                                 </div>
                             </div>
                             <div class="col-sm-3">
                              <h4 class="f-14 f-w-600 f-s-italic"># Vacantes:</h4>
	                            <div class="p-2 mb-2 b-default rounded">
	                              <p><?php echo $fila_ver_convocatoria['Vacantes'];  ?></p>
	                            </div>
                             </div>
                             <div class="col-sm-3">
                              <h4 class="f-14 f-w-600 f-s-italic">Sueldo S/. </h4>
                                <div class="p-2 mb-2 b-default rounded">
                                  <p><?php echo $fila_ver_convocatoria['Sueldo'];?></p>
                                </div>
                             </div>
                             <div class="col-sm-3">
                                <h4 class="f-14 f-w-600 f-s-italic">Tipo de Horario:</h4>
                                <?php
                                 if($fila_ver_convocatoria['TipoHorario']=='TC')
                                   	{$tipo_horario="TIEMPO COMPLETO";}else{$tipo_horario="TIEMPO PARCIAL";}
                                ?>
                                <div class="p-2 mb-2 b-default rounded">
                                   <p><?php echo $tipo_horario;?></p>
                                </div>
                             </div>
                        </div>
                        <div class="row">
                             <div class="col-sm-6">
                               <h4 class="f-14 f-w-600 f-s-italic">Horario :</h4>
                                 <div class="p-2 mb-2 b-default rounded">
                                   <p><?php echo $fila_ver_convocatoria['Horario'];?></p>
                                 </div>
                             </div>
                               <div class="col-sm-3">
                               <?php $fecha_publicacion = new DateTime($fila_ver_convocatoria['FechaPublicacion']); ?>
                              <h4 class="f-14 f-w-600 f-s-italic">Fecha Publicaci&#243;n:</h4>
                                <div class="p-2 mb-2 b-default rounded">
                                  <p><?php echo $fecha_publicacion->format('d-m-Y');?></p>
                                </div>
                             </div>
                             <div class="col-sm-3">
                              <?php $fecha_limite = new DateTime($fila_ver_convocatoria['FechaLimite']); ?>
                                <h4 class="f-14 f-w-600 f-s-italic">Fecha L&#237;mite : </h4>
                                 <div class="p-2 mb-2 b-default rounded">
                                   <p><?php echo $fecha_limite->format('d-m-Y');?></p>
                                 </div>
                             </div>
                        </div>
                      <a href="verOfertasLabEgresados.php" class="btn btn-secondary"><i class="fa fa-mail-reply"></i>Volver</a>                     
					  </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="assets/js/bootstrap-growl.min.js"></script>
<script src="js/ajax.js"></script>
</body>
</html>
<?php
}
else
{ 
echo "Error Ud. Debe Iniciar Sesion.................";
}
?>
