<?php
include('veza/le.php');
require('xwaf.php'); // Before all your code starts.
$xWAF = new xWAF();
$xWAF->start();

$colname_content_cat = $_GET['content_cat'];
$query_content_cat = "SELECT * FROM le_menu_category_sr WHERE menu_cat_id = '".$colname_content_cat."'";
$content_cat = mysqli_query($leld,$query_content_cat);
$row_content_cat = mysqli_fetch_assoc($content_cat);
$totalRows_content_cat = mysqli_num_rows($content_cat);

$colname_content_sub = $_GET['content_sub'];
$query_content_sub = "SELECT * FROM le_menu_subcat_sr WHERE menu_subcat_id = '".$colname_content_sub."'";
$content_sub = mysqli_query($leld,$query_content_sub);
$row_content_sub = mysqli_fetch_assoc($content_sub);
$totalRows_content_sub = mysqli_num_rows($content_sub);

$colname_content_cat = $_GET['content_cat'];
$colname_content_sub = $_GET['content_sub'];
$query_menu_content = "SELECT * FROM le_menu_content_sr WHERE content_cat = '".$colname_content_cat."' and content_sub = '".$colname_content_sub."'";
$menu_content = mysqli_query($leld,$query_menu_content);
$totalRows_menu_content = mysqli_num_rows($menu_content);
?>
<!DOCTYPE html>

<html>
    <head>
        <meta charset="utf-8">
        <title>Luxury Event Catering Tivat - Menu - <?php echo $row_content_cat['menu_cat_name']; ?> - <?php echo $row_content_sub['menu_subcat_name']; ?></title>
        <meta name="description" content="Luxury Event Catering Tivat MONTENEGRO - ">
		<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 -->

        <!-- 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>Luxury Event</span></h1>
                            <h1><?php echo $row_content_cat['menu_cat_name']; ?></h1>
                        </div><!-- .custom-heading.style-1 end -->
                    </div><!-- .col-md-12 end -->
                </div><!-- .row end -->
            </div><!-- .container end -->
        </div><!-- .page-content end -->
<?php

