<?
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 src="../jsincludes/functions.js" type="text/javascript" language="javascript"></script>
<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"><strong> CALIFICAR TAREAS</strong></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" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
                                <tr>
                                  <td bgcolor="#CFDFEF"><span class="parrafo"><strong>Seleccione un grado: </strong></span>
                                      <select name="select" class="textbox" onChange="MM_jumpMenu('self',this,0)">
                                        <option value="#" selected>Seleccione uno...</option>
                                        <?
                                        $sql="select distinct grados.id, grados.grado
                                              from grados inner join cursos_catedraticos
                                              on grados.id = cursos_catedraticos.grado
                                              where cursos_catedraticos.catedratico = '$uuser'";

                                        $qgrados=mysql_query($sql);
                                        while($igrados=mysql_fetch_array($qgrados)){
                                         echo "<option value='frm_cuadro_notas.php?gid=".enc($igrados[id])."'>{$igrados[grado]}</option>";
                                        }
                                        ?>                                                                                                                                                                                                                                    </select></td>
                                </tr>
                              </table>
                                <table width="100%"  border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
                                <tr>
                                  <td bgcolor="#CFDFEF"><span class="parrafo"><strong>Seleccione un curso:</strong></span>
                                    <select name="menu1" class="textbox" onChange="MM_jumpMenu('self',this,0)">
                                     <option value="#" selected>Seleccione uno...</option>
                                                                             <?
                                        $sql="select distinct cursos.curso, cursos.codigo
                                              from cursos inner join cursos_catedraticos
                                              on cursos.codigo = cursos_catedraticos.curso
                                              where cursos_catedraticos.catedratico = '$uuser'
                                              and cursos_catedraticos.grado = '".dec($gid)."'";

                                        $qgrados=mysql_query($sql);
                                        echo $sql;
                                        while($igrados=mysql_fetch_array($qgrados)){
                                         echo "<option value='frm_cuadro_notas.php?gid=$gid&cid=".enc($igrados[codigo])."'>{$igrados[curso]}</option>";
                                        }
                                        ?>                                                                                                                                                                                                                                    </select></td>
                                </tr>
                                <tr>
                                  <td bgcolor="#CFDFEF" class="lbl_campo">Seleccione una unidad:
                                  <select name="menu1" class="textbox" onChange="MM_jumpMenu('self',this,0)">
                                     <option value="#" selected>Seleccione uno...</option>
                                                                             <?
                                        $sql="select distinct cursos.curso, cursos.codigo
                                              from cursos inner join cursos_catedraticos
                                              on cursos.codigo = cursos_catedraticos.curso
                                              where cursos_catedraticos.catedratico = '$uuser'
                                              and cursos_catedraticos.grado = '".dec($gid)."'";

                                        $qgrados=mysql_query($sql);
                                        echo $sql;
                                        while($igrados=mysql_fetch_array($qgrados)){
                                         echo "<option value='frm_cuadro_notas.php?gid=$gid&cid=".enc($igrados[codigo])."'>{$igrados[curso]}</option>";
                                        }
                                        ?>
                                     </select>
                                  </td>
                                </tr>
                              </table>
                                <hr size="1">
                                <?
                                if(!$gid or !$cid){exit();}
                                $qev=mysql_query("select * from tareas where curso = '".dec($cid)."'");
                                ?>
                                <table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
                                  <tr bgcolor="#B6D3FC">
                                    <td width="8%" bgcolor="#CFDFEF" class="parrafo">Grado:</td>
                                    <td width="92%" bgcolor="#ECF2F9"><strong>
                                      <?=ggrado($gid);?>
                                    </strong></td>
                                  </tr>
                                  <tr bgcolor="#B6D3FC">
                                    <td bgcolor="#CFDFEF" class="parrafo">Curso:</td>
                                    <td bgcolor="#ECF2F9"><strong>
                                      <?=gcurso($cid);?>
                                    </strong></td>
                                  </tr>
                                </table>
                                <table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
                                  <tr align="left" valign="middle" bgcolor="#B6D3FC">
                                  <td width="584" bgcolor="#6699CC" class="parrafo"><strong class="titulo_formulario">Tareas disponibles para este curso </strong></td>
                                  </tr>
                                  <tr align="left" valign="middle" bgcolor="#E8E8E8">
                                    <td bgcolor="#B6D3FC" class="lbl_formulario"><table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1">
                                    <tr bgcolor="#336699">
                                      <td width="60%"><div align="center" class="enc_tabla_blanco">Nombre de la tarea </div></td>
                                      <td width="20%"><div align="center" class="enc_tabla_blanco"><strong>Fecha de entrega </strong></div></td>
                                      <td width="6%"><div align="center" class="enc_tabla_blanco"><strong>Activa</strong></div></td>
                                      <td width="14%"><div align="center" class="enc_tabla_blanco">Opciones</div></td>
                                    </tr>
                                    <?
                                    $i=0;
                                    while($itr=mysql_fetch_array($qev)){
                                    $i++;
                                    if($i%2==0){
                                     $bgcolor="$bgf1";
                                    }else{
                                     $bgcolor="$bgf2";
                                    }
                                    ?>
                                    <tr bgcolor="<?=$bgcolor;?>" class="parrafo" onmouseover="setPointer(this, 2, 'over', '<?=$bgcolor;?>', '#E7FEE0', '#FFCC99');" onmouseout="setPointer(this, 2, 'out', '<?=$bgcolor;?>', '#E7FEE0', '#FFCC99');">
                                      <td><img src="../images/flecha_1.png" width="9" height="9">                                        <?=$itr[tarea];?></td>
                                      <td><?=fechalarga($itr[fecha_limite]." ".$itr[hora_limite])?></td>
                                      <td><div align="center"><img src="../images/<?if($itr[activa]=="S"){echo "si2.gif";}else{echo "no2.gif";}?>" width="10" height="15"></div></td>
                                      <td bgcolor="<?=$bgcolor;?>"><div align="center"><a href="frm_calificar_tareas.php?tid=<?=enc($itr[id])."&gid=".$gid."&cid=".$cid."&sid=".enc($itr[seccion]);?>" class="link_parrafo"><strong>Calificar</strong></a></div></td>
                                    </tr>
                                    <?
                                    }
                                    ?>
                                  </table></td>
                                </tr>
                              </table></td></tr>
                      </table></td></tr>
                </table>
              </div></td>
              </tr>
          </table></td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>