Location: PHPKode > scripts > GigKalender > calendar/backend_showAllVenues.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.
*/
  $_SESSION['MenuReminderCalendar'] = $page;
  $xUserRightAddVenue = 1;
  $xUserRightEditVenue = 1;
  $xUserRightDeleteVenue = 1;

  if ( AmountOfVenuesInDatabase()=='0' )
  {
    echo '<div id="PageMenu">';
    include('calendar/includes/buttonAddVenue.php');
    echo '</div>';
    echo '<br />'.$L_222.'<br /><br />';
  }
  else
  {
    // Sessioin-Variable 'Anzahl' definieren
      if ( isset($_POST['Anzahl']) ) { $_SESSION["Anzahl"] = $_POST['Anzahl']; $_SESSION['CurrentPageShowAllVenues']=1; }
      if ( !isset($_SESSION["Anzahl"]) ) { $_SESSION["Anzahl"] = "20"; }
      $EintraegeProSeite = $_SESSION["Anzahl"];

    $AnzahlEintraege = AmountOfVenuesInDatabase();
    if ( $EintraegeProSeite!='all' ) { $AnzahlSeiten = ceil($AnzahlEintraege/$EintraegeProSeite); }
      else { $AnzahlSeiten = '0'; }
    if (isset($_REQUEST['page'])) { $_SESSION['CurrentPageShowAllVenues'] = $_REQUEST['page']; }
    if ( !isset($_SESSION['CurrentPageShowAllVenues']) ) { $_SESSION['CurrentPageShowAllVenues'] = "1"; }
    $aktuelleSeite = $_SESSION['CurrentPageShowAllVenues'];
    $obersterEintrag  = $EintraegeProSeite*($aktuelleSeite-1);

    // Ansichts-Parameter
      echo '<div id="PageMenu">
              <form method="post" action="index.php?submenu=calendar&amp;page=backend_showAllVenues">
                <fieldset>
                  <input type="hidden" name="thread[threadid]" value="$thread[threadid]" />
                  <select name="Anzahl" onchange="this.form.submit()">
                    <option value="all"'; if ($EintraegeProSeite=="all") echo ' selected="selected"'; echo'>'.$L_All.'</option>';
                    for ($i=1; $i<=100; $i++)
                    {
                      echo '<option value="'.$i.'"'; if ($EintraegeProSeite==$i) echo ' selected="selected"'; echo'>'.$i.'</option>';
                    }

                  echo '</select>
                  </fieldset>
                </form>';
        include('calendar/includes/buttonAddVenue.php');
        //echo NewsBackendNavigation();
        echo '</div>';

      // Datensatz-Ausgabe festlegen
        $sql = "SELECT * FROM ".$prefix."venues order by VenueName ASC";
        $sql = $sql." LIMIT ".$obersterEintrag.", ";
        if ( $EintraegeProSeite=='all') { $sql = $sql.$AnzahlEintraege; }
        else { $sql = $sql.$EintraegeProSeite; }
        $resultat = mysql_query($sql);

      echo '<table id="WideTable" summary="Table_ShowAllVenues">';
      // Spalten definieren
            echo '<colgroup>';
            if ( $xUserRightDeleteVenue ) { echo'<col class="SpalteIcon" />'; }
            if ( $xUserRightEditVenue ) { echo'<col class="SpalteIcon" />'; }
            if ( !$xUserRightDeleteVenue AND !$xUserRightEditVenue )  { echo'<col class="SpalteIcon" />'; }
            echo '<col />';
            echo '<col />';
            echo '<col />';
            echo '<col class="TabellenSpalte_Rechts" />';
            echo '</colgroup>';
      echo '<tr id="TableColumnHead">';
          if ( $xUserRightDeleteVenue ) { echo'<th>&nbsp;</th>'; }
          if ( $xUserRightEditVenue ) { echo'<th>&nbsp;</th>'; }
          if ( !$xUserRightDeleteVenue AND !$xUserRightEditVenue )  { echo'<th>&nbsp;</th>'; }
          echo '<th>'.$L_VenueName.'</th>
                <th class="TabellenSpalte_Rechts">'.$L_VenueLocation.'</th>
              </tr>';
          while ($row = mysql_fetch_array($resultat))
          {
            extract($row);
            //$DateString = DatumMitUhrzeitAusTimestamp($Date);
            //$DateOfLastEditString = DatumMitUhrzeitAusTimestamp($DateOfLastEdit);
            echo '<tr>';
            if ( $xUserRightDeleteVenue )
            {
              echo '<td>
                      <a href="index.php?submenu=calendar&amp;page=backend_delVenue&amp;id='.$VenueID.'">
                        <img src="images/delete.gif" alt="'.$L_009.'" title="'.$L_009.'" /></a>
                    </td>';
            }
            if ( $xUserRightEditVenue )
            {
              echo '<td>
                      <a href="index.php?submenu=calendar&amp;page=backend_addVenue&amp;job=edit&amp;id='.$VenueID.'">
                        <img src="images/edit.png" alt="'.$L_010.'" title="'.$L_010.'" /></a>
                    </td>';
            }
            if ( !$xUserRightDeleteVenue AND !$xUserRightEditVenue )
            {
              echo '<td>
                      <a href="index.php?submenu=calendar&amp;page=backend_showVenue&amp;id='.$VenueID.'">
                        <img src="images/show.gif" alt="'.$L_153.'" title="'.$L_153.'" /></a>
                    </td>';
            }
                echo '<td>';
                include ('includes/showAllVenues/VenueName.php');
                echo '</td>';
                echo '<td>';
                include ('includes/showAllVenues/VenueLocation.php');
                echo '</td>';
            echo '</tr>';
          }
          echo '</table>';
    }
?>
Return current item: GigKalender