Einchecken des Online-Codes

This commit is contained in:
2017-05-07 14:37:49 +00:00
parent 9c1d71cea6
commit 85cc95c574
635 changed files with 76260 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
<?php
if ( $_SESSION['IsAdmin'] )
{
echo "<h1>Über uns</h1>\n";
$sql2 = "SELECT * FROM Uns WHERE ID = '1';";
$result2 = $db->query($sql2);
$nt2 = $result2->fetch_assoc();
if ( isset ( $_POST['formaction'] ) AND ( "Speichern" == $_POST['formaction'] ) )
{
$sqls2 = 'UPDATE Uns SET
Titel = "' . $_POST['Titel0'] . '||' . $_POST['Titel1'] . '||' . $_POST['Titel2'] .'",
Text = "' . $_POST['Text0'] . '||' . $_POST['Text1'] . '||' . $_POST['Text2'] .'"
WHERE ID = "1";';
$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);
}
$sql2 = "SELECT * FROM Uns WHERE ID = '1';";
$result2 = $db->query($sql2);
$nt2 = $result2->fetch_assoc();
echo "<p class=\"hinweis\">Die Daten wurden gespeichert!</h2>\n";
}
$texte = explode ( '||', $nt2['Text'] );
if ( !isset ( $texte[0] ) )
{
$texte[0] = '';
}
if ( !isset ( $texte[1] ) )
{
$texte[1] = '';
}
if ( !isset ( $texte[2] ) )
{
$texte[2] = '';
}
$titel = explode ( '||', $nt2['Titel'] );
if ( !isset ( $titel[0] ) )
{
$titel[0] = '';
}
if ( !isset ( $titel[1] ) )
{
$titel[1] = '';
}
if ( !isset ( $titel[2] ) )
{
$titel[2] = '';
}
echo "<form action=\"index.php?".$_SERVER['QUERY_STRING']."\" method=\"post\">\n";
echo " <input style=\"width:225px;\" type=\"text\" name=\"Titel0\" value=\"" . $titel[0] . "\">\n";
echo " <input style=\"width:225px;\" type=\"text\" name=\"Titel1\" value=\"" . $titel[1] . "\">\n";
echo " <input style=\"width:225px;\" type=\"text\" name=\"Titel2\" value=\"" . $titel[2] . "\">\n";
echo " <br />&nbsp;<br />\n";
echo " <textarea style=\"width:225px;\" name=\"Text0\" rows=\"30\">" . $texte[0] . "</textarea>\n";
echo " <textarea style=\"width:225px;\" name=\"Text1\" rows=\"30\">" . $texte[1] . "</textarea>\n";
echo " <textarea style=\"width:225px;\" name=\"Text2\" rows=\"30\">" . $texte[2] . "</textarea>\n";
echo " <br />\n";
echo " &nbsp;<br />\n";
echo " <input type=\"submit\" name=\"formaction\" value=\"Speichern\" />\n";
echo " <input type=\"reset\" value=\"Rücksetzen\" />\n";
echo " <br />\n";
echo "</form>\n";
}
?>