<header class="header">

				<nav class="navbar navbar-expand-lg header-nav">

					<div class="navbar-header">

						<a id="mobile_btn" href="javascript:void(0);">

							<span class="bar-icon">

								<span></span>

								<span></span>

								<span></span>

							</span>

						</a>

						<a href="#" class="navbar-brand logo">

							<img src="assets/img/eventlogo.jpg" class="img-fluid" alt="Logo">

						</a>

					</div>

					<div class="main-menu-wrapper">

						<div class="menu-header">

							<a href="#" class="menu-logo">

								<img src="assets/img/eventlogo.jpg" class="img-fluid" alt="Logo">

							</a>

							<a id="menu_close" class="menu-close" href="javascript:void(0);">

								<i class="fas fa-times"></i>

							</a>

						</div>

						<ul class="main-nav">

							
							<?php 
							    $sql ="SELECT * FROM main_category WHERE Main_Category_Status = 1";
							    $res = $config->query($sql);
							    while($row = $res->fetch_assoc()){
							        $main_id = $row['Main_Category_id'];
							?>
                            <li class="has-submenu">
								<a href="#"><?= $row['Main_Category_Name'] ?> <i class="fas fa-chevron-down"></i></a>
								<ul class="submenu">
								<?php 
    							    $sub_sql ="SELECT * FROM sub_category WHERE Sub_Category_Status = 1 AND  Main_Category_sub = '$main_id' ";
    							    $sub_res = $config->query($sub_sql);
    							    while($sub_row = $sub_res->fetch_assoc()){
    							?>
									<li><a href="doctor-dashboard.html"><?= $sub_row['Sub_Category_Name'] ?></a></li>
									<?php } ?>
								</ul>
							</li>
							<?php } ?>

							<!--<li class="has-submenu">-->

							<!--	<a href="#">Doctors <i class="fas fa-chevron-down"></i></a>-->

							<!--	<ul class="submenu">-->

							<!--		<li><a href="doctor-dashboard.html">Doctor Dashboard</a></li>-->

							<!--		<li><a href="appointments.html">Appointments</a></li>-->

							<!--		<li><a href="schedule-timings.html">Schedule Timing</a></li>-->

							<!--		<li><a href="my-patients.html">Patients List</a></li>-->

							<!--		<li><a href="patient-profile.html">Patients Profile</a></li>-->

							<!--		<li><a href="chat-doctor.html">Chat</a></li>-->

							<!--		<li><a href="invoices.html">Invoices</a></li>-->

							<!--		<li><a href="doctor-profile-settings.html">Profile Settings</a></li>-->

							<!--		<li><a href="reviews.html">Reviews</a></li>-->

							<!--		<li><a href="doctor-register.html">Doctor Register</a></li>-->

							<!--	</ul>-->

							<!--</li>	-->

							<!--<li class="has-submenu">-->

							<!--	<a href="#">Patients <i class="fas fa-chevron-down"></i></a>-->

							<!--	<ul class="submenu">-->

							<!--		<li><a href="search.html">Search Doctor</a></li>-->

							<!--		<li><a href="#">Doctor Profile</a></li>-->

							<!--		<li><a href="#">Booking</a></li>-->

							<!--		<li><a href="checkout.html">Checkout</a></li>-->

							<!--		<li><a href="booking-success.html">Booking Success</a></li>-->

							<!--		<li><a href="patient-dashboard.html">Patient Dashboard</a></li>-->

							<!--		<li><a href="favourites.html">Favourites</a></li>-->

							<!--		<li><a href="chat.html">Chat</a></li>-->

							<!--		<li><a href="profile-settings.html">Profile Settings</a></li>-->

							<!--		<li><a href="change-password.html">Change Password</a></li>-->

							<!--	</ul>-->

							<!--</li>	-->

							<!--<li class="has-submenu">-->

							<!--	<a href="#">Pages <i class="fas fa-chevron-down"></i></a>-->

							<!--	<ul class="submenu">-->

							<!--		<li><a href="voice-call.html">Voice Call</a></li>-->

							<!--		<li><a href="video-call.html">Video Call</a></li>-->

							<!--		<li><a href="search.html">Search Doctors</a></li>-->

							<!--		<li><a href="calendar.html">Calendar</a></li>-->

							<!--		<li><a href="components.html">Components</a></li>-->

							<!--		<li class="has-submenu">-->

							<!--			<a href="invoices.html">Invoices</a>-->

							<!--			<ul class="submenu">-->

							<!--				<li><a href="invoices.html">Invoices</a></li>-->

							<!--				<li><a href="invoice-view.html">Invoice View</a></li>-->

							<!--			</ul>-->

							<!--		</li>-->

							<!--		<li><a href="blank-page.html">Starter Page</a></li>-->

							<!--		<li><a href="login.html">Login</a></li>-->

							<!--		<li><a href="register.html">Register</a></li>-->

							<!--		<li><a href="forgot-password.html">Forgot Password</a></li>-->

							<!--	</ul>-->

							<!--</li>-->

							<!--<li><a href="admin/index.html" target="_blank">Admin</a></li>-->-->

							<li class="login-link">

								<a href="">Login / Signup</a>

							</li>

						</ul>		 

					</div>		 

					<ul class="nav header-navbar-rht">

						<li class="nav-item contact-item">

							<div class="header-contact-img">

								<i class="far fa-hospital"></i>							

							</div>

							<div class="header-contact-detail">

								<p class="contact-header">Contact</p>

								<p class="contact-info-header"> +91 73050 58866</p>

							</div>

						</li>
                        <?php if(isset($_SESSION['user_id'])){ ?>
						<li class="nav-item">
							<a class="nav-link header-login" href="logout.php"><i class="fas fa-power-off"></i> logout</a>
						</li>
						<?php }else{ ?>
						<li class="nav-item">
						    <a class="nav-link header-login" href="vendor_login.php"><i class="fas fa-lock"></i> login</a>
							<!-- <a class="nav-link header-login" href="loginRegister.php">login / Signup </a> -->
						</li>						
                        <?php } ?>
					</ul>

				</nav>

			</header>