$query_menu_show = "SELECT * FROM le_menu_content_sr as c left join le_menu_subcat_sr as s on c.content_sub = s.menu_subcat_id WHERE c.content_cat = '".$colname_content_cat."' and c.content_sub = '".$colname_content_sub."' and c.content_active = 'y' group by s.menu_subcat_id";
$menu_show = mysqli_query($leld,$query_menu_show);
$row_menu_show = mysqli_fetch_assoc($menu_show);
$totalRows_menu_show = mysqli_num_rows($menu_show);
?>
<?php if ($row_menu_show['menu_subcat_total'] == '0') { ?>
        <!-- .page-content start -->
        <div class="page-content">
            <div class="container">
                <!-- .row start -->
                <div class="row mb-40">
                    <!-- .col-md-12 start -->
                    <div class="col-md-12 centered mb-0">
                        <div class="custom-heading style-1">
                            <h3><span>Meni</span></h3>
                            <h3><?php echo $row_content_sub['menu_subcat_name']; ?></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 -->
                    </div><!-- .col-md-12 end -->
                    <!-- .col-md-12 start -->
                    <div class="col-md-12 centered mb-0">
                        <p>Bon appetit!</p>
                    </div><!-- .col-md-12 end -->
                </div><!-- .row end -->
                <!-- .row start -->
                <div class="row">
                    <!-- .col-md-6 start -->
                    <div class="col-md-12 triggerAnimation animated" data-animate='fadeIn'>
                        <div class="custom-heading style-2">
                            <h4>cena po komadu</h4>
                            <div class="divider style-1">
                                <i class="fa fa-circle hr-icon left"></i>
                                <span class="hr-simple right"></span>
                            </div>
                        </div><!-- .custom-heading.style-2 end -->
                        <ul class="menu-style-1">
<?php while($row_content = mysqli_fetch_assoc($menu_content)) { ?>
                            <li class="menu-item">
                                <div class="menu-item-thumbnail">
<?php
$colname_sub_photo = $_GET['content_sub'];
$query_sub_photo = "SELECT * FROM le_menu_subcat_photo WHERE lemsubcatid = '".$colname_content_sub."'";
$sub_photo = mysqli_query($leld,$query_sub_photo);
$row_sub_photo = mysqli_fetch_assoc($sub_photo);
$totalRows_sub_photo = mysqli_num_rows($sub_photo);
$sub_photo_images_dir =  "uploads/menu/subcat/";
?>

								</div>
                                <div class="menu-item-description">
                                    <h5><?php echo $row_content['content']; ?></h5>
                                    <p> </p>
                                </div>
                                <div class="menu-item-price">
                                    <p>&euro;&nbsp;<?php echo $row_content['content_price']; ?></p>
                                </div>
                            </li>
<?php } ?>
                        </ul>
                    </div><!-- .col-md-6 end -->
                    
                </div><!-- .row end -->
<?php include("inc/pdf.php"); ?>
            </div><!-- .container end -->
        </div><!-- .page-content end -->
<?php } else { ?>
        <!-- .page-content start -->
        <div class="page-content">
            <div class="container">
                <!-- .row start -->
                <div class="row">
                    <div class="col-md-12 centered clearfix">
                        <div class="custom-heading style-1">
                            <h3><span>Meni</span></h3>
                            <h3><?php echo $row_content_sub['menu_subcat_name']; ?></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 -->
                        

                        <!-- .tabs-content-wrap start -->
                        <div class="tab-content-wrap">
                            <!-- #tab1 content start -->
                            <div id="tab1" class="tab-content">

                                <ul class="tab-menu-price">
                                    <li class="menu-thumbnail">
<?php
$colname_sub_photo = $_GET['content_sub'];
$query_sub_photo = "SELECT * FROM le_menu_subcat_photo WHERE lemsubcatid = '".$colname_sub_photo."'";
$sub_photo = mysqli_query($leld,$query_sub_photo);
$row_sub_photo = mysqli_fetch_assoc($sub_photo);
$totalRows_sub_photo = mysqli_num_rows($sub_photo);
$sub_photo_images_dir =  "uploads/menu/subcat/";
?>
<?php if ($row_sub_photo['photo_id'] == '') { ?>
								<img src="<?php echo $sub_photo_images_dir ?>default.jpg" alt="Luxury Event Catering Tivat" />
<?php } else { ?>
								<img src="<?php echo $sub_photo_images_dir ?>tb_<?php echo $row_sub_photo['slika']; ?>" alt="Luxury Event Catering Tivat" />
<?php } ?>
                                    </li>
                                    <li class="menu-price">
                                        <p>&euro;&nbsp;<?php $final_price = $row_menu_show['menu_subcat_total']; echo number_format($final_price); ?></p>
                                    </li>
                                </ul>
                                <div class="custom-heading style-1">
                                    <h4></h4>

                                    <!-- .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 -->
                                <p>
                                    <span>(Cena je po osobi.)</span>
                                </p>
								<ul>
<?php while($row_content = mysqli_fetch_assoc($menu_content)) { ?>
                                    <li><strong><?php echo $row_content['content']; ?></strong></li>
<?php } ?>
								</ul>
                                
                            </div><!-- #tab1 content end -->

                            
                        </div><!-- .tab-content-wrap end -->
                    </div><!-- .col-md-12 end -->
                </div><!-- .row end -->
<?php include("inc/pdf.php"); ?>
            </div><!-- .container end -->
        </div><!-- .page-content end -->
<?php } ?>
        



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

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

            <a href="#" class="scroll-up"><i class="fa fa-angle-double-up"></i></a>

        </div><!-- .copyright-container end -->

        <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="masterslider/jquery.easing.min.js"></script><!-- Master slider easing js -->
        <script src="js/jquery.dlmenu.min.js"></script><!-- for responsive menu -->
        <script src="js/include.js"></script><!-- custom js functions -->
        <script src="js/TweenMax.min.js"></script> <!-- Plugin for smooth scrolling-->
        <script src="js/ScrollToPlugin.min.js"></script> <!-- Plugin for smooth scrolling-->

        
    </body>
</html>
