Code formatting.
This commit is contained in:
84
admin/gb.php
84
admin/gb.php
@@ -1,47 +1,47 @@
|
||||
<h1>Gästebuch</h1>
|
||||
<?php
|
||||
if ((!isset($_POST['new'])) AND (!isset($_POST['edit'])) AND (!isset($_POST['del']))) {
|
||||
$sql1 = 'SELECT * FROM gb';
|
||||
$result1 = $db->query($sql1);
|
||||
?>
|
||||
<fieldset>
|
||||
<form action="index.php?section=gb" method="post">
|
||||
<fieldset>
|
||||
<legend>neuen Gästebucheintrag hochladen</legend>
|
||||
<input type="submit" name="new" value="Hochladen" />
|
||||
<br />
|
||||
</fieldset>
|
||||
<br />
|
||||
<select name="Titel">
|
||||
<?php
|
||||
while ($nt1 = $result1->fetch_assoc()) {
|
||||
echo '<option value="'.$nt1['ID'].'">'.$nt1['ID'].' '.$nt1['Autor'].'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<br />
|
||||
<fieldset>
|
||||
<legend>Gästebucheintrag ändern</legend>
|
||||
<input type="submit" name="edit" value="Bearbeiten" />
|
||||
<br />
|
||||
</fieldset>
|
||||
<br />
|
||||
<fieldset>
|
||||
<legend>Gästebucheintrag löschen</legend>
|
||||
<input type="submit" name="del" value="L<>schen" />
|
||||
<br />
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
if ((!isset($_POST['new'])) and (!isset($_POST['edit'])) and (!isset($_POST['del']))) {
|
||||
$sql1 = 'SELECT * FROM gb';
|
||||
$result1 = $db->query($sql1);
|
||||
?>
|
||||
<fieldset>
|
||||
<form action="index.php?section=gb" method="post">
|
||||
<fieldset>
|
||||
<legend>neuen Gästebucheintrag hochladen</legend>
|
||||
<input type="submit" name="new" value="Hochladen"/>
|
||||
<br/>
|
||||
</fieldset>
|
||||
<br/>
|
||||
<select name="Titel">
|
||||
<?php
|
||||
while ($nt1 = $result1->fetch_assoc()) {
|
||||
echo '<option value="' . $nt1['ID'] . '">' . $nt1['ID'] . ' ' . $nt1['Autor'] . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<br/>
|
||||
<fieldset>
|
||||
<legend>Gästebucheintrag ändern</legend>
|
||||
<input type="submit" name="edit" value="Bearbeiten"/>
|
||||
<br/>
|
||||
</fieldset>
|
||||
<br/>
|
||||
<fieldset>
|
||||
<legend>Gästebucheintrag löschen</legend>
|
||||
<input type="submit" name="del" value="L<>schen"/>
|
||||
<br/>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
} else {
|
||||
if (isset($_POST['new'])) {
|
||||
include "inhalte/gb/new.php";
|
||||
} elseif (isset($_POST['edit'])) {
|
||||
include "inhalte/gb/edit.php";
|
||||
} elseif (isset($_POST['del'])) {
|
||||
include "inhalte/gb/del.php";
|
||||
} else {
|
||||
echo "Fehler";
|
||||
}
|
||||
if (isset($_POST['new'])) {
|
||||
include "inhalte/gb/new.php";
|
||||
} elseif (isset($_POST['edit'])) {
|
||||
include "inhalte/gb/edit.php";
|
||||
} elseif (isset($_POST['del'])) {
|
||||
include "inhalte/gb/del.php";
|
||||
} else {
|
||||
echo "Fehler";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user