<!DOCTYPE html>

<html>
    <head>
        <meta charset="utf-8">
        <title>Galerija - Luxury Event Catering Tivat</title>
        <meta name="description" content="Luxury Event Catering Tivat MONTENEGRO - Galerija">
		<meta name="robots" content="index,follow" />
        <meta name="author" content="LaktusDev">
        <meta name="keywords" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <!-- Stylesheets -->
		<link rel="icon" href="icon.jpg">
        <link rel="stylesheet" href="css/bootstrap.min.css"/><!-- bootstrap grid -->
        <link rel="stylesheet" href="css/bootstrap-theme.min.css"/><!-- bootstrap theme -->
        <link rel="stylesheet" href="css/style.css"/><!-- template styles -->
        <link rel="stylesheet" href="css/color-default.css"/><!-- default template color styles -->
        <link rel="stylesheet" href="css/retina.css"/><!-- retina ready styles -->
        <link rel="stylesheet" href="css/responsive.css"/><!-- responsive styles -->
        <link rel="stylesheet" href="css/animate.css"/><!-- animation for content -->

        <!-- Magnific Popup - image lightbox -->
        <link rel="stylesheet" href="css/magnific-popup.css" />

        <!-- Google Web fonts -->
        <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
        <link href='https://fonts.googleapis.com/css?family=Suranna' rel='stylesheet' type='text/css'>
        <link href='https://fonts.googleapis.com/css?family=Montez' rel='stylesheet' type='text/css'>

        <!-- Font icons -->
        <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css"/><!-- Font awesome icons -->
    </head>

    <body>

<?php include("inc/header_sr.php"); ?>

        <!-- .page-content start -->
        <div class="page-content custom-img-background dark page-title page-title-4 mb-100">
            <div class="container">
                <!-- .row start -->
                <div class="row">
                    <!-- .col-md-12 start -->
                    <div class="col-md-12 centered">
                        <div class="custom-heading style-1 triggerAnimation animated" data-animate='fadeInUp'>
                            <h1><span>Galerija</span></h1>
                            <h1>Pogledajte</h1>
                        </div><!-- .custom-heading.style-1 end -->
                    </div><!-- .col-md-12 end -->
                </div><!-- .row end -->
            </div><!-- .container end -->
        </div><!-- .page-content end -->

        <!-- .page-content start -->
        <div class="page-content">
            <!-- .container start -->
            <div class="container">
                <!-- .row start -->
                <div class="row Galerija-filters">
                    <div class="col-md-12 mb-20 centered triggerAnimation animated" data-animate='fadeIn'>
                        <div class="custom-heading style-1">
                            <h3><span>Luxury Event</span></h3>
                            <h3>Galerija</h3>

                            <!-- .divider.style-1 start -->
                            <div class="divider style-1 center">
                                <span class="hr-simple left"></span>
                                <i class="fa fa-circle hr-icon"></i>
                                <span class="hr-simple right"></span>
                            </div>
                        </div><!-- .custom-heading.style-1 end -->
                        <ul id="filters">
                            
                        </ul>
                    </div><!-- .col-md-12 end -->                    
                </div><!-- .row.Galerija-filters end -->
            </div><!-- .container end -->
        </div><!-- .page-content end -->

        <div class="page-content">
            <div class="container-fluid">
                <div class="row">
                    <ul id="Galerijaitems" class="isotope isotopeitems-full">
<?php
if (isset($_GET['page_no']) && $_GET['page_no']!="") {
$page_no = $_GET['page_no'];
} else {
	$page_no = 1;
	}

$gallery_images_dir = "uploads/gallery/";

$total_records_per_page = 20;
$offset = ($page_no-1) * $total_records_per_page;
$previous_page = $page_no - 1;
$next_page = $page_no + 1;
$adjacents = "2"; 

$result_count = mysqli_query($leld,"SELECT COUNT(*) As total_records FROM `le_gallery_category`");
$total_records = mysqli_fetch_array($result_count);
$total_records = $total_records['total_records'];
$total_no_of_pages = ceil($total_records / $total_records_per_page);
$second_last = $total_no_of_pages - 1; // total page minus 1

$result_gallery = mysqli_query($leld,"SELECT * FROM le_gallery_category as c LEFT JOIN le_gallery_photos as p ON c.category_id = p.legcid group by c.category_id LIMIT $offset, $total_records_per_page");

?>
<?php while($row_gallery = mysqli_fetch_assoc($result_gallery)) { ?>
                        <li class="col-xs-6 col-md-3 isotope-item outdoor">
                            <figure class="gallery-item-container">
                                <div class="gallery-img">
                                    <img src="<?php echo $gallery_images_dir ?>tb_<?php echo $row_gallery['slika']; ?>" alt="Luxury Event Catering Tivat"/>
									
                                    <div class="hover-mask-container">
                                        <div class="hover-zoom">
											<a href="galerija.php?cid=<?php echo $row_gallery['category_id']; ?>" class=" fa fa-link" title="<?php echo $row_gallery['category_name']; ?>"></a>
                                        </div><!-- .hover-zoom end -->
                                    </div><!-- .hover-mask-container end -->
									<span></span>
									
                                </div><!-- .gallery-img end -->
                            </figure><!-- .gallery-item-container end -->
                        </li><!-- .isotope-item end -->
<?php } ?>
                    </ul><!-- #galleryitems.isotope end -->
                </div><!-- .row end -->
            </div><!-- .container-fluid end -->
        </div><!-- .page-content end -->

<?php include("inc/footer_sr.php"); ?>

<?php include("inc/copyright_sr.php"); ?>

        <script src="js/jquery-2.1.4.min.js"></script><!-- jQuery library -->
        <script src="js/bootstrap.min.js"></script><!-- .bootstrap script -->
        <script src="js/jquery.scripts.min.js"></script><!-- modernizr, retina, stellar for parallax -->  
        <script src="js/gallery.js"></script><!-- for gallery -->
        <script src="js/jquery.dlmenu.min.js"></script><!-- for responsive menu -->
        <script src="js/include.js"></script><!-- custom js functions -->
        <script src="js/jquery.isotope.min.js"></script><!-- jQuery isotope plugin -->
        <script src="js/jquery.magnific-popup.min.js"></script><!-- used for image lightbox -->
        <script src="js/TweenMax.min.js"></script> <!-- Plugin for smooth scrolling-->
        <script src="js/ScrollToPlugin.min.js"></script> <!-- Plugin for smooth scrolling-->

        <script>
            /* <![CDATA[ */
            jQuery(document).ready(function ($) {
                'use strict';

                


            });
            /* ]]> */
        </script>

    </body>
</html>
