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,39 @@
<?php
if ( $_SESSION['IsAdmin'] )
{
echo "<h1>AGBs</h1>\n";
if ( isset ( $_POST['action'] ) AND ( 'Speichern' == $_POST['action'] ) )
{
$sql = 'UPDATE Uns SET
Titel = "'.$_POST['Titel'].'",
Text = "'.$_POST['Text'].'"
WHERE ID = "4";';
$stmt = $db->prepare($sql);
if (!$stmt)
{
die ('Datensatz konnte nicht gespeichert werden: '.$db->error);
}
if (!$stmt->execute())
{
die ('Datensatz konnte nicht gespeichert werden: '.$stmt->error);
}
echo "<p class=\"hinweis\">AGBs wurden gespeichert!</p>\n";
}
$sql1 = "SELECT * FROM Uns WHERE ID = \"4\";";
$result1 = $db->query($sql1);
$nt1 = $result1->fetch_assoc();
?>
<form action="index.php?<?php echo $_SERVER['QUERY_STRING']; ?>" method="post" />
<label>Überschrift</label>
<br />
<input style="width:500px;" type="text" name="Titel" value="<?php echo $nt1['Titel']; ?>" />
<br />&nbsp;<br />
<label>Text</label>
<textarea name="Text" rows="50"><?php echo $nt1['Text']; ?></textarea>
<br />&nbsp;<br />
<input type="submit" name="action" value="Speichern" />
</form>
<?php
}
?>

View File

@@ -0,0 +1,39 @@
<?php
if ( $_SESSION['IsAdmin'] )
{
echo "<h1>Impressum</h1>\n";
if ( isset ( $_POST['action'] ) AND ( 'Speichern' == $_POST['action'] ) )
{
$sql = 'UPDATE Uns SET
Titel = "'.$_POST['Titel'].'",
Text = "'.$_POST['Text'].'"
WHERE ID = "5";';
$stmt = $db->prepare($sql);
if (!$stmt)
{
die ('Datensatz konnte nicht gespeichert werden: '.$db->error);
}
if (!$stmt->execute())
{
die ('Datensatz konnte nicht gespeichert werden: '.$stmt->error);
}
echo "<p class=\"hinweis\">Impressum wurde gespeichert!</p>\n";
}
$sql1 = "SELECT * FROM Uns WHERE ID = \"5\";";
$result1 = $db->query($sql1);
$nt1 = $result1->fetch_assoc();
?>
<form action="index.php?<?php echo $_SERVER['QUERY_STRING']; ?>" method="post" />
<label>Überschrift</label>
<br />
<input style="width:500px;" type="text" name="Titel" value="<?php echo $nt1['Titel']; ?>" />
<br />&nbsp;<br />
<label>Text</label>
<textarea name="Text" rows="20"><?php echo $nt1['Text']; ?></textarea>
<br />&nbsp;<br />
<input type="submit" name="action" value="Speichern" />
</form>
<?php
}
?>

View File

