<?
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><strong><?echo "$unombre $uapellido";?></strong><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 valign="top" bgcolor="#FFFFCC">&nbsp;            <div align="right"></div>            <table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#333333">
              <tr align="center" valign="middle" bgcolor="#FFFFCC">
                <td width="75%" height="20" bgcolor="#FFFFCC"><div align="left"><span class="titulo_pagina">REPORTES<img src="../images/flecha_3.jpg" width="9" height="9"> Evaluaci&oacute;n a catedr&aacute;ticos / Resultados de la evaluaci&oacute;n </span> </div>                  
                  <div align="center" class="titulo_pagina"></div></td>
                <td width="25%" bgcolor="#FFFFCC" class="parrafo"><div align="right"><a href="frm_reportes.php" class="link_parrafo">Regresar al men&uacute; de reportes<img src="../images/ic_home.png" width="21" height="21" border="0"></a> </div></td>
              </tr>
              <tr>
                <td colspan="2" align="left" valign="top" bgcolor="#FFFFCC"><div align="left" class="parrafo">
                  <table width="99%"  border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#3886F0">
                    <tr>
                      <td align="left" valign="top">
                      <table width="100%"  border="0" cellspacing="0" cellpadding="2">
                        <tr>
                          <td bgcolor="#FFFFFF" class="lbl_campo">Seleccione una encuesta: 
              						  <select name="menu1" class="textbox" onChange="MM_jumpMenu('self',this,0)">
              						    <option value="#">SELECCIONE UNA...</option>
              						    <?
              						    $q=mysql_query("select * from ec_evaluaciones where activa = 'S'");
              						    while($iev=mysql_fetch_array($q)){
              						     $sele="";
                               if( $iev[id] == dec($idev) ){
                                 $sele="selected class='selected_option'";
                               }
              						      echo "<option value='$PHP_SELF?idev=".enc($iev[id])."' $sele>{$iev[nombre]}</option>";
              						    }
                              ?>
              						  </select>       
						              </td>
                          <td bgcolor="#FFFFFF">&nbsp;</td>
                        </tr>
                        <tr>
                          <td width="86%" bgcolor="#FFFFFF" class="lbl_campo">Seleccione un nivel:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <select name="menu1" class="textbox" onChange="MM_jumpMenu('self',this,0)">
                           <option value="#" selected>SELECCIONE UNO...</option>
                           <?
                           $qnivel=mysql_query("select * from niveles order by id");

                           while($inivel=mysql_fetch_array($qnivel)){
                             $seln="";
                             if( $inivel[id] == dec($nivel) ){
                               $seln="selected class='selected_option'";
                             }
                             echo "<option value='$PHP_SELF?idev=$idev&nivel=".enc($inivel[id])."' $seln>{$inivel[nivel]}</option>";
                           }
                           ?>
                           </select>
                           <?if(!$nivel){exit();}?>
                           <br>
                           Seleccione un grado:
                           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                           <select name="menu1" class="textbox" onChange="MM_jumpMenu('self',this,0)">
                           <option value="#" selected>SELECCIONE UNO...</option>
                           <?
                           $id_nivel=dec($nivel);
                           $qnivel=mysql_query("select * from grados where nivel=$id_nivel order by grado");
                           while($inivel=mysql_fetch_array($qnivel)){
                             $selg="";
                             if( $inivel[id] == dec($grado) ){
                               $selg="selected class='selected_option'";
                             }

                             echo "<option value='$PHP_SELF?idev=$idev&nivel=$nivel&grado=".enc($inivel[id])."' $selg>{$inivel[grado]}</option>";
                           }
                           ?>
                           </select>                          </td>
                          <td width="14%" bgcolor="#FFFFFF">&nbsp;</td>
                        </tr>
                      <?
                        if(!$nivel or !$grado){exit();}
                        $id_eval=dec($idev);
                        $id_nivel=dec($nivel);
                        $id_grado=dec($grado);
                        
                      ?>
                        <tr>
                          <td height="5" colspan="2" bgcolor="#FFFFFF" class="titulo_seccion_mn">
                          <hr size="1" class="textbox"></td>
                        </tr>
                        <tr>
                          <td colspan="2" bgcolor="#FFFFFF" class="titulo_seccion_mn"><table width="95%" border="0" align="center" cellpadding="1" cellspacing="1">
                              <tr>
                                <td background="../images/tema/bg_frm_campos.png">&nbsp;</td>
                                <td background="../images/tema/bg_frm_campos.png" class="lbl_campo">Nombre del catedr&aacute;tico </td>
                                <td background="../images/tema/bg_frm_campos.png" class="lbl_campo"><div align="center">Nombre del Curso</div></td>
                                <td background="../images/tema/bg_frm_campos.png" class="lbl_campo">Nota  </td>
                                <td background="../images/tema/bg_frm_campos.png" class="lbl_campo">Acciones</td>
                              </tr>
                              <?
                              
                              $qcat=mysql_query("select distinct usuarios.usuario, usuarios.nombre, usuarios.apellido
                                                 from usuarios inner join cursos_catedraticos cc ON cc.catedratico = usuarios.usuario
                                                 where cc.grado = '$id_grado'
                                                 order by usuarios.apellido, usuarios.nombre");
                              while($icate=mysql_fetch_array($qcat)){
                              $i++;
                              ?>
                              <tr bgcolor="<?=color_fila($i);?>">
                                <td width="2%"><img src="../images/flecha_3.jpg" width="9" height="9"></td>
                                <td width="47%" class="parrafo"><?=($icate[apellido].", ".$icate[nombre]." (".$icate[usuario]." )");?></td>
                                <td width="38%" class="parrafo">Todos</td>
                                <td width="7%" class="parrafo"><div align="center">?</div></td>
                                <td width="6%" class="parrafo"><div align="center"><a href="rpt_ec_resultados.php?<?="idev=$idev&nivel=$nivel&grado=$grado&idcat=".enc($icate[usuario])."&curso=".enc($icate[curso]);?>" class="link_parrafo">Ver resultados </a></div></td>
                              </tr>
                              <?
                              }
                              ?>
                            </table>                            </td>
                        </tr>
                      <?
                      
                      ?>
                      </table>
                      </td>
                      </tr>
                  </table>
                </div></td>
              </tr>
            </table>
          &nbsp;</td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>
