Location: PHPKode > scripts > GigKalender > guestbook/backend_showAllGuestbookEntries.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['MenuReminderWebsite'] = $page;
  if ( IsUserAdmin() )
  {
    $xUserRightAddGuestbookEntries = 1;
    $xUserRightEditGuestbookEntries = 1;
    $xUserRightDeleteGuestbookEntries = 1;
  }
  else
  {
    $xUserRightAddGuestbookEntries = 0;
    $xUserRightEditGuestbookEntries = 0;
    $xUserRightDeleteGuestbookEntries = 0;
  }
  include ('guestbook/functions.php');
  if ( AnzahlEintraege()=='0' )
    {
      echo $L_215.'<br /><br />';
    }
    else
    {
      // moreChars
          if ( isset($_REQUEST['job']) AND $_REQUEST['job']=='moreChars' ) { setUserVar('UserCharsGuestbookListFields', getUserVar(getCurrentUser(), 'UserCharsGuestbookListFields')+1); }
        // lessChars
          if ( isset($_REQUEST['job']) AND  $_REQUEST['job']=='lessChars' ) { setUserVar('UserCharsGuestbookListFields', getUserVar(getCurrentUser(), 'UserCharsGuestbookListFields')-1); }
      $UserCharsGuestbookListFields = getCurrentUserVar('UserCharsGuestbookListFields');
      // Sessioin-Variable 'Anzahl' definieren
        if ( isset($_POST['Anzahl']) ) { $_SESSION["Anzahl"] = $_POST['Anzahl']; $_SESSION['CurrentPageShowAllGuestbookEntries']=1; }
        if ( !isset($_SESSION["Anzahl"]) ) { $_SESSION["Anzahl"] = "20"; }
        $EintraegeProSeite = $_SESSION["Anzahl"];

      $AnzahlEintraege = AnzahlEintraege();
      if ( $EintraegeProSeite!='all' ) { $AnzahlSeiten = ceil($AnzahlEintraege/$EintraegeProSeite); }
          else { $AnzahlSeiten = '0'; }
      if (isset($_REQUEST['page'])) { $_SESSION['CurrentPageShowAllGuestbookEntries'] = $_REQUEST['page']; }
      if ( !isset($_SESSION['CurrentPageShowAllGuestbookEntries']) ) { $_SESSION['CurrentPageShowAllGuestbookEntries'] = "1"; }
      $aktuelleSeite = $_SESSION['CurrentPageShowAllGuestbookEntries'];
      $obersterEintrag  = $EintraegeProSeite*($aktuelleSeite-1);
    
      // Ansichts-Parameter
        echo '<div id="PageMenu">
                <form method="post" action="index.php?submenu=guestbook&amp;page=backend_showAllGuestbookEntries">
                  <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_ShowAllGigs.'</option>';
                    for ($i=1; $i<=100; $i++)
                    {
                      echo '<option value="'.$i.'"'; if ($EintraegeProSeite==$i) echo ' selected="selected"'; echo'>'.$i.'</option>';
                    }

                  echo '</select>
                  </fieldset>
                </form>';
        // Spaltenbreite
        echo '<form method="post" action="index.php?submenu=guestbook&amp;page=backend_showAllGuestbookEntries&amp;job=lessChars">
               <fieldset>
                 <input style="font-size:0.9em;" type="submit" value="-" class="SmallButton" />
               </fieldset>
             </form>';
        echo '<form method="post" action="index.php?submenu=guestbook&amp;page=backend_showAllGuestbookEntries&amp;job=moreChars">
               <fieldset>
                 <input style="font-size:0.9em;" type="submit" value="+" class="SmallButton" />
               </fieldset>
             </form>';
        echo GuestbookBackendNavigation();
        echo '</div>';
    
      // Publish or Not
      if (isset($_POST['Publish_x'])) { changePublishing ($_POST['Date']); }

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

      echo '<table id="WideTable" summary="Table_ShowAllGuestbookEntries" style="width:100%">
                  <tr>';
          if ( $xUserRightDeleteGuestbookEntries ) { echo'<th class="SpalteIcon">&nbsp;</th>'; }
          if ( $xUserRightEditGuestbookEntries ) { echo'<th class="SpalteIcon">&nbsp;</th>'; }
          if ( !$xUserRightDeleteGuestbookEntries AND !$xUserRightEditGuestbookEntries )  { echo'<th>&nbsp;</th>'; }
          echo '<th>'.$L_GuestbookDate.'</th>
                <th>'.$L_GuestbookName.'</th>
                <th>'.$L_GuestbookLocation.'</th>
                <th>'.$L_GuestbookEmail.'</th>
                <th>'.$L_GuestbookURL.'</th>
                <th>'.$L_GuestbookICQ.'</th>
                <th>'.$L_GuestbookMessage.'</th>
                <th>'.$L_GuestbookComment.'</th>
                <th>'.$L_GuestbookIP.'</th>
                <th class="TabellenSpalte_Rechts">'.$L_GuestbookCode.'</th>
              </tr>';
          while ($row = mysql_fetch_array($resultat))
          {
            extract($row);
            //$DateString = DatumMitUhrzeitAusTimestamp($Datum);
            echo '<tr>';
            if ( $xUserRightDeleteGuestbookEntries )
            {
              echo '<td>
                      <a href="index.php?submenu=guestbook&amp;page=backend_delGuestbookEntry&amp;GuestbookID='.$GuestbookID.'">
                        <img src="images/delete.gif" alt="'.$L_009.'" title="'.$L_009.'" /></a>
                    </td>';
            }
            if ( $xUserRightEditGuestbookEntries )
            {
              echo '<td>
                      <a href="index.php?submenu=guestbook&amp;page=backend_addGuestbookEntry&amp;job=edit&amp;GuestbookID='.$GuestbookID.'">
                        <img src="images/edit.png" alt="'.$L_010.'" title="'.$L_010.'" /></a>
                    </td>';
            }
            if ( !$xUserRightDeleteGuestbookEntries AND !$xUserRightEditGuestbookEntries )
            {
              echo '<td>
                      <a href="index.php?submenu=guestbook&amp;page=backend_showGuestbookEntry&amp;guestbookid='.$GuestbookID.'">
                        <img src="images/show.gif" alt="'.$L_153.'" title="'.$L_153.'" /></a>
                    </td>';
            }
            echo '<td>'.date(getSetup('SetupBackendDateFormat').' - '.getSetup('SetupBackendTimeFormat'), $Datum).'</td>';
            echo '<td>'; include('guestbook/includes/showAllGuestbookEntries/GuestbookName.php'); echo '</td>';
            echo '<td>'; include('guestbook/includes/showAllGuestbookEntries/GuestbookLocation.php'); echo '</td>';
            echo '<td>'; include('guestbook/includes/showAllGuestbookEntries/GuestbookEmail.php'); echo '</td>';
            echo '<td>'; include('guestbook/includes/showAllGuestbookEntries/GuestbookURL.php'); echo '</td>';
            echo '<td>'; include('guestbook/includes/showAllGuestbookEntries/GuestbookICQ.php'); echo '</td>';
            echo '<td>'; include('guestbook/includes/showAllGuestbookEntries/GuestbookMessage.php'); echo '</td>';
            echo '<td>'; include('guestbook/includes/showAllGuestbookEntries/GuestbookComment.php'); echo '</td>';
            echo '<td>'.$IP.'</td>';
            echo '<td class="TabellenSpalte_Rechts">'.$CODE.'</td>';
            echo '</tr>';
          }
          echo '</table>';
    }
?>
Return current item: GigKalender