<?
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 9 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">Medicamentos que el alumno(a) puede utilizar
                        <input name="tipo_trn" type="hidden" id="tipo_trn" value="<?=$tipo;?>">
</div></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td width="22%" bgcolor="#CFDFEF" class="lbl_campo">Dorival</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtdonafen" type="checkbox" id="txtdonafen" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Alcohol</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtalcohol" type="checkbox" id="txtalcohol" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Neobol</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtneobol" type="checkbox" id="txtdonafen3" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Acetaminof&eacute;n</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtacetaminofen" type="checkbox" id="txtdonafen4" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Milanta</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtmilanta" type="checkbox" id="txtdonafen5" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Peptobismol</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtpeptobismol" type="checkbox" id="txtdonafen6" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Loratadina</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><input name="txtloratadina" type="checkbox" id="txtdonafen7" value="S"></td>
                  </tr>
                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                    <td bgcolor="#CFDFEF" class="lbl_campo">Advil</td>
                    <td bgcolor="#ECF2F9" class="font_red_11"><strong>
                      <input name="txtaguaoxigenada" type="checkbox" id="txtdonafen8" value="S">
                      <input name="frm" type="hidden" id="frm" value="inf_medicamentos">
                      <span class="lbl_campo">
                      <input name="idi" type="hidden" id="idi" 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>