<?php require_once('Connections/cn.php'); ?>
<?php
	$id_alumno=$_GET['id_alumno'];
	$id_carrera=$_GET['id_carrera'];
	$id_materia=$_GET['id_materia'];
	mysql_select_db($database_cn, $cn);
	  mysql_query ("SET NAMES 'utf8'");
 	$sql = "SELECT * FROM historico_notas WHERE id_alumno='$id_alumno' and id_carrera='$id_carrera' and id_materia='$id_materia' and nota>=10";
 	$rs=mysql_query($sql, $cn);
	$reg=mysql_num_rows($rs);
	if ($reg != 0)
	 {
	 ?>
	 <script type="text/javascript">
	    msj="Unidad Curricular " +'<<<?php echo $id_materia; ?>>>'+" está aprobada";
	 	alert(msj);
		window.parent.document.addnota.materia.focus();
		window.parent.document.addnota.materia.value=0;
	 </script>
	 <?php
	 }
	 
?>