Location: PHPKode > scripts > GigKalender > calendar/table.php
<?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.
*/
  include_once($Path."includes/error_reporting.php");
  include_once($Path."gigkalender.ini.php");
  include_once($Path."functions/standard.php");
  include_once($Path."includes/frontend_language_selector.php");
  
  if ( !$XXX ) $SetupFrontendCalendarPeriodSelector = getSetup('SetupFrontendCalendarPeriodSelector');
    else $SetupFrontendCalendarPeriodSelector = 'past';
  $Monatsmerker = '';
  echo '<div id="Table">';
      if ( GigsPublished($SetupFrontendCalendarPeriodSelector) )
      {
        echo '<table summary="CalendarTable">';
        if (getSetup('SetupFrontendCalendarShowTableHeads'))
        {
          echo '<tr>';
          // GigDate
            echo '<th>'.$L_GigDate.'</th>';
          // GigBeginning
            echo '<th>'.$L_GigBeginning.'</th>';
          // Spalten definieren
            $Attributes = getSetup ('SetupFrontendAttributes');
            if ( $Attributes!="" ) $Attributes = explode (', ',$Attributes);
            else $Attributes = array();
            $amountAttributes = count($Attributes);
            for ($i=0; $i<$amountAttributes; $i++)
            {
              echo '<th>'.${"L_$Attributes[$i]"}.'</th>';
            }
            echo '<th>'.$L_GigDetails.'</th>';
            echo '</tr>';
         }
        $SQL = "SELECT * FROM ".$prefix."gigs WHERE GigPublish=1 AND (GigStatus='Gig' OR GigStatus='Option')";
        if ( $ArtistSelector!="" ) $SQL .= " AND GigArtist='".$ArtistSelector."' ";
        switch ($SetupFrontendCalendarPeriodSelector)
        {
          case 'all': $SQL .=  'order by GigDate'; break;
          case 'future': $SQL .=  'order by GigDate'; break;
          case 'past': $SQL .=  'order by GigDate DESC'; break;
        }
        $resultat = mysql_query($SQL);
        $x = 0;
        while ($row = mysql_fetch_array($resultat) AND $x<getSetup('SetupFrontendCalendarMaxAmountOfGigs') )
        {
          extract($row);
          if
          (
            $SetupFrontendCalendarPeriodSelector=='all'
            OR ($SetupFrontendCalendarPeriodSelector=='future' AND DatumInZukunft($GigDate))
            OR ($SetupFrontendCalendarPeriodSelector=='past' AND !DatumInZukunft($GigDate))
          )
          {
          $temp = DatumAusTimestamp ($GigDate);
          if ( CheckGigPublish($GigID) )
	        {
            $Attributes = getSetup ('SetupFrontendAttributes');
            if ( $Attributes!="" ) $Attributes = explode (', ',$Attributes);
              else $Attributes = array();
            // Monats-Separator ausgeben
            $Monat = date('m', $GigDate);
            $MonatsName = MonatsNameVonDatum($Monat);
            $Jahr = date('Y', $GigDate);
            $AmountCols = $amountAttributes+3;
            if ( getSetup('SetupFrontendCalendarShowMonthlySeparator') AND $Monatsmerker!=$Monat ) echo '<tr><td colspan="'.$AmountCols.'" class="NameOfMonth">'.$MonatsName.' '.$Jahr.'</td></tr>';
	          $Monatsmerker = $Monat;
            echo '<tr>';
            // GigDate
              echo '<td class="GigDate" style="white-space: nowrap;">';
              include ($Path.'calendar/includes/frontend/GigDate.php');
              echo '</td>';
            // GigBeginning
              echo '<td class="GigBeginning" style="white-space: nowrap;">';
              include ($Path.'calendar/includes/frontend/GigBeginning.php');
              echo '</td>';
            // Spalten definieren
              
              $FrontendType = 'table';
              for ($i=0; $i<$amountAttributes; $i++)
              {
                echo '<td class="'.$Attributes[$i].'" style="white-space: nowrap;">';
                include($Path."calendar/includes/frontend/".$Attributes[$i].".php");
                echo '</td>';
              }
            echo '<td class="showGigDetails">';
            include ($Path.'calendar/includes/frontend/showGigDetails.php');
            echo '</td>';
            print '</tr>';
            $x++;
	        }
        }
      }
      echo "</table>";
    }
    else { echo $L_013."<br />";  }
    echo '</div>';
?>
Return current item: GigKalender