<?php include_once($_SERVER['DOCUMENT_ROOT']."/_php_header_civil.php"); ?>


<div class=titulo>Atas de Reuni&otilde;es</div>

<p class=letra>A seguir s&atilde;o listadas as 
atas das reuni&otilde;es do Conselho da Divis&atilde;o de Engenharia
Civil.
</p>

<p>Arquivos:</p>

<hr>

    <?php

      $dir = '.'; 
      $sizes = array('', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y');
      $material_extra = scandir($dir);
      rsort($material_extra);
      echo '<ul>';
      $existe = false;

      foreach ($material_extra as $file){
         $low_file = strtolower($file);

         if (
             $file != '..' 
             && $file != '.' 
             && is_dir($dir.'/'.$file) 
             ){ $existe = true; };


         if (
             $file != '..' 
             && $file != '.' 
             && $file != 'index.php' 
             && !is_dir($dir.'/'.$file) 
             && ( stripos($file, '.php') !== false )
            ){

           $f_size = filesize($dir.'/'.$file);
           $i = 0;
           while ($f_size >= 1024 && $i < 9) {
              $f_size /= 1024;
              $i++;
           };
           echo '<li><A HREF="'.$dir.'/'.$file.'">'.$low_file.'</A> '.intval($f_size).' '.$sizes[$i].'B </li>';
         };
      };

    echo '</ul>';

    ?>


    <?php

      if ( $existe ){
         echo '<hr> <p>&nbsp;</p>';
         echo '<p>Arquivos de anos anteriores:</p>';
         echo '<ul>';
         foreach ($material_extra as $file){
            $low_file = strtolower($file);
            if (
                $file != '..' 
                && $file != '.' 
                && is_dir($dir.'/'.$file) 
               ){ echo '<li><A HREF="'.$dir.'/'.$file.'">'.$low_file.'</A></li>';
            };
         };
         echo '</ul>';
       };

    ?>

<hr>

<p>&nbsp;</p>

<?php include_once($_SERVER['DOCUMENT_ROOT']."/_php_footer_civil.php"); ?>
