<?php
$month = $year = array();

if (isset($_GET['year']) && isset($_GET['month']))
{
	$y = $_GET['year'];
	$m = $_GET['month'];
} else {
	list($y, $m) = explode("-", date("Y-m"));
}

$month[1] = intval($m);
$year[1] = intval($y);

?>
<div class="aCalendarWrapper" style="height: 400px; margin: 0 0 10px"><?php echo $tpl['ACalendar']->getMonthView($month[1], $year[1]); ?></div>
<div class="aCalendarWrapperLegend"><?php echo $tpl['ACalendar']->getLegend($tpl['option_arr'], pjRegistry::getInstance()->get('fields')); ?></div>