<?php 
session_start(); 

if(!isset($_SESSION['userId'])){ 
  header("location: login");
}elseif(isset($_SESSION['userId'])){ 
  $user_id = $_SESSION['userId'];
}
require_once("class/connectdb.php");
$con = new DbConnect;
$con = $con->connect();

?>
<!DOCTYPE html>
<html>

<head>
    <!-- CSS  -->
	  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
	  <link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
	  <link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
	  <link href="css/main.css" type="text/css" rel="stylesheet" media="screen,projection"/>

    <!--Let browser know website is optimized for mobile-->
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
	  <link href="css/rateit.css" rel="stylesheet" type="text/css">
	  <script src="js/jquery.rateit.js"></script>
	  <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>

</head>
<div class="navbar-fixed">
<nav class="white " >
        <div class="nav-wrapper">
          <div class="row">
			<div class="col s5 offset-s3 " >
				<div id="topbarsearch">
				 <form>
				      <div class="input-field col s4 s12">
					 <input type="text" placeholder="Click here to search" id="autocomplete-input" class="autocomplete " >
				  </div>
				 </form>
				</div>
			</div>
            
			
            <ul class="hide-on-med-and-down right">  
                <li><div class='dropdown-trigger' href='#' data-target='dropdown1'>
			            <span class="valign-wrapper"><img src="images/david.jpg" alt="" height="50" width="30" class="circle responsive-img"> 
						<span class="left-space black-text name"><b>CoolDavies</b></span></span>
			        </div>
				</li>			
                <li><a href="index" class="tooltipped" data-position="bottom" data-tooltip="Businesses"><i class="material-icons black-text">business</i></a></li>
				<li><a href="notifications" class="tooltipped" data-position="bottom" data-tooltip="Notifications"><i class="material-icons black-text">notifications</i></a></li>
				<li><a href="register_business" class="tooltipped" data-position="bottom" data-tooltip="Add Business"><i class="material-icons black-text">add_to_photos</i></a></li>
				<li><a href="my_business" class="tooltipped" data-position="left" data-tooltip="My services"><i class="material-icons black-text">branding_watermark</i></a></li>
            </ul>
			
			<ul id='dropdown1' class='dropdown-content'>
				<li><a href="logout"><span class="black-text">logout</span></a></li>
			</ul>
			 </div> 
        </div>
      </nav> 
</div>



<script>
$(document).ready(function(){
    $('.tooltipped').tooltip();
	$('.dropdown-trigger').dropdown();
 });
  
  

</script>