<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Bid Estimation  Software | Admin Panel</title>    
    <link href="css/bootstrap.3.min.css" rel="stylesheet"> 

    <link href="css/sb-admin-2.min.css" rel="stylesheet"> 
    <link href="js/vendor/morrisjs/morris.css" rel="stylesheet">
  
    
    <link href="css/tabby-ui.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css">  
    <link href="css/custom.css" rel="stylesheet"> 
    
    <link href="css/dataTables.bootstrap.min.css" rel="stylesheet">
<!-- DataTables Responsive CSS -->
<link href="css/dataTables.responsive.css" rel="stylesheet">
    <!-- Custom Fonts -->
    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
<!-- <style>
   
</style> -->
</head>
<body>
 <div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" style="margin-bottom: 0">
<div class="container-fluid">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-e-navbar-collapse-1">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>       
        <a class="navbar-brand" href="index.php">
        <?php

        $est_message_query = "SELECT * FROM pdf_admin_data WHERE pdf_admin_id = 1";
		$est_message_run = mysqli_query($conn, $est_message_query);
		$est_message_row = mysqli_fetch_array($est_message_run);
        $estimate_logo = $est_message_row['logo'];
        $logo_url = "images/". $estimate_logo;


        ?>
            <img src = "<?php echo $logo_url; ?>" alt="bidwiz" height = "35px">
        </a>                
    </div>
    <!-- /.navbar-header -->   

       <div class="collapse navbar-collapse" id="bs-e-navbar-collapse-1">

            <ul class="nav navbar-nav">
              
                <li>
                    <a href="index.php" style = "font-weight:bolder"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
                </li>  
              
