<?php
// include database and object files
include_once '../config/init.php';	// contains $db
include_once '../config/error.php';
include_once '../objects/stats_object.php';

$typeId = isset($_POST['typeId']) ? $_POST['typeId'] : -1;

$stats = new StatsObject($db);
$stats->getSessionsForUser(-1, $typeId);

$stats_arr = $stats->getResultArray(true, "All_Sessions_List_OK");
print_r(json_encode($stats_arr));
?>