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

if(isset($_SESSION["user"])&& $_SESSION["tipo"]=='A'){
  $class1="class=\"active\"";
  $class2="";
  $act2="";
  $act1=" active ";
//echo $_POST['indice3'];
if(isset($_POST['val4'])&&!empty($_POST['val4'])){

 $class4="class=\"active\"";
 $class3=""; 
  $class2="";
  $class1="";
  $act1="";
  $act2="";
  $act3="";  
  $act4=" active ";


$select_estudiantes=" select estudiante_id,curso_id,nombre from estudiante where estado_est='A' and estudiante_id=".$_POST['est4']." ";
	
		$select_curso_notas="select estudiante_id,
		curso.curso_id,
		id_nota.id, 
		id_nota.anno,
		id_nota.per_id,
		asignatura.nombre,
		(select count(*) from planilla_detalle where 	planilla_detalle.codigo_est=estudiante.estudiante_id and planilla_detalle.id_nota=id_nota.id) as con
			from curso,id_nota,pensum,asignatura,estudiante
			where curso.curso_id=pensum.class_id
			and id_nota.pensum=pensum.subject_id
			and estudiante.estudiante_id=".$_POST['est4']."
			and asignatura.subject_id=pensum.asignatura_id
			and id_nota.estado='A'
			and estudiante.estado_est='A'
			and estudiante.curso_id=curso.curso_id
			group by estudiante_id,curso.curso_id,id_nota.id, id_nota.anno,id_nota.per_id,asignatura.nombre

			";
	//echo $select_curso_notas."<br>";
	$con_cn=0;
	if($res_select_curso_notas=mysql_query($select_curso_notas)){
		$con_cn=mysql_num_rows($res_select_curso_notas);	
	}

  if($con_cn>0){
	while($r2=mysql_fetch_array($res_select_curso_notas)){
	
		
	if($r2[6]==0){
		$select_nota_completa="select i.codigo,i.concepto,i.pensum,i.anno,i.per_id,i.estado,i.registro,p.periodo from id_nota i,planilla p where i.id=".$r2[2]." and p.id=i.per_id";
		if($res_select_nota_completa=mysql_query($select_nota_completa)){
		
			$nota_com=mysql_fetch_array($res_select_nota_completa);
			$insertar_nota="insert into planilla_detalle 
			(planilla,anno,periodo,codigo_pensum,codigo_est,tipo_nota,concepto,fecha_insert,estado,id_nota)
			values
			(".$nota_com[4].",'".$nota_com[3]."',".$nota_com[7].",'".$nota_com[2]."','".$r2[0]."','".$nota_com[0]."','".$nota_com[1]."',now(),'A',".$r2[2].")
			";
			//echo $insertar_nota."<br>";
			
				if(mysql_query($insertar_nota)){
					$cont.="<tr role='row'>
								<td>$r2[0]</td>
								<td>$r2[5] - $nota_com[1]</td>				
								<td>$nota_com[7]</td>
								<td>$nota_com[3]</td>						
								<td>Actualizada</td>				
							</tr>";
				}else{
					$cont.="<tr role='row'>
								<td>$r2[0]</td>
								<td>$r2[5] - $nota_com[1]</td>				
								<td>$nota_com[7]</td>
								<td>$nota_com[3]</td>						
								<td>".mysql_error()."</td>				
							</tr>";
				}
	
		}
	
	}
	
	}
	
  }
//}

if($cont==""){$cont="<tr role='row'>
						<td><b>Registros Previamente Actualizados</b></td>
						<td></td>				
						<td></td>				
						<td></td>				
						<td></td>				
					</tr>";}

$perfil_tabla="<div class='table-responsive'>
		<table class='table table-striped table-bordered '>
			<thead>
				<tr role='row'>
					<td>Estudiante</td>
					<td>Nota</td>	
						<td>Periodo</td>				
						<td>A&ntilde;o</td>												
					<td>Estado</td>				
				</tr>
			</thead>
			<tbody>".$cont."
				
			</tbody>
		</table>			
	      </div>		";





}

if(isset($_POST['val3'])&&!empty($_POST['val3'])){
  $class3="class=\"active\"";
  $class2="";
  $class1="";
  $act1="";
  $act2="";
  $act3=" active ";
  $class4="";
  $act4="";



 if($_POST['val3']==2){
 $curso=$_POST['cur3'];
 }

 if($_POST['val3']==1){
 $curso=$_POST['l_curso23'];	
 	$actualizar_estudiante="
 	update estudiante
 	set
 	nombre=UPPER('".$_POST['nombre_estudiante3']."'),
 	f_nacimiento='".$_POST['fecha_nacimiento3']."',
 	sexo='".$_POST['sexo3']."',
 	religion='".$_POST['religion3']."',
 	grupo_sangre='".$_POST['grupo_sangre3']."',
 	direccion='".$_POST['direccion3']."',
 	telefono='".$_POST['telefono3']."',
 	correo='".$_POST['correo3']."',
 	nombre_padre=UPPER('".$_POST['padre3']."'),
 	nombre_madre=UPPER('".$_POST['madre3']."'),
 	curso_id='".$_POST['l_curso23']."' ,
 	 tipo_documento='".$_POST['tipo_documento3']."',
 	 documento='".$_POST['documento3']."',
	lugar_expedicion='".$_POST['lugar_exp3']."',
	lugar_nacimiento='".$_POST['lugar_nac3']."',
	pais='".$_POST['pais3']."',
	peso=".$_POST['peso3'].",
	estatura=".$_POST['estatura3'].",
	eps='".$_POST['eps3']."',
	sisben='".$_POST['nro_sisben3']."',
	niv_sisben='".$_POST['niv_sisben3']."',
	alergias='".$_POST['alergias3']."',
	ano_lectivo='".$_POST['lectivo3']."',
	jornada='".$_POST['jornada3']."',
	transporte='".$_POST['transporte3']."',
	curso_ingles='".$_POST['c_ingles3']."',
	asopadres='".$_POST['asopadres3']."',
	seguro='".$_POST['seguro3']."',
	historia='".$_POST['historia3']."',
	estado_est='".$_POST['estado_est3']."',
	estado_aca='".$_POST['estado_aca3']."',
	estrato='".$_POST['estrato3']."',
	usuario='".$_POST['u_plataforma3']."',
	clave='".$_POST['c_plataforma3']."',
	estado_civil='".$_POST['estado_civil3']."',
	hermanos='".$_POST['hermanos3']."',
	orden='".$_POST['orden3']."',
	vive='".$_POST['vive3']."',
	vive_otro='".$_POST['vive_otro3']."',
	id_padre='".$_POST['id_padre3']."',
	exp_padre='".$_POST['exp_padre3']."',
	dir_padre='".$_POST['dir_padre3']."',
	tel_padre='".$_POST['tel_padre3']."',
	correo_padre='".$_POST['correo_padre3']."',
	formacion_padre='".$_POST['formacion_padre3']."',
	empresa_padre='".$_POST['empresa_padre3']."',
	cargo_padre='".$_POST['cargo_padre3']."',
	dir_emp_padre='".$_POST['dir_emp_padre3']."',
	tel_emp_padre='".$_POST['tel_emp_padre3']."',
	id_madre='".$_POST['id_madre3']."',
	exp_madre='".$_POST['exp_madre3']."',
	dir_madre='".$_POST['dir_madre3']."',
	tel_madre='".$_POST['tel_madre3']."',
	correo_madre='".$_POST['correo_madre3']."',
	formacion_madre='".$_POST['formacion_madre3']."',
	empresa_madre='".$_POST['empresa_madre3']."',
	cargo_madre='".$_POST['cargo_madre3']."',
	dir_emp_madre='".$_POST['dir_emp_madre3']."',
	tel_emp_madre='".$_POST['tel_emp_madre3']."',
	acud_id='".$_POST['acud_iden3']."',
	poliza='".$_POST['poliza3']."',
	dni='".$_POST['dni3']."',
	vigencia_i='".$_POST['vi3']."',
	vigencia_f='".$_POST['vf3']."',
	otro_acud='".$_POST['acud_paren3']."'
 	where
 	estudiante_id=".$_POST['indice3']."
 	";
 	//echo $actualizar_estudiante;
	mysql_query($actualizar_estudiante)or die(mysql_error());

	$men="<div class=\"alert alert-success\">
                    <button type=\"button\" class=\"close\" data-dismiss=\"alert\">X</button>
                    Estudiante Actualizado                
			</div>";

	if(isset($_FILES["archivo_"])&&!empty($_FILES["archivo_"])){
		
		$tamano2 = $_FILES["archivo_"]['size'];
		$tipo2 = $_FILES["archivo_"]['type'];
		$archivo2 = $_FILES["archivo_"]['name'];
		$prefijo2 = substr(md5(uniqid(rand())),0,6);

/*		echo "<br>archivo -".$archivo;
		echo "<br>tam -".$tamano;
		echo "<br>tipo -".$tipo;		
		echo "<br>pref -".$prefijo;   */
		
		if ($archivo2 != "") {
		// guardamos el archivo a la carpeta files

		//$destino = "upload/".$prefijo."_".$archivo;
		
		$destino2 = "img/foto/".$archivo2;
		if (copy($_FILES['archivo_']['tmp_name'],$destino2)) {
		$status2 = "Archivo subido: <b>".$archivo2."</b>";
		} else {
		$status2 = "Error al subir el archivo";
		}
		} else {
		$status2 = "Error al subir archivo";
		}	
		$query2 = "INSERT INTO upload (codigo,nombre_archivo,tipo,tamano,clase) ".
		"VALUES ('".$_POST[indice3]."','$archivo2', '$tipo2', '$tamano2','F')";
		$query3 = "update upload set 	nombre_archivo='".$archivo2."',
						tipo='".$tipo2."',
						tamano=".$tamano2.",
						clase='F'
					where
					codigo='".$_POST[indice3]."'	";
		if(!empty($archivo2)){

		if(mysql_query($query2)){}else{

		mysql_query($query3) or die('Error, Actualizando Foto');}
		//mysql_query($query2) or die('Error, query failed');
		} 			
	}



 }
}

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') 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>
					<a class='btn btn-info btn-xs' name='".$r_sce[0]."' id='".$r_sce[0]."' onclick='edita_estudiante(this.id,".$_POST['cur1'].")'>
                			<i class='glyphicon glyphicon-edit icon-white'></i>  
			                Editar               
				            </a>
					<a class='btn btn-danger btn-xs' name='".$r_sce[0]."' id='".$r_sce[0]."' onclick='borra_estudiante(this.id,".$_POST['cur1'].",\"$act\")'>
                			<i class='glyphicon glyphicon-refresh icon-white'></i>  
			                $act                                   
				            </a>



					
					</td></tr>";
					
					$tbody.="<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.="<div>
						".str_replace('50px','75px',$foto)."
						</div>
						<br>
						<div align=center>
						<b>$r_sce[1]</b>
						</div>
						<br>";
					$tbody.="<div class='panel-group' id='accordion'>";
					

						$tbody.="<div class='panel panel-default'>
							    <div class='panel-heading'>
							      <h4 class='panel-title'>
							        <a data-toggle='collapse' data-parent='#accordion' 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' 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;' >
								Vigencia Inicio&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[61]." - aaaa/mm/dd' 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;' >
								Vigencia Fin&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[62]." - 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' 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' 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 class='input' style='float:left;width: 120px;padding-top: 5px;padding-left: 10px;text-align: left;height:20px;font-size:12px;' >
								Usuario Plataf.&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[29]."' 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;' >
								Clave&nbsp;  </div>
								 <div class='input' ><input disabled   value='".$rs_est2[30]."' 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' 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' 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' 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' 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.="</div>";
						
						 $tbody.="<div>
							<button type=\"button\" class=\"btn btn-info btn-xs\" data-dismiss='modal' >Cerrar</button>
							</div>";
					$tbody.="
						</div>
					    </div>
					  </div>
					</div>	";
					
					
					
					
					
					
					
					
					
					}
					
					
					
					
					
					
					
					
					
					
					
					
					$tbody.="</tbody>";
  }
 } 
 
}

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

 if($_POST['val2']==1){
  $class1="";
  $class2="class=\"active\"";
  $act1="";
  $act2=" active ";
   $class4="";
  $act4=""; 
  $class3="";
  $act3="";
//  echo $_POST['nombre_estudiante2']."-";  echo $_POST['fecha_nacimiento2']."-";  echo $_POST['sexo2']."-";  echo $_POST['religion2']."-";  echo $_POST['grupo_sangre2']."-";  echo $_POST['direccion2']."-";  echo $_POST['telefono2']."-";  echo $_POST['correo2']."-";  echo $_POST['padre2']."-";  echo $_POST['madre2']."-";  echo $_POST['acudiente2']."-";  echo $_POST['l_curso22']."-";
  
 

  
  
  
  
$serial=10000*date("y");
$sel_last_id="select max(estudiante_id) from estudiante";
$rs_sel_last_id=mysql_query($sel_last_id);
$r_l_id=mysql_fetch_array($rs_sel_last_id);
if($r_l_id[0]>100000){$nuevo_id=$r_l_id[0]+1;}
else
{$nuevo_id=$r_l_id[0]+$serial+1;}
 $curso=$_POST['l_curso22'];

	

/*	$insert_acud="insert into usuarios 
	(name,cuenta,password,level,estado,nombres) values
	(
	'".$_POST['u_plataforma_acud2']."','".$_POST['correo_acud2']."','".$_POST['c_plataforma_acud2']."','P','A',UPPER('".$_POST['acudiente2']."')
	)";*/
	
//	if(mysql_query($insert_acud)){
//	$usuario_acud=mysql_insert_id();


	$insertar_estudiante='insert into estudiante (estudiante_id,nombre,f_nacimiento,sexo,religion,grupo_sangre,direccion,telefono,correo,nombre_padre,nombre_madre,curso_id,
	tipo_documento,documento,lugar_expedicion,lugar_nacimiento,pais,peso,estatura,eps,sisben,niv_sisben,alergias,ano_lectivo,jornada,transporte,curso_ingles,asopadres,seguro,historia,estado_est,estado_aca,estrato,usuario,clave,estado_civil,hermanos,orden,vive,vive_otro,
	id_padre,exp_padre,dir_padre,tel_padre,correo_padre,formacion_padre,empresa_padre,cargo_padre,dir_emp_padre,tel_emp_padre,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,otro_acud
	)
	values('.$_POST['codigo_estudiante2'].',UPPER("'.$_POST['nombre_estudiante2'].'"),"'.$_POST['fecha_nacimiento2'].'","'.$_POST['sexo2'].'","'.$_POST['religion2'].'","'.$_POST['grupo_sangre2'].'",
	"'.$_POST['direccion2'].'","'.$_POST['telefono2'].'","'.$_POST['correo2'].'",UPPER("'.$_POST['padre2'].'"),UPPER("'.$_POST['madre2'].'"),"'.$_POST['l_curso22'].'",
	"'.$_POST['tipo_documento2'].'","'.$_POST['documento2'].'","'.$_POST['lugar_exp2'].'","'.$_POST['lugar_nac2'].'","'.$_POST['pais2'].'",
"'.$_POST['peso2'].'","'.$_POST['estatura2'].'","'.$_POST['eps2'].'","'.$_POST['nro_sisben2'].'","'.$_POST['niv_sisben2'].'","'.$_POST['alergias2'].'",
"'.$_POST['lectivo2'].'","'.$_POST['jornada2'].'","'.$_POST['transporte2'].'","'.$_POST['c_ingles2'].'","'.$_POST['asopadres2'].'","'.$_POST['seguro2'].'","'.$_POST['historia2'].'","'.$_POST['estado_est2'].'","'.$_POST['estado_aca2'].'",
"'.$_POST['estrato2'].'","'.$_POST['u_plataforma2'].'","'.$_POST['c_plataforma2'].'","'.$_POST['estado_civil2'].'","'.$_POST['hermanos2'].'","'.$_POST['orden2'].'","'.$_POST['vive2'].'","'.$_POST['vive_otro2'].'",
"'.$_POST['id_padre2'].'","'.$_POST['exp_padre2'].'","'.$_POST['dir_padre2'].'","'.$_POST['tel_padre2'].'","'.$_POST['correo_padre2'].'","'.$_POST['formacion_padre2'].'","'.$_POST['empresa_padre2'].'","'.$_POST['cargo_padre2'].'","'.$_POST['dir_emp_padre2'].'","'.$_POST['tel_emp_padre2'].'",
"'.$_POST['id_madre2'].'","'.$_POST['exp_madre2'].'","'.$_POST['dir_madre2'].'","'.$_POST['tel_madre2'].'","'.$_POST['correo_madre2'].'","'.$_POST['formacion_madre2'].'","'.$_POST['empresa_madre2'].'","'.$_POST['cargo_madre2'].'","'.$_POST['dir_emp_madre2'].'","'.$_POST['tel_emp_madre2'].'","'.$_POST['iden_acud2'].'",
"'.$_POST['poliza2'].'","'.$_POST['dni2'].'","'.$_POST['vi2'].'","'.$_POST['vf2'].'","'.$_POST['paren_acud2'].'"
	)';
	
