<?php
/**
 * THIS FILE PROVIDES ASYNCHRONOUS JAVASCRIPT DRIVEN DATA FOR THE ACARS MAP // TRACKFLIGHT.
 *  Replace this file in => INSTALLATION_FOLDER/lib/skins/iCrew/trackflight/
 *
 *
 * iCrew v4 Premium - Virtual Airline Crew Center
 * Copyright (c) 2017 iCrewSystems
 *
 * This CrewCenter & and it's Modules (which are distinguished, and limited to unless specified)
 * are protected by copyright under Indian Copyright Act, 1957, with the 2012 amendments
 * No part of the website design or layout may be reproduced or transmitted in any form or by any other
 * means electronic or mechanical to include photocopying, recording, reproducing, or electronic storage.
 * Any such act represents a copyright violation and theft of intellectual property owned by iCrewSystems.
 *
 * @author: Leonard Selvaraja
 * @copyright: Copyright (c) 2017, iCrewSystems
 * @link http://www.icrewsystems.com
 * @service name: iCrewSystems Virtual Airline Intermediate Services (with additions)
 * Caution : NO SUPPORT WILL BE PROVIDED IF ANY MODULE / TEMPLATE IS FOUND TO BE TAMPERED WITH.
 */
?>

<style>
			.loading_text {
    		position: relative;
    		color: rgba(0, 0, 0, .3);
			}

			.loading_text:before {
    		content: attr(data-text);
    		position: absolute;
    		overflow: hidden;
    		max-width: 7em;
    		white-space: nowrap;
    		color: #000;
    		animation: loading 7s linear;
			}

			@keyframes loading {
    		0% {
        	max-width: 0;
	    	}
			}
		</style>


<div class="col-md-12" id="live_flights">
	<div class="block">
		<div class="block-title">
			<div class="block-options pull-right">
				<span class="label label-default">Loading</span>

			</div>
			<h3><i class="gi gi-airplane"></i> <strong>Live </strong> Flights</h3>
		</div>

		<h2 class="loading_text" data-text="Initializing radar...">Initializing radar...please wait</h2>
	</div>
</div>



<script>
    $(document).ready(function() {
    	$.ajaxSetup({ cache: false }); // This part addresses an IE bug.  without it, IE will only load the first number and will never refresh
			setInterval(function() {
				$('#live_flights').load('<?php echo SITE_URL; ?>/live_uplink.php').fadeIn("slow");
			}, 300000);
    });
</script>
