Location: PHPKode > projects > Content*Builder > contentbuilder/plugins/events/eventOverview.inc.php
<?php
$eventData = array();

/* 
* Periode in Session speichern, wenn neue Periode gewählt wurde 
*/
if(isset($eventPeriodSelect)) {
	if(strlen($newSelectedMonth) < 2) {
		$newSelectedMonth = "0".$newSelectedMonth;
	}
	$_SESSION[selectedMonth] = $newSelectedMonth;
	$_SESSION[selectedYear]  = $newSelectedYear;
}

/* 
* Wenn kein spezieller Monat im Jahr angezeigt werden soll, 
* wird der aktuelle Monat genommen
*/
if(!session_is_registered("selectedMonth") || !session_is_registered("selectedYear")) {
	$selectedDate  = new Date();
	$selectedDate->setDay("01");
	$selectedMonth = $selectedDate->getMonth();
	$selectedYear  = $selectedDate->getYear();
} else {
	$selectedDate  = new Date($_SESSION[selectedYear].$_SESSION[selectedMonth]."01");
	$selectedYear  = $_SESSION[selectedYear];
	$selectedMonth = $_SESSION[selectedMonth];
}

/*
* tage herausfinden, an denen im Zielmonat Events stattfinden.
*/
$eventQuery = mysql_query("SELECT * FROM ".TABLE."_events WHERE MONTH(eventDate) = '$selectedMonth' AND YEAR(eventDate) = '$selectedYear'");
while($eventRow = mysql_fetch_object($eventQuery)) {
	$eventDate = new Date($eventRow->eventDate);
	$eventDay[$eventDate->getDay()] = 1;
}

/*
* Template Name für Woche definieren
* separates definieren der Daten, da Permanent und Plugin sonst 
* Schwierigkeiten haben, zur gleichen Zeit verschiedene Perioden 
* darzustellen
*/
$calendarEvents = $eventDay;
$calendarDate   = &$selectedDate;
$calendarMonth  = $selectedMonth;
$calendarYear   = $selectedYear;
$templateDaysOfWeek = "event:month:days";
include($pluginLocation."/calendar.inc.php");

/* 
* Namen der Monate herausfinden
*/
$monthNames = Date_Calc::getMonthNames();
$eventData['month']['data']     = $monthNames;
$eventData['month']['selected'] = $selectedDate->getMonth();

$tpl->assign("eventData", $eventData);

/* 
* Ausgabe des Kalenders
*/
$mainPluginContent[]  = $tpl->fetch($config['templates']."monthView.template", null, "pluginEvent".$cbUserID);
$mainMessageContent[] = $tpl->fetch($config['templates']."messages.template", null, "pluginEvent".$cbUserID);
?>
Return current item: Content*Builder