@@ -0,0 +1,161 @@
<?php
if ( $_SESSION['IsAdmin'] )
{
echo "<h1>Kontakt</h1>\n";
if ( isset ( $_POST['formaction'] ) AND ( "Speichern" == $_POST['formaction'] ) ) {
if (isset($_POST['ii'])) {
$sql11 = 'UPDATE
US
SET
Wert = "on"
WHERE ID = "6";';
} else {
$sql11 = 'UPDATE
US
SET
Wert = ""
WHERE ID = "6";';
}
$stmt11 = $db->prepare($sql11);
if (!$stmt11) {
die ('Es konnte kein SQL-Query vorbereitet werden: '.$db->error);
}
if (!$stmt11->execute()) {
die ('Query konnte nicht ausgeführt werden: '.$stmt11->error);
}
if (isset($_POST['vv'])) {
$sql12 = 'UPDATE
US
SET
Wert = "on"
WHERE ID = "7";';
} else {
$sql12 = 'UPDATE
US
SET
Wert = ""
WHERE ID = "7";';
}
$stmt12 = $db->prepare($sql12);
if (!$stmt12) {
die ('Es konnte kein SQL-Query vorbereitet werden: '.$db->error);
}
if (!$stmt12->execute()) {
die ('Query konnte nicht ausgeführt werden: '.$stmt12->error);
}
$sqls2 = 'UPDATE Uns SET
Titel = "'.$_POST['Titel'].'",
Text = "'.$_POST['Text'].'",
Foto_Layout = "'.$_POST['Foto_Layout'].'"
WHERE ID = "3";';
$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";
}
$sql2 = "SELECT Titel, Text, Foto_Layout FROM Uns WHERE ID = \"3\" ";
$result2 = $db->query($sql2);
$nt2 = $result2->fetch_assoc();
$uploaddir = "../img/team/";
if ("oben" == $nt2['Foto_Layout']) {
$newwidth = 690;
$filename = "../img/team/ko_oben.jpg";
} elseif (("links" == $nt2['Foto_Layout']) OR ("rechts" == $nt2['Foto_Layout'])) {
$newwidth = 300;
$filename = "../img/team/ko.jpg";
} else {
$filename = "";
}
include "inhalte/einfoto.php";
echo "<form action=\"index.php?".$_SERVER['QUERY_STRING']."\" method=\"post\">\n";
echo " <label>Layout</label>\n";
echo " <input type=\"radio\" name=\"Foto_Layout\" value=\"ohne\" ";
if ("ohne" == $nt2['Foto_Layout']) {
echo "checked=\"checked\" ";
}
echo "/>ohne Foto \n";
echo "<a>\n";
echo " <img class=\"drueber\" src=\"../img/help.gif\" />\n";
echo " <img class=\"drunter\" src=\"img/ko_ohne.jpg\" />\n";
echo "</a>\n";
echo " <br />\n";
echo " <label>&nbsp;</label>\n";
echo " <input type=\"radio\" name=\"Foto_Layout\" value=\"links\" ";
if ("links" == $nt2['Foto_Layout']) {
echo "checked=\"checked\" ";
}
echo "/>Foto links \n";
echo "<a>\n";
echo " <img class=\"drueber\" src=\"../img/help.gif\" />\n";
echo " <img class=\"drunter\" src=\"img/ko_links.jpg\" />\n";
echo "</a>\n";
echo " <br />\n";
echo " <label>&nbsp;</label>\n";
echo " <input type=\"radio\" name=\"Foto_Layout\" value=\"rechts\" ";
if ("rechts" == $nt2['Foto_Layout']) {
echo "checked=\"checked\" ";
}
echo "/>Foto rechts \n";
echo "<a>\n";
echo " <img class=\"drueber\" src=\"../img/help.gif\" />\n";
echo " <img class=\"drunter\" src=\"img/ko_rechts.jpg\" />\n";
echo "</a>\n";
echo " <br />\n";
echo " <label>&nbsp;</label>\n";
echo " <input type=\"radio\" name=\"Foto_Layout\" value=\"oben\" ";
if ("oben" == $nt2['Foto_Layout']) {
echo "checked=\"checked\" ";
}
echo "/>Foto oben \n";
echo "<a>\n";
echo " <img class=\"drueber\" src=\"../img/help.gif\" />\n";
echo " <img class=\"drunter\" src=\"img/ko_oben.jpg\" />\n";
echo "</a>\n";
echo " <br />\n";
echo " &nbsp;<br />\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 " &nbsp;<br />\n";
/*
$sql3 = "SELECT Kurz, Name, Wert FROM US WHERE Sektion = \"kontakt\" ORDER BY ID ASC";
$result3 = $db->query($sql3);
echo "<fieldset>\n";
echo "<legend>Formularservice</legend>\n";
echo " <p>Folgende Formulate können auf der Kontaktseite verlinkt werden:</p>\n";
while ($nt3 = $result3->fetch_assoc()) {
echo " <label>".$nt3['Name']."</label>\n";
echo " <input type=\"checkbox\" name=\"".$nt3['Kurz']."\" ";
if ("on" == $nt3['Wert']) {
echo "checked=\"checked\" ";
}
echo " />\n";
echo " <br />\n";
}
echo "</fieldset>\n";
*/
echo " &nbsp;<br />\n";
echo " <input type=\"submit\" name=\"formaction\" value=\"Speichern\" />\n";
echo " <input type=\"reset\" value=\"Rücksetzen\" />\n";
echo "</form>\n";
}
?>

