} else {
            $new_words[] = WotDArchive::setOnlyDate($day);
        }
    }
    return $new_words;
}
$monthsName = array(1 => 'Ianuarie', 2 => 'Februarie', 3 => 'Martie', 4 => 'Aprilie', 5 => 'Mai', 6 => 'Iunie', 7 => 'Iulie', 8 => 'August', 9 => 'Septembrie', 10 => 'Octombrie', 11 => 'Noiembrie', 12 => 'Decembrie');
smarty_assign('month', $monthsName[$month]);
smarty_assign('year', $year);
$showPrev = $year > 2011 || $year == 2011 && $month > 5 ? 1 : 0;
$showNext = time() < mktime(0, 0, 0, $month + 1, 1, $year) ? 0 : 1;
smarty_assign('showPrev', $showPrev);
smarty_assign('showNext', $showNext);
$prefix = 'arhiva/cuvantul-zilei';
if ($month == '01') {
    $prevMonth = $prefix . '/' . ($year - 1) . '/12';
} else {
    $m = sprintf("%02d", (int) $month - 1);
    $prevMonth = "{$prefix}/{$year}/{$m}";
}
if ($month == '12') {
    $nextMonth = $prefix . '/' . ($year + 1) . '/01';
} else {
    $m = sprintf("%02d", (int) $month + 1);
    $nextMonth = "{$prefix}/{$year}/{$m}";
}
smarty_assign('prevMonth', $prevMonth);
smarty_assign('nextMonth', $nextMonth);
$words = createCalendar($year, $month);
smarty_assign('words', $words);
smarty_displayWithoutSkin('common/wotdArchive.ihtml');
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>New Calendar</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<?

require_once("../functions.inc.php");

if ($_POST['submit'])
{
	// verify that the passwords are the same
	if ($_POST['pass1'] == $_POST['pass2'])
	{
		createCalendar($_POST['name'], $_POST['email'], $_POST['pass1']);
		$message = "Created " . $_POST['name'] . " successfully.";
	}
	else
	{
		// passwords were not the same, set error message
		$error = "passwords did not match. try again.";
	}	
}
?>
<body>
<? 
// print status information
if ($error) echo "<p class='error'>" . $error . "</p>";
if ($message) echo "<p class='message'>" . $message . "</p>"
?>
function getEvent($client, $eventID)
{
    return createCalendar($client)->events->listEvents(htmlspecialchars($calendarId));
}