//echo $insertar_estudiante."<br>";
	//mysql_query($insertar_estudiante)or die(mysql_error());


if(mysql_query($insertar_estudiante)){
	$ultimo_indice=mysql_insert_id();
//	}

	
	$men="<div class=\"alert alert-success\">
                    <button type=\"button\" class=\"close\" data-dismiss=\"alert\">X</button>
                    Estudiante creado                
			</div>";
		if(isset($_FILES["archivo"])&&!empty($_FILES["archivo"])){
		
		$tamano = $_FILES["archivo"]['size'];
		$tipo = $_FILES["archivo"]['type'];
		$archivo = $_FILES["archivo"]['name'];
		$prefijo = substr(md5(uniqid(rand())),0,6);

/*		echo "<br>archivo -".$archivo;
		echo "<br>tam -".$tamano;
		echo "<br>tipo -".$tipo;		
		echo "<br>pref -".$prefijo;   */
		
		if ($archivo != "") {
		// guardamos el archivo a la carpeta files

		//$destino = "upload/".$prefijo."_".$archivo;
		$destino = "img/foto/".$archivo;
		if (copy($_FILES['archivo']['tmp_name'],$destino)) {
		$status = "Archivo subido: <b>".$archivo."</b>";
		} else {
		$status = "Error al subir el archivo";
		}
		} else {
		$status = "Error al subir archivo";
		}	
		$query = "INSERT INTO upload (codigo,nombre_archivo,tipo,tamano,clase) ".
		"VALUES ('$ultimo_indice','$archivo', '$tipo', '$tamano','F')";

		if(!empty($archivo)){
		mysql_query($query) or die('Error, query failed');
		} 			
	   }
	}else{
	
	$men="<div class=\"alert alert-danger\">
                    <button type=\"button\" class=\"close\" data-dismiss=\"alert\">X</button>
                    Error al crear Estudiante - ".mysql_error()."
			</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\">
    <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 -->
    <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 actualiza_pensum(){
	document.getElementById('val4').value=1;
	//if(document.getElementById('cu4').value=='XX'){alert('Debe seleccionar curso');return false;}else{document.getElementById('cur4').value=document.getElementById('cu4').value;}

	if(document.getElementById('buscar4').value==''){alert('Debe digitar el nombre');return false;}
		else{
		var mystr = document.getElementById('buscar4').value;
		var myarr = mystr.split(' - ');var t_id = myarr[0];var t_cur = myarr[2];
		document.getElementById('est4').value=t_id;
		}
	document.forms['perfil_estudiantes'].submit();			
}
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 actualiza_estudiante(ind3,in3){
	document.getElementById('indice3').value=ind3;
	document.getElementById('in3').value=in3;
	//alert(ind3);alert(in3);return false;
	if(document.getElementById('nombre_estudiante_').value==''){alert('Debe digitar el nombre 3');return false;}
		else{document.getElementById('nombre_estudiante3').value=document.getElementById('nombre_estudiante_').value}
	if(document.getElementById('fecha_nacimiento_').value==''){alert('Debe digitar el fecha nacimiento');return false;}
		else{document.getElementById('fecha_nacimiento3').value=document.getElementById('fecha_nacimiento_').value}
	if(document.getElementById('sexo_').value=='XX'){alert('Debe seleccionar el sexo');return false;}
		else{document.getElementById('sexo3').value=document.getElementById('sexo_').value}
	if(document.getElementById('grupo_sangre_').value=='XX'){alert('Debe seleccionar el grupo de sangre');return false;}
		else{document.getElementById('grupo_sangre3').value=document.getElementById('grupo_sangre_').value}


if(document.getElementById('tipo_documento_').value=='XX_'){alert('Debe seleccionar el Tipo de Documento_');return false;}
	else{document.getElementById('tipo_documento3').value=document.getElementById('tipo_documento_').value}
if(document.getElementById('documento_').value==''){alert('Debe digitar el documento de identidad_');return false;}
	else{document.getElementById('documento3').value=document.getElementById('documento_').value}

if(document.getElementById('lugar_exp_').value==''){alert('Debe digitar el lugar de expedicion_');return false;}
	else{document.getElementById('lugar_exp3').value=document.getElementById('lugar_exp_').value}
if(document.getElementById('lugar_nac_').value==''){alert('Debe digitar el lugar de nacimiento_');return false;}
	else{document.getElementById('lugar_nac3').value=document.getElementById('lugar_nac_').value}
if(document.getElementById('pais_').value==''){alert('Debe digitar el Pais de nacimiento_');return false;}
	else{document.getElementById('pais3').value=document.getElementById('pais_').value}

if(document.getElementById('peso_').value==''){}
	else{document.getElementById('peso3').value=document.getElementById('peso_').value}
if(document.getElementById('estatura_').value==''){}
	else{document.getElementById('estatura3').value=document.getElementById('estatura_').value}
if(document.getElementById('eps_').value==''){}
	else{document.getElementById('eps3').value=document.getElementById('eps_').value}
if(document.getElementById('nro_sisben_').value==''){}
	else{document.getElementById('nro_sisben3').value=document.getElementById('nro_sisben_').value}
if(document.getElementById('niv_sisben_').value==''){}
	else{document.getElementById('niv_sisben3').value=document.getElementById('niv_sisben_').value}
if(document.getElementById('alergias_').value==''){}
	else{document.getElementById('alergias3').value=document.getElementById('alergias_').value}

if(document.getElementById('poliza_').value==''){}
	else{document.getElementById('poliza3').value=document.getElementById('poliza_').value}
if(document.getElementById('dni_').value==''){}
	else{document.getElementById('dni3').value=document.getElementById('dni_').value}
if(document.getElementById('vi_').value==''){}
	else{document.getElementById('vi3').value=document.getElementById('vi_').value}
if(document.getElementById('vf_').value==''){}
	else{document.getElementById('vf3').value=document.getElementById('vf_').value}

if(document.getElementById('acud_paren').value==''){}
	else{document.getElementById('acud_paren3').value=document.getElementById('acud_paren').value}

	
if(document.getElementById('lectivo_').value==''){alert('Debe digitar el A?o Lectivo_');return false;}
	else{document.getElementById('lectivo3').value=document.getElementById('lectivo_').value}
if(document.getElementById('jornada_').value=='XX_'){alert('Debe seleccionar Jornada_');return false;}
	else{document.getElementById('jornada3').value=document.getElementById('jornada_').value}
if(document.getElementById('transporte_').value=='XX_'){alert('Debe seleccionar Transporte_');return false;}
	else{document.getElementById('transporte3').value=document.getElementById('transporte_').value}
if(document.getElementById('c_ingles_').value=='XX_'){alert('Debe seleccionar Curso_');return false;}
	else{document.getElementById('c_ingles3').value=document.getElementById('c_ingles_').value}
if(document.getElementById('asopadres_').value=='XX_'){alert('Debe seleccionar si esta en Asopadres_');return false;}
	else{document.getElementById('asopadres3').value=document.getElementById('asopadres_').value}
if(document.getElementById('seguro_').value=='XX_'){alert('Debe seleccionar si tiene seguro estudiantil_');return false;}
	else{document.getElementById('seguro3').value=document.getElementById('seguro_').value}
if(document.getElementById('historia_').value=='XX_'){alert('Debe seleccionar Si es Nuevo o Retirado_');return false;}
	else{document.getElementById('historia3').value=document.getElementById('historia_').value}
if(document.getElementById('estado_est_').value=='XX_'){alert('Debe seleccionar Estado del Estudiante_');return false;}
	else{document.getElementById('estado_est3').value=document.getElementById('estado_est_').value}
if(document.getElementById('estado_aca_').value=='XX_'){alert('Debe seleccionar Estado Academico_');return false;}
	else{document.getElementById('estado_aca3').value=document.getElementById('estado_aca_').value}

if(document.getElementById('estrato_').value=='XX_'){alert('Debe seleccionar Estrato_');return false;}
	else{document.getElementById('estrato3').value=document.getElementById('estrato_').value}
if(document.getElementById('u_plataforma_').value==''){alert('Debe digitar Usuario de Plataforma');return false;}
	else{document.getElementById('u_plataforma3').value=document.getElementById('u_plataforma_').value}
if(document.getElementById('c_plataforma_').value==''){alert('Debe digitar Clave del Usuario');return false;}
	else{document.getElementById('c_plataforma3').value=document.getElementById('c_plataforma_').value}
if(document.getElementById('estado_civil_').value=='XX_'){alert('Debe seleccionar Estado Civil de Padres_');return false;}
	else{document.getElementById('estado_civil3').value=document.getElementById('estado_civil_').value}
if(document.getElementById('hermanos_').value=='XX_'){alert('Debe seleccionar Nro. de  Hermanos_');return false;}
	else{document.getElementById('hermanos3').value=document.getElementById('hermanos_').value}
if(document.getElementById('orden_').value=='XX_'){alert('Debe seleccionar Nro. Orden de  Hermanos_');return false;}
	else{document.getElementById('orden3').value=document.getElementById('orden_').value}
if(document.getElementById('vive_').value=='XX_'){alert('Debe seleccionar con quien vive_');return false;}
	else{document.getElementById('vive3').value=document.getElementById('vive_').value}
if(document.getElementById('vive_').value=='O'&&document.getElementById('vive_otro_').value==''){alert('Debe digitar Con quien vive_');return false;}
	else{document.getElementById('vive_otro3').value=document.getElementById('vive_otro_').value}
	

if(document.getElementById('padre_').value==''){}
	else{document.getElementById('padre3').value=document.getElementById('padre_').value}
if(document.getElementById('id_padre_').value==''){}
	else{document.getElementById('id_padre3').value=document.getElementById('id_padre_').value}
if(document.getElementById('exp_padre_').value==''){}
	else{document.getElementById('exp_padre3').value=document.getElementById('exp_padre_').value}
if(document.getElementById('dir_padre_').value==''){}
	else{document.getElementById('dir_padre3').value=document.getElementById('dir_padre_').value}
if(document.getElementById('tel_padre_').value==''){}
	else{document.getElementById('tel_padre3').value=document.getElementById('tel_padre_').value}
if(document.getElementById('correo_padre_').value==''){}
	else{document.getElementById('correo_padre3').value=document.getElementById('correo_padre_').value}
if(document.getElementById('formacion_padre_').value==''){}
	else{document.getElementById('formacion_padre3').value=document.getElementById('formacion_padre_').value}
if(document.getElementById('empresa_padre_').value==''){}
	else{document.getElementById('empresa_padre3').value=document.getElementById('empresa_padre_').value}
if(document.getElementById('cargo_padre_').value==''){}
	else{document.getElementById('cargo_padre3').value=document.getElementById('cargo_padre_').value}
if(document.getElementById('dir_emp_padre_').value==''){}
	else{document.getElementById('dir_emp_padre3').value=document.getElementById('dir_emp_padre_').value}
if(document.getElementById('tel_emp_padre_').value==''){}
	else{document.getElementById('tel_emp_padre3').value=document.getElementById('tel_emp_padre_').value}

if(document.getElementById('madre_').value==''){}
	else{document.getElementById('madre3').value=document.getElementById('madre_').value}
if(document.getElementById('id_madre_').value==''){}
	else{document.getElementById('id_madre3').value=document.getElementById('id_madre_').value}
if(document.getElementById('exp_madre_').value==''){}
	else{document.getElementById('exp_madre3').value=document.getElementById('exp_madre_').value}
if(document.getElementById('dir_madre_').value==''){}
	else{document.getElementById('dir_madre3').value=document.getElementById('dir_madre_').value}
if(document.getElementById('tel_madre_').value==''){}
	else{document.getElementById('tel_madre3').value=document.getElementById('tel_madre_').value}
if(document.getElementById('correo_madre_').value==''){}
	else{document.getElementById('correo_madre3').value=document.getElementById('correo_madre_').value}
if(document.getElementById('formacion_madre_').value==''){}
	else{document.getElementById('formacion_madre3').value=document.getElementById('formacion_madre_').value}
if(document.getElementById('empresa_madre_').value==''){}
	else{document.getElementById('empresa_madre3').value=document.getElementById('empresa_madre_').value}
if(document.getElementById('cargo_madre_').value==''){}
	else{document.getElementById('cargo_madre3').value=document.getElementById('cargo_madre_').value}
if(document.getElementById('dir_emp_madre_').value==''){}
	else{document.getElementById('dir_emp_madre3').value=document.getElementById('dir_emp_madre_').value}
if(document.getElementById('tel_emp_madre_').value==''){}
	else{document.getElementById('tel_emp_madre3').value=document.getElementById('tel_emp_madre_').value}












	if(document.getElementById('religion_').value==''){alert('Debe digitar la religion');return false;}
		else{document.getElementById('religion3').value=document.getElementById('religion_').value}
	if(document.getElementById('direccion_').value==''){alert('Debe digitar la direccion');return false;}
		else{document.getElementById('direccion3').value=document.getElementById('direccion_').value}
	if(document.getElementById('telefono_').value==''){alert('Debe digitar el telefono');return false;}
		else{document.getElementById('telefono3').value=document.getElementById('telefono_').value}
	if(document.getElementById('correo_').value==''){}
		else{document.getElementById('correo3').value=document.getElementById('correo_').value}

	if(document.getElementById('padre_').value==''){}
		else{document.getElementById('padre3').value=document.getElementById('padre_').value}
	if(document.getElementById('madre_').value==''){}
		else{document.getElementById('madre3').value=document.getElementById('madre_').value}

if(document.getElementById('buscar_acud2').value==''){}
	else{	var mystr5 = document.getElementById('buscar_acud2').value;
		var myarr5 = mystr5.split(' - ');
		var t_id5 = myarr5[0];
		document.getElementById('acud_iden3').value=t_id5;
	}


	if(document.getElementById('l_curso2_').value=='XX'){alert('Debe seleccionar el curso');return false;}
		else{document.getElementById('l_curso23').value=document.getElementById('l_curso2_').value}        
       
	document.getElementById('val3').value=1;
	document.forms['editar_estudiante'].submit();
}
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 crea_estudiante(){

if(document.getElementById('codigo_estudiante').value==''){alert('Debe digitar el codigo del estudiante');return false;}
	else{document.getElementById('codigo_estudiante2').value=document.getElementById('codigo_estudiante').value}
if(document.getElementById('fecha_nacimiento').value==''){alert('Debe digitar la fecha nacimiento');return false;}
	else{document.getElementById('fecha_nacimiento2').value=document.getElementById('fecha_nacimiento').value}

if(document.getElementById('nombre_estudiante').value==''){alert('Debe digitar el nombre ');return false;}
	else{document.getElementById('nombre_estudiante2').value=document.getElementById('nombre_estudiante').value}
if(document.getElementById('tipo_documento').value=='XX'){alert('Debe seleccionar el Tipo de Documento');return false;}
	else{document.getElementById('tipo_documento2').value=document.getElementById('tipo_documento').value}
if(document.getElementById('documento').value==''){alert('Debe digitar el documento de identidad');return false;}
	else{document.getElementById('documento2').value=document.getElementById('documento').value}

if(document.getElementById('lugar_exp').value==''){alert('Debe digitar el lugar de expedicion');return false;}
	else{document.getElementById('lugar_exp2').value=document.getElementById('lugar_exp').value}
if(document.getElementById('lugar_nac').value==''){alert('Debe digitar el lugar de nacimiento');return false;}
	else{document.getElementById('lugar_nac2').value=document.getElementById('lugar_nac').value}
if(document.getElementById('pais').value==''){alert('Debe digitar el Pais de nacimiento');return false;}
	else{document.getElementById('pais2').value=document.getElementById('pais').value}

if(document.getElementById('peso').value==''){}
	else{document.getElementById('peso2').value=document.getElementById('peso').value}
if(document.getElementById('estatura').value==''){}
	else{document.getElementById('estatura2').value=document.getElementById('estatura').value}
if(document.getElementById('eps').value==''){}
	else{document.getElementById('eps2').value=document.getElementById('eps').value}
if(document.getElementById('nro_sisben').value==''){}
	else{document.getElementById('nro_sisben2').value=document.getElementById('nro_sisben').value}
if(document.getElementById('niv_sisben').value==''){}
	else{document.getElementById('niv_sisben2').value=document.getElementById('niv_sisben').value}
if(document.getElementById('alergias').value==''){}
	else{document.getElementById('alergias2').value=document.getElementById('alergias').value}

if(document.getElementById('poliza').value==''){}
	else{document.getElementById('poliza2').value=document.getElementById('poliza').value}
if(document.getElementById('dni').value==''){}
	else{document.getElementById('dni2').value=document.getElementById('dni').value}
if(document.getElementById('vi').value==''){}
	else{document.getElementById('vi2').value=document.getElementById('vi').value}
if(document.getElementById('vf').value==''){}
	else{document.getElementById('vf2').value=document.getElementById('vf').value}
				

if(document.getElementById('lectivo').value==''){alert('Debe digitar el A?o Lectivo');return false;}
	else{document.getElementById('lectivo2').value=document.getElementById('lectivo').value}
if(document.getElementById('jornada').value=='XX'){alert('Debe seleccionar Jornada');return false;}
	else{document.getElementById('jornada2').value=document.getElementById('jornada').value}
if(document.getElementById('transporte').value=='XX'){alert('Debe seleccionar Transporte');return false;}
	else{document.getElementById('transporte2').value=document.getElementById('transporte').value}
if(document.getElementById('c_ingles').value=='XX'){alert('Debe seleccionar Curso');return false;}
	else{document.getElementById('c_ingles2').value=document.getElementById('c_ingles').value}
if(document.getElementById('asopadres').value=='XX'){alert('Debe seleccionar si esta en Asopadres');return false;}
	else{document.getElementById('asopadres2').value=document.getElementById('asopadres').value}
if(document.getElementById('seguro').value=='XX'){alert('Debe seleccionar si tiene seguro estudiantil');return false;}
	else{document.getElementById('seguro2').value=document.getElementById('seguro').value}
if(document.getElementById('historia').value=='XX'){alert('Debe seleccionar Si es Nuevo o Retirado');return false;}
	else{document.getElementById('historia2').value=document.getElementById('historia').value}
if(document.getElementById('estado_est').value=='XX'){alert('Debe seleccionar Estado del Estudiante');return false;}
	else{document.getElementById('estado_est2').value=document.getElementById('estado_est').value}
if(document.getElementById('estado_aca').value=='XX'){alert('Debe seleccionar Estado Academico');return false;}
	else{document.getElementById('estado_aca2').value=document.getElementById('estado_aca').value}

if(document.getElementById('estrato').value=='XX'){alert('Debe seleccionar Estrato');return false;}
	else{document.getElementById('estrato2').value=document.getElementById('estrato').value}
if(document.getElementById('u_plataforma').value==''){alert('Debe digitar Usuario de Plataforma');return false;}
	else{document.getElementById('u_plataforma2').value=document.getElementById('u_plataforma').value}
if(document.getElementById('c_plataforma').value==''){alert('Debe digitar Clave de Usuario');return false;}
	else{document.getElementById('c_plataforma2').value=document.getElementById('c_plataforma').value}
if(document.getElementById('estado_civil').value=='XX'){alert('Debe seleccionar Estado Civil de Padres');return false;}
	else{document.getElementById('estado_civil2').value=document.getElementById('estado_civil').value}
if(document.getElementById('hermanos').value=='XX'){alert('Debe seleccionar Nro. de  Hermanos');return false;}
	else{document.getElementById('hermanos2').value=document.getElementById('hermanos').value}
if(document.getElementById('orden').value=='XX'){alert('Debe seleccionar Nro. Orden de  Hermanos');return false;}
	else{document.getElementById('orden2').value=document.getElementById('orden').value}
if(document.getElementById('vive').value=='XX'){alert('Debe seleccionar con quien vive');return false;}
	else{document.getElementById('vive2').value=document.getElementById('vive').value}
if(document.getElementById('vive').value=='O'&&document.getElementById('vive_otro').value==''){alert('Debe digitar Con quien vive');return false;}
	else{document.getElementById('vive_otro2').value=document.getElementById('vive_otro').value}

if(document.getElementById('buscar_acud').value==''){}
	else{	var mystr2 = document.getElementById('buscar_acud').value;
		var myarr2 = mystr2.split(' - ');
		var t_id2 = myarr2[0];
		document.getElementById('iden_acud2').value=t_id2;
	}
if(document.getElementById('acud_paren_2').value==''){}
	else{document.getElementById('paren_acud2').value=document.getElementById('acud_paren_2').value}	

if(document.getElementById('padre').value==''){}
	else{document.getElementById('padre2').value=document.getElementById('padre').value}
if(document.getElementById('id_padre').value==''){}
	else{document.getElementById('id_padre2').value=document.getElementById('id_padre').value}
if(document.getElementById('exp_padre').value==''){}
	else{document.getElementById('exp_padre2').value=document.getElementById('exp_padre').value}
if(document.getElementById('dir_padre').value==''){}
	else{document.getElementById('dir_padre2').value=document.getElementById('dir_padre').value}
if(document.getElementById('tel_padre').value==''){}
	else{document.getElementById('tel_padre2').value=document.getElementById('tel_padre').value}
if(document.getElementById('correo_padre').value==''){}
	else{document.getElementById('correo_padre2').value=document.getElementById('correo_padre').value}
if(document.getElementById('formacion_padre').value==''){}
	else{document.getElementById('formacion_padre2').value=document.getElementById('formacion_padre').value}
if(document.getElementById('empresa_padre').value==''){}
	else{document.getElementById('empresa_padre2').value=document.getElementById('empresa_padre').value}
if(document.getElementById('cargo_padre').value==''){}
	else{document.getElementById('cargo_padre2').value=document.getElementById('cargo_padre').value}
if(document.getElementById('dir_emp_padre').value==''){}
	else{document.getElementById('dir_emp_padre2').value=document.getElementById('dir_emp_padre').value}
if(document.getElementById('tel_emp_padre').value==''){}
	else{document.getElementById('tel_emp_padre2').value=document.getElementById('tel_emp_padre').value}

if(document.getElementById('madre').value==''){}
	else{document.getElementById('madre2').value=document.getElementById('madre').value}
if(document.getElementById('id_madre').value==''){}
	else{document.getElementById('id_madre2').value=document.getElementById('id_madre').value}
if(document.getElementById('exp_madre').value==''){}
	else{document.getElementById('exp_madre2').value=document.getElementById('exp_madre').value}
if(document.getElementById('dir_madre').value==''){}
	else{document.getElementById('dir_madre2').value=document.getElementById('dir_madre').value}
if(document.getElementById('tel_madre').value==''){}
	else{document.getElementById('tel_madre2').value=document.getElementById('tel_madre').value}
if(document.getElementById('correo_madre').value==''){}
	else{document.getElementById('correo_madre2').value=document.getElementById('correo_madre').value}
if(document.getElementById('formacion_madre').value==''){}
	else{document.getElementById('formacion_madre2').value=document.getElementById('formacion_madre').value}
if(document.getElementById('empresa_madre').value==''){}
	else{document.getElementById('empresa_madre2').value=document.getElementById('empresa_madre').value}
if(document.getElementById('cargo_madre').value==''){}
	else{document.getElementById('cargo_madre2').value=document.getElementById('cargo_madre').value}
if(document.getElementById('dir_emp_madre').value==''){}
	else{document.getElementById('dir_emp_madre2').value=document.getElementById('dir_emp_madre').value}
if(document.getElementById('tel_emp_madre').value==''){}
	else{document.getElementById('tel_emp_madre2').value=document.getElementById('tel_emp_madre').value}



if(document.getElementById('sexo').value=='XX'){alert('Debe seleccionar el sexo');return false;}
	else{document.getElementById('sexo2').value=document.getElementById('sexo').value}
if(document.getElementById('grupo_sangre').value=='XX'){alert('Debe seleccionar el grupo de sangre');return false;}
	else{document.getElementById('grupo_sangre2').value=document.getElementById('grupo_sangre').value}
if(document.getElementById('religion').value==''){alert('Debe digitar la religion');return false;}
	else{document.getElementById('religion2').value=document.getElementById('religion').value}
if(document.getElementById('direccion').value==''){alert('Debe digitar la direccion');return false;}
	else{document.getElementById('direccion2').value=document.getElementById('direccion').value}
if(document.getElementById('telefono').value==''){alert('Debe digitar el telefono');return false;}
	else{document.getElementById('telefono2').value=document.getElementById('telefono').value}
if(document.getElementById('correo').value==''){}
	else{document.getElementById('correo2').value=document.getElementById('correo').value}
if(document.getElementById('l_curso2').value=='XX'){alert('Debe seleccionar el curso');return false;}
	else{document.getElementById('l_curso22').value=document.getElementById('l_curso2').value}

//document.getElementById('uploadBtn2').value=document.getElementById('uploadBtn').value;



	document.getElementById('val2').value=1;
	document.forms['crear_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\">
	         <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>
         <a  href=\"general.php\" class='hidden-xs' ><img src='img/logo1.png'  style='margin-top:5px;'></a> 
         </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 active\"><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\"><span class=\"glyphicon glyphicon-user\"></span> Docentes</a>
            <a href=\"acudiente.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-user\"></span> Acudientes</a>                      
            <a href=\"asignaturas.php\" class=\"list-group-item\"><span class=\"glyphicon glyphicon-book\"></span> Asignaturas</a>
            <a href=\"cursos.php\" class=\"list-group-item\"><span class=\"glyphicon glyphicon-list\"></span> Cursos</a>
            <a href=\"pensum.php\" class=\"list-group-item\"><span class=\"glyphicon glyphicon-edit\"></span> Pensum</a>    
            <a href=\"logros.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-edit\"></span> Logros</a>                        
            <a href=\"observaciones.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-edit\"></span> Indicadores de Comportamiento</a>                                    
            <a href=\"horario.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-edit\"></span> Horario</a>
<a href=\"horario_atencion.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-edit\"></span> Horario de Atenci&oacute;n</a>            
<a href=\"planilla_asistencia.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-file\"></span> Control de Asistencia</a>            
<a href=\"planilla.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-file\"></span> Registro de Calificaciones</a>            
            <a href=\"planilla_obs.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-file\"></span> Observador del Estudiante</a>                        
            <a href=\"pagos.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-list\"></span> Pagos</a>                  
            <a href=\"reportes.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-file\"></span> Boletines</a>            
<a href=\"eventos.php\" class=\"list-group-item \"><span class=\"glyphicon glyphicon-edit\"></span> Anuncios</a>           
            <a href=\"config.php\" class=\"list-group-item\"><span class=\"glyphicon glyphicon-wrench\"></span> Configuraci&oacute;n</a>
          </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>
	  <li $class2 ><a href=\"#profile\" data-toggle=\"tab\">Crear Estudiantes</a></li>
	  <li $class3 ><a href=\"#edita\" data-toggle=\"tab\" >Editar Estudiantes</a></li>
	  <li $class4 ><a href=\"#perfil\" data-toggle=\"tab\">Actualizar Pensum</a></li>	  

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

	<div class=\"tab-content\">
	<div class=\"tab-pane fade in $act4 \" id=\"perfil\">
		<form name='perfil_estudiantes' id='perfil_estudiantes' method='post' action='estudiantes.php#perfil' target='' enctype='multipart/form-data'>
		<input type='hidden' name='val4' id='val4' value='".$val4."'>
		<input type='hidden' name='cur4' id='cur4' value='".$cur4."'>
		<input type='hidden' name='est4' id='est4' value='".$est4."'>						
		<input type='hidden' name='indice4' id='indice4' value='".$indice4."'>	
		<div class=\"page\">
			<fieldset>
				<legend>
					<br><span class=\"glyphicon glyphicon-edit\"></span> Actualizar Pensum
				</legend>		
				<center>";
echo 				$perfil_tabla;
echo				"</center>	
			</fieldset>
			<fieldset>
				<legend>
						<br>
						
				</legend>
				


		    <input type='text' id='buscar4' name='buscar4'  value='' placeholder='...Digite parte del nombre' style='width:30%;margin-bottom: 10px' onclick='this.value=\"\"'>
		    <button type='button' class='btn btn-info' onclick='actualiza_pensum()'> Actualizar</button>     				
			</fieldset>	
				<br>
		</div>
		</form>
	</div>
		
	
	<div class=\"tab-pane fade in $act3 \" id=\"edita\">
		<form name='editar_estudiante' id='editar_estudiante' method='post' action='estudiantes.php#edita' target='' enctype='multipart/form-data'>
		<input type='hidden' name='val3' id='val3' value='".$val3."'>	
		<input type='hidden' name='indice3' id='indice3' value='".$indice3."'>	
<input type='hidden' name='in3' id='in3' value='".$in3."'>
		<input type='hidden' name='cur3' id='cur3' value='".$cur3."'>

<input type='hidden' name='buscar3' id='buscar3' value='".$buscar3."'>	


		<input type='hidden' name='nombre_estudiante3' id='nombre_estudiante3' value='".$nombre_estudiante3."'>	
		<input type='hidden' name='tipo_documento3' id='tipo_documento3' value='".$tipo_documento3."'>	
		<input type='hidden' name='documento3' id='documento3' value='".$documento3."'>		
		<input type='hidden' name='lugar_exp3' id='lugar_exp3' value='".$lugar_exp3."'>				
		<input type='hidden' name='lugar_nac3' id='lugar_nac3' value='".$lugar_nac3."'>		
		<input type='hidden' name='pais3' id='pais3' value='".$pais3."'>
		
		<input type='hidden' name='peso3' id='peso3' value='".$peso3."'>		
		<input type='hidden' name='estatura3' id='estatura3' value='".$estatura3."'>		
		<input type='hidden' name='eps3' id='eps3' value='".$eps3."'>		
		<input type='hidden' name='nro_sisben3' id='nro_sisben3' value='".$nro_sisben3."'>		
		<input type='hidden' name='niv_sisben3' id='niv_sisben3' value='".$niv_sisben3."'>		
		<input type='hidden' name='alergias3' id='alergias3' value='".$alergias3."'>
		<input type='hidden' name='poliza3' id='poliza3' value='".$poliza3."'>
		<input type='hidden' name='dni3' id='dni3' value='".$dni3."'>
		<input type='hidden' name='vi3' id='vi3' value='".$vi3."'>
		<input type='hidden' name='vf3' id='vf3' value='".$vf3."'>	
				

		<input type='hidden' name='lectivo3' id='lectivo3' value='".$lectivo3."'>		
		<input type='hidden' name='jornada3' id='jornada3' value='".$jornada3."'>		
		<input type='hidden' name='transporte3' id='transporte3' value='".$transporte3."'>
		<input type='hidden' name='c_ingles3' id='c_ingles3' value='".$c_ingles3."'>
		<input type='hidden' name='asopadres3' id='asopadres3' value='".$asopadres3."'>
		<input type='hidden' name='seguro3' id='seguro3' value='".$seguro3."'>						
		<input type='hidden' name='historia3' id='historia3' value='".$historia3."'>
		<input type='hidden' name='estado_est3' id='estado_est3' value='".$estado_est3."'>
		<input type='hidden' name='estado_aca3' id='estado_aca3' value='".$estado_aca3."'>						

		<input type='hidden' name='estrato3' id='estrato3' value='".$estrato3."'>						
		<input type='hidden' name='u_plataforma3' id='u_plataforma3' value='".$u_plataforma3."'>		
		<input type='hidden' name='c_plataforma3' id='c_plataforma3' value='".$c_plataforma3."'>		
		<input type='hidden' name='estado_civil3' id='estado_civil3' value='".$estado_civil3."'>				
		<input type='hidden' name='hermanos3' id='hermanos3' value='".$hermanos3."'>		
		<input type='hidden' name='orden3' id='orden3' value='".$orden3."'>		
		<input type='hidden' name='vive3' id='vive3' value='".$vive3."'>		
		<input type='hidden' name='vive_otro3' id='vive_otro3' value='".$vive_otro3."'>		
		
		<input type='hidden' name='id_padre3' id='id_padre3' value='".$id_padre3."'>		
		<input type='hidden' name='exp_padre3' id='exp_padre3' value='".$exp_padre3."'>	
		<input type='hidden' name='dir_padre3' id='dir_padre3' value='".$dir_padre3."'>		
		<input type='hidden' name='tel_padre3' id='tel_padre3' value='".$tel_padre3."'>			
		<input type='hidden' name='correo_padre3' id='correo_padre3' value='".$correo_padre3."'>
		<input type='hidden' name='formacion_padre3' id='formacion_padre3' value='".$formacion_padre3."'>		
		<input type='hidden' name='empresa_padre3' id='empresa_padre3' value='".$empresa_padre3."'>		
		<input type='hidden' name='cargo_padre3' id='cargo_padre3' value='".$cargo_padre3."'>
		<input type='hidden' name='dir_emp_padre3' id='dir_emp_padre3' value='".$dir_emp_padre3."'>
		<input type='hidden' name='tel_emp_padre3' id='tel_emp_padre3' value='".$tel_emp_padre3."'>

		<input type='hidden' name='id_madre3' id='id_madre3' value='".$id_madre3."'>		
		<input type='hidden' name='exp_madre3' id='exp_madre3' value='".$exp_madre3."'>	
		<input type='hidden' name='dir_madre3' id='dir_madre3' value='".$dir_madre3."'>		
		<input type='hidden' name='tel_madre3' id='tel_madre3' value='".$tel_madre3."'>			
		<input type='hidden' name='correo_madre3' id='correo_madre3' value='".$correo_madre3."'>
		<input type='hidden' name='formacion_madre3' id='formacion_madre3' value='".$formacion_madre3."'>		
		<input type='hidden' name='empresa_madre3' id='empresa_madre3' value='".$empresa_madre3."'>		
		<input type='hidden' name='cargo_madre3' id='cargo_madre3' value='".$cargo_madre3."'>
		<input type='hidden' name='dir_emp_madre3' id='dir_emp_madre3' value='".$dir_emp_madre3."'>
		<input type='hidden' name='tel_emp_madre3' id='tel_emp_madre3' value='".$tel_emp_madre3."'>

		<input type='hidden' name='id_acud3' id='id_acud3' value='".$id_acud3."'>		
		<input type='hidden' name='exp_acud3' id='exp_acud3' value='".$exp_acud3."'>	
		<input type='hidden' name='dir_acud3' id='dir_acud3' value='".$dir_acud3."'>		
		<input type='hidden' name='tel_acud3' id='tel_acud3' value='".$tel_acud3."'>			
		<input type='hidden' name='correo_acud3' id='correo_acud3' value='".$correo_acud3."'>
		<input type='hidden' name='formacion_acud3' id='formacion_acud3' value='".$formacion_acud3."'>		
		<input type='hidden' name='empresa_acud3' id='empresa_acud3' value='".$empresa_acud3."'>		
		<input type='hidden' name='cargo_acud3' id='cargo_acud3' value='".$cargo_acud3."'>
		<input type='hidden' name='dir_emp_acud3' id='dir_emp_acud3' value='".$dir_emp_acud3."'>
		<input type='hidden' name='tel_emp_acud3' id='tel_emp_acud3' value='".$tel_emp_acud3."'>
		<input type='hidden' name='u_plataforma_acud3' id='u_plataforma_acud3' value='".$u_plataforma_acud3."'>
		<input type='hidden' name='c_plataforma_acud3' id='c_plataforma_acud3' value='".$c_plataforma_acud3."'>						
		<input type='hidden' name='acud_paren3' id='acud_paren3' value='".$acud_paren3."'>
		<input type='hidden' name='acud_iden3' id='acud_iden3' value='".$acud_iden3."'>		


		<input type='hidden' name='fecha_nacimiento3' id='fecha_nacimiento3' value='".$fecha_nacimiento3."'>
		<input type='hidden' name='sexo3' id='sexo3' value='".$sexo3."'>	
		<input type='hidden' name='grupo_sangre3' id='grupo_sangre3' value='".$grupo_sangre3."'>	
		<input type='hidden' name='uploadFile3' id='uploadFile3' value='".$uploadFile3."'>
		<input type='hidden' name='uploadBtn3' id='uploadBtn3' value='".$uploadBtn3."'>
		<input type='hidden' name='religion3' id='religion3' value='".$religion3."'>
		<input type='hidden' name='direccion3' id='direccion3' value='".$direccion3."'>	
		<input type='hidden' name='telefono3' id='telefono3' value='".$telefono3."'>	
		<input type='hidden' name='correo3' id='correo3' value='".$correo3."'>
		<input type='hidden' name='padre3' id='padre3' value='".$padre3."'>
		<input type='hidden' name='madre3' id='madre3' value='".$madre3."'>	
		<input type='hidden' name='acudiente3' id='acudiente3' value='".$acudiente3."'>	
		<input type='hidden' name='l_curso23' id='l_curso23' value='".$l_curso23."'>		
		<input type='hidden' name='MAX_FILE_SIZE' value='2000000'>
	<div class=\"page\">
			<fieldset>
				<legend>
					<br><span class=\"glyphicon glyphicon-edit\"></span> Editar Estudiante          
				</legend>			
			</fieldset>";
				
				$select_edicion="select nombre,f_nacimiento,sexo,religion,grupo_sangre,direccion,telefono,correo,nombre_padre,nombre_madre,nombre_asistente,curso_id,
				(select nombre_archivo from upload where upload.codigo=estudiante.estudiante_id and clase='F'),
						tipo_documento,
						documento,
						lugar_expedicion,
						lugar_nacimiento,
						pais,
						peso,
						estatura,
						eps,
						sisben,
						niv_sisben,
						alergias,
						ano_lectivo,
						jornada,
						transporte,
						curso_ingles,
						asopadres,
						seguro,
						historia,
						estado_est,
						estado_aca,
						estrato,
						usuario,
						clave,
						estado_civil,
						hermanos,
						orden,
						vive,
						vive_otro,
						id_padre,
						exp_padre,
						dir_padre,
						tel_padre,
						correo_padre,
						formacion_padre,
						empresa_padre,
						cargo_padre,
						dir_emp_padre,
						tel_emp_padre,
						id_madre,
						exp_madre,
						dir_madre,
						tel_madre,
						correo_madre,
						formacion_madre,
						empresa_madre,
						cargo_madre,
						dir_emp_madre,
						tel_emp_madre,
						(SELECT CONCAT(id,' - ',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
							
							)  as datos_acudiente
							from acudiente
							where acudiente.id=estudiante.acud_id
							),
						acud_id,
						poliza,dni,vigencia_i,vigencia_f,
						estudiante_id,otro_acud
						from estudiante 
						where estudiante_id=".$_POST['indice3']." "; 
				//echo $select_edicion;
				$res_select_edicion=mysql_query($select_edicion);
				
				if(isset($_POST['indice3'])&&!empty($_POST['indice3'])&&mysql_query($select_edicion)){
				
				$edit_est=mysql_fetch_array($res_select_edicion);
				$edit_filas=mysql_num_rows($res_select_edicion);
								$busqueda="";
				}else{
				
				$busqueda="
					<div class='input' style='float:left;width: 140px;padding-top: 5px;padding-left: 12px;text-align: left;' >
							&nbsp;
					  </div>
					 <div class='input' style='padding-left:11px;'>
						    <input type='text' id='buscar_' name='buscar_'  value='' placeholder='...Digite parte del nombre' style='width:30%;margin-bottom: 10px' onclick='this.value=\"\"'>
						 <button type='button' class='btn btn-info btn-sm' onclick='buscar_estudiante()' style='margin-left: 10px'> Buscar</button>    
					 </div>
				<br>";

				}

				
				//if($edit_filas>0){
			//	if(isset($_POST['indice3'])&&!empty($_POST['indice3'])){
				if(!empty($edit_est[12])&&isset($edit_est[12])){$foto3="<div align=left><img style='border-radius: 100px;
						-moz-border-radius: 100px;
						-webkit-border-radius: 100px;
						-khtml-border-radius: 100px;
						 overflow: hidden;'  src='img/foto/".$edit_est[12]."' width='100px' height='100px' ></div>";}
					else{$foto3="<div align=left><img style='border-radius: 100px;
						-moz-border-radius: 100px;
						-webkit-border-radius: 100px;
						-khtml-border-radius: 100px;
						 overflow: hidden;'  src='img/foto/anon.png' width='100px' height='100px' ></div>";}
				
				
echo $busqueda;
		
echo		"<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Nombre&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[0]' id='nombre_estudiante_' name='nombre_estudiante_' type='text' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px;text-transform:uppercase;'>
		 </div>
		 
	 	<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Tipo de Documento&nbsp;
		</div>
		 <div class='input' >
		    <select id='tipo_documento_' name='tipo_documento_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		    $sel1='';$sel2='';$sel3='';$sel4='';
		     if(isset($edit_est[13])&&!empty($edit_est[13])){
					if($edit_est[13]=='TI')	{$sel1=' selected ';}
					if($edit_est[13]=='CC')	{$sel2=' selected ';}					
					if($edit_est[13]=='PA')	{$sel3=' selected ';}
					if($edit_est[13]=='RC')	{$sel4=' selected ';}					
					}
echo		 		"<option value='XX'>Seleccione</option>
		 		<option $sel1 value='TI'>TARJETA DE IDENTIDAD</option>
		 		<option $sel2 value='CC'>CEDULA DE CIUDADANIA</option>		 				 		
		 		<option $sel3 value='PA'>NUMERO DE PASAPORTE</option>		 		
		 		<option $sel4 value='RC'>REGISTRO CIVIL</option>		 		
		 	</select>
		 </div>
		
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Documento&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[14]' id='documento_' name='documento_' type='text' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px;'>
		 </div>
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Lugar de Expedici&oacute;n&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[15]' id='lugar_exp_' name='lugar_exp_' type='text' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px;'>
		 </div>
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Ciudad Nacimiento&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[16]' id='lugar_nac_' name='lugar_nac_' type='text' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px;'>
		 </div>
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Pais&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[17]' id='pais_' name='pais_' type='text' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px;'>
		 </div>		
		
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Fecha Nacimiento&nbsp;
		  </div>
		 <div class='input' >
		    <input  value='$edit_est[1]' type='date' id='fecha_nacimiento_' name='fecha_nacimiento_' class='form-control2' placeholder='dd/mm/aaaa' style='width:48%;margin-bottom: 10px'>
		 </div>
		<br>
		 <div class='input' style='float:left;width: 140px;padding-top: 15px;text-align: right;' >
			Foto &nbsp;
		  </div>
		<div class='' style='margin-bottom:10px;'>
			<input id='archivo_' name='archivo_' type='file' class='fileUpload'  >
		  </div>		
	

		 <div class='input' style='float:left;width: 140px;padding-top: 15px;text-align: right;' >
			 &nbsp;
		  </div>
			$foto3		
		<br>		
		<hr width=98%'>
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Sexo&nbsp;
		  </div>
		 <div class='input' >
		 	<select id='sexo_' name='sexo_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		 	 $sel1='';$sel2='';
		 	 if(isset($edit_est[2])&&!empty($edit_est[2])){
					if($edit_est[2]=='Masculino')	{$sel1=' selected ';}
					if($edit_est[2]=='Femenino')	{$sel2=' selected ';}					
					}
echo		 		"<option value='XX'>Seleccione</option>
		 		<option $sel1 >Masculino</option>
		 		<option $sel2 >Femenino</option>		 				 		";
echo		 	"</select>
		 </div>
		 
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Grupo de Sangre&nbsp;
		  </div>
		 <div class='input' >
		 	<select id='grupo_sangre_' name='grupo_sangre_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		 	 $sel1='';$sel2='';$sel3='';$sel4='';$sel5='';$sel6='';$sel7='';$sel8='';
		 	 if(isset($edit_est[4])&&!empty($edit_est[4])){
					if($edit_est[4]=='AB+')	{$sel1=' selected ';}
					if($edit_est[4]=='AB-')	{$sel2=' selected ';}					
					if($edit_est[4]=='B+')	{$sel3=' selected ';}
					if($edit_est[4]=='B-')	{$sel4=' selected ';}
					if($edit_est[4]=='A+')	{$sel5=' selected ';}
					if($edit_est[4]=='A-')	{$sel6=' selected ';}
					if($edit_est[4]=='O+')	{$sel7=' selected ';}
					if($edit_est[4]=='O-')	{$sel8=' selected ';}
					}

echo		 		"<option value='XX'>Seleccione</option>
		 		<option $sel1 >AB+</option>
		 		<option $sel2 >AB-</option>		 				 		
		 		<option $sel3 >B+</option>
		 		<option $sel4 >B-</option>		 				 		
		 		<option $sel5 >A+</option>
		 		<option $sel6 >A-</option>		 				 		
		 		<option $sel7 >O+</option>
		 		<option $sel8 >O-</option>		 				 		";
echo		 	"</select>
		 </div>

		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Peso (Kg)&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[18]' type='text' id='peso_' name='peso_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>		 
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Estatura (Cms)&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[19]' type='text' id='estatura_' name='estatura_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>		 
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			EPS&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[20]' type='text' id='eps_' name='eps_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>		 
		  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			No Carnet SISBEN&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[21]' type='text' id='nro_sisben_' name='nro_sisben_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Nivel SISBEN&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[22]' type='text' id='niv_sisben_' name='niv_sisben_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Alergias&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[23]' type='text' id='alergias_' name='alergias_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Poliza&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[63]' type='text' id='poliza_' name='poliza_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			DNI&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[64]' type='text' id='dni_' name='dni_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Vig. Inicio&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[65]' type='date' id='vi_' name='vi_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Vig. Final&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[66]' type='date' id='vf_' name='vf_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	



		<hr width=98%'>	
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			A&ntilde;o Lectivo&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[24]'  type='text' id='lectivo_' name='lectivo_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Jornada&nbsp;
		  </div>
		 <div class='input' >
		    <select id='jornada_' name='jornada_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';$sel3='';
		 	 if(isset($edit_est[25])&&!empty($edit_est[25])){
					if($edit_est[25]=='M')	{$sel1=' selected ';}
					if($edit_est[25]=='N')	{$sel2=' selected ';}					
					if($edit_est[25]=='T')	{$sel3=' selected ';}
					}
echo		 		"<option value='XX'>Seleccione</option>
		 		<option $sel1 value='M'>Ma&ntilde;ana</option>
		 		<option $sel2 value='N'>Nocturno</option>		 				 		
		 		<option $sel3 value='T'>Tarde</option>
		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Transporte&nbsp;
		  </div>
		 <div class='input' >
		    <select id='transporte_' name='transporte_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';
		 	 if(isset($edit_est[26])&&!empty($edit_est[26])){
					if($edit_est[26]=='0')	{$sel1=' selected ';}
					if($edit_est[26]=='1')	{$sel2=' selected ';}					
					}
echo		 		"
		 		<option $sel1 value='0'>No</option>
		 		<option $sel2 value='1'>Si</option>		 				 		
		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Curso Ingles&nbsp;
		  </div>
		 <div class='input' >
		    <select id='c_ingles_' name='c_ingles_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';
		 	 if(isset($edit_est[27])&&!empty($edit_est[27])){
					if($edit_est[27]=='0')	{$sel1=' selected ';}
					if($edit_est[27]=='1')	{$sel2=' selected ';}					
					}
echo		 		"
		 		<option $sel1 value='0'>No</option>
		 		<option $sel2 value='1'>Si</option>		 				 		
		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Asopadres&nbsp;
		  </div>
		 <div class='input' >
		    <select id='asopadres_' name='asopadres_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';
		 	 if(isset($edit_est[28])&&!empty($edit_est[28])){
					if($edit_est[28]=='0')	{$sel1=' selected ';}
					if($edit_est[28]=='1')	{$sel2=' selected ';}					
					}
echo		 		"
		 		<option $sel1 value='0'>No</option>
		 		<option $sel2 value='1'>Si</option>		 				 		
		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Seguro Estudiantil&nbsp;
		  </div>
		 <div class='input' >
		    <select id='seguro_' name='seguro_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';
		 	 if(isset($edit_est[29])&&!empty($edit_est[29])){
					if($edit_est[29]=='0')	{$sel1=' selected ';}
					if($edit_est[29]=='1')	{$sel2=' selected ';}					
					}
echo		 		"
		 		<option $sel1 value='0'>No</option>
		 		<option $sel2 value='1'>Si</option>		 				 		

		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Nvo./Ant./Reint.&nbsp;
		  </div>
		 <div class='input' >
		    <select id='historia_' name='historia_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';$sel3='';
		 	 if(isset($edit_est[30])&&!empty($edit_est[30])){
					if($edit_est[30]=='N')	{$sel1=' selected ';}
					if($edit_est[30]=='A')	{$sel2=' selected ';}					
					if($edit_est[30]=='R')	{$sel3=' selected ';}					
					}
echo		 		"
		 		<option value='XX'>Seleccione</option>
		 		<option $sel1 value='N'>Nuevo</option>
		 		<option $sel2 value='A'>Antiguo</option>		 				 		
		 		<option $sel3 value='R'>Reintegro</option>		 				 				 		

		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Curso&nbsp;
		  </div>
		 <div class='input' >
				<select id='l_curso2_' name='l_curso2_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
				
					$select_curso='select curso_id,nombre
					from curso order by 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='  ';
					if($edit_est[11]==$r_sc[0]){$sel1=' selected ';}
					//echo "hola";
							echo '<option value="'.$r_sc[0].'"  '.$sel1.'>'.$r_sc[1].' </option>';
					}
					
echo					"</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Estado Estudiante&nbsp;
		  </div>
		 <div class='input' >
		    <select id='estado_est_' name='estado_est_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';
		 	 if(isset($edit_est[31])&&!empty($edit_est[31])){
					if($edit_est[31]=='A')	{$sel1=' selected ';}
					if($edit_est[31]=='R')	{$sel2=' selected ';}					
					}
echo		 		"
		 		<option value='XX'>Seleccione</option>
		 		<option $sel1 value='A'>Activo</option>
		 		<option $sel2 value='R'>Retirado</option>		 				 		

		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Estado Acad&eacute;mico&nbsp;
		  </div>
		 <div class='input' >
		    <select id='estado_aca_' name='estado_aca_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';$sel3='';
		 	 if(isset($edit_est[32])&&!empty($edit_est[32])){
					if($edit_est[32]=='C')	{$sel1=' selected ';}
					if($edit_est[32]=='R')	{$sel2=' selected ';}					
					if($edit_est[32]=='P')	{$sel3=' selected ';}					
					}
echo		 		"
		 		<option value='XX'>Seleccione</option>
		 		<option $sel1 value='C'>En Curso</option>
		 		<option $sel2 value='R'>Repitente</option>		 				 		
		 		<option $sel3 value='P'>Promovido</option>		 		
		 	</select>
		 </div>

		<hr width=98%'>	
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Religi&oacuten&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[3]' type='text' id='religion_' name='religion_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Direcci&oacute;n&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[5]' type='text' id='direccion_' name='direccion_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Estrato&nbsp;
		  </div>
		 <div class='input' >
		<select id='estrato_' name='estrato_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';$sel3='';$sel4='';$sel5='';$sel6='';$sel7='';$sel8='';$sel9='';$sel10='';
		 	 if(isset($edit_est[33])&&!empty($edit_est[33])){
					if($edit_est[33]=='0')	{$sel1=' selected ';}
					if($edit_est[33]=='1')	{$sel2=' selected ';}					
					if($edit_est[33]=='2')	{$sel3=' selected ';}					
					if($edit_est[33]=='3')	{$sel4=' selected ';}
					if($edit_est[33]=='4')	{$sel5=' selected ';}					
					if($edit_est[33]=='5')	{$sel6=' selected ';}					
					if($edit_est[33]=='6')	{$sel7=' selected ';}
					if($edit_est[33]=='7')	{$sel8=' selected ';}					
					if($edit_est[33]=='8')	{$sel9=' selected ';}					
					if($edit_est[33]=='9')	{$sel10=' selected ';}
					}
echo		 		"
		 		<option value='XX'>Seleccione</option>
		 		<option $sel1 value='0'>0</option>
		 		<option $sel2 value='1'>1</option>		 				 		
		 		<option $sel3 value='2'>2</option>
		 		<option $sel4 value='3'>3</option>		 				 		
		 		<option $sel5 value='4'>4</option>
		 		<option $sel6 value='5'>5</option>		 				 		
		 		<option $sel7 value='6'>6</option>
		 		<option $sel8 value='7'>7</option>		 				 		
		 		<option $sel9 value='8'>8</option>
		 		<option $sel10 value='9'>9</option>		 				 		
		 		
		 	</select>
		 </div>

		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Tel&eacute;fono&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[6]' type='text' id='telefono_' name='telefono_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>

		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Correo&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[7]' required type='text' id='correo_' name='correo_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' onblur='validarEmail(this.value)'>
		 </div>
	
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Usuario Plataforma&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[34]' required type='text' id='u_plataforma_' name='u_plataforma_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Clave&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[35]' required type='text' id='c_plataforma_' name='c_plataforma_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>
		<hr width=98%'>		 		
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Estado Civil Padres&nbsp;
		  </div>
		 <div class='input' >
		    <select id='estado_civil_' name='estado_civil_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';$sel3='';$sel4='';$sel5='';
		 	 if(isset($edit_est[36])&&!empty($edit_est[36])){
					if($edit_est[36]=='C')	{$sel1=' selected ';}
					if($edit_est[36]=='U')	{$sel2=' selected ';}					
					if($edit_est[36]=='S')	{$sel3=' selected ';}					
					if($edit_est[36]=='D')	{$sel4=' selected ';}					
					if($edit_est[36]=='N')	{$sel5=' selected ';}										
					}
echo		 		"
		 		<option value='XX'>Seleccione</option>
		 		<option $sel1 value='C'>Casados</option>
		 		<option $sel2 value='U'>Union Libre</option>		 				 		
		 		<option $sel3 value='S'>Separados</option>
		 		<option $sel4 value='D'>Divorciados</option>		 				 		
		 		<option $sel5 value='N'>Segundas Nupcias</option>
		 	</select>
		    
		 </div>
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Nro. Hermanos&nbsp;
		  </div>
		 <div class='input' >
		    <select id='hermanos_' name='hermanos_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';$sel3='';$sel4='';$sel5='';$sel6='';$sel7='';$sel8='';$sel9='';$sel10='';
		 	 if(isset($edit_est[37])&&!empty($edit_est[37])){
					if($edit_est[37]=='0')	{$sel1=' selected ';}
					if($edit_est[37]=='1')	{$sel2=' selected ';}					
					if($edit_est[37]=='2')	{$sel3=' selected ';}					
					if($edit_est[37]=='3')	{$sel4=' selected ';}
					if($edit_est[37]=='4')	{$sel5=' selected ';}					
					if($edit_est[37]=='5')	{$sel6=' selected ';}					
					if($edit_est[37]=='6')	{$sel7=' selected ';}
					if($edit_est[37]=='7')	{$sel8=' selected ';}					
					if($edit_est[37]=='8')	{$sel9=' selected ';}					
					if($edit_est[37]=='9')	{$sel10=' selected ';}
					}
echo		 		"
		 		<option value='XX'>Seleccione</option>
		 		<option $sel1 value='0'>0</option>
		 		<option $sel2 value='1'>1</option>		 				 		
		 		<option $sel3 value='2'>2</option>
		 		<option $sel4 value='3'>3</option>		 				 		
		 		<option $sel5 value='4'>4</option>
		 		<option $sel6 value='5'>5</option>		 				 		
		 		<option $sel7 value='6'>6</option>
		 		<option $sel8 value='7'>7</option>		 				 		
		 		<option $sel9 value='8'>8</option>
		 		<option $sel10 value='9'>9</option>
		 	</select>
		    
		 </div>
	 	 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Orden&nbsp;
		  </div>
		 <div class='input' >
		    <select id='orden_' name='orden_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';$sel3='';$sel4='';$sel5='';$sel6='';$sel7='';$sel8='';$sel9='';$sel10='';
		 		 if(isset($edit_est[38])&&!empty($edit_est[38])){
					if($edit_est[38]=='0')	{$sel1=' selected ';}
					if($edit_est[38]=='1')	{$sel2=' selected ';}					
					if($edit_est[38]=='2')	{$sel3=' selected ';}					
					if($edit_est[38]=='3')	{$sel4=' selected ';}
					if($edit_est[38]=='4')	{$sel5=' selected ';}					
					if($edit_est[38]=='5')	{$sel6=' selected ';}					
					if($edit_est[38]=='6')	{$sel7=' selected ';}
					if($edit_est[38]=='7')	{$sel8=' selected ';}					
					if($edit_est[38]=='8')	{$sel9=' selected ';}					
					if($edit_est[38]=='9')	{$sel10=' selected ';}
					}
echo		 		"
		 		<option value='XX'>Seleccione</option>
		 		<option $sel1 value='0'>0</option>
		 		<option $sel2 value='1'>1</option>		 				 		
		 		<option $sel3 value='2'>2</option>
		 		<option $sel4 value='3'>3</option>		 				 		
		 		<option $sel5 value='4'>4</option>
		 		<option $sel6 value='5'>5</option>		 				 		
		 		<option $sel7 value='6'>6</option>
		 		<option $sel8 value='7'>7</option>		 				 		
		 		<option $sel9 value='8'>8</option>
		 		<option $sel10 value='9'>9</option>
		 	</select>
		    
		 </div>
	 	 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Con Qui&eacute;n Vive?&nbsp;
		  </div>
		 <div class='input' >
		    <select id='vive_' name='vive_' class='form-control2' style='width:48%;margin-bottom: 10px'>";
		     $sel1='';$sel2='';$sel3='';$sel4='';
		 		 if(isset($edit_est[39])&&!empty($edit_est[39])){
					if($edit_est[39]=='M')	{$sel1=' selected ';}
					if($edit_est[39]=='P')	{$sel2=' selected ';}					
					if($edit_est[39]=='A')	{$sel3=' selected ';}					
					if($edit_est[39]=='O')	{$sel4=' selected ';}
					}
echo		 		"
		 		<option value='XX'>Seleccione</option>
		 		<option $sel1 value='M'>Madre</option>
		 		<option $sel2 value='P'>Padre</option>		 				 		
		 		<option $sel3 value='A'>Ambos</option>
		 		<option $sel4 value='O'>Otro</option>		 				 		
		 	</select>
		    
		 </div>
	 	 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Otros?Qui&eacute;n?&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[40]' required type='text' id='vive_otro_' name='vive_otro_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >		
		 </div>

		
		<hr width=98%'>

		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Acudiente&nbsp;
				    <a class='btn btn-success btn-xs' name='$edit_est[62]' id='$edit_est[62]' data-toggle='modal' data-target='#mimodal_acud' onclick=''>
			                Ver
				            </a>
		  </div>";
		  
		  $pieces = explode(" - ", $edit_est[61]);
		  
		  echo		"<div name='mimodal_acud' id='mimodal_acud' 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 Acudiente Vigente</h4>
      					      </div>
      					      <div class='modal-body'>
      					  
		      					 
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Nombre&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[1]' disabled type='text' name='cons_acud1' id='cons_acud1' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								C&eacute;dula&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[2]' disabled type='text' name='cons_acud2' id='cons_acud2' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Lugar Exped.&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[3]' disabled type='text' name='cons_acud3' id='cons_acud3' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Direcci&oacute;n&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[4]' disabled type='text' name='cons_acud4' id='cons_acud4' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Tel&eacute;fono&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[5]' disabled type='text' name='cons_acud5' id='cons_acud5' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Correo&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[6]' disabled type='text' name='cons_acud6' id='cons_acud6' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Formaci&oacute;n&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[7]' disabled type='text' name='cons_acud7' id='cons_acud7' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Empresa&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[8]' disabled type='text' name='cons_acud8' id='cons_acud8' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Cargo&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[9]' disabled type='text' name='cons_acud9' id='cons_acud9' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Dir. Emp.&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[10]' disabled type='text' name='cons_acud10' id='cons_acud10' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Tel. Emp.&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[11]' disabled type='text' name='cons_acud11' id='cons_acud11' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Usuario&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[12]' disabled type='text' name='cons_acud12' id='cons_acud12' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Clave&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[13]' disabled type='text' name='cons_acud13' id='cons_acud13' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
		      					  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
								Estado&nbsp; 
							  </div>
							 <div class='input' >
								<input value='$pieces[14]' disabled type='text' name='cons_acud14' id='cons_acud14' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
							 </div>
	      					  
      					  
      					        </div>
      					      </div>
     					    </div>
					  </div>";     					    
		  
		  
		  
		  
echo		 "<div class='input' >
		    <input value='$edit_est[61]' type='text' id='buscar_acud2' name='buscar_acud2' class='form-control2' placeholder='Digite parte del nombre o documento de id.' style='width:48%;margin-bottom: 10px'>

		 </div>
		
		  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Padre&nbsp;
		  </div>
		 <div class='input' >
			<input type='radio' name='acud_padre' id='acud_padre' value='1' onclick='if(this.checked){bloquear_campos2(\"padre\");}'><br>
		 </div>
		  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Madre&nbsp;
		  </div>
		 <div class='input' >
			<input type='radio' name='acud_padre' id='acud_padre' value='2' onclick='if(this.checked){bloquear_campos2(\"madre\");}' ><br>
		 </div>
		
		  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Otro&nbsp;
		  </div>
		 <div class='input' >
			<input type='radio' name='acud_padre' id='acud_padre' value='0' onclick='if(this.checked){bloquear_campos2(\"0\");}' checked><br> 
		 </div>
<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Parentesco&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='acud_paren' name='acud_paren' class='form-control2' value='$edit_est[68]' style='width:48%;margin-bottom: 10px'>
		 </div>
		
		<hr width=98%'>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Nombre del Padre&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[8]' type='text' id='padre_' name='padre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Identificaci&oacute;n&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[41]' type='text' id='id_padre_' name='id_padre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Lugar Expedici&oacute;n&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[42]' type='text' id='exp_padre_' name='exp_padre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Direcci&oacute;n&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[43]' type='text' id='dir_padre_' name='dir_padre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Tel&eacute;fono&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[44]' type='text' id='tel_padre_' name='tel_padre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Correo&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[45]' required type='text' id='correo_padre_' name='correo_padre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' onblur='validarEmail(this.value)'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Form. Acad&eacute;mica&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[46]' required type='text' id='formacion_padre_' name='formacion_padre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Empresa Labora&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[47]' required type='text' id='empresa_padre_' name='empresa_padre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Cargo Laboral&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[48]' required type='text' id='cargo_padre_' name='cargo_padre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Direcci&oacute;n Laboral&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[49]' required type='text' id='dir_emp_padre_' name='dir_emp_padre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Tel&eacute;fono Lab.&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[50]' required type='text' id='tel_emp_padre_' name='tel_emp_padre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>
		
		<hr width=98%'>

		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Nombre de la Madre&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[9]' type='text' id='madre_' name='madre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
	<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Identificaci&oacute;n&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[51]' type='text' id='id_madre_' name='id_madre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Lugar Expedici&oacute;n&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[52]' type='text' id='exp_madre_' name='exp_madre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Direcci&oacute;n&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[53]' type='text' id='dir_madre_' name='dir_madre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Tel&eacute;fono&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[54]' type='text' id='tel_madre_' name='tel_madre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Correo&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[55]'  type='text' id='correo_madre_' name='correo_madre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' onblur='validarEmail(this.value)'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Form. Acad&eacute;mica&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[56]'  type='text' id='formacion_madre_' name='formacion_madre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Empresa Labora&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[57]'  type='text' id='empresa_madre_' name='empresa_madre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Cargo Laboral&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[58]'  type='text' id='cargo_madre_' name='cargo_madre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Direcci&oacute;n Laboral&nbsp;
		  </div>
		 <div class='input' >
		    <input value='$edit_est[59]'  type='text' id='dir_emp_madre_' name='dir_emp_madre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Tel&eacute;fono Lab.&nbsp;
		  </div>
		 <div class='input' >
		    <input  value='$edit_est[60]' type='text' id='tel_emp_madre_' name='tel_emp_madre_' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>

	
		
		<fieldset>
		<legend>
					<br>
					
		</legend>	
			<button type='button' class='btn btn-info' onclick='actualiza_estudiante(\"$edit_est[67]\",\"".$_POST['indice3']."\")'> Actualizar Estudiante</button>     
						
		</fieldset>
			
			<br>
		</div>";
	//}
echo	"</form>
</div>


	<div class=\"tab-pane fade in $act2 \" id=\"profile\">
		<form name='crear_estudiante' id='crear_estudiante' method='post' action='estudiantes.php#profile' target='' enctype='multipart/form-data'>
		<input type='hidden' name='val2' id='val2' value='".$val2."'>	
	
		<input type='hidden' name='codigo_estudiante2' id='codigo_estudiante2' value='".$codigo_estudiante2."'>	
		<input type='hidden' name='nombre_estudiante2' id='nombre_estudiante2' value='".$nombre_estudiante2."'>	
		<input type='hidden' name='tipo_documento2' id='tipo_documento2' value='".$tipo_documento2."'>	
		<input type='hidden' name='documento2' id='documento2' value='".$documento2."'>		
		<input type='hidden' name='lugar_exp2' id='lugar_exp2' value='".$lugar_exp2."'>				
		<input type='hidden' name='lugar_nac2' id='lugar_nac2' value='".$lugar_nac2."'>		
		<input type='hidden' name='pais2' id='pais2' value='".$pais2."'>		

		<input type='hidden' name='peso2' id='peso2' value='".$peso2."'>		
		<input type='hidden' name='estatura2' id='estatura2' value='".$estatura2."'>		
		<input type='hidden' name='eps2' id='eps2' value='".$eps2."'>		
		<input type='hidden' name='nro_sisben2' id='nro_sisben2' value='".$nro_sisben2."'>		
		<input type='hidden' name='niv_sisben2' id='niv_sisben2' value='".$niv_sisben2."'>		
		<input type='hidden' name='alergias2' id='alergias2' value='".$alergias2."'>
		<input type='hidden' name='poliza2' id='poliza2' value='".$poliza2."'>
		<input type='hidden' name='dni2' id='dni2' value='".$dni2."'>
		<input type='hidden' name='vi2' id='vi2' value='".$vi2."'>
		<input type='hidden' name='vf2' id='vf2' value='".$vf2."'>				

		<input type='hidden' name='lectivo2' id='lectivo2' value='".$lectivo2."'>		
		<input type='hidden' name='jornada2' id='jornada2' value='".$jornada2."'>		
		<input type='hidden' name='transporte2' id='transporte2' value='".$transporte2."'>
		<input type='hidden' name='c_ingles2' id='c_ingles2' value='".$c_ingles2."'>
		<input type='hidden' name='asopadres2' id='asopadres2' value='".$asopadres2."'>
		<input type='hidden' name='seguro2' id='seguro2' value='".$seguro2."'>						
		<input type='hidden' name='historia2' id='historia2' value='".$historia2."'>
		<input type='hidden' name='estado_est2' id='estado_est2' value='".$estado_est2."'>
		<input type='hidden' name='estado_aca2' id='estado_aca2' value='".$estado_aca2."'>						

		<input type='hidden' name='estrato2' id='estrato2' value='".$estrato2."'>						
		<input type='hidden' name='u_plataforma2' id='u_plataforma2' value='".$u_plataforma2."'>		
		<input type='hidden' name='c_plataforma2' id='c_plataforma2' value='".$c_plataforma2."'>		
		<input type='hidden' name='estado_civil2' id='estado_civil2' value='".$estado_civil2."'>				
		<input type='hidden' name='hermanos2' id='hermanos2' value='".$hermanos2."'>		
		<input type='hidden' name='orden2' id='orden2' value='".$orden2."'>		
		<input type='hidden' name='vive2' id='vive2' value='".$vive2."'>		
		<input type='hidden' name='vive_otro2' id='vive_otro2' value='".$vive_otro2."'>		
		
		<input type='hidden' name='id_padre2' id='id_padre2' value='".$id_padre2."'>		
		<input type='hidden' name='exp_padre2' id='exp_padre2' value='".$exp_padre2."'>	
		<input type='hidden' name='dir_padre2' id='dir_padre2' value='".$dir_padre2."'>		
		<input type='hidden' name='tel_padre2' id='tel_padre2' value='".$tel_padre2."'>			
		<input type='hidden' name='correo_padre2' id='correo_padre2' value='".$correo_padre2."'>
		<input type='hidden' name='formacion_padre2' id='formacion_padre2' value='".$formacion_padre2."'>		
		<input type='hidden' name='empresa_padre2' id='empresa_padre2' value='".$empresa_padre2."'>		
		<input type='hidden' name='cargo_padre2' id='cargo_padre2' value='".$cargo_padre2."'>
		<input type='hidden' name='dir_emp_padre2' id='dir_emp_padre2' value='".$dir_emp_padre2."'>
		<input type='hidden' name='tel_emp_padre2' id='tel_emp_padre2' value='".$tel_emp_padre2."'>

		<input type='hidden' name='id_madre2' id='id_madre2' value='".$id_madre2."'>		
		<input type='hidden' name='exp_madre2' id='exp_madre2' value='".$exp_madre2."'>	
		<input type='hidden' name='dir_madre2' id='dir_madre2' value='".$dir_madre2."'>		
		<input type='hidden' name='tel_madre2' id='tel_madre2' value='".$tel_madre2."'>			
		<input type='hidden' name='correo_madre2' id='correo_madre2' value='".$correo_madre2."'>
		<input type='hidden' name='formacion_madre2' id='formacion_madre2' value='".$formacion_madre2."'>		
		<input type='hidden' name='empresa_madre2' id='empresa_madre2' value='".$empresa_madre2."'>		
		<input type='hidden' name='cargo_madre2' id='cargo_madre2' value='".$cargo_madre2."'>
		<input type='hidden' name='dir_emp_madre2' id='dir_emp_madre2' value='".$dir_emp_madre2."'>
		<input type='hidden' name='tel_emp_madre2' id='tel_emp_madre2' value='".$tel_emp_madre2."'>

		<input type='hidden' name='id_acud2' id='id_acud2' value='".$id_acud2."'>		
		<input type='hidden' name='exp_acud2' id='exp_acud2' value='".$exp_acud2."'>	
		<input type='hidden' name='dir_acud2' id='dir_acud2' value='".$dir_acud2."'>		
		<input type='hidden' name='tel_acud2' id='tel_acud2' value='".$tel_acud2."'>			
		<input type='hidden' name='correo_acud2' id='correo_acud2' value='".$correo_acud2."'>
		<input type='hidden' name='formacion_acud2' id='formacion_acud2' value='".$formacion_acud2."'>		
		<input type='hidden' name='empresa_acud2' id='empresa_acud2' value='".$empresa_acud2."'>		
		<input type='hidden' name='cargo_acud2' id='cargo_acud2' value='".$cargo_acud2."'>
		<input type='hidden' name='dir_emp_acud2' id='dir_emp_acud2' value='".$dir_emp_acud2."'>
		<input type='hidden' name='tel_emp_acud2' id='tel_emp_acud2' value='".$tel_emp_acud2."'>
		<input type='hidden' name='u_plataforma_acud2' id='u_plataforma_acud2' value='".$u_plataforma_acud2."'>
		<input type='hidden' name='c_plataforma_acud2' id='c_plataforma_acud2' value='".$c_plataforma_acud2."'>
		<input type='hidden' name='iden_acud2' id='iden_acud2' value='".$iden_acud2."'>		
		<input type='hidden' name='paren_acud2' id='paren_acud2' value='".$paren_acud2."'>
		<input type='hidden' name='fecha_nacimiento2' id='fecha_nacimiento2' value='".$fecha_nacimiento2."'>
		<input type='hidden' name='sexo2' id='sexo2' value='".$sexo2."'>	
		<input type='hidden' name='grupo_sangre2' id='grupo_sangre2' value='".$grupo_sangre2."'>	
		<input type='hidden' name='uploadFile2' id='uploadFile2' value='".$uploadFile2."'>
		<input type='hidden' name='uploadBtn2' id='uploadBtn2' value='".$uploadBtn2."'>
		<input type='hidden' name='religion2' id='religion2' value='".$religion2."'>
		<input type='hidden' name='direccion2' id='direccion2' value='".$direccion2."'>	
		<input type='hidden' name='telefono2' id='telefono2' value='".$telefono2."'>	
		<input type='hidden' name='correo2' id='correo2' value='".$correo2."'>
		<input type='hidden' name='padre2' id='padre2' value='".$padre2."'>
		<input type='hidden' name='madre2' id='madre2' value='".$madre2."'>	
		<input type='hidden' name='acudiente2' id='acudiente2' value='".$acudiente2."'>	
		<input type='hidden' name='l_curso22' id='l_curso22' value='".$l_curso22."'>
		<input type='hidden' name='MAX_FILE_SIZE' value='2000000'>
		
		<div class=\"page\">
			<fieldset>
				<legend>
					<br><span class=\"glyphicon glyphicon-plus\"></span> Crear Nuevo Estudiante          
				</legend>			
			</fieldset>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Ultimo C&oacute;digo&nbsp;
		  </div>
		 <div class='input' >";
		    
		    $select_id="select max(estudiante_id) from estudiante";
   if($res_select_id=mysql_query($select_id)){
		    $rs_id=mysql_fetch_array($res_select_id);
		    echo $rs_id[0];}		    
		 
	echo	 "</div><br>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			C&oacute;digo Estudiante&nbsp;
		  </div>
		 <div class='input' >
		    <input id='codigo_estudiante' name='codigo_estudiante' type='text' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px;'>
		 </div>
		
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Nombre&nbsp;
		  </div>
		 <div class='input' >
		    <input id='nombre_estudiante' name='nombre_estudiante' type='text' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px;'>
		 </div>
		 
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Tipo de Documento&nbsp;
		  </div>
		 <div class='input' >
		    <select id='tipo_documento' name='tipo_documento' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='XX'>Seleccione</option>
		 		<option value='TI'>TARJETA DE IDENTIDAD</option>
		 		<option value='CC'>CEDULA DE CIUDADANIA</option>		 				 		
		 		<option value='PA'>NUMERO DE PASAPORTE</option>		 		
		 		<option value='RC'>REGISTRO CIVIL</option>		 		
		 	</select>
		 </div>
		
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Documento&nbsp;
		  </div>
		 <div class='input' >
		    <input id='documento' name='documento' type='text' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px;'>
		 </div>
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Lugar de Expedici&oacute;n&nbsp;
		  </div>
		 <div class='input' >
		    <input id='lugar_exp' name='lugar_exp' type='text' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px;'>
		 </div>
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Ciudad Nacimiento&nbsp;
		  </div>
		 <div class='input' >
		    <input id='lugar_nac' name='lugar_nac' type='text' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px;'>
		 </div>
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Pais&nbsp;
		  </div>
		 <div class='input' >
		    <input id='pais' name='pais' type='text' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px;'>
		 </div>
		
		
		
		
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Fecha Nacimiento&nbsp;
		  </div>
		 <div class='input' >
		    <input type='date' id='fecha_nacimiento' name='fecha_nacimiento' class='form-control2' placeholder='dd/mm/aaaa' style='width:48%;margin-bottom: 10px'>
		 </div>
		 
		<br>
		 <div class='input' style='float:left;width: 140px;padding-top: 15px;text-align: left;margin-left:10px;font_size:10px' >
			Foto&nbsp;
		  </div>
		<div class='' style='margin-bottom:10px;'>
			<input id='archivo' name='archivo' type='file' class='fileUpload'  >
		  </div>		
		<br>		

		<hr width=98%'>
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Sexo&nbsp;
		  </div>
		 <div class='input' >
		 	<select id='sexo' name='sexo' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='XX'>Seleccione</option>
		 		<option>Masculino</option>
		 		<option>Femenino</option>		 				 		
		 	</select>
		 </div>
		 
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Grupo de Sangre&nbsp;
		  </div>
		 <div class='input' >
		 	<select id='grupo_sangre' name='grupo_sangre' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='XX'>Seleccione</option>
		 		<option>AB+</option>
		 		<option>AB-</option>		 				 		
		 		<option>B+</option>
		 		<option>B-</option>		 				 		
		 		<option>A+</option>
		 		<option>A-</option>		 				 		
		 		<option>O+</option>
		 		<option>O-</option>		 				 		
		 	</select>
		 </div>
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Peso (Kg)&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='peso' name='peso' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>		 
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Estatura (Cms)&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='estatura' name='estatura' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>		 
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			EPS&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='eps' name='eps' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>		 
		  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			No Carnet SISBEN&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='nro_sisben' name='nro_sisben' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Nivel SISBEN&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='niv_sisben' name='niv_sisben' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Alergias&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='alergias' name='alergias' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Poliza&nbsp;
		  </div>
		 <div class='input' >
		    <input value='' type='text' id='poliza' name='poliza' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			DNI&nbsp;
		  </div>
		 <div class='input' >
		    <input value='' type='text' id='dni' name='dni' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Vig. Inicio&nbsp;
		  </div>
		 <div class='input' >
		    <input value='' type='date' id='vi' name='vi' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;font_size:10px;margin-left:10px' >
			Vig. Final&nbsp;
		  </div>
		 <div class='input' >
		    <input value='' type='date' id='vf' name='vf' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>	
		
		
		
		
		
		<hr width=98%'>		 
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			A&ntilde;o Lectivo&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='lectivo' name='lectivo' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Jornada&nbsp;
		  </div>
		 <div class='input' >
		    <select id='jornada' name='jornada' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='XX'>Seleccione</option>
		 		<option value='M'>Ma&ntilde;ana</option>
		 		<option value='N'>Nocturno</option>		 				 		
		 		<option value='T'>Tarde</option>
		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Transporte&nbsp;
		  </div>
		 <div class='input' >
		    <select id='transporte' name='transporte' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='0'>No</option>
		 		<option value='1'>Si</option>		 				 		
		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Curso Ingles&nbsp;
		  </div>
		 <div class='input' >
		    <select id='c_ingles' name='c_ingles' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='0'>No</option>
		 		<option value='1'>Si</option>		 				 		
		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Asopadres&nbsp;
		  </div>
		 <div class='input' >
		    <select id='asopadres' name='asopadres' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='0'>No</option>
		 		<option value='1'>Si</option>		 				 		
		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Seguro Estudiantil&nbsp;
		  </div>
		 <div class='input' >
		    <select id='seguro' name='seguro' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='0'>No</option>
		 		<option value='1'>Si</option>		 				 		

		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Nvo./Ant./Reint.&nbsp;
		  </div>
		 <div class='input' >
		    <select id='historia' name='historia' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='XX'>Seleccione</option>
		 		<option value='N'>Nuevo</option>
		 		<option value='A'>Antiguo</option>		 				 		
		 		<option value='R'>Reintegro</option>		 				 				 		

		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Grado que Ingresa&nbsp;
		  </div>
		 <div class='input' >
					<select id='l_curso2' name='l_curso2' class='form-control2' style='width:48%;margin-bottom: 10px'>";
				
			
				
					$select_curso='select curso_id,nombre
					from curso order by 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='  ';
					//if($_POST['area']==$r_ar[0]){$sel1=' selected ';}
					//echo "hola";
							echo '<option value="'.$r_sc[0].'"  '.$sel1.'>'.$r_sc[1].' </option>';
					}
					
echo					"</select>
		 </div>
		
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Estado Estudiante&nbsp;
		  </div>
		 <div class='input' >
		    <select id='estado_est' name='estado_est' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='XX'>Seleccione</option>
		 		<option value='A'>Activo</option>
		 		<option value='R'>Retirado</option>		 				 		

		 	</select>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Estado Acad&eacute;mico&nbsp;
		  </div>
		 <div class='input' >
		    <select id='estado_aca' name='estado_aca' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='XX'>Seleccione</option>
		 		<option value='C'>En Curso</option>
		 		<option value='R'>Repitente</option>		 				 		
		 		<option value='P'>Promovido</option>		 		
		 	</select>
		 </div>


		<hr width=98%'>		 		
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Religi&oacuten&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='religion' name='religion' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Direcci&oacute;n&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='direccion' name='direccion' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Estrato&nbsp;
		  </div>
		 <div class='input' >
		<select id='estrato' name='estrato' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='XX'>Seleccione</option>
		 		<option value='0'>0</option>
		 		<option value='1'>1</option>		 				 		
		 		<option value='2'>2</option>
		 		<option value='3'>3</option>		 				 		
		 		<option value='4'>4</option>
		 		<option value='5'>5</option>		 				 		
		 		<option value='6'>6</option>
		 		<option value='7'>7</option>		 				 		
		 		<option value='8'>8</option>
		 		<option value='9'>9</option>		 				 		
		 		
		 	</select>
		 </div>
		 
		 

		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Tel&eacute;fono&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='telefono' name='telefono' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
		 </div>

		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Correo&nbsp;
		  </div>
		 <div class='input' >
		    <input required type='text' id='correo' name='correo' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' onblur='validarEmail(this.value)'>
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Usuario Plataforma&nbsp;
		  </div>
		 <div class='input' >
		    <input required type='text' id='u_plataforma' name='u_plataforma' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Clave&nbsp;
		  </div>
		 <div class='input' >
		    <input required type='text' id='c_plataforma' name='c_plataforma' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
		 </div>
		<hr width=98%'>		 		
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Estado Civil Padres&nbsp;
		  </div>
		 <div class='input' >
		    <select id='estado_civil' name='estado_civil' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='XX'>Seleccione</option>
		 		<option value='C'>Casados</option>
		 		<option value='U'>Union Libre</option>		 				 		
		 		<option value='S'>Separados</option>
		 		<option value='D'>Divorciados</option>		 				 		
		 		<option value='N'>Segundas Nupcias</option>
		 	</select>
		    
		 </div>
		 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Nro. Hermanos&nbsp;
		  </div>
		 <div class='input' >
		    <select id='hermanos' name='hermanos' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='XX'>Seleccione</option>
		 		<option value='0'>0</option>
		 		<option value='1'>1</option>		 				 		
		 		<option value='2'>2</option>
		 		<option value='3'>3</option>		 				 		
		 		<option value='4'>4</option>
		 		<option value='5'>5</option>		 				 		
		 		<option value='6'>6</option>
		 		<option value='7'>7</option>		 				 		
		 		<option value='8'>8</option>
		 		<option value='9'>9</option>	
		 	</select>
		    
		 </div>
	 	 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Orden&nbsp;
		  </div>
		 <div class='input' >
		    <select id='orden' name='orden' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='XX'>Seleccione</option>
		 		<option value='0'>0</option>
		 		<option value='1'>1</option>		 				 		
		 		<option value='2'>2</option>
		 		<option value='3'>3</option>		 				 		
		 		<option value='4'>4</option>
		 		<option value='5'>5</option>		 				 		
		 		<option value='6'>6</option>
		 		<option value='7'>7</option>		 				 		
		 		<option value='8'>8</option>
		 		<option value='9'>9</option>	
		 	</select>
		    
		 </div>
	 	 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Con Qui&eacute;n Vive?&nbsp;
		  </div>
		 <div class='input' >
		    <select id='vive' name='vive' class='form-control2' style='width:48%;margin-bottom: 10px'>
		 		<option value='XX'>Seleccione</option>
		 		<option value='M'>Madre</option>
		 		<option value='P'>Padre</option>		 				 		
		 		<option value='A'>Ambos</option>
		 		<option value='O'>Otro</option>		 				 		
		 	</select>
		    
		 </div>
	 	 <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Otros?Qui&eacute;n?&nbsp;
		  </div>
		 <div class='input' >
		    <input required type='text' id='vive_otro' name='vive_otro' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >		
		 </div>

		
		<hr width=98%'>
		
		<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Acudiente&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='buscar_acud' name='buscar_acud' class='form-control2' placeholder='Digite parte del nombre o documento de id.' style='width:48%;margin-bottom: 10px'>
		 </div>
		
		  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Padre&nbsp;
		  </div>
		 <div class='input' >
			<input type='radio' name='acud_padre' id='acud_padre' value='1' onclick='if(this.checked){bloquear_campos(\"padre\");}'><br>
		 </div>
		  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Madre&nbsp;
		  </div>
		 <div class='input' >
			<input type='radio' name='acud_padre' id='acud_padre' value='2' onclick='if(this.checked){bloquear_campos(\"madre\");}' ><br>
		 </div>
		
		  <div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Otro&nbsp;
		  </div>
		 <div class='input' >
			<input type='radio' name='acud_padre' id='acud_padre' value='0' onclick='if(this.checked){bloquear_campos(\"0\");}' checked><br> 
		 </div>
<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
			Parentesco&nbsp;
		  </div>
		 <div class='input' >
		    <input type='text' id='acud_paren_2' name='acud_paren_2' class='form-control2'  style='width:48%;margin-bottom: 10px'>
		 </div>
		
		<hr width=98%'>
	<div id='ambos'>
		<div id='pad' >
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Nombre del Padre&nbsp;
			  </div>
			 <div class='input' >
			    <input type='text' id='padre' name='padre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Identificaci&oacute;n&nbsp;
			  </div>
			 <div class='input' >
			    <input type='text' id='id_padre' name='id_padre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Lugar Expedici&oacute;n&nbsp;
			  </div>
			 <div class='input' >
			    <input type='text' id='exp_padre' name='exp_padre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Direcci&oacute;n&nbsp;
			  </div>
			 <div class='input' >
			    <input type='text' id='dir_padre' name='dir_padre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Tel&eacute;fono&nbsp;
			  </div>
			 <div class='input' >
			    <input type='text' id='tel_padre' name='tel_padre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Correo&nbsp;
			  </div>
			 <div class='input' >
			    <input required type='text' id='correo_padre' name='correo_padre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' onblur='validarEmail(this.value)'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Form. Acad&eacute;mica&nbsp;
			  </div>
			 <div class='input' >
			    <input required type='text' id='formacion_padre' name='formacion_padre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Empresa Labora&nbsp;
			  </div>
			 <div class='input' >
			    <input required type='text' id='empresa_padre' name='empresa_padre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Cargo Laboral&nbsp;
			  </div>
			 <div class='input' >
			    <input required type='text' id='cargo_padre' name='cargo_padre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Direcci&oacute;n Laboral&nbsp;
			  </div>
			 <div class='input' >
			    <input required type='text' id='dir_emp_padre' name='dir_emp_padre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Tel&eacute;fono Lab.&nbsp;
			  </div>
			 <div class='input' >
			    <input required type='text' id='tel_emp_padre' name='tel_emp_padre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
			 </div>
		</div>
		<hr width=98%'>



		<div id='mad'>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Nombre de la Madre&nbsp;
			  </div>
			 <div class='input' >
			    <input type='text' id='madre' name='madre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Identificaci&oacute;n&nbsp;
			  </div>
			 <div class='input' >
			    <input type='text' id='id_madre' name='id_madre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Lugar Expedici&oacute;n&nbsp;
			  </div>
			 <div class='input' >
			    <input type='text' id='exp_madre' name='exp_madre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Direcci&oacute;n&nbsp;
			  </div>
			 <div class='input' >
			    <input type='text' id='dir_madre' name='dir_madre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Tel&eacute;fono&nbsp;
			  </div>
			 <div class='input' >
			    <input type='text' id='tel_madre' name='tel_madre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Correo&nbsp;
			  </div>
			 <div class='input' >
			    <input required type='text' id='correo_madre' name='correo_madre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' onblur='validarEmail(this.value)'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Form. Acad&eacute;mica&nbsp;
			  </div>
			 <div class='input' >
			    <input required type='text' id='formacion_madre' name='formacion_madre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px'>
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Empresa Labora&nbsp;
			  </div>
			 <div class='input' >
			    <input required type='text' id='empresa_madre' name='empresa_madre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Cargo Laboral&nbsp;
			  </div>
			 <div class='input' >
			    <input required type='text' id='cargo_madre' name='cargo_madre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Direcci&oacute;n Laboral&nbsp;
			  </div>
			 <div class='input' >
			    <input required type='text' id='dir_emp_madre' name='dir_emp_madre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
			 </div>
			<div class='input' style='float:left;width: 140px;padding-top: 0px;text-align: left;margin-left:10px;font_size:10px' >
				Tel&eacute;fono Lab.&nbsp;
			  </div>
			 <div class='input' >
			    <input required type='text' id='tel_emp_madre' name='tel_emp_madre' class='form-control2' placeholder='' style='width:48%;margin-bottom: 10px' >
			 </div>
		</div>
	</div>		
		
		
		
		
		
		<fieldset>
		<legend>
					<br>
					
		</legend>	
			<button type='button' class='btn btn-info' onclick='crea_estudiante()'> Crear Estudiante</button>     
			<input type='reset' class='btn' value='Borrar'>
						
		</fieldset>
			
			<br>
		</div>
	</form>
</div>

<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_id,nombre,(select count(*) from estudiante where estudiante.curso_id=curso.curso_id )  
					from curso order by 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='  ';
					//if($_POST['area']==$r_ar[0]){$sel1=' selected ';}
					//echo "hola";
							echo '<option style="font-size:9px" value="'.$r_sc[0].'"  '.$sel1.'>'.$r_sc[1].' ('.$r_sc[2].')</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>
			<a href=\"estudiantes_view.php\" class=\"btn btn-info btn-sm \"><span class=\"glyphicon glyphicon-file\"></span>  Conf. Ver Notas</a>	
			<a href=\"estudiantes_docs.php\" class=\"btn btn-info btn-sm \"><span class=\"glyphicon glyphicon-file\"></span>  Documentos</a>		      
			</legend>			
		</fieldset>
	</div>
	
	<fieldset>
	<div class='table-responsive'>
	<table id='estudiantes_tabla' 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>
	
	
	
	</form>

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

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

      </div><!--/row-->      </div><!--/row-->
<hr>
      <footer>
        <p>Todos los derechos reservados - Copyright &copy; 2022</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 bloquear_campos(acc){
   
		if(document.getElementById('buscar_acud').value==''){alert('Debe seleccionar Acudiente');return false;}
		else{
		var mystr3 = document.getElementById('buscar_acud').value;
		var myarr3 = mystr3.split(' - ');
		   
   
   
             if(acc=='0'){
                  /*   document.getElementById('madre').disabled=false;document.getElementById('madre').value='';
		     document.getElementById('id_madre').disabled=false;document.getElementById('id_madre').value='';
		     document.getElementById('exp_madre').disabled=false;document.getElementById('exp_madre').value='';
		     document.getElementById('dir_madre').disabled=false;document.getElementById('dir_madre').value='';
		     document.getElementById('tel_madre').disabled=false;document.getElementById('tel_madre').value='';
		     document.getElementById('correo_madre').disabled=false;document.getElementById('correo_madre').value='';
		     document.getElementById('formacion_madre').disabled=false;document.getElementById('formacion_madre').value='';
		     document.getElementById('empresa_madre').disabled=false;document.getElementById('empresa_madre').value='';
		     document.getElementById('cargo_madre').disabled=false;document.getElementById('cargo_madre').value='';
		     document.getElementById('dir_emp_madre').disabled=false;document.getElementById('dir_emp_madre').value='';
		     document.getElementById('tel_emp_madre').disabled=false;document.getElementById('tel_emp_madre').value='';
                  
	      	     document.getElementById('padre').disabled=false;document.getElementById('padre').value='';
		     document.getElementById('id_padre').disabled=false;document.getElementById('id_padre').value='';
		     document.getElementById('exp_padre').disabled=false;document.getElementById('exp_padre').value='';
		     document.getElementById('dir_padre').disabled=false;document.getElementById('dir_padre').value='';
		     document.getElementById('tel_padre').disabled=false;document.getElementById('tel_padre').value='';
		     document.getElementById('correo_padre').disabled=false;document.getElementById('correo_padre').value='';
		     document.getElementById('formacion_padre').disabled=false;document.getElementById('formacion_padre').value='';
		     document.getElementById('empresa_padre').disabled=false;document.getElementById('empresa_padre').value='';
		     document.getElementById('cargo_padre').disabled=false;document.getElementById('cargo_padre').value='';
		     document.getElementById('dir_emp_padre').disabled=false;document.getElementById('dir_emp_padre').value='';
		     document.getElementById('tel_emp_padre').disabled=false;document.getElementById('tel_emp_padre').value='';*/
		     }
   
          if(acc=='padre'){
          if(confirm('Desea remplazar la informacion del padre?')){
	   	     document.getElementById('padre').disabled=true;document.getElementById('padre').value=myarr3[1];
		     document.getElementById('id_padre').disabled=true;document.getElementById('id_padre').value=myarr3[2];
		     document.getElementById('exp_padre').disabled=true;document.getElementById('exp_padre').value=myarr3[3];
		     document.getElementById('dir_padre').disabled=true;document.getElementById('dir_padre').value=myarr3[4];
		     document.getElementById('tel_padre').disabled=true;document.getElementById('tel_padre').value=myarr3[5];
		     document.getElementById('correo_padre').disabled=true;document.getElementById('correo_padre').value=myarr3[6];
		     document.getElementById('formacion_padre').disabled=true;document.getElementById('formacion_padre').value=myarr3[7];
		     document.getElementById('empresa_padre').disabled=true;document.getElementById('empresa_padre').value=myarr3[8];
		     document.getElementById('cargo_padre').disabled=true;document.getElementById('cargo_padre').value=myarr3[9];
		     document.getElementById('dir_emp_padre').disabled=true;document.getElementById('dir_emp_padre').value=myarr3[10];
		     document.getElementById('tel_emp_padre').disabled=true;document.getElementById('tel_emp_padre').value=myarr3[11];
	      }else{return false;}
          }
          if(acc=='madre'){
          if(confirm('Desea remplazar la informacion de la madre?')){
      	      	     document.getElementById('madre').disabled=true;document.getElementById('madre').value=myarr3[1];
		     document.getElementById('id_madre').disabled=true;document.getElementById('id_madre').value=myarr3[2];
		     document.getElementById('exp_madre').disabled=true;document.getElementById('exp_madre').value=myarr3[3];
		     document.getElementById('dir_madre').disabled=true;document.getElementById('dir_madre').value=myarr3[4];
		     document.getElementById('tel_madre').disabled=true;document.getElementById('tel_madre').value=myarr3[5];
		     document.getElementById('correo_madre').disabled=true;document.getElementById('correo_madre').value=myarr3[6];
		     document.getElementById('formacion_madre').disabled=true;document.getElementById('formacion_madre').value=myarr3[7];
		     document.getElementById('empresa_madre').disabled=true;document.getElementById('empresa_madre').value=myarr3[8];
		     document.getElementById('cargo_madre').disabled=true;document.getElementById('cargo_madre').value=myarr3[9];
		     document.getElementById('dir_emp_madre').disabled=true;document.getElementById('dir_emp_madre').value=myarr3[10];
		     document.getElementById('tel_emp_madre').disabled=true;document.getElementById('tel_emp_madre').value=myarr3[11];
	           }else{return false;}                        
          }          
  
     }
 }
     
function bloquear_campos2(acc){
   
		if(document.getElementById('buscar_acud2').value==''){alert('Debe seleccionar Acudiente');return false;}
		else{
		var mystr4 = document.getElementById('buscar_acud2').value;
		var myarr4 = mystr4.split(' - ');
		   
   
   
	   if(acc=='0'){
                    /* document.getElementById('madre_').disabled=false;document.getElementById('madre_').value='';
		     document.getElementById('id_madre_').disabled=false;document.getElementById('id_madre_').value='';
		     document.getElementById('exp_madre_').disabled=false;document.getElementById('exp_madre_').value='';
		     document.getElementById('dir_madre_').disabled=false;document.getElementById('dir_madre_').value='';
		     document.getElementById('tel_madre_').disabled=false;document.getElementById('tel_madre_').value='';
		     document.getElementById('correo_madre_').disabled=false;document.getElementById('correo_madre_').value='';
		     document.getElementById('formacion_madre_').disabled=false;document.getElementById('formacion_madre_').value='';
		     document.getElementById('empresa_madre_').disabled=false;document.getElementById('empresa_madre_').value='';
		     document.getElementById('cargo_madre_').disabled=false;document.getElementById('cargo_madre_').value='';
		     document.getElementById('dir_emp_madre_').disabled=false;document.getElementById('dir_emp_madre_').value='';
		     document.getElementById('tel_emp_madre_').disabled=false;document.getElementById('tel_emp_madre_').value='';
                  
	      	     document.getElementById('padre_').disabled=false;document.getElementById('padre_').value='';
		     document.getElementById('id_padre_').disabled=false;document.getElementById('id_padre_').value='';
		     document.getElementById('exp_padre_').disabled=false;document.getElementById('exp_padre_').value='';
		     document.getElementById('dir_padre_').disabled=false;document.getElementById('dir_padre_').value='';
		     document.getElementById('tel_padre_').disabled=false;document.getElementById('tel_padre_').value='';
		     document.getElementById('correo_padre_').disabled=false;document.getElementById('correo_padre_').value='';
		     document.getElementById('formacion_padre_').disabled=false;document.getElementById('formacion_padre_').value='';
		     document.getElementById('empresa_padre_').disabled=false;document.getElementById('empresa_padre_').value='';
		     document.getElementById('cargo_padre_').disabled=false;document.getElementById('cargo_padre_').value='';
		     document.getElementById('dir_emp_padre_').disabled=false;document.getElementById('dir_emp_padre_').value='';
		     document.getElementById('tel_emp_padre_').disabled=false;document.getElementById('tel_emp_padre_').value='';*/
		     }
   
          if(acc=='padre'){
          if(confirm('Desea remplazar la informacion del padre?')){
	   	     document.getElementById('padre_').disabled=true;document.getElementById('padre_').value=myarr4[1];
		     document.getElementById('id_padre_').disabled=true;document.getElementById('id_padre_').value=myarr4[2];
		     document.getElementById('exp_padre_').disabled=true;document.getElementById('exp_padre_').value=myarr4[3];
		     document.getElementById('dir_padre_').disabled=true;document.getElementById('dir_padre_').value=myarr4[4];
		     document.getElementById('tel_padre_').disabled=true;document.getElementById('tel_padre_').value=myarr4[5];
		     document.getElementById('correo_padre_').disabled=true;document.getElementById('correo_padre_').value=myarr4[6];
		     document.getElementById('formacion_padre_').disabled=true;document.getElementById('formacion_padre_').value=myarr4[7];
		     document.getElementById('empresa_padre_').disabled=true;document.getElementById('empresa_padre_').value=myarr4[8];
		     document.getElementById('cargo_padre_').disabled=true;document.getElementById('cargo_padre_').value=myarr4[9];
		     document.getElementById('dir_emp_padre_').disabled=true;document.getElementById('dir_emp_padre_').value=myarr4[10];
		     document.getElementById('tel_emp_padre_').disabled=true;document.getElementById('tel_emp_padre_').value=myarr4[11];
	       }else{return false;}  
          }
          if(acc=='madre'){
          if(confirm('Desea remplazar la informacion de la madre?')){
      	      	     document.getElementById('madre_').disabled=true;document.getElementById('madre_').value=myarr4[1];
		     document.getElementById('id_madre_').disabled=true;document.getElementById('id_madre_').value=myarr4[2];
		     document.getElementById('exp_madre_').disabled=true;document.getElementById('exp_madre_').value=myarr4[3];
		     document.getElementById('dir_madre_').disabled=true;document.getElementById('dir_madre_').value=myarr4[4];
		     document.getElementById('tel_madre_').disabled=true;document.getElementById('tel_madre_').value=myarr4[5];
		     document.getElementById('correo_madre_').disabled=true;document.getElementById('correo_madre_').value=myarr4[6];
		     document.getElementById('formacion_madre_').disabled=true;document.getElementById('formacion_madre_').value=myarr4[7];
		     document.getElementById('empresa_madre_').disabled=true;document.getElementById('empresa_madre_').value=myarr4[8];
		     document.getElementById('cargo_madre_').disabled=true;document.getElementById('cargo_madre_').value=myarr4[9];
		     document.getElementById('dir_emp_madre_').disabled=true;document.getElementById('dir_emp_madre_').value=myarr4[10];
		     document.getElementById('tel_emp_madre_').disabled=true;document.getElementById('tel_emp_madre_').value=myarr4[11];
	                }else{return false;}                      
          }          
  
     }
 }
      $(function() {
	$( \"#buscar4\" ).autocomplete(
	{
		 source:'source2.php',		 
		 minLength: 3
	})
	}); 

      $(function() {
	$( \"#buscar_\" ).autocomplete(
	{
		 source:'source2.php',		 
		 minLength: 3
	})
	}); 
      $(function() {
	$( \"#buscar_acud\" ).autocomplete(
	{
		 source:'source3.php',		 
		 minLength: 3
	})
	}); 	

      $(function() {
	$( \"#buscar_acud2\" ).autocomplete(
	{
		 source:'source3.php',		 
		 minLength: 3
	})
	}); 	
    </script>	
<script src='js/tablesort.min.js'></script>
    <script>
      new Tablesort(document.getElementById('estudiantes_tabla'));
    </script>
  </body>
</html>
";

}else{
echo "<div align='center'>Debe registrase para usar la aplicaci&oacute;n <a href='index.php' > Registrar</a></div>";
}
?>