Initial commit from online.
This commit is contained in:
47
admin/gb.php
Normal file
47
admin/gb.php
Normal file
@@ -0,0 +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>
|
||||
|
||||
<?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";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user