View File

@@ -0,0 +1,84 @@
<?php
if ( $_SESSION['IsAdmin'] )
{
if ( isset ( $_POST['action'] ) AND ( 'Speichern' == $_POST['action'] ) )
{
if ( isset ( $_POST['type'] ) )
{
if ( 'new' == $_POST['type'] )
{
$sql = 'INSERT INTO Links ( linkRef, linkText ) VALUES ( "' . $_POST['linkRef'] . '", "' . $_POST['linkText'] . '" );';
$stmt = $db->prepare($sql);
if (!$stmt) {
die ('Datensatz konnte nicht angelegt werden: '.$db->error);
}
if (!$stmt->execute()) {
die ('Datensatz konnte nicht angelegt werden: '.$stmt->error);
}
}
elseif ( 'edit' == $_POST['type'] )
{
$sql = 'UPDATE Links SET
linkRef = "'.$_POST['linkRef'].'",
linkText = "'.$_POST['linkText'].'"
WHERE linkId = "'.$_POST['ID'].'";';
$stmt = $db->prepare($sql);
if ( !$stmt )
{
die ('Datensatz konnte nicht gespeichert werden: '.$db->error);
}
if ( !$stmt->execute() )
{
die ('Datensatz konnte nicht gespeichert werden: '.$stmt->error);
}
}
}
}
if ( isset ( $_POST['action'] ) AND ( 'Löschen' == $_POST['action'] ) )
{
$sql = 'DELETE FROM
Links
WHERE
linkId = "'.$_POST['ID'].'";';
$result = $db->query($sql);
if ($result) {
unset($_POST);
} else {
echo "Fehler beim löschen";
}
}
$sql = "SELECT * FROM Links ORDER BY linkId ASC;";
$result = $db->query ( $sql );
echo "<h1>Links</h1>\n";
while ( $nt = $result->fetch_assoc() )
{
?>
<fieldset>
<form name="Edit<?php echo $nt['linkId']; ?>" action="index.php?<?php echo $_SERVER['QUERY_STRING']; ?>" method="post">
<input type="hidden" name="type" value="edit" />
<input type="hidden" name="ID" value="<?php echo $nt['linkId']; ?>" />
<label>Text:</label><br />
<textarea name="linkText"><?php echo $nt['linkText']; ?></textarea>
<label>Link:</label><br />
<input style="float:right;" type="submit" name="action" value="Speichern" />
<input style="float:right;" type="submit" name="action" value="Löschen" />
<input type="text" name="linkRef" value="<?php echo $nt['linkRef']; ?>" /><br />
</form>
</fieldset>
<?php
}
?>
<fieldset>
<form name="New" action="index.php?<?php echo $_SERVER['QUERY_STRING']; ?>" method="post">
<input type="hidden" name="type" value="new" />
<label>Text:</label><br />
<textarea name="linkText"><?php echo $nt['linkText']; ?></textarea>
<label>Link:</label><br />
<input style="float:right;" type="submit" name="action" value="Speichern" />
<input type="text" name="linkRef" value="<?php echo $nt['linkRef']; ?>" /><br />
</form>
</fieldset>
<?php
}
?>

View File

