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

$condX = $_REQUEST['condX'];
$conX = $_REQUEST['conX'];
$tblX = $_REQUEST['tblX'];
$spcX = "1=1";
$spcX2 = "1=1";

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

$recordCounter1 = new RecordCounter1($conn,$condX,$tblX,$spcX,$spcX2);
$recordCounter2 = new RecordCounter2($conn,$condX,$tblX,$spcX,$spcX2);
$recordCounter3 = new RecordCounter3($conn,$condX,$tblX,$spcX,$spcX2);
$recordCounter8 = new RecordCounter8($conn,$condX,$tblX,$spcX,$spcX2);

$data['P7'] = $recordCounter2->countRecords2('P7', array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,98));


echo json_encode($data);

?>