<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>

<!DOCTYPE html>

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">

<link href="font-awesome-4.4.0/css/font-awesome.min.css"
	rel="stylesheet" />

<link rel="stylesheet" href="<?php echo base_url(); ?>assets/admin_css/css/jquery.datetimepicker.css" />
<!-- <link href="css/for_mobile.css" rel="stylesheet" /> -->
<link href="<?php echo base_url(); ?>assets/admin_css/css/bootstrap.min.css" rel="stylesheet" />
<link href="<?php echo base_url(); ?>assets/font-awesome-4.4.0/css/font-awesome.min.css"
	rel="stylesheet" />
<link href="<?php echo base_url(); ?>assets/admin_css/css/jquery.dataTables.css" rel="stylesheet"></link>
<link href="<?php echo base_url(); ?>assets/admin_css/css/jquery.dataTables.min.css" rel="stylesheet"></link>
<link href="<?php echo base_url(); ?>assets/admin_css/css/buttons.dataTables.min.css" rel="stylesheet"></link>
<script src="<?php echo base_url(); ?>assets/admin_js/js/jquery-1.9.1.js"></script>
<script type="text/javascript"
	src="<?php echo base_url(); ?>assets/admin_js/js/jquery.dataTables.min.js"></script>
<script type="text/javascript"
	src="<?php echo base_url(); ?>assets/admin_js/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/admin_js/js/buttons.print.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/admin_js/js/buttons.colVis.min.js"></script>
<script src="<?php echo base_url(); ?>assets/admin_js/js/bootstrap.min.js"></script>
<script src="<?php echo base_url(); ?>assets/admin_js/js/jquery.datetimepicker.js"></script>

<script type="text/javascript">
	$(document)
			.ready(
					function() {

						$('#example')
								.dataTable(
										{
											// dom: 'Bfrtip',

											//  dom: 'Bfrtip',
											"lengthMenu" : [
													[ 20, 100, 500, -1 ],
													[ 20, 100, 500, "All" ] ],
											//  iDisplayLength: 20,

											/* 	dom : 'Bf<"top"i>rt<"left"lp><"clear">', */
											dom : '<"top"lBf>rt<"left"i><"clear">p',
											/*  buttons: [
											     'print'
											 ],  */
											buttons : [
													{
														extend : 'print',
														title : "",
														message : "<table class='table ' align='center'><tr><td colspan='7' align='center'><label for='exampleInputEmail1'>"

																+ " </label></td></tr><tr><td colspan='8' align='center'><label for='exampleInputEmail1'>All Customer List</label></td></tr> </table>",
														exportOptions : {
															columns : ':visible'
														}
													}, 'colvis'

											],
											columnDefs : [ {
												//		targets : -1,
												visible : false
											} ]
										});
					});
</script>


<script>
	$(function() {
		$('#date1').datetimepicker();
	});

	$(function() {
		$('#date2').datetimepicker();
	});
</script>


</head>
<body>


	<div class="row">

		<h3 style="text-align: center;">Destination  Report</h3>


		<div class="row">

		


			<div class="col-md-12">
				</br>

				<div class="table-responsive">

					<table class="table table-bordered" id="example">
						<thead class="thead_bg">

							<tr>
								<th style="text-align: center;">S.No</th>								
									<th style="text-align: center;">Name</th>														
								<th style="text-align: center;">Status</th>
								<th style="text-align: center;">Action</th>
								<th style="text-align: center;">Delete</th>
							</tr>
						</thead>

						<tbody style="background: #fff;">

                                  <?php 
								  
								 $count=0;
								 
								  foreach($all_info as  $dto){



                                  ?>


							<tr>

								<td style="text-align: center;"> <?php echo $count+1; ?></td>


							
								<td style="text-align: center;"><?php echo $dto->NAME; ?></td>																			


									<td style="text-align: center;"><?php echo $dto->STATUS; ?></td>



								<td style="text-align: center;"><a
									href="<?php echo site_url().'/DestinationControllers/getInfoById/'.$dto->id; ?>"> <i
										class="fa fa-pencil" aria-hidden="true" title="Update "></i>
								</a></td>

								<td style="text-align: center;"><a
									href="<?php echo site_url().'/DestinationControllers/deleteInfo/'.$dto->id; ?>">	<i class="fa fa-trash" aria-hidden="true" title="Delete "></i>
								</a></td>

							</tr>

							  <?php 
							$count++;
							
							} ?>



						</tbody>


					</table>

					<br></br>



				</div>


			</div>
		</div>

	</div>
</body>

<script>




	$(document).ready(function(){
	$('#stateIdfk').change(function(){
	//var base_url='http://localhost/Aapatkaal_Php/index.php/';

	var country_id = $('#stateIdfk').val();


	if(country_id != '')
	{
	 $.ajax({

		 url: "<?php echo base_url(); ?>" + "index.php/LoktantraSenaniControllers/fetch_city",
		method:"POST",
		data:{country_id:country_id},
		success:function(data)
		{
		 $('#district_id_fk').html(data);

		}
	 });
	}
	else
	{

	 $('#district_id_fk').html('<option value="">Select City</option>');
	}
	});


	});
	</script>

</html>
