<?php
/*
    CREATIVE COMMONS - Attribution-No Derivative Works 3.0 Germany:
    - You may not alter, transform, or build upon this work.
    - Dieses Werk darf nicht bearbeitet oder in anderer Weise verändert werden.
*/
  echo '<div id="List">';
  // output gigs
  if ($gigCount!=NULL) {
    $SetupFrontendCalendarShowMonthlySeparator = getSetup('SetupFrontendCalendarShowMonthlySeparator');
    $SetupFrontendCalendarCharsInFields = getSetup('SetupFrontendCalendarCharsInFields');
    $Attributes = explode (', ',getSetup ('SetupFrontendAttributes'));
    $currentMonth = '';
    echo '<table>';
    while ($row = mysqli_fetch_array($Result)) {
      extract($row);
      if ($GigNotes == "") $GigNotes = "&nbsp;";
      $Month = date('m', $GigDate);
      $NameOfMonth = getNameOfMonthFromNumberOfMonth($Month);
      $Year = date('Y', $GigDate);
      if ($currentMonth!=$Month AND $SetupFrontendCalendarShowMonthlySeparator)
        echo '<tr><td colspan="3" class="NameOfMonth">'.$NameOfMonth.' '.$Year.'</td></tr>';
      $currentMonth = $Month;
      echo '<tr>';
      // GigDate
        echo '<td class="GigDate">';
        include ($Path.'calendar/includes/frontend/GigDate.php');
        echo '</td>';
      // GigBeginning
        echo '<td class="GigBeginning">';
        include ($Path.'calendar/includes/frontend/GigBeginning.php');
        echo '</td>';
      // Spalten definieren
        echo '<td class="GigListAttributes">';
        $FrontendType = 'list';
        $AmountOfAttributes = count($Attributes);
        for ($i=0; $i<$AmountOfAttributes; $i++)
          include ($Path.'calendar/includes/frontend/'.$Attributes[$i].'.php');
        echo '</td>';
      echo '</tr>'; }
    echo '</table>'; }
  else {
    if ( $SetupFrontendCalendarPeriodSelector=="future" ) echo $L_013."<br />";
    elseif ( $SetupFrontendCalendarPeriodSelector=="past" ) echo $L_014."<br />";
    elseif ( $SetupFrontendCalendarPeriodSelector=="all" ) echo $L_206."<br />"; }
  echo '</div>';
?>