<?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">
	
 
	
   </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 client_files.file_id,client_files.file_no,client_files.fileStatus,client_files.client_id,assignstatus.remarks,assignstatus.assigned_by from client_files,assignstatus WHERE client_files.file_id=assignstatus.file_id and assignstatus.status=0 order by assignstatus.id desc";
                            $result = $conn->query($sql);
							$m = $result->num_rows;
                                 ?>
                 
                      <b>List Of Pending Customer Files:</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>File No</th>
					      <th>File Status</th>
					       <th>Fowarded By</th>
					       <th>Remarks</th>
						<th>Customer Documents</th>
					   <th>Update Customer File</th>
						</tr>
					</thead>
				</table>
				
                  </div>
                </div>
              </div>

            </div>
			

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

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

 $("#id_frm").validate({
        rules: {
			
			"client_id": {
                required: true
            },
			
			"entryId": {
                required: true
            },
			
			"b_lNo": {
                required: true
            },
			
			"consignee": {
                required: true
            },
			
			"goods": {
                required: true
            },
			
			
			"vesselFlight": {
                required: true
            },
			
			
			"sline": {
                required: true
            },
			
			"file": {
                required: true
            },
			
			
            "eta": {
                required: true,
                //minlength: 10,
                // minlength: 10 // same rule twice
            },
			
			"message": {
                required: true
            },
			
			"dest_id": {
                required: true
            },
			
			"fowardedto_id": {
                required: true
            },
			
			"returnedto_id": {
                required: true
            }
			
			
            
        },
        messages: {
			
			"client_id": {
                required: "Please Select Client."
            },
			
			"entryId": {
                required: "Please Select Entry Point Type"
            },
			
			"b_lNo": {
                required: "Please Enter B/L NO"
            },
			
            "consignee": {
                required: "Please Enter CONSIGNEE"
            },
			
			"goods": {
                required: "Please Enter Goods"
            },
			
			"vesselFlight": {
                required: "Please Enter Vessel/Flight/Truck."
            },
			
			"sline": {
                required: "Please Enter Shipping Line/Transporter/Airline"
            },
			
			"file": {
                required: "Please Upload at least one document."
            },
			
			
			"eta": {
                required: "Please Enter Estimated Time Arrival - E.T.A"
            },
			
			"message": {
                required: "Please Compose Message."
            },
			
			
			"dest_id": {
                required: "Please Enter Destination"
            },
			
			"fowardedto_id": {
                required: "Are You want to foward to whom?"
            },
			
			"returnedto_id": {
                required: "Are You want to return to whom?"
            }
			
			
        },
        // for demo
        //submitHandler: function(form) {
            //alert('valid form');
            //return false;
        //}
 });


</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/pendingCustomerFiles.js"></script>
	

		
  </body>
</html>



<?php
}

?>