<?php include_once 'includes/dbsmain.inc.php'; ?>
<?php include_once 'site-main-query.php'; ?>
<?php redirectTohttps();?>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">

<meta name="author" content="<?=$compDATA['admin_company_name']?>">
<base href="<?=siteUrl()?>/">
<link rel="canonical" href="<?=source()?>" />
<!-- Primary Meta Tags -->
<title><?=metaTitle()?></title>
<meta name="description" content="<?=metaDescription()?>">
<meta name="keywords" content="<?=metaKeywords()?>">

<?php if(pageName() == "category"){
$schema = json_decode(productInfo($_REQUEST['cat_name']),true);?>
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="<?=source()?>">
<meta property="og:title" content="<?=$schema['title']?>">
<meta property="og:description" content="<?=$schema['desc']?>">
<meta property="og:image" content="<?=showImage($schema['image'],"uploaded_files")?>">

<!-- Twitter -->
<meta property="twitter:card" content="<?=$schema['name']?>">
<meta property="twitter:url" content="<?=source()?>">
<meta property="twitter:title" content="<?=$schema['title']?>">
<meta property="twitter:description" content="<?=$schema['desc']?>">
<meta property="twitter:image" content="<?=showImage($schema['image'],"uploaded_files")?>">

<?php }?>

<?php if(!empty($compDATA['analytic'])){?> <?=$compDATA['analytic']?> <?php }?>

<?php if(!empty($compDATA['admin_favicon'])){?>
<link rel="apple-touch-icon" sizes="57x57" href="<?=$compDATA['admin_favicon']?>">
<link rel="apple-touch-icon" sizes="60x60" href="<?=$compDATA['admin_favicon']?>">
<link rel="apple-touch-icon" sizes="72x72" href="<?=$compDATA['admin_favicon']?>">
<link rel="apple-touch-icon" sizes="76x76" href="<?=$compDATA['admin_favicon']?>">
<link rel="apple-touch-icon" sizes="114x114" href="<?=$compDATA['admin_favicon']?>">
<link rel="apple-touch-icon" sizes="120x120" href="<?=$compDATA['admin_favicon']?>">
<link rel="apple-touch-icon" sizes="144x144" href="<?=$compDATA['admin_favicon']?>">
<link rel="apple-touch-icon" sizes="152x152" href="<?=$compDATA['admin_favicon']?>">
<link rel="apple-touch-icon" sizes="180x180" href="<?=$compDATA['admin_favicon']?>">
<link rel="icon" type="image/png" sizes="192x192" href="<?=$compDATA['admin_favicon']?>">
<link rel="icon" type="image/png" sizes="32x32" href="<?=$compDATA['admin_favicon']?>">
<link rel="icon" type="image/png" sizes="96x96" href="<?=$compDATA['admin_favicon']?>">
<link rel="icon" type="image/png" sizes="16x16" href="<?=$compDATA['admin_favicon']?>">
<?php }?>
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">

<!-- Stylesheets -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.css">
<link href="assets/css/style.css" rel="stylesheet">
<link href="assets/css/responsive.css" rel="stylesheet">
<!-- Responsive -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
</head>

<body>

<div class="page-wrapper">

<!-- Preloader -->
<!--<div class="preloader"></div>-->

<!-- Main Header-->
<header class="main-header header-style-one">
<!-- Header Top -->
<div class="header-top">
    <div class="container">
        <div class="inner-container">

<div class="top-left">
<!-- Info List -->
<ul class="list-style-one">
<li><i class="fa fa-envelope"></i>  <a href="mailto:<?=$compDATA['admin_email']?>" title="Mail Us" ><?=$compDATA['admin_email']?></a></li>
<li><i class="fa fa-map-marker" ></i> <?=$compDATA['admin_address']?> <?=$compDATA['admin_city']?> <?=$compDATA['admin_state']?> <?=$compDATA['admin_country']?> - <?=$compDATA['admin_zip_code']?></li>
</ul>
</div>
<div class="">
<ul class="social-icon-one">
<?php if(!empty($compDATA['admin_facebook_link'])){?> 
 <li><a href="<?=$compDATA['admin_facebook_link']?>" title='Puneet Immigration Facebook'><span class="fab fa-facebook-square"></span></a></li>
<?php }?>
<?php if(!empty($compDATA['admin_twitter_link'])){?>
 <li><a href="<?=$compDATA['admin_twitter_link']?>" title='Puneet Immigration twitter'><span class="fab fa-twitter"></span></a></li>
<?php }?>
<?php if(!empty($compDATA['admin_linkedin_link'])){?>
 <li><a href="<?=$compDATA['admin_linkedin_link']?>" title='Puneet Immigration linkedin'><span class="fab fa-linkedin"></span></a></li>
<?php }?>
<?php if(!empty($compDATA['admin_instagram_link'])){?>
 <li><a href="<?=$compDATA['admin_instagram_link']?>" title='Puneet Immigration instagram'><span class="fab fa-instagram"></span></a></li>
<?php }?>
</ul>
</div>
</div>
    </div>

