function fetchMarkerData($wochentag) { if ($wochentag != "alle") { $wochentagCode = $wochentag % 7; } $itemsListArrayAll = fetch_bauern_region_list(""); // all bauern $itemsListArrayOpen = fetch_bauern_region_list($wochentagCode); // only open bauern $markerData = array(); // add bauern markers foreach ($itemsListArrayAll as $ID => $regionName) { $markerData[] = getBauerMarkerData($ID, $itemsListArrayOpen); } return $markerData; }
<tr valign="top"> <td background="images/higru.jpg" valig="top"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="36" height="418" valign="top"> </td> <td height="418" valign="top"> <?php $wochentagCode = display_weekday_selection($wochentag, "schmalzbrot"); $itemsListArray = fetch_bauern_region_list($wochentagCode); foreach ($itemsListArray as $ID => $regionName) { if ($regionName != $oldRegionName) { if (isset($oldRegionName)) { echo "<br>"; } // if this is not the first call viewRegionSplit($regionName); $oldRegionName = $regionName; } echo "<br>"; viewItemDetail($ID, "list"); } ?>
function display_weekday_selection($wochentag, $type) { // type = schmalzbrot, gmap global $weekdayStringArray, $weekdayShortStringArray, $CmsLinkOverview; $weekDayTodayCode = date("w", getCETDateTime()); // 0 is sunday ... 6 is saturday $cap_showBauer3 = getDbText("bauer_showBauer3"); if ($wochentag == 'heute') { $wochentag = $weekDayTodayCode; } if (isset($wochentag) && $wochentag != "alle") { $wochentagCode = $wochentag % 7; if ($wochentagCode == $weekDayTodayCode) { $weekDayTodaySelected = " selected"; } if ($wochentagCode == ($weekDayTodayCode + 1) % 7) { $weekDayTomorrowSelected = " selected"; } } else { $wochentag = "alle"; } // no or wrong parameter given $weekdaySelectStyle = $type == "gmap" ? " style='height:20px;margin-bottom:5px;'" : ""; ?> <!-- WEEKDAY - SELECT - Start --> <div id="weekdaySelect"<?php echo $weekdaySelectStyle; ?> > <center> <div id="weekdaySelectDays"> <?php echo '<a target="_parent" id="weekdaySelect_alle" href="' . $CmsLinkOverview . '&wochentag=alle"' . ($wochentag == 'alle' ? ' class="active"' : '') . ($type == 'gmap' ? ' onclick="mbgm_fetchBauern(\'alle\'); return false;"' : '') . '>' . $cap_showBauer3 . '</a>'; echo "<span> Offen: </span>"; echo '<a target="_parent" id="weekdaySelect_' . $weekDayTodayCode . '" href="' . $CmsLinkOverview . '"' . ($wochentagCode == $weekDayTodayCode ? ' class="active"' : '') . ($type == 'gmap' ? ' onclick="mbgm_fetchBauern(\'' . $weekDayTodayCode . '\'); return false;"' : '') . '>heute</a>'; $codeTomorrow = ($weekDayTodayCode + 1) % 7; echo '<a target="_parent" id="weekdaySelect_' . $codeTomorrow . '" href="' . $CmsLinkOverview . '&wochentag=' . $codeTomorrow . '"' . ($wochentagCode === $codeTomorrow ? ' class="active"' : '') . ($type == 'gmap' ? ' onclick="mbgm_fetchBauern(\'' . $codeTomorrow . '\'); return false;"' : '') . '>morgen</a>'; for ($i = 1; $i < 6; $i++) { $todayCode = ($weekDayTodayCode + 1 + $i) % 7; echo '<a target="_parent" id="weekdaySelect_' . $todayCode . '" href="' . $CmsLinkOverview . '&wochentag=' . $todayCode . '"' . ($wochentagCode === $todayCode ? ' class="active"' : '') . ($type == 'gmap' ? ' onclick="mbgm_fetchBauern(\'' . $todayCode . '\'); return false;"' : '') . '>' . $weekdayStringArray[$todayCode] . '</a>'; } //for ?> </div> <!-- <div id="weekdaySelectDays"> --> <?php if ($type == "schmalzbrot") { /* echo(tageswetter("0"));// heute echo(tageswetter("1"));//morgen echo(tageswetter("2"));//�bermorgen echo(tageswetter("3"));//��morgen echo(tageswetter("4"));//���morgen */ echo "<div id='bauernListe'>"; // echo"<span>Auf dieser Seite zu folgendem Bauern springen: </span>"; $itemsListArray = fetch_bauern_region_list($wochentagCode); echo createMostbauernDropdownList("betriebeInUebersicht", "jo", FALSE, $itemsListArray); echo "</div>"; } ?> </center> </div> <!-- <div id="weekdaySelect"> --> <div id="weekdaySelectReset"> </div> <!-- WEEKDAY - SELECT - End --> <?php return $wochentagCode; }
<table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="36" height="418" valign="top"> </td> <td height="418" valign="top"> <?php $wochentagCode = display_weekday_selection($wochentag, "gmap"); ?> <div id="actionBox"> <div id="actionBoxWorking">Do muaß i gach nochfrog'n ...</div> <?php $prevRegionName = ""; $itemsListArray = fetch_bauern_region_list(""); // fetch all foreach ($itemsListArray as $ID => $regionName) { $itemResult = mysql_query("SELECT id, name, famName, regionID FROM " . $tablePrefix . "bauer WHERE ID={$ID}") or die("mb_gmaps_backend.php;fetchReturnData(): Database error (" . mysql_error() . ")"); list($id, $name, $famName, $regionID) = mysql_fetch_row($itemResult); // generate region-item if neccessary if ($regionName != $prevRegionName) { if ($prevRegionName != "") { ?> </ul></li></ul> <!-- close current region --> <?php } ?> <ul> <li id="region_<?php echo $regionID;