<?php
    $prevurl = Horde::addParameter('month.php', 'month=' . date('n', $prevstamp));
    $prevurl = Horde::addParameter($prevurl, 'year=' . date('Y', $prevstamp));
    $prevurl = Horde::applicationURL($prevurl);
    
    $nexturl = Horde::addParameter('month.php', 'month=' . date('n', $nextstamp));
    $nexturl = Horde::addParameter($nexturl, 'year=' . date('Y', $nextstamp));
    $nexturl = Horde::applicationURL($nexturl);
?>    
<table border="0" cellpadding="1" cellspacing="0" width="100%">
<tr>
  <th class="header">
  <?php echo (!$print_view) ? Horde::link($prevurl, _("Last Month")) . Horde::img('nav/left.gif', '&lt;', null, $GLOBALS['registry']->getParam('graphics', 'horde')) . '</a>' : '' ?>
  <?php echo $title ?>
  <?php echo (!$print_view) ? Horde::link($nexturl, _("Next Month")) . Horde::img('nav/right.gif', '&gt;', null, $GLOBALS['registry']->getParam('graphics', 'horde')) . '</a>' : '' ?>
  </th>
</tr>

<tr><td class="control"><table border="0" cellpadding="2" cellspacing="1" width="100%">

<tr>
<?php if (!$prefs->getValue('week_start_monday')): ?>
<th class="control"><?php echo _("Sunday") ?></th>
<?php endif; ?>
<th class="control"><?php echo _("Monday") ?></th>
<th class="control"><?php echo _("Tuesday") ?></th>
<th class="control"><?php echo _("Wednesday") ?></th>
<th class="control"><?php echo _("Thursday") ?></th>
<th class="control"><?php echo _("Friday") ?></th>
<th class="control"><?php echo _("Saturday") ?></th>
<?php if ($prefs->getValue('week_start_monday')): ?>
<th class="control"><?php echo _("Sunday") ?></th>
<?php endif; ?>
</tr>

<tr>
