<?
include("../fnc.php");
enlinea_c();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Agregar Notas</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_cat.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">
        <tr>
          <td width="20%" valign="top" bgcolor="#FFFFCC"><?php include("menu.php"); ?>&nbsp;</td>
          <td width="80%" valign="top" bgcolor="#FFFFCC"><table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#333333">
            <tr align="center" valign="middle" bgcolor="#FFFFCC">
              <td height="20" 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">AGREGAR NOTAS DE UNIDAD ACADEMICA </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>
                      <table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#333333">
                            <tr>
                              <td bgcolor="#FFFFFF">
                              <table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
                                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                                  <td width="100%" bgcolor="#CFDFEF"> <strong>Seleccione un grado</strong>
                                                                  <select name="txtgrado" class="textbox" id="txtgrado" onChange="MM_jumpMenu('self',this,0)">
                                      <option value="#" selected>SELECCIONE UNO...</option>
                                      <?
                                      $qgrados=mysql_query("select distinct grados.grado, grados.id as idg, cursos.curso, cursos.codigo as idc,
                                                            jornadas.jornada, jornadas.id as idj, niveles.nivel, niveles.id as idn, cursos_catedraticos.seccion
                                                            from cursos_catedraticos inner join grados on cursos_catedraticos.grado = grados.id
                                                            inner join cursos on cursos_catedraticos.curso = cursos.codigo
                                                            inner join niveles on grados.nivel = niveles.id
                                                            inner join jornadas on jornadas.id = grados.jornada
                                                            where cursos_catedraticos.catedratico = '$uuser'                                                         
                                                            order by jornadas.jornada, niveles.nivel, grados.grado");
                                      while($igrados=mysql_fetch_array($qgrados)){
                                        echo "<option value=frm_agregar_notas.php?idg=".enc($igrados[idg])."&idc=".enc($igrados[idc])."&sid=".enc($igrados[seccion])."&idj=".enc($igrados[idj])."&idn=".enc($igrados[idn]).">{$igrados[jornada]} | {$igrados[nivel]} | {$igrados[grado]} | {$igrados[curso]} | {$igrados[seccion]}</option>";
                                      }
                                      ?>
                                    </select></td>
                                </tr>
                              </table>
                              <?
                              if(!$idg){exit();}
                              $qgrado=mysql_query("select * from grados where id = ".dec($idg));
                              $igrado=mysql_fetch_array($qgrado);
                              ?>

                              <table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">

                                <?
                                /*
                                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                                  <td colspan="5" bgcolor="#CFDFEF"><strong>Seleccione un curso</strong>
                                                                  <select name="txtcurso" class="textbox" id="txtcurso" onChange="MM_jumpMenu('self',this,0)">
                                                                    <option value="#" selected>SELECCIONE UNO...</option>
                                                                    <option>unnamed1</option>
                                                                  </select></td>
                                </tr>
                                */
                                ?>
                                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                                  <td width="16%" bgcolor="#ECF2F9" class="lbl_campo"><div align="center">Jornada</div></td>
                                  <td width="25%" bgcolor="#ECF2F9" class="lbl_campo"><div align="center">Nivel</div></td>
                                  <td width="20%" bgcolor="#ECF2F9" class="lbl_campo"><div align="center">Grado</div></td>
                                  <td width="31%" bgcolor="#ECF2F9" class="lbl_campo"><div align="center">Curso</div></td>
                                  <td width="8%" bgcolor="#ECF2F9" class="lbl_campo">Secci&oacute;n</td>
                                  </tr>
                                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                                  <td bgcolor="#ECF2F9" class="lbl_formulario"><?=gjornada($idj);?></td>
                                  <td bgcolor="#ECF2F9" class="lbl_formulario"><?=gnivel($idn);?></td>
                                  <td bgcolor="#ECF2F9" class="lbl_formulario"><?=ggrado($idg);?></td>
                                  <td bgcolor="#ECF2F9" class="lbl_formulario"><?=gcurso($idc);?></td>
                                  <td bgcolor="#ECF2F9" class="lbl_formulario"><?=dec($sid);?></td>
                                </tr>
                              </table>
                              <br>
                              <?
                              if(!$idg or !$idc){exit();}
                              ?>
                              <table width="50%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
                                <tr>
                                  <td bgcolor="#336699"><div align="center" class="enc_tabla_blanco"><strong>SELECCIONE UNA UNIDAD </strong></div></td>
                                </tr>
                                <?
                                $qunidad=mysql_query("select * from unidades_grados where grado = ".dec($idg)." order by id");
                                while($iunidad=mysql_fetch_array($qunidad)){
                                ?>
                                <tr>
                                  <td bgcolor="#FFFFFF"><div align="left"><img src="../images/flecha_1.png" width="9" height="9">
                                      <a href="frm_notasv2.php?idg=<?="$idg&idn=$idn&idc=$idc&sid=$sid&idu=".enc($iunidad[id]);?>" class="link_parrafo"><?=$iunidad[unidad];?></a></div></td>
                                </tr>
                                <?
                                }
                                ?>
                              </table>
                              <br></td>
                            </tr>
                      </table>
                      &nbsp;</td>
                  </tr>
                </table>
              </div></td>
              </tr>
          </table></td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>
