<?php
ob_start();
session_start();
include "inc/config.php";
include "inc/session.php";
include "inc/functions.php";
include "inc/custom-functions.php";
include "inc/CSRF_Protect.php";
$csrf = new CSRF_Protect();
$fn = new custom_functions();

$error_message = '';
$success_message = '';
$error_message1 = '';
$success_message1 = '';




if(!isset($session)) {
	header('location: login.php');
	exit;
}


$sessionUserId = $session['id'];
//$allPermissions = get_permissions($pdo, $sessionUserId);

$allPermissions = $_SESSION['permission'];
$cur_page = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);


$statement = $pdo->prepare("SELECT * FROM tbl_settings WHERE id=1");   
$statement->execute();
$query = $statement->fetchAll(PDO::FETCH_ASSOC);
$totalData = $statement->rowCount();
if($totalData>0){
    $site_name = $query[0]['name'];
    $site_logo = $query[0]['logo'];
    $logo = $query[0]['logo'];
    $favicon = $query[0]['logo'];
    $short_name = $query[0]['short_name'];
}


$currentMonth = date('m');
$currentYear = date('Y');
$startMonthDate = date('Y-m-01', strtotime("$currentYear-$currentMonth-01"));
$endMonthDate = date('Y-m-t', strtotime("$currentYear-$currentMonth-01"));




$border_style='style="box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;"';


$page_not_access = <<<HTML
<center><h4 style="color:red;"><b>You Don't Have Permission to This Page</b></h4></center>
HTML;


$statement_company = $pdo->prepare("SELECT * FROM tbl_company where id=1");
$statement_company->execute();
$partner_result = $statement_company->fetchAll(PDO::FETCH_ASSOC);
$partner_count = $statement_company->rowCount();


$border_style='style="box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;"';

$tbl_branch_role="";
$tbl_client_branch ='';
if($session_id!=1){
    $tbl_branch_role=" and id in (".$session_branch_ids.")";
}

$tbl_client_branch="";
if($session_id!=1){
    $tbl_client_branch=" and branch_id in (".$session_branch_ids.")";
}



?>

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>VKA Logistics</title>

	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

    <link rel="icon" href="<?php echo $favicon; ?>" sizes="16x16" type="image/png">
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<link rel="stylesheet" href="css/font-awesome.min.css">
	<link rel="stylesheet" href="css/ionicons.min.css">
	<link rel="stylesheet" href="css/datepicker3.css">
	<link rel="stylesheet" href="css/all.css">
	<link rel="stylesheet" href="css/select2.min.css">
	<link rel="stylesheet" href="css/dataTables.bootstrap.css">
	<link rel="stylesheet" href="css/jquery.fancybox.css">
	<link rel="stylesheet" href="css/AdminLTE.min.css">
	<link rel="stylesheet" href="css/_all-skins.min.css">
	<link rel="stylesheet" href="css/on-off-switch.css"/>
	<link rel="stylesheet" href="css/summernote.css">
	
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
    </head>


