<?php
session_start();
if(!isset ($_SESSION['user_id'])){
    header("Location:../index.php?msg=Log in first");
    exit();
}else{
	include('../Server/connection.php');
	include('includes/session.php');
?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

     <?php
	include 'title.php';
	?>
	
	
	<link type = "image/png" rel="icon" href="images/brvision.png"/>

    <!-- Bootstrap -->
    <link href="../vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    

    <!-- Custom Theme Style -->
    <link href="../build/css/custom.min.css" rel="stylesheet">
	
	<!-- DataTables must-->
  <link rel="stylesheet" href="assests/plugins/datatables/jquery.dataTables.min.css">

  <!-- file input must-->
  <link rel="stylesheet" href="assests/plugins/fileinput/css/fileinput.min.css">
  
   <script type="text/javascript">
$(document).ready(function(){
    $('#entryId').on('change',function(){
        var regID = $(this).val();
        if(regID){
            $.ajax({
                type:'POST',
                url:'ajaxData2.php',
                data:'entryId='+regID,
                success:function(html){
                    $('#entryNameId').html(html);
                }
            }); 
        }else{
            $('#entryNameId').html('<option value="">Select EntryPoint Type First</option>');
        }
    });

});
</script>
	

	
   </head>

  <body class="nav-md">
    <div class="container body">
	
	
	
      <div class="main_container">
        <div class="col-md-3 left_col">
          <div class="left_col scroll-view">
		  
         <?php  
		include 'includes/role.php';
               ?>

            <div class="clearfix"></div>

            <?php
            include 'includes/profile.php';
			print '</br></br>';
			include 'includes/menu.php';
			?>

            <!-- page content -->
        <div class="right_col" role="main">
          <div class="">

            <div class="clearfix"></div>
			
			
			<div class="row">
			
			 
			
			 <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
				  
				
				
				 <a href="dashboard.php">  <h2><span class="glyphicon glyphicon-step-backward"></span> Back</h2></a> </br></br>
				 
				  <?php
							
							$sql = "SELECT * FROM clients,assignstatus where clients.client_id=assignstatus.client_id and assignstatus.assigned_to='$user_id' and assignstatus.status=0";
                            $result = $conn->query($sql);
							$m = $result->num_rows;
                                 ?>
                 
                      <b>List Of Pending Customers:</b>&nbsp&nbsp<font color="green"><?php echo $m; ?></font>

                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                      </li>
					  
                      
					  
                      <li><a class="close-link"><i class="fa fa-close"></i></a>
                      </li>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content" style="overflow: auto;">
                 
				  <div class="remove-messages"></div>
					
				<table class="table" id="manageCategoriesTable">
					<thead>
						<tr>
							<th>S/No:</th>	
                            <th>Customer</th>
                            <th>Fowarded By</th>					
							<th>Documents</th>
							<th>Remarks</th>
							<th>File Status</th>
						</tr>
					</thead>
				</table>
				
					
				
					
                  </div>
                </div>
              </div>

            </div>
			
		

<!-- edit categories brand -->
<div class="modal fade" id="editCategoriesModal" tabindex="-1" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
    	
    	<form class="form-horizontal" id="editCategoriesForm" action="php_action/approve_MaintananceRequestsAcc.php" method="POST">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	        <h4 class="modal-title"> <!--<i class="fa fa-edit"></i>--> Customer File Details </h4>
	      </div>
		  
	      
		  <div class="modal-body" style="max-height:450px; overflow:auto;">

	      	<div id="edit-categories-messages"></div>

	      	<!--<div class="modal-loading div-hide" style="width:50px; margin:auto;padding-top:50px; padding-bottom:50px;">
						<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i>
						<span class="sr-only">Loading...</span>
					</div>-->
					
			<div class="edit-categories-result">
		      	<div class="form-group">
				
				<label class="radio-inline">
          <input type="radio" name="status" value="Accept" id="status" checked /> Open File
         </label>&nbsp&nbsp&nbsp&nbsp
         <label class="radio-inline">
          <input type="radio" name="status" value="Reject" id="status" /> Reject
         </label>&nbsp&nbsp&nbsp&nbsp
						
		        </div> <!-- /form-group-->
		      </div>         	        
		      <!-- /edit brand result -->
			  
			   <div id="textboxes33">

		      <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Transport Mode Type: </label>
					    <div class="col-sm-7">
					      <!--<input type="text" class="form-control" id="editLevelName" placeholder="Access Level Name" name="editLevelName" autocomplete="off">-->
						  <input type="hidden" class="form-control" id="AssignStatusId"  name="AssignStatusId" autocomplete="off" />
						   <select class="form-control" name="entryId" id="entryId" autocomplete="off">
			  						<option value="">~~SELECT~~</option>
			  						<?php
			  							$productSql2 = "SELECT * FROM entrypoint_type ORDER BY name";
			  							$productData2 = $conn->query($productSql2);
			  							while($row2 = $productData2->fetch_array()){									 		
			  								echo "<option value='".$row2['entryId']."'>".$row2['name']."</option>";
										 	} // /while 

			  						?>
		  						</select> 
					    </div>
		        </div> <!-- /form-group-->
		      </div>         	        
		      <!-- /edit brand result -->
			  
			  <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label">Transport Mode Name: </label>
					    <div class="col-sm-7">
						
						<select class="form-control" name="entryNameId" id="entryNameId" autocomplete="off">
			  						<option value="">~~SELECT~~</option>
			  						
		  						</select>
						 
						  
					    </div>
		        </div> <!-- /form-group-->
		      </div> 

               <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label">B/L NO: </label>
					    <div class="col-sm-7">
						<input type="text" class="form-control" id="b_lNo" name="b_lNo" placeholder="B/L NO" autocomplete="off" />
						
						  
					    </div>
		        </div> <!-- /form-group-->
		      </div>    

                <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label">TRA Ref.Number: </label>
					    <div class="col-sm-7">
						<input type="text" class="form-control" id="tra_RefNo" name="tra_RefNo" placeholder="TRA Ref.Number" autocomplete="off" />
						
						  
					    </div>
		        </div> <!-- /form-group-->
		      </div>	

            <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Consignee: </label>
					    <div class="col-sm-7">
						<input type="text" class="form-control" id="consignee" name="consignee" placeholder="CONSIGNEE" autocomplete="off" />
						
						  
					    </div>
		        </div> <!-- /form-group-->
		      </div>  

              <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Goods: </label>
					    <div class="col-sm-7">
						<input type="text" class="form-control" id="goods" name="goods" placeholder="GOODS" autocomplete="off" />
						
						  
					    </div>
		        </div> <!-- /form-group-->
		      </div> 

              <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Vessel/Flight/Truck: </label>
					    <div class="col-sm-7">
						<input type="text" class="form-control" id="vesselFlight" name="vesselFlight" placeholder="VESSEL/FLIGHT/TRUCK" autocomplete="off" />
						
						  
					    </div>
		        </div> <!-- /form-group-->
		      </div>  


              <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Shipping Line/Transporter/Airline: </label>
					    <div class="col-sm-7">
						<input type="text" class="form-control" id="sline" name="sline" placeholder="Shipping Line/Transporter/Airline" autocomplete="off" />
						
						  
					    </div>
		        </div> <!-- /form-group-->
		      </div> 

             <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Estimated Time Arrival - E.T.A: </label>
					    <div class="col-sm-7">
						<input type="date" class="form-control" id="eta" name="eta" placeholder="Estimated Time Arrival - E.T.A" autocomplete="off" />
					    </div>
		        </div> <!-- /form-group-->
		      </div>   

             <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> DESTINATION: </label>
					    <div class="col-sm-7">
						<select class="form-control" name="dest_id" id="dest_id" autocomplete="off">
			  						<option value="">~~SELECT~~</option>
			  						<?php
			  							$productSql24 = "SELECT * FROM destination ORDER BY dest_name";
			  							$productData24 = $conn->query($productSql24);
			  							while($row24 = $productData24->fetch_array()){									 		
			  								echo "<option value='".$row24['dest_id']."'>".$row24['dest_name']."</option>";
										 	} // /while 

			  						?>
		  						</select> 
						  
					    </div>
		        </div> <!-- /form-group-->
		      </div>	

              <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Remarks: </label>
					    <div class="col-sm-7">
						<textarea id="remarks" rows="10" cols="50" name="remarks" class="form-control" style="margin-left:0%;" autocomplete="off"> </textarea>
					    </div>
		        </div> <!-- /form-group-->
		      </div> 

              <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Assign To: </label>
					    <div class="col-sm-7">
						
						<select class="form-control" name="fowardedto_id" id="fowardedto_id" autocomplete="off">
			  						<option value="">~~SELECT~~</option>
			  						<?php
			  							$productSql41 = "SELECT staff.firstname,staff.lastname,users.user_id,designation.des_short_name,designation.des_name FROM users,staff,designation where role_id=1 and user_id!='$user_id' and  users.staff_id=staff.staff_id and staff.des_id=designation.des_id";
			  							$productData41 = $conn->query($productSql41);
			  							while($row41 = $productData41->fetch_array()){									 		
			  								echo "<option value='".$row41['user_id']."'>".$row41['firstname']."&nbsp&nbsp&nbsp&nbsp".$row41['lastname']."&nbsp&nbsp&nbsp&nbsp(".$row41['des_name'].")&nbsp&nbsp"."</option>";
										 	} // /while 

			  						?>
		  						</select> 
						
						
					    </div>
		        </div> <!-- /form-group-->
		      </div> 

               </div>	

            <div id="textboxes34" style="display: none">
			  
			    <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Remarks: </label>
					    <div class="col-sm-7">
						<textarea id="remarks" rows="10" cols="50" name="remarks1" class="form-control" style="margin-left:0%;" autocomplete="off"> </textarea>
					    </div>
		        </div> <!-- /form-group-->
		      </div> 

              <div class="edit-categories-result">
		      	<div class="form-group">
		        	<label for="editCategoriesName" class="col-sm-5 control-label"> Assign To: </label>
					    <div class="col-sm-7">
						
						<select class="form-control" name="fowardedto_id1" id="fowardedto_id" autocomplete="off">
			  						<option value="">~~SELECT~~</option>
			  						<?php
			  							$productSql413 = "SELECT staff.firstname,staff.lastname,users.user_id,designation.des_short_name,designation.des_name FROM users,staff,designation where role_id=1 and user_id!='$user_id' and  users.staff_id=staff.staff_id and staff.des_id=designation.des_id";
			  							$productData413 = $conn->query($productSql413);
			  							while($row413 = $productData413->fetch_array()){									 		
			  								echo "<option value='".$row413['user_id']."'>".$row413['firstname']."&nbsp&nbsp&nbsp&nbsp".$row413['lastname']."&nbsp&nbsp&nbsp&nbsp(".$row413['des_name'].")&nbsp&nbsp"."</option>";
										 	} // /while 

			  						?>
		  						</select> 
						
						
					    </div>
		        </div> <!-- /form-group-->
		      </div>
			  
			  </div>			   

	      </div> <!-- /modal-body -->
	      
	      <div class="modal-footer editCategoriesFooter">
	        <button type="button" class="btn btn-default" data-dismiss="modal"> <i class="glyphicon glyphicon-remove-sign"></i> Close</button>
	        
	        <button type="submit" class="btn btn-success" id="editCategoriesBtn" data-loading-text="Loading..." autocomplete="off"> <i class="glyphicon glyphicon-ok-sign"></i> Save Changes</button>
	      </div>
	      <!-- /modal-footer -->
     	</form>
	     <!-- /.form -->
    </div>
    <!-- /modal-content -->
  </div>
  <!-- /modal-dailog -->
</div>
<!-- /categories brand -->



			
			
          </div>
        </div>
        <!-- /page content -->

       <?php
		include 'includes/footer.php';
		?>
		
		
      </div>
    </div>
	
	

    <!-- jQuery -->
    <!--<script src="../vendors/jquery/dist/jquery.min.js"></script>-->
	
	
	<script src="../vendors/jquery/dist/jquery.min.js"></script>
	
	
    <!-- Bootstrap -->
    <!--<script src="../vendors/bootstrap/dist/js/bootstrap.min.js"></script>-->
	
	<!-- Bootstrap -->
    <script src="../vendors/bootstrap/dist/js/bootstrap10.min.js"></script>
    
    <!-- Custom Theme Scripts -->
    <script src="../build/js/custom.min.js"></script>
	
	<!-- file input must-->
	<script src="assests/plugins/fileinput/js/plugins/canvas-to-blob.min.js'); ?>" type="text/javascript"></script>	
	<script src="assests/plugins/fileinput/js/plugins/sortable.min.js" type="text/javascript"></script>	
	<script src="assests/plugins/fileinput/js/plugins/purify.min.js" type="text/javascript"></script>
	<script src="assests/plugins/fileinput/js/fileinput.min.js"></script>	


	<!-- DataTables must-->
	<script src="assests/plugins/datatables/jquery.dataTables.min.js"></script>
	
	<!--must-->
	<!--<script src="custom/js/fetchLevels.js"></script>-->
	<!--must-->
	<script src="custom/js/pendingFuelRequests.js"></script>
	
<script>

$(document).ready(function(){
    $('input[name="status"]').on('click', function(){
        if ($(this).val() == 'Accept'){
			 $('#textboxes33').show();
			 $('#textboxes34').hide();
        }else {
			$('#textboxes33').hide();
			$('#textboxes34').show();
		}
	
		
    });
});


</script>
	
	
		
		
  </body>
</html>



<?php
}

?>