<?
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 evaluaciones</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" bgcolor="#FFFFCC">
        <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"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="65">&nbsp;</td>
                  <td><div align="center" class="titulo_pagina"><strong>AGREGAR EVALUACION </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></td>
            </tr>
            <tr bgcolor="#FFFFCC">
              <td align="left" valign="top" bgcolor="#FFFFCC"><div align="left" class="parrafo">
                <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr bgcolor="#FFFFCC">
                    <td bgcolor="#FFFFCC">
                      <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" class="lbl_formulario"> Seleccione un grado
                                    <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'");
                                      while($igrados=mysql_fetch_array($qgrados)){
                                        if(base64_encode($igrados[idg])==$idg and base64_encode($igrados[idn])==$idn and base64_encode($igrados[seccion])==$idse and base64_encode($igrados[idc])==$idc and base64_encode($igrados[idj])==$idj){
                                         $sel="selected class='selected_option'";
                                        }else{
                                         $sel="";
                                        }
                                        echo "<option value=frm_agregar_evaluacion.php?idg=".base64_encode($igrados[idg])."&idse=".base64_encode($igrados[seccion])."&idc=".base64_encode($igrados[idc])."&idj=".base64_encode($igrados[idj])."&idn=".base64_encode($igrados[idn])." $sel>{$igrados[jornada]} | {$igrados[nivel]} |{$igrados[grado]} | {$igrados[curso]} | {$igrados[seccion]}</option>";
                                      }
                                      ?>
                                    </select></td>
                                </tr>
                              </table>
                              <hr size="1">
                              <?
                              if(!$idg){exit();}
                              $qgrado=mysql_query("select * from grados where id = ".base64_decode($idg));
                              $igrado=mysql_fetch_array($qgrado);
                              ?>
                              <table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
                                <?
                                if(!$idc){exit();}
                                ?>
                                <tr align="left" valign="middle" bgcolor="#CFDFEF">
                                  <td colspan="2" class="lbl_formulario">Seleccione una unidad
                                    <select name="txtunidad" class="textbox" id="txtunidad" onChange="MM_jumpMenu('self',this,0)">
                                      <option value="#" selected>SELECCIONE UNO...</option>
                                      <?
                                      $qunidades=mysql_query("select * from unidades_grados where grado = ".base64_decode($idg));
                                      //echo "eRROR".mysql_error();
                                      while($iunidad=mysql_fetch_array($qunidades)){
                                       echo "<option value='frm_evaluacion.php?idn=$idn&idj=$idj&idg=$idg&idse=$idse&idc=$idc&idund=".base64_encode($iunidad[id])."'>{$iunidad[unidad]}</option>";
                                      }
                                      ?>

                                    </select></td>
                                </tr>
                              </table></td>
                            </tr>
                      </table>
                      </td>
                  </tr>
                </table>
              </div></td>
              </tr>
          </table></td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>