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

  
if(isset($_SESSION["user"]) && $_SESSION["tipo"]=='D'){

$cuenta="select docente.teacher_id,docente.coordinador
	from usuarios,docente 
	where name='".$_SESSION["user"]."'
	and usuarios.cuenta=docente.email";

$res_cuenta=mysql_query($cuenta);
$rs_cta=mysql_fetch_array($res_cuenta);


  $class1="class=\"active\"";
  $class2="";
  $act2="";
  $act1=" active ";

if(isset($_POST['val1'])&&!empty($_POST['val1'])){


 
 
 if($_POST['val1']==2){
 	

 	if($_POST['estado1']=='Activar'){
 	$borrar_estudiante="update estudiante set estado_est='A' where estudiante_id=".$_POST['indice2']." ";}
 	else
 	{$borrar_estudiante="update estudiante set estado_est='R' where estudiante_id=".$_POST['indice2']." ";}
 	
 	mysql_query($borrar_estudiante)or die(mysql_error());
	$men="<div class=\"alert alert-success\">
                    <button type=\"button\" class=\"close\" data-dismiss=\"alert\">X</button>
                    Estudiante Inactivo                
			</div>";
 }
 if($_POST['val1']==1||$_POST['val1']==2){

if(isset($_POST['cur1'])&&!empty($_POST['cur1'])){
$curso=$_POST['cur1'];
 $select_curso_est="select estudiante_id,nombre,(select nombre_archivo from upload where upload.codigo=estudiante.estudiante_id and clase='F'),estado_est 
			from estudiante  where estudiante.curso_id=".$_POST['cur1']." and estado_est in ('A','R') order by estado_est,nombre";
 $res_select_curso_est=mysql_query($select_curso_est);

				
					$tbody="<tbody>";
					while($r_sce=mysql_fetch_array($res_select_curso_est)){
					if(!empty($r_sce[2])&&isset($r_sce[2])){$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_sce[2]."' 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_sce[3]=='A'){$act='Inactivar';}else{$act='Activar';}
					
					$tbody.="<tr role='row'><td>".$r_sce[0]."</td><td>".$foto."</td><td>".$r_sce[1]."</td><td>".$r_sce[3]."</td><td>
					
					<a class='btn btn-success btn-xs' name='".$r_sce[0]."' id='".$r_sce[0]."' data-toggle='modal' data-target='#mimodala".$r_sce[0]."' onclick=''>
                			<i class='glyphicon glyphicon-user icon-white'></i>  
			                Ver Perfil                                       
				            </a>
					
					</td></tr>";
					
					$tbody_est.="<div name='mimodala".$r_sce[0]."' id='mimodala".$r_sce[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'>Datos del Estudiante</h4>
      					      </div>
      					      <div class='modal-body'>";
					
					 $select_datos2="select 
					tipo_documento,documento,lugar_expedicion,lugar_nacimiento,pais,
					f_nacimiento,sexo,grupo_sangre,peso,estatura,eps,sisben,niv_sisben,alergias,
					ano_lectivo,jornada,transporte,curso_ingles,asopadres,seguro,historia,estado_est,estado_aca,(select curso.codigo from curso where curso.curso_id=estudiante.curso_id),
					religion,direccion,estrato,telefono,correo,usuario,clave,
					estado_civil,hermanos,orden,vive,vive_otro,
					nombre_padre,id_padre,exp_padre,dir_padre,tel_padre,correo_padre,formacion_padre,empresa_padre,cargo_padre,dir_emp_padre,tel_emp_padre,
					nombre_madre,id_madre,exp_madre,dir_madre,tel_madre,correo_madre,formacion_madre,empresa_madre,cargo_madre,dir_emp_madre,tel_emp_madre,
					acud_id,poliza,dni,vigencia_i,vigencia_f

					from estudiante where estudiante_id=".$r_sce[0]." ";

  					$res_select_datos2=mysql_query($select_datos2);
					$rs_est2=mysql_fetch_array($res_select_datos2);

										
										/* */
										
					if($rs_est2[15]=='M'){$rs_est2[15]='Ma&ntilde;ana';}
					if($rs_est2[15]=='N'){$rs_est2[15]='Nocturno';}										
					if($rs_est2[15]=='T'){$rs_est2[15]='Tarde';}										
					if($rs_est2[16]==1){$rs_est2[16]='Si';}else{$rs_est2[16]='No';}
					if($rs_est2[17]==1){$rs_est2[17]='Si';}else{$rs_est2[17]='No';}					
					if($rs_est2[18]==1){$rs_est2[18]='Si';}else{$rs_est2[18]='No';}
					if($rs_est2[19]==1){$rs_est2[19]='Si';}else{$rs_est2[19]='No';}					
					if($rs_est2[20]=='A'){$rs_est2[20]='Antiguo';}
					if($rs_est2[20]=='N'){$rs_est2[20]='Nuevo';}										
					if($rs_est2[20]=='R'){$rs_est2[20]='Reintegro';}										
					if($rs_est2[21]=='A'){$rs_est2[21]='Activo';}
					if($rs_est2[21]=='R'){$rs_est2[21]='Retirado';}										

					if($rs_est2[22]=='C'){$rs_est2[22]='En curso';}
					if($rs_est2[22]=='P'){$rs_est2[22]='Promovido';}										
					if($rs_est2[22]=='R'){$rs_est2[22]='Repitente';}										

					if($rs_est2[31]=='C'){$rs_est2[31]='Casados';}
					if($rs_est2[31]=='U'){$rs_est2[31]='Uni&oacute;n Libre';}
					if($rs_est2[31]=='S'){$rs_est2[31]='Separados';}
					if($rs_est2[31]=='D'){$rs_est2[31]='Divorciados';}
					if($rs_est2[31]=='N'){$rs_est2[31]='Segundas Nupcias';}

					if($rs_est2[34]=='M'){$rs_est2[34]='Madre';}											
					if($rs_est2[34]=='P'){$rs_est2[34]='Padre';}
					if($rs_est2[34]=='A'){$rs_est2[34]='Ambos';}
					if($rs_est2[34]=='O'){$rs_est2[34]='Otro';}															
					
					if(isset($rs_est2[58])&&!empty($rs_est2[58])){
					
					$sel_acud="select nombre_asistente,id_acud,exp_acud,dir_acud,tel_acud,correo_acud,formacion_acud,empresa_acud,cargo_acud,dir_emp_acud,tel_emp_acud,usuario_acud,clave_acud,estado
					from acudiente where id=".$rs_est2[58]." ";
				
					$res_sel_acud=mysql_query($sel_acud);
					$rs_acud=mysql_fetch_array($res_sel_acud);
					}
					
					

					 $tbody_est.="<div>
						".str_replace('50px','75px',$foto)."
						</div>
						<br>
						<div align=center>
						<b>$r_sce[1]</b>
						</div>
						<br>";
					$tbody_est.="<div class='panel-group' id='accordion-".$r_sce[0]."'>";
					

						$tbody_est.="<div class='panel panel-default'>
							    <div class='panel-heading'>
							      <h4 class='panel-title'>
							        <a data-toggle='collapse' data-parent='#accordion-".$r_sce[0]."' href='#collapseOne1-".$r_sce[0]."'>
							          <font size='2.5em'><b>Datos Estudiante</b></font>
							        </a>
							      </h4>
							    </div>
							    <div id='collapseOne1-".$r_sce[0]."' class='panel-collapse collapse in'>
							      <div class='panel-body'>
						   	
							   	
							   	 <div class='input' style='float:left;width: 120px;padding-top: 5px;padding-left: 10px;text-align: left;height:20px;font-size:12px;' >
								Documento Id&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[0]." ".$rs_est2[1]."' 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;' >
								Lugar Exp.&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[2]."' 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;' >
								Ciudad Nacimiento&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[3]."' 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;' >
								Pais&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[4]."' 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;' >
								Fecha Nacimiento&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[5]." - aaaa/mm/dd' type='text' class='form-control2' style='width:50%;margin-bottom: 10px' >
								 </div>
							   	
							   	
							   	
							      </div>
							    </div>
							  </div>

							  <div class='panel panel-default'>
							    <div class='panel-heading'>
							      <h4 class='panel-title'>
							        <a data-toggle='collapse' data-parent='#accordion-".$r_sce[0]."' href='#collapseOne2-".$r_sce[0]."'>
							          <font size='2.5em'><b>Salud</b></font>
							        </a>
							      </h4>
							    </div>
							    <div id='collapseOne2-".$r_sce[0]."' class='panel-collapse collapse '>
							      <div class='panel-body'>

							   	 <div class='input' style='float:left;width: 120px;padding-top: 5px;padding-left: 10px;text-align: left;height:20px;font-size:12px;' >
								Sexo Id&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[6]."' 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;' >
								Grupo de Sangre&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[7]."' 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;' >
								Peso&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[8]." Kls' 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;' >
								Estatura&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[9]." cms' 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;' >
								EPS&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[10]."' 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;' >
								Carnet Sisben&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[11]."' 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;' >
								Nivel Sisben&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[12]."' 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;' >
								Alergias&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[13]."' 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;' >
								Poliza&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[59]."' 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;' >
								DNI&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[60]."' 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;' >
								Vig. Inicio&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[61]."' 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;' >
								Vig. Final&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[62]."' type='text' class='form-control2' style='width:50%;margin-bottom: 10px' >
								 </div>								   

							      </div>
							    </div>
							  </div>

							  <div class='panel panel-default'>
							    <div class='panel-heading'>
							      <h4 class='panel-title'>
							        <a data-toggle='collapse' data-parent='#accordion-".$r_sce[0]."' href='#collapseOne3-".$r_sce[0]."'>
							          <font size='2.5em'><b>Datos Acad&eacute;micos</b></font>
							        </a>
							      </h4>
							    </div>
							    <div id='collapseOne3-".$r_sce[0]."' class='panel-collapse collapse '>
							      <div class='panel-body'>


							         <div class='input' style='float:left;width: 120px;padding-top: 5px;padding-left: 10px;text-align: left;height:20px;font-size:12px;' >
								A&ntilde;o Lectivo &nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[14]."' 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;' >
								Jornada&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[15]."' 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;' >
								Transporte&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[16]."' 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;' >
								Curso de Ingl&eacute;s&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[17]."' 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;' >
								Asopadres&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[18]."' 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;' >
								Seguro Est.&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[19]."' 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;' >
								Nvo./Ant./Reint.&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[20]."' 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;' >
								Estado Est.&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[21]."' 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;' >
								Estado Acad.&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[22]."' 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;' >
								Grado Ingresa&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[23]."' type='text' class='form-control2' style='width:50%;margin-bottom: 10px' >
								 </div>

							   
							      </div>
							    </div>
							  </div>

							  <div class='panel panel-default'>
							    <div class='panel-heading'>
							      <h4 class='panel-title'>
							        <a data-toggle='collapse' data-parent='#accordion-".$r_sce[0]."' href='#collapseOne4-".$r_sce[0]."'>
							          <font size='2.5em'><b>Datos de Contacto</b></font>
							        </a>
							      </h4>
							    </div>
							    <div id='collapseOne4-".$r_sce[0]."' class='panel-collapse collapse '>
							      <div class='panel-body'>
							   
							   <div class='input' style='float:left;width: 120px;padding-top: 5px;padding-left: 10px;text-align: left;height:20px;font-size:12px;' >
								Religi&oacute;n &nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[24]."' 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;' >
								Direcci&oacute;n  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[25]."' 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;' >
								Estrato&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[26]."' 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;' >
								Tel&eacute;fono&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[27]."' 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   value='".$rs_est2[28]."' type='text' class='form-control2' style='width:50%;margin-bottom: 10px' >
								 </div>
							   	
							   
							   
							   
							   
							      </div>
							    </div>
							  </div>
							    <div class='panel panel-default'>
							    <div class='panel-heading'>
							      <h4 class='panel-title'>
							        <a data-toggle='collapse' data-parent='#accordion-".$r_sce[0]."' href='#collapseOne5-".$r_sce[0]."'>
							          <font size='2.5em'><b>Datos Familiares</b></font>
							        </a>
							      </h4>
							    </div>
							    <div id='collapseOne5-".$r_sce[0]."' class='panel-collapse collapse '>
							      <div class='panel-body'>

							    <div class='input' style='float:left;width: 120px;padding-top: 5px;padding-left: 10px;text-align: left;height:20px;font-size:12px;' >
								Est. Civil Padres&nbsp;</div>
								 <div class='input' ><input disabled   value='".$rs_est2[31]."' 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;' >
								Nro. Hermanos  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[32]."' 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;' >
								Orden&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[33]."' 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;' >
								Vive con&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[34]."' 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;' >
								Otro,qui&eacute;n?&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[35]."' type='text' class='form-control2' style='width:50%;margin-bottom: 10px' >
								 </div>
							   
							   
							      </div>
							    </div>
							  </div>
							  
							   
							  
							    <div class='panel panel-default'>
							    <div class='panel-heading'>
							      <h4 class='panel-title'>
							        <a data-toggle='collapse' data-parent='#accordion-".$r_sce[0]."' href='#collapseOne7-".$r_sce[0]."'>
							          <font size='2.5em'><b>Datos Padre</b></font>
							        </a>
							      </h4>
							    </div>
							    <div id='collapseOne7-".$r_sce[0]."' class='panel-collapse collapse '>
							      <div class='panel-body'>

    								<div class='input' style='float:left;width: 120px;padding-top: 5px;padding-left: 10px;text-align: left;height:20px;font-size:12px;' >
								Nombre Padre&nbsp;</div>
								 <div class='input' ><input disabled   value='".$rs_est2[36]."' 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;' >
								Documento Id.  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[37]."' 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;' >
								Lugar de Exp.&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[38]."' 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;' >
								Direcci&oacute;n&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[39]."' 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;' >
								Tel&eacute;fono&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[40]."' 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 Padre&nbsp;</div>
								 <div class='input' ><input disabled   value='".$rs_est2[41]."' 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;' >
								Formaci&oacute;n  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[42]."' 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;' >
								Empresa&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[43]."' 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;' >
								Cargo Padre&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[44]."' 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;' >
								Dir. Emp. Padre&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[45]."' 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;' >
								Tel. Emp. Padre&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[46]."' type='text' class='form-control2' style='width:50%;margin-bottom: 10px' >
								 </div>							   
							   
							      </div>
							    </div>
							  </div>
							  
							  <div class='panel panel-default'>
							    <div class='panel-heading'>
							      <h4 class='panel-title'>
							        <a data-toggle='collapse' data-parent='#accordion-".$r_sce[0]."' href='#collapseOne9-".$r_sce[0]."'>
							          <font size='2.5em'><b>Datos Madre</b></font>
							        </a>
							      </h4>
							    </div>
							    <div id='collapseOne9-".$r_sce[0]."' class='panel-collapse collapse '>
							      <div class='panel-body'>

    								<div class='input' style='float:left;width: 120px;padding-top: 5px;padding-left: 10px;text-align: left;height:20px;font-size:12px;' >
								Nombre Madre&nbsp;</div>
								 <div class='input' ><input disabled   value='".$rs_est2[47]."' 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;' >
								Documento Id.  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[48]."' 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;' >
								Lugar de Exp.&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[49]."' 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;' >
								Direcci&oacute;n&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[50]."' 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;' >
								Tel&eacute;fono&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[51]."' 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 Madre&nbsp;</div>
								 <div class='input' ><input disabled   value='".$rs_est2[52]."' 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;' >
								Formaci&oacute;n  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[53]."' 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;' >
								Empresa&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[54]."' 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;' >
								Cargo Madre&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[55]."' 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;' >
								Dir. Emp. Madre&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[56]."' 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;' >
								Tel. Emp. Madre&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[57]."' type='text' class='form-control2' style='width:50%;margin-bottom: 10px' >
								 </div>							   
							   
							      </div>
							    </div>
							  </div>
							  
							    <div class='panel panel-default'>
							    <div class='panel-heading'>
							      <h4 class='panel-title'>
							        <a data-toggle='collapse' data-parent='#accordion-".$r_sce[0]."' href='#collapseOne8-".$r_sce[0]."'>
							          <font size='2.5em'><b>Acudiente</b></font>
							        </a>
							      </h4>
							    </div>
							    <div id='collapseOne8-".$r_sce[0]."' class='panel-collapse collapse '>
							      <div class='panel-body'>
							   
							      <div class='input' style='float:left;width: 120px;padding-top: 5px;padding-left: 10px;text-align: left;height:20px;font-size:12px;' >
								Nombre Acudiente&nbsp;</div>
								 <div class='input' ><input disabled   value='".$rs_acud[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;' >
								Documento Id.  </div>
								 <div class='input' ><input disabled   value='".$rs_acud[1]."' 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;' >
								Lugar de Exp.&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_acud[2]."' 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;' >
								Direcci&oacute;n&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_acud[3]."' 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;' >
								Tel&eacute;fono&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_acud[4]."' 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 Acudiente&nbsp;</div>
								 <div class='input' ><input disabled   value='".$rs_acud[5]."' 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;' >
								Formaci&oacute;n  </div>
								 <div class='input' ><input disabled   value='".$rs_acud[6]."' 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;' >
								Empresa&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_acud[7]."' 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;' >
								Cargo Acudiente&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_acud[8]."' 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;' >
								Dir. Emp. Acud.&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_acud[9]."' 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;' >
								Tel. Emp. Acud.&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_acud[10]."' type='text' class='form-control2' style='width:50%;margin-bottom: 10px' >
								 </div>								   
							   
							   
							   
							   
							      </div>
							    </div>
							  </div>
							  ";

							$tbody_est.="</div>";
						
						 $tbody_est.="<div>
							<button type=\"button\" class=\"btn btn-info btn-xs\" data-dismiss='modal' >Cerrar</button>
							</div>";
					$tbody_est.="
						</div>
					    </div>
					  </div>
					</div>	";
					
					}
		
					$tbody.="</tbody>";
  }
 } 
 
}

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\">
    <link rel='stylesheet' href='../js/css/jquery-ui-1.9.2.custom.css' />
	<style>
	
		.btn-file {
		    position: relative;
		    overflow: hidden;
		}
		.btn-file input[type=file] {
		    position: absolute;
		    top: 0;
		    right: 0;
		    min-width: 100%;
		    min-height: 100%;
		    font-size: 999px;
		    text-align: right;
		    filter: alpha(opacity=0);
		    opacity: 0;
		    background: red;
		    cursor: inherit;
		    display: block;
		}
		input[readonly] {
			background-color: white !important;
			cursor: text !important;
		}
	
	
	.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>Estudiantes</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>
	<script type='text/javascript' src='../dist/js/bootstrap-filestyle.min.js'> </script>

    <![endif]-->
    <script>
	
function buscar_estudiante(){


if(document.getElementById('buscar_').value==''){alert('Debe digitar el nombre');return false;}
		else{
		var mystr = document.getElementById('buscar_').value;
		var myarr = mystr.split(' - ');var t_id = myarr[0];var t_cur = myarr[2];
		edita_estudiante(t_id,t_cur);
		}	

}

function llena_acudiente(ind){

	if(ind==2){
	document.getElementById('acudiente').value=document.getElementById('madre').value;
	document.getElementById('id_acud').value=document.getElementById('id_madre').value;
	document.getElementById('exp_acud').value=document.getElementById('exp_madre').value;
	document.getElementById('dir_acud').value=document.getElementById('dir_madre').value;
	document.getElementById('tel_acud').value=document.getElementById('tel_madre').value;
	document.getElementById('correo_acud').value=document.getElementById('correo_madre').value;
	document.getElementById('formacion_acud').value=document.getElementById('formacion_madre').value;
	document.getElementById('empresa_acud').value=document.getElementById('empresa_madre').value;
	document.getElementById('cargo_acud').value=document.getElementById('cargo_madre').value;
	document.getElementById('dir_emp_acud').value=document.getElementById('dir_emp_madre').value;
	document.getElementById('tel_emp_acud').value=document.getElementById('tel_emp_madre').value;
	document.getElementById('acud_padre').checked=false;
	}

	if(ind==1){
	document.getElementById('acudiente').value=document.getElementById('padre').value;
	document.getElementById('id_acud').value=document.getElementById('id_padre').value;
	document.getElementById('exp_acud').value=document.getElementById('exp_padre').value;
	document.getElementById('dir_acud').value=document.getElementById('dir_padre').value;
	document.getElementById('tel_acud').value=document.getElementById('tel_padre').value;
	document.getElementById('correo_acud').value=document.getElementById('correo_padre').value;
	document.getElementById('formacion_acud').value=document.getElementById('formacion_padre').value;
	document.getElementById('empresa_acud').value=document.getElementById('empresa_padre').value;
	document.getElementById('cargo_acud').value=document.getElementById('cargo_padre').value;
	document.getElementById('dir_emp_acud').value=document.getElementById('dir_emp_padre').value;
	document.getElementById('tel_emp_acud').value=document.getElementById('tel_emp_padre').value;
	document.getElementById('acud_madre').checked=false;
	}

}


function edita_estudiante(ind,cur){
	document.getElementById('indice3').value=ind;
        
	document.getElementById('val3').value=2;

	document.getElementById('cur3').value=cur;	
//	document.getElementById('indice2').value=ind;
       	document.getElementById('cur1').value=cur;

	document.editar_estudiante.action='estudiantes.php#edita';
	document.forms['editar_estudiante'].submit();
}

function borra_estudiante(ind,cur,i){

	document.getElementById('indice2').value=ind;
       	document.getElementById('cur1').value=cur;
	document.getElementById('estado1').value=i;
	document.getElementById('val1').value=2;
	document.forms['listar_estudiante'].submit();
}

function consulta_cursos(c){

if(c=='XX'){alert('Debe seleccionar Un Curso');return false;}else{document.getElementById('cur1').value=c;}
	document.getElementById('val1').value=1;
	document.forms['listar_estudiante'].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='250px' style='margin-top:10px;margin-left:5px'></a>
		         <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><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 active\"><span class=\"glyphicon glyphicon-th\"></span> Estudiantes</a>
            <a href=\"docentes.php\" class=\"list-group-item\"><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=\"logros.php\" class=\"list-group-item\"><span class=\"glyphicon glyphicon-edit\"></span> Logros</a>                        
            <a href=\"planilla.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-file\"></span> Planilla Notas</a>  
            <a href=\"planilla_asistencia.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-file\"></span> Asistencia</a>                      
            <a href=\"reportes.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-file\"></span> Informes</a>         
            <a href=\"planilla_obs.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-file\"></span> Planilla Obs.</a>
<a href=\"eventos.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-edit\"></span> Anuncios</a>
";                        
if($rs_cta[1]==1||$rs_cta[1]==0){
	echo	"<a href=\"obs_disciplinarias.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-file\"></span> Registro Obs.</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=\"#home\" data-toggle=\"tab\" onclick=\"consulta_cursos('".$curso."')\">Gestion Estudiantes</a></li>


	</ul>
	
	
	<!-- Tab panes -->

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


	

<div class=\"tab-pane fade in $act1 \" id=\"home\">
	<form name='listar_estudiante' id='listar_estudiante' method='post' action='estudiantes.php' target=''>
	<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='estado1' id='estado1' value='".$estado1."'>		
	<input type='hidden' name='indice2' id='indice2' value='".$indice2."'>	
			
		<fieldset>
			<legend><span class=\"glyphicon glyphicon-th-list\"></span> 
				Lista de Estudiantes          
				<select id='l_curso' name='l_curso' style='margin:20px;font-size: 12px;'>";
								
					$select_curso="
					(SELECT curso.curso_id,curso.nombre,(select count(*) from estudiante where estudiante.curso_id=curso.curso_id ),curso.id_docente
					FROM asignatura,pensum,usuarios,docente,curso 
					where pensum.asignatura_id=asignatura.subject_id
					and docente.email=usuarios.cuenta	
					and usuarios.name='".$_SESSION["user"]."'
					and pensum.teacher_id=docente.teacher_id
					and pensum.class_id=curso.curso_id 
					order by curso.orden)
					union
					(select curso.curso_id,curso.nombre,(select count(*) from estudiante where estudiante.curso_id=curso.curso_id ),curso.id_docente
					from curso,usuarios,docente 
					where curso.id_docente=docente.teacher_id
					and docente.email=usuarios.cuenta
					and usuarios.name='".$_SESSION["user"]."'
					order by curso.orden)";
					$res_select_curso=mysql_query($select_curso);
					echo "<option value='XX' >Seleccione Curso</option>";
					while($r_sc=mysql_fetch_array($res_select_curso)){
					$sel1='  ';$dirg=' ';$color_=' ';
					//if($_POST['area']==$r_ar[0]){$sel1=' selected ';}
					//echo "hola";
					if($rs_cta[0]==$r_sc[3]){$dirg='- DG ';$color_='#4fad45';}
							echo '<option style="font-size:9px;background: '.$color_.' 	 no-repeat fixed center;" value="'.$r_sc[0].'"  '.$sel1.'>('.$r_sc[2].') - '.$r_sc[1].' '.$dirg.'</option>';

					}
					
echo					"</select>
					<button type='button' class='btn btn-info btn-sm' onclick='consulta_cursos(document.getElementById(\"l_curso\").value)'><i class='glyphicon glyphicon-zoom-in'></i> Buscar</button>      
			</legend>			
		</fieldset>
	</div>
	
	<fieldset>
	<div class='table-responsive'>
	<table class='table table-striped table-bordered '>
		<thead>
			<tr role='row'>
				<td>Codigo</td>
				<td>Foto</td>				
				<td>Nombre</td>				
				<td>Estado</td>				
				<td>&nbsp;</td>								
			</tr>
		</thead>";
		
echo $tbody;
echo	"</table>
	</div>
	</fieldset>";
echo $tbody_est;	
	
echo	"	</form>

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

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

</div><!--/row-->
      </div><!--/row--><hr><footer><p>Todos los derechos reservados - Copyright &copy; 2018</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=\"../js/jquery-ui-1.10.3.custom.js\"></script>    
    <script src=\"../offcanvas.js\"></script>
    <script>
      $(function() {
	$( \"#buscar_\" ).autocomplete(
	{
		 source:'../source2.php',		 
		 minLength: 3
	})
	}); 
    </script>	
  </body>
</html>
";
}else{
echo "<div align='center'>Debe registrase para usar la aplicaci&oacute;n <a href='../index.php' > Registrar</a></div>";
}
?>