@@ -0,0 +1,28 @@
<h1>Das Unternehmen</h1>
<p>
<span class="hinweis"><</span>
Text und Layout für die Seite <i><b>Über uns</b></i>
</p>
<p>
<span class="hinweis"><</span>
Einleitenden Text für die Seite <i><b>Team</b></i>
</p>
<p>
<span class="hinweis"><</span>
Erstellen, Bearbeiten und Löschen von Teammitglieder für die Seite <i><b>Team</b></i>
</p>
<p>
<span class="hinweis"><</span>
Text und Layout für die Seite <i><b>Kontakt</b></i>
</p>
<p>
<span class="hinweis"><</span>
Hochladen Ihrer Allgemeinen Geschäftsbedingungen für die Seite <i><b>AGBs</b></i>
</p>

View File

@@ -0,0 +1,41 @@
<h1>Stellenangebote</h1>
<?php
if ( $_SESSION['IsAdmin'] )
{
if ( isset ( $_POST['formaction'] ) AND 'Speichern' == $_POST['formaction'] )
{
$sql = 'UPDATE Uns SET
Titel = "'.$_POST['Titel'].'",
Text = "'.$_POST['Text'].'",
Foto_Layout = "'.$_POST['Foto_Layout'].'"
WHERE ID = "7";';
$stmt = $db->prepare($sql);
if (!$stmt)
{
die ('Datensatz konnte nicht gespeichert werden: '.$db->error);
}
if (!$stmt->execute())
{
die ('Datensatz konnte nicht gespeichert werden: '.$stmt->error);
}
echo "<p class=\"hinweis\">Stellenangebote wurden gespeichert!</p>\n";
}
$sql = "SELECT * FROM Uns WHERE ID = '7' LIMIT 1;";
$result = $db->query ( $sql );
$nt = $result->fetch_assoc ();
?>
<form action="index.php?<?php echo $_SERVER['QUERY_STRING']; ?>" method="post">
<label>Überschrift</label><br />
<input type="text" name="Titel" value="<?php echo $nt['Titel']; ?>" />
<br />&nbsp;<br />
<label>Text</label><br />
<textarea name="Text" rows="10"><?php echo $nt['Text']; ?></textarea>
<br />&nbsp;<br />
<label>Email</label><br />
<input type="text" name="Foto_Layout" value="<?php echo $nt['Foto_Layout']; ?>" />
<br />&nbsp;<br />
<input type="submit" name="formaction" value="Speichern" />
</form>
<?php
}
?>

View File

@@ -0,0 +1,26 @@
<?php
if (!in_array("Stammdaten", $_SESSION['Rechte'])) {
exit(ZUGRIFF_ERROR);
}
if (!isset($_SESSION['ID'])) {
} else {
echo "<h1>Teammitglieder</h1>\n";
if (!isset($_POST['action'])) {
include "inhalte/stammdaten/unter/tm_over.php";
} else {
if (("Anlegen" == $_POST['action']) OR ("Bearbeiten" == $_POST['action']) OR ("Foto" == $_POST['action'])) {
include "inhalte/stammdaten/unter/tm_edit.php";
} elseif ("Speichern" == $_POST['action']) {
include "inhalte/stammdaten/unter/tm_save.php";
} elseif (("Abbrechen" == $_POST['action']) OR ("Löschen" == $_POST['action'])) {
include "inhalte/stammdaten/unter/tm_del.php";
} elseif ("Foto" == $_POST['action']) {
include "inhalte/stammdaten/unter/tm_foto.php";
} elseif (("Festlegen" == $_POST['action']) OR ("hoch" == $_POST['action'])) {
include "inhalte/stammdaten/unter/tm_reihe.php";
} else {
include "inhalte/stammdaten/unter/tm_over.php";
}
}
}
?>

View File

