        <?php
       include("../db.php");
        if(isset($_GET['main'])){
        	$_SESSION['mains'] = $_SESSION['cats'] = ""	;
		         $a=$_GET['main'];
		         $_SESSION['mains']=$a;
		         $main=$_SESSION['mains'];

        }
           if(isset($_GET['cat'])){

		         $b=$_GET['cat'];        	
        		   $_SESSION['cats']=$b;
        		   $cat=$_SESSION['cats'];
        } 

        ?>
        <div id="layoutSidenav">
            <div id="layoutSidenav_nav">
                <nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
                    <div class="sb-sidenav-menu">
                        <div class="nav">
                            <a class="nav-link" href="index.php">
								<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
                                Dashboard
							</a>
                           <!--   <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseLayouts" aria-expanded="false" aria-controls="collapseLayouts">
								<div class="sb-nav-link-icon"><i class="fas fa-newspaper"></i></div>
                                Posts
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
							</a>
                            <div class="collapse" id="collapseLayouts" aria-labelledby="headingOne" data-parent="#sidenavAccordion">
                                <nav class="sb-sidenav-menu-nested nav">
									<a class="nav-link sub_nav_link" href="posts.html">All Posts</a>
									<a class="nav-link sub_nav_link" href="add_post.html">Add New</a>
									<a class="nav-link sub_nav_link" href="post_categories.html">Categories</a>
									<a class="nav-link sub_nav_link" href="post_tags.html">Tags</a>
								</nav>
                            </div>	 -->

