<link href="<?php echo base_url();?>admin_assets/plugins/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
 <div class="copy" style="display:none;">
  <div class="control-group input-group row" style="margin-top:10px">
      <div class="col-md-5">
      	<input type="text" name="doc_name[]" required class="form-control" placeholder="Document Title">
      </div>
      <div class="col-md-5">
      	<input type="file" name="test11[]" required class="form-control">
      </div>
      <div class="input-group-btn col-md-2"> 
        <button class="btn btn-danger remove" type="button"><i class="fa fa-times"></i></button>
      </div>
  </div>
</div>
  <div class="body-content">
  						<div class="card mb-4" id="showformm" <?php if(!$this->uri->segment(3)){?> style="display:none;" <?php }?>>
                        	<div class="card-body" >
                            	<h5 class="text-success">New E-Visa Application</h5>
                                <?php if($this->uri->segment(3)){?>
                                <form  action="<?php echo base_url();?>admin/update_evisa" method="post" enctype="multipart/form-data">
                                	<input type="hidden" name="id" value="<?php echo $edit->id;?>" />
                                    
                                	<div class="row">
                                    	<div class="col-md-8">
                                        	<div class="row">
                                                <div class="form-group col-md-5">
                                                    <label>Name</label>
                                                    <input type="text" name="name" value="<?php echo $edit->name;?>" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-4">
                                                    <label>Place of Birth</label>
                                                    <input type="text" name="birth_place" value="<?php echo $edit->birth_place;?>" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>Religion</label>
                                                    <input type="text" name="religion" value="<?php echo $edit->religion;?>" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>Type of Visa</label>
                                                    <select class="form-control" name="visa_type" required>
                                                    	<?php for($i=1;$i<=10;$i++){?>
												<option value="<?php echo $i;?> Year" <?php if($edit->visa_type==$i.' Year'){echo "selected";}?>><?php echo $i;?> Year</option><?php 
															 }?>
                                                    </select>
                                                </div>.
                                            <div class="form-group col-md-3">
                                            <label class="text-danger"><i class="fa fa-inr"></i> Payment Received</label>
                                            <input type="number"  value="<?php echo $edit->cust_paid;?>"  name="cust_paid" required class="form-control" />
                                            </div>
                                                <div class="form-group col-md-9">
                                                    <label>Arrival Port</label>
                                                    <input type="text" name="arrival_port" value="<?php echo $edit->arrival_port;?>" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>Mobile</label>
                                                    <input type="text" name="mobile" value="<?php echo $edit->mobile;?>" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>Phone</label>
                                                    <input type="text" name="phone" value="<?php echo $edit->phone;?>" class="form-control" />
                                                </div>
                                                <div class="form-group col-md-6">
                                                    <label>Email</label>
                                                    <input type="text" name="email" value="<?php echo $edit->email;?>" required class="form-control" />
                                                </div>
                                            </div>
                                            <div class="row">
                                            	<div class="col-md-6">
                                                    <div class="form-group">
                                                        <label>Relative Name</label>
                                                        <input type="text" name="relative_name" value="<?php echo $edit->relative_name;?>" placeholder="Relative Name" required class="form-control" />
                                                    </div>
                                                    <div class="form-group">
                                                        <label>Relative Number</label>
                                                        <input type="text" name="rphone" value="<?php echo $edit->rphone;?>" required placeholder="Relative Phone" class="form-control" />
                                                    </div>
                                                    <div class="form-group">
                                                        <label>Relative Address with Zip</label>
                                                        <textarea class="form-control" rows="2" name="address" required><?php echo $edit->address;?></textarea>
                                                    </div>
                                                </div>
                                                <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label>Relative Name</label>
                                                        <input type="text" name="relative_name2" value="<?php echo $edit->relative_name2;?>" placeholder="Relative Name" required class="form-control" />
                                                    </div>
                                                    <div class="form-group">
                                                        <label>Relative Number</label>
                                                        <input type="text" name="rphone2" required value="<?php echo $edit->rphone2;?>" placeholder="Relative Phone" class="form-control" />
                                                    </div>
                                                    <div class="form-group">
                                                        <label>Relative Address with Zip</label>
                                                        <textarea class="form-control" rows="2" name="address2" required><?php echo $edit->address2;?></textarea>
                                                    </div>
                                                </div>
                                                <div class="col-md-7">
                                                	<h5 class="text-warning">Work Details</h5>
                                                	<div class="form-group" style="margin-bottom:5px;">
                                                        <label>Work Title</label>
                                                        <input type="text" name="work_title" required value="<?php echo $edit->work_title;?>" class="form-control" />
                                                    </div>
                                                	<div class="form-group" style="margin-bottom:5px;">
                                                        <label>Work Address</label>
                                                        <textarea class="form-control" rows="2" name="work_address" required><?php echo $edit->work_address;?></textarea>
                                                    </div><div class="row">
                                                    <div class="form-group  col-md-6">
                                                        <label>Spouse Name</label>
                                                        <input type="text" name="spouse_name" value="<?php echo $edit->spouse_name;?>" required class="form-control" />
                                                    </div>
                                                    <div class="form-group col-md-6">
                                                        <label>Spouse Phone</label>
                                                        <input type="text" name="spouse_phone" value="<?php echo $edit->spouse_phone;?>" required class="form-control" />
                                                    </div></div>
                                                </div>
                                                <div class="col-md-5">
                                                	<h5 class="text-warning">Parent Details</h5>
                                                	<div class="form-group">
                                                        <label>Father Name/Citizenship</label>
                                                        <input type="text" name="father" value="<?php echo $edit->father;?>" placeholder="Name" required class="form-control" />
                                                        <input type="text" name="fciti" value="<?php echo $edit->fciti;?>" required placeholder="Citizenship" class="form-control" />
                                                    </div>
                                                	<div class="form-group">
                                                        <label>Mother Name/Citizenship</label>
                                                        <input type="text" name="mother" value="<?php echo $edit->mother;?>" placeholder="Name" required class="form-control" />
                                                        <input type="text" name="mciti" value="<?php echo $edit->mciti;?>" required placeholder="Citizenship" class="form-control" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                            	<div class="form-group col-md-3">
                                                    <label>Citizenship</label>
                                                    <input type="text" name="sciti" value="<?php echo $edit->sciti;?>"  required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>Prev.Nationality</label>
                                                    <input type="text" name="sprev_citi" value="<?php echo $edit->sprev_citi;?>"  required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>Date of Naturaliztion</label>
                                                    <input type="date" name="date_of_nature" value="<?php echo $edit->date_of_nature;?>"  required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>POB/DOB</label>
                                                    <input type="date" name="pob_dob" value="<?php echo $edit->pob_dob;?>"  required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-12">
                                                    <label>Countries Visited in last 10 Years</label>
                                                    <input type="text" name="visited_country" value="<?php echo $edit->visited_country;?>"  required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-4">
                                                    <label>Prev Indian Visa No.</label>
                                                    <input type="text" name="prev_vno" value="<?php echo $edit->prev_vno;?>"  required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-4">
                                                    <label>Issue Date</label>
                                                    <input type="date" name="prev_vdate" value="<?php echo $edit->prev_vdate;?>"  required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-4">
                                                    <label>Issue Place</label>
                                                    <input type="text" name="prev_vissue" value="<?php echo $edit->prev_vissue;?>"  required class="form-control" />
                                                </div>
                                            </div>
                                        <button type="submit" class="btn btn-warning">Update</button>
                                        </div>
                                    </div>
                                </form>
                                <?php }else{?>
                            	<form  action="<?php echo base_url();?>admin/add_evisa" method="post" enctype="multipart/form-data">
                                	<div class="row">
                                    	<div class="form-group col-md-3">
                                            <label class="text-success">Search Customer</label>
                                            <input type="text" id="search_cust" name="customer" required class="form-control" />
                                            <input type="hidden" id="cusid" name="cusid" value="" />
                                            <div class="search_result">
                                            
                                            </div>
                                        </div>
                                    </div>
                                	<div class="row">
                                    	<div class="col-md-7">
                                        	<div class="row">
                                                <div class="form-group col-md-5">
                                                    <label>Name</label>
                                                    <input type="text" name="name" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-4">
                                                    <label>Place of Birth</label>
                                                    <input type="text" name="birth_place" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>Religion</label>
                                                    <input type="text" name="religion" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-4">
                                                <label>Destination</label>
                                                <input type="text" name="destination" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>Type of Visa</label>
                                                    <select class="form-control" name="visa_type" required>
                                                    	<?php for($i=1;$i<=10;$i++){
															echo '<option value="'.$i.' Year">'.$i.' Year</option>';
															 }?>
                                                    </select>
                                                </div>
                                                <div class="form-group col-md-3">
                                                <label class="text-danger"><i class="fa fa-inr"></i> Payment Received</label>
                                                <input type="number" name="cust_paid" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-9">
                                                    <label>Arrival Port</label>
                                                    <input type="text" name="arrival_port" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>Mobile</label>
                                                    <input type="text" name="mobile" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>Phone</label>
                                                    <input type="text" name="phone" class="form-control" />
                                                </div>
                                                <div class="form-group col-md-6">
                                                    <label>Email</label>
                                                    <input type="text" name="email" required class="form-control" />
                                                </div>
                                            </div>
                                            <div class="row">
                                            	<div class="col-md-6">
                                                    <div class="form-group">
                                                        <label>Relative Name</label>
                                                        <input type="text" name="relative_name" placeholder="Relative Name" required class="form-control" />
                                                    </div>
                                                    <div class="form-group">
                                                        <label>Relative Number</label>
                                                        <input type="text" name="rphone" required placeholder="Relative Phone" class="form-control" />
                                                    </div>
                                                    <div class="form-group">
                                                        <label>Relative Address with Zip</label>
                                                        <textarea class="form-control" rows="2" name="address" required></textarea>
                                                    </div>
                                                </div>
                                                <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label>Relative Name</label>
                                                        <input type="text" name="relative_name2" placeholder="Relative Name" required class="form-control" />
                                                    </div>
                                                    <div class="form-group">
                                                        <label>Relative Number</label>
                                                        <input type="text" name="rphone2" required placeholder="Relative Phone" class="form-control" />
                                                    </div>
                                                    <div class="form-group">
                                                        <label>Relative Address with Zip</label>
                                                        <textarea class="form-control" rows="2" name="address2" required></textarea>
                                                    </div>
                                                </div>
                                                <div class="col-md-7">
                                                	<h5 class="text-warning">Work Details</h5>
                                                	<div class="form-group" style="margin-bottom:5px;">
                                                        <label>Work Title</label>
                                                        <input type="text" name="work_title" required class="form-control" />
                                                    </div>
                                                	<div class="form-group" style="margin-bottom:5px;">
                                                        <label>Work Address</label>
                                                        <textarea class="form-control" rows="2" name="work_address" required></textarea>
                                                    </div>
                                                    <div class="row">
                                                    <div class="form-group col-md-6">
                                                        <label>Spouse Name</label>
                                                        <input type="text" name="spouse_name" required class="form-control" />
                                                    </div>
                                                    <div class="form-group col-md-6">
                                                        <label>Spouse Phone</label>
                                                        <input type="text" name="spouse_phone" required class="form-control" />
                                                    </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-5">
                                                	<h5 class="text-warning">Parent Details</h5>
                                                	<div class="form-group">
                                                        <label>Father Name/Citizenship</label>
                                                        <input type="text" name="father" placeholder="Name" required class="form-control" />
                                                        <input type="text" name="fciti" required placeholder="Citizenship" class="form-control" />
                                                    </div>
                                                	<div class="form-group">
                                                        <label>Mother Name/Citizenship</label>
                                                        <input type="text" name="mother" placeholder="Name" required class="form-control" />
                                                        <input type="text" name="mciti" required placeholder="Citizenship" class="form-control" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                            	<div class="form-group col-md-3">
                                                    <label>Citizenship</label>
                                                    <input type="text" name="sciti" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>Prev.Nationality</label>
                                                    <input type="text" name="sprev_citi" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>Date of Naturaliztion</label>
                                                    <input type="date" name="date_of_nature" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-3">
                                                    <label>POB/DOB</label>
                                                    <input type="date" name="pob_dob" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-12">
                                                    <label>Countries Visited in last 10 Years</label>
                                                    <input type="text" name="visited_country" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-4">
                                                    <label>Prev Indian Visa No.</label>
                                                    <input type="text" name="prev_vno" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-4">
                                                    <label>Issue Date</label>
                                                    <input type="date" name="prev_vdate" required class="form-control" />
                                                </div>
                                                <div class="form-group col-md-4">
                                                    <label>Issue Place</label>
                                                    <input type="text" name="prev_vissue" required class="form-control" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-5">
                                        	<h5 class="text-warning">Documents Submitted</h5>
                                        	<div class="input-group control-group after-add-more row">
                                              <div class="col-md-5">
                                              <input type="text" name="doc_name[]" required class="form-control" placeholder="Document Title">
                                              </div>
                                              <div class="col-md-5">
                                              <input type="file" name="test11[]" required class="form-control">
                                              </div>
                                              <div class="input-group-btn col-md-2"> 
                                                <button class="btn btn-success add-more" type="button"><i class="fa fa-plus"></i></button>
                                              </div>
                                            </div>
                                            <br/>
                                            <button type="submit" class="btn btn-warning">Submit</button>
                                        </div>
                                    </div>
                                </form>
                                <?php }?>
                            </div>
                        </div>
                        <div class="card mb-4">
                            <div class="card-body">
                            	<button id="showform" class="btn btn-warning float-right" type="button">Add New</button>
                            	<h5 class="text-danger">Listed All Applications</h5>
                                <div class="table-responsive">
                                    <table class="table display table-bordered table-striped table-hover basic">
                                        <thead>
                                            <tr>
                                            	<th>S.No.</th>
                                                <th>Name</th>
                                                <th>Type</th>
                                                <th>Email/Mobile</th>
                                                <th>Arrival Port</th>
                                                <th>Work</th>
                                                <th>Payment</th>
                                                <th>RegDate</th>
                                                <th>Action</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        	<?php $i=1;foreach($evisa as $u){?>
                                            <tr>
                                        <td><?php echo $i;?></td>
                                        <td><?php echo $u->name;?></td>
                                        <td><?php echo $u->visa_type;?></td>
                                        <td><?php echo $u->email;?><br/><?php echo $u->mobile. ' '.$u->phone;?></td>
                                        <td><?php echo $u->arrival_port;//.' '.$u->city.' '.$u->state.' '.$u->pincode;?></td>
                                        <td><?php echo $u->work_title.'<br/>'.$u->work_address;?></td>
                                        <td><?php echo $u->cust_paid;?></td>
                                        <td><?php echo $u->reg_date;?></td>
                                        <td>
                                        
<a href="#" id="<?php echo $u->id;?>" class="btn btn-sm btn-dark load_steps" data-toggle="modal" data-target="#myModalsteps"><i class="fa fa-list"></i> Status</a>
<a href="#" id="<?php echo $u->id;?>" class="btn btn-sm btn-success cust_details" data-toggle="modal" data-target="#myModal"><i class="fa fa-eye"></i></a>
<a href="<?php echo base_url().'admin/evisa/'.$u->id;?>" class="btn btn-sm btn-warning"><i class="fa fa-edit"></i></a>
<a href="#" id="<?php echo $u->id;?>" class="btn btn-sm btn-danger cus_delete"><i class="fa fa-trash"></i></a>
<a href="#" id="<?php echo $u->id;?>" class="btn btn-sm btn-info vdocs" data-toggle="modal" data-target="#vdocs"><i class="fa fa-file"></i> Docs</a>
<a href="#" id="<?php echo $u->id;?>" class="btn btn-sm btn-primary logs" data-toggle="modal" data-target="#logs"><i class="fa fa-file"></i> Notes</a></td>
                                            </tr>
                                            <?php $i++;}?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                       
                        <!--Language - Comma decimal place-->
                        
                        <!--Language options-->
                        
                    </div><!--/.body content-->
                </div><!--/.main content-->
                <div id="myModalsteps" class="modal fade" role="dialog">
                  <div class="modal-dialog modal-sm">
                    <!-- Modal content-->
                    <div class="modal-content">
                      <div class="modal-header" style="background:#FC0;"><i class="fa fa-list"></i>&nbsp; Status Steps &nbsp;
                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                      </div>
                      <div class="modal-body myModalsteps_div row">
                        <p>Loading Steps..</p>
                      </div>
                    </div>
                
                  </div>
                </div>
                <div id="logs" class="modal fade" role="dialog">
                  <div class="modal-dialog modal-lg">
                    <!-- Modal content-->
                    <div class="modal-content">
                      <div class="modal-header" style="background:#FC0;"><i class="fa fa-files-o"></i>&nbsp; Customer &nbsp;<b class="text-success"> Logs</b>
                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                      </div>
                      <div class="modal-body logs_div row">
                        <p>Loading History...</p>
                      </div>
                    </div>
                
                  </div>
                </div>
                <div id="vdocs" class="modal fade" role="dialog">
                  <div class="modal-dialog modal-lg">
                    <!-- Modal content-->
                    <div class="modal-content">
                      <div class="modal-header" style="background:#FC0;"><i class="fa fa-files-o"></i>&nbsp; Customer  &nbsp;<b class="text-success"> Documents</b>
                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                      </div>
                      <div class="modal-body alldocs">
                        <p>Loading Documents...</p>
                      </div>
                    </div>
                
                  </div>
                </div>
                <div id="myModal" class="modal fade" role="dialog">
                  <div class="modal-dialog">
                    <!-- Modal content-->
                    <div class="modal-content">
                      <div class="modal-header" style="background:#F90;">
                        <h5 class="modal-title">Customer Details</h5>
                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                      </div>
                      <div class="modal-body details">
                      	<h3 class="text-warning"><i class="fa fa-spin fa-spinner"></i> Loading Details</h3>
                      </div>
                    </div>
                
                  </div>
                </div>

                <footer class="footer-content">
                    <div class="footer-text d-flex align-items-center justify-content-between">
                        <div class="copy">© 2019 CRM</div>
                    </div>
                </footer><!--/.footer content-->
                <div class="overlay"></div>
            </div><!--/.wrapper-->
        </div>
        <!--Global script(used by all pages)-->
        <script src="<?php echo base_url();?>admin_assets/dist/js/popper.min.js"></script>
        <script>
		$(document).ready(function(){
			$("#search_cust").keyup(function(){
				var key=$(this).val();
				$.ajax({
					 type: "POST",
					 url: '<?php echo base_url();?>admin/search_cust',
					 data: {key:key},
					 success: function(res){
					 $(".search_result").html(res);
					}
				 }); 
			});
			$(".load_steps").click(function(e){e.preventDefault();
				var id=$(this).attr("id");
				//alert(id);
				$.ajax({
					 type: "POST",
					 url: '<?php echo base_url();?>admin/load_steps',
					 data: {id:id},
					 success: function(res){
					 $(".myModalsteps_div").html(res);
					}
				 }); 
			});
			$("#showform").click(function(){
				$("#showformm").slideToggle();
			});
			$(".add-more").click(function(){ 
				  var html = $(".copy").html();
				  $(".after-add-more").after(html);
			});
			
			$("body").on("click",".remove",function(){ 
				  $(this).parents(".control-group").remove();
			});
			$(".logs").click(function(){
				var id=$(this).attr("id");
				//alert(id);
				$.ajax({
					 type: "POST",
					 url: '<?php echo base_url();?>admin/ajax_logs',
					 data: {id:id},
					 success: function(res){
					 $(".logs_div").html(res);
					}
				 }); 
			});
			$(".cust_details").click(function(){
				var id=$(this).attr("id");
				//alert(id);
				$.ajax({
					 type: "POST",
					 url: '<?php echo base_url();?>admin/ajax_evisa_details',
					 data: {id:id},
					 success: function(res){
					 $(".details").html(res);
					}
				 }); 
			});
			$(".vdocs").click(function(){
				var id=$(this).attr('id');
				//alert(id);
				$.ajax({
					 type: "POST",
					 url: '<?php echo base_url();?>admin/ajax_vdocs2',
					 data: {id:id},
					 success: function(res){
						 //alert(res);
						$(".alldocs").html(res);
					 }
				});
			});
			$(".cus_delete").click(function(e){e.preventDefault();
				if(!confirm("Sure you want to delete?")){
					  return false;
				}
				var id=$(this).attr("id");$(this).closest("tr").remove();
				$.ajax({
					 type: "POST",
					 url: '<?php echo base_url();?>admin/ajax_cust_deleteev',
					 data: {id:id},
					 success: function(response){
						 //alert(response);
					 }
				});
			});
		});
		</script>
        <script src="<?php echo base_url();?>admin_assets/plugins/bootstrap/js/bootstrap.min.js"></script>
        <script src="<?php echo base_url();?>admin_assets/plugins/metisMenu/metisMenu.min.js"></script>
        <script src="<?php echo base_url();?>admin_assets/plugins/perfect-scrollbar/dist/perfect-scrollbar.min.js"></script>
        <!-- Third Party Scripts(used by this page)-->
        <script src="<?php echo base_url();?>admin_assets/plugins/datatables/dataTables.min.js"></script>
        <script src="<?php echo base_url();?>admin_assets/plugins/datatables/dataTables.bootstrap4.min.js"></script>
        <!--Page Active Scripts(used by this page)-->
        <script src="<?php echo base_url();?>admin_assets/plugins/datatables/data-basic.active.js"></script>
        <!--Page Scripts(used by all page)-->
        <script src="<?php echo base_url();?>admin_assets/dist/js/sidebar.js"></script>
    </body>

<!-- Mirrored from bhulua.thememinister.com/tables_data_basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 28 Sep 2019 13:44:34 GMT -->
</html>