Hauptmenü-list
hmenu.php
<?php
Administrator zugang öffnen
if (isset($_SESSION['id']) && $_SESSION['id']==1)
{
{
Sprung variable setzen
if($jumpi=='show')
{
{
Tabellenkopf
echo'<table class="table">';
echo'<tr>'; echo'<th colspan="4">Haupt-Menü</th>';
echo'<th colspan="3">';
echo'<a href="index.php?page=99&jump=2&jumpi=new&jumps=neu">Menüpunkt erstellen</a>';
echo'</th>';
echo'</tr>';
echo'<tr class="big">';
echo'<td>ID</td>';
echo'<td>Menüname</td>';
echo'<td>wohin</td>';
echo'<td>paarID</td>';
echo'<td>Edit</td>';
echo'<td>Del</td>';
echo'</tr>';
echo'<tr>'; echo'<th colspan="4">Haupt-Menü</th>';
echo'<th colspan="3">';
echo'<a href="index.php?page=99&jump=2&jumpi=new&jumps=neu">Menüpunkt erstellen</a>';
echo'</th>';
echo'</tr>';
echo'<tr class="big">';
echo'<td>ID</td>';
echo'<td>Menüname</td>';
echo'<td>wohin</td>';
echo'<td>paarID</td>';
echo'<td>Edit</td>';
echo'<td>Del</td>';
echo'</tr>';
Datenbank abfrage
$stmt = $pdo->prepare("SELECT id, label, ziel, link_url, parent_id FROM test_menu ORDER BY id");
$stmt->bindColumn(1,$mem_id);
$stmt->bindColumn(2,$m_label);
$stmt->bindColumn(3,$m_ziel);
$stmt->bindColumn(4,$m_link);
$stmt->bindColumn(5,$m_parid);
$stmt->execute();
$stmt->bindColumn(1,$mem_id);
$stmt->bindColumn(2,$m_label);
$stmt->bindColumn(3,$m_ziel);
$stmt->bindColumn(4,$m_link);
$stmt->bindColumn(5,$m_parid);
$stmt->execute();
Daten ausgabe
while($stmt->fetch())
{
echo'<tr>';
echo'<td>'.$mem_id.'</td>';
echo'<td>'.$m_label.'</td>';
echo'<td>'.$m_link.'</td>';
echo'<td>'.$m_parid.'</td>';
echo'<td>';
echo'<a href="index.php?page=99&jump=2&jumpi=recht&mem_id='.$mem_id.'">Edit</a>';
echo'</td>';
echo'<td>';
echo'<a href="index.php?page=99&jump=2&jumpi=del&mem_id='.$mem_id.'">Del</a>';
echo'</td>';
echo'</tr>';
}
{
echo'<tr>';
echo'<td>'.$mem_id.'</td>';
echo'<td>'.$m_label.'</td>';
echo'<td>'.$m_link.'</td>';
echo'<td>'.$m_parid.'</td>';
echo'<td>';
echo'<a href="index.php?page=99&jump=2&jumpi=recht&mem_id='.$mem_id.'">Edit</a>';
echo'</td>';
echo'<td>';
echo'<a href="index.php?page=99&jump=2&jumpi=del&mem_id='.$mem_id.'">Del</a>';
echo'</td>';
echo'</tr>';
}
echo'</table>';
Sprungmarke ende
}