$params['params']['end_date'] = date('Y-m-d');
$rest_api = new RestApi($params);
$reply = $rest_api->getResponse();
$normal_previous_day = count_replies($reply);
// The last month.
$params['params']['start_date'] = date('Y-m-d', mktime(0, 0, 0, date('m') - 1, date('d'), date('Y')));
$params['params']['end_date'] = date('Y-m-d');
$rest_api = new RestApi($params);
$reply = $rest_api->getResponse();
$normal_previous_month = count_replies($reply);
// The last year.
$params['params']['start_date'] = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') - 1));
$params['params']['end_date'] = date('Y-m-d');
$rest_api = new RestApi($params);
$reply = $rest_api->getResponse();
$normal_previous_year = count_replies($reply);
// Try and get the list of return parcels that the API key has been used to
// create.
// Start with the current day.
$params['url'] = 'http://api-uk.easypack24.net/reverselogistics.json';
$params['token'] = $api_key;
$params['methodType'] = 'GET';
$params['params']['date_before'] = date('Y-m-d');
$params['params']['date_after'] = date('Y-m-d');
$rest_api = new RestApi($params);
$reply = $rest_api->getResponse();
$returns_today = json_decode($reply);
// Get the count for the previous month
$params['params']['date_after'] = date('Y-m-d', mktime(0, 0, 0, date('m') - 1, date('d'), date('Y')));
$params['params']['date_before'] = date('Y-m-d');
$rest_api = new RestApi($params);
	Location: <? echo $where; ?><BR>
	</TD>
</TR>
<TR><TD COLSPAN=2>
	<H2><? echo $message ? $message : "$name, you're invited!"; ?></H2>
	<DIV ID="status">
	<TABLE CELLPADDING=2 CELLSPACING=0 CLASS="yes"><TR><TH>Yes (<? count_replies($guests, $event, "Y"); ?>)</TH></TR><TR><TD>
	<? show_replies($guests, $event, "Y", $org_id); ?>
	</TD></TR></TABLE>
	<TABLE CELLPADDING=2 CELLSPACING=0 CLASS="maybe"><TR><TH>Maybe (<? count_replies($guests, $event, "M"); ?>)</TH></TR><TR><TD>
	<? show_replies($guests, $event, "M", $org_id); ?>
	</TD></TR></TABLE>
	<TABLE CELLPADDING=2 CELLSPACING=0 CLASS="no"><TR><TH>No (<? count_replies($guests, $event, "N"); ?>)</TH></TR><TR><TD>
	<? show_replies($guests, $event, "N", $org_id); ?>
	</TD></TR></TABLE>
	<TABLE CELLPADDING=2 CELLSPACING=0 CLASS="noreply"><TR><TH>Not yet replied (<? count_replies($guests, $event, null, $org_id); ?>)</TH></TR><TR><TD>
	<? show_replies($guests, $event, null, $org_id); ?>
	</TD></TR></TABLE>
	</DIV>
<?php 
    if ($reply) {
        echo "<DIV CLASS=\"note\">You've already replied. To change your reply, use the form below.</DIV>\n";
    }
    ?>
	<FORM ACTION="?invite=<? echo $invite ?>" METHOD="POST">
	Will you attend? &nbsp;
	<SELECT NAME="reply">
<?php 
    echo "<OPTION VALUE=\"Y\"";
    if ($reply == "Y") {
        echo " SELECTED";