<?
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>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_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">ADMINISTRACION DE TAREAS PARA ALUMNOS </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" 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'
                                                            order by jornadas.jornada, niveles.nivel, grados.grado, cursos.curso");
                                      while($ic=mysql_fetch_array($qgrados)){
                                      if(enc($ic[idg])==$idg and $ids==enc($ic[seccion]) and $idc==enc($ic[idc]) and $idj==enc($ic[idj]) and $idn == enc($ic[idn])){
                                       $sel="selected class='selected_option'";
                                      }else{
                                       $sel="";
                                      }
                                        echo "<option value='frm_agregar_tarea.php?idg=".enc($ic[idg])."&ids=".enc($ic[seccion])."&idc=".enc($ic[idc])."&idj=".enc($ic[idj])."&idn=".enc($ic[idn])."' $sel>".$ic[jornada]." | ".$ic[nivel]." | ".$ic[grado]." | ".$ic[curso]." | ".$ic[seccion]."</option>";
                                      }
                                      ?>
                                    </select></td>
                                </tr>
                              </table>
                              <?
                              if(!$idg){exit();}
                              $qgrado=mysql_query("select * from grados where id = ".dec($idg));
                              $igrado=mysql_fetch_array($qgrado);
                              ?>
                              <br>
                              <table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
                                <tr align="left" valign="middle" bgcolor="#E8E8E8">
                                  <td width="13%" bgcolor="#CFDFEF" class="parrafo"><strong class="lbl_campo">Grado: </strong></td>
                                  <td width="87%" bgcolor="#ECF2F9" class="parrafo"><strong>
                                    <?=gjornada($idj)." | ".gnivel($idn)." | ".($igrado[grado]);?>
                                    </strong></td>
                                </tr>
                                <tr align="left" valign="middle" bgcolor="#CFDFEF">
                                  <td class="lbl_campo">Curso:</td>
                                  <td bgcolor="#ECF2F9" class="parrafo"><?=gcurso($idc)." | ".dec($ids);?></td>
                                </tr>
                                <?
                                  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 UNA...</option>
                                    <?
                                    $id_gr=dec($idg);
                                    $qund=mysql_query("select * from unidades_grados where grado = '$id_gr' and estado = 'A' order by id");
                                    while($iund=mysql_fetch_array($qund)){
                                      echo "<option value='frm_tarea.php?idg=$idg&ids=$ids&idc=$idc&idu=".enc($iund[id])."&idj=$idj&idn=$idn'>{$iund[unidad]}</option>";
                                    }
                                    ?>
                                    </select>
                                  </td>
                                  </tr>
                              </table></td>
                            </tr>
                      </table></td></tr>
                </table>
              </div></td>
              </tr>
          </table></td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>
