<?php include_once('layout/header.php'); ?>

    <!-- #nav-mobile end -->
        <!-- #body-wrap -->
    <div id="body-wrap">
        
        <!-- #header -->
        <header id="header" class="header-page">
            
            <!-- #nav-mobile-top -->
            <div id="nav-mobile-top">
                
                <!-- .container -->
                <div class="container-fluid">
                	<div class="navmenu">
                        
                        <button type="button" class="navbar-btn-toggle"><i class="ion ion-navicon"></i></button>
                        
                        <div class="navbar-logo">
                            <a href="index.html"><img src="images/logo.png" alt="Logo"></a> <!-- site logo -->
                        </div>
                        
                        
                        
                    </div>
                </div>
                <!-- .container end -->
                
            </div>
            <!-- #nav-mobile-top end -->
            
            <!-- #navigation -->
            <nav id="navigation">
                
                <!-- .navtop -->
                <div class="navtop">
                    
                    <!-- .container -->
                    <div class="container">
                        
                        <div class="nav-txt">
                            <p><i class="ion ion-android-phone-portrait"></i>
							Phalombe Youth Organisation: <strong><a href="#"> Cell: +265 997 130 654
							</a></strong></p>
                        </div>
                        
                        <div class="nav-socials">
                            <a href="#" title="Facebook"><i class="ion ion-social-facebook"></i></a>
                            <a href="#" title="Google Plus"><i class="ion ion-social-googleplus"></i></a>
                            <a href="#" title="Twitter"><i class="ion ion-social-twitter"></i></a>
                            <a href="#" title="Instagram"><i class="ion ion-social-instagram"></i></a>
                            <a href="#" title="Pinterest"><i class="ion ion-social-pinterest"></i></a>
                            <a href="#" title="Vimeo"><i class="ion ion-social-vimeo"></i></a>
                            <a href="#" title="Dribbble"><i class="ion ion-social-dribbble"></i></a>
                            <a href="#" title="Youtube"><i class="ion ion-social-youtube"></i></a>
                        </div>
                        
                    </div>
                    <!-- .container end -->
                    
                </div>
                <!-- .navtop end -->
                
                <!-- .navbar -->
                <div class="navbar">
                    
                    <!-- .container -->
                    <div class="container">
                        <div class="navbar-wrap">
                            
                            <div class="navbar-logo">
                                <a href="index.html"><img src="images/logo.png" alt="Logo"></a> <!-- site logo -->
                            </div>
                            
                            <div class="navbar-menu">
                                <ul class="nav">
                                    <li> <a href="index.php">HOME</a> </li>
                                    
								<li class="menu-item menu-item-has-children">
                                        <a href="#">OUR WORK</a>
                                        <ul class="sub-menu">
                                            <li class="menu-item"><a href="projects.php">PROJECTS</a></li>
											<li class="menu-item"><a href="programs.php">PROGRAMS</a></li>
																						
                                        </ul>
                                    </li>		
									    								<li class="menu-item menu-item-has-children">
                                        <a href="#">MEDIA</a>
                                        <ul class="sub-menu">
                                            <li class="menu-item"><a href="news_updates.php">NEWS UPDATES</a></li>
											<li class="menu-item"><a href="upcoming_events.php">UPCOMING EVENTS</a></li>
											<li class="menu-item"><a href="gallery.php">GALLERY</a></li>
																						
                                        </ul>
                                    </li>										    
										<li class="menu-item menu-item-has-children">
                                        <a href="#">PUBLICATIONS</a>
                                        <ul class="sub-menu">
                                            <li class="menu-item"><a href="downloads.php">DOWNLOADS</a></li>
											<li class="menu-item"><a href="opportunities.php">OPPORTUNITIES</a></li>
											<li class="menu-item"><a href="newsletters.php">NEWS LETTERS</a></li>
												
											
                                        </ul>
                                    </li>															
                                    									
                                    <li> <a href="contact.php">CONTACT US</a> </li>
																		
                                   <li> <a href="donate.php">DONATE</a> </li>
                                </ul>                                
                                
                            </div>

                            
                        </div>
                    </div>
                    <!-- .container end -->
                    
                </div>
                <!-- .navbar end -->
                
            </nav>
            <!-- #navigation end -->
            
            <!-- .sub-header -->
            <div class="sub-header">
            	
                <!-- .container -->
                <div class="container">
                    
                    <h4 class="header-title">Our Programs</h4>
                    <div class="breadcrumbs">
                    	<a href="index.php">Home</a> <span class="sep">/</span> 
						<a href="#">Pya Programs</a> <span class="sep">/</span> <span class="current">Programs</span>
                    </div>
                    
                </div>
                <!-- .container end -->
                
            </div>
            <!-- .sub-header end -->
            
        </header>
        <!-- #header end -->
        
        <!-- #content -->
        <div id="content" class="archive-post">
            
            <!-- .container -->
            <div class="container">
                
                <!-- .row -->
                <div class="row">
				 <?php
                    $gallery = $con->getRows('gallery', array('status'=>1, 'order_by'=>'date_posted desc'));
                    if(!empty($gallery)){
                        foreach($gallery as $row){ 
                            $category = $row['category'] ?? 'Other';
                    ?>
                    
                    <div class="col-sm-4"> <!-- 1 -->
                    	<div class="affa-post">
                            <figure class="post-thumbnail post-item-thumbnail img-hover2">
                                <a href="#">
                                    <img src="assets/uploads/gallery/<?=$row['image']?>" style="border-radius: 5%; alt="">
                                    <div class="overlay-masked">
                                        <i class="ion ion-eye"></i>
                                    </div>
                                </a>
                            </figure>
                            <div class="post-item-txt">
                            	
                                
                                
                            </div>
                        </div>
                    </div>
                             
                    <?php	
                        }
                    }else{
                        echo '<div class="col-12"><div class="alert alert-info text-center" role="alert">No gallery images available at the moment.</div></div>';
                    }
                    ?>
                    
                </div>
                <!-- .row end -->
                
                
                
                <!-- .row -->
                
               
                
            </div>
            <!-- .container end -->
            
        </div>
        <!-- #content end -->
        
        <!-- #bottom -->
            
      
        <!-- #bottom -->
        <?php include_once('layout/footer.php'); ?>