<?php
  session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php
  $keywords = "our work, roofing replacement projects, recent Renaissance Contracting projects";
  $description = "Renaissance Contracting Recent Roof Replacement Projects.";
  $title = 'Our Work | Renaissance Contracting';
  require 'php/setVariables.php';
  require 'req/header.php';
?>
</head>
<body>
    <div class="bodyFrame">


        <?php require 'req/top.php'; ?>

        <!-- begin content -->
        <main>
            
            <section>
               <div class="pageFull subpageTit topi">
                 <div class="pageSize">
                   <h1>recent roof replacement projects</h1>
                 </div>
               </div>
            </section>

          <section>
            <div class="pageFull">
              <div class="pageSize2">

                <div class="centerGalle">
                   <div class="galleWrapper">

                     <?php

                     $folder = 'images/gallery';
                     $allowed_filetypes = array('.jpg','.gif','.png','.bmp','.webp');
                     $path_thumnails = opendir($folder);
                     $pic = array();
                     $i= 0;
                     while (false !== ($entry = readdir($path_thumnails))){
                         $ext = substr($entry,strpos($entry,'.'),strlen($entry)-1);
                         if(in_array($ext,$allowed_filetypes)) {
                             $pic[$i] = $entry;
                             $i++;
                         }
                     }
                     for($i=0; $i < sizeof($pic) ; $i++) {
                       echo '<div class="item"><img src="'.$folder.'/'.$pic[$i].'" alt="gallery"></div>';
                     }closedir($path_thumnails);
                     ?>

                   </div><!-- End galleWrapper -->
                 </div><!-- End centerGalle -->

              </div><!-- end pageSize -->
            </div><!-- end pageFull topi -->
          </section>

        </main>
         <!-- end content -->

<?php require 'req/footer.php'; ?>

    </div><!-- end bodyFrame -->

</body>
</html>
