<?php require_once('Connections/cn.php'); ?>
<?php
	$cedula=$_GET['cedula'];
	$cedula_actual=$_GET['cedula_actual'];
	mysql_select_db($database_cn, $cn);
	mysql_query ("SET NAMES 'utf8'");
 	$sql = "select * from alumnos where cedula='$cedula' or pasaporte='$cedula'";
 	$rs=mysql_query($sql, $cn);
	$reg=mysql_num_rows($rs);
	if ($reg != 0)
	 {
	 ?>
	 <script type="text/javascript">
	    msj="Estudiante Cédula "+<?php echo $cedula; ?> +" ya existe."
		alert(msj);
		window.parent.document.form_alumno.cedula.focus();
		window.parent.document.form_alumno.cedula.value=<?php echo $cedula_actual; ?>;
	 </script>
	 <?php
	 }
?>