Einchecken des Online-Codes
This commit is contained in:
51
admin/inhalte/stammdaten/unter/ts.php
Normal file
51
admin/inhalte/stammdaten/unter/ts.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
if (!in_array("Stammdaten", $_SESSION['Rechte'])) {
|
||||
exit(ZUGRIFF_ERROR);
|
||||
}
|
||||
if (!isset($_SESSION['ID'])) {
|
||||
} else {
|
||||
echo "<h1>Teamseite</h1>\n";
|
||||
if ("Speichern" == $_POST['formaction']) {
|
||||
$sqls2 = 'UPDATE Uns SET
|
||||
Titel = "'.$_POST['Titel'].'",
|
||||
Text = "'.$_POST['Text'].'",
|
||||
Foto_Layout = "'.$_POST['Foto_Layout'].'"
|
||||
WHERE ID = "2";';
|
||||
$stmts2 = $db->prepare($sqls2);
|
||||
if (!$stmts2) {
|
||||
die ('Datensatz konnte nicht gespeichert werden: '.$db->error);
|
||||
}
|
||||
if (!$stmts2->execute()) {
|
||||
die ('Datensatz konnte nicht gespeichert werden: '.$stmts2->error);
|
||||
}
|
||||
echo "<p class=\"hinweis\">Die Daten wurden gespeichert!</h2>\n";
|
||||
}
|
||||
$sql1 = "SELECT Wert FROM US WHERE ID = \"2\" ";
|
||||
$result1 = $db->query($sql1);
|
||||
$nt1 = $result1->fetch_assoc();
|
||||
$sql2 = "SELECT Titel, Text, Foto_Layout FROM Uns WHERE ID = \"2\" ";
|
||||
$result2 = $db->query($sql2);
|
||||
$nt2 = $result2->fetch_assoc();
|
||||
|
||||
if ("on" == $nt1['Wert']) {
|
||||
echo "<p class=\"hinweis\">Die Seite <i>\"Team\"</i> wird angezeigt!</p>\n";
|
||||
} elseif ("" == $nt1['Wert']) {
|
||||
echo "<p class=\"hinweis\">Die Seite <i>\"Team\"</i> ist ausgeblendet!</p>\n";
|
||||
}
|
||||
echo "<form action=\"index.php?".$_SERVER['QUERY_STRING']."\" method=\"post\">\n";
|
||||
echo " <label>Überschrift</label>\n";
|
||||
echo " <input type=\"text\" name=\"Titel\" value=\"".$nt2['Titel']."\" />\n";
|
||||
echo " <br />\n";
|
||||
echo " <label>Einleitender Text</label>\n";
|
||||
echo " <br />\n";
|
||||
echo " <textarea name=\"Text\" rows=\"5\">".$nt2['Text']."</textarea>\n";
|
||||
echo " <br />\n";
|
||||
echo " <br />\n";
|
||||
echo " <input type=\"submit\" name=\"formaction\" value=\"Speichern\" />\n";
|
||||
echo " <input type=\"reset\" value=\"Rücksetzen\" />\n";
|
||||
echo "</form>\n";
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user