Location: PHPKode > scripts > GigKalender > calendar/list.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';
  $temp = '';
  echo '<div id="List">';

  if ( GigsPublished($SetupFrontendCalendarPeriodSelector) )
  { 
    $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);
    echo '<table summary="CalendarList">';
    $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))
      )
      {
        if ($GigNotes == "") {$GigNotes = "&nbsp;";}
        if ( CheckGigPublish($GigID) )
	      {
          $Monat = date('m', $GigDate);
          $MonatsName = MonatsNameVonDatum($Monat);
          $Jahr = date('Y', $GigDate);
          if ( getSetup('SetupFrontendCalendarShowMonthlySeparator') AND $temp!=$Monat ) echo '<tr><td colspan="4" class="NameOfMonth">'.$MonatsName.' '.$Jahr.'</td></tr>';
	        $temp = $Monat;
	        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
            $Attributes = getSetup ('SetupFrontendAttributes');
            if ( $Attributes!="" ) $Attributes = explode (', ',$Attributes);
            else $Attributes = array();
            echo '<td>';
            $FrontendType = 'list';
            $amountAttributes = count($Attributes);
            for ($i=0; $i<$amountAttributes; $i++)
            {
              include ($Path.'calendar/includes/frontend/'.$Attributes[$i].'.php');
            }
            include ($Path.'calendar/includes/frontend/showGigDetails.php');
            echo '</td>';
          echo '</tr>';
          $x++;
        }
      }
    }
    echo '</table>';
  }
  else
  {
    if ( $SetupFrontendCalendarPeriodSelector=="future" ) echo $L_013."<br />";
    if ( $SetupFrontendCalendarPeriodSelector=="past" ) echo $L_014."<br />";
    if ( $SetupFrontendCalendarPeriodSelector=="all" ) echo $L_206."<br />";
  }
  echo '</div>';
?>
Return current item: GigKalender