@@ -0,0 +1,28 @@
<?php
if (!in_array("Stammdaten", $_SESSION['Rechte'])) {
exit(ZUGRIFF_ERROR);
}
if (!isset($_SESSION['ID'])) {
} else {
if (("Löschen" == $_POST['action']) OR ("Abbrechen" == $_POST['action'])) {
$sql1 = 'DELETE FROM
Team
WHERE
ID = "'.$_POST['ID'].'";';
$result1 = $db->query($sql1);
$sql2 = 'DELETE FROM
admins
WHERE
ID = "'.$_POST['ID'].'";';
$result2 = $db->query($sql2);
if ($result1 AND $result2) {
unset($_POST);
include "inhalte/stammdaten/unter/tm_over.php";
} else {
echo "Fehler beim löschen";
}
}
}
?>

View File

@@ -0,0 +1,93 @@
<?php
if (!isset($_SESSION['ID'])) {
} else {
if ("Anlegen" == $_POST['action']) {
$sql = 'INSERT INTO Team SET ID = NULL';
$stmt = $db->prepare($sql);
if (!$stmt) {
die ('Datensatz konnte nicht angelegt werden: '.$db->error);
}
if (!$stmt->execute()) {
die ('Datensatz konnte nicht angelegt werden: '.$stmt->error);
}
$sql = 'SELECT last_insert_id() AS last';
$result = $db->query($sql);
$nt = $result->fetch_assoc();
$id = $nt['last'];
$sql = 'UPDATE Team SET AnzeigeNr = "'.$id.'" WHERE ID = "'.$id.'";';
$stmt = $db->prepare($sql);
if (!$stmt) {
die ('Datensatz konnte nicht gespeichert werden: '.$db->error);
}
if (!$stmt->execute()) {
die ('Datensatz konnte nicht gespeichert werden: '.$stmt->error);
}
} else {
$id = $_POST['ID'];
}
$uploaddir = "../img/team/";
$filename = "../img/team/".$id.".jpg";
$newwidth = 200;
include "inhalte/einfoto.php";
$sql1 = "SELECT * FROM Team WHERE ID = \"".$id."\" ";
$result1 = $db->query($sql1);
$nt1 = $result1->fetch_assoc();
echo "<br />\n";
echo "<form action=\"index.php?".$_SERVER['QUERY_STRING']."\" method=\"post\">\n";
echo "<fieldset>\n";
echo " <legend>Teammitglied <i>".$nt1['Vorname']." ".$nt1['Nachname']."</i>:</legend>\n";
echo " <input type=\"hidden\" name=\"ID\" value=\"".$id."\" />\n";
echo " <label>Sichtbar</label>\n";
echo " <input type=\"radio\" name=\"Anzeige\" value=\"on\" ";
if ("on" == $nt1['Anzeige']) {
echo "checked=\"checked\" ";
}
echo "/>ja\n";
echo " <input type=\"radio\" name=\"Anzeige\" value=\"off\" ";
if ("off" == $nt1['Anzeige']) {
echo "checked=\"checked\" ";
}
echo "/>nein\n";
echo "<img src=\"../img/help.gif\" title=\"Falls sichtbar wird der Mitarbeiter auf der Teamseite angezeigt!\" />\n";
echo " <br />\n";
echo " <label>Titel</label>\n";
echo " <input type=\"text\" name=\"Titel1\" value=\"".$nt1['Titel1']."\" />\n";
echo " <img src=\"../img/help.gif\" title=\"z.B. Dr., Dipl-Ing\" />\n";
echo " <br />\n";
echo " <label>Anrede</label>\n";
echo " <input type=\"text\" name=\"Anrede\" value=\"".$nt1['Anrede']."\" />\n";
echo " <br />\n";
echo " <label>Vorname</label>\n";
echo " <input type=\"text\" name=\"Vorname\" value=\"".$nt1['Vorname']."\" />\n";
echo " <br />\n";
echo " <label>Nachname</label>\n";
echo " <input type=\"text\" name=\"Nachname\" value=\"".$nt1['Nachname']."\" />\n";
echo " <br />\n";
echo " <label>Position</label>\n";
echo " <input type=\"text\" name=\"Titel2\" value=\"".$nt1['Titel2']."\" />\n";
echo " <img src=\"../img/help.gif\" title=\"Position bzw. Funktion im Unternehmen\" />\n";
echo " <br />\n";
echo " <label>Telefon</label>\n";
echo " <input type=\"text\" name=\"Telefon\" value=\"".$nt1['Telefon']."\" />\n";
echo " <br />\n";
echo " <label>Email</label>\n";
echo " <input type=\"text\" name=\"EMail\" value=\"".$nt1['EMail']."\" />\n";
echo " <br />\n";
echo " <label>Bereich</label>\n";
echo " <input type=\"text\" name=\"Bereich\" value=\"".$nt1['Bereich']."\" />\n";
echo " <br />\n";
echo " &nbsp;<br />\n";
echo " <input type=\"submit\" name=\"action\" value=\"Speichern\" />\n";
if ("Anlegen" == $_POST['action']) {
echo " <input type=\"submit\" name=\"action\" value=\"Abbrechen\" />\n";
} else {
echo " <input type=\"reset\" value=\"Rücksetzen\" />\n";
}
echo "</fieldset>\n";
echo "</form>\n";
}
?>