<style>
    .skin-yellow .wrapper, .skin-yellow .main-sidebar, .skin-yellow .left-side {
     /*background-color: #222d32; */
    background-image: url(https://www.dulcimers.com/picts/cobalt/background-sidebar.jpg);
}
.skin-yellow .main-header .navbar {
    background-color: #978569;
}
.skin-yellow .main-header .logo {
    background-color: #978569;
    color: #fff;
    border-bottom: 0 solid transparent
}
label{
    color:lightslategray;
}

</style>


<body class="hold-transition fixed skin-yellow sidebar-mini sidebar-collapse">

	<div class="wrapper">

		<header class="main-header">

			<a href="index.php" class="logo">
				<span class="logo-lg"><?=$site_name?></span>
				<span class="logo-mini"><b><?=$short_name?></b></span>
			</a>

			<nav class="navbar navbar-static-top">
				
				<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
					<span class="sr-only">Toggle navigation</span>
				</a>

				<span style="float:left;line-height:50px;color:#fff;padding-left:15px;font-size:18px;">
				    <?php if($UserType==1){ 
				                echo "Admin Panel"; 
				          }else if($UserType==2){
				                echo "User Panel";
				          }else if($UserType==3){ 
				                echo "Client Panel"; 
				          } 
				    ?>
				</span>

				<div class="navbar-custom-menu">
					<ul class="nav navbar-nav">
						<li class="dropdown user user-menu">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">
							    
							    <?php if($session['type']==1 || 1==1){ ?>
							        <img src="<?=$site_logo?>" class="user-image" alt="User Image">
							    <?php }else{ ?>
							        <img src="<?=$site_logo?>" class="user-image" alt="User Image">
							    <?php } ?>
								
								<span class="hidden-xs">
								    <?=$session['name']?>
							     </span>
							</a>
							<ul class="dropdown-menu">
								<li class="user-footer">
									<div>
										<a href="profile-edit.php" class="btn btn-default btn-flat">Edit Profile</a>
									</div>
									<div>
										<a href="logout.php" class="btn btn-default btn-flat">Log out</a>
									</div>
								</li>
							</ul>
						</li>
					</ul>
				</div>

			</nav>
		</header>
</div>
  		

  		<aside class="main-sidebar">
    		<section class="sidebar">
      
      			<ul class="sidebar-menu">
                
			        <li class="treeview <?php if($cur_page == 'index.php') {echo 'active';} ?>">
			          <a href="index.php">
			            <i class="fa fa-tachometer"></i> <span>Dashboard </span>
			          </a>
			        </li>
			        
			        <li class="treeview <?php if($cur_page == 'client-new.php' ||  $cur_page == 'company.php' || $cur_page == 'pincode.php' || $cur_page == 'pickup_points_list.php' || $cur_page == 'branch-list.php' || $cur_page == 'user.php' || $cur_page == 'customer.php' || $cur_page == 'transport.php' || $cur_page == 'delivery_man.php') {echo 'active';} ?>" >
					    <a href="#"><i class="fa fa-tasks"></i><span> Master</span>
							<span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
							</span>
						</a>
						<ul class="treeview-menu">
						    
						    <?php if($session_id==1 || $allPermissions['company']['read']==1 || 
                                    $allPermissions['pincode']['read']==1 || $allPermissions['branch']['read']==1 || 
                                    $allPermissions['client']['read']==1 || $allPermissions['consignor']['read']==1 || 
                                    $allPermissions['consignee']['read']==1 || $allPermissions['pickup_points']['read']==1 || $allPermissions['coloader']['read']=="1"
                                    || $allPermissions['delivery_boy']['read']=="1" || $allPermissions['transporter_details']['read']=="1" || $allPermissions['driver']['read']=="1" || $allPermissions['coloader']['read']=="1"){ ?>
     
                                <li class="treeview <?php if($cur_page == 'client-new.php' ||   $cur_page == 'company.php' || $cur_page == 'pincode.php' || $cur_page == 'pickup_points_list.php' || $cur_page == 'branch-list.php' || $cur_page == 'user.php' || $cur_page == 'customer.php' || $cur_page == 'transport.php' || $cur_page == 'delivery_man.php') {echo 'active';} ?>">
            						<a href="#">
            							<i class="fa fa-tasks"></i>
            							<span>Booking Master</span>
            							<span class="pull-right-container">
            								<i class="fa fa-angle-left pull-right"></i>
            							</span>
            						</a>
            						<ul class="treeview-menu">
            						<?php if($session_id==1 || $allPermissions['company']['read']=="1"){ ?>
            						    <li <?php if( ($cur_page == 'company.php') ) {echo 'class="active"';} ?>><a href="company.php"><i class="fa fa-circle-o"></i> Company Information</a></li>
            						<?php } ?>
            						<?php if($session_id==1 || $allPermissions['pincode']['read']=="1"){ ?>
            						  <li <?php if( ($cur_page == 'pincode.php') ) {echo 'class="active"';} ?>><a href="pincode.php"><i class="fa fa-circle-o"></i> Pincode </a></li><?php } ?>
            						<?php if($session_id==1 || $allPermissions['branch']['read']=="1"){ ?>
            						<li <?php if( ($cur_page == 'branch-list.php') ) {echo 'class="active"';} ?>><a href="branch-list.php"><i class="fa fa-circle-o"></i> Branch</a></li>
            						<?php } ?>
            						<?php if($session_id==1 || $allPermissions['client']['read']=="1"){ ?>
            						<li <?php if( ($cur_page == 'client-new.php') ) {echo 'class="active"';} ?>><a href="client-new.php"><i class="fa fa-circle-o"></i> Client</a></li>
            						<?php } ?>
            						<?php if($session_id==1 || $allPermissions['client']['read']=="1"){ ?>
            						<!--<li <?php if( ($cur_page == 'ewaybill.php') ) {echo 'class="active"';} ?>><a href="ewaybill.php"><i class="fa fa-circle-o"></i> Eway Bill Generation</a></li>-->
            						<?php } ?>
            						            						
                                  <!--stephen starts-->
                                  
                                  <?php if($session_id==1 || $allPermissions['eway_bill_update']['read']=="1"){ ?>
                                  <!--<li <?php if( ($cur_page == 'ewaybill.php') ) {echo 'class="active"';} ?>><a href="ewaybill.php"><i class="fa fa-circle-o"></i> Eway Bill Details</a></li>-->
                                  <?php } ?>
                                  <?php if($session_id==1 || $allPermissions['eway_bill_extend']['read']=="1"){ ?>
                                  <!--<li <?php if( ($cur_page == 'eway_bill_extend.php') ) {echo 'class="active"';} ?>><a href="eway_bill_extend.php"><i class="fa fa-circle-o"></i> Eway Bill Extend and Details</a></li>-->
                                  <?php } ?>
                                  
                                  <!--stephen ends-->
            						<?php if($session_id==1 || $allPermissions['consignor']['read']=="1"){ ?>
            						<li <?php if( ($cur_page == 'user.php') ) {echo 'class="active"';} ?>><a href="user.php"><i class="fa fa-circle-o"></i> Consignor</a></li>
            						<?php } ?>
            						<?php if($session_id==1 || $allPermissions['consignee']['read']=="1"){ ?>
            						<li <?php if( ($cur_page == 'customer.php') ) {echo 'class="active"';} ?>><a href="customer.php"><i class="fa fa-circle-o"></i> Consignee</a></li>
            						<?php } ?>
            						<?php if($session_id==1 || $allPermissions['coloader']['read']=="1"){ ?>
            						<li <?php if( ($cur_page == 'co-loader.php') ) {echo 'class="active"';} ?>><a href="co-loader.php"><i class="fa fa-circle-o"></i> Coloader</a></li>
            						<?php } ?>
            						<?php if($session_id==1 || $allPermissions['delivery_boy']['read']=="1"){ ?>
            						<li <?php if( ($cur_page == 'delivery_man.php') ) {echo 'class="active"';} ?>>
            						    <a href="delivery_man.php"><i class="fa fa-circle-o"></i> Delivery Boy</a></li>
            						    <?php } ?>
            						<?php if($session_id==1 || $allPermissions['pickup_points']['read']=="1"){ ?>
            						<li <?php if( ($cur_page == 'pickup_points_list.php') ) {echo 'class="active"';} ?>><a href="pickup_points_list.php"><i class="fa fa-circle-o"></i> Pickup Points</a></li>
            						<?php } ?>
            						<?php if($session_id==1 || $allPermissions['transporter_details']['read']=="1"){ ?>
            						<li <?php if( ($cur_page == 'transporter-list.php') ) {echo 'class="active"';} ?>><a href="transporter-list.php"><i class="fa fa-circle-o"></i> Transporter Details</a></li>
            						<?php } ?>
            						<?php if($session_id==1 || $allPermissions['driver']['read']=="1"){ ?>
            						<li <?php if( ($cur_page == 'driver-list.php') ) {echo 'class="active"';} ?>><a href="driver-list.php"><i class="fa fa-circle-o"></i> Driver</a></li>
            						<?php } ?>
            						</ul>
            					</li>
            				<?php } ?>
            				
            				<?php if($session_id==1 || $allPermissions['status']['read']==1 || 
                                    $allPermissions['reason']['read']==1 || $allPermissions['mode']['read']==1 || 
                                    $allPermissions['material_type']['read']==1){ ?>
            					<li class="treeview <?php if( $cur_page == 'reason.php') {echo 'active';} ?>">
            						<a href="#">
            							<i class="fa fa-tasks"></i>
            							<span>Status Master</span>
            							<span class="pull-right-container">
            								<i class="fa fa-angle-left pull-right"></i>
            							</span>
            						</a>
            						<ul class="treeview-menu">
            						    <?php if($session_id==1 || $allPermissions['status']['read']==1){ ?><li <?php if( ($cur_page == 'status.php') ) {echo 'class="active"';} ?>><a href="status.php"><i class="fa fa-circle-o"></i> Status</a></li><?php } ?>
            						<?php if($session_id==1 || $allPermissions['reason']['read']==1){ ?><li <?php if( ($cur_page == 'reason.php') ) {echo 'class="active"';} ?>><a href="reason.php"><i class="fa fa-circle-o"></i> Reason</a></li><?php } ?>
            						<?php if($session_id==1 || $allPermissions['mode']['read']==1){ ?><li <?php if( ($cur_page == 'transport.php') ) {echo 'class="active"';} ?>><a href="transport.php"><i class="fa fa-circle-o"></i> Mode</a></li><?php } ?>
            						<?php if($session_id==1 || $allPermissions['material_type']['read']==1){ ?><li <?php if( ($cur_page == 'material-type.php' || $cur_page == 'material-type-list.php') ) {echo 'class="active"';} ?>><a href="material-type-list.php"><i class="fa fa-circle-o"></i> Material Type</a></li><?php } ?>
            						</ul>
            					</li>
				            <?php } ?>
					        <?php if($session_id==1 || $allPermissions['zone_master']['read']==1 || 
                            $allPermissions['generate_zone']['read']==1 || $allPermissions['rate_entry']['read']==1){ ?>
            					<li class="treeview <?php if( $cur_page == 'zone-list.php' || $cur_page == 'generate-zone-list.php' || $cur_page == 'client-rate-entry.php') {echo 'active';} ?>">
            						<a href="#">
            							<i class="fa fa-tasks"></i>
            							<span>Billing Master </span>
            							<span class="pull-right-container">
            								<i class="fa fa-angle-left pull-right"></i>
            							</span>
            						</a>
            						<ul class="treeview-menu">
            						<?php if($session_id==1 || $allPermissions['zone_master']['read']==1){ ?><li <?php if( ($cur_page == 'zone-list.php') ) {echo 'class="active"';} ?>><a href="zone-list.php"><i class="fa fa-circle-o"></i> Zone Master </a></li><?php } ?>
            						<?php if($session_id==1 || $allPermissions['generate_zone']['read']==1){ ?><li <?php if( ($cur_page == 'generate-zone-list.php') ) {echo 'class="active"';} ?>><a href="generate-zone-list.php"><i class="fa fa-circle-o"></i> Generate Zone </a></li><?php } ?>
            						<?php if($session_id==1 || $allPermissions['rate_entry']['read']==1){ ?><li <?php if( ($cur_page == 'client-rate-entry.php') ) {echo 'class="active"';} ?>><a href="client-rate-entry.php"><i class="fa fa-circle-o"></i> Rate Entry </a></li><?php } ?>
            						</ul>
            					</li>
			                 <?php } ?>
						</ul>
					</li>
			       
			        <?php if($session_id==1 || $allPermissions['transaction_booking']['read']==1 || 
        $allPermissions['ftl_booking']['read']==1 || $allPermissions['booking_bulk_upload']['read']==1){ ?>  
			        
			        <li class="treeview <?php if( $cur_page=="booking-list.php" || $cur_page == 'ftl-booking-list.php' || $cur_page == 'ftl-booking-add.php') {echo 'active';} ?>">
						<a href="#">
							<i class="bi bi-folder-symlink-fill"></i>
							 <span>&nbsp;Booking </span>
							<span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
							</span>
						</a>
						<ul class="treeview-menu">
						<?php if($session_id==1 || $allPermissions['transaction_booking']['read']=="1"){ ?>
						<li <?php if( ($cur_page == 'booking-list.php') ) {echo 'class="active"';} ?>><a href="booking-list.php"><i class="fa fa-circle-o"></i> Transaction Booking</a></li>
						<?php } ?>
						
						<?php if($session_id==1 || $allPermissions['ftl_booking']['read']=="1"){ ?>
						<!--<li <?php if( ($cur_page == 'ftl-booking-list.php') ) {echo 'class="active"';} ?>><a href="ftl-booking-list.php"><i class="fa fa-circle-o"></i> FTL Booking <b class="blinking"><sup><i class="fa fa-star"></i></sup></b></a></li>-->
						<?php } ?>
						
						<?php if($session_id==1 || $allPermissions['booking_bulk_upload']['read']=="1"){ ?>
						<li <?php if( ($cur_page == 'booking-bulk-upload.php') ) {echo 'class="active"';} ?>><a href="booking-bulk-upload.php"><i class="fa fa-circle-o"></i> Booking Bulk Upload</a></li>
						<?php } ?>
						</ul>
					</li>
					<?php } ?>
					<li class="treeview" >
					    <a href="#"><i class="fa fa-tasks"></i><span> Transaction</span>
							<span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
							</span>
						</a>
						<ul class="treeview-menu">
						    <?php if($session_id==1 || $allPermissions['incoming_manifest']['read']=="1" || $allPermissions['outgoing_manifest']['read']=="1"){ ?>
                                <li class="treeview <?php if($cur_page == 'incoming-manifest-list.php' || $cur_page == 'incoming-manifest.php' || $cur_page == 'outgoing-manifest.php' ) {echo 'active';} ?>">
            						<a href="#">
            							<i class="fa fa-tasks"></i>
            							<span>Manifest</span>
            							<span class="pull-right-container">
            								<i class="fa fa-angle-left pull-right"></i>
            							</span>
            						</a>
            						<ul class="treeview-menu">
            					    <?php if($session_id==1 || $allPermissions['outgoing_manifest']['read']=="1"){ ?><li <?php if( ($cur_page == 'inward-manifest-list.php' || $cur_page == 'inward-manifest-list.php') ) {echo 'class="active"';} ?>><a href="inward-manifest-list.php" ><i class="fa fa-circle-o"></i> Inward Manifest </a></li><?php } ?>
            						<?php if($session_id==1 || $allPermissions['incoming_manifest']['read']=="1"){ ?><li <?php if( ($cur_page == 'incoming-manifest-list.php' || $cur_page == 'incoming-manifest.php') ) {echo 'class="active"';} ?>><a href="incoming-manifest-list.php"><i class="fa fa-circle-o"></i> Incoming Manifest</a></li><?php } ?>
            						<?php if($session_id==1 || $allPermissions['outgoing_manifest']['read']=="1"){ ?><li <?php if( ($cur_page == 'outgoing-manifest-list.php' || $cur_page == 'outgoing-manifest-list.php') ) {echo 'class="active"';} ?>><a href="outgoing-manifest-list.php" ><i class="fa fa-circle-o"></i> Out Going Manifest </a></li><?php } ?>
            						
            						</ul>
            					</li>
            				  <?php } ?>	
            					
            				<?php if($session_id==1 || $allPermissions['drs']['read']=="1" || $allPermissions['tracking']['read']=="1" || $allPermissions['delivery_status']['read']=="1"){ ?>	
            					<li class="treeview <?php if( $cur_page == 'delivery-run-sheet.php' || $cur_page == 'shipment_tracking.php' || $cur_page == 'delivery-status-update-page.php') {echo 'active';} ?>">
            						<a href="#">
            							<i class="fa fa-tasks"></i>
            							<span>DRS</span>
            							<span class="pull-right-container">
            								<i class="fa fa-angle-left pull-right"></i>
            							</span>
            						</a>
            						<ul class="treeview-menu">
            						    
            						  <?php if($session_id==1 || $allPermissions['drs']['read']=="1"){ ?>
            						    <li <?php if( ($cur_page == 'sha-volumetrix-update.php') ) {echo 'class="active"';} ?>><a href="sha-volumetrix-update.php"><i class="fa fa-circle-o"></i> Bulk DRS</a></li>
            						  <?php } ?>
            						  
            						  <?php if($session_id==1 || $allPermissions['drs']['read']=="1"){ ?>
            						    <li <?php if( ($cur_page == 'delivery-run-sheet.php') ) {echo 'class="active"';} ?>><a href="delivery-run-sheet.php"><i class="fa fa-circle-o"></i> DRS</a></li>
            						  <?php } ?>
            						  
            						<?php if($session_id==1 || $allPermissions['tracking']['read']=="1"){ ?>
            						    <li <?php if( ($cur_page == 'shipment_tracking.php') ) {echo 'class="active"';} ?>><a href="shipment_tracking.php"><i class="fa fa-circle-o"></i> Tracking <b class="blinking"><sup><i class="fa fa-star"></i></sup></b></a></li>
            						  <?php } ?>
            						  
            						<?php if($session_id==1 || $allPermissions['delivery_status']['read']=="1"){ ?>
            						    <li <?php if( ($cur_page == 'delivery-status-update-page.php') ) {echo 'class="active"';} ?>><a href="delivery-status-update-page.php"><i class="fa fa-circle-o"></i> Delivery Status <b class="blinking"><sup><i class="fa fa-star"></i></sup></b></a></li>
            						  <?php } ?>
            						
            						</ul>
            					</li>
            					
            				<?php } ?>
            				
            					
				                <?php if($session_id==1 || $allPermissions['pod_entry']['read']=="1"){ ?><li <?php if( ($cur_page == 'list_pod.php') ) {echo 'class="active"';} ?>><a href="list_pod.php"><i class="fa fa-circle-o"></i> POD  Entry</a></li><?php } ?>
				                <!--<?php if($session_id==1 || $allPermissions['pod_entry']['read']=="1"){ ?><li <?php if( ($cur_page == 'bulk-upload-pod.php') ) {echo 'class="active"';} ?>><a href="bulk-upload-po.php"><i class="fa fa-circle-o"></i> Bulk Upload POD</a></li><?php } ?>-->
					
            				
			
						</ul>
					</li>
					
					
					
					
					
					
					
			        
			        
		<!--<li class="treeview">
			          <a>
			            <i class="fa fa-tachometers"> <span style="color:white;padding-left:5px;margin:5px;"> Billing Module <b class="blinking"><sup><i class="fa fa-star"></i></sup></b></span></i> 
			          </a>
	    </li>	        
		<li class="treeview">
			          <a>
			            <i class="fa fa-tachometers"> <span style="color:white;padding-left:5px;margin:5px;"> Admin <b class="blinking"><sup><i class="fa fa-star"></i></sup></b></span></i> 
			          </a>
	    </li>
	    <li class="treeview">
			          <a>
			            <i class="fa fa-tachometers"> <span style="color:white;padding-left:5px;margin:5px;"> Report <b class="blinking"><sup><i class="fa fa-star"></i></sup></b></span></i> 
			          </a>
	    </li>-->
	    
	    <?php if($allPermissions['reports']['read_delivered']=="1"){ ?>
			         <!--<li class="treeview <?php if( ($cur_page == 'shipment_tracking.php')) {echo 'active';} ?>">
						<a href="#">
							<i class="fa fa-file"></i>
							<span>Tracking <b class="blinking"><sup><i class="fa fa-star"></i></sup></b></span>
							<span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
							</span>
						</a>
						<ul class="treeview-menu">
                                <?php if($allPermissions['reports']['read_total']=="1"){ ?><li><a href="shipment_tracking.php"><i class="fa fa-circle-o"></i> Tracking</a></li><?php }?>
                        </ul>
					</li>-->
		<?php }?>
	    
	    
	    
		 <?php if($allPermissions['view_booking_report']['read_total']=="1"||$allPermissions['view_mis_report']['read_total']=="1"||$allPermissions['view_drs_report']['read_total']=="1"
		 ||$allPermissions['view_delivery_pending']['read_total']=="1" ||$allPermissions['view_manifest_report']['read_total']=="1" ||$allPermissions['view_transaction_report']['read_total']=="1"){ ?>
			         <li class="treeview <?php if($cur_page == 'total-report.php' || $cur_page == 'client-wise-report.php'  ||  $cur_page == 'delivery-report.php' || $cur_page == 'rto-report.php' || $cur_page == 'day-wise-report.php' ){echo 'active';} ?>">
						<a href="#">
							<i class="bi bi-bar-chart-line-fill"></i>
							<span>&nbsp; Reports <b class="blinking"><sup><i class="fa fa-star"></i></sup></b></span>
							<span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
							</span>
						</a>
						<ul class="treeview-menu">
						    
						        <?php if($allPermissions['view_booking_report']['read_total']=="1"){ ?><li><a href="booking-report.php"><i class="fa fa-circle-o"></i> Booking Report</a></li><?php }?>
						        <?php if($allPermissions['view_mis_report']['read_total']=="1"){ ?><li><a href="mis-report.php"><i class="fa fa-circle-o"></i> Mis Report</a></li><?php }?>
						        <?php if($allPermissions['view_drs_report']['read_total']=="1"){ ?><li><a href="drs-report.php"><i class="fa fa-circle-o"></i> DRS Report</a></li><?php }?>
						        <?php if($allPermissions['view_delivery_pending']['read_total']=="1"){ ?><li><a href="delivery-booking-report.php"><i class="fa fa-circle-o"></i> Delivery Pending Report</a></li><?php }?>
						        <?php if($allPermissions['view_manifest_report']['read_total']=="1"){ ?><li><a href="delivery-manifest-report.php"><i class="fa fa-circle-o"></i> Manifest Report</a></li><?php }?>
						        <?php if($allPermissions['view_transaction_report']['read_total']=="1"){ ?><li><a href="unbilled-transaction-report.php"><i class="fa fa-circle-o"></i> Un-Billed Transaction Report</a></li><?php }?>
						        <!--</?php if($allPermissions['view_transaction_report']['read_total']=="1"){ ?><li><a href="ewaybill-error-report.php"><i class="fa fa-circle-o"></i> EwayB Bill Extended Error Report</a></li></?php }?>-->
						    
						    
                                <!--<?php if($allPermissions['reports']['read_total']=="1"){ ?><li><a href="total-report.php"><i class="fa fa-circle-o"></i> Total Report</a></li><?php }?>
                                <?php if($allPermissions['reports']['read_client']=="1"){ ?><li><a href="client-wise-report.php"><i class="fa fa-circle-o"></i> Client wise Report</a></li> <?php }?>
                                <?php if($allPermissions['reports']['read_delivered']=="1"){ ?><li><a href="delivery-report.php"><i class="fa fa-circle-o"></i> Delivered Report</a></li><?php }?>
                                <?php if($allPermissions['reports']['read_day']=="1"){ ?><li><a href="day-wise-report.php"><i class="fa fa-circle-o"></i> Day wise Report</a></li><?php }?>-->
						</ul>
					</li>
					<?php }?>
			         
			         <?php if($session_id==1 || $allPermissions['userManagement']['read']=="1" || $allPermissions['roles']['read']=="1"){ ?>		
        					<li class="treeview <?php if($cur_page == 'auth-users-list.php' || $cur_page == 'auth-role-list.php' || $cur_page == 'company_details.php') {echo 'active';} ?>">
        						<a href="#">
        							<i class="fa fa-gear"></i>
        							<span><?=$short_name?></span>
        							<span class="pull-right-container">
        								<i class="fa fa-angle-left pull-right"></i>
        							</span>
        						</a>
        						<ul class="treeview-menu">
        				
        						<?php if($session_id==1 || $allPermissions['userManagement']['read']=="1"){ ?>
        						    <li <?php if( ($cur_page == 'auth-users-list.php') ) {echo 'class="active"';} ?>>
        						        <a href="auth-users-list.php"><i class="fa fa-circle-o"></i> Auth - Users</a>
        						    </li>
        						<?php } ?>
        						
        						<?php if($session_id==1 || $allPermissions['roles']['read']=="1"){ ?>
        						        <li <?php if( ($cur_page == 'auth-role-list.php') ) {echo 'class="active"';} ?>>
        						            <a href="auth-role-list.php"><i class="fa fa-circle-o"></i> Auth - Role</a>
        						        </li>
        						<?php } ?>
        						
        					
        						 
        						</ul>
        					</li>
<?php } ?>
					
					
					
					
					 <?php if($session_id==1 || $allPermissions['backup']['read']=="1" ){ ?>
					<li class="treeview <?php if( ($cur_page == 'admin-backup.php') ) {echo 'active';} ?>">
			          <a href="admin-backup.php">
			            <i class="fa fa-database"></i> <span>Administrator Backup</span>
			          </a>
			        </li>
			        <?php }?>
      			</ul>
    		</section>
  		</aside>
  		
<?php 
// ********************** Common variable Declaration ****************************
$awb_variable="AWB-";


?>

<style>
.blinking{
	animation:blinkingText 1.0s infinite;
	font-size:10px;
}
@keyframes blinkingText{
	0%{		color: green;	}
	40%{	color: yellow;	}
	50%{	color: pink;	}
	99%{	color:red;	}
	100%{	color: #000;	}
}
     </style>



  		<div class="content-wrapper">