<?php
include "../config.php";
include "classes.php";

$condX = $_REQUEST['condX'];
$conX = $_REQUEST['conX'];
$tblX = $_REQUEST['tblX'];

if($conX==1)
{    
    $condX="1=1";   
}

$data = array();

$recordCounter = new RecordCounter($conn,$condX,$tblX);
$recordCounter2 = new RecordCounter2($conn,$condX,$tblX);

$data['Q1101'] = $recordCounter->countRecords('A_Q1101_', range(1, 6),$airport);
$data['Q1102'] = $recordCounter2->countRecords2('Q1102',range(1, 2),$airport);
$data['Q1103'] = $recordCounter2->countRecords2('Q1103',range(1, 2),$airport);
$data['Q1104'] = $recordCounter2->countRecords2('Q1104',range(1, 2),$airport);
$data['Q1105'] = $recordCounter2->countRecords2('Q1105',range(1, 2),$airport);
$data['Q1106'] = $recordCounter->countRecords('A_Q1106_', range(1, 7),$airport);
$data['Q1107'] = $recordCounter2->countRecords2('Q1107',range(1, 2),$airport);

echo json_encode($data);

?>