<?php

require_once "common.php";

if (isset($_GET['v']) and is_numeric($_GET['v'])) {
	$version = "_v".$_GET['v'];
} else {
	$version = "";
}

$Content = get_template("/index$version.htm");

$template = get_template("/main$version.htm");
$template = str_replace('<@Styles@>','',$template);
$template = str_replace('<@Sidebar@>',get_template("/sidebar$version.htm"),$template);
$template = str_replace('<@CalendarRange@>',gen_calendar_header(),$template);
$template = str_replace('<@CalendarContent@>',gen_calendar_content(),$template);
$template = str_replace('<@Content@>',$Content,$template);
$template = str_replace('<@Scripts@>','',$template);
print_template($template);

?>