</div>
<!-- Header Top -->

<!-- Header Lower -->
<div class="header-lower">
    <div class="container-fluid">
        <!-- Main box -->
<div class="main-box">
<div class="logo-box">
<div class="logo"><a href="<?=siteUrl()?>" title='Puneet Immigration logo'><img src="<?=logo()?>" title="<?=$compDATA['admin_company_name']?>" alt="<?=$compDATA['admin_company_name']?>"></a></div>
</div>

<!--Nav Box-->
<div class="nav-outer">
<nav class="nav main-menu">
<ul class="navigation">
    <?php 
    $i = 1;
    $our_service_url = (!empty($_REQUEST['m_location'])) ? $site_url."/our-services/".$_REQUEST['m_location'] : $site_url."/our-services.html";

    $link_sql = db_query("SELECT * FROM tbl_site_pages WHERE site_pages_status='Active' AND site_pages_show_in_header='Yes' AND site_pages_link NOT IN ('sirs', 'nova-scotia-67-point-calculator', 'sinp-calculator', '67-calculator', 'business-investor', 'eoi') ORDER BY site_pages_order_by ASC");

    if (mysqli_num_rows($link_sql) > 0) { 
        while ($link_data = mysqli_fetch_array($link_sql)) { 
            @extract($link_data);

            // Static "Services" menu ek hi baar add karna hai
            if ($i == 3) { ?>
                <li class="dropdown">
                    <a href="javascript:void(0);" title='Puneet Immigration Services'>Services</a>
                    <ul>
                        <?php 
                        // Fetch all main categories
                        $categories = db_query("SELECT * FROM tbl_category WHERE category_status='Active' AND category_parent_id='0' ORDER BY category_order_by");
                        while ($row = mysqli_fetch_array($categories)) { 
                            // Check if sub-categories exist
                            $sub_categories = db_query("SELECT * FROM tbl_category WHERE category_status='Active' AND category_parent_id='{$row['category_id']}' ORDER BY category_order_by");
                            
                            if (mysqli_num_rows($sub_categories) > 0) { ?>
                                <li class="dropdown">
                                    <a href="<?= url($row['category_url']) ?>" title="<?= $row['category_name'] ?>"><?= $row['category_name'] ?></a>
                                    <ul>
                                        <?php while ($service = mysqli_fetch_array($sub_categories)) { ?>
                                            <li><a href="<?= url($service['category_url']) ?>" title="<?= $service['category_name'] ?>"><?= $service['category_name'] ?></a></li>
                                        <?php } ?>
                                    </ul>
                                </li>
                            <?php } else { ?>
                                <li><a href="<?= url($row['category_url']) ?>" title="<?= $row['category_name'] ?>"><?= $row['category_name'] ?></a></li>
                            <?php } 
                        } ?>
                    </ul>
                </li>
                <?php 
            }

            if ($site_pages_link == "index") { ?>
                <li><a href="<?= url($row['category_url']) ?>" title='Puneet Immigration Services'><?= $site_pages_name ?></a></li>
            <?php } else if ($site_pages_link == "calculator") { ?>
                <li class="dropdown"><a href="calculator.html" title='Puneet Immigration Calculators'><?= $site_pages_name ?></a>
                    <ul>
                        <?php 
                        $sub_pages = db_query("SELECT * FROM tbl_site_pages WHERE site_pages_status='Active' AND site_pages_show_in_header='Yes' AND site_pages_link IN ('sirs', 'nova-scotia-67-point-calculator', 'sinp-calculator', '67-calculator', 'business-investor', 'eoi') ORDER BY site_pages_order_by ASC");
                        while ($sub_page = mysqli_fetch_array($sub_pages)) { ?>
                            <li><a href="<?= $sub_page['site_pages_link'] ?>.html" title='Puneet Immigration Services'><?= $sub_page['site_pages_name'] ?></a></li>
                        <?php } ?>
                    </ul>
                </li>
            <?php } else { ?>
                <li><a href="<?= $site_pages_link ?>.html" title='Puneet Immigration Services'><?= $site_pages_name ?></a></li>
            <?php }

            $i++;
        }
    } 
    ?>
</ul>

</nav>
</div>
<!-- Main Menu End-->
<div class="outer-box">
<a href="tel:<?=$compDATA['admin_mobile']?>" title="Call Anytime" class="info-btn">
<i class="icon fa fa-phone"></i>
<small>Call Anytime</small><br> <?=$compDATA['admin_mobile']?>
</a>
<a href="javascript:void(0);" title="Book a consultation" class="bc_btn theme-btn btn-style-one Click-here"><span>Book a consultation</span></a>

