<?
if(1==2){
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="../estilo1.css" rel="stylesheet" type="text/css" />
</head>

<body>
<?}?>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="49"><img src="../images/contenedores/padres/ic_circulares.gif" width="49" height="35" /></td>
    <td width="251" valign="bottom" background="../images/contenedores/pestana_centro.gif" class="lbl_campo"><div align="left" class="titulo_pagina">Descarga de documentos y circulares<a name="tareash" id="tareas5"></a></div></td>
    <td width="356" background="../images/contenedores/pestana_bg.gif"><div align="left"><img src="../images/contenedores/pestana_derecha.gif" width="16" height="35" /></div></td>
    <td width="244" background="../images/contenedores/pestana_bg.gif"><div align="right"><img src="../images/contenedores/pestana_curva.gif" width="13" height="35" /></div></td>
  </tr>
  <tr>
    <td colspan="4"><table width="900" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="10" background="../images/contenedores/pestana_cont_izq.gif">&nbsp;</td>
        <td width="880" bgcolor="#FFFFFF"><br />
        <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#C8D0F3">
          <tr>
            <td bgcolor="#98A6E9" class="lbl_campo"><div align="center">Nombre del archivo</div></td>
            <td bgcolor="#98A6E9" class="lbl_campo"><div align="center">Tama&ntilde;o</div></td>
            <td bgcolor="#98A6E9" class="lbl_campo"><div align="center">Cargado el d&iacute;a</div></td>
          </tr>
          <?
                      $qgr=runsql("select grado_estudio from alumnos where carnet = '$uuser'");
                      $igr=mysql_fetch_array($qgr);
                      $mi_grado = $igr[grado_estudio];
                      $mi_nivel=0;
                      
                      if($mi_grado >= 12 and $mi_grado<=14){
                        $mi_nivel=-4;
                      }
                      
                      if($mi_grado >= 1 and $mi_grado<=2){
                        $mi_nivel=-1;
                      }
                      
                      if($mi_grado >= 3 and $mi_grado<=6){
                        $mi_nivel=-2;
                      }
                      
                      if($mi_grado >=7  && $mi_grado <=11){
                        $mi_nivel=-3;
                      }                     
                      
                      
                      $qcircular=runsql("select * from circulares where (grado = 0 or grado = '$mi_nivel' or grado = '$mi_grado') order by fecha desc");
                      if(registros($qcircular)==0){
                      ?>
                      <tr>
                        <td class="parrafo"><em> <img src="../images/flecha_1.png" width="9" height="9" /></em><span class="lbl_campo">No hay circulares cargadas hasta este momento </span></td>
                        <td><div align="center"></div></td>
                        <td>&nbsp;</td>
                      </tr>
                      <?
                      }
                      while($iarch=registro($qcircular)){
                      ?>
                      <tr bgcolor=<?=color_fila(++$cnt);?>>
                        <td height="20" class="parrafo"> &nbsp;&nbsp;<img src="../images/flecha_1.png" width="9" height="9"><a href="#" onclick="abrir('../circulares/<?echo "{$iarch[grado]}/$iarch[archivo]";?>');" class="link_parrafo">&nbsp;
                        <?if(!$iarch[descripcion]){echo $iarch[archivo];}else{echo $iarch[descripcion];}?></a></td>
                        <td class="parrafo"><div align="center">
                          <?=tamano_archivo("../circulares/{$iarch[grado]}/".$iarch[archivo]);?>
                        </div></td>
                        <td class="parrafo"><div align="center">
                          <?=fecha($iarch[fecha]);?>
                        </div></td>
              </tr>
                      <?
                      }
                      ?>
        </table>
          <br /></td>
        <td width="10" background="../images/contenedores/pestana_cont_der.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><img src="../images/contenedores/pestana_bott_izq.gif" width="49" height="26" /></td>
    <td background="../images/contenedores/pestana_bott_centro.gif">&nbsp;</td>
    <td background="../images/contenedores/pestana_bott_centro.gif">&nbsp;</td>
    <td background="../images/contenedores/pestana_bott_centro.gif"><div align="right"><img src="../images/contenedores/pestana_bott_der.gif" width="13" height="26" /></div></td>
  </tr>
</table>
<?
if(1==2){
?>
</body>
</html>
<?}?>
