require_once dirname(__FILE__) . '/_autoload.php';
$user_id = isset($_SESSION['adminId']) && intval($_SESSION['adminId']) > 0 ? intval($_SESSION['adminId']) : 0;
if ($user_id < 1) {
    header('Location: login.php');
    exit;
}
$subMenus = Tracetec_Debt_Manager::getSubMenus();
include "include/head.php";
$year = isset($_REQUEST['year']) ? $_REQUEST['year'] : date('Y');
$month = isset($_REQUEST['month']) ? $_REQUEST['month'] : date('m');
$date_picker = new Date_Picker($year, $month);
if (!$date_picker->date_valid()) {
    header('Location: admin-debt-recovery-dashboard.php?year=' . date('Y') . '&month=' . date('m'));
    exit;
}
Tracetec_Debt_Manager::init($user_id, $year, $month);
$debt_manager = new Tracetec_Debt_Manager($user_id, $date_picker->get_date());
?>
<!DOCTYPE html>
<html lang="en">
  <head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <META HTTP-EQUIV="refresh" CONTENT="60">

    <title>Tracetec Debt Recovery - Reports</title>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->