View File

@@ -0,0 +1,48 @@
<?php
if (!in_array("Stammdaten", $_SESSION['Rechte'])) {
exit(ZUGRIFF_ERROR);
}
if (!isset($_SESSION['ID'])) {
} else {
$sql = "SELECT ID, Vorname, Nachname FROM Team ORDER BY Nachname ASC";
$result = $db->query($sql);
echo "<p>Dieser Bereich betrifft lediglich die Anzeige der Teammitglieder auf der Homepage!</p>\n";
echo "<p>Um einem Teammitglied einen Zugang zum Administrationsbereich anzulegen, gehen Sie auf <br />
<span class=\"hinweis\">Stammdaten > Kontrollzentrum > Benutzer</span>.</p>\n";
// Das Formular für eine neue Person
echo "<form action=\"index.php?".$_SERVER['QUERY_STRING']."\" method=\"post\">\n";
echo " <fieldset>\n";
echo " <legend>neues Teammitglied anlegen</legend>\n";
echo " <input type=\"submit\" name=\"action\" value=\"Anlegen\" />\n";
echo " </fieldset>\n";
echo "</form>\n";
// Das Formular für eine bestehende Person
echo "<form action=\"index.php?".$_SERVER['QUERY_STRING']."\" method=\"post\">\n";
echo " <fieldset>\n";
echo " <legend>bestehendes Teammitglied ...</legend>\n";
echo " <select name=\"ID\">\n";
while ($nt = $result->fetch_assoc()) {
echo " <option value=\"".$nt['ID']."\">".$nt['Nachname'].", ".$nt['Vorname']." - ".$nt['ID']."</option>\n";
}
echo " </select>\n";
echo " <br />&nbsp;<br />\n";
echo " <input type=\"submit\" name=\"action\" value=\"Bearbeiten\" />\n";
echo " <br />\n";
echo " <input type=\"submit\" name=\"action\" value=\"Löschen\" />\n";
echo " <br />\n";
echo " </fieldset>\n";
echo "</form>\n";
// Das Formular für die Anzeigereihenfolge
echo "<form action=\"index.php?".$_SERVER['QUERY_STRING']."\" method=\"post\">\n";
echo " <fieldset>\n";
echo " <legend>Anzeige-Reihenfolge der Teammitglieder</legend>\n";
echo " <input type=\"submit\" name=\"action\" value=\"Festlegen\" />\n";
echo " <br />\n";
echo " </fieldset>\n";
echo "</form>\n";
}
?>

View File

