<?
include("./fnc.php");

if($upd==1){
 $qinfo=mysql_query("select * from preinscripciones where id = $idi");
 if(mysql_num_rows($qinfo)==0){
   alert("Ficha no encontrada",$goback);
 }
 $info=mysql_fetch_array($qinfo);
}

$tipo="Add";
if($upd==1){
 $tipo="Update";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>e-Ducativo - Bienvenido</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="estilo1.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="jsincludes/overlib.js"></script>
<script language="javascript">
function validar(formulario){

  if(document.form1.txtcarnet.value==""){
   alert("Por favor ingrese un número de carné");
   document.form1.txtcarnet.focus();
   return (false);
  }

  if(document.form1.txtnombre.value==""){
   alert("Por favor ingrese el nombre del alumno");
   document.form1.txtnombre.focus();
   return (false);
  }

  if(document.form1.txtapellido.value==""){
   alert("Por favor ingrese los apellidos del alumno");
   document.form1.txtapellido.focus();
   return (false);
  }

  if(document.form1.txtyearestudio.value==""){
   alert("Por favor ingrese el año escolar del alumno");
   document.form1.txtyearestudio.focus();
   return (false);
  }

  return (true);
}
</script>
<style type="text/css">
<!--
body {
        background-color: #006699;
}
-->
</style></head>

<body>
<table width="780"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#333333">
  <tr align="center" valign="middle" bgcolor="#FFFFCC">
    <td height="20" class="titulo_pagina"><strong>FICHA DE PRE-INSCRIPCION DE ALUMNOS </strong></td>
  </tr>
  <tr align="center" valign="middle" bgcolor="#FFFFCC">
    <td height="20" class="titulo_pagina"><div align="center" class="titulo_pagina"></div>
    <div align="center"><span class="font_red_11"><strong>Paso 7 y 8 de 11</strong></span> </div></td>
  </tr>
  <tr>
    <td align="left" valign="top" bgcolor="#FFFFCC"><div align="left" class="parrafo">
        <form name="form1" method="post" action="mnt_inscripcion_alumno.php" onSubmit="return validar(this.form)">
          <table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FF6600">
            <tr>
              <td bgcolor="#FFFFCC"><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
                  <tr bgcolor="#6699CC">
                    <td colspan="2"><div align="left" class="titulo_formulario">Enfermedades Padecidas por el alumno
                        <input name="tipo_trn" type="hidden" id="tipo_trn" value="<?=$tipo;?>">
</div></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td width="17%" bgcolor="#CFDFEF" class="lbl_campo">Sarampi&oacute;n</td>
                    <td width="83%" bgcolor="#ECF2F9" class="font_red_11"><input name="txtsarampion" type="checkbox" id="txtsarampion" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Hepatitis</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txthepatitis" type="checkbox" id="txthepatitis" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Laringitis</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtlaringitis" type="checkbox" id="txtlaringitis" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Paperas</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtpaperas" type="checkbox" id="txtpaperas" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Varicela</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtvaricela" type="checkbox" id="txtvaricela" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Rub&eacute;ola</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtrubeola" type="checkbox" id="txtrubeola" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Amigdalitis</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtamigdalitis" type="checkbox" id="txtvaricela3" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Meningitis</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtmeningitis" type="checkbox" id="txtvaricela4" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Ninguna enfermedad </td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtningunaenfermedad" type="checkbox" id="txtmeningitis" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Alguna otra enfermedad:</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtotraenfermedad" type="text" class="textbox" id="txtotraenfermedad" size="75" maxlength="255">
                      <strong>
                      <input name="frm" type="hidden" id="frm2" value="inf_enfermedadesyalergias">
                      <span class="lbl_campo">
                      <input name="idi" type="hidden" id="idi2" value="<?=$idi;?>">
                      </span></strong></td>
                  </tr>
              </table>
              <br>
              <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
                <tr bgcolor="#6699CC">
                  <td colspan="2"><div align="left" class="titulo_formulario">Alergias                  </div></td>
                </tr>
                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                  <td width="17%" bgcolor="#CFDFEF" class="lbl_campo">Huevo</td>
                  <td width="83%" bgcolor="#ECF2F9" class="font_red_11"><input name="txthuevo" type="checkbox" id="txthuevo" value="S"></td>
                </tr>
                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                  <td bgcolor="#CFDFEF" class="lbl_campo">Humedad</td>
                  <td bgcolor="#ECF2F9" class="font_red_11"><input name="txthumedad" type="checkbox" id="txthumedad" value="S"></td>
                </tr>
                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                  <td bgcolor="#CFDFEF" class="lbl_campo">Aspirina</td>
                  <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtaspirina" type="checkbox" id="txtaspirina" value="S"></td>
                </tr>
                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                  <td bgcolor="#CFDFEF" class="lbl_campo">Frutas</td>
                  <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtfrutas" type="checkbox" id="txtfrutas" value="S"></td>
                </tr>
                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                  <td bgcolor="#CFDFEF" class="lbl_campo">Grama</td>
                  <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtgrama" type="checkbox" id="txtgrama" value="S"></td>
                </tr>
                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                  <td bgcolor="#CFDFEF" class="lbl_campo">Chocolates</td>
                  <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtchocolate" type="checkbox" id="txtchocolate" value="S"></td>
                </tr>
                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                  <td bgcolor="#CFDFEF" class="lbl_campo">Leche</td>
                  <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtleche" type="checkbox" id="txtleche" value="S"></td>
                </tr>
                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                  <td bgcolor="#CFDFEF" class="lbl_campo">Polvo</td>
                  <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtpolvo" type="checkbox" id="txtpolvo" value="S"></td>
                </tr>
                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                  <td bgcolor="#CFDFEF" class="lbl_campo">Antibi&oacute;tico</td>
                  <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtantibiotico" type="checkbox" id="txtantibiotico" value="S"></td>
                </tr>
                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                  <td bgcolor="#CFDFEF" class="lbl_campo">Ninguna alergia </td>
                  <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtningunaalergia" type="checkbox" id="txtmeningitis2" value="S"></td>
                </tr>
                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                  <td bgcolor="#CFDFEF" class="lbl_campo">Alguna otra alergia:</td>
                  <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtotraalergia" type="text" class="textbox" id="txtotraalergia" size="75" maxlength="255">
                      <strong>                      <span class="lbl_campo">                    </span></strong></td>
                </tr>
              </table></td>
            </tr>
          </table>
          <br>
          <table width="99%"  border="0" align="center" cellpadding="5" cellspacing="1">
            <tr>
              <td width="33%">
                <div align="center">
                  <input name="Submit" type="submit" class="boton_guardar" value="Guardar los datos">
              </div></td>
              <td width="33%"><div align="center">
                  <input name="Submit2" type="reset" class="boton_deshacer" value="Deshacer los cambios">
              </div></td>
              <td width="33%"><div align="center">
                  <button class="boton_salir" onClick="self.location='inicio.php'">Salir<br>
                  (NO guarda cambios)</button>
              </div></td>
            </tr>
          </table>
        </form>
    </div></td>
  </tr>
</table>
</body>
</html>