Patientendaten maskieren und SQL-Injection in togoadmin entfernen
Stored XSS Die Anfrageuebersicht und das Antwortformular haben Nachricht, Medikamente, Dateiname und Adressdaten des Patienten roh in HTML-Strings gesetzt. Gespeichert wird der Text nur mit trim(), ein Patient konnte darueber Skriptcode in den Browser der Mitarbeiterin einschleusen - mit deren Sitzung. Die Werte laufen jetzt beim Auslesen durch e(). Der dritte Zweig (Antwort einsehen) maskierte bereits bei der Ausgabe und bleibt, wie er ist. SQL-Injection togoadmin.php interpolierte $_GET["id"] an drei Stellen ungecastet in UPDATE-Statements, waehrend die Nachbarzeilen bereits (int) verwenden. Dazu drei reflektierte Ausgaben desselben Wertes in Formularfelder. Beides auf (int) umgestellt. Formularziele $_SERVER['PHP_SELF'] enthaelt bei Aufrufen wie /admin/anfragen.php/"><script> auch den angehaengten Pfad und landete an 72 Stellen ungeprueft im HTML. Ersetzt durch self_action() aus inc/security.inc.php, das den Basisnamen des Skripts maskiert zurueckgibt. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+71
-65
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
// WICHTIG: Pfade aus /admin heraus korrekt auflösen
|
||||
require_once __DIR__ . "/../inc/config.inc.php";
|
||||
@@ -28,7 +27,7 @@ include("templates/footer.inc.php");
|
||||
Herzlich Willkommen im internen Bereich!<br><br>
|
||||
</div>
|
||||
<div style="width:200px;">
|
||||
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'); ?>" id="formbenutzersuche" method="POST">
|
||||
<form action="<?php echo self_action(); ?>" id="formbenutzersuche" method="POST">
|
||||
<input type="hidden" name="aktion" value="benutzersuche" />
|
||||
<input type="hidden" name="userid_input" id="userid_input" />
|
||||
<label>Benutzersuche Anfragen:</label>
|
||||
@@ -67,28 +66,28 @@ if(!check_worker()){
|
||||
echo "</div><div class='container main-container' style='background-color:white;'>";
|
||||
|
||||
echo '<div style="float: left;padding: 20px;">
|
||||
<form action="' . $_SERVER["PHP_SELF"] .'" method=POST>
|
||||
<form action="' . self_action() .'" method=POST>
|
||||
<input type=hidden name=aktion value="1">
|
||||
<input type=hidden name=art value="1">
|
||||
<input type=submit class="btn btn-primary btn-sm" value="Unbeantworte Anfragen">
|
||||
</form>
|
||||
</div>';
|
||||
echo '<div style="float: left;padding: 20px;">
|
||||
<form action="' . $_SERVER["PHP_SELF"] .'" method=POST>
|
||||
<form action="' . self_action() .'" method=POST>
|
||||
<input type=hidden name=aktion value="1">
|
||||
<input type=hidden name=art value="2">
|
||||
<input type=submit class="btn btn-primary btn-sm" value="Letzten 100 Anfragen">
|
||||
</form>
|
||||
</div>';
|
||||
echo '<div style="float: left;padding: 20px;">
|
||||
<form action="' . $_SERVER["PHP_SELF"] .'" method=POST>
|
||||
<form action="' . self_action() .'" method=POST>
|
||||
<input type=hidden name=aktion value="1">
|
||||
<input type=hidden name=art value="3">
|
||||
<input type=submit class="btn btn-primary btn-sm" value="Letzten 500 Anfragen">
|
||||
</form>
|
||||
</div>';
|
||||
echo '<div style="float: left;padding: 20px;">
|
||||
<form action="' . $_SERVER["PHP_SELF"] .'" method=POST>
|
||||
<form action="' . self_action() .'" method=POST>
|
||||
<input type=hidden name=aktion value="1">
|
||||
<input type=hidden name=art value="4">
|
||||
<input type=submit class="btn btn-primary btn-sm" value="Alle Anfragen">
|
||||
@@ -175,30 +174,34 @@ if(!check_worker()){
|
||||
$date_created = $row["create_time"];
|
||||
$update_time = $row["update_time"];
|
||||
|
||||
$vorname = $row["vorname"];
|
||||
$nachname = $row["nachname"];
|
||||
$mail = $row["email"];
|
||||
$tel = $row["tele"];
|
||||
// Alle vom Patienten stammenden Felder werden hier maskiert.
|
||||
// Sie landen weiter unten unveraendert in einem HTML-String;
|
||||
// ohne e() koennte ein Anfragetext Skriptcode in den Browser
|
||||
// der Mitarbeiterin einschleusen.
|
||||
$vorname = e((string)$row["vorname"]);
|
||||
$nachname = e((string)$row["nachname"]);
|
||||
$mail = e((string)$row["email"]);
|
||||
$tel = e((string)$row["tele"]);
|
||||
$beantwortet = $row["beantwortet"];
|
||||
|
||||
$geburtstag = $row["geburtstag"];
|
||||
$geburtstag = e((string)$row["geburtstag"]);
|
||||
$ausgabegeburstag = $geburtstag;
|
||||
|
||||
$ort = $row["ort"];
|
||||
$plz = $row["plz"];
|
||||
$strasse = $row["strasse"];
|
||||
$ort = e((string)$row["ort"]);
|
||||
$plz = e((string)$row["plz"]);
|
||||
$strasse = e((string)$row["strasse"]);
|
||||
|
||||
$nachricht = $row["nachricht"];
|
||||
$medikamenteins = $row["medikament1"];
|
||||
$medikamentzwei = $row["medikament2"];
|
||||
$medikamentdrei = $row["medikament3"];
|
||||
$medikamentvier = $row["medikament4"];
|
||||
$medikamentfuenf = $row["medikament5"];
|
||||
$medikamentsechs = $row["medikament6"];
|
||||
$dateiname = $row["dateiname"];
|
||||
$nachricht = e((string)$row["nachricht"]);
|
||||
$medikamenteins = e((string)$row["medikament1"]);
|
||||
$medikamentzwei = e((string)$row["medikament2"]);
|
||||
$medikamentdrei = e((string)$row["medikament3"]);
|
||||
$medikamentvier = e((string)$row["medikament4"]);
|
||||
$medikamentfuenf = e((string)$row["medikament5"]);
|
||||
$medikamentsechs = e((string)$row["medikament6"]);
|
||||
$dateiname = e((string)$row["dateiname"]);
|
||||
|
||||
|
||||
$anfrageart = $row["artname"];
|
||||
$anfrageart = e((string)$row["artname"]);
|
||||
$ordnungsid = $row["ordnungsid"];
|
||||
$ordnungsstring = GetOrdnungsid($ordnungsid);
|
||||
$WeitereInfos= "";
|
||||
@@ -246,21 +249,21 @@ if(!check_worker()){
|
||||
$adresse = $adresse;
|
||||
echo "<tr style='background-color:". $farbe. ";'><td>$userausgabe <br> $mail <br>Tel:<a href='tel:".$tel."'>$tel</a></td><td>$adresse</td><td>$ordnungsstring - $anfrageart <br>$WeitereInfos</td><td>$datumausgabe</td><td>$update_time<br>$checkausgabe<br>$ausgabeworker</td><td>
|
||||
<div style='float: left;margin:15px; height: 20px;'>
|
||||
<form action='". $_SERVER["PHP_SELF"] ."' method=POST>
|
||||
<form action='". self_action() ."' method=POST>
|
||||
<input type=hidden name=aktion value=2>
|
||||
<input type=hidden name=anfrageid value=$anfrageid>
|
||||
<input type=submit class='btn btn-primary' value='Antworten'>
|
||||
</form>
|
||||
</div>
|
||||
<div style='float: left;margin:15px; height: 20px;'>
|
||||
<form action='". $_SERVER["PHP_SELF"] ."' method=POST>
|
||||
<form action='". self_action() ."' method=POST>
|
||||
<input type=hidden name=aktion value=20>
|
||||
<input type=hidden name=anfrageid value=$anfrageid>
|
||||
<input type=submit class='btn btn-primary' value='Telefonisch beantwortet'>
|
||||
</form>
|
||||
</div>
|
||||
<div style='float: left;margin:15px; height: 20px;'>
|
||||
<form action='". $_SERVER["PHP_SELF"] ."' method=POST>
|
||||
<form action='". self_action() ."' method=POST>
|
||||
<input type=hidden name=aktion value=8>
|
||||
<input type=hidden name=anfrageid value=$anfrageid>
|
||||
<input type=submit class='btn btn-primary' value='Löschen'>
|
||||
@@ -269,7 +272,7 @@ if(!check_worker()){
|
||||
if($beantwortet){
|
||||
echo "
|
||||
<div style='float: left;margin:15px; height: 20px;'>
|
||||
<form action='". $_SERVER["PHP_SELF"] ."' method=POST>
|
||||
<form action='". self_action() ."' method=POST>
|
||||
<input type=hidden name=aktion value=11>
|
||||
<input type=hidden name=anfrageid value=$anfrageid>
|
||||
<input type=submit class='btn btn-primary' value='Antwort einsehen'>
|
||||
@@ -290,7 +293,7 @@ if(!check_worker()){
|
||||
// Benutzer nachtragen
|
||||
}else if (($_POST["aktion"] ?? '') == "2") {
|
||||
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo "<form action='". self_action() . "' method=POST>";
|
||||
|
||||
|
||||
$anfrageid = (int)($_POST["anfrageid"] ?? 0);
|
||||
@@ -330,31 +333,33 @@ if(!check_worker()){
|
||||
$antwortid = $row["antwortid"] ?? null;
|
||||
$date_created = $row["create_time"];
|
||||
|
||||
$vorname = $row["vorname"];
|
||||
$nachname = $row["nachname"];
|
||||
$mail = $row["email"];
|
||||
$tel = $row["tele"];
|
||||
// Patientendaten maskieren - sie werden unten in HTML-Strings
|
||||
// eingesetzt und ausgegeben.
|
||||
$vorname = e((string)$row["vorname"]);
|
||||
$nachname = e((string)$row["nachname"]);
|
||||
$mail = e((string)$row["email"]);
|
||||
$tel = e((string)$row["tele"]);
|
||||
|
||||
$geburtstag = $row["geburtstag"];
|
||||
$geburtstag = e((string)$row["geburtstag"]);
|
||||
$ausgabegeburstag = $geburtstag;
|
||||
|
||||
$ort = $row["ort"];
|
||||
$plz = $row["plz"];
|
||||
$strasse = $row["strasse"];
|
||||
$ort = e((string)$row["ort"]);
|
||||
$plz = e((string)$row["plz"]);
|
||||
$strasse = e((string)$row["strasse"]);
|
||||
|
||||
$ordnungsid = $row["ordnungsid"];
|
||||
$ordnungsstring = GetOrdnungsid($ordnungsid);
|
||||
|
||||
$nachricht = $row["nachricht"];
|
||||
$nachricht = e((string)$row["nachricht"]);
|
||||
|
||||
$medikamenteins = $row["medikament1"];
|
||||
$medikamentzwei = $row["medikament2"];
|
||||
$medikamentdrei = $row["medikament3"];
|
||||
$medikamentvier = $row["medikament4"];
|
||||
$medikamentfuenf = $row["medikament5"];
|
||||
$medikamentsechs = $row["medikament6"];
|
||||
$medikamenteins = e((string)$row["medikament1"]);
|
||||
$medikamentzwei = e((string)$row["medikament2"]);
|
||||
$medikamentdrei = e((string)$row["medikament3"]);
|
||||
$medikamentvier = e((string)$row["medikament4"]);
|
||||
$medikamentfuenf = e((string)$row["medikament5"]);
|
||||
$medikamentsechs = e((string)$row["medikament6"]);
|
||||
|
||||
$anfrageart = $row["artname"];
|
||||
$anfrageart = e((string)$row["artname"]);
|
||||
$antworttext = $row["antworttext"] ?? null;
|
||||
|
||||
$WeitereInfos = "";
|
||||
@@ -464,12 +469,12 @@ if(!check_worker()){
|
||||
|
||||
echo "<h1>E-Mail bearbeiten</h1><br>";
|
||||
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo "<form action='". self_action() . "' method=POST>";
|
||||
echo "Betreff:<br>";
|
||||
echo "<input class='form-control' name=betreff type=text value='$betreff' id='betreff' onclick='checkTemplate()'><br>";
|
||||
echo '<textarea height=400 name="body" id="trumbowyg-demo" ></textarea>';
|
||||
echo "<input name=aktion type=hidden value=3>";
|
||||
echo "<input name=anfrageid type=hidden value='". $_POST["anfrageid"] ."' id='anfrageid'><br><br>";
|
||||
echo "<input name=anfrageid type=hidden value='". (int)($_POST["anfrageid"] ?? 0) ."' id='anfrageid'><br><br>";
|
||||
echo "<input type=submit class='btn btn-primary' value='Mail versenden'><br>";
|
||||
echo '</form>';
|
||||
echo "<br><br>";
|
||||
@@ -624,7 +629,7 @@ if(!check_worker()){
|
||||
So sollten Sie bei Urlaub ab Montag hier den Starttermin auf Freitag oder Samstag stellen. <br>
|
||||
Gleiches gilt für ein Ende an einem Freitag. Tragen Sie dann hier als Ende Sonntag ein.<br><br><br>";
|
||||
|
||||
echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="POST">';
|
||||
echo '<form action="' . self_action() . '" method="POST">';
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$start = (string)$row["start"];
|
||||
@@ -754,7 +759,7 @@ if(!check_worker()){
|
||||
echo "<h3>Aktuell gibt es folgende Einträge für die Notfallsprechstunde</h3>";
|
||||
echo "Soll die Notfallsprechstunde deaktiviert / gelöscht werden, dann das Anfangs- und Enddatum in die Vergangenheit legen und den Eintrag speichern.<br><br><br>";
|
||||
|
||||
echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="POST">';
|
||||
echo '<form action="' . self_action() . '" method="POST">';
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$start = $row["start"];
|
||||
@@ -840,7 +845,7 @@ if(!check_worker()){
|
||||
}
|
||||
die("Fehler beim Eintragen in der Datenbank: " . $e->getMessage());
|
||||
}
|
||||
echo' <form action="'. $_SERVER["PHP_SELF"] .'" method=POST>
|
||||
echo' <form action="'. self_action() .'" method=POST>
|
||||
<input type=hidden name=aktion value=6>
|
||||
<input type=submit class="btn btn-primary" value="Zurück">
|
||||
</form>';
|
||||
@@ -875,12 +880,12 @@ if(!check_worker()){
|
||||
|
||||
echo "Name:<br>$userausgabe<br>Anforderung: $impfstofftext<br>";
|
||||
echo "Wollen Sie wirklich diesen Eintrag löschen?<br>Dieses ist nicht rückgängig zu machen!<br>Dann bestätigen Sie die Abmeldung:<br>";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo "<form action='". self_action() . "' method=POST>";
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="9" />';
|
||||
echo '<input type="hidden" name="anfrageid" id="anfrageid" value="'. $anfrageid .'" /><br>';
|
||||
echo '<input type="submit" class="btn btn-primary" id="submitbox" value="Anforderung löschen (mit Mail)" />';
|
||||
echo "<br>";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo "<form action='". self_action() . "' method=POST>";
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="10" />';
|
||||
echo '<input type="hidden" name="anfrageid" id="anfrageid" value="'. $anfrageid .'" /><br>';
|
||||
echo '<input type="submit" class="btn btn-primary" id="submitbox" value="Anforderung löschen (ohne Mail)" />';
|
||||
@@ -1196,7 +1201,7 @@ if(!check_worker()){
|
||||
$stmt->execute([':term' => $like]);
|
||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
echo "<form action='" . $_SERVER['PHP_SELF'] . "' id='formbenutzersuche' method='POST'>";
|
||||
echo "<form action='" . self_action() . "' id='formbenutzersuche' method='POST'>";
|
||||
echo '<input type="hidden" name="aktion" value="benutzersuche" />';
|
||||
echo '<label>Benutzersuche:</label>';
|
||||
echo '<select class="form-control" name="userid_input" required>';
|
||||
@@ -1374,7 +1379,7 @@ if(!check_worker()){
|
||||
. "</td>";
|
||||
|
||||
echo "<td>
|
||||
<form action='" . $_SERVER["PHP_SELF"] . "' method='POST'>
|
||||
<form action='" . self_action() . "' method='POST'>
|
||||
<input type='hidden' name='aktion' value='11'>
|
||||
<input type='hidden' name='anfrageid' value='" . (int)$anfrageid . "'>
|
||||
<button type='submit' class='btn btn-primary btn-sm'>Antwort einsehen</button>
|
||||
@@ -1429,7 +1434,7 @@ if(!check_worker()){
|
||||
|
||||
// Umbuchen-Form (person_id weitergeben)
|
||||
echo "
|
||||
<form action='" . $_SERVER["PHP_SELF"] . "' method='POST'>
|
||||
<form action='" . self_action() . "' method='POST'>
|
||||
<input type='hidden' name='aktion' value='umbuchen'>
|
||||
<input type='hidden' name='person_id' value='" . (int)$personId . "'>
|
||||
<input type='submit' class='btn btn-primary btn-sm' value='Neuer Termin'>
|
||||
@@ -1798,7 +1803,7 @@ if(!check_worker()){
|
||||
|
||||
echo "<br><br>";
|
||||
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo "<form action='". self_action() . "' method=POST>";
|
||||
echo "Betreff:<br>";
|
||||
echo "<input class='form-control' name=betreff type=text value='". $betreff . "'> <br>";
|
||||
echo '<textarea height=200 name="body" id="mytextarea"> '. $body . '</textarea>';
|
||||
@@ -1832,7 +1837,7 @@ if(!check_worker()){
|
||||
// Auswahl der E-Mail Vorlagen
|
||||
} else if (($_POST["aktion"] ?? '') == "16") {
|
||||
|
||||
echo "<form action='" . $_SERVER['PHP_SELF'] . "' method='POST'>";
|
||||
echo "<form action='" . self_action() . "' method='POST'>";
|
||||
echo "Wählen Sie die zu bearbeitende Mailvorlage aus:<br><br>";
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
@@ -1903,7 +1908,7 @@ if(!check_worker()){
|
||||
|
||||
echo "<br><br>";
|
||||
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo "<form action='". self_action() . "' method=POST>";
|
||||
echo "Name der Vorlage:<br>";
|
||||
echo "<input class='form-control' name=name type=text value='$name' required><br>";
|
||||
echo "Betreff:<br>";
|
||||
@@ -1979,25 +1984,25 @@ if(!check_worker()){
|
||||
echo '<h3>Welche Aktion möchtest du durchführen?</h3>
|
||||
<table width=100%><tr><td width=40%>
|
||||
|
||||
<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>
|
||||
<form action="'. self_action() .'" method=POST>
|
||||
<input type=hidden name=aktion value=1>
|
||||
<input type=submit class="btn btn-primary btn-lg" value="Formular-Anfragen bearbeiten">
|
||||
</form>
|
||||
</td></tr>
|
||||
<tr><td><br><br>
|
||||
<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>
|
||||
<form action="'. self_action() .'" method=POST>
|
||||
<input type=hidden name=aktion value=18>
|
||||
<input type=submit class="btn btn-primary" value="Mailvorlagen anlegen">
|
||||
</form>
|
||||
</td></tr>
|
||||
<tr><td><br><br>
|
||||
<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>
|
||||
<form action="'. self_action() .'" method=POST>
|
||||
<input type=hidden name=aktion value=12>
|
||||
<input type=submit class="btn btn-primary" value="Formular Auswertung">
|
||||
</form>
|
||||
</td></tr>
|
||||
<tr><td><br><br>
|
||||
<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>
|
||||
<form action="'. self_action() .'" method=POST>
|
||||
<input type=hidden name=aktion value=16>
|
||||
<input type=submit class="btn btn-primary" value="Mailvorlagen anpassen">
|
||||
</form>
|
||||
@@ -2005,13 +2010,13 @@ if(!check_worker()){
|
||||
<tr></tr>
|
||||
<tr><td><h3>Urlaub / Hinweis planen</h3></td><td></td></tr>
|
||||
<tr><td>
|
||||
<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>
|
||||
<form action="'. self_action() .'" method=POST>
|
||||
<input type=hidden name=aktion value=4>
|
||||
<input type=submit class="btn btn-primary btn-lg" value="Urlaub eintragen">
|
||||
</form>
|
||||
</td></tr>
|
||||
<tr><td><br><br>
|
||||
<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>
|
||||
<form action="'. self_action() .'" method=POST>
|
||||
<input type=hidden name=aktion value=6>
|
||||
<input type=submit class="btn btn-primary" value="Notfallsprechstunde eintragen">
|
||||
</form>
|
||||
@@ -2043,7 +2048,7 @@ if(!check_worker()){
|
||||
}
|
||||
?>
|
||||
|
||||
<br><br><br><input type="button" class='btn btn-secondary' value="Zum Hauptmenü" onClick="location.href='<?php echo $_SERVER['PHP_SELF'];?>'">
|
||||
<br><br><br><input type="button" class='btn btn-secondary' value="Zum Hauptmenü" onClick="location.href='<?php echo self_action();?>'">
|
||||
|
||||
</section>
|
||||
|
||||
@@ -2092,7 +2097,8 @@ if(!check_worker()){
|
||||
url: 'mailtemplate.php',
|
||||
data: {
|
||||
templetid: templetid,
|
||||
anfrageid: anfrageid
|
||||
anfrageid: anfrageid,
|
||||
csrf_token: "<?php echo csrf_token(); ?>"
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
|
||||
+30
-31
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
// WICHTIG: Pfade aus /admin heraus korrekt auflösen
|
||||
require_once __DIR__ . "/../inc/config.inc.php";
|
||||
@@ -24,7 +23,7 @@ include("templates/footer.inc.php");
|
||||
<?php
|
||||
|
||||
echo '<div style="float: right; width: 200px; ">';
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' id='formbenutzersuche' method=POST>";
|
||||
echo "<form action='". self_action() . "' id='formbenutzersuche' method=POST>";
|
||||
echo '<input type="hidden" name="aktion" value="benutzersuche" />';
|
||||
echo '<input type="hidden" name="userid_input" id="userid_input" />';
|
||||
echo '<label>Benutzersuche Impfen:</label>
|
||||
@@ -55,7 +54,7 @@ if(!check_worker()){
|
||||
<?php
|
||||
|
||||
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
echo "Wochentag:<br>";
|
||||
echo "<select name=date>";
|
||||
echo "<option value=Mo>montags</option>";
|
||||
@@ -91,14 +90,14 @@ if(!check_worker()){
|
||||
|
||||
|
||||
echo "<br><br>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
echo '<input type=submit class="btn btn-primary btn-sm" value="zurück">';
|
||||
echo "</form>";
|
||||
|
||||
}elseif($_POST["aktion"] == "folgenewtermin"){
|
||||
|
||||
echo "<h3>Folge von Terminen anlegen</h3><br>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
echo "Datum: <input name=date type=date class='form-control' required><br>";
|
||||
echo "Startzeit: <input name=folgestartzeit type=time class='form-control' required><br>";
|
||||
echo "Länge eines Termins (Min): <input name=folgelaenge type=number class='form-control' required><br>";
|
||||
@@ -112,7 +111,7 @@ if(!check_worker()){
|
||||
echo '<input type=submit class="btn btn-primary" value="Neue Zeitslots anlegen"></form>';
|
||||
|
||||
echo "<br><br>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
echo '<input type=submit class="btn btn-primary btn-sm" value="zurück">';
|
||||
echo "</form>";
|
||||
|
||||
@@ -128,7 +127,7 @@ if(!check_worker()){
|
||||
$sqlstring = "DELETE FROM togo_termin_teilnehmer WHERE terminteilnehmerid = " . (int)$_GET["uid"];
|
||||
$query = mysqli_query($con,$sqlstring);
|
||||
if($query){
|
||||
$sqlstring = "Update togo_termin SET count=count-1 WHERE terminid = ". $_GET["id"] . "";
|
||||
$sqlstring = "Update togo_termin SET count=count-1 WHERE terminid = " . (int)($_GET["id"] ?? 0);
|
||||
$query = mysqli_query($con,$sqlstring);
|
||||
echo "<div class='infofenster'><h4>Eintrag wurde gelöscht!<h4></div>";
|
||||
|
||||
@@ -153,14 +152,14 @@ if(!check_worker()){
|
||||
$togoid = $row["IP"];
|
||||
$togodate = $row["create_time"];
|
||||
|
||||
echo "<tr><td>" . $i . "</td><td>". $togoname ." - " . $togomail . "</td><td>" . $togoid . "</td><td>" . $togodate . "</td><td> <a href=". $_SERVER["PHP_SELF"] ."?a=showtogotermin&b=removeentry&id=$terminid&uid=$terminteilnehmerid class='glyphicon glyphicon-remove' onclick=\"return confirm('Eintrag ". $togoname ."/". $togomail." wirklich löschen?');\" title='löschen'></a> </td></tr>";
|
||||
echo "<tr><td>" . $i . "</td><td>". $togoname ." - " . $togomail . "</td><td>" . $togoid . "</td><td>" . $togodate . "</td><td> <a href=". self_action() ."?a=showtogotermin&b=removeentry&id=$terminid&uid=$terminteilnehmerid class='glyphicon glyphicon-remove' onclick=\"return confirm('Eintrag ". $togoname ."/". $togomail." wirklich löschen?');\" title='löschen'></a> </td></tr>";
|
||||
$i++;
|
||||
}
|
||||
echo "</table>";
|
||||
|
||||
|
||||
echo "<br><br>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
echo "<input type=hidden name=aktion value=togoterminverwaltung >";
|
||||
echo '<input type=submit class="btn btn-primary btn-sm" value="zurück">';
|
||||
echo "</form>";
|
||||
@@ -183,7 +182,7 @@ if(!check_worker()){
|
||||
}
|
||||
|
||||
echo "<h3>Termin Anpassung</h3>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
|
||||
echo "Datum:<br>";
|
||||
echo "<input type=date name=date class='form-control' value=$date>";
|
||||
@@ -208,14 +207,14 @@ if(!check_worker()){
|
||||
echo "<input type=int name=error class='form-control' value=$error>";
|
||||
echo "<br><br>";
|
||||
echo "<input type=hidden name=save value=saveediteinzeltermin >";
|
||||
echo "<input type=hidden name=terminid value=". $_GET["id"] . " >";
|
||||
echo "<input type=hidden name=terminid value=" . (int)($_GET["id"] ?? 0) . " >";
|
||||
echo '<input type=submit class="btn btn-primary btn-sm" value="Termin speichern">';
|
||||
echo "</form>";
|
||||
|
||||
|
||||
|
||||
echo "<br><br>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
//echo "<input type=hidden name=aktion value=togoterminverwaltung >";
|
||||
|
||||
echo '<input type=submit class="btn btn-primary btn-sm" value="zurück">';
|
||||
@@ -243,14 +242,14 @@ if(!check_worker()){
|
||||
Standort: $standort<br>
|
||||
<br>";
|
||||
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo "<form action='". self_action() . "' method=POST>";
|
||||
echo "Betreff:<br>";
|
||||
echo "<input name=betreff type=text class='form-control' ><br>";
|
||||
echo "<div id=my-editor></div>";
|
||||
echo "Inhalt:<br>";
|
||||
echo '<textarea height=200 name="body" id="trumbowyg-demo"></textarea>';
|
||||
echo "<input name=save type=hidden value=savesendmail>";
|
||||
echo "<input name=id type=hidden value='". $_GET["id"] . "'><br><br>";
|
||||
echo "<input name=id type=hidden value='" . (int)($_GET["id"] ?? 0) . "'><br><br>";
|
||||
echo "<input type=submit value='Speichern'><br>";
|
||||
echo '</form>';
|
||||
}else if($_GET["a"] == "togomaildeletetimes" ){
|
||||
@@ -261,7 +260,7 @@ if(!check_worker()){
|
||||
echo "Hiermit werden alle Benutzer mit abgesagten Terminen informiert und die Einträge dann gelöscht.<br>";
|
||||
|
||||
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo "<form action='". self_action() . "' method=POST>";
|
||||
echo "Betreff:<br>";
|
||||
echo "<input name=betreff type=text class='form-control' ><br>";
|
||||
echo "<div id=my-editor></div>";
|
||||
@@ -288,7 +287,7 @@ if(!check_worker()){
|
||||
}
|
||||
|
||||
echo "<h3>Serientermin Anpassung</h3>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
echo "<input type=hidden name=aktion value=togoeditserientermin class='form-control'>";
|
||||
echo "Wochentag:<br>";
|
||||
|
||||
@@ -358,7 +357,7 @@ if(!check_worker()){
|
||||
|
||||
|
||||
echo "<br><br>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
echo "<input type=hidden name=aktion value=togoterminverwaltung >";
|
||||
echo '<input type=submit class="btn btn-primary btn-sm" value="zurück">';
|
||||
echo "</form>";
|
||||
@@ -370,7 +369,7 @@ if(!check_worker()){
|
||||
}elseif($_GET["a"] == "togoAddUser" || $_POST["aktion"] == "togoAddUser" ){
|
||||
|
||||
$textausgabe .= "<h3>ToGo Anmeldung</h3>";
|
||||
$textausgabe .= '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
$textausgabe .= '<form action="'. self_action() .'" method=POST>';
|
||||
$textausgabe .= "Melden Sie sich unverbindlich an.<br>Es wird Ihre IP-Addresse gespeichert.<br><br><h3>Dieses dient nur zur Planung und ist keine feste Terminzusage!</h3>";
|
||||
$textausgabe .= "Bitte beachten Sie, dass die angezeigte Anzahl der Online Anmeldungen vom tatsächlichen Andrang vor Ort abweichen kann.<br>Auch ist eine Verschiebung der Impfung für einzelne Impflinge immer möglich!<br><br>";
|
||||
$textausgabe .= "";
|
||||
@@ -384,7 +383,7 @@ if(!check_worker()){
|
||||
$textausgabe .= "<input type=hidden name=save value=saveadduser >";
|
||||
//$textausgabe .= "<input type=hidden name=aktion value=togoAddUser >";
|
||||
$textausgabe .= "<input type=hidden name=ip value='PraxisTeam Eintrag' >";
|
||||
$textausgabe .= "<input type=hidden name=terminid value='".$_GET["id"] ."' >";
|
||||
$textausgabe .= "<input type=hidden name=terminid value='" . (int)($_GET["id"] ?? 0) . "' >";
|
||||
$textausgabe .= '<input type=submit class="btn btn-primary btn-sm" value="Unverbindlich anmelden"><br>';
|
||||
$textausgabe .= "</form>";
|
||||
$textausgabe .= "<br><br>Bitte beachten Sie, dass die angezeigte Anzahl der Online Anmeldungen vom tatsächlichen Andrang vor Ort abweichen kann.<br>Auch ist eine Verschiebung der Impfung für einzelne Impflinge immer möglich!<br><br>";
|
||||
@@ -399,7 +398,7 @@ if(!check_worker()){
|
||||
|
||||
|
||||
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
|
||||
echo "<input type=date name=date class='form-control'>";
|
||||
echo "<br><br>";
|
||||
@@ -423,7 +422,7 @@ if(!check_worker()){
|
||||
|
||||
|
||||
echo "<br><br>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
echo '<input type=submit class="btn btn-primary btn-sm" value="zurück">';
|
||||
echo "</form>";
|
||||
|
||||
@@ -453,7 +452,7 @@ if(!check_worker()){
|
||||
|
||||
if($_GET["a"] == "activetogotermin" ){
|
||||
|
||||
$sqlstring = "Update togo_termin SET count='0' WHERE terminid = ". $_GET["id"] . "";
|
||||
$sqlstring = "Update togo_termin SET count='0' WHERE terminid = " . (int)($_GET["id"] ?? 0);
|
||||
$query = mysqli_query($con,$sqlstring);
|
||||
if($query){
|
||||
echo "<div class='infofenster'><h4>Termin wurde aktiviert!<h4></div>";
|
||||
@@ -465,7 +464,7 @@ if(!check_worker()){
|
||||
}
|
||||
if($_GET["a"] == "removetogotermin" ){
|
||||
|
||||
$sqlstring = "Update togo_termin SET count='-1' WHERE terminid = ". $_GET["id"] . "";
|
||||
$sqlstring = "Update togo_termin SET count='-1' WHERE terminid = " . (int)($_GET["id"] ?? 0);
|
||||
$query = mysqli_query($con,$sqlstring);
|
||||
|
||||
if($query){
|
||||
@@ -815,11 +814,11 @@ $queryinsert = $stmt->execute([
|
||||
$togostandort = $row["standort"];
|
||||
$togowarning = $row["warning"];
|
||||
$togoerror = $row["error"];
|
||||
echo "<tr><td>" . $ausgabedate . "</td><td>" . date("H:i", strtotime($togostart)) . " - " . date("H:i", strtotime($togoende)) . "</td><td>" . $togostandort . " - Gelb:" . $togowarning . " Rot:" . $togoerror . "</td><td> <a href=". $_SERVER["PHP_SELF"] ."?a=removeserie&id=$togovorgabenid class='glyphicon glyphicon-remove' title='löschen' onclick=\"return confirm('Eintrag " . $ausgabedate . " " . date("H:i", strtotime($togostart)) . " - " . date("H:i", strtotime($togoende)) . " wirklich löschen?');\" ></a></td><td>";
|
||||
echo "<tr><td>" . $ausgabedate . "</td><td>" . date("H:i", strtotime($togostart)) . " - " . date("H:i", strtotime($togoende)) . "</td><td>" . $togostandort . " - Gelb:" . $togowarning . " Rot:" . $togoerror . "</td><td> <a href=". self_action() ."?a=removeserie&id=$togovorgabenid class='glyphicon glyphicon-remove' title='löschen' onclick=\"return confirm('Eintrag " . $ausgabedate . " " . date("H:i", strtotime($togostart)) . " - " . date("H:i", strtotime($togoende)) . " wirklich löschen?');\" ></a></td><td>";
|
||||
|
||||
}
|
||||
echo "</table><br>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
echo "<input type=hidden name=aktion value=togoterminverwaltungnewserie >";
|
||||
echo '<input type=submit class="btn btn-primary btn-sm" value="neuer Serientermin">';
|
||||
echo "</form>";
|
||||
@@ -842,18 +841,18 @@ $queryinsert = $stmt->execute([
|
||||
$togoerror = $row["error"];
|
||||
if($togocount >= 0){
|
||||
|
||||
echo "<tr><td>" . date("d.m.y", strtotime($togodate)) . "</td><td>" . date("H:i", strtotime($togostart)) . " - " . date("H:i", strtotime($togoende)) . "</td><td>" . $togostandort . "</td><td>Meldung:" . $togocount . " - Gelb:" . $togowarning . " Rot:" . $togoerror . "</td><td><a href=". $_SERVER["PHP_SELF"] ."?a=togoAddUser&id=$togoterminid class='glyphicon glyphicon-plus' title='Patient hinzufügen'></a> <a href=". $_SERVER["PHP_SELF"] ."?a=showtogotermin&id=$togoterminid class='glyphicon glyphicon-eye-open' title='einsehen'></a> <a href=". $_SERVER["PHP_SELF"] ."?a=togoedittermin&id=$togoterminid class='glyphicon glyphicon-pencil' title='anpassen'></a> <a href=". $_SERVER["PHP_SELF"] ."?a=togosendmail&id=$togoterminid class='glyphicon glyphicon-envelope' title='Mail an alle Teilnehmer'></a> <a href=". $_SERVER["PHP_SELF"] ."?a=removetogotermin&id=$togoterminid class='glyphicon glyphicon-remove' title='deaktiveren'></a> </td></tr>";
|
||||
echo "<tr><td>" . date("d.m.y", strtotime($togodate)) . "</td><td>" . date("H:i", strtotime($togostart)) . " - " . date("H:i", strtotime($togoende)) . "</td><td>" . $togostandort . "</td><td>Meldung:" . $togocount . " - Gelb:" . $togowarning . " Rot:" . $togoerror . "</td><td><a href=". self_action() ."?a=togoAddUser&id=$togoterminid class='glyphicon glyphicon-plus' title='Patient hinzufügen'></a> <a href=". self_action() ."?a=showtogotermin&id=$togoterminid class='glyphicon glyphicon-eye-open' title='einsehen'></a> <a href=". self_action() ."?a=togoedittermin&id=$togoterminid class='glyphicon glyphicon-pencil' title='anpassen'></a> <a href=". self_action() ."?a=togosendmail&id=$togoterminid class='glyphicon glyphicon-envelope' title='Mail an alle Teilnehmer'></a> <a href=". self_action() ."?a=removetogotermin&id=$togoterminid class='glyphicon glyphicon-remove' title='deaktiveren'></a> </td></tr>";
|
||||
}else{
|
||||
echo "<tr><td>" . date("d.m.y", strtotime($togodate)) . "</td><td>" . date("H:i", strtotime($togostart)) . " - " . date("H:i", strtotime($togoende)) . "</td><td>" . $togostandort . "</td><td>deaktivert - Gelb:" . $togowarning . " Rot:" . $togoerror . "</td><td> <a href=". $_SERVER["PHP_SELF"] ."?a=activetogotermin&id=$togoterminid class='glyphicon glyphicon-ok' title='aktivieren'></a> <a href=". $_SERVER["PHP_SELF"] ."?a=showtogotermin&id=$togoterminid class='glyphicon glyphicon-eye-open' title='einsehen'></a> <a href=". $_SERVER["PHP_SELF"] ."?a=togosendmail&id=$togoterminid class='glyphicon glyphicon-envelope' title='Mail an alle Teilnehmer'></a> <a href=". $_SERVER["PHP_SELF"] ."?a=deletetogotermin&id=$togoterminid class='glyphicon glyphicon-remove' title='Dauerhaft löschen' onclick=\"return confirm('Eintrag " . $togodate . " " . date("H:i", strtotime($togostart)) . " - " . date("H:i", strtotime($togoende)) . " wirklich löschen? Serientermine dürfen nicht gelöscht werden, da diese sonst wieder erstellt werden.');\"></a> </td></tr>";
|
||||
echo "<tr><td>" . date("d.m.y", strtotime($togodate)) . "</td><td>" . date("H:i", strtotime($togostart)) . " - " . date("H:i", strtotime($togoende)) . "</td><td>" . $togostandort . "</td><td>deaktivert - Gelb:" . $togowarning . " Rot:" . $togoerror . "</td><td> <a href=". self_action() ."?a=activetogotermin&id=$togoterminid class='glyphicon glyphicon-ok' title='aktivieren'></a> <a href=". self_action() ."?a=showtogotermin&id=$togoterminid class='glyphicon glyphicon-eye-open' title='einsehen'></a> <a href=". self_action() ."?a=togosendmail&id=$togoterminid class='glyphicon glyphicon-envelope' title='Mail an alle Teilnehmer'></a> <a href=". self_action() ."?a=deletetogotermin&id=$togoterminid class='glyphicon glyphicon-remove' title='Dauerhaft löschen' onclick=\"return confirm('Eintrag " . $togodate . " " . date("H:i", strtotime($togostart)) . " - " . date("H:i", strtotime($togoende)) . " wirklich löschen? Serientermine dürfen nicht gelöscht werden, da diese sonst wieder erstellt werden.');\"></a> </td></tr>";
|
||||
}
|
||||
}
|
||||
echo "</table><br>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
echo "<input type=hidden name=aktion value=togoterminverwaltungnewtogo >";
|
||||
echo '<input type=submit class="btn btn-primary btn-sm" value="neuer Einzeltermin">';
|
||||
echo "</form>";
|
||||
echo "<br>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
echo "<input type=hidden name=aktion value=folgenewtermin >";
|
||||
echo '<input type=submit class="btn btn-primary btn-sm" value="neue Terminfolge">';
|
||||
echo "</form>";
|
||||
@@ -907,10 +906,10 @@ $queryinsert = $stmt->execute([
|
||||
|
||||
if( $anzahlzeilen != 0){
|
||||
echo "<h4>Abgesagte Termine</h4>";
|
||||
echo "<a href=". $_SERVER["PHP_SELF"] ."?a=togomaildeletetimes title='Mail an alle Teilnehmer' class='btn btn-primary btn-sm'>Mail an alle Teilnehmer bei abgesagten Terminen</a> ";
|
||||
echo "<a href=". self_action() ."?a=togomaildeletetimes title='Mail an alle Teilnehmer' class='btn btn-primary btn-sm'>Mail an alle Teilnehmer bei abgesagten Terminen</a> ";
|
||||
}
|
||||
echo "<br><br>";
|
||||
echo '<form action="'. $_SERVER["PHP_SELF"] .'" method=POST>';
|
||||
echo '<form action="'. self_action() .'" method=POST>';
|
||||
echo "<input type=hidden name=aktion value=togoterminverwaltung >";
|
||||
echo '<input type=submit class="btn btn-primary btn-sm" value="zurück">';
|
||||
echo "</form>";
|
||||
|
||||
Reference in New Issue
Block a user