<?php 
if(isset($user_type)){
	?>
       <!--  -->
  <li class="dropdown">
                 <a class="dropdown-toggle" style = "color:#0b57a4; font-weight:bolder" data-toggle="dropdown" href="#">
                 <i class="fa fa-paperclip fa-fw"></i>&nbspBids&nbsp<i class="fa fa-caret-down"></i>
                 </a>
                 <ul class="dropdown-menu dropdown-user">
                     
                 <li>
                    <a href="estimate.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-copy fa-fw"></i> New Bid</a>
                 </li>
                 <li>
                    <a href="view-bids.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-check fa-fw"></i> View Bids</a>
                 </li>
                 <li>
                    <a href="incomplete-bids.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-square fa-fw"></i> Incomplete Bids</a>
                 </li>
                
                 </ul></li>
                <!--  -->
                <li class="dropdown">
                 <a class="dropdown-toggle" style = "color:#0b57a4; font-weight:bolder" data-toggle="dropdown" href="#">
                 <i class="fa fa-send fa-fw"></i>&nbspClient Invoice&nbsp<i class="fa fa-caret-down"></i>
                 </a>
                    <ul class="dropdown-menu dropdown-user">
                        
                        <li>
                            <a href="invoice.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-copy fa-fw"></i> New Invoice</a>
                        </li>
                        <li>
                            <a href="view-invoices.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-check fa-fw"></i> View Invoices</a>
                        </li>
                        <li>
                            <a href="incomplete-invoices.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-square fa-fw"></i> Incomplete Invoices</a>
                        </li>
                        <?php if($user_type == 'admin'){     ?>   
                        <li>
                            <a href="pay-report.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-file-text-o fa-fw"></i> Acc. Receivable</a>
                        </li>
                        <li>
                            <a href="client-email-pay-settle.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-dollar fa-fw"></i> Email Client Pay Settle</a>
                        </li>
                        <?php }     ?> 
                    
                    </ul>
                 </li>

                 <!--  -->    
                          
                
    <li>
<a href="<?php if($user_type == 'admin'){     ?>MAPS-sheet.php<?php }elseif($user_type == 'staff'){ ?>MAPS-main.php<?php } ?>" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-list fa-fw"></i> MAPS</a>
                 </li>

                 <?php          if($user_type == 'admin'){     ?>
            		
                 <li class="dropdown">
                 <a class="dropdown-toggle" style = "color:#0b57a4;font-weight:bolder" data-toggle="dropdown" href="#">
                 <i class="fa fa-users fa-fw"></i>&nbspEmployee&nbsp<i class="fa fa-caret-down"></i>
                        <ul class="dropdown-menu dropdown-user">
                        <li>
                            <a href="employee.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-suitcase fa-fw"></i> Employee Manage</a>
                        </li>
                        <li>
                            <a href="set-up-employee.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-check fa-fw"></i> Setup Employee</a>
                        </li>
                        </ul>
                     </li>


             <?php   }  ?>
              
             <li><a href="clients.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-industry fa-fw"></i> Clients</a>
          </li>
          
                     <?php          if($user_type == 'admin'){     ?>    
                <li class="dropdown">
                 <a class="dropdown-toggle" style = "color:#0b57a4;font-weight:bolder" data-toggle="dropdown" href="#">
                 <i class="fa fa-suitcase fa-fw"></i>&nbspVendors&nbsp<i class="fa fa-caret-down"></i>
                        <ul class="dropdown-menu dropdown-user">
                        <li>
                            <a href="vendors.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-suitcase fa-fw"></i> Vendor Manage</a>
                        </li>
                        <li>
                            <a href="vendor-pay-report.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-dollar fa-fw"></i> Vendor Pay</a>
                        </li>
                        </ul>
                     </li>
                     <?php          }elseif($user_type == 'staff'){      ?>
                        <li><a href="vendors.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-suitcase fa-fw"></i> Vendors</a>

                     <?php          }     ?>   

                
                <li class="dropdown">
                 <a class="dropdown-toggle" style = "color:#0b57a4; font-weight:bolder" data-toggle="dropdown" href="#">
                 <i class="fa fa-home fa-fw"></i>&nbspProperty&nbsp<i class="fa fa-caret-down"></i>
                 </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li>
                            <a href="property-list.php" style = "color:#0b57a4;font-weight:bolder"><i class="fa fa-file-text-o fa-fw"></i> Property List</a>
                        </li>
                        <li>
                            <a href="property.php" style = "color:#0b57a4;font-weight:bolder"><i class="fa fa-gear fa-fw"></i> Property Settings</a>
                        </li>
                        <li>
                            <a href="property.php?add=" style = "color:#0b57a4;font-weight:bolder"><i class="fa fa-plus fa-fw"></i> Add New Property</a>
                        </li>
                    
                    </ul>
                 </li>
 <?php          if($user_type == 'admin'){     ?>
                 <li>
                    <a href="admin-set-up.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-gear fa-fw"></i> Set Up</a>
                 </li>
                 
                 <li>
                    <a href="payroll.php" style = "color:#0b57a4; font-weight:bolder"><i class="fa fa-industry fa-fw"></i> Payroll</a>
                </li>  <?php   }  ?>
                <li>
                    <a href="javascript:void(0);" id="app_search" ><i class="fa fa-search fa-fw"></i> Search</a>
                </li>
                         
                 <!-- 	fa-paperclip -->
<?php	
		
}?>             
            </ul>

             <ul class="nav navbar-nav navbar-right">
        
        <!-- /.dropdown -->
             <li class="dropdown">
                 <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                     <i class="fa fa-user fa-fw"></i> <?php 
     if($user_type == 'admin'){
         echo 'Admin';
     
     }
     if($user_type == 'staff'){  
         $query111 = "SELECT employee_fname,employee_lname FROM employee WHERE employee_id = $employee_id";
         $run111 = mysqli_query($conn, $query111);
         if(mysqli_num_rows($run111)==1){
             $row111 = mysqli_fetch_array($run111);
         
             echo $row111['employee_fname'] .' '.$row111['employee_lname'];
            
         }
         }
         
     
     
     ?> <i class="fa fa-caret-down"></i>
                 </a>
                 <ul class="dropdown-menu dropdown-user">
                     
                     <li><a href="logout.php"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
                     </li>
                 </ul>
                 <!-- /.dropdown-user -->
             </li>
             <!-- /.dropdown -->
         </ul>
         <!-- /.navbar-top-links -->
       
        <!-- /.sidebar-collapse -->
    </div>
        </div>
    <!-- /.navbar-static-side -->
</nav>