     <?php
      include('include/settings.php');
       $notification_query = "";
    $notification_query .= " SELECT cbi_call_schedule.* FROM cbi_call_schedule JOIN rishta_leadmaster ON cbi_call_schedule.lead_id = rishta_leadmaster.lead_id   ";
    $notification_query .= " WHERE cbi_call_schedule.call_scheduling = '" . date('Y-m-d') . "' AND cbi_call_schedule.call_time_scheduling >= '" . date('H:i:00') . "' ";
    $notification_query .= " AND (rishta_leadmaster.lead_allocated_to = ".$_SESSION['userId']." OR rishta_leadmaster.lead_added_by = ".$_SESSION['userId'].") ";
    $notification_query .= " ORDER BY cbi_call_schedule.id DESC ";

    $notificationObj = $mysqli->prepare($notification_query);
    $notificationObj->execute();
    $notificationData = $notificationObj->get_result();
    ?>
<body class="hold-transition light-skin sidebar-mini theme-primary fixed sidebar-collapse">
	
<div class="wrapper">
	<div id="loader"></div>

  <header class="main-header">
	<div class="d-flex align-items-center logo-box justify-content-start d-md-none d-block">	
		<!-- Logo -->
		<a href="index.php" class="logo">
		  <!-- logo-->
		  <!--div class="logo-mini w-30">
			  <span class="light-logo"><img src="../../images/favi.png" alt="logo"></span>
			  <span class="dark-logo"><img src="../../images/logo-letter.png" alt="logo"></span>
		  </div-->
		  <div class="logo-lg">
			  <span class="light-logo"><img src="../../images/favi.png" alt="logo"></span>
			  <span class="dark-logo"><img src="../../images/logo-letter.jpg" alt="logo"></span>
		  </div>
		</a>	
	</div>   
    <!-- Header Navbar -->
    <nav class="navbar navbar-static-top">
      <!-- Sidebar toggle button-->
	  <div class="app-menu">
		<ul class="header-megamenu nav">
			<li class="btn-group nav-item">
				<a href="#" class="waves-effect waves-light nav-link push-btn btn-primary-light" data-toggle="push-menu" role="button">
					<i class="icon-Menu"><span class="path1"></span><span class="path2"></span></i>
			    </a>
			</li>
			<!--li class="btn-group d-lg-inline-flex d-none">
				<div class="app-menu">
					<div class="search-bx mx-5">
						<form>
							<div class="input-group">
							  <input type="search" class="form-control" placeholder="Search">
							  <div class="input-group-append">
								<button class="btn" type="submit" id="button-addon3"><i class="icon-Search"><span class="path1"></span><span class="path2"></span></i></button>
							  </div>
							</div>
						</form>
					</div>
				</div>
			</li-->
		</ul> 
	  </div>
		
      <div class="navbar-custom-menu r-side">
        <ul class="nav navbar-nav">
			<li class="dropdown notifications-menu btn-group nav-item">
				<a href="call-scheduling.php" class="waves-effect waves-light nav-link btn-primary-light svg-bt-icon" data-bs-toggle="dropdown" title="Notifications">
				    <?php
    if ($_SESSION["userType"] == "sales") {
        $admin_name = "Sales Admin";
    } else if ($_SESSION["userType"] == "sales_exec") {
        $admin_name = "Sales Executive";
    } else {
        $admin_name = "";
    }
    ?>

     
					<i class="icon-Notifications"><span class="path1"><?php echo mysqli_num_rows($notificationData); ?></span><span class="path2"></span></i>
					<div class="pulse-wave"></div>
			    </a>
				<!--ul class="dropdown-menu animated bounceIn">
				  <li class="header">
					<div class="p-20">
						<div class="flexbox">
							<div>
								<h4 class="mb-0 mt-0">Notifications</h4>
							</div>
							<div>
								<a href="#" class="text-danger">Clear All</a>
							</div>
						</div>
					</div>
				  </li>
				  <li>
					<!-- inner menu: contains the actual data -->
					<!--ul class="menu sm-scrol">
					  <li>
						<a href="#">
						  <i class="fa fa-users text-info"></i> Curabitur id eros quis nunc suscipit blandit.
						</a>
					  </li>
					  <li>
						<a href="#">
						  <i class="fa fa-warning text-warning"></i> Duis malesuada justo eu sapien elementum, in semper diam posuere.
						</a>
					  </li>
					  <li>
						<a href="#">
						  <i class="fa fa-users text-danger"></i> Donec at nisi sit amet tortor commodo porttitor pretium a erat.
						</a>
					  </li>
					  <li>
						<a href="#">
						  <i class="fa fa-shopping-cart text-success"></i> In gravida mauris et nisi
						</a>
					  </li>
					  <li>
						<a href="#">
						  <i class="fa fa-user text-danger"></i> Praesent eu lacus in libero dictum fermentum.
						</a>
					  </li>
					  <li>
						<a href="#">
						  <i class="fa fa-user text-primary"></i> Nunc fringilla lorem 
						</a>
					  </li>
					  <li>
						<a href="#">
						  <i class="fa fa-user text-success"></i> Nullam euismod dolor ut quam interdum, at scelerisque ipsum imperdiet.
						</a>
					  </li>
					</ul>
				  </li-->
				  <!--li class="footer">
					  <a href="#">View all</a>
				  </li>
				</ul -->
			</li>
			<!--li class="btn-group nav-item">
				<a href="mailbox.php" class="waves-effect waves-light nav-link btn-primary-light svg-bt-icon" title="">
					<i class="icon-Mailbox"><span class="path1"></span><span class="path2"></span></i>
			    </a>
			</li>
			<li class="btn-group nav-item d-xl-inline-flex d-none">
				<a href="#" class="waves-effect waves-light nav-link btn-primary-light svg-bt-icon" title="" data-bs-toggle="modal" data-bs-target="#quick_panel_toggle">
					<i class="icon-Notification"><span class="path1"></span><span class="path2"></span></i>
			    </a>
			</li>
			<li class="btn-group nav-item d-xl-inline-flex d-none">
				<a href="#" class="waves-effect waves-light nav-link btn-primary-light svg-bt-icon" title="" id="live-chat">
					<i class="icon-Chat"><span class="path1"></span><span class="path2"></span></i>
			    </a>
			</li-->
			
			<li class="btn-group nav-item d-xl-inline-flex d-none">
				<a href="#" data-provide="fullscreen" class="waves-effect waves-light nav-link btn-primary-light svg-bt-icon" title="Full Screen">
					<i class="icon-Expand-arrows"><span class="path1"></span><span class="path2"></span></i>
			    </a>
			</li>
			
			<li class="btn-group nav-item">
				<a href="add-new-pipeline.php" class="waves-effect waves-light nav-link bg-primary btn-primary w-auto fs-14" title="Full Screen">
					Performance
			    </a>
			</li>
			
        </ul>
      </div>
    </nav>
  </header>
  <?php include('./include/sidebar.php'); ?>
  