<!-- Mobile Nav toggler -->
<div class="mobile-nav-toggler"><span class="icon lnr-icon-bars"></span></div>
</div>
</div>
</div>
<!-- End Header Lower -->
    </div>

<!-- Mobile Menu  -->
<div class="mobile-menu">
<div class="menu-backdrop"></div>

<!--Here Menu Will Come Automatically Via Javascript / Same Menu as in Header-->
<nav class="menu-box">
<div class="upper-box">
<div class="nav-logo"><a href="<?=siteUrl()?>" title='logo' ><img src="<?=logo()?>" title="<?=$compDATA['admin_company_name']?>" alt="<?=$compDATA['admin_company_name']?>"></a></div>
<div class="close-btn"><i class="icon fa fa-times"></i></div>
</div>

<ul class="navigation clearfix">
<!--Keep This Empty / Menu will come through Javascript-->
</ul>
<ul class="contact-list-one">
<li>
<!-- Contact Info Box -->
<div class="contact-info-box">
<i class="icon lnr-icon-phone-handset"></i>
<span class="title">Call Now</span>
<a href="tel:<?=$compDATA['admin_mobile']?>" title='Puneet Immigration Numbers' ><?=$compDATA['admin_mobile']?></a>
</div>
</li>
<li>
<!-- Contact Info Box -->
<div class="contact-info-box">
<span class="icon lnr-icon-envelope1"></span>
<span class="title">Send Email</span>
<a href="mailto:<?=$compDATA['admin_email']?>" title='Puneet Immigration mail' ><?=$compDATA['admin_email']?></a>
</div>
</li>
<li>
<!-- Contact Info Box -->
<!--<div class="contact-info-box">-->
<!--<span class="icon lnr-icon-clock"></span>-->
<!--<span class="title">Send Email</span>-->
<!--Mon - Sat 8:00 - 6:30, Sunday - CLOSED-->
<!--</div>-->
</li>
</ul>


<ul class="social-links">
<?php if(!empty($compDATA['admin_facebook_link'])){?> 
 <li><a href="<?=$compDATA['admin_facebook_link']?> " title='Puneet Immigration Facebook'><i class="fab fa-facebook-f"></i></a></li>
<?php }?> 
<?php if(!empty($compDATA['admin_twitter_link'])){?>
 <li><a href="<?=$compDATA['admin_twitter_link']?>" title='Puneet Immigration Twitter' ><i class="fab fa-twitter"></i></a></li>
<?php }?> 
<?php if(!empty($compDATA['admin_linkedin_link'])){?>
 <li><a href="<?=$compDATA['admin_linkedin_link']?>" title='Puneet Immigration linkedin' ><i class="fab fa-linkedin"></i></a></li>
<?php }?> 
<?php if(!empty($compDATA['admin_instagram_link'])){?>
 <li><a href="<?=$compDATA['admin_instagram_link']?>" title='Puneet Immigration instagram' ><i class="fab fa-instagram"></i></a></li>
<?php }?>
</ul>
</nav>
</div><!-- End Mobile Menu -->

<!-- Sticky Header  -->
<div class="sticky-header">
<div class="auto-container">
<div class="inner-container">
<!--Logo-->
<div class="logo">
<a href="<?=siteUrl()?>" ><img src="<?=logo()?>" title="<?=$compDATA['admin_company_name']?>" alt="<?=$compDATA['admin_company_name']?>"></a>
</div>

<!--Right Col-->
<div class="nav-outer">
<!-- Main Menu -->
<nav class="main-menu">
<div class="navbar-collapse show collapse clearfix">
<ul class="navigation clearfix">
	<!--Keep This Empty / Menu will come through Javascript-->
</ul>
</div>
</nav><!-- Main Menu End-->



<!--Mobile Navigation Toggler-->
<!--<div class="mobile-nav-toggler"><span class="icon lnr-icon-bars"></span></div>-->
</div>
<div class="outer-box">
<a href="tel:<?=$compDATA['admin_mobile']?>" class="info-btn">
<i class="icon fa fa-phone"></i>
<small>Call Anytime</small><br> <?=$compDATA['admin_mobile']?>
</a>
<a href="javascript:void(0);"  class="bc_btn theme-btn btn-style-one Click-here">    <span>Book a consultation</span></a>

<!-- Mobile Nav toggler -->
<div class="mobile-nav-toggler"><span class="icon lnr-icon-bars"></span></div>
</div>
</div>
</div>
</div><!-- End Sticky Menu -->
</header>
<!--End Main Header -->