2 require_once('require/class.Connection.php');
3 require_once('require/class.Spotter.php');
4 require_once('require/class.Language.php');
5 $Spotter = new Spotter();
6 $title = _("Special Highlights - Table View");
7 require_once('header.php');
9 //calculuation for the pagination
10 if(!isset($_GET['limit']) ||
$_GET['limit'] == "")
14 $absolute_difference = 25;
16 $limit_explode = explode(",", $_GET['limit']);
17 $limit_start = $limit_explode[0];
18 $limit_end = $limit_explode[1];
19 if (!ctype_digit(strval($limit_start)) ||
!ctype_digit(strval($limit_end))) {
24 $absolute_difference = abs($limit_start - $limit_end);
25 $limit_next = $limit_end +
$absolute_difference;
26 $limit_previous_1 = $limit_start - $absolute_difference;
27 $limit_previous_2 = $limit_end - $absolute_difference;
29 $page_url = $globalURL.'/highlights/table';
31 print '<div class="info column">';
32 print '<div class="view-type">';
33 print '<a href="'.$globalURL.'/highlights" alt="'._("Display View").'" title="'._("Display View").'"><i class="fa fa-th"></i></a>';
34 print '<a href="'.$globalURL.'/highlights/table" class="active" alt="'._("Table View").'" title="'._("Table View").'"><i class="fa fa-table"></i></a>';
36 print '<h1>'._("Special Highlights - Table View").'</h1>';
39 print '<div class="table column">';
40 print '<p>'._("The table below shows the detailed information of all custom selected flights who have special aspects to it, such as unique liveries, destinations etc.").'</p>';
42 $sort = filter_input(INPUT_GET
,'sort',FILTER_SANITIZE_STRING
);
44 $spotter_array = $Spotter->getSpotterDataByHighlight($limit_start.",".$absolute_difference, $sort);
46 $spotter_array = $Spotter->getSpotterDataByHighlight($limit_start.",".$absolute_difference);
49 if (!empty($spotter_array))
52 include('table-output.php');
54 print '<div class="pagination">';
55 if ($limit_previous_1 >= 0)
57 print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'/'.$sort.'">«'._("Previous Page").'</a>';
59 if ($spotter_array[0]['query_number_rows'] == $absolute_difference)
61 print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'/'.$sort.'">'._("Next Page").'»</a>';
68 require_once('footer.php');