<?php
/*
*
* "KALENDER"
* ----------
*
* A tiny calendar app for MODx.
*
* Created by: Danny van Ommen ([email protected])
* Created on: November 27, 2006
*
* Modified by: Wim Beerens ([email protected])
* Last modified on: November 19, 2008
*
* Added some parameters for more flexible use
*
* Modified on: November 19, 2008
* Added timezone to prevent php5 errors
* Added modx version check because of changed value of rb_base_dir
*
* Modified on: April 5, 2007
* Added internationalization
* Added highlighting of the current day
* Added linking to published pages
*
* Version: 1.2
*
*
* Details
* -------
*
* "KALENDER", which is basically Dutch for "Calendar",
* is a simple calendar tool that can be embedded into a website using
* the MODx content management system.
*
*
* Installing
* ----------
*
* 1. Download the snippet zip file from the MODx Repository.
*
* 2. Extract the snippet zip file and place it as a folder called "kalender" in
* your "/assets/snippets/" folder on your server.
*
* 3. You will find the following files and folders extracted:
*
* => readme.txt
* => kalender_screenshots.gif
* => kalender_snippet.php
* => themes
* => gold
* => images
* => (images - *.gif files)
* => theme.css
* => theme.php
* => js
* => (overLib Javascript library - *.js files)
*
* 4. Create a new snippet called "Kalender" at the MODx Manager
* (Resources=>Manager Resources=>Snippets=>New snippet)
*
* 5. Copy and paste everything from the file "kalender_snippet_copy_this.php"
* as Snippet code and "Save".
*
*
* Embedding Kalender into your template
* -------------------------------------
*
* To display the calendar to your website template, just use this snippet call:
*
* [!Kalender?&parent=`1257`!]
*
* Where &parent=`1257` points to the document id number where Kalender data resides.
*
* MODx content documents that are stored as 'children' of $parent will feed Kalender.
*
*
* Managing Kalender data using the MODx manager
* ---------------------------------------------
*
* 1) Only documents that are not a folder (isfolder=0) that is placed either directly
* as a 'child-document' or any level below $parent will be reflected in the
* Kalender.
*
* 2) Use 'pub_date' to mark your event in the Kalender.
*
* 3) You may also use 'unpub_date' for events that will last more than 1 day long.
*
* 4) Use "00:00:00" (midnight) to leave time notations blank.
*
* 5) When modifying the theme, take note that all CSS classes located in "theme.css"
* as well as PHP variables located in "theme.php" MUST remain in-tact.
*
* * New themes may be created by simply copying all elements in the default 'gold'
* theme folder and pasting it as a new folder with a new theme name of your
* choice.
*
* More on Themes
* --------------
*
*
* By default, we have the 'gold' theme available for you.
*
* But if you wish to create your own theme, just create a new folder in the "themes"
* directory and copy EVERYTHING from the default 'gold' folder.
*
* You are free to change the values, dimensions, etc of the theme files.
* But it is IMPORTANT that you retain all file names, css classes and php
* variables intact.
*
* Example:
*
* If I wanted to create an "aqua" theme my file structure would look like:
*
* => themes
* => gold
* => images
* => (images - *.gif files)
* => theme.css
* => theme.php
* => aqua
* => images
* => (images - *.gif files)
* => theme.css
* => theme.php
*
* And my snippet call would look like this:
*
* [!Kalender?&parent=`1257` &theme=`aqua`!]
*
*
* Snippet Parameters Explained
* ----------------------------
*
* $theme [string] ['gold'] : Color theme (should be same name as theme folder).
*
* $parent [int] [-1] : MODx document/folder id where calendar documents are stored.
*
* $mm [int] [current month] : Month without leading zeros. Defaults to current month
* when blank.
*
* $yyyy [int] [current year] : Year. Defaults to current year when blank.
*
*
* Added parameters:
* -----------------
*
* $timezone [string]
* Set timezone as described on http://us2.php.net/manual/en/function.date-default-timezone-set.php
* this parameter is added to prevent php5 error messages
* You could also past this into the settings tab at default settings:
* &timezone=Timezone link text;string;America/Los_Angeles
*
* $lang [string] [ 'en' | 'de' | 'fr' | 'nl' (etc.) ]
* language to use for the calendar
*
* $dateFormat [string] [ 'mdy' | 'dmy' ]
* `mdy` will display in English format i.e. March 21, 2007 (default)
* `dmy` will display in other format i.e. 21 March 2007
*
* $dayLen [int] [ 1 | 2 | 3 ]
* Number of characters from the daynames to show (max. 3)
*
* $showInfo [string] [ 'intro' | 'content' | 'both' ]
* `intro` will show summary (introtext) only
* `content` will show content only
* `both` will show both introtext and content (default)
*
* $links [int] [ 0 | 1 ]
* 0 just highlights dates with events
* 1 will make dates with events linkable
*
* Credits
* -------
*
* As with all calendar apps, this one isn't the most original so credit goes to
* where credit is due.
*
* 1) The idea for this snippet came out of EasyPHPCalendar.
* (http://www.easyphpcalendar.com)
*
* 2) Also, Kalender extensively uses Erik Bosrup's "overLib" Javascript library
* (http://www.bosrup.com/web/overlib)
*
* License
* -------
*
* Everything's FREE. No restrictions. Seriously.
*
* Just remember, you're using this at your own risk.
*
* But if you want to modify, expand and change the code, feel absolutely free to do so.
*
* Just keep in mind to respect Erik Bosrup's license when using his overLib Javascript
* library.
*
*/
// set timezone
// to prevent errors in PHP5 this must stay on top
(isset($timezone)) ? $timezone : $timezone="America/Los_Angeles";
date_default_timezone_set($timezone);
// snippet parameters
// $parent [ folder id ]
(isset($parent)) ? $parent : $parent = "-1";
// $theme [ gold (default) ]
(isset($theme)) ? $theme : $theme = "gold";
// $mm [ month ]
(isset($mm)) ? $mm : $mm = date("n");
// $yyyy [ year ]
(isset($yyyy)) ? $yyyy : $yyyy = date("Y");
// $lang [ language ]
(isset($lang)) ? $lang : $lang = "en";
// $dateFormat [ mdy (default) | dmy ]
(isset($dateFormat)) ? $dateFormat : $dateFormat = "mdy";
// $dayLen [ 1 (default) | 2 | 3 ]
(isset($dayLen)) ? $dayLen: $dayLen = "1";
// $showInfo [ intro | content | both (default) ]
(isset($showInfo)) ? $showInfo : $showInfo = "both";
// $links [ 0 (default) | 1 ]
(isset($links)) ? $links: $links = "0";
// config
$url = $modx->config['site_url'];
$base_path = $modx->config['base_path'];
$rb_base_dir = $modx->config['rb_base_dir'];
$version = $modx->config['settings_version'];
if($version < '0.9.6.2') {
$assets_path = substr($rb_base_dir, (strlen($base_path)));
} else {
$assets_path = $rb_base_dir;
}
// if Kalender is installed in a different directory, change it here
$pathPrefix = $assets_path."snippets/kalender";
$themePath = $pathPrefix."/themes/".$theme."/";
$includePath = $pathPrefix."/themes/".$theme."/";
$cssTheme = $includePath."theme.css";
$jsOverLib = $pathPrefix."/js/overlib.js";
$url_prefix = "index.php?id=" . $modx->documentObject['id'] . "&";
$dbase = $modx->dbConfig['dbase'];
$tbl_prefix = $modx->dbConfig['table_prefix'];
$dbase_tbl = $dbase.".".$tbl_prefix;
$site_content = $dbase_tbl."site_content";
// include theme settings
include($includePath."theme.php");
// internationalization
$locale = $lang.'_'.strtoupper($lang);
setlocale (LC_TIME, $locale);
// number of characters of daynames more than 3: default to 1
if($dayLen > 3) {
$dayLen = 1;
}
// default month and year as of today
if(is_numeric($_GET["mo"]) && $_GET["mo"]!=""){
$mm = $_GET["mo"];
}
if(is_numeric($_GET["yr"]) && $_GET["yr"]!=""){
$yyyy = $_GET["yr"];
}
//if(!is_numeric($mm)) $mm = date("n");
//if(!is_numeric($yyyy)) $yyyy = date("Y");
$month = strftime("%B",strtotime($mm."/1/".$yyyy));
$maxdays = date("t",strtotime($mm."/1/".$yyyy));
$prevMonth_mm = $mm - 1;
if($prevMonth_mm==0) $prevMonth_mm = 12;
$prevMonth_yyyy = $yyyy;
if($prevMonth_mm==12) $prevMonth_yyyy = $yyyy-1;
$prevMonth_maxdays = date("t",strtotime($prevMonth_mm."/1/".$yyyy));
$prevMonth_d = 0;
$nextMonth_mm = $mm + 1;
if($nextMonth_mm==13) $nextMonth_mm = 1;
$nextMonth_yyyy = $yyyy;
if($nextMonth_mm==1) $nextMonth_yyyy = $yyyy+1;
$nextMonth_maxdays = date("t",strtotime($nextMonth_mm."/1/".$yyyy));
$nextMonth_d = 0;
// get calendar events from modx content database for the selected month
$strtotime_month_start = strtotime($mm."/1/".$yyyy." 00:00:00");
$strtotime_month_end = strtotime($mm."/".$maxdays."/".$yyyy." 23:59:59");
// get parent where clause to dig and get all non-folder documents within sub-folders of the parent folder
$parentWhere[] = $parent;
$parentWhere_tmp[] = $parent;
$parent_count = 0;
do{
if(is_array($childParentWhere_tmp)){
$parentWhere_tmp = $childParentWhere_tmp;
unset($childParentWhere_tmp);
}
else{
$parent_count = 0;
}
foreach($parentWhere_tmp as $p){
$sql = "SELECT ".$site_content.".id"
." FROM ".$site_content
." WHERE ".$site_content.".parent=".$p
." AND ".$site_content.".isfolder=1;";
$rs = $modx->dbQuery($sql);
$parent_count = $modx->recordCount($rs);
for($i=0 ; $i<$parent_count ; $i++){
$row = $modx->fetchRow($rs);
$parentWhere[] = $row["id"];
$childParentWhere_tmp[] = $row["id"];
}
}
} while ($parent_count > 0);
$parentWhere_str = "";
foreach($parentWhere as $p){
if($parentWhere_str!="") $parentWhere_str .= " OR";
$parentWhere_str .= " ".$site_content.".parent=".$p;
}
$sql = "SELECT "
.$site_content.".id"
.",".$site_content.".pagetitle"
.",".$site_content.".longtitle"
.",".$site_content.".menutitle"
.",".$site_content.".description";
if(($showInfo=="intro") or ($showInfo=="both")){
$sql = $sql.",".$site_content.".introtext";
};
if(($showInfo=="content") or ($showInfo=="both")){
$sql = $sql.",".$site_content.".content";
};
$sql = $sql
.",".$site_content.".menuindex"
.",".$site_content.".pub_date"
.",".$site_content.".unpub_date"
." FROM ".$site_content
." WHERE"
." (".$parentWhere_str.")"
." AND ".$site_content.".isfolder=0"
." AND (("
." ".$site_content.".pub_date>=".$strtotime_month_start
." AND ".$site_content.".pub_date<=".$strtotime_month_end
.")"
." OR ("
." ".$site_content.".unpub_date>=".$strtotime_month_start
." AND ".$site_content.".unpub_date<=".$strtotime_month_end
."))"
." ORDER BY ".$site_content.".pub_date"
.",".$site_content.".menuindex"
." ASC";
$rs = $modx->dbQuery($sql);
$rs_count = $modx->recordCount($rs);
$snippetNameArray = array();
for ($i = 0; $i < $rs_count; $i++){
$row = $modx->fetchRow($rs);
if($row["pub_date"]>=$strtotime_month_start && $row["pub_date"]<=$strtotime_month_end){
$d = date("j",$row["pub_date"]);
$monthEventsArray[$d][] = $row;
}
if($row["unpub_date"]>0){
$unpub_strtotime_difference = $row["unpub_date"] - $row["pub_date"];
if($unpub_strtotime_difference>0){
if($row["pub_date"]>=$strtotime_month_start && $row["pub_date"]<=$strtotime_month_end){
$unpub_days_difference = round($unpub_strtotime_difference/(60*60*24));
$unpub_last_day = intval($d + $unpub_days_difference);
$unpub_j = $d+1;
}
else if($row["pub_date"]<$strtotime_month_start){
$unpub_j = 1;
$unpub_last_day = date("j",$row["unpub_date"]);
}
if($unpub_last_day > $maxdays){
$unpub_last_day = $maxdays;
}
for($j=$unpub_j ; $j<=$unpub_last_day ; $j++){
$monthEventsArray[$j][] = $row;
}
}
}
}
?>
<link type="text/css" rel="stylesheet" href="<? echo $cssTheme; ?>" />
<script type="text/javascript" src="<? echo $jsOverLib; ?>"><!-- overLIB (c) Erik Bosrup --></script>
<script type="text/javascript">
var ol_fgcolor = "#ffffff";
var ol_textfont = "Verdana";
var ol_cellpad = 0;
var ol_bgcolor = "#777777";
var ol_border = 1;
</script>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<table border="0" cellpadding="2" cellspacing="1" class="kalender-menu">
<tr>
<td align="right">
<table border="0" cellpadding="0" cellspacing="0" align="right">
<tr>
<td align="right">
<div class="kalender-previous"><a href="<? echo $url_prefix; ?>mo=<? echo $prevMonth_mm; ?>&yr=<? echo $prevMonth_yyyy; ?>"><img src="<? echo $themePath; ?>images/previous.gif" border="0" width="15" height="14" onMouseOver="this.src='<? echo $themePath; ?>images/previous_over.gif';" onMouseOut="this.src='<? echo $themePath; ?>images/previous.gif';" style="cursor:pointer;"></a></div>
</td>
<td align="left">
<div class="kalender-next"><a href="<? echo $url_prefix; ?>mo=<? echo $nextMonth_mm; ?>&yr=<? echo $nextMonth_yyyy; ?>"><img src="<? echo $themePath; ?>images/next.gif" border="0" width="15" height="14" onMouseOver="this.src='<? echo $themePath; ?>images/next_over.gif';" onMouseOut="this.src='<? echo $themePath; ?>images/next.gif';" style="cursor:pointer;"></a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="2" cellspacing="1" class="kalender">
<tr>
<td colspan="7" align="center" class="kalender-month">
<? echo utf8_encode($month).' '.$yyyy; ?>
</td>
</tr>
<?
$maxdays = date("t",strtotime($mm."/1/".$yyyy));
$firstday = date("w",strtotime($mm."/1/".$yyyy));
$difdays = 8 - $firstday;
?>
<tr>
<?
for($count = 0;$count<=6;$count++){
$tmpday = $difdays + $count;
$showday = strftime("%a",strtotime($mm."/".$tmpday."/".$yyyy));
?>
<td nowrap align="center" class="kalender-week">
<? echo substr($showday, 0, $dayLen); ?>
</td>
<?
} // end for $count
?>
</tr>
<?
if($firstday==6 && $maxdays>=30){
// six rows when first day is saturday and max days is 30 or 31
$weekrows = 6;
}
else if($firstday==0 && $maxdays==28){
// four rows when first day is sunday and max days is 28
$weekrows = 4;
}
else{
// all other months have 5 calendar rows
$weekrows = 5;
}
$d = 0;
$highlightGroup = 1;
$changeHighlight = true;
for($row=0 ; $row<$weekrows ; $row++){
?>
<tr>
<?
// calendar details
// week
for($w=0 ; $w<=6 ; $w++){
$tooltip = "";
$html = "";
if($row==0 && $d==0 && $w==$firstday) $d = 1;
else if($d>0) $d++;
if($d>0 && $d<=$maxdays){
$dd = $d;
}else{
if($d==0){
// calculate previous month
if($prevMonth_d==0){
$prevMonth_d = ($prevMonth_maxdays - $firstday) + 1;
}
else{
$prevMonth_d++;
}
$dd = $prevMonth_d;
}
else if($d>$maxdays){
// calculate next month
$nextMonth_d++;
$dd = $nextMonth_d;
}
else{
$dd = "";
}
}
if($d>0 && $d<=$maxdays){
if(is_array($monthEventsArray) && array_key_exists($d,$monthEventsArray)){
$changeHighlight = true;
if(is_array($yesterdayIDArray)){
foreach($monthEventsArray[$d] as $monthEvent){
if(in_array($monthEvent["id"],$yesterdayIDArray)){
$changeHighlight = false;
}
}
unset($yesterdayIDArray);
}
if($changeHighlight==true){
$highlightGroup++;
if($highlightGroup>3) $highlightGroup = 1;
}
$toolTipHighlightClass = "kalender-tooltip-highlight_".$highlightGroup;
$html = "<table border=0 cellpadding=2 cellspacing=1 width=100%>";
$html.= "<tr><td align=\'center\' valign=\'middle\' class=\'kalender-tooltip-day\'>";
if($dateFormat == "mdy") {
$html.= strftime("%A, %b. %d",strtotime($mm."/".$d."/".$yyyy)).", ".$yyyy;
} else {
$html.= strftime("%A %d %b.",strtotime($mm."/".$d."/".$yyyy))." ".$yyyy;
}
$thisMonthsEventsArray = $monthEventsArray[$d];
/* sort by hour
$thisMonthsEventsArray = array();
$e = 0;
foreach($monthEventsArray[$d] as $monthEvent){
$thisMonthsEventsArray[$monthEvent["pub_date"]."_".$e] = $monthEvent;
$e++;
}
ksort($thisMonthsEventsArray);
*/
foreach($thisMonthsEventsArray as $monthEvent){
$yesterdayIDArray[] = $monthEvent["id"];
$toolTipRowClass = "kalender-tooltip-row_1";
$html.= "<tr><td align=\'left\' valign=\'top\' class=\'".$toolTipHighlightClass."\'>";
$html.= addslashes(str_replace('"',"'",$monthEvent["longtitle"]));
$html.= "</td></tr>";
$eventTime = "";
if(date("H:i",$monthEvent["pub_date"])!="00:00"){
$eventTime = date("h:ia",$monthEvent["pub_date"]);
if($monthEvent["unpub_date"]!=0){
if(date("m-d-Y",$monthEvent["pub_date"])==date("m-d-Y",$monthEvent["unpub_date"])){
if($monthEvent["unpub_date"]>$monthEvent["pub_date"]){
if(date("H:i",$monthEvent["unpub_date"])!="00:00"){
$eventTime .= " to ";
$eventTime .= date("h:ia",$monthEvent["unpub_date"]);
}
}
}
}
$html.= "<tr><td align=\'left\' valign=\'top\' class=\'".$toolTipRowClass."\'>";
$html.= addslashes(str_replace('"',"'",$eventTime));
$html.= "</td></tr>";
if($toolTipRowClass=="kalender-tooltip-row_1") $toolTipRowClass = "kalender-tooltip-row_2";
else $toolTipRowClass = "kalender-tooltip-row_1";
}
if($monthEvent["description"]!=""){
$html.= "<tr><td align=\'left\' valign=\'top\' class=\'".$toolTipRowClass."\'>";
$html.= addslashes(str_replace('"',"'",preg_replace('/\r|\n/','',$monthEvent["description"])));
$html.= "</td></tr>";
if($toolTipRowClass=="kalender-tooltip-row_1") $toolTipRowClass = "kalender-tooltip-row_2";
else $toolTipRowClass = "kalender-tooltip-row_1";
}
if($monthEvent["introtext"]!=""){
$html.= "<tr><td align=\'left\' valign=\'top\' class=\'".$toolTipRowClass."\'>";
$html.= addslashes(str_replace('"',"'",preg_replace('/\r|\n/','',$monthEvent["introtext"])));
$html.= "</td></tr>";
if($toolTipRowClass=="kalender-tooltip-row_1") $toolTipRowClass = "kalender-tooltip-row_2";
else $toolTipRowClass = "kalender-tooltip-row_1";
}
if($monthEvent["content"]!=""){
$html.= "<tr><td align=\'left\' valign=\'top\' class=\'".$toolTipRowClass."\'>";
$html.= addslashes(str_replace('"',"'",preg_replace('/\r|\n/','',$monthEvent["content"])));
$html.= "</td></tr>";
if($toolTipRowClass=="kalender-tooltip-row_1") $toolTipRowClass = "kalender-tooltip-row_2";
else $toolTipRowClass = "kalender-tooltip-row_1";
}
$html.= "<tr><td class=\'kalender-tooltip-row_shadow\'></td></tr>";
}
$html.= "</td></tr></table>";
$overlib_over = "return overlib('".$html."', CENTER, OFFSETY, 18);";
$overlib_out = "return nd();";
$overlib_click = "";
// current month
if($w==0 || $w==6){
// weekends
$cssClass = "kalender-dayWeekendHighlight_".$highlightGroup;
$td_over = "this.style.backgroundColor='".$dayWeekendHighlight_hover["bgColor"][$highlightGroup]."';";
$td_out = "this.style.backgroundColor='".$dayWeekendHighlight["bgColor"][$highlightGroup]."';";
$td_click = "";
}
else{
// weekday
$cssClass = "kalender-dayHighlight_".$highlightGroup;
$td_over = "this.style.backgroundColor='".$dayHighlight_hover["bgColor"][$highlightGroup]."';";
$td_out = "this.style.backgroundColor='".$dayHighlight["bgColor"][$highlightGroup]."';";
$td_click = "";
}
$tooltip = "onMouseOver=\"".$td_over." ".$overlib_over."\"";
$tooltip.= " onMouseOut=\"".$td_out." ".$overlib_out."\"";
$tooltip.= " onMouseClick=\"".$td_click." ".$overlib_click."\"";
}
else{
// current month
if($w==0 || $w==6){
// weekends
$cssClass = "kalender-dayWeekend";
}
else{
// default day
$cssClass = "kalender-dayDefault";
}
$tooltip = "";
}
// check if date is current date
if(date("d m y",strtotime("now"))==date("d m y",strtotime($mm."/".$dd."/".$yyyy))){
$cssClass = $cssClass." kalender-dayCurrent";
}
}
else{
// previous months
$cssClass = "kalender-dayDim";
}
?>
<td nowrap align="center" class="<? echo $cssClass; ?>" <? echo $tooltip; ?>>
<?
if(($links=="1") and ($monthEvent["id"]<>'')){
$dd = '<a href="'.$url.'index.php?id='.$monthEvent["id"].'">'.$dd.'</a>';
$monthEvent["id"]='';
}
echo $dd;
?></td>
<?
}
?>
</tr>
<?
}
?>
</table>
<?
$html_jump = "";
$html_jump .= "<table border=\'0\' cellpadding=\'2\' cellspacing=\'1\' width=\'100%\'>";
$jump_rows = 7;
for($i=($jump_rows-1) ; $i>=0 ; $i--){
$minus = $jump_rows - round($jump_rows/2) - $i;
$jump_rows_yyyy = $yyyy;
$jump_rows_mm = $mm + $minus;
if($minus > 0 && $jump_rows_mm>=13){
$jump_rows_mm = $jump_rows_mm - 12;
$jump_rows_yyyy = $yyyy + 1;
}
if($minus < 0 && $jump_rows_mm<=0){
$jump_rows_mm = 12 + $jump_rows_mm;
$jump_rows_yyyy = $yyyy-1;
}
if($minus==0){
$td_over = "this.style.backgroundColor=\'".$jumpCurrentRow["bgColor"]."\';";
$td_out = "this.style.backgroundColor=\'".$jumpCurrentRow["bgColor"]."\';";
$td_class = "kalender-jump-current-row";
}
else{
$td_over = "this.style.backgroundColor=\'".$jumpRow_hover["bgColor"]."\';";
$td_out = "this.style.backgroundColor=\'".$jumpRow["bgColor"]."\';";
$td_class = "kalender-jump-row";
}
$html_jump .= "<tr>";
$html_jump .= "<td class=\'".$td_class."\' align=\'left\' onMouseOver=".$td_over." onMouseOut=".$td_out.">";
$html_jump .= "<a class=\'kalender-jump-row-text\' href=\'".$url_prefix."mo=".$jump_rows_mm."&yr=".$jump_rows_yyyy."\'>";
$html_jump .= utf8_encode(strftime("%B %Y",strtotime($jump_rows_mm."/1/".$jump_rows_yyyy)));
$html_jump .= "</a>";
$html_jump .= "</td>";
$html_jump .= "</tr>";
}
$html_jump .= "</table>";
$tooltip_jump = "onClick=\"return overlib('".$html_jump."', STICKY, NOCLOSE, ABOVE, HEIGHT, 112, WIDTH, 120, CENTER);\"";
$tooltip_jump.= " onMouseOut=\"nd();\"";
?>
<table border="0" cellpadding="2" cellspacing="1" class="kalender-menu">
<tr>
<td align="left">
<table border="0" cellpadding="0" cellspacing="0" align="left">
<tr>
<td align="right">
<div class="kalender-previous"><a href="<? echo $url_prefix; ?>mo=<? echo $prevMonth_mm; ?>&yr=<? echo $prevMonth_yyyy; ?>"><img src="<? echo $themePath; ?>images/previous.gif" border="0" width="15" height="14" onMouseOver="this.src='<? echo $themePath; ?>images/previous_over.gif';" onMouseOut="this.src='<? echo $themePath; ?>images/previous.gif';" style="cursor:pointer;"></a></div>
</td>
<td align="left">
<div class="kalender-next"><a href="<? echo $url_prefix; ?>mo=<? echo $nextMonth_mm; ?>&yr=<? echo $nextMonth_yyyy; ?>"><img src="<? echo $themePath; ?>images/next.gif" border="0" width="15" height="14" onMouseOver="this.src='<? echo $themePath; ?>images/next_over.gif';" onMouseOut="this.src='<? echo $themePath; ?>images/next.gif';" style="cursor:pointer;"></a></div>
</td>
</tr>
</table>
</td>
<td align="center">
<a href="<? echo $url_prefix; ?>mo=<? echo date("n"); ?>&yr=<? echo date("Y"); ?>" class="kalender-jump-link"><? echo strftime("%B %Y"); ?></a></td>
<td align="right">
<img src="<? echo $themePath."images/jump.gif"; ?>" border="0" width="15" height="14" align="right" onMouseOver="this.src='<? echo $themePath."images/jump_over.gif"; ?>';" onMouseOut="this.src='<? echo $themePath."images/jump.gif"; ?>';" <? echo $tooltip_jump; ?>></td>
</tr>
</table>
<?
?>