<?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.
*/
  $UserRightDeleteMenuItem = 1;
  $UserRightEditMenuItem = 1;
  $REQUEST_URI = str_replace( '&', '&amp;', $_SERVER['REQUEST_URI']);
  include ('cms/functions.php');
  
  $sql = "SELECT MenuItemParent FROM ".$prefix."menu GROUP BY MenuItemParent";
  $resultat = mysqli_query($db, $sql);
  $array=@mysqli_fetch_array($resultat);

  // MenuItem höher setzen
    if ( isset($_POST['MenuItemUp_x']) ) moveUpMenuItem($MenuItemSequence, $MenuItemParent);
  // MenuItem tiefer setzen
    if ( isset($_POST['MenuItemDown_x']) ) moveDownMenuItem($MenuItemSequence, $MenuItemParent);
    echo '<p class="Headline">'.$L_Headline45.'</p>';
    // Inhalt hier einfügen
      $AmountMenuItems = getAmountMenuItems('main');
      if ( $AmountMenuItems==0 )
      {
        echo $L_210.'<br /><br />';
      }
      else
      {
        $AmountSubMenus = getAmountSubMenus();
        echo '<table id="NarrowTable" summary="CMSMenuStructure">
                <tr>';
        if ( $UserRightDeleteMenuItem ) { echo'<th class="SpalteIcon">&nbsp;</th>'; }
        if ( $UserRightEditMenuItem ) { echo'<th class="SpalteIcon">&nbsp;</th>'; }
        if ( !$UserRightDeleteMenuItem AND !$UserRightEditMenuItem )  { echo'<th>&nbsp;</th>'; }
        echo '<th>'.$L_MenuItemName.'</th>
              <th></th>
              <th>xID</th>
              <th>'.$L_MenuItemKind.'</th>
              <th>xSequence</th>
              <th>xParent</th>
              <th>xFile</th>
              <th></th>
              <th></th>
            </tr>';
        $counter = 0;
        td('main');
        echo '</table>';
      }
      echo '<a href="index.php?submenue=cms&amp;inhalt=addMenuItem&amp;job=add&amp;MenuItemParent=main">
                  <img src="images/add.gif" alt="'.$L_Add_menu_item.'" title="'.$L_Add_menu_item.'" /></a>';
    // Inhalt zuende
?>