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

if($idalumno){
$qver=mysql_query("select * from alumnos where carnet = '$idalumno'");
 if(mysql_num_rows($qver)==0){
  alert("El número de carnet no existe","javascript:history.go(-1)");
 }else{
  $info=mysql_fetch_array($qver);
  $tipo="Update";
  $link_foto="<a href='frm_alumno_foto.php?idalumno={$info[carnet]}' class='link_parrafo'>Agregar/Modificar Foto</a>";
  if(file_exists("../fotos_usr/{$info[carnet]}.jpg")){
   $foto="<img src=\"../fotos_usr/{$info[carnet]}.jpg\" width=\"95\" height=\"125\" border=\"1\">";
  }else{
//   $foto="<img src=\"../fotos_usr/sin_foto.png\" width=\"95\" height=\"125\" border=\"1\">";
   $foto="<img src=\"../fotos_usr/carita3.jpg\" width=\"95\" height=\"125\" border=\"1\">";
  }
 }
}else{
 $tipo="Add";
 $foto="";
 $link_foto="";
}
?>
<!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 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="#ECE9D8"><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
                        <input name="tipo_trn" type="hidden" id="tipo_trn" value="<?=$tipo;?>">
</div></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td width="15%" bgcolor="#CFDFEF" class="lbl_campo">Huevo</td>
                    <td width="85%" 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="txtvaricela3" 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="txtvaricela4" 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="txtmeningitis" 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>
                      <input name="frm" type="hidden" id="frm2" value="inf_alergias">
                      <span class="lbl_campo">
                      <input name="idi" type="hidden" id="idi2" value="<?=$idi;?>">
                      </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>