<!-- 							<a class="nav-link collapsed <?php if(isset($main)){ if($main =='3'){ echo 'active'; } } ?>" href="#" data-toggle="collapse" data-target="#collapseLocations" aria-expanded="false" aria-controls="collapseLocations">
								<div class="sb-nav-link-icon"><i class="fas fa-map-marker-alt"></i></div>
                                Locations
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
							</a>
                            <div class="collapse <?php if($main =='3'){ echo "show"; } ?>" id="collapseLocations" aria-labelledby="headingTwo" data-parent="#sidenavAccordion">
                                <nav class="sb-sidenav-menu-nested nav">
									<a class="nav-link sub_nav_link <?php if(isset($main)){ if($main =='3' && $cat =='1'){ echo "active"; } } ?>" href="locations.php?main=3&cat=1">All Locations</a>
									<a class="nav-link sub_nav_link <?php if(isset($main)){ if($main =='3' && $cat =='2'){ echo "active"; } } ?>" href="add_location.php?main=3&cat=2">Add Location</a>
								</nav>
                            </div>	
 -->
							<!-- <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseAreas" aria-expanded="false" aria-controls="collapseAreas">
								<div class="sb-nav-link-icon"><i class="fas fa-map-marked-alt"></i></div>
                                Areas
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
							</a>
                            <div class="collapse" id="collapseAreas" aria-labelledby="headingTwo" data-parent="#sidenavAccordion">
                                <nav class="sb-sidenav-menu-nested nav">
									<a class="nav-link sub_nav_link" href="areas.html">All Areas</a>
									<a class="nav-link sub_nav_link" href="add_area.html">Add Area</a>
								</nav>
                            </div>
 -->

						<a class="nav-link collapsed <?php if(isset($main)){ if($main =='5'){ echo 'active'; } } ?>" href="#" data-toggle="collapse" data-target="#collapseCategories" aria-expanded="true" aria-controls="collapseCategories">
								<div class="sb-nav-link-icon"><i class="fas fa-list"></i></div>
                                Categories
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
								</a>

								<div class="collapse <?php if($main =='5'){ echo "show"; } ?>" id="collapseCategories" aria-labelledby="headingTwo" data-parent="#sidenavAccordion" style="">
                                <nav class="sb-sidenav-menu-nested nav">
									<a class="nav-link sub_nav_link <?php if(isset($main)){ if($main =='5' && $cat =='1'){ echo "active"; } } ?>" href="category.php?main=5&cat=1">All Categories</a>
									<a class="nav-link sub_nav_link <?php if(isset($main)){ if($main =='5' && $cat =='2'){ echo "active"; } } ?>" href="add_category.php?main=5&cat=2">Add Category</a>
								</nav>
                            </div>

						<!-- 	<a class="nav-link collapsed <?php if(isset($main)){ if($main =='2'){ echo 'active'; } } ?>" href="#" data-toggle="collapse" data-target="#collapseShops" aria-expanded="true" aria-controls="collapseShops">
								<div class="sb-nav-link-icon"><i class="fas fa-store"></i></div>
                                Pin request
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
							</a>
                            <div class="collapse <?php if($main =='2'){ echo "show"; } ?>" id="collapseShops" aria-labelledby="headingTwo" data-parent="#sidenavAccordion">
                                <nav class="sb-sidenav-menu-nested nav">
									<a class="nav-link sub_nav_link <?php if(isset($main)){ if($main =='2' && $cat =='1'){ echo "active"; } } ?>" href="PV-refund.php?main=2&cat=1"> Pin request</a>
									<a class="nav-link sub_nav_link <?php if(isset($main)){ if($main =='2' && $cat =='2'){ echo "active"; } } ?>" href="PV_transfer_list.php?main=2&cat=2">Income </a>
								</nav>
                            </div> -->

							<!-- <a class="nav-link collapsed  <?php if(isset($main)){ if($main =='7'){ echo 'active'; } } ?>" href="#" data-toggle="collapse" data-target="#collapseProducts" aria-expanded="true" aria-controls="collapseProducts">
								<div class="sb-nav-link-icon"><i class="fas fa-box"></i></div>
                                Products
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
							</a>
                            <div class="collapse  <?php if(isset($main)){ if($main =='7'){ echo 'show'; } } ?>" id="collapseProducts" aria-labelledby="headingTwo" data-parent="#sidenavAccordion">
                                <nav class="sb-sidenav-menu-nested nav">
                                	<a class="nav-link sub_nav_link" <?php if(isset($main)){ if($main =='7' && $cat =='1'){ echo "active"; } } ?> href="products.php?main=7&cat=1">All Products</a>
									<a class="nav-link sub_nav_link" <?php if(isset($main)){ if($main =='7' && $cat =='2'){ echo "active"; } } ?> href="add_product.php?main=7&cat=2">Add Product</a>

								</nav>
                            </div> -->
                       <!--     <a class="nav-link collapsed  <?php if(isset($main)){ if($main =='8'){ echo 'active'; } } ?>" href="#" data-toggle="collapse" data-target="#collapseoffer" aria-expanded="true" aria-controls="collapseoffer">
								<div class="sb-nav-link-icon"><i class="fas fa-gift"></i></div>
                                Slider
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
							</a>
                            <div class="collapse  <?php if(isset($main)){ if($main =='8'){ echo 'show'; } } ?>" id="collapseoffer" aria-labelledby="headingTwo" data-parent="#sidenavAccordion">
                                <nav class="sb-sidenav-menu-nested nav">
                                	<a class="nav-link sub_nav_link" <?php if(isset($main)){ if($main =='8' && $cat =='1'){ echo "active"; } } ?> href="offers.php?main=8&cat=1">All Offers</a>
									<a class="nav-link sub_nav_link" <?php if(isset($main)){ if($main =='8' && $cat =='2'){ echo "active"; } } ?> href="add_offer.php?main=8&cat=2">Add Offers</a>

								</nav>
                            </div>  -->
							<a class="nav-link collapsed  <?php if(isset($main)){ if($main =='7'){ echo 'active'; } } ?>" href="#" data-toggle="collapse" data-target="#collapseProducts" aria-expanded="true" aria-controls="collapseProducts">
								<div class="sb-nav-link-icon"><i class="fas fa-box"></i></div>
                                Products
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
							</a>
                            <div class="collapse  <?php if(isset($main)){ if($main =='7'){ echo 'show'; } } ?>" id="collapseProducts" aria-labelledby="headingTwo" data-parent="#sidenavAccordion">
                                <nav class="sb-sidenav-menu-nested nav">
                                	<a class="nav-link sub_nav_link" <?php if(isset($main)){ if($main =='7' && $cat =='1'){ echo "active"; } } ?> href="products.php?main=7&cat=1">All Products</a>
									<a class="nav-link sub_nav_link" <?php if(isset($main)){ if($main =='7' && $cat =='2'){ echo "active"; } } ?> href="add_product.php?main=7&cat=2">Add Product</a>

								</nav>
                            </div>
                            <a class="nav-link collapsed  <?php if(isset($main)){ if($main =='8'){ echo 'active'; } } ?>" href="#" data-toggle="collapse" data-target="#collapseoffer" aria-expanded="true" aria-controls="collapseoffer">
								<div class="sb-nav-link-icon"><i class="fas fa-gift"></i></div>
                                Offers
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
							</a>
                            <div class="collapse  <?php if(isset($main)){ if($main =='8'){ echo 'show'; } } ?>" id="collapseoffer" aria-labelledby="headingTwo" data-parent="#sidenavAccordion">
                                <nav class="sb-sidenav-menu-nested nav">
                                	<a class="nav-link sub_nav_link" <?php if(isset($main)){ if($main =='8' && $cat =='1'){ echo "active"; } } ?> href="offers.php?main=8&cat=1">All Offers</a>
									<a class="nav-link sub_nav_link" <?php if(isset($main)){ if($main =='8' && $cat =='2'){ echo "active"; } } ?> href="add_offer.php?main=8&cat=2">Add Offers</a>

								</nav>
                            </div>
                                  <a class="nav-link collapsed  <?php if(isset($main)){ if($main =='10'){ echo 'active'; } } ?>" href="#" data-toggle="collapse" data-target="#collapseoffers" aria-expanded="true" aria-controls="collapseoffers">
								<div class="sb-nav-link-icon"><i class="fas fa-cart-arrow-down"></i></div>
                                Orders
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
							</a>
                            <div class="collapse  <?php if(isset($main)){ if($main =='10'){ echo 'show'; } } ?>" id="collapseoffers" aria-labelledby="headingTwo" data-parent="#sidenavAccordion">
                                <nav class="sb-sidenav-menu-nested nav">
                                	<a class="nav-link sub_nav_link" <?php if(isset($main)){ if($main =='10' && $cat =='1'){ echo "active"; } } ?> href="orders.php?main=10&cat=1">All Orders</a>
									<a class="nav-link sub_nav_link" <?php if(isset($main)){ if($main =='10' && $cat =='2'){ echo "active"; } } ?> href="add_offer.php?main=10&cat=2">Complete Orders</a>

								</nav>
                            </div> 
							<!-- <a class="nav-link" href="orders.php">
								<div class="sb-nav-link-icon"><i class="fas fa-cart-arrow-down"></i></div>
                                Orders
							</a> -->
							<a class="nav-link" href="customers.php">
								<div class="sb-nav-link-icon"><i class="fas fa-users"></i></div>
                                Contact enquiry
							</a>
							<!-- <a class="nav-link" href="offers.html">
								<div class="sb-nav-link-icon"><i class="fas fa-gift"></i></div>
                                Offers
							</a> -->
							
                            <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseWidthdraw" aria-expanded="false" aria-controls="collapseWidthdraw">
                                <div class="sb-nav-link-icon"><i class="fas fa-cog"></i></div>
                                Widthdraw
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
                            </a>
                            <div class="collapse" id="collapseWidthdraw" aria-labelledby="headingTwo" data-parent="#sidenavAccordion">
                                <nav class="sb-sidenav-menu-nested nav">
                                    <a class="nav-link sub_nav_link" href="widthdraw-request.php">Request</a>
                                    <a class="nav-link sub_nav_link" href="widthdraw-history.php">History</a>
                                </nav>
                            </div>
                          	<a class="nav-link collapsed <?php if(isset($main)){ if($main =='9'){ echo 'active'; } } ?>" href="#" data-toggle="collapse" data-target="#collapseSettings" aria-expanded="false" aria-controls="collapseSettings">
								<div class="sb-nav-link-icon"><i class="fas fa-cog"></i></div>
                                Slider Products
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
							</a>
                            <div class="collapse <?php if(isset($main)){ if($main =='9'){ echo 'show'; } } ?>" id="collapseSettings" aria-labelledby="headingTwo" data-parent="#sidenavAccordion">
                                <nav class="sb-sidenav-menu-nested nav">
									
                                    <a class="nav-link sub_nav_link" <?php if(isset($main)){ if($main =='9' && $cat =='1'){ echo "active"; } } ?> href="slider_select.php?main=9&cat=1">Select Products</a>
								</nav>
                            </div>
							<!-- <a class="nav-link" href="reports.html">
								<div class="sb-nav-link-icon"><i class="fas fa-chart-bar"></i></div>
                                Reports
							</a> -->
                        </div>
                    </div>
                </nav>
            </div>