<commit_before><?php
require('require/class.Connection.php');
require('require/class.Spotter.php');
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Barrie Spotter TV</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="<?php print $globalURL; ?>/images/touch-icon.png">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/style-tv.css?<?php print time(); ?>" />
</head>
<body>


<?php
if ($_GET['q'] != "")
{
	$spotter_array = Spotter::searchSpotterData($_GET['q'],"","","","","","","","","","","","","","0,10","","");
} else {
	$spotter_array = Spotter::getLatestSpotterData("0,10", "");
}
   
print '<div class="table-responsive">';
	print '<table id="table-tv">';
	  print '<tbody>';

		  foreach($spotter_array as $spotter_item)
		  {
		  	date_default_timezone_set('America/Toronto');
		  	print '<tr>';
		    	if ($_GET['image'] == "true")
		    	{
			    	if ($spotter_item['image'] != "")
			    	 {
			    	 	print '<td class="aircraft_image">';
			    	 		print '<img src="'.$spotter_item['image'].'" alt="Click to see more information about this flight" title="Click to see more information about this flight" />';
			    	 	print '</td>';
			    	 } else {
			      	 print '<td class="aircraft_image">';
			      	 	print '<img src="'.$globalURL.'/images/placeholder.png" alt="Click to see more information about this flight" title="Click to see more information about this flight" />';
			      	 print '</td>';
			    	 }
		    	 }
		    	if (@getimagesize($globalURL.'/images/airlines/'.$spotter_item['airline_icao'].'.png'))
		  		{
		    		print '<td class="logo">';
		    			print '<img src="'.$globalURL.'/images/airlines/'.$spotter_item['airline_icao'].'.png" />';
		    		print '</td>';
		  		} else {
		  			print '<td class="logo-no-image">';
		  				if ($spotter_item['airline_name'] != "")
		  				{
		  					print $spotter_item['airline_name'];
		  				} else {
			  				print 'N/A';
		  				}
		  			print '</td>';<commit_msg>Bugfix tv view<commit_after><?php
require('require/class.Connection.php');
require('require/class.Spotter.php');
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Barrie Spotter TV</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="<?php print $globalURL; ?>/images/touch-icon.png">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/style-tv.css?<?php print time(); ?>" />
</head>
<body>


<?php
if (isset($_GET['q']))
{
	$spotter_array = Spotter::searchSpotterData($_GET['q'],"","","","","","","","","","","","","","0,10","","");
} else {
	$spotter_array = Spotter::getLatestSpotterData("0,10", "");
}
   
print '<div class="table-responsive">';
	print '<table id="table-tv">';
	  print '<tbody>';

		  foreach($spotter_array as $spotter_item)
		  {
		  	date_default_timezone_set('America/Toronto');
		  	print '<tr>';
		    	if (isset($_GET['image']) && $_GET['image'] == "true")
		    	{
			    	if ($spotter_item['image'] != "")
			    	 {
			    	 	print '<td class="aircraft_image">';
			    	 		print '<img src="'.$spotter_item['image'].'" alt="Click to see more information about this flight" title="Click to see more information about this flight" />';
			    	 	print '</td>';
			    	 } else {
			      	 print '<td class="aircraft_image">';
			      	 	print '<img src="'.$globalURL.'/images/placeholder.png" alt="Click to see more information about this flight" title="Click to see more information about this flight" />';
			      	 print '</td>';
			    	 }
		    	 }
		    	if (@getimagesize($globalURL.'/images/airlines/'.$spotter_item['airline_icao'].'.png'))
		  		{
		    		print '<td class="logo">';
		    			print '<img src="'.$globalURL.'/images/airlines/'.$spotter_item['airline_icao'].'.png" />';
		    		print '</td>';
		  		} else {
		  			print '<td class="logo-no-image">';
		  				if ($spotter_item['airline_name'] != "")
		  				{
		  					print $spotter_item['airline_name'];
		  				} else {
			  				print 'N/A';
		  				}
		  			print '</td>';
{'fraction_non_alphanumeric': 0.22155068209290277, 'fraction_numerical': 0.021757900189949924, 'mean_word_length': 3.7592440427280196, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 91, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7596625', 'n_tokens_mistral': 2319, 'n_tokens_neox': 2051, 'n_words': 326}