@@ -0,0 +1,52 @@
<?php
if (!isset($_SESSION['ID'])) {
} else {
echo "<h2>Reihenfolge der Mitarbeiter auf der Teamseite</h2>\n";
if ("hoch" == $_POST['action']) {
$sqls1 = 'UPDATE Team SET AnzeigeNr = "'.$_POST['AnzeigeNr'].'" WHERE ID = "'.$_POST['vorige_ID'].'";';
$stmts1 = $db->prepare($sqls1);
if (!$stmts1) {
die ('Datensatz konnte nicht gespeichert werden: '.$db->error);
}
if (!$stmts1->execute()) {
die ('Datensatz konnte nicht gespeichert werden: '.$stmts1->error);
}
$sqls2 = 'UPDATE Team SET AnzeigeNr = "'.$_POST['vorige_AnzeigeNr'].'" WHERE ID = "'.$_POST['ID'].'";';
$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\">Reihenfolge wurde geändert!</p>\n";
}
$sql1 = "SELECT ID, Vorname, Nachname, Anzeige, AnzeigeNr FROM Team ORDER BY AnzeigeNr ASC";
$result1 = $db->query($sql1);
$sql2 = "SELECT COUNT(*) AS Anz FROM Team;";
$result2 = $db->query($sql2);
$nt2 = $result2->fetch_assoc();
$i = 0;
while ($nt1 = $result1->fetch_assoc()) {
echo "<form action=\"index.php?".$_SERVER['QUERY_STRING']."\" method=\"post\" >\n";
if (0 != $i) {
echo " <input type=\"image\" src=\"../img/hoch.png\" name=\"action\" value=\"hoch\" />\n";
echo " <input type=\"hidden\" name=\"vorige_ID\" value=\"".$alt_ID."\" />\n";
echo " <input type=\"hidden\" name=\"vorige_AnzeigeNr\" value=\"".$alt_AnzNr."\" />\n";
echo " <input type=\"hidden\" name=\"ID\" value=\"".$nt1['ID']."\" />\n";
echo " <input type=\"hidden\" name=\"AnzeigeNr\" value=\"".$nt1['AnzeigeNr']."\" />\n";
}
$i++;
echo " <label>".$i." ".$nt1['Vorname']." ".$nt1['Nachname']."<label>\n";
echo "</form>\n";
echo "<br style=\"clear:both;\" />\n";
echo "<p>&nbsp;</p>\n";
$alt_ID = $nt1['ID'];
$alt_AnzNr = $nt1['AnzeigeNr'];
}
}
?>

View File

@@ -0,0 +1,26 @@
<?php
if (!isset($_SESSION['ID'])) {
} else {
$sql = 'UPDATE Team SET
Anzeige = "'.$_POST['Anzeige'].'",
Titel1 = "'.$_POST['Titel1'].'",
Anrede = "'.$_POST['Anrede'].'",
Vorname = "'.$_POST['Vorname'].'",
Nachname = "'.$_POST['Nachname'].'",
Titel2 = "'.$_POST['Titel2'].'",
Telefon = "'.$_POST['Telefon'].'",
EMail = "'.$_POST['EMail'].'",
Bereich = "'.$_POST['Bereich'].'"
WHERE ID = "'.$_POST['ID'].'";';
$stmt = $db->prepare($sql);
if (!$stmt) {
die ('Datensatz konnte nicht gespeichert werden: '.$db->error);
}
if (!$stmt->execute()) {
die ('Datensatz konnte nicht gespeichert werden: '.$stmt->error);
}
echo "<p class=\"hinweis\">Mitarbeiterdaten wurden gespeichert!</p>\n";
include "inhalte/stammdaten/unter/tm_edit.php";
}
?>

View 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 " &nbsp;<br />\n";
echo " <input type=\"submit\" name=\"formaction\" value=\"Speichern\" />\n";
echo " <input type=\"reset\" value=\"Rücksetzen\" />\n";
echo "</form>\n";
}
?>

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";
}
?>