<?php
ob_start();
error_reporting(0);
include("connect.php");
session_start(); 
$ver = $_SESSION["admin_id"];
$m_id = $_SESSION["manager_id"];
$user_type = $_SESSION["user_type"];
if(!isset($_SESSION["admin_id"])){
   header('location:http://www.btcover.appexperts.net');
}
$q=mysqli_query($con,"select * from tbl_manager where manager_id='$m_id'");
$res=mysqli_fetch_assoc($q);
$imei_no=$res['imei_no'];

?>


<aside class="left-sidebar" data-sidebarbg="skin5">
            <!-- Sidebar scroll-->
            <div class="scroll-sidebar">
                <!-- Sidebar navigation-->
                <nav class="sidebar-nav">
                    <ul id="sidebarnav" class="p-t-30">
                        <li class="sidebar-item"> <a class="sidebar-link waves-effect waves-dark sidebar-link" href="dashboard.php" aria-expanded="false"><i class="mdi mdi-view-dashboard"></i><span class="hide-menu">Dashboard</span></a></li>
						<?php if($user_type=='Admin') { ?>
                        <li class="sidebar-item"> <a class="sidebar-link has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-account"></i><span class="hide-menu">Manager</span></a>
						<ul aria-expanded="false" class="collapse  first-level">
                                <li class="sidebar-item"><a href="add-manager.php" class="sidebar-link"><i class="mdi mdi-account-plus"></i><span class="hide-menu">Add Manager</span></a></li>
                                <li class="sidebar-item"><a href="manager.php" class="sidebar-link"><i class="mdi mdi-eye"></i><span class="hide-menu">View Manager</span></a></li>
                            </ul>
						</li>
						<?php } ?>
						<li class="sidebar-item"> <a class="sidebar-link waves-effect waves-dark sidebar-link" href="customer.php" aria-expanded="false"><i class="mdi mdi-account"></i><span class="hide-menu">Customer</span></a></li>
						<li class="sidebar-item"> <a class="sidebar-link has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-account"></i><span class="hide-menu">Agent </span></a>
						<ul aria-expanded="false" class="collapse  first-level">
                                <li class="sidebar-item"><a href="add-agent.php" class="sidebar-link"><i class="mdi mdi-account-plus"></i><span class="hide-menu">Add Agent</span></a></li>
                                <li class="sidebar-item"><a href="agent.php" class="sidebar-link"><i class="mdi mdi-eye"></i><span class="hide-menu">View Agent</span></a></li>
                            </ul>
						</li>
						<li class="sidebar-item"> <a class="sidebar-link has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-blur-linear"></i><span class="hide-menu">Insurance Company</span></a>
					
						<ul aria-expanded="false" class="collapse  first-level">
                                <li class="sidebar-item"><a href="add-insurance-company.php" class="sidebar-link"><i class="mdi mdi-plus"></i><span class="hide-menu">Add Insurance Company</span></a></li>
                                <li class="sidebar-item"><a href="insurance_company.php" class="sidebar-link"><i class="mdi mdi-eye"></i><span class="hide-menu">View Insurance Company</span></a></li>
                            </ul>
						</li>
						<li class="sidebar-item"> <a class="sidebar-link has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-border-outside"></i><span class="hide-menu">Policy</span></a>
					
						<ul aria-expanded="false" class="collapse  first-level">
                                <?php if($imei_no=='0' || $imei_no=='') { ?>
								<li class="sidebar-item"><a href="add-policy.php" class="sidebar-link"><i class="mdi mdi-plus"></i><span class="hide-menu">Add Policy</span></a></li>
								<?php } else { ?>
								<li class="sidebar-item"><a href="#" onclick="alert('you are already login in app....first you logout from App then add policy from here');" class="sidebar-link"><i class="mdi mdi-plus"></i><span class="hide-menu">Add Policy</span></a></li>
								<?php } ?>
                                <li class="sidebar-item"><a href="policy.php" class="sidebar-link"><i class="mdi mdi-eye"></i><span class="hide-menu">View Policy</span></a></li>
								
                                
                            </ul>
								
						</li>
						<?php if($user_type=='Admin') { ?>
						<li class="sidebar-item"> <a class="sidebar-link has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"><i class="fas fa-cog"></i></i><span class="hide-menu">General Setting</span></a>
					
						<ul aria-expanded="false" class="collapse  first-level">
                              
								<li class="sidebar-item"><a href="vehicle-category.php" class="sidebar-link"><i class="mdi mdi-car"></i><span class="hide-menu">Vehicle Category</span></a></li>
                                <li class="sidebar-item"><a href="policy-category.php" class="sidebar-link"><i class="mdi mdi-eye"></i><span class="hide-menu">Policy Category</span></a></li>
								<li class="sidebar-item"><a href="commission-percentage.php" class="sidebar-link"><i class="mdi mdi-percent"></i><span class="hide-menu">Commission Percentage</span></a></li>
								<li class="sidebar-item"><a href="gst-percentage.php" class="sidebar-link"><i class="mdi mdi-percent"></i><span class="hide-menu">GST Percentage</span></a></li>
								 <?php if($imei_no=='0' || $imei_no=='') { ?>
								<li class="sidebar-item"><a href="subscription.php" class="sidebar-link"><i class="mdi mdi-plus"></i><span class="hide-menu">Subscription</span></a></li>
								<?php } else { ?>
								<li class="sidebar-item"><a href="#" onclick="alert('you are already login in app....first you logout from App ');"  class="sidebar-link"><i class="mdi mdi-plus"></i><span class="hide-menu">Subscription</span></a></li>
                                <?php } ?>
                            </ul>
								
						</li>
						<?php } ?>
						<?php if($user_type=='Admin') { ?>
								 <li class="sidebar-item"> <a class="sidebar-link waves-effect waves-dark sidebar-link" href="get_month_year_txn_detail.php" aria-expanded="false"><i class="mdi mdi-view-dashboard"></i><span class="hide-menu">Transaction Details</span></a></li>
								<?php } ?>
						<?php if($user_type=='Manager') { ?>
						<li class="sidebar-item"> <a class="sidebar-link waves-effect waves-dark sidebar-link" href="agent-pending-work.php" aria-expanded="false"><i class="mdi mdi-account"></i><span class="hide-menu">Agent Pending Work</span></a></li>
					
						<li class="sidebar-item"> <a class="sidebar-link waves-effect waves-dark sidebar-link" href="pay-agent-commission.php" aria-expanded="false"><i class="mdi mdi-account"></i><span class="hide-menu">Pay Agent Commission</span></a></li>
							<?php } ?>
							
						<li class="sidebar-item"> <a class="sidebar-link waves-effect waves-dark sidebar-link" href="agent-commission-history.php" aria-expanded="false"><i class="mdi mdi-account"></i><span class="hide-menu">Agent Commission History</span></a></li>
						
						
                    </ul>
                </nav>
                <!-- End Sidebar navigation -->
            </div>
            <!-- End Sidebar scroll-->
        </aside>