<?
include("../fnc.php");
enlinea_a();
?>
<!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 language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>

<body>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#333333">
  <tr>
    <td bgcolor="#336699">    <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E5E5E5">
      <tr bgcolor="#FFFFFF">
        <td width="40%"><img src="../images/logo_5.gif" width="300" height="50"></td>
        <td width="60%" background="../images/back_header_admin.gif" bgcolor="#FFFFFF"><div align="right" class="usuario_nombre_enc"><strong><?echo "$unombre $uapellido";?><br>
          </strong>Tiene <?=mensajes($uuser);?> mensaje(s) sin leer</div></td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td height="15" colspan="2" background="../images/barra_encabezado.gif">&nbsp;</td>
        </tr>
    </table>
      <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" background="../images/tema/bg_contenido.png">
        <tr>
          <td width="20%" valign="top"><?php include("menu.php"); ?>&nbsp;</td>
          <td width="80%" valign="top" background="../images/tema/bg_contenido.png"><table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#333333">
            <tr align="center" valign="middle" bgcolor="#FFFFCC">
              <td height="20" background="../images/tema/bg_contenido.png" class="titulo_pagina"><div align="center" class="titulo_pagina">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="65">&nbsp;</td>
                    <td><div align="center" class="titulo_pagina"><strong>CONTROL DE ASISTENCIA </strong></div></td>
                    <td width="65"><div align="right"><a href="inicio.php" class="link_parrafo">Inicio<img src="../images/ic_home.png" width="21" height="21" border="0"></a></div></td>
                  </tr>
                </table>
              </div></td>
            </tr>
            <tr>
              <td align="left" valign="top" bgcolor="#FFFFCC"><div align="left" class="parrafo">
                <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td background="../images/tema/bg_contenido.png">
                      <table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#333333">
                            <tr>
                              <td background="../images/tema/bg_frm_campos.png">
                                <table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
                                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                                    <td width="24%" background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="lbl_campo">Seleccione un grado: </td>
                                    <td width="76%" background="../images/tema/bg_frm_campos.png" bgcolor="#E8E8E8" class="titulo_formulario">
                                                                        <select name="select" class="textbox" id="select3" onChange="MM_jumpMenu('self',this,0)">
                                        <option value="#" selected>SELECCIONE UNO...</option>
                                        <?
                                        $qn=mysql_query("select distinct grados.id as idg, grados.grado, jornadas.id as idj, jornadas.jornada, niveles.nivel, niveles.id as idn
                                                         from jornadas inner join grados ON grados.jornada = jornadas.id
                                                         inner join niveles on grados.nivel = niveles.id
                                                          order by jornadas.jornada, niveles.en_numeros, grados.en_numeros, grados.grado");
                                        while($in=mysql_fetch_array($qn)){
                                        $sel="";
                                        if(enc($in[idj])==$idj and enc($in[idg])==$idg and enc($in[idn])==$idn){
                                          $sel="selected";
                                        }
                                        ?>
                                          <option value="frm_agregar_asistencia.php?idj=<?=enc($in[idj])."&idn=".enc($in[idn])."&idg=".enc($in[idg]);?>"<?=$sel;?>><?=$in[jornada]." | ".$in[nivel]." | ".$in[grado];?></option>
                                        <?}?>
                                    </select></td>
                                  </tr>
                                  <?if(!$idj){exit();}?>
                                  <?if(!$idn){exit();}?>
                                  <?if(!$idg){exit();}?>
                                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                                    <td background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="lbl_campo">Seleccione una secci&oacute;n: </td>
                                    <td background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="titulo_formulario">
                                      <select name="txtgrado" class="textbox" id="select4" onChange="MM_jumpMenu('self',this,0)">
                                        <option value="#" selected>SELECCIONE UNO...</option>
                                        <?
                                        $id_ni=dec($idn);
                                        $id_gr=dec($idg);
                                        $sel="";
                                        $qn=mysql_query("select distinct seccion
                                                         from alumnos
                                                         where nivel_estudio=$id_ni
                                                         and grado_estudio=$id_gr");
                                        while($in=mysql_fetch_array($qn)){
                                        $sel="";
                                        if(enc($in[seccion])==$ids){
                                          $sel="selected";
                                        }
                                        ?>
                                          <option value="frm_agregar_asistencia.php?ids=<?=enc($in[seccion])."&idg=$idg&idn=$idn&idj=$idj";?>" <?=$sel;?>><?=$in[seccion];?></option>
                                        <?}?>
                                    </select>                                    </td>
                                  </tr>
                                </table>
                                <br>
                              <?if(!$ids || !$idg || !$idn){
                              exit();
                              }?>
                              <form action="frm_asistencia.php" method="post" name="form1" class="lbl_formulario">
                               FECHA:
                                <select name="txtdia" class="lbl_formulario">
                               <?
                               for($i=1;$i<=31;$i++){
                                 $selected="";
                                 if($i==date("d")){$selected="selected";}
                                 if($i<=9){$i="0$i";}
                                 echo "<option value='$i' $selected>".($i)."</option>";
                               }
                               ?>

                                </select>
                               -
                               <select name="txtmes" class="lbl_formulario"  id="txtmes">
                               <?
                               for($i=1;$i<=12;$i++){
                                 $selected="";
                                 if($i==date("m")){$selected="selected";}
                                 if($i<=9){$i="0$i";}
                                 echo "<option value='$i' $selected>".mes_letras($i)."</option>";
                               }
                               ?>
                               </select>-
                               <input name="txtyear" type="text" class="lbl_formulario" id="txtyear" value="<?=date("Y");?>" size="4" maxlength="4">
                               <input name="Submit" type="submit" class="boton_guardar" value="Continuar &raquo;">
                               <input name="idg" type="hidden" id="idg" value="<?=$idg;?>">
                               <input name="ids" type="hidden" id="ids" value="<?=$ids;?>">
                               <input name="idn" type="hidden" id="idn" value="<?=$idn;?>">
                              </form></td>
                            </tr>
                      </table></td></tr>
                </table>
              </div></td>
              </tr>
          </table></td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>
