<?php include "include/header.php"; ?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.8.2/css/lightbox.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.8.2/js/lightbox.min.js"></script>

<section class="sec-title text-white ">
<div class="container">
<div class="row">
 <div class="col-12 col-sm-12 col-md-12 col-lg-12">
  <h2>Gallery - <?php echo $name;?></h2>  
   </div>
</div>
</div>
</section>

<section class="sec-products padding-70 " style="background: #eee">
          <div class="container">

            <div class="row">
              <div class="col-12 col-sm-12 col-md-12 col-lg-12">
                <div class="category text-center">
                <?php
                $cnt=0;
                foreach($gt_type as $grow):
                $gt_id = $grow->gt_id;
                $g_url = base_url().'gallery-type/'.rm_blank($grow->gt_type).'/'.base64_encode($gt_id);
                $cnt+=1;
                ?>
                <a href="<?php echo $g_url; ?>" class="btn btn-danger btn-sm"><?php echo $grow->gt_type;?></a>

                <?php 
                endforeach; 
                ?>
                <br><br>
                </div>
              </div>
              
                <?php
                $cnt=0;
                foreach($gallery as $row):
                $g_id = $row->g_id;
                $cnt+=1;
                ?>

                  <div class="col-6 col-sm-4 col-md-4 col-lg-4">
                <div class="card photos mb-3" >
                  <a href="<?php echo base_url();?>assets/uploads/news/gallery_<?php echo $row->g_id;?>.jpg" data-lightbox="photos">
               <img src="<?php echo base_url();?>assets/uploads/news/gallery_<?php echo $row->g_id.'.jpg';?>" class="card-img-top" alt="..." style="height: 250px;" onerror="this.src='<?php echo base_url();?>assets/default-img.gif'">

            </a>
              <div class="cart-text">
                <h2 class="text-center"><?php echo $row->g_name; ?></h2>
              </div>
                 
             
            </div>
                
              </div>
 <?php
                endforeach;
                ?> 

               

           
              
                
              </div>
              
              
            </div>

            
            
          </div>
        </section>










<?php include "include/footer.php"; ?>