<?require('../conectar.php');?>
<html>
<head>
<title>Datos convenio</title>
</head>
<body>
<?
$folio=$_GET['folio'];
?>	
                                <form name="f1" action="contactoconv.php" method="post">
									<table>
									  <tr>
									     <td colspan="2">Datos Contacto convenio</td>
									  </tr>
									  <tr>
										 <td>A. Paterno</td><td><input type="text" name="apatcontacto" onChange="javascript:this.value=this.value.toUpperCase();"></td>
									  </tr>
									  <tr>
										 <td>A. Materno</td><td><input type="text" name="amatcontacto" onChange="javascript:this.value=this.value.toUpperCase();"></td>
									  </tr>
									  <tr>
										 <td>Nombre</td><td><input type="text" name="nombrecontacto" onChange="javascript:this.value=this.value.toUpperCase();"></td>
									  </tr>
									  <tr>
										 <td>Direccion</td><td><input type="text" name="dircontacto" onChange="javascript:this.value=this.value.toUpperCase();"></td>
									  </tr>
									  <tr>
										 <td>Tel.</td><td><input type="text" name="telcontacto" onChange="javascript:this.value=this.value.toUpperCase();"></td>
									  </tr>
									  <tr>
										 <td>E-mail</td><td><input type="text" name="correocontacto"><input type="hidden" name="folio" value="<?echo $folio;?>"></td>
									  </tr>
									  <tr>
										 <td><input type="submit" value="Registrar" name="reg"></td>
									  </tr>
									</table>
								</form>
	<?if(isset($_POST['reg'])){
	 $apatcontacto=$_POST['apatcontacto'];
	 $amatcontacto=$_POST['amatcontacto'];
	 $nombrecontacto=$_POST['nombrecontacto'];
	 $dircontacto=$_POST['dircontacto'];
	 $telcontacto=$_POST['telcontacto'];
	 $correocontacto=$_POST['correocontacto'];
	 $folio=$_POST['folio'];
	 $sql="INSERT contactoconv(folio,apatc,amatc,nomc,dirc,telc,correoc) values('$folio','$apatcontacto','$amatcontacto','$nombrecontacto','$dircontacto','$telcontacto','$correocontacto')";
	 mysql_query($sql);
	?>		
	<script>
	 alert("Los datos del contacto se han registrado correctamente");
	 window.close();
	</script>	
	<?}?>
</body>
</html>