ok

Mini Shell

Direktori : /home2/selectio/www/lilyexpresslive/software/admin/
Upload File :
Current File : /home2/selectio/www/lilyexpresslive/software/admin/customer_bulk_upload.php

<?php require_once('header.php'); ?>


<section class="content-header">
    <div class="row">
		<div class="col-md-6" style="text-align: left;">
			<h4><i class="fa fa-info-circle"></i> Customer Bulk Upload</h4>
		</div>
		<div class="col-md-6" style="text-align: left;">
	    	<?php if($_SESSION['lily_express_software_live']['id']==1 || $allPermissions['customer']['create']=="1" ){ ?><a href="customer-add.php" class="btn btn-success btn-sm"><i class="fa fa-plus"></i> Add Customer</a>&nbsp;<?php } ?>
		    <a href="customer.php" class="btn btn-primary btn-sm">List All</a>
		</div>
	</div>
	
</section>

<section class="content">
	<div class="row">
		<div class="col-md-12">

			<?php if($error_message): ?>
			<div class="callout callout-danger">
				<p>
					<?php echo $error_message; ?>
				</p>
			</div>
			<?php endif; ?>

			<?php if($success_message): ?>
			<div class="callout callout-success">
				<p><?php echo $success_message; ?></p>
			</div>
			<?php endif; ?>

			<form class="form-horizontal" action="customer_bulk_upload_status.php" method="post" enctype="multipart/form-data">
				<div >
					<div class="box-body">
					    
		
		                <div class="form-group">
							<label for="" class="col-sm-2 control-label">Select Branch <span>*</span></label>
							<div class="col-sm-6">
							   	<select class="form-control select2" name="branch_id" id="branch_id" required>
	                            </select>
							</div>
						</div>
		
					    <div class="form-group">
							<label for="" class="col-sm-2 control-label">Select Client <span>*</span></label>
							<div class="col-sm-6">
							   	<select class="form-control select2" name="client_id" id="client_id" required>
	                            </select>
							</div>
						</div>
						<div class="form-group">
							<label for="" class="col-sm-2 control-label">Bulk Upload Pickup Entry <span>*</span></label>
							<div class="col-sm-9" style="padding-top:5px">
								<input type="file" name="file" accept=".csv" required>(Only CSV Format)
							</div>
						</div>
						<div class="form-group">
							<label for="" class="col-sm-2 control-label"></label>
							<div class="col-sm-6">
								<button type="submit" class="btn btn-success pull-left" name="Import">Submit</button>
							</div>
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>

</section>


<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Delete Confirmation</h4>
            </div>
            <div class="modal-body">
                <p>Are you sure want to delete this item?</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                <a class="btn btn-danger btn-ok">Delete</a>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" language="javascript" >
	$(document).ready(function() {
	    $("#client_id").select2();
	    $("#branch_id").select2();
	    
		    
			    function branchDetails(){ // branch and Employee Details Set
        $.ajax({
          url: 'data-tables/custom-function.php',
          type: 'post',
          data: {type:'get_branch'},
          success: function(response)
          {
               var datas = JSON.parse(response)         
               $('#branch_id').empty();
                var tot = datas.length;
                for (var index = 0; index < tot; index++) {
                     $('#branch_id')
                      .append($("<option></option>")
                    .attr("value", datas[index]['id'])
                    .text(datas[index]['branch_name']));
                                                 
                }   
          }
      });
}


function clientDetails(){ // branch and Employee Details Set
   var branch = $("#branch_id").val();

        $.ajax({
          url: 'data-tables/custom-function.php',
          type: 'post',
          data: {type:'get_client',branch_id:branch},
          success: function(response)
          {
               var datas = JSON.parse(response)         
               $('#client_id').empty();
                var tot = datas.length;
                  if(tot==0)
                  {
                          $('#client_id')
                                        .append($("<option></option>")
                                      .attr("value", '')
                                      .text("Client Not Available"));
                  }
                for (var index = 0; index < tot; index++) {
                     $('#client_id')
                      .append($("<option></option>")
                    .attr("value", datas[index]['id'])
                    .text(datas[index]['client_name']));
                                                 
                }   
          }
      });
}

				branchDetails();
			    clientDetails();
			  
			   $('#branch_id').on('change', function(){			    
			        clientDetails();
			  } ); 
			} );
		</script>
<?php require_once('footer.php'); ?>

Zerion Mini Shell 1.0