<?
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>
<style type="text/css">
<!--
body {
	background-image: url(../images/tema/bg_pagina.png);
}
-->
</style></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" background="../images/tema/bg_contenido.png" 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="56%" height="20" background="../images/tema/bg_contenido.png" bgcolor="#FFFFCC"><div align="left"><span class="titulo_pagina">REPORTES<img src="../images/flecha_3.jpg" width="9" height="9"> Listado de cursos impartidos por catedr&aacute;tico</span></div>
                <div align="center" class="titulo_pagina"></div></td>
                <td width="19%" background="../images/tema/bg_contenido.png" bgcolor="#FFFFCC"><div align="right"><a href="#" onClick="window.open('./rpt_cursos_xcatedratico_print.php?orden=<?=$orden."&idc=$idc";?>','chooser','width=800, height=600,scrollbars=yes,location=no,menubar=no,resaizable=no,status=no,menubar=no');" class="link_parrafo"><img src="../images/printButton.png" width="16" height="16" border="0"> Versi&oacute;n imprimible</a></div></td>
                <td width="25%" background="../images/tema/bg_contenido.png" 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="3" align="left" valign="top" background="../images/tema/bg_contenido.png" bgcolor="#FFFFCC"><div align="left">
                  <form action="<?=$PHP_SELF;?>" method="post" name="form1" class="lbl_campo">
Seleccione un catedr&aacute;tico:
                    <select name="menu1" class="textbox" onChange="MM_jumpMenu('parent',this,0)">
                      <option value="#" selected>SELECCIONE UNO...</option>
                      <?
                      $qcat=mysql_query("select * from usuarios where catedratico = 'S' and usuarios.usuario <> 'Admin' order by apellido");
                      while($icat=mysql_fetch_array($qcat)){
                      if($idc==enc($icat[usuario])){
                       $sel="selected class='selected_option'";
                      }else{$sel="";}
                      ?>
                        <option value="<?=$PHP_SELF."?idc=".enc($icat[usuario]);?>"><?=$icat[apellido]." ".$icat[nombre];?></option>
                      <?
                      }?>
                    </select>
                    <input name="Submit" type="submit" class="boton_guardar" value="Ver reporte">
                  </form>
                </div></td>
              </tr>
              <tr>
                <td colspan="3" align="left" valign="top" background="../images/tema/bg_contenido.png" bgcolor="#FFFFCC"><table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><span class="titulo_pagina">CATEDRATICO</span>: <span class="titulo_pagina"><?="[ ".dec($idc)." ] ".nombre_usuario(dec($idc),"Ca");?> </span></td>
                  </tr>
                </table>                  <br>
                  <table width="98%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CFDFEF">
                    <tr bgcolor="#CFDFEF">
                      <td width="13%"><div align="center" class="lbl_campo"><a href="<?=$PHP_SELF."?idc=$idc&orden=cursos.codigo";?>"><img src="../images/sort_asc.png" alt="Ordenar  [Ascendente]" width="12" height="12" border="0"></a> C&oacute;digo <a href="<?=$PHP_SELF."?idc=$idc&orden=cursos.codigo desc";?>"><img src="../images/sort_desc.png" alt="Ordenar  [Descendente]" width="12" height="12" border="0"></a></div></td>
                      <td width="36%"><div align="center" class="lbl_campo"><a href="<?=$PHP_SELF."?idc=$idc&orden=cursos.curso";?>"><img src="../images/sort_asc.png" alt="Ordernar [Ascendente]" width="12" height="12" border="0"></a> Curso <a href="<?=$PHP_SELF."?idc=$idc&orden=cursos.curso desc";?>"><img src="../images/sort_desc.png" alt="Ordenar  [Descendente]" width="12" height="12" border="0"></a></div></td>
                      <td width="23%"><div align="center" class="lbl_campo"> <a href="<?=$PHP_SELF."?idc=$idc&orden=grados.id";?>"><img src="../images/sort_asc.png" alt="Ordernar [Ascendente]" width="12" height="12" border="0"></a> Grado <a href="<?=$PHP_SELF."?idc=$idc&orden=grados.id desc";?>"><img src="../images/sort_desc.png" alt="Ordenar  [Descendente]" width="12" height="12" border="0"></a></div></td>
                      <td width="17%"><div align="center" class="lbl_campo"><a href="<?=$PHP_SELF."?idc=$idc&orden=niveles.nivel";?>"><img src="../images/sort_asc.png" alt="Ordernar [Ascendente]" width="12" height="12" border="0"></a> Nivel <a href="<?=$PHP_SELF."?idc=$idc&orden=niveles.nivel desc";?>"><img src="../images/sort_desc.png" alt="Ordenar  [Descendente]" width="12" height="12" border="0"></a></div></td>
                      <td width="11%"><span class="lbl_campo">Jornada</span></td>
                    </tr>
                    <?
                  if(!$orden){
                    $orden="grados.id";
                  }

                  $id_catedratico=dec($idc);
                  $i=0;
                  $qcurso=mysql_query("select cursos.codigo as ccurso, cursos.curso, grados.grado, jornadas.jornada, niveles.nivel
                                         from usuarios inner join cursos_catedraticos on cursos_catedraticos.catedratico = usuarios.usuario
                                         inner join grados on grados.id = cursos_catedraticos.grado
                                         inner join jornadas on grados.jornada = jornadas.id
                                         inner join niveles on grados.nivel = niveles.id
                                         inner join cursos on cursos_catedraticos.curso = cursos.codigo
                                         where cursos_catedraticos.catedratico = '$id_catedratico'
                                         order by $orden");
                  echo mysql_error();
                  while($icurso=mysql_fetch_array($qcurso)){
                  $i++;
                  ?>
                    <tr bgcolor="<?=color_fila($i);?>" class="parrafo">
                      <td><?=$icurso[ccurso];?></td>
                      <td><?=$icurso[curso];?></td>
                      <td><?=$icurso[grado];?></td>
                      <td><?=$icurso[nivel];?></td>
                      <td class="parrafo"><?=$icurso[jornada];?></td>
                    </tr>
                   <?}?>
                </table></td></tr>
            </table>
           </td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>
