<?
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"> Informaci&oacute;n de cursos por grado </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_informacioncursosxgrado_print.php?orden=<?=$orden."&t=$t";?>','chooser','width=800, height=600, location=no,menubar=no,resaizable=no,status=no,scrollbars=yes');" 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" bgcolor="#FFFFCC"><div align="right">
                  <table width="100%"  border="0" cellpadding="1" cellspacing="1" bgcolor="#CFDFEF">
                  <?
                  $qgrados=mysql_query("select grados.grado, grados.id as idg, niveles.nivel, jornadas.jornada
                                        from grados inner join niveles ON grados.nivel = niveles.id
                                        inner join jornadas ON grados.jornada = jornadas.id
                                        order by jornadas.jornada, niveles.en_numeros, grados.en_numeros, grados.grado");
                  while($igrado=mysql_fetch_array($qgrados)){
                  ?>
                    <tr bgcolor="#B5CDE6" class="lbl_formulario">
                      <td class="lbl_campo"><div align="left">GRADO:</div></td>
                      <td colspan="7" class="lbl_campo"><div align="left"><?="Grado:{$igrado[grado]}, Nivel: {$igrado[nivel]}, Jornada: {$igrado[jornada]} ";?>
                        <a name="<?=$igrado[idg];?>"></a></div></td>
                      </tr>
                    <tr bgcolor="#CFDFEF" class="lbl_campo">
                      <td width="9%" background="../images/tema/bg_frm_campos.png"><div align="center">CODIGO<br>
                        <a href="?orden=cursos.codigo&t=asc#<?=$igrado[idg];?>"><img src="../images/sort_asc.png" alt="Ordenar Ascendentemente" width="12" height="12" border="0"></a> &nbsp;&nbsp;&nbsp; <a href="?orden=cursos.codigo&t=desc#<?=$igrado[idg];?>"><img src="../images/sort_desc.png" width="12" height="12" border="0"></a>                      </div></td>
                      <td width="41%" background="../images/tema/bg_frm_campos.png"><div align="center">NOMBRE DEL CURSO <br>
                        <a href="?orden=cursos.curso&t=asc#<?=$igrado[idg];?>"><img src="../images/sort_asc.png" alt="Ordenar Ascendentemente" width="12" height="12" border="0"></a> &nbsp;&nbsp;&nbsp; <a href="?orden=cursos.curso&t=desc#<?=$igrado[idg];?>"><img src="../images/sort_desc.png" width="12" height="12" border="0"></a>                      </div></td>
                      <td width="10%" background="../images/tema/bg_frm_campos.png"><div align="center">Se imprime<br>
                        en boleta<br>
                        <a href="?orden=boleta&t=asc#<?=$igrado[idg];?>"><img src="../images/sort_asc.png" alt="Ordenar Ascendentemente" width="12" height="12" border="0"></a> &nbsp;&nbsp;&nbsp; <a href="?orden=boleta&t=desc#<?=$igrado[idg];?>"><img src="../images/sort_desc.png" width="12" height="12" border="0"></a>                      </div></td>
                      <td width="6%" background="../images/tema/bg_frm_campos.png"><div align="center">Curso <br>
                        Oficial<br>
                        <a href="?orden=oficial&t=asc#<?=$igrado[idg];?>"><img src="../images/sort_asc.png" alt="Ordenar Ascendentemente" width="12" height="12" border="0"></a> &nbsp;&nbsp; <a href="?orden=oficial&t=desc#<?=$igrado[idg];?>"><img src="../images/sort_desc.png" width="12" height="12" border="0"></a>                        </div></td>
                      <td width="9%" background="../images/tema/bg_frm_campos.png"><div align="center">Curso de <br>
                        Promoci&oacute;n <br>
                        <a href="?orden=promocion&t=asc#<?=$igrado[idg];?>"><img src="../images/sort_asc.png" alt="Ordenar Ascendentemente" width="12" height="12" border="0"></a> &nbsp;&nbsp;&nbsp; <a href="?orden=promocion&t=desc#<?=$igrado[idg];?>"><img src="../images/sort_desc.png" width="12" height="12" border="0"></a>                      </div></td>
                      <td width="9%" background="../images/tema/bg_frm_campos.png"><div align="center">Posicion<br>
                        Certificado<br>
                        <a href="?orden=posicion_certificado&t=asc#<?=$igrado[idg];?>"><img src="../images/sort_asc.png" alt="Ordenar Ascendentemente" width="12" height="12" border="0"></a> &nbsp;&nbsp;&nbsp; <a href="?orden=posicion_certificado&t=desc#<?=$igrado[idg];?>"><img src="../images/sort_desc.png" width="12" height="12" border="0"></a>                      </div></td>
                      <td width="7%" background="../images/tema/bg_frm_campos.png"><div align="center">Posici&oacute;n<br>
                        Boleta<br>
                        <a href="?orden=posicion_boleta&t=asc#<?=$igrado[idg];?>"><img src="../images/sort_asc.png" alt="Ordenar Ascendentemente" width="12" height="12" border="0"></a>  &nbsp;&nbsp;&nbsp; <a href="?orden=posicion_boleta&t=desc#<?=$igrado[idg];?>"><img src="../images/sort_desc.png" width="12" height="12" border="0"></a> </div></td>
                      <td width="9%" background="../images/tema/bg_frm_campos.png"><div align="center">Punteo<br>
                        Aprobaci&oacute;n<br>
                        <a href="?orden=punteo_aprobacion&t=asc#<?=$igrado[idg];?>"><img src="../images/sort_asc.png" alt="Ordenar Ascendentemente" width="12" height="12" border="0"></a> &nbsp;&nbsp;&nbsp; <a href="?orden=punteo_aprobacion&t=desc#<?=$igrado[idg];?>"><img src="../images/sort_desc.png" width="12" height="12" border="0"></a>                      </div></td>
                    </tr>
                    <?
                    if(!$orden){
                      $orden="cursos.curso";
                      $t="asc";
                    }
                    $qcursos=mysql_query("select cursos.*
                                          from cursos_grados inner join cursos ON cursos.codigo = cursos_grados.curso
                                          where cursos_grados.grado = '{$igrado[idg]}'
                                          order by $orden $t");
                    while($icurso=mysql_fetch_array($qcursos)){
                    ?>
                    <tr class="parrafo" bgcolor="<?=color_fila($i++);?>">
                      <td><div align="center"><?=$icurso[codigo];?></div></td>
                      <td><div align="left"><?=$icurso[curso];?></div></td>
                      <td><div align="center"><img src="../images/<?if($icurso[boleta]=="S"){echo "si";}else{echo "no";}?>2.gif" width="10" height="15"></div></td>
                      <td><div align="center"><img src="../images/<?if($icurso[oficial]=="S"){echo "si";}else{echo "no";}?>2.gif" width="10" height="15"></div></td>
                      <td><div align="center"><img src="../images/<?if($icurso[promocion]=="S"){echo "si";}else{echo "no";}?>2.gif" width="10" height="15"></div></td>
                      <td><div align="center" class='parrafo'><?=$icurso[posicion_certificado];?></div></td>
                      <td><div align="center" class='parrafo'><?=$icurso[posicion_boleta];?></div></td>
                      <td><div align="center"><?=$icurso[punteo_aprobacion];?></div></td>
                    </tr>
                    <?}?>
                    <tr class="parrafo" bgcolor="<?=color_fila($i++);?>">
                      <td colspan="8" bgcolor="#FFFFFF">&nbsp;</td>
                    </tr>
                  <?}?>
                  </table>
                </div></td>
              </tr>
            </table>
          </td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>
