<?php

include '../conector.php';
session_start();

if(isset($_SESSION["user"]) && ($_SESSION["tipo"]=='E'||$_SESSION["tipo"]=='P')){

if($_SESSION["tipo"]=='E'){$cuenta="select estudiante.estudiante_id,estudiante.curso_id,estudiante.vernotas from estudiante where usuario='".$_SESSION["user"]."'	and estudiante.estado_est='A'";}
//if($_SESSION["tipo"]=='P'){$cuenta="select estudiante.estudiante_id,estudiante.curso_id from estudiante where usuario_acud='".$_SESSION["user"]."'	and estudiante.estado_est='A'";}
if($_SESSION["tipo"]=='P'){$cuenta="select estudiante.estudiante_id,estudiante.curso_id,estudiante.vernotas from estudiante where estudiante.estudiante_id=".$_SESSION["estudiante"]." ";}

$res_cuenta=mysql_query($cuenta);
$rs_cta=mysql_fetch_array($res_cuenta);
/*********Verificacion Pension**********/
$select_pagos="select count(*) 
from pagos 
where
estado='D' 
and titulo='P'
and estudiante='".$rs_cta[0]."' "; 

$res_select_pagos=mysql_query($select_pagos);
$rs_pagos=mysql_fetch_array($res_select_pagos);



if($rs_pagos[0]>0){


echo "<div align='center'><h3>El Gestor Académico CDLE solo estará habilitado para estudiantes al día en su mensualidad.</h3></div>

<!DOCTYPE html>
<html lang=\"en\">
  <head>
    <meta charset=\"utf-8\">
    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">
    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
    <meta name=\"description\" content=\"\">
    <meta name=\"author\" content=\"\">
    <link rel=\"shortcut icon\" href=\"../assets/ico/favicon.ico\">

    <title>Bienvendio</title>

    <!-- Bootstrap core CSS -->
    <link href=\"../dist/css/bootstrap.min.css\" rel=\"stylesheet\">

    <!-- Custom styles for this template -->
";
	 include 'fuente.php'; 
echo " 
    <link href=\"../offcanvas.css\" rel=\"stylesheet\">

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src=\"../assets/js/ie8-responsive-file-warning.js\"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src=\"https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js\"></script>
      <script src=\"https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js\"></script>
    <![endif]-->
  </head>

  <body>
    <div class=\"navbar navbar-fixed-top navbar-inverse\" role=\"navigation\">
      <div class=\"container\">
        <div class=\"navbar-header\">
          <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-collapse\">
            <span class=\"sr-only\">Toggle navigation</span>
         
          </button>
         
         
          
          <a  href=\"general.php\" ><img src='../img/logo1.png' style='margin-top:5px'></a>
          

        </div>
      	
        <a href=\"../index.php\"><img src='../img/salir.png' style='float:right;margin-top:15px'>
       </a>

<span style='float:right;margin-right:10px; margin-top:15px' class='label label-success'><span class='glyphicon glyphicon-user'></span> ".$_SESSION["user"]."</span>

      	
      </div><!-- /.container -->
    </div><!-- /.navbar -->

    <div class=\"container\">

      <div class=\"row row-offcanvas row-offcanvas-left\">
	<div class=\"collapse navbar-collapse\">
          <ul class=\"nav navbar-nav\">
           
          </ul>
        </div><!-- /.nav-collapse -->

 <div class=\"col-xs-6 col-sm-3 sidebar-offcanvas\" id=\"sidebar\" role=\"navigation\">
          <div class=\"list-group\">
";
if($_SESSION["tipo"]=='P'){
echo            "            <a href=\"previo.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-th\"></span> Estudiantes</a>
			<a href=\"pagos.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-list\"></span> Pagos</a>                       ";
}
echo        "
                                
          </div>
        </div><!--/span-->
 </body>
</html>";
}else{


/*********fin verif pagos*********/
  $class1="class=\"active\"";
  $class2="";
  $act2="";
  $act1=" active ";



$select_doc="select  docente.teacher_id,
docente.nombre,
docente.fecha_nacimiento,
docente.sexo,
docente.grupo_sangre,
docente.direccion,
docente.telefono,
docente.email,
docente.estado,
(select nombre_archivo from upload_doc where upload_doc.codigo=docente.teacher_id and clase='F'),
docente.identi,
docente.eps,
docente.pension,
docente.escalafon,
docente.especialidad,
docente.obs,
(select usuarios.name from usuarios where usuarios.cuenta=docente.email ),
(select usuarios.password from usuarios where usuarios.cuenta=docente.email ),
asignatura.nombre
from docente,pensum,asignatura
where docente.teacher_id=pensum.teacher_id
and pensum.asignatura_id=asignatura.subject_id
and pensum.class_id='".$rs_cta[1]."'
 and docente.estado in ('A','I') 

";

 $res_select_doc=mysql_query($select_doc);
			
					$tbody="<tbody>";
					while($r_sd=mysql_fetch_array($res_select_doc)){
					if(!empty($r_sd[9])&&isset($r_sd[9])){$foto="<div align=center><img style='
						border-radius: 50%;
						-moz-border-radius: 50%;
						-webkit-border-radius: 50%;
						-khtml-border-radius: 50%;
						border: 2px solid #cee6fb;
						 overflow: hidden;'  src='../img/foto/".$r_sd[9]."' width='50px' height='50px' ></div>";}
					else{$foto="<div align=center><img style='
						border-radius: 50%;
						-moz-border-radius: 50%;
						-webkit-border-radius: 50%;
						-khtml-border-radius: 50%;
						border: 2px solid #cee6fb;
						 overflow: hidden;'  src='../img/foto/anon.png' width='50px' height='50px' ></div>";}
					
					if($r_sd[8]=='A'){$est='Activo';$lab='success ';}else{$est='Inactivo';$lab='danger ';}
					$disabled=' disabled ';$tipo='password';
					if($rs_cta[0]==$r_sd[7]){$disabled='';$tipo='text';}
					$tbody.="<tr role='row'>
						<td  style='vertical-align: middle;'>".$r_sd[0]."</td>
						<td style='vertical-align: middle;'>$foto</td>
						<td style='vertical-align: middle;'>".$r_sd[1]."</td>
						<td style='vertical-align: middle;'>".$r_sd[18]."</td>						
						<td style='vertical-align: middle;'><span class='label label-".$lab."'>".$est."</span></td>
						<td style='vertical-align: middle;'>
					<a class='btn btn-info btn-xs' name='".$r_sd[0]."' id='".$r_sd[0]."' data-toggle='modal' data-target='#mimodala".$r_sd[0]."'  >
                			<i class='glyphicon glyphicon-edit icon-white'></i>  
			                ver               
				            </a>
						</td>
						</tr>";
					

					$tbody.="</tbody>";

						$tbody2.="<div name='mimodala".$r_sd[0]."' id='mimodala".$r_sd[0]."' class='modal fade bs-example-modal-sm' tabindex='-1' role='dialog' aria-labelledby='mySmallModalLabel' aria-hidden='true'>
						  <div class='modal-dialog modal-md'>
						    <div class='modal-content'>
						      <div class='modal-header'>
							      <button type='button' class='close' data-dismiss='modal' aria-hidden='true'>x</button>
						      		<h4 class='modal-title' id='myLargeModalLabel'>Consultar Docente</h4>
	      					      </div>
	      					      <div class='modal-body'>";
						
						     //     $select_obs_doc="select * from observacion_docente where planilla=".$_POST['per1']." and estudiante=".$r_sce[0]."   ";
						       //   $res_select_obs_doc=mysql_query($select_obs_doc);
						        //  while($r_sodoc=mysql_fetch_array($res_select_obs_doc)){

								 $tbody2.="<div>

									".str_replace('50px','75px',$foto)."
									</div>
									<br>
									<div align=center>
									<b>$r_sd[1]</b>
									</div>
									<br>";
								$a1='';$a2='';
								if($r_sd[3]=='Masculino'){$a1=' selected ';}
								if($r_sd[3]=='Femenino'){$a2=' selected ';}								
								$b1='';$b2='';$b3='';$b4='';$b5='';$b6='';$b7='';$b8='';
								$c1='';$c2='';
								if($r_sd[4]=='AB+'){$b1=' selected ';}
								if($r_sd[4]=='AB-'){$b2=' selected ';}
								if($r_sd[4]=='B+'){$b3=' selected ';}
								if($r_sd[4]=='B-'){$b4=' selected ';}
								if($r_sd[4]=='A+'){$b5=' selected ';}
								if($r_sd[4]=='A-'){$b6=' selected ';}
								if($r_sd[4]=='O+'){$b7=' selected ';}
								if($r_sd[4]=='O-'){$b8=' selected ';}
								if($r_sd[8]=='A'){$c1=' selected ';}
								if($r_sd[8]=='I'){$c2=' selected ';}								
								
														
								
								$tbody2.="
								 
								 <div class='input' style='float:left;width: 120px;padding-top: 5px;padding-left: 10px;text-align: left;height:20px;font-size:12px;' >
								Nombre &nbsp;  </div>
								 <div class='input' ><input  $disabled  value='".$r_sd[1]."' id='nombre".$r_sd[0]."' name='nombre".$r_sd[0]."' type='text' class='form-control2' style='width:50%;margin-bottom: 10px' >
								 </div>

								
 <div class='input' style='float:left;width: 120px;padding-top: 5px;padding-left: 10px;text-align: left;height:20px;font-size:12px;' >								 
							Correo&nbsp;  </div>
								 <div class='input' ><input $disabled  id='correo".$r_sd[0]."' name='correo".$r_sd[0]."' value='".$r_sd[7]."' type='text' class='form-control2' style='width:50%;margin-bottom: 10px' >
								 </div>
								";
/************************/								 
$select_docente="select distinct horario_at.docente,docente.nombre
				 from horario_at,docente  
				 where horario_at.estado='A' 
				  and docente.teacher_id=horario_at.docente
				  and docente.teacher_id=".$r_sd[0]."
				 order by horario_at.dia";
					$res_select_docente=mysql_query($select_docente);


 $select_horario="select 
			 docente,dia,hi,mi,hf,mf
			 from horario_at 
			 where horario_at.estado='A' order by dia";
			 $res_select_horario=mysql_query($select_horario);

					$tbody2.="
					<div align='center' style='margin-top:5px;font-size:12px;'>
					<h4>Horario de Atenci&oacute;n</h4>
					</div>
					<div align='center' >

					<div align='center' style='margin-top:5px;font-size:10px;font-WEIGHT:bold;float:right;'>
					<div  class='input' style='color:#ffffff;background-color:#4fad45;float:left;padding-left: 10px;width: 70px;'>Dir. Grupo</div>
					<div  class='input' style='color:#ffffff;background-color:#4fad45;float:left;padding-left: 5px;width: 90px;'>Asignaturas</div>
					<div  class='input' style='color:#ffffff;background-color:#4fad45;float:left;padding-left: 5px;width: 60px;'>Lunes</div>
					<div  class='input' style='color:#ffffff;background-color:#4fad45;float:left;padding-left: 5px;width: 60px;'>Martes</div>
					<div  class='input' style='color:#ffffff;background-color:#4fad45;float:left;padding-left: 5px;width: 65px;'>Miercoles</div>
					<div  class='input' style='color:#ffffff;background-color:#4fad45;float:left;padding-left: 5px;width: 60px;'>Jueves</div>
					<div  class='input' style='color:#ffffff;background-color:#4fad45;float:left;padding-left: 5px;width: 60px;'>Viernes</div>
					<div  class='input' style='color:#ffffff;background-color:#4fad45;float:right;padding-left: 5px;width: 60px;'></div>					
					
					
					<br>
					
					";
					while($doc=mysql_fetch_array($res_select_docente)){
					
					$tbody2.="
					
					<div align='left' style='margin-top:5px;font-WEIGHT:normal;font-size:9px;float:left;'>
						<div  class='input' style='float:left;padding-left: 10px;font-size:9px;width: 70px;'>
						";
					$select_curso="select curso_id,codigo,nombre,id_docente,estado
					from curso where id_docente='".$doc[0]."' and estado='A' ";
					$res_select_curso=mysql_query($select_curso);
					$num_curso=mysql_num_rows($res_select_curso);
					
					if($num_curso>0){
						while($cur=mysql_fetch_array($res_select_curso)){
						$tbody2.=" - ".$cur[2]."<br>";
						}
					}else{$tbody2.="  <br>";}

					$tbody2.="
						</div>
						<div  class='input' style='float:left;padding-left: 10px;font-WEIGHT:normal;font-size:9px;width: 90px;'>";
						
					$select_asig="select asignatura.nombre,(select curso.codigo from curso where pensum.class_id=curso.curso_id),asignatura.subject_id
					from pensum,asignatura,docente 
					where docente.teacher_id='".$doc[0]."' 
					and pensum.teacher_id=docente.teacher_id
					and pensum.asignatura_id=asignatura.subject_id
					and pensum.estado='A' 
					
					";
					$res_select_asig=mysql_query($select_asig);
					$num_asig=mysql_num_rows($res_select_asig);
					
					if($num_asig>0){
						while($asi=mysql_fetch_array($res_select_asig)){
						$tbody2.=" - ".$asi[0]." ".$asi[1]."<br>";
						}
					}else{$tbody2.="  <br>";}
						
					$tbody2.="
						</div>
						<div  class='input' style='float:left;padding-left: 10px;font-WEIGHT:normal;font-size:9px;width: 60px;'>";	
						$sel_hora="select Id,dia,hi,mi,hf,mf 
						from horario_at
						where docente=".$doc[0]." 
						and dia=1";	
					$res_sel_hora=mysql_query($sel_hora);
					$num_hor=mysql_num_rows($res_sel_hora);
					if($num_hor>0){
						while($hor=mysql_fetch_array($res_sel_hora)){
						if($hor[3]==0){$hor[3]='00';}if($hor[3]==5){$hor[3]='05';}
						if($hor[5]==0){$hor[5]='00';}if($hor[5]==5){$hor[5]='05';}
						//$tbody2.="(".$hor[2].":".$hor[3]." - ".$hor[4].":".$hor[5].")";
						
						$tbody2.="<div class='btn-group'>
								  <button type='button' class='btn btn-warning btn-xs dropdown-toggle' data-toggle='dropdown' style='font-size:9px;margin-bottom:5px'>
								    ".$hor[2].":".$hor[3]." ".$hor[4].":".$hor[5]."
								  </button>
								
								</div>
								<br>";
						}
					}else{$tbody2.="  <br>";}
					$tbody2.="
						</div>
						<div  class='input' style='float:left;padding-left: 10px;font-size:9px;width: 60px;'>";	
						$sel_hora="select Id,dia,hi,mi,hf,mf 
						from horario_at
						where docente=".$doc[0]." 
						and dia=2";	
					$res_sel_hora=mysql_query($sel_hora);
					$num_hor=mysql_num_rows($res_sel_hora);
					if($num_hor>0){
						while($hor=mysql_fetch_array($res_sel_hora)){
						if($hor[3]==0){$hor[3]='00';}if($hor[3]==5){$hor[3]='05';}
						if($hor[5]==0){$hor[5]='00';}if($hor[5]==5){$hor[5]='05';}
						//$tbody2.="(".$hor[2].":".$hor[3]." - ".$hor[4].":".$hor[5].")";
						
						$tbody2.="<div class='btn-group'>
								  <button type='button' class='btn btn-warning btn-xs dropdown-toggle' data-toggle='dropdown' style='font-size:9px;margin-bottom:5px'>
								    ".$hor[2].":".$hor[3]." ".$hor[4].":".$hor[5]."
								  </button>
								
								</div>
								<br>";
						}
					}else{$tbody2.="  <br>";}

					$tbody2.="
						</div>
						<div  class='input' style='float:left;padding-left: 10px;font-size:9px;width: 65px;'>";	
						$sel_hora="select Id,dia,hi,mi,hf,mf 
						from horario_at
						where docente=".$doc[0]." 
						and dia=3";	
					$res_sel_hora=mysql_query($sel_hora);
					$num_hor=mysql_num_rows($res_sel_hora);
					if($num_hor>0){
						while($hor=mysql_fetch_array($res_sel_hora)){
						if($hor[3]==0){$hor[3]='00';}if($hor[3]==5){$hor[3]='05';}
						if($hor[5]==0){$hor[5]='00';}if($hor[5]==5){$hor[5]='05';}
						//$tbody2.="(".$hor[2].":".$hor[3]." - ".$hor[4].":".$hor[5].")";
						
						$tbody2.="<div class='btn-group'>
								  <button type='button' class='btn btn-warning btn-xs dropdown-toggle' data-toggle='dropdown' style='font-size:9px;margin-bottom:5px'>
								    ".$hor[2].":".$hor[3]." ".$hor[4].":".$hor[5]."
								  </button>
								
								</div>
								<br>";
						}
					}else{$tbody2.="  <br>";}
					$tbody2.="
						</div>
						<div  class='input' style='float:left;padding-left: 10px;font-size:9px;width: 60px;'>";	
						$sel_hora="select Id,dia,hi,mi,hf,mf 
						from horario_at
						where docente=".$doc[0]." 
						and dia=4";	
					$res_sel_hora=mysql_query($sel_hora);
					$num_hor=mysql_num_rows($res_sel_hora);
					if($num_hor>0){
						while($hor=mysql_fetch_array($res_sel_hora)){
						if($hor[3]==0){$hor[3]='00';}if($hor[3]==5){$hor[3]='05';}
						if($hor[5]==0){$hor[5]='00';}if($hor[5]==5){$hor[5]='05';}
						//$tbody2.="(".$hor[2].":".$hor[3]." - ".$hor[4].":".$hor[5].")";
						
						$tbody2.="<div class='btn-group'>
								  <button type='button' class='btn btn-warning btn-xs dropdown-toggle' data-toggle='dropdown' style='font-size:9px;margin-bottom:5px'>
								    ".$hor[2].":".$hor[3]." ".$hor[4].":".$hor[5]."
								  </button>
								
								</div>
								<br>";
						}
					}else{$tbody2.="  <br>";}
					
					$tbody2.="
						</div>
						<div  class='input' style='float:left;padding-left: 10px;font-size:9px;width: 60px;'>";	
						$sel_hora="select Id,dia,hi,mi,hf,mf 
						from horario_at
						where docente=".$doc[0]." 
						and dia=5";	
					$res_sel_hora=mysql_query($sel_hora);
					$num_hor=mysql_num_rows($res_sel_hora);
					if($num_hor>0){
						while($hor=mysql_fetch_array($res_sel_hora)){
						if($hor[3]==0){$hor[3]='00';}if($hor[3]==5){$hor[3]='05';}
						if($hor[5]==0){$hor[5]='00';}if($hor[5]==5){$hor[5]='05';}
						//$tbody2.="(".$hor[2].":".$hor[3]." - ".$hor[4].":".$hor[5].")";
						
						$tbody2.="<div class='btn-group'>
								  <button type='button' class='btn btn-warning btn-xs dropdown-toggle' data-toggle='dropdown' style='font-size:9px;margin-bottom:5px'>
								    ".$hor[2].":".$hor[3]." ".$hor[4].":".$hor[5]."
								  </button>
								
								</div>
								<br>";
						}
					}else{$tbody2.="  <br>";}


$tbody2.="						
					</div>
					</div>
					";
					
					}

					$tbody2.="</div> 
					</div>
					
					</div>
					<br>
					";
/********************/								 


						 $tbody2.="<br>
						 	<div style='padding: 10px;font-size:9px;'>
							<button type=\"button\" class=\"btn btn-success btn-xs\" data-dismiss='modal' >Cerrar</button>
							</div>";								
								
						$tbody2.="
							</div>
						    </div>
						  </div>
						</div>	";	
					
					
					
					}


echo "
<!DOCTYPE html>
<html lang=\"en\">
  <head>
    <meta charset=\"utf-8\">
    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">
    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
    <meta name=\"description\" content=\"\">
    <meta name=\"author\" content=\"\">
    <link rel=\"shortcut icon\" href=\"../assets/ico/favicon.ico\">
	<style>
	.fileUpload {
	position: relative;
	overflow: hidden;
	margin: 10px;
	}
	.fileUpload input.upload {
	position: absolute;
	top: 0;
	right: 0;
	margin: 10px;
	padding: 10px;
	font-size: 12px;
	cursor: pointer;
	opacity: 0;
	filter: alpha(opacity=0);
	}
	</style>
    <title>Docentes</title>

    <!-- Bootstrap core CSS -->
    <link href=\"../dist/css/bootstrap.min.css\" rel=\"stylesheet\">

    <!-- Custom styles for this template -->
";
	 include 'fuente.php'; 
echo " 
    <link href=\"../offcanvas.css\" rel=\"stylesheet\">

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src=\"../assets/js/ie8-responsive-file-warning.js\"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src=\"https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js\"></script>
      <script src=\"https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js\"></script>
    <![endif]-->
    <script>
   
function actualizar_docente(ide){

if(document.getElementById('nombre'+ide).value==''){alert('Debe digitar el documento de identidad');return false;}
	else{document.getElementById('nombre1').value=document.getElementById('nombre'+ide).value}


if(document.getElementById('identi'+ide).value==''){alert('Debe digitar el documento de identidad');return false;}
	else{document.getElementById('identi1').value=document.getElementById('identi'+ide).value}
	
if(document.getElementById('fecha_nacimiento'+ide).value==''){alert('Debe digitar el fecha nacimiento');return false;}
	else{document.getElementById('fecha_nacimiento1').value=document.getElementById('fecha_nacimiento'+ide).value}
if(document.getElementById('sexo'+ide).value=='XX'){alert('Debe seleccionar el sexo');return false;}
	else{document.getElementById('sexo1').value=document.getElementById('sexo'+ide).value}
if(document.getElementById('grupo_sangre'+ide).value=='XX'){alert('Debe seleccionar el grupo de sangre');return false;}
	else{document.getElementById('grupo_sangre1').value=document.getElementById('grupo_sangre'+ide).value}


if(document.getElementById('eps'+ide).value==''){alert('Debe digitar EPS docente');return false;}
	else{document.getElementById('eps1').value=document.getElementById('eps'+ide).value}
if(document.getElementById('pension'+ide).value==''){alert('Debe digitar el fonde de pension del docente');return false;}
	else{document.getElementById('pension1').value=document.getElementById('pension'+ide).value}
if(document.getElementById('escalafon'+ide).value==''){alert('Debe digitar el escalafon del docente');return false;}
	else{document.getElementById('escalafon1').value=document.getElementById('escalafon'+ide).value}
if(document.getElementById('especialidad'+ide).value==''){alert('Debe digitar la especialidad del docente');return false;}
	else{document.getElementById('especialidad1').value=document.getElementById('especialidad'+ide).value}

	
if(document.getElementById('direccion'+ide).value==''){alert('Debe digitar la direccion');return false;}
	else{document.getElementById('direccion1').value=document.getElementById('direccion'+ide).value}
if(document.getElementById('telefono'+ide).value==''){alert('Debe digitar el telefono');return false;}
	else{document.getElementById('telefono1').value=document.getElementById('telefono'+ide).value}
if(document.getElementById('correo'+ide).value==''){alert('Debe digitar el correo');return false;}
	else{document.getElementById('correo1').value=document.getElementById('correo'+ide).value}
if(document.getElementById('usuario'+ide).value==''){alert('Debe digitar el usuario');return false;}
	else{document.getElementById('usuario1').value=document.getElementById('usuario'+ide).value}
if(document.getElementById('pass'+ide).value==''){alert('Debe digitar el password');return false;}
	else{document.getElementById('pass1').value=document.getElementById('pass'+ide).value}
if(document.getElementById('obs'+ide).value==''){}
	else{document.getElementById('obs1').value=document.getElementById('obs'+ide).value}
	document.getElementById('ide1').value=ide;
	document.getElementById('estado1').value=document.getElementById('estado'+ide).value;
	
document.getElementById('val1').value=1;
	document.forms['gestion_doc'].submit();	

}


function validarEmail( email ) {
    expr = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    if ( !expr.test(email) && email!='no tiene')
        alert('Error: La direccion de correo - ' + email + ' - es incorrecta.');
}
</script>
  
    
    
    
  </head>

  <body>
    <div class=\"navbar navbar-fixed-top navbar-inverse\" role=\"navigation\">
     <div class=\"container\">
        <div class=\"navbar-header\">
          <button type=\"button\" class=\"navbar-toggle hidden-xs\" data-toggle=\"collapse\" data-target=\".navbar-collapse\">
            <span class=\"sr-only\">Toggle navigation</span>
         
          </button>
         
         
          
          <a  href=\"general.php\" class='hidden-xs' ><img src='../img/logo1.png'  style='margin-top:5px;'></a>
	         <div align='' class='visible-xs'>
		            <a  href=\"general.php\"  ><img src='../img/logo1.png' width='248px' style='margin-top:10px;margin-left:5px'></a>";

if($_SESSION["tipo"]=='P'){
			
echo	"<a href='previo.php' ><span style='float:right;margin-right:10px; margin-top:15px' class='label label-success '> <span class='glyphicon  glyphicon-zoom-in'></span> </span></a>";
					}
echo
		         "<a href=\"../index.php\" ><img src='../img/salir2.png' style='float:right;margin-top:15px;margin-right:10px'></a>
	         </div>

        </div>
      	<a href=\"../index.php\" class='hidden-xs'><img src='../img/salir.png' style='float:right;margin-top:15px'>
 	      	
         </a>

       ";          
if($_SESSION["tipo"]=='P'){
			
				echo	"<a href='previo.php'><span style='float:right;margin-right:10px; margin-top:15px' class='label label-success hidden-xs'>Seleccionar <span class='glyphicon  glyphicon-zoom-in'></span> </span></a>";
					}
echo			"
       <span style='float:right;margin-right:10px; margin-top:15px' class='label label-success hidden-xs'><span class='glyphicon glyphicon-user'></span> ".$_SESSION["user"]."  </span>  
      	
      </div><!-- /.container -->

    </div><!-- /.navbar -->


    <div class=\"container\">

      <div class=\"row row-offcanvas row-offcanvas-left\">

       <div class=\"col-xs-6 col-sm-3 sidebar-offcanvas\" id=\"sidebar\" role=\"navigation\">
          

          
          
          <div class=\"list-group\">
            <a href=\"general.php\" class=\"list-group-item \" data-rel='popover' data-content='Dashboard' data-original-title><span class=\"glyphicon glyphicon-home\"></span> General</a>
            <a href=\"estudiantes.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-th\"></span> Estudiantes</a>
            <a href=\"docentes.php\" class=\"list-group-item active\"><span class=\"glyphicon glyphicon-user\"></span> Docentes</a>
            <a href=\"horario.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-edit\"></span> Horario</a>
            <a href=\"planilla.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-file\"></span> Calificaciones</a>";            
	    if($rs_cta[2]=='1'){echo "<a href=\"reportes.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-file\"></span> Informes</a>";}
echo            "<a href=\"planilla_obs.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-file\"></span> Control Disciplina</a>    ";
if($_SESSION["tipo"]=='P'){
echo            "<a href=\"pagos.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-list\"></span> Pagos</a>                       ";
}
echo        "
                                
          </div>
        </div><!--/span-->

        <div class=\"col-xs-12 col-sm-9\">
          <p class=\"pull-left visible-xs\">
            <button type=\"button\" class=\"btn btn-primary btn-xs\" data-toggle=\"offcanvas\">menu</button>
          </p>
    
	<div class=\"panel panel-default\">
	<br>";
echo $men;
echo	      "<!-- Nav tabs -->
	<ul class=\"nav nav-tabs\">
		<li >&nbsp;</li>
	  <li $class1 ><a href=\"#gestion_docente\" data-toggle=\"tab\">Gestion Docentes</a></li>
	</ul>
	
	<!-- Tab panes -->

	<div class=\"tab-content\">

<div class=\"tab-pane fade in $act1 \" id=\"gestion_docente\">
	<form name='gestion_doc' id='gestion_doc' method='post' action='docentes.php' target='' enctype='multipart/form-data'>
	<div class=\"page\">
	

	<input type='hidden' name='val1' id='val1' value='".$val1."'>	
	<input type='hidden' name='cur1' id='cur1' value='".$cur1."'>	
	<input type='hidden' name='ide1' id='ide1' value='".$ide1."'>
	<input type='hidden' name='estado1' id='estado1' value='".$estado1."'>	
	<input type='hidden' name='nombre1' id='nombre1' value='".$nombre1."'>					
	<input type='hidden' name='identi1' id='identi1' value='".$identi1."'>			
		<input type='hidden' name='eps1' id='eps1' value='".$eps1."'>
		<input type='hidden' name='pension1' id='pension1' value='".$pension1."'>			
		<input type='hidden' name='escalafon1' id='escalafon1' value='".$escalafon1."'>
		<input type='hidden' name='especialidad1' id='especialidad1' value='".$especialidad1."'>			
		<input type='hidden' name='obs1' id='obs1' value='".$obs1."'>
				
		<input type='hidden' name='nombre_docente1' id='nombre_docente1' value='".$nombre_docente1."'>	
		<input type='hidden' name='fecha_nacimiento1' id='fecha_nacimiento1' value='".$fecha_nacimiento1."'>
		<input type='hidden' name='sexo1' id='sexo1' value='".$sexo1."'>	
		<input type='hidden' name='grupo_sangre1' id='grupo_sangre1' value='".$grupo_sangre1."'>	


		<input type='hidden' name='direccion1' id='direccion1' value='".$direccion1."'>	
		<input type='hidden' name='telefono1' id='telefono1' value='".$telefono1."'>	
		<input type='hidden' name='correo1' id='correo1' value='".$correo1."'>
		<input type='hidden' name='usuario1' id='usuario1' value='".$usuario1."'>
		<input type='hidden' name='pass1' id='pass1' value='".$pass1."'>
		<input type='hidden' name='MAX_FILE_SIZE' value='2000000'>
	
	
		<fieldset>
			<legend>
			<br><span class=\"glyphicon glyphicon-th-list\"></span> Lista de Docentes          
			</legend>			
		</fieldset>
	</div>
	
	<fieldset>
	<div class='table-responsive'>
	<table class='table table-striped table-bordered '>
		<thead>
			<tr role='row'>
				<th>Codigo</th>
				<th>Foto</th>				
				<th>Nombre</th>				
				<th>Asignatura</th>
				<th>Estado</th>								
				<th>&nbsp;</th>				
			</tr>
		</thead>";
		
echo $tbody;
echo	"</table>
	</div>
	</fieldset>
";
	
echo $tbody2;	
echo	"	
	
	
	</form>

</div>
 
         
        </div><!--/span-->

       
      </div><!--/row-->


      </div><!--/row-->

      </div><!--/row--><hr><footer><p>Todos los derechos reservados - Copyright &copy; 2024</p></footer>


    </div><!--/.container-->

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src=\"https://code.jquery.com/jquery-1.10.2.min.js\"></script>
    <script src=\"../dist/js/bootstrap.min.js\"></script>
    <script src=\"../offcanvas.js\"></script>
  </body>
</html>
";
}//fin verif
}else{
echo "<div align='center'>Debe registrase para usar la aplicaci&oacute;n <a href='../index.php' > Registrar</a></div>";
}
?>