Compare commits
22 Commits
70a78c9586
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| fd320ba0c6 | |||
| aae89a45a8 | |||
| 6360af272a | |||
| 091702c2a2 | |||
| c9b0026f52 | |||
| bb422005d0 | |||
| 098c2d4275 | |||
| 7388b5b379 | |||
| 016753293c | |||
| 874e8a04c0 | |||
| 0084516414 | |||
| e22dbc980c | |||
| 8470e90f56 | |||
| 26666aef30 | |||
| 3fee4eefe2 | |||
| 6dd0ac86b2 | |||
| 211ce11e06 | |||
| 00077aa09a | |||
| 4b4c1f74df | |||
| f5ffaf297d | |||
| 7ef1bbb2e9 | |||
| 3bd55a2bcb |
@@ -0,0 +1,5 @@
|
||||
*.woff binary
|
||||
*.woff2 binary
|
||||
*.ttf binary
|
||||
*.eot binary
|
||||
*.otf binary
|
||||
@@ -25,3 +25,9 @@
|
||||
/app/Config/database.php
|
||||
/vendors/*
|
||||
|
||||
# Local editor/deploy configuration
|
||||
/.vscode/ftp-sync.json
|
||||
/.vscode/sftp.json
|
||||
|
||||
.vscode/ftp-sync.json
|
||||
.vscode/sftp.json
|
||||
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"remotePath": "./",
|
||||
"host": "your-host",
|
||||
"username": "your-username",
|
||||
"password": "your-password",
|
||||
"port": 21,
|
||||
"secure": true,
|
||||
"protocol": "ftp",
|
||||
"uploadOnSave": false,
|
||||
"passive": false,
|
||||
"debug": false,
|
||||
"privateKeyPath": null,
|
||||
"passphrase": null,
|
||||
"agent": null,
|
||||
"allow": [],
|
||||
"ignore": [
|
||||
"\\.vscode",
|
||||
"\\.git",
|
||||
"\\.DS_Store"
|
||||
],
|
||||
"generatedFiles": {
|
||||
"extensionsToInclude": [
|
||||
""
|
||||
],
|
||||
"path": ""
|
||||
}
|
||||
}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"sqltools.connections": [
|
||||
{
|
||||
"mysqlOptions": {
|
||||
"authProtocol": "default",
|
||||
"enableSsl": "Disabled"
|
||||
},
|
||||
"ssh": "Disabled",
|
||||
"previewLimit": 50,
|
||||
"server": "mysql2fda.netcup.net",
|
||||
"port": 3306,
|
||||
"driver": "MySQL",
|
||||
"name": "Praxis Creutzburg",
|
||||
"database": "k25330_pracreutz",
|
||||
"username": "k25330_pracreutz"
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "Project Deployment",
|
||||
"host": "your-host",
|
||||
"protocol": "ftp",
|
||||
"port": 21,
|
||||
"username": "your-username",
|
||||
"password": "your-password",
|
||||
"remotePath": "/",
|
||||
"secure": true,
|
||||
"uploadOnSave": false,
|
||||
"useTempFile": false,
|
||||
"openSsh": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
CREATE TABLE IF NOT EXISTS time_error_notification_state (
|
||||
employee_id INT NOT NULL,
|
||||
cycle_started_on DATE NOT NULL,
|
||||
first_error_date DATE NOT NULL,
|
||||
last_notification_stage VARCHAR(50) DEFAULT NULL,
|
||||
last_notification_sent_at DATETIME DEFAULT NULL,
|
||||
employee_day_1_sent_at DATETIME DEFAULT NULL,
|
||||
employee_day_3_sent_at DATETIME DEFAULT NULL,
|
||||
admin_day_7_sent_at DATETIME DEFAULT NULL,
|
||||
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (employee_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS time_error_notifications (
|
||||
id INT NOT NULL AUTO_INCREMENT,
|
||||
employee_id INT NOT NULL,
|
||||
cycle_started_on DATE NOT NULL,
|
||||
notification_stage VARCHAR(50) NOT NULL,
|
||||
recipient_email VARCHAR(255) NOT NULL,
|
||||
sent_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY uniq_time_error_notification (employee_id, cycle_started_on, notification_stage, recipient_email)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
+30
-30
@@ -1,30 +1,30 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once("inc/config.inc.php");
|
||||
require_once("inc/functions.inc.php");
|
||||
|
||||
//Überprüfe, dass der User eingeloggt ist
|
||||
//Der Aufruf von check_user() muss in alle internen Seiten eingebaut sein
|
||||
$user = check_admin_user();
|
||||
|
||||
include("templates/header.inc.php");
|
||||
|
||||
|
||||
if(check_admin()){
|
||||
echo "Admin";
|
||||
}else{
|
||||
echo "nicht Admin";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
include("templates/footer.inc.php")
|
||||
?>
|
||||
<?php
|
||||
session_start();
|
||||
require_once("inc/config.inc.php");
|
||||
require_once("inc/functions.inc.php");
|
||||
|
||||
//Überprüfe, dass der User eingeloggt ist
|
||||
//Der Aufruf von check_user() muss in alle internen Seiten eingebaut sein
|
||||
$user = check_admin_user();
|
||||
|
||||
include("templates/header.inc.php");
|
||||
|
||||
|
||||
if(check_admin()){
|
||||
echo "Admin";
|
||||
}else{
|
||||
echo "nicht Admin";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
include("templates/footer.inc.php")
|
||||
?>
|
||||
|
||||
+100
-63
@@ -1,16 +1,19 @@
|
||||
<?php
|
||||
// admin/bootstrap.php
|
||||
ob_start(); // fängt zufälligen Output ab, verhindert "headers already sent" Folgeschäden
|
||||
if (session_status() !== PHP_SESSION_ACTIVE) {
|
||||
session_start();
|
||||
}
|
||||
session_start();
|
||||
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
// WICHTIG: Pfade aus /admin heraus korrekt auflösen
|
||||
require_once __DIR__ . "/../inc/config.inc.php";
|
||||
require_once __DIR__ . "/../inc/functions.inc.php";
|
||||
require_once __DIR__ . "/../inc/company_holiday_sync.inc.php";
|
||||
|
||||
// Login prüfen
|
||||
$user = check_admin_user();
|
||||
|
||||
include __DIR__ . "/templates/header.inc.php";
|
||||
|
||||
$user = check_admin_user();
|
||||
$internUserId = (int)$_SESSION['auth']['id'];
|
||||
include("templates/header.inc.php");
|
||||
|
||||
if (!$user) { echo "<div class='container main-container'><h3>Erst anmelden: <a href=login.php>Login</a></h3><br>";
|
||||
|
||||
include("templates/footer.inc.php");
|
||||
@@ -18,22 +21,21 @@ include("templates/footer.inc.php");
|
||||
?>
|
||||
<script src="/admin/js/tinymce/tinymce.min.js" referrerpolicy="origin"></script>
|
||||
<div class="container main-container">
|
||||
<?php
|
||||
##test2
|
||||
echo '<div style="float: right; width: 200px; ">';
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' 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 Anfragen:</label>
|
||||
<input type="text" id="user_input" name="skill_input" width="48"/>';
|
||||
//echo '<input type="submit" class="btn btn-primary" id="submitbox" value="" />';
|
||||
echo "</form>";
|
||||
echo '</div>';
|
||||
?>
|
||||
<h2>Administration - Anfragen</h2>
|
||||
|
||||
Hallo <?php echo htmlentities($user['vorname']); ?>,<br>
|
||||
Herzlich Willkommen im internen Bereich!<br><br>
|
||||
<div style="display:flex; justify-content:space-between; align-items:flex-start; gap:20px; flex-wrap:wrap;">
|
||||
<div>
|
||||
<h2>Administration - Anfragen</h2>
|
||||
Hallo <?php echo htmlentities($user['vorname']); ?>,<br>
|
||||
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">
|
||||
<input type="hidden" name="aktion" value="benutzersuche" />
|
||||
<input type="hidden" name="userid_input" id="userid_input" />
|
||||
<label>Benutzersuche Anfragen:</label>
|
||||
<input type="text" id="user_input" name="skill_input" width="48" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -41,13 +43,24 @@ Herzlich Willkommen im internen Bereich!<br><br>
|
||||
|
||||
<?php
|
||||
|
||||
$aktion = $_POST["aktion"] ?? $_GET["aktion"] ?? '';
|
||||
$artRequest = $_POST["art"] ?? $_GET["art"] ?? "1";
|
||||
|
||||
if ($aktion !== '') {
|
||||
$_POST["aktion"] = $aktion;
|
||||
}
|
||||
|
||||
if ($artRequest !== '') {
|
||||
$_POST["art"] = $artRequest;
|
||||
}
|
||||
|
||||
if(!check_worker()){
|
||||
echo "<div class='container main-container'><h3>Erst anmelden: <a href=login.php>Login</a></h3><br>";
|
||||
echo $_SESSION['userid'];
|
||||
|
||||
}else{
|
||||
|
||||
if (($_POST["aktion"] ?? '') == "1") {
|
||||
if ($aktion == "1") {
|
||||
|
||||
|
||||
echo "<header><h2>Anfragen bearbeiten</h2></header>";
|
||||
@@ -93,7 +106,7 @@ if(!check_worker()){
|
||||
|
||||
|
||||
|
||||
$art = $_POST["art"] ?? "1";
|
||||
$art = $artRequest;
|
||||
|
||||
// Default
|
||||
$sql = "
|
||||
@@ -623,12 +636,12 @@ if(!check_worker()){
|
||||
|
||||
echo "Start: <input class='form-control' name='Starttime[]' type='date' value='" . htmlspecialchars($start, ENT_QUOTES, 'UTF-8') . "'>
|
||||
Ende: <input class='form-control' name='Endetime[]' type='date' value='" . htmlspecialchars($ende, ENT_QUOTES, 'UTF-8') . "'><br>
|
||||
Vertretung: <input class='form-control' name='vertretung[]' type='text' value='" . htmlspecialchars($vertretung, ENT_QUOTES, 'UTF-8') . "'>";
|
||||
Vertretung: <input class='form-control' name='vertretung[]' type='text' required value='" . htmlspecialchars($vertretung, ENT_QUOTES, 'UTF-8') . "'>";
|
||||
|
||||
echo "<br>Vertretung Telefon: <input class='form-control' name='vertretertelefon[]' type='text' value='" . htmlspecialchars($vertretertelefon, ENT_QUOTES, 'UTF-8') . "'>
|
||||
<br>Vertretung Adresse: <input class='form-control' name='vertreteradresse[]' type='text' value='" . htmlspecialchars($vertreteradresse, ENT_QUOTES, 'UTF-8') . "'>";
|
||||
echo "<br>Vertretung Telefon: <input class='form-control' name='vertretertelefon[]' type='text' required value='" . htmlspecialchars($vertretertelefon, ENT_QUOTES, 'UTF-8') . "'>
|
||||
<br>Vertretung Adresse: <input class='form-control' name='vertreteradresse[]' type='text' required value='" . htmlspecialchars($vertreteradresse, ENT_QUOTES, 'UTF-8') . "'>";
|
||||
|
||||
echo "<br>Vertretung Webseite: <input class='form-control' name='vertreterurl[]' type='text' value='" . htmlspecialchars($vertreterurl, ENT_QUOTES, 'UTF-8') . "'>";
|
||||
echo "<br>Vertretung Webseite: <input class='form-control' name='vertreterurl[]' type='text' required value='" . htmlspecialchars($vertreterurl, ENT_QUOTES, 'UTF-8') . "'>";
|
||||
|
||||
echo "<input name='urlaubid[]' type='hidden' value='" . $urlaubid . "'><br>";
|
||||
}
|
||||
@@ -655,40 +668,64 @@ if(!check_worker()){
|
||||
}else if (($_POST["aktion"] ?? '') == "5") {
|
||||
// Termine in DB speichern.
|
||||
$i =0;
|
||||
foreach ($_POST['Starttime'] as $Starttime) {
|
||||
//echo $datum . "<br>";
|
||||
if($_POST["Starttime"][$i] != "0000-00-00"){
|
||||
//echo $_POST["urlaubid"][$i] . "<br>";
|
||||
$stmt = $pdo->prepare("
|
||||
INSERT INTO urlaub
|
||||
(urlaubid, vertretung, start, ende, vertretertelefon, vertreteradresse, vertreterurl)
|
||||
VALUES
|
||||
(:urlaubid, :vertretung, :start, :ende, :telefon, :adresse, :url)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
vertretung = VALUES(vertretung),
|
||||
start = VALUES(start),
|
||||
ende = VALUES(ende),
|
||||
vertretertelefon = VALUES(vertretertelefon),
|
||||
vertreteradresse = VALUES(vertreteradresse),
|
||||
vertreterurl = VALUES(vertreterurl)
|
||||
");
|
||||
$pdo->beginTransaction();
|
||||
try {
|
||||
foreach ($_POST['Starttime'] as $Starttime) {
|
||||
if($_POST["Starttime"][$i] != "0000-00-00"){
|
||||
$vertretung = trim((string)($_POST['vertretung'][$i] ?? ''));
|
||||
$vertretertelefon = trim((string)($_POST['vertretertelefon'][$i] ?? ''));
|
||||
$vertreteradresse = trim((string)($_POST['vertreteradresse'][$i] ?? ''));
|
||||
$vertreterurl = trim((string)($_POST['vertreterurl'][$i] ?? ''));
|
||||
|
||||
$ok = $stmt->execute([
|
||||
':urlaubid' => (int)$_POST['urlaubid'][$i], // 0 = INSERT, >0 = UPDATE
|
||||
':vertretung' => $_POST['vertretung'][$i],
|
||||
':start' => $_POST['Starttime'][$i],
|
||||
':ende' => $_POST['Endetime'][$i],
|
||||
':telefon' => $_POST['vertretertelefon'][$i],
|
||||
':adresse' => $_POST['vertreteradresse'][$i],
|
||||
':url' => $_POST['vertreterurl'][$i],
|
||||
]);
|
||||
if ($vertretung === '' || $vertretertelefon === '' || $vertreteradresse === '' || $vertreterurl === '') {
|
||||
throw new RuntimeException("Bitte alle Vertreterinformationen fuer jeden Urlaubseintrag vollstaendig ausfuellen.");
|
||||
}
|
||||
|
||||
if (!$ok) {
|
||||
throw new RuntimeException("Fehler beim Eintragen in der Datenbank.");
|
||||
$stmt = $pdo->prepare("
|
||||
INSERT INTO urlaub
|
||||
(urlaubid, vertretung, start, ende, vertretertelefon, vertreteradresse, vertreterurl)
|
||||
VALUES
|
||||
(:urlaubid, :vertretung, :start, :ende, :telefon, :adresse, :url)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
vertretung = VALUES(vertretung),
|
||||
start = VALUES(start),
|
||||
ende = VALUES(ende),
|
||||
vertretertelefon = VALUES(vertretertelefon),
|
||||
vertreteradresse = VALUES(vertreteradresse),
|
||||
vertreterurl = VALUES(vertreterurl)
|
||||
");
|
||||
|
||||
$ok = $stmt->execute([
|
||||
':urlaubid' => (int)$_POST['urlaubid'][$i], // 0 = INSERT, >0 = UPDATE
|
||||
':vertretung' => $vertretung,
|
||||
':start' => $_POST['Starttime'][$i],
|
||||
':ende' => $_POST['Endetime'][$i],
|
||||
':telefon' => $vertretertelefon,
|
||||
':adresse' => $vertreteradresse,
|
||||
':url' => $vertreterurl,
|
||||
]);
|
||||
|
||||
if (!$ok) {
|
||||
throw new RuntimeException("Fehler beim Eintragen in der Datenbank.");
|
||||
}
|
||||
|
||||
$urlaubId = (int)$_POST['urlaubid'][$i];
|
||||
if ($urlaubId <= 0) {
|
||||
$urlaubId = (int)$pdo->lastInsertId();
|
||||
}
|
||||
if ($urlaubId > 0) {
|
||||
vacationSyncCompanyHolidayFromUrlaub($pdo, $urlaubId, $internUserId);
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$pdo->commit();
|
||||
} catch (Throwable $e) {
|
||||
if ($pdo->inTransaction()) {
|
||||
$pdo->rollBack();
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
echo "Einträge wurden in der Datenbank gespeichert!<br><br>";
|
||||
|
||||
}else if (($_POST["aktion"] ?? '') == "6") {
|
||||
@@ -2022,10 +2059,10 @@ if(!check_worker()){
|
||||
<script type="text/javascript">
|
||||
|
||||
function AddneueTermine(){
|
||||
|
||||
|
||||
var div = document.getElementById('neuerUrlaub');
|
||||
|
||||
div.innerHTML += "Start: <input name=Starttime[] type=date class='form-control' > Ende: <input name=Endetime[] type=date class='form-control' >Vertretung: <input type=text name=vertretung[] weight=100 class='form-control'> Vertretung Telefon: <input type=text name=vertretertelefon[] weight=100 class='form-control'> Vertretung Adresse: <input type=text name=vertreteradresse[] weight=100 class='form-control'> Vertretung Webseite: <input type=text name=vertreterurl[] weight=100 class='form-control'> <input name=urlaubid[] type=hidden value='0'> <br>";
|
||||
|
||||
div.innerHTML += "Start: <input name=Starttime[] type=date class='form-control' > Ende: <input name=Endetime[] type=date class='form-control' >Vertretung: <input type=text name=vertretung[] weight=100 class='form-control' required> Vertretung Telefon: <input type=text name=vertretertelefon[] weight=100 class='form-control' required> Vertretung Adresse: <input type=text name=vertreteradresse[] weight=100 class='form-control' required> Vertretung Webseite: <input type=text name=vertreterurl[] weight=100 class='form-control' required> <input name=urlaubid[] type=hidden value='0'> <br>";
|
||||
//Public: <select name=aktiv[] id='aktiv' required ><option value='1' >Ja</option> <option value='0'>Nein</option></select>
|
||||
|
||||
//document.getElementById('neueTermine').innerHTML = div;
|
||||
|
||||
+58
-58
@@ -1,58 +1,58 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
//Überprüfe, dass der User eingeloggt ist
|
||||
//Der Aufruf von check_user() muss in alle internen Seiten eingebaut sein
|
||||
$user = check_admin_user();
|
||||
|
||||
include("templates/header.inc.php");
|
||||
|
||||
?>
|
||||
<script src="/admin/js/tinymce/tinymce.min.js" referrerpolicy="origin"></script>
|
||||
<div class="container main-container">
|
||||
<?php
|
||||
##test2
|
||||
echo '<div style="float: right; width: 200px; ">';
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' 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 Anfragen:</label>
|
||||
<input type="text" id="user_input" name="skill_input" width="48"/>';
|
||||
//echo '<input type="submit" class="btn btn-primary" id="submitbox" value="" />';
|
||||
echo "</form>";
|
||||
echo '</div>';
|
||||
?>
|
||||
<h2>Administration - Anrufantworter</h2>
|
||||
|
||||
Hallo <?php echo htmlentities($user['vorname']); ?>,<br>
|
||||
Herzlich Willkommen im internen Bereich!<br><br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
if(!check_worker()){
|
||||
echo "Dieser Bereich ist nur für Bearbeiter freigeschaltet!<br><br><br>";
|
||||
}else{
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<a href="file:///P:\Telefonanlage\telefonanlage.html" target="_blank">Übersicht der Anruf auf dem Anrufbeantworter</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
include("templates/footer.inc.php")
|
||||
?>
|
||||
<?php
|
||||
session_start();
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
//Überprüfe, dass der User eingeloggt ist
|
||||
//Der Aufruf von check_user() muss in alle internen Seiten eingebaut sein
|
||||
$user = check_admin_user();
|
||||
|
||||
include("templates/header.inc.php");
|
||||
|
||||
?>
|
||||
<script src="/admin/js/tinymce/tinymce.min.js" referrerpolicy="origin"></script>
|
||||
<div class="container main-container">
|
||||
<?php
|
||||
##test2
|
||||
echo '<div style="float: right; width: 200px; ">';
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' 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 Anfragen:</label>
|
||||
<input type="text" id="user_input" name="skill_input" width="48"/>';
|
||||
//echo '<input type="submit" class="btn btn-primary" id="submitbox" value="" />';
|
||||
echo "</form>";
|
||||
echo '</div>';
|
||||
?>
|
||||
<h2>Administration - Anrufantworter</h2>
|
||||
|
||||
Hallo <?php echo htmlentities($user['vorname']); ?>,<br>
|
||||
Herzlich Willkommen im internen Bereich!<br><br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
if(!check_worker()){
|
||||
echo "Dieser Bereich ist nur für Bearbeiter freigeschaltet!<br><br><br>";
|
||||
}else{
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<a href="file:///P:\Telefonanlage\telefonanlage.html" target="_blank">Übersicht der Anruf auf dem Anrufbeantworter</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
include("templates/footer.inc.php")
|
||||
?>
|
||||
|
||||
+39
-39
@@ -1,40 +1,40 @@
|
||||
/* Popup box BEGIN */
|
||||
.infofenster {
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
right: 100px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
min-height: 100px;
|
||||
min-width: 400px;
|
||||
padding-left: 50px;
|
||||
padding-right: 50px;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
text-align: center;
|
||||
|
||||
z-index: 1000;
|
||||
background-color: #555;
|
||||
color: #fff;
|
||||
animation:signup-response 0.5s 1;
|
||||
-webkit-animation:signup-response 0.5s 1;
|
||||
animation-fill-mode: forwards;
|
||||
|
||||
animation-delay:5s;
|
||||
-webkit-animation-delay:5s; /* Safari and Chrome */
|
||||
-webkit-animation-fill-mode: forwards;
|
||||
|
||||
}
|
||||
|
||||
@keyframes signup-response{
|
||||
from {opacity :1;}
|
||||
to {opacity :0;}
|
||||
}
|
||||
|
||||
@-webkit-keyframes signup-response{
|
||||
from {opacity :1;}
|
||||
to {opacity :0;}
|
||||
}
|
||||
|
||||
/* Popup box BEGIN */
|
||||
.infofenster {
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
right: 100px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
min-height: 100px;
|
||||
min-width: 400px;
|
||||
padding-left: 50px;
|
||||
padding-right: 50px;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
text-align: center;
|
||||
|
||||
z-index: 1000;
|
||||
background-color: #555;
|
||||
color: #fff;
|
||||
animation:signup-response 0.5s 1;
|
||||
-webkit-animation:signup-response 0.5s 1;
|
||||
animation-fill-mode: forwards;
|
||||
|
||||
animation-delay:5s;
|
||||
-webkit-animation-delay:5s; /* Safari and Chrome */
|
||||
-webkit-animation-fill-mode: forwards;
|
||||
|
||||
}
|
||||
|
||||
@keyframes signup-response{
|
||||
from {opacity :1;}
|
||||
to {opacity :0;}
|
||||
}
|
||||
|
||||
@-webkit-keyframes signup-response{
|
||||
from {opacity :1;}
|
||||
to {opacity :0;}
|
||||
}
|
||||
|
||||
/* Popup box BEGIN */
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/impfworkflow_stammdaten.php';
|
||||
|
||||
<?php
|
||||
require_once __DIR__ . '/impfworkflow_stammdaten.php';
|
||||
|
||||
|
||||
+403
-199
@@ -4,6 +4,7 @@ session_start();
|
||||
require_once __DIR__ . "/../inc/config.inc.php";
|
||||
require_once __DIR__ . "/../inc/functions.inc.php";
|
||||
require_once __DIR__ . "/../inc/functions.impfen.inc.php";
|
||||
require_once __DIR__ . "/../inc/impfworkflow_notifications.inc.php";
|
||||
|
||||
$user = check_admin_user();
|
||||
include __DIR__ . "/templates/header.inc.php";
|
||||
@@ -78,11 +79,87 @@ function ensureWorkflowTables(PDO $pdo): void
|
||||
impfWorkflowEnsureTables($pdo);
|
||||
}
|
||||
|
||||
function workflowDeleteWaitlistEntry(PDO $pdo, int $warteid): void
|
||||
{
|
||||
if ($warteid <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$stDeleteMap = $pdo->prepare("DELETE FROM warteliste_zeitraum WHERE warteid = :wid");
|
||||
$stDeleteMap->execute(['wid' => $warteid]);
|
||||
|
||||
$stDelete = $pdo->prepare("DELETE FROM warteliste WHERE warteid = :wid");
|
||||
$stDelete->execute(['wid' => $warteid]);
|
||||
}
|
||||
|
||||
function workflowLoadWaitlistEntry(PDO $pdo, int $warteid): ?array
|
||||
{
|
||||
if ($warteid <= 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$stWait = $pdo->prepare("SELECT w.warteid, w.userid, w.checked, p.vorname, p.nachname
|
||||
FROM warteliste w
|
||||
LEFT JOIN persons p ON p.person_id = w.userid
|
||||
WHERE w.warteid = :wid
|
||||
LIMIT 1");
|
||||
$stWait->execute(['wid' => $warteid]);
|
||||
$row = $stWait->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
return $row ?: null;
|
||||
}
|
||||
|
||||
function workflowCountWaitersForPlan(PDO $pdo, int $impfstoffId, int $planId): int
|
||||
{
|
||||
return impfWorkflowNotificationCountWaitersForPlan($pdo, $impfstoffId, $planId);
|
||||
}
|
||||
|
||||
function workflowLoadWaitRowsForPlan(PDO $pdo, int $impfstoffId, int $planId): array
|
||||
{
|
||||
$stW = $pdo->prepare("SELECT w.warteid, w.userid, w.hash, w.impfart, w.Impfaufklaerung, w.WeitereFragen, w.letzteimpfung, w.date_created
|
||||
FROM warteliste w
|
||||
WHERE w.checked = 1
|
||||
AND (w.impfstoff = :iid OR w.impfstoff = 0)
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM warteliste_zeitraum wz
|
||||
WHERE wz.warteid = w.warteid
|
||||
AND wz.zeitraum_id = :zid
|
||||
)
|
||||
ORDER BY w.date_created ASC, w.warteid ASC");
|
||||
$stW->execute([
|
||||
'iid' => $impfstoffId,
|
||||
'zid' => $planId,
|
||||
]);
|
||||
|
||||
return $stW->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
function workflowCountStrictWaitersForPlan(PDO $pdo, int $impfstoffId, int $planId): int
|
||||
{
|
||||
$stW = $pdo->prepare("SELECT COUNT(DISTINCT w.userid)
|
||||
FROM warteliste w
|
||||
WHERE w.checked = 1
|
||||
AND (w.impfstoff = :iid OR w.impfstoff = 0)
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM warteliste_zeitraum wz
|
||||
WHERE wz.warteid = w.warteid
|
||||
AND wz.zeitraum_id = :zid
|
||||
)");
|
||||
$stW->execute([
|
||||
'iid' => $impfstoffId,
|
||||
'zid' => $planId,
|
||||
]);
|
||||
|
||||
return (int)$stW->fetchColumn();
|
||||
}
|
||||
|
||||
function workflowAddWartelisteEntry(
|
||||
PDO $pdo,
|
||||
int $personId,
|
||||
int $impfstoffId,
|
||||
int $planId,
|
||||
$planIds,
|
||||
int $impfart,
|
||||
?string $letzteImpfung,
|
||||
int $checked
|
||||
@@ -92,7 +169,7 @@ function workflowAddWartelisteEntry(
|
||||
}
|
||||
|
||||
$impfstoffId = max(0, $impfstoffId);
|
||||
$planId = max(0, $planId);
|
||||
$planIds = impfNormalizeZeitraumIds($planIds);
|
||||
$impfart = ($impfart >= 1 && $impfart <= 4) ? $impfart : 1;
|
||||
if ($impfart > 1 && !$letzteImpfung) {
|
||||
$impfart = 1;
|
||||
@@ -112,38 +189,39 @@ function workflowAddWartelisteEntry(
|
||||
$impfstoffName = 'ohne Vorgabe';
|
||||
$zeitraum = 'Flexibel';
|
||||
|
||||
if ($planId > 0) {
|
||||
$plan = impfLoadZeitraumById($pdo, $planId, true);
|
||||
if (!$plan) {
|
||||
return [false, "Das ausgewaehlte Zeitfenster ist nicht mehr verfuegbar."];
|
||||
}
|
||||
if (!empty($planIds)) {
|
||||
$zeitraumLabels = [];
|
||||
foreach ($planIds as $planId) {
|
||||
$plan = impfLoadZeitraumById($pdo, $planId, true);
|
||||
if (!$plan) {
|
||||
return [false, "Mindestens ein ausgewaehltes Zeitfenster ist nicht mehr verfuegbar."];
|
||||
}
|
||||
|
||||
$zugeordneteImpfstoffe = $plan['impfstoff_id_list'] ?? [];
|
||||
if ($impfstoffId > 0 && !in_array($impfstoffId, $zugeordneteImpfstoffe, true)) {
|
||||
return [false, "Impfstoff und Zeitfenster passen nicht zusammen."];
|
||||
$zugeordneteImpfstoffe = $plan['impfstoff_id_list'] ?? [];
|
||||
if ($impfstoffId > 0 && !in_array($impfstoffId, $zugeordneteImpfstoffe, true)) {
|
||||
return [false, "Impfstoff und Zeitfenster passen nicht zusammen."];
|
||||
}
|
||||
|
||||
if ($impfstoffId <= 0) {
|
||||
if (count($zugeordneteImpfstoffe) !== 1) {
|
||||
return [false, "Bitte einen Impfstoff auswaehlen, der allen Zeitfenstern eindeutig zugeordnet ist."];
|
||||
}
|
||||
$currentImpfstoffId = (int)$zugeordneteImpfstoffe[0];
|
||||
if ($impfstoffValue > 0 && $impfstoffValue !== $currentImpfstoffId) {
|
||||
return [false, "Die ausgewaehlten Zeitfenster gehoeren zu unterschiedlichen Impfstoffen."];
|
||||
}
|
||||
$impfstoffValue = $currentImpfstoffId;
|
||||
}
|
||||
|
||||
$zeitraumLabels[] = workflowPlanLabel($plan);
|
||||
}
|
||||
|
||||
if ($impfstoffId <= 0) {
|
||||
if (count($zugeordneteImpfstoffe) !== 1) {
|
||||
return [false, "Bitte einen Impfstoff auswaehlen, der dem Zeitfenster zugeordnet ist."];
|
||||
}
|
||||
$impfstoffId = (int)$zugeordneteImpfstoffe[0];
|
||||
$impfstoffId = $impfstoffValue;
|
||||
}
|
||||
}
|
||||
|
||||
$stImpfstoff = $pdo->prepare("SELECT impfid, impfname
|
||||
FROM impfstoff
|
||||
WHERE impfid = :iid
|
||||
LIMIT 1");
|
||||
$stImpfstoff->execute(['iid' => $impfstoffId]);
|
||||
$impfstoff = $stImpfstoff->fetch(PDO::FETCH_ASSOC);
|
||||
if (!$impfstoff) {
|
||||
return [false, "Der ausgewaehlte Impfstoff wurde nicht gefunden."];
|
||||
}
|
||||
|
||||
$impfstoffValue = $impfstoffId;
|
||||
$impfstoffName = (string)$impfstoff['impfname'];
|
||||
$zeitraum = workflowPlanLabel($plan);
|
||||
} elseif ($impfstoffId > 0) {
|
||||
if ($impfstoffId > 0) {
|
||||
$stImpfstoff = $pdo->prepare("SELECT impfid, impfname
|
||||
FROM impfstoff
|
||||
WHERE impfid = :iid
|
||||
@@ -158,6 +236,10 @@ function workflowAddWartelisteEntry(
|
||||
$impfstoffValue = 0;
|
||||
}
|
||||
|
||||
if (!empty($planIds)) {
|
||||
$zeitraum = implode(' | ', $zeitraumLabels);
|
||||
}
|
||||
|
||||
$stDup = $pdo->prepare("SELECT warteid
|
||||
FROM warteliste
|
||||
WHERE userid = :uid
|
||||
@@ -172,7 +254,7 @@ function workflowAddWartelisteEntry(
|
||||
$hash = md5('admin-warte-' . $personId . '-' . microtime(true) . '-' . random_int(1000, 9999));
|
||||
$checkedValue = ($checked === 0) ? 0 : 1;
|
||||
$letzteValue = ($impfart === 1) ? null : ($letzteImpfung ?: null);
|
||||
$zeitraumIdValue = ($planId > 0) ? $planId : null;
|
||||
$zeitraumIdValue = !empty($planIds) ? (int)$planIds[0] : null;
|
||||
|
||||
$stInsert = $pdo->prepare("INSERT INTO warteliste
|
||||
(userid, checked, hash, impfenangebot, impfstoff, Patientenart, Impfaufklaerung, WeitereFragen, impfart, impfenmit, letzteimpfung, impfenzeitraum, zeitraum_id, date_created)
|
||||
@@ -190,6 +272,11 @@ function workflowAddWartelisteEntry(
|
||||
'zeitraum_id' => $zeitraumIdValue,
|
||||
]);
|
||||
|
||||
$warteid = (int)$pdo->lastInsertId();
|
||||
if (!empty($planIds)) {
|
||||
impfSetWartelistenZeitraeume($pdo, $warteid, $planIds);
|
||||
}
|
||||
|
||||
$personName = trim((string)$person['vorname'] . ' ' . (string)$person['nachname']);
|
||||
return [true, "Wartelistenplatz fuer {$personName} ({$impfstoffName}) gespeichert."];
|
||||
}
|
||||
@@ -235,16 +322,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
} else {
|
||||
$dosen = (int)$rule['dosen_pro_flasche'];
|
||||
|
||||
$stCount = $pdo->prepare("SELECT COUNT(DISTINCT userid)
|
||||
FROM warteliste
|
||||
WHERE checked = 1
|
||||
AND (impfstoff = :iid OR impfstoff = 0)
|
||||
AND (zeitraum_id = :zid OR zeitraum_id IS NULL)");
|
||||
$stCount->execute([
|
||||
'iid' => $impfstoffId,
|
||||
'zid' => $planId,
|
||||
]);
|
||||
$wartende = (int)$stCount->fetchColumn();
|
||||
$wartende = workflowCountWaitersForPlan($pdo, $impfstoffId, $planId);
|
||||
|
||||
if ($wartende < $dosen) {
|
||||
$error = "Nicht genug bestätigte Warteteilnehmer: {$wartende} von {$dosen}.";
|
||||
@@ -286,16 +364,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
]);
|
||||
$timeid = (int)$pdo->lastInsertId();
|
||||
|
||||
$stW = $pdo->prepare("SELECT warteid, userid, hash, impfart, Impfaufklaerung, WeitereFragen, letzteimpfung
|
||||
FROM warteliste
|
||||
WHERE checked = 1
|
||||
AND (impfstoff = :iid OR impfstoff = 0)
|
||||
AND (zeitraum_id = :zid OR zeitraum_id IS NULL)
|
||||
ORDER BY date_created ASC, warteid ASC");
|
||||
$stW->bindValue(':iid', $impfstoffId, PDO::PARAM_INT);
|
||||
$stW->bindValue(':zid', $planId, PDO::PARAM_INT);
|
||||
$stW->execute();
|
||||
$warteRowsRaw = $stW->fetchAll(PDO::FETCH_ASSOC);
|
||||
$warteRowsRaw = workflowLoadWaitRowsForPlan($pdo, $impfstoffId, $planId);
|
||||
$warteRows = [];
|
||||
$seenUserIds = [];
|
||||
foreach ($warteRowsRaw as $warteRow) {
|
||||
@@ -333,6 +402,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
]);
|
||||
$terminIds[] = (int)$pdo->lastInsertId();
|
||||
$stDelW->execute(['wid' => (int)$w['warteid']]);
|
||||
$pdo->prepare("DELETE FROM warteliste_zeitraum WHERE warteid = :wid")
|
||||
->execute(['wid' => (int)$w['warteid']]);
|
||||
}
|
||||
|
||||
$stReduce = $pdo->prepare("UPDATE timeslots SET impfdosen = GREATEST(impfdosen - :cnt, 0) WHERE timeid = :timeid");
|
||||
@@ -344,6 +415,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
SendMailMessageVorlage($pdo, '1', $tid, $mailTemplateId);
|
||||
}
|
||||
|
||||
impfWorkflowNotificationProcess($pdo);
|
||||
$message = count($terminIds) . " Terminanfragen wurden erstellt und versendet.";
|
||||
} catch (Throwable $e) {
|
||||
if ($pdo->inTransaction()) {
|
||||
@@ -363,19 +435,23 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
} elseif ($aktion === 'add_waitlist_existing') {
|
||||
$personId = (int)($_POST['wl_person_id'] ?? 0);
|
||||
$impfstoffId = (int)($_POST['wl_impfstoff_id'] ?? 0);
|
||||
$planId = (int)($_POST['wl_plan_id'] ?? 0);
|
||||
$planIds = impfNormalizeZeitraumIds($_POST['wl_plan_ids'] ?? ($_POST['wl_plan_id'] ?? []));
|
||||
|
||||
[$ok, $msg] = workflowAddWartelisteEntry(
|
||||
$pdo,
|
||||
$personId,
|
||||
$impfstoffId,
|
||||
$planId,
|
||||
$planIds,
|
||||
1,
|
||||
null,
|
||||
1
|
||||
);
|
||||
if ($ok) {
|
||||
$notificationEvents = impfWorkflowNotificationProcess($pdo);
|
||||
$message = $msg;
|
||||
if (!empty($notificationEvents)) {
|
||||
$message .= ' ' . count($notificationEvents) . " Impfworkflow-Benachrichtigung(en) wurden versendet.";
|
||||
}
|
||||
} else {
|
||||
$error = $msg;
|
||||
}
|
||||
@@ -391,7 +467,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$patientenart = ((int)($_POST['new_patientenart'] ?? 0) === 1) ? 1 : 0;
|
||||
|
||||
$impfstoffId = (int)($_POST['new_impfstoff_id'] ?? 0);
|
||||
$planId = (int)($_POST['new_plan_id'] ?? 0);
|
||||
$planIds = impfNormalizeZeitraumIds($_POST['new_plan_ids'] ?? ($_POST['new_plan_id'] ?? []));
|
||||
|
||||
if ($vorname === '' || $nachname === '' || $geburtstag === '') {
|
||||
$error = "Für neue Patienten sind Vorname, Nachname und Geburtstag erforderlich.";
|
||||
@@ -414,13 +490,17 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$pdo,
|
||||
$personId,
|
||||
$impfstoffId,
|
||||
$planId,
|
||||
$planIds,
|
||||
1,
|
||||
null,
|
||||
1
|
||||
);
|
||||
if ($ok) {
|
||||
$notificationEvents = impfWorkflowNotificationProcess($pdo);
|
||||
$message = $msg;
|
||||
if (!empty($notificationEvents)) {
|
||||
$message .= ' ' . count($notificationEvents) . " Impfworkflow-Benachrichtigung(en) wurden versendet.";
|
||||
}
|
||||
} else {
|
||||
$error = $msg;
|
||||
}
|
||||
@@ -529,57 +609,143 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
if ($warteid <= 0) {
|
||||
$error = "Ungültiger Wartelisten-Eintrag.";
|
||||
} else {
|
||||
$stDelete = $pdo->prepare("DELETE FROM warteliste WHERE warteid = :wid");
|
||||
$stDelete = $pdo->prepare("SELECT warteid FROM warteliste WHERE warteid = :wid");
|
||||
$stDelete->execute(['wid' => $warteid]);
|
||||
if ($stDelete->rowCount() > 0) {
|
||||
$exists = (bool)$stDelete->fetch(PDO::FETCH_ASSOC);
|
||||
workflowDeleteWaitlistEntry($pdo, $warteid);
|
||||
if ($exists) {
|
||||
impfWorkflowNotificationProcess($pdo);
|
||||
$message = "Wartelisten-Eintrag wurde gelöscht.";
|
||||
} else {
|
||||
$error = "Wartelisten-Eintrag nicht gefunden.";
|
||||
}
|
||||
}
|
||||
} elseif ($aktion === 'confirm_waitlist') {
|
||||
$warteid = (int)($_POST['warteid'] ?? 0);
|
||||
if ($warteid <= 0) {
|
||||
$error = "Ungültiger Wartelisten-Eintrag.";
|
||||
} else {
|
||||
$waitRow = workflowLoadWaitlistEntry($pdo, $warteid);
|
||||
if (!$waitRow) {
|
||||
$error = "Wartelisten-Eintrag nicht gefunden.";
|
||||
} elseif ((int)$waitRow['checked'] >= 1) {
|
||||
$error = "Der Wartelisten-Eintrag ist bereits bestätigt.";
|
||||
} else {
|
||||
$stUpdate = $pdo->prepare("UPDATE warteliste
|
||||
SET checked = 1
|
||||
WHERE warteid = :wid
|
||||
AND checked < 1");
|
||||
$stUpdate->execute(['wid' => $warteid]);
|
||||
|
||||
if ($stUpdate->rowCount() < 1) {
|
||||
$error = "Wartelisten-Eintrag konnte nicht bestätigt werden.";
|
||||
} else {
|
||||
SendMailMessageVorlage($pdo, '2', $warteid, '9');
|
||||
$notificationEvents = impfWorkflowNotificationProcess($pdo);
|
||||
$personName = trim((string)($waitRow['vorname'] ?? '') . ' ' . (string)($waitRow['nachname'] ?? ''));
|
||||
$message = "Wartelisten-Eintrag für " . trim($personName) . " wurde bestätigt.";
|
||||
if (!empty($notificationEvents)) {
|
||||
$message .= ' ' . count($notificationEvents) . " Impfworkflow-Benachrichtigung(en) wurden versendet.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($aktion === 'cancel_waitlist') {
|
||||
$warteid = (int)($_POST['warteid'] ?? 0);
|
||||
if ($warteid <= 0) {
|
||||
$error = "Ungültiger Wartelisten-Eintrag.";
|
||||
} else {
|
||||
$waitRow = workflowLoadWaitlistEntry($pdo, $warteid);
|
||||
if (!$waitRow) {
|
||||
$error = "Wartelisten-Eintrag nicht gefunden.";
|
||||
} else {
|
||||
SendMailMessageVorlage($pdo, '2', $warteid, '10');
|
||||
workflowDeleteWaitlistEntry($pdo, $warteid);
|
||||
$notificationEvents = impfWorkflowNotificationProcess($pdo);
|
||||
$personName = trim((string)($waitRow['vorname'] ?? '') . ' ' . (string)($waitRow['nachname'] ?? ''));
|
||||
$message = "Wartelisten-Eintrag für " . trim($personName) . " wurde abgesagt.";
|
||||
if (!empty($notificationEvents)) {
|
||||
$message .= ' ' . count($notificationEvents) . " Impfworkflow-Benachrichtigung(en) wurden versendet.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$rules = [];
|
||||
$plans = [];
|
||||
$configuredImpfstoffe = [];
|
||||
$configuredImpfstoffNames = [];
|
||||
$eligible = [];
|
||||
$personResults = [];
|
||||
$waitRows = [];
|
||||
$upcomingRows = [];
|
||||
$eventOverview = [];
|
||||
$planWaitCounts = [];
|
||||
|
||||
try {
|
||||
$stRules = $pdo->prepare("SELECT r.impfstoff_id, r.dosen_pro_flasche, i.impfname,
|
||||
COALESCE((SELECT COUNT(DISTINCT w.userid) FROM warteliste w WHERE w.checked = 1 AND (w.impfstoff = r.impfstoff_id OR w.impfstoff = 0)),0) AS wartende
|
||||
FROM impfstoff_workflow r
|
||||
INNER JOIN impfstoff i ON i.impfid = r.impfstoff_id
|
||||
WHERE (i.aktiv = 1 OR i.aktivwarteliste = 1 OR i.aktivtermin = 1 OR i.aktivgrippe = 1)
|
||||
ORDER BY i.impfname");
|
||||
$stRules->execute();
|
||||
$rules = $stRules->fetchAll(PDO::FETCH_ASSOC);
|
||||
$needsPlanData = in_array($view, ['teilnehmer', 'event-create'], true);
|
||||
$needsEligibilityData = ($view === 'event-create');
|
||||
$needsPersonSearch = ($view === 'teilnehmer' && $personSearch !== '');
|
||||
$needsWaitRows = ($view === 'warteliste');
|
||||
$needsUpcomingRows = ($view === 'event-teilnehmer');
|
||||
|
||||
$plans = impfGetZeitraumRows($pdo, true);
|
||||
if ($needsPlanData) {
|
||||
$stRules = $pdo->prepare("SELECT r.impfstoff_id, r.dosen_pro_flasche, i.impfname,
|
||||
COALESCE((SELECT COUNT(DISTINCT w.userid) FROM warteliste w WHERE w.checked = 1 AND (w.impfstoff = r.impfstoff_id OR w.impfstoff = 0)),0) AS wartende
|
||||
FROM impfstoff_workflow r
|
||||
INNER JOIN impfstoff i ON i.impfid = r.impfstoff_id
|
||||
WHERE (i.aktiv = 1 OR i.aktivwarteliste = 1 OR i.aktivtermin = 1 OR i.aktivgrippe = 1)
|
||||
ORDER BY i.impfname");
|
||||
$stRules->execute();
|
||||
$rules = $stRules->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
$planExistsForImpfstoff = [];
|
||||
foreach ($plans as $p) {
|
||||
foreach ($p['impfstoff_id_list'] as $impfstoffId) {
|
||||
$planExistsForImpfstoff[(int)$impfstoffId] = true;
|
||||
$plans = impfGetZeitraumRows($pdo, true);
|
||||
|
||||
$planExistsForImpfstoff = [];
|
||||
foreach ($plans as $p) {
|
||||
foreach ($p['impfstoff_id_list'] as $impfstoffId) {
|
||||
$planExistsForImpfstoff[(int)$impfstoffId] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($rules as $r) {
|
||||
$iid = (int)$r['impfstoff_id'];
|
||||
$dosen = (int)$r['dosen_pro_flasche'];
|
||||
if ($dosen > 0 && isset($planExistsForImpfstoff[$iid])) {
|
||||
foreach ($rules as $r) {
|
||||
$iid = (int)$r['impfstoff_id'];
|
||||
$configuredImpfstoffNames[$iid] = (string)$r['impfname'];
|
||||
if (!isset($planExistsForImpfstoff[$iid])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$configuredImpfstoffe[] = $r;
|
||||
if ((int)$r['wartende'] >= $dosen) {
|
||||
if (!$needsEligibilityData) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$dosen = (int)$r['dosen_pro_flasche'];
|
||||
if ($dosen <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$hasEligiblePlan = false;
|
||||
foreach ($plans as $plan) {
|
||||
if (!in_array($iid, $plan['impfstoff_id_list'] ?? [], true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$planId = (int)$plan['zeitraum_id'];
|
||||
$planWaitCounts[$iid][$planId] = workflowCountStrictWaitersForPlan($pdo, $iid, $planId);
|
||||
if ($planWaitCounts[$iid][$planId] >= $dosen) {
|
||||
$hasEligiblePlan = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($hasEligiblePlan) {
|
||||
$eligible[] = $r;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($personSearch !== '') {
|
||||
if ($needsPersonSearch) {
|
||||
$searchLike = '%' . $personSearch . '%';
|
||||
$searchExactId = ctype_digit($personSearch) ? (int)$personSearch : -1;
|
||||
$stPersons = $pdo->prepare("SELECT person_id, vorname, nachname, geburtstag, email, tele, ort, plz, strasse
|
||||
@@ -598,71 +764,78 @@ try {
|
||||
$personResults = $stPersons->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
$stWait = $pdo->prepare("SELECT w.warteid, w.userid, w.checked, w.impfstoff, w.impfart, w.impfenzeitraum, w.zeitraum_id, w.letzteimpfung, w.date_created,
|
||||
p.vorname, p.nachname, p.geburtstag, p.email, p.tele,
|
||||
i.impfname
|
||||
FROM warteliste w
|
||||
INNER JOIN persons p ON p.person_id = w.userid
|
||||
LEFT JOIN impfstoff i ON i.impfid = w.impfstoff
|
||||
WHERE w.checked IN (0, 1)
|
||||
ORDER BY w.checked DESC, w.date_created ASC
|
||||
LIMIT 500");
|
||||
$stWait->execute();
|
||||
$waitRows = $stWait->fetchAll(PDO::FETCH_ASSOC);
|
||||
if ($needsWaitRows) {
|
||||
$stWait = $pdo->prepare("SELECT w.warteid, w.userid, w.checked, w.impfstoff, w.impfart, w.impfenzeitraum, w.zeitraum_id, w.letzteimpfung, w.date_created,
|
||||
p.vorname, p.nachname, p.geburtstag, p.email, p.tele,
|
||||
i.impfname
|
||||
FROM warteliste w
|
||||
INNER JOIN persons p ON p.person_id = w.userid
|
||||
LEFT JOIN impfstoff i ON i.impfid = w.impfstoff
|
||||
WHERE w.checked IN (0, 1)
|
||||
ORDER BY w.checked DESC, w.date_created ASC
|
||||
LIMIT 500");
|
||||
$stWait->execute();
|
||||
$waitRows = $stWait->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
foreach ($waitRows as &$waitRow) {
|
||||
$zeitraumId = (int)($waitRow['zeitraum_id'] ?? 0);
|
||||
if ($zeitraumId > 0) {
|
||||
$zeitraum = impfLoadZeitraumById($pdo, $zeitraumId, true);
|
||||
if ($zeitraum) {
|
||||
$waitRow['impfenzeitraum'] = $zeitraum['label'];
|
||||
$waitIds = array_map(static function (array $waitRow): int {
|
||||
return (int)($waitRow['warteid'] ?? 0);
|
||||
}, $waitRows);
|
||||
$waitLabelsById = impfGetWartelistenZeitraeumeLabelsMap($pdo, $waitIds, false);
|
||||
|
||||
foreach ($waitRows as &$waitRow) {
|
||||
$warteid = (int)($waitRow['warteid'] ?? 0);
|
||||
$waitRow['zeitraum_labels'] = $waitLabelsById[$warteid] ?? [];
|
||||
if (!empty($waitRow['zeitraum_labels'])) {
|
||||
$waitRow['impfenzeitraum'] = implode(' | ', $waitRow['zeitraum_labels']);
|
||||
}
|
||||
}
|
||||
unset($waitRow);
|
||||
}
|
||||
unset($waitRow);
|
||||
|
||||
$stUpcoming = $pdo->prepare("SELECT ts.timeid, ts.date, ts.start, ts.ende, ts.impfdosen,
|
||||
i.impfname, o.anzeigename, o.adresse,
|
||||
it.terminid, it.checked, it.behandelt, it.impfart,
|
||||
p.vorname, p.nachname, p.geburtstag, p.email, p.tele
|
||||
FROM timeslots ts
|
||||
INNER JOIN impfstoff i ON i.impfid = ts.impfstoff
|
||||
LEFT JOIN impfort o ON o.ortid = ts.impfortid
|
||||
LEFT JOIN impftermin it ON it.timeid = ts.timeid
|
||||
LEFT JOIN persons p ON p.person_id = it.userid
|
||||
WHERE ts.date >= :today
|
||||
AND ts.aktiv = 1
|
||||
ORDER BY ts.date, ts.start, ts.ende, i.impfname, p.nachname, p.vorname");
|
||||
$stUpcoming->execute(['today' => date('Y-m-d')]);
|
||||
$upcomingRows = $stUpcoming->fetchAll(PDO::FETCH_ASSOC);
|
||||
if ($needsUpcomingRows) {
|
||||
$stUpcoming = $pdo->prepare("SELECT ts.timeid, ts.date, ts.start, ts.ende, ts.impfdosen,
|
||||
i.impfname, o.anzeigename, o.adresse,
|
||||
it.terminid, it.checked, it.behandelt, it.impfart,
|
||||
p.vorname, p.nachname, p.geburtstag, p.email, p.tele
|
||||
FROM timeslots ts
|
||||
INNER JOIN impfstoff i ON i.impfid = ts.impfstoff
|
||||
LEFT JOIN impfort o ON o.ortid = ts.impfortid
|
||||
LEFT JOIN impftermin it ON it.timeid = ts.timeid
|
||||
LEFT JOIN persons p ON p.person_id = it.userid
|
||||
WHERE ts.date >= :today
|
||||
AND ts.aktiv = 1
|
||||
ORDER BY ts.date, ts.start, ts.ende, i.impfname, p.nachname, p.vorname");
|
||||
$stUpcoming->execute(['today' => date('Y-m-d')]);
|
||||
$upcomingRows = $stUpcoming->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
foreach ($upcomingRows as $row) {
|
||||
$timeid = (int)$row['timeid'];
|
||||
if (!isset($eventOverview[$timeid])) {
|
||||
$eventOverview[$timeid] = [
|
||||
'timeid' => $timeid,
|
||||
'date' => $row['date'],
|
||||
'start' => $row['start'],
|
||||
'ende' => $row['ende'],
|
||||
'impfdosen' => (int)$row['impfdosen'],
|
||||
'impfname' => $row['impfname'],
|
||||
'anzeigename' => $row['anzeigename'],
|
||||
'adresse' => $row['adresse'],
|
||||
'teilnehmer' => [],
|
||||
];
|
||||
}
|
||||
if (!empty($row['terminid'])) {
|
||||
$eventOverview[$timeid]['teilnehmer'][] = [
|
||||
'terminid' => (int)$row['terminid'],
|
||||
'checked' => (int)($row['checked'] ?? 0),
|
||||
'behandelt' => (int)($row['behandelt'] ?? 0),
|
||||
'impfart' => (int)($row['impfart'] ?? 1),
|
||||
'vorname' => (string)($row['vorname'] ?? ''),
|
||||
'nachname' => (string)($row['nachname'] ?? ''),
|
||||
'geburtstag' => (string)($row['geburtstag'] ?? ''),
|
||||
'email' => (string)($row['email'] ?? ''),
|
||||
'tele' => (string)($row['tele'] ?? ''),
|
||||
];
|
||||
foreach ($upcomingRows as $row) {
|
||||
$timeid = (int)$row['timeid'];
|
||||
if (!isset($eventOverview[$timeid])) {
|
||||
$eventOverview[$timeid] = [
|
||||
'timeid' => $timeid,
|
||||
'date' => $row['date'],
|
||||
'start' => $row['start'],
|
||||
'ende' => $row['ende'],
|
||||
'impfdosen' => (int)$row['impfdosen'],
|
||||
'impfname' => $row['impfname'],
|
||||
'anzeigename' => $row['anzeigename'],
|
||||
'adresse' => $row['adresse'],
|
||||
'teilnehmer' => [],
|
||||
];
|
||||
}
|
||||
if (!empty($row['terminid'])) {
|
||||
$eventOverview[$timeid]['teilnehmer'][] = [
|
||||
'terminid' => (int)$row['terminid'],
|
||||
'checked' => (int)($row['checked'] ?? 0),
|
||||
'behandelt' => (int)($row['behandelt'] ?? 0),
|
||||
'impfart' => (int)($row['impfart'] ?? 1),
|
||||
'vorname' => (string)($row['vorname'] ?? ''),
|
||||
'nachname' => (string)($row['nachname'] ?? ''),
|
||||
'geburtstag' => (string)($row['geburtstag'] ?? ''),
|
||||
'email' => (string)($row['email'] ?? ''),
|
||||
'tele' => (string)($row['tele'] ?? ''),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
@@ -728,7 +901,13 @@ try {
|
||||
<?php echo esc((string)$w['tele']); ?>
|
||||
</td>
|
||||
<td><?php echo esc((string)($w['impfname'] ?: 'Unbekannt')); ?></td>
|
||||
<td><?php echo esc((string)$w['impfenzeitraum']); ?></td>
|
||||
<td>
|
||||
<?php if (!empty($w['zeitraum_labels'])): ?>
|
||||
<?php echo implode('<br>', array_map('esc', $w['zeitraum_labels'])); ?>
|
||||
<?php else: ?>
|
||||
<?php echo esc(impfLimitLabelLength((string)$w['impfenzeitraum'], 50)); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo esc(workflowImpfartName((int)$w['impfart'])); ?>
|
||||
<?php if (!empty($w['letzteimpfung'])): ?>
|
||||
@@ -738,7 +917,19 @@ try {
|
||||
<td><?php echo esc(workflowWarteStatus((int)$w['checked'])); ?></td>
|
||||
<td><?php echo esc((string)$w['date_created']); ?></td>
|
||||
<td>
|
||||
<form method="post" onsubmit="return confirm('Eintrag wirklich löschen?');">
|
||||
<?php if ((int)$w['checked'] === 0): ?>
|
||||
<form method="post" style="display:inline-block; margin-right:6px;" onsubmit="return confirm('Eintrag wirklich als bestätigt markieren?');">
|
||||
<input type="hidden" name="aktion" value="confirm_waitlist">
|
||||
<input type="hidden" name="warteid" value="<?php echo (int)$w['warteid']; ?>">
|
||||
<button class="btn btn-success btn-xs" type="submit">Bestätigen</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<form method="post" style="display:inline-block; margin-right:6px;" onsubmit="return confirm('Wartelisten-Eintrag wirklich absagen?');">
|
||||
<input type="hidden" name="aktion" value="cancel_waitlist">
|
||||
<input type="hidden" name="warteid" value="<?php echo (int)$w['warteid']; ?>">
|
||||
<button class="btn btn-warning btn-xs" type="submit">Absagen</button>
|
||||
</form>
|
||||
<form method="post" style="display:inline-block;" onsubmit="return confirm('Eintrag wirklich löschen?');">
|
||||
<input type="hidden" name="aktion" value="delete_waitlist">
|
||||
<input type="hidden" name="warteid" value="<?php echo (int)$w['warteid']; ?>">
|
||||
<button class="btn btn-danger btn-xs" type="submit">Löschen</button>
|
||||
@@ -774,52 +965,58 @@ try {
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="post" class="form-inline">
|
||||
<form method="post">
|
||||
<input type="hidden" name="aktion" value="add_waitlist_existing">
|
||||
<input type="hidden" name="person_search" value="<?php echo esc($personSearch); ?>">
|
||||
|
||||
<label>Patient</label>
|
||||
<select class="form-control" name="wl_person_id" required <?php echo empty($personResults) ? 'disabled' : ''; ?>>
|
||||
<option value="">Bitte wählen</option>
|
||||
<?php foreach ($personResults as $p): ?>
|
||||
<?php
|
||||
$pid = (int)$p['person_id'];
|
||||
$selected = ((int)($_POST['wl_person_id'] ?? 0) === $pid) ? 'selected' : '';
|
||||
$personLabel = trim((string)$p['nachname'] . ', ' . (string)$p['vorname']) . ' | ' . (string)$p['geburtstag'] . ' | ' . (string)$p['email'];
|
||||
?>
|
||||
<option value="<?php echo $pid; ?>" <?php echo $selected; ?>><?php echo esc($personLabel); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="form-group" style="display:block; margin-bottom:10px;">
|
||||
<label>Patient</label>
|
||||
<select class="form-control" name="wl_person_id" required <?php echo empty($personResults) ? 'disabled' : ''; ?>>
|
||||
<option value="">Bitte wählen</option>
|
||||
<?php foreach ($personResults as $p): ?>
|
||||
<?php
|
||||
$pid = (int)$p['person_id'];
|
||||
$selected = ((int)($_POST['wl_person_id'] ?? 0) === $pid) ? 'selected' : '';
|
||||
$personLabel = trim((string)$p['nachname'] . ', ' . (string)$p['vorname']) . ' | ' . (string)$p['geburtstag'] . ' | ' . (string)$p['email'];
|
||||
?>
|
||||
<option value="<?php echo $pid; ?>" <?php echo $selected; ?>><?php echo esc($personLabel); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label style="margin-left:10px;">Impfstoff</label>
|
||||
<select class="form-control" name="wl_impfstoff_id" id="existing_impfstoff">
|
||||
<option value="0" <?php echo ((int)($_POST['wl_impfstoff_id'] ?? 0) === 0) ? 'selected' : ''; ?>>Keine Vorgabe</option>
|
||||
<?php foreach ($configuredImpfstoffe as $r): ?>
|
||||
<?php
|
||||
$iid = (int)$r['impfstoff_id'];
|
||||
$selected = ((int)($_POST['wl_impfstoff_id'] ?? 0) === $iid) ? 'selected' : '';
|
||||
?>
|
||||
<option value="<?php echo $iid; ?>" <?php echo $selected; ?>>
|
||||
<?php echo esc($r['impfname'] . ' (Dosen: ' . $r['dosen_pro_flasche'] . ')'); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="form-group" style="display:block; margin-bottom:10px;">
|
||||
<label>Impfstoff</label>
|
||||
<select class="form-control" name="wl_impfstoff_id" id="existing_impfstoff">
|
||||
<option value="0" <?php echo ((int)($_POST['wl_impfstoff_id'] ?? 0) === 0) ? 'selected' : ''; ?>>Keine Vorgabe</option>
|
||||
<?php foreach ($configuredImpfstoffe as $r): ?>
|
||||
<?php
|
||||
$iid = (int)$r['impfstoff_id'];
|
||||
$selected = ((int)($_POST['wl_impfstoff_id'] ?? 0) === $iid) ? 'selected' : '';
|
||||
?>
|
||||
<option value="<?php echo $iid; ?>" <?php echo $selected; ?>>
|
||||
<?php echo esc($r['impfname'] . ' (Dosen: ' . $r['dosen_pro_flasche'] . ')'); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label style="margin-left:10px;">Zeitfenster</label>
|
||||
<select class="form-control" name="wl_plan_id" id="existing_plan">
|
||||
<option value="0" <?php echo ((int)($_POST['wl_plan_id'] ?? 0) === 0) ? 'selected' : ''; ?>>Ohne Zeitfenster</option>
|
||||
<?php foreach ($plans as $p): ?>
|
||||
<?php
|
||||
$planId = (int)$p['zeitraum_id'];
|
||||
$selected = ((int)($_POST['wl_plan_id'] ?? 0) === $planId) ? 'selected' : '';
|
||||
$impfstoffeCsv = implode(',', $p['impfstoff_id_list']);
|
||||
$impfstoffeText = empty($p['impfstoff_name_list']) ? 'ohne Impfstoff' : implode(', ', $p['impfstoff_name_list']);
|
||||
?>
|
||||
<option value="<?php echo $planId; ?>" data-impfstoffe="<?php echo esc($impfstoffeCsv); ?>" <?php echo $selected; ?>>
|
||||
<?php echo esc(workflowPlanLabel($p) . ' | Impfstoffe: ' . $impfstoffeText); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="form-group" style="display:block;">
|
||||
<label>Zeitfenster</label>
|
||||
<?php $selectedExistingPlanIds = impfNormalizeZeitraumIds($_POST['wl_plan_ids'] ?? ($_POST['wl_plan_id'] ?? [])); ?>
|
||||
<select class="form-control" name="wl_plan_ids[]" id="existing_plan" multiple size="6">
|
||||
<?php foreach ($plans as $p): ?>
|
||||
<?php
|
||||
$planId = (int)$p['zeitraum_id'];
|
||||
$selected = in_array($planId, $selectedExistingPlanIds, true) ? 'selected' : '';
|
||||
$impfstoffeCsv = implode(',', $p['impfstoff_id_list']);
|
||||
$optionLabel = workflowPlanLabel($p);
|
||||
?>
|
||||
<option value="<?php echo $planId; ?>" data-impfstoffe="<?php echo esc($impfstoffeCsv); ?>" <?php echo $selected; ?>>
|
||||
<?php echo esc($optionLabel); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="workflow-action-row">
|
||||
<button class="btn btn-primary" type="submit" <?php echo empty($personResults) ? 'disabled' : ''; ?>>
|
||||
Zur Warteliste hinzufügen
|
||||
@@ -897,17 +1094,17 @@ try {
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label>Zeitfenster</label>
|
||||
<select class="form-control" name="new_plan_id" id="new_plan">
|
||||
<option value="0" <?php echo ((int)($_POST['new_plan_id'] ?? 0) === 0) ? 'selected' : ''; ?>>Ohne Zeitfenster</option>
|
||||
<?php $selectedNewPlanIds = impfNormalizeZeitraumIds($_POST['new_plan_ids'] ?? ($_POST['new_plan_id'] ?? [])); ?>
|
||||
<select class="form-control" name="new_plan_ids[]" id="new_plan" multiple size="6">
|
||||
<?php foreach ($plans as $p): ?>
|
||||
<?php
|
||||
$planId = (int)$p['zeitraum_id'];
|
||||
$selected = ((int)($_POST['new_plan_id'] ?? 0) === $planId) ? 'selected' : '';
|
||||
$selected = in_array($planId, $selectedNewPlanIds, true) ? 'selected' : '';
|
||||
$impfstoffeCsv = implode(',', $p['impfstoff_id_list']);
|
||||
$impfstoffeText = empty($p['impfstoff_name_list']) ? 'ohne Impfstoff' : implode(', ', $p['impfstoff_name_list']);
|
||||
$optionLabel = workflowPlanLabel($p);
|
||||
?>
|
||||
<option value="<?php echo $planId; ?>" data-impfstoffe="<?php echo esc($impfstoffeCsv); ?>" <?php echo $selected; ?>>
|
||||
<?php echo esc(workflowPlanLabel($p) . ' | Impfstoffe: ' . $impfstoffeText); ?>
|
||||
<?php echo esc($optionLabel); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@@ -935,7 +1132,7 @@ try {
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><strong>Konkretes Impfevent erstellen</strong></div>
|
||||
<div class="panel-body">
|
||||
<p>Es werden nur Impfstoffe angeboten, bei denen die bestätigte Warteliste mindestens eine Flasche füllt.</p>
|
||||
<p>Es werden nur Impfstoffe und Zeiträume angeboten, bei denen die bestätigte Warteliste mindestens eine Flasche füllt und die Wartenden diesen Zeitraum auch ausdrücklich gewählt haben.</p>
|
||||
|
||||
<form method="post" class="form-inline" style="margin-bottom:14px;">
|
||||
<input type="hidden" name="aktion" value="create_event">
|
||||
@@ -951,13 +1148,17 @@ try {
|
||||
<select class="form-control" name="plan_id" id="event_plan" required>
|
||||
<option value="">Bitte wählen</option>
|
||||
<?php foreach ($plans as $p): ?>
|
||||
<?php
|
||||
$impfstoffeCsv = implode(',', $p['impfstoff_id_list']);
|
||||
$impfstoffeText = empty($p['impfstoff_name_list']) ? 'ohne Impfstoff' : implode(', ', $p['impfstoff_name_list']);
|
||||
?>
|
||||
<option value="<?php echo (int)$p['zeitraum_id']; ?>" data-impfstoffe="<?php echo esc($impfstoffeCsv); ?>">
|
||||
<?php echo esc(workflowPlanLabel($p) . ' | Impfstoffe: ' . $impfstoffeText); ?>
|
||||
</option>
|
||||
<?php foreach (($p['impfstoff_id_list'] ?? []) as $planImpfstoffId): ?>
|
||||
<?php
|
||||
$waiterCount = (int)($planWaitCounts[(int)$planImpfstoffId][(int)$p['zeitraum_id']] ?? 0);
|
||||
if ($waiterCount <= 0) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<option value="<?php echo (int)$p['zeitraum_id']; ?>" data-impfstoffe="<?php echo esc((string)$planImpfstoffId); ?>">
|
||||
<?php echo esc(workflowPlanLabel($p) . ' | Impfstoff: ' . ($configuredImpfstoffNames[(int)$planImpfstoffId] ?? 'Unbekannt') . ' | Wartende: ' . $waiterCount); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
|
||||
@@ -1061,15 +1262,18 @@ try {
|
||||
function filterPlans() {
|
||||
var val = impfstoff.value;
|
||||
var needsFilter = (val !== "" && val !== "0");
|
||||
var selectedValid = false;
|
||||
var selectedValues = [];
|
||||
for (var s = 0; s < plan.options.length; s++) {
|
||||
if (plan.options[s].selected && plan.options[s].value !== '') {
|
||||
selectedValues.push(plan.options[s].value);
|
||||
}
|
||||
}
|
||||
var selectedValid = 0;
|
||||
for (var i = 0; i < plan.options.length; i++) {
|
||||
var opt = plan.options[i];
|
||||
var optionImpfstoffe = opt.getAttribute('data-impfstoffe');
|
||||
if (!optionImpfstoffe) {
|
||||
opt.hidden = false;
|
||||
if (opt.value === plan.value) {
|
||||
selectedValid = true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
var ids = optionImpfstoffe.split(',');
|
||||
@@ -1083,11 +1287,13 @@ try {
|
||||
}
|
||||
}
|
||||
opt.hidden = !visible;
|
||||
if (visible && opt.value === plan.value) {
|
||||
selectedValid = true;
|
||||
if (!visible) {
|
||||
opt.selected = false;
|
||||
} else if (selectedValues.indexOf(opt.value) !== -1) {
|
||||
selectedValid++;
|
||||
}
|
||||
}
|
||||
if (!selectedValid) {
|
||||
if (selectedValues.length > 0 && selectedValid === 0) {
|
||||
plan.value = '';
|
||||
}
|
||||
}
|
||||
@@ -1103,5 +1309,3 @@ try {
|
||||
</div>
|
||||
|
||||
<?php include __DIR__ . "/templates/footer.inc.php"; ?>
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?php
|
||||
$_GET['view'] = 'event-create';
|
||||
require_once __DIR__ . '/impfworkflow.php';
|
||||
require_once __DIR__ . '/impfworkflow.php';
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?php
|
||||
$_GET['view'] = 'event-teilnehmer';
|
||||
require_once __DIR__ . '/impfworkflow.php';
|
||||
require_once __DIR__ . '/impfworkflow.php';
|
||||
|
||||
@@ -289,6 +289,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
if ($aktion === 'add_zeitraum') {
|
||||
$bezeichnung = trim((string)($_POST['bezeichnung'] ?? ''));
|
||||
if (function_exists('mb_substr')) {
|
||||
$bezeichnung = mb_substr($bezeichnung, 0, 50, 'UTF-8');
|
||||
} else {
|
||||
$bezeichnung = substr($bezeichnung, 0, 50);
|
||||
}
|
||||
$wochentag = (int)($_POST['wochentag'] ?? 0);
|
||||
$start = trim((string)($_POST['start'] ?? ''));
|
||||
$ende = trim((string)($_POST['ende'] ?? ''));
|
||||
@@ -608,7 +613,7 @@ $rules = $stRules->fetchAll(PDO::FETCH_ASSOC);
|
||||
<form method="post" class="form-inline" style="margin-bottom:12px;">
|
||||
<input type="hidden" name="aktion" value="add_zeitraum">
|
||||
<label>Bezeichnung</label>
|
||||
<input class="form-control" type="text" name="bezeichnung" placeholder="z. B. Mittwoch Vormittag">
|
||||
<input class="form-control" type="text" name="bezeichnung" maxlength="50" placeholder="z. B. Mittwoch Vormittag">
|
||||
<label style="margin-left:10px;">Wochentag</label>
|
||||
<select class="form-control" name="wochentag" required>
|
||||
<option value="1">Montag</option>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?php
|
||||
$_GET['view'] = 'teilnehmer';
|
||||
require_once __DIR__ . '/impfworkflow.php';
|
||||
require_once __DIR__ . '/impfworkflow.php';
|
||||
|
||||
+118
-118
@@ -1,119 +1,119 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
$user = check_admin_user();
|
||||
$internUserId = (int)$_SESSION['auth']['id'];
|
||||
include("templates/header.inc.php");
|
||||
if (!$user) { echo "<div class='container main-container'><h3>Erst anmelden: <a href=login.php>Login</a></h3><br>";
|
||||
|
||||
include("templates/footer.inc.php");
|
||||
exit; }
|
||||
?>
|
||||
<meta http-equiv="refresh" content = "0;url=anfragen.php">
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
|
||||
<div class="container main-container">
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
global $pdo;
|
||||
|
||||
$identifier = $_COOKIE['identifier'];
|
||||
$securitytoken = $_COOKIE['securitytoken'];
|
||||
|
||||
$statement = $pdo->prepare("SELECT * FROM securitytokens WHERE identifier = :identifier");
|
||||
$result = $statement->execute(array('identifier' => $identifier));
|
||||
$securitytoken_row = $statement->fetch();
|
||||
echo $securitytoken_row['securitytoken'];
|
||||
echo "<br>";
|
||||
echo sha1($securitytoken);
|
||||
*/
|
||||
?>
|
||||
<h1>Administration</h1>
|
||||
|
||||
Hallo <?php echo htmlentities($user['vorname']); ?>,<br>
|
||||
Herzlich Willkommen im internen Bereich!<br>
|
||||
|
||||
<!--
|
||||
<p>Hier finden Sie die weiteren Bearbeitungsschritte:<br><br></p>
|
||||
<p><a class="btn btn-primary btn-lg" href="anfragen.php" role="button">Bearbeitung der Anfragen</a>  
|
||||
<a class="btn btn-primary btn-lg" role="button" href="anfragen.php">Anfragen</a></p>
|
||||
<br>
|
||||
<p><a class="btn btn-primary btn-lg" role="button" href="../zeiterfassung">Zeiterfassung</a></p>
|
||||
<br>
|
||||
<p><a class="btn btn-primary btn-lg" href="impfadmin.php" role="button">Impf-Administration</a>   
|
||||
<a class="btn btn-primary btn-lg" role="button" href="impfadmin.php">Impfung</a>   
|
||||
<a class="btn btn-primary btn-lg" role="button" href="togoadmin.php">togo-Impfung</a></p>
|
||||
<br>
|
||||
<p><a class="btn btn-primary btn-lg" role="button" href="webseitenadmin.php">Webseiteninhalt ändern</a></p>
|
||||
<br><br><br>
|
||||
<p><a class="btn btn-primary btn-lg" role="button" href="settings.php">Einstellungen</a></p>
|
||||
<p><a class="btn btn-primary btn-lg" role="button" href="logout.php">Logout</a></p>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo '<h4>Welche Aktion möchtest du durchführen?</h4>
|
||||
<table width=100%><tr><td width=40%>
|
||||
|
||||
<form action="'. $_SERVER["PHP_SELF"] .'" 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>
|
||||
<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>
|
||||
<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>
|
||||
<input type=hidden name=aktion value=16>
|
||||
<input type=submit class="btn btn-primary" value="Mailvorlagen anpassen">
|
||||
</form>
|
||||
</td></tr><br><br><br><br>
|
||||
<tr></tr>
|
||||
<tr><td><h3>Urlaub / Hinweis planen</h3></td><td></td></tr>
|
||||
<tr><td>
|
||||
<form action="'. $_SERVER["PHP_SELF"] .'" 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>
|
||||
<input type=hidden name=aktion value=6>
|
||||
<input type=submit class="btn btn-primary" value="Notfallsprechstunde eintragen">
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
';
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
|
||||
include("templates/footer.inc.php")
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
$user = check_admin_user();
|
||||
$internUserId = (int)$_SESSION['auth']['id'];
|
||||
include("templates/header.inc.php");
|
||||
if (!$user) { echo "<div class='container main-container'><h3>Erst anmelden: <a href=login.php>Login</a></h3><br>";
|
||||
|
||||
include("templates/footer.inc.php");
|
||||
exit; }
|
||||
?>
|
||||
<meta http-equiv="refresh" content = "0;url=anfragen.php">
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
|
||||
<div class="container main-container">
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
global $pdo;
|
||||
|
||||
$identifier = $_COOKIE['identifier'];
|
||||
$securitytoken = $_COOKIE['securitytoken'];
|
||||
|
||||
$statement = $pdo->prepare("SELECT * FROM securitytokens WHERE identifier = :identifier");
|
||||
$result = $statement->execute(array('identifier' => $identifier));
|
||||
$securitytoken_row = $statement->fetch();
|
||||
echo $securitytoken_row['securitytoken'];
|
||||
echo "<br>";
|
||||
echo sha1($securitytoken);
|
||||
*/
|
||||
?>
|
||||
<h1>Administration</h1>
|
||||
|
||||
Hallo <?php echo htmlentities($user['vorname']); ?>,<br>
|
||||
Herzlich Willkommen im internen Bereich!<br>
|
||||
|
||||
<!--
|
||||
<p>Hier finden Sie die weiteren Bearbeitungsschritte:<br><br></p>
|
||||
<p><a class="btn btn-primary btn-lg" href="anfragen.php" role="button">Bearbeitung der Anfragen</a>  
|
||||
<a class="btn btn-primary btn-lg" role="button" href="anfragen.php">Anfragen</a></p>
|
||||
<br>
|
||||
<p><a class="btn btn-primary btn-lg" role="button" href="../zeiterfassung">Zeiterfassung</a></p>
|
||||
<br>
|
||||
<p><a class="btn btn-primary btn-lg" href="impfadmin.php" role="button">Impf-Administration</a>   
|
||||
<a class="btn btn-primary btn-lg" role="button" href="impfadmin.php">Impfung</a>   
|
||||
<a class="btn btn-primary btn-lg" role="button" href="togoadmin.php">togo-Impfung</a></p>
|
||||
<br>
|
||||
<p><a class="btn btn-primary btn-lg" role="button" href="webseitenadmin.php">Webseiteninhalt ändern</a></p>
|
||||
<br><br><br>
|
||||
<p><a class="btn btn-primary btn-lg" role="button" href="settings.php">Einstellungen</a></p>
|
||||
<p><a class="btn btn-primary btn-lg" role="button" href="logout.php">Logout</a></p>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo '<h4>Welche Aktion möchtest du durchführen?</h4>
|
||||
<table width=100%><tr><td width=40%>
|
||||
|
||||
<form action="'. $_SERVER["PHP_SELF"] .'" 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>
|
||||
<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>
|
||||
<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>
|
||||
<input type=hidden name=aktion value=16>
|
||||
<input type=submit class="btn btn-primary" value="Mailvorlagen anpassen">
|
||||
</form>
|
||||
</td></tr><br><br><br><br>
|
||||
<tr></tr>
|
||||
<tr><td><h3>Urlaub / Hinweis planen</h3></td><td></td></tr>
|
||||
<tr><td>
|
||||
<form action="'. $_SERVER["PHP_SELF"] .'" 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>
|
||||
<input type=hidden name=aktion value=6>
|
||||
<input type=submit class="btn btn-primary" value="Notfallsprechstunde eintragen">
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
';
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
|
||||
include("templates/footer.inc.php")
|
||||
?>
|
||||
+46
-46
@@ -1,47 +1,47 @@
|
||||
var http = createRequestObject();
|
||||
var objectId = '';
|
||||
|
||||
|
||||
function createRequestObject(htmlObjectId){
|
||||
var obj;
|
||||
var browser = navigator.appName;
|
||||
|
||||
objectId = htmlObjectId;
|
||||
|
||||
if(browser == "Microsoft Internet Explorer"){
|
||||
obj = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
else{
|
||||
obj = new XMLHttpRequest();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function sendReq(serverFileName, variableNames, variableValues) {
|
||||
var paramString = '';
|
||||
|
||||
variableNames = variableNames.split(',');
|
||||
variableValues = variableValues.split(',');
|
||||
|
||||
for(i=0; i<variableNames.length; i++) {
|
||||
paramString += variableNames[i]+'='+variableValues[i]+'&';
|
||||
}
|
||||
paramString = paramString.substring(0, (paramString.length-1));
|
||||
|
||||
if (paramString.length == 0) {
|
||||
http.open('get', serverFileName);
|
||||
}
|
||||
else {
|
||||
http.open('get', serverFileName+'?'+paramString);
|
||||
}
|
||||
http.onreadystatechange = handleResponse;
|
||||
http.send(null);
|
||||
}
|
||||
|
||||
function handleResponse() {
|
||||
|
||||
if(http.readyState == 4){
|
||||
responseText = http.responseText;
|
||||
document.getElementById(objectId).innerHTML = responseText;
|
||||
}
|
||||
var http = createRequestObject();
|
||||
var objectId = '';
|
||||
|
||||
|
||||
function createRequestObject(htmlObjectId){
|
||||
var obj;
|
||||
var browser = navigator.appName;
|
||||
|
||||
objectId = htmlObjectId;
|
||||
|
||||
if(browser == "Microsoft Internet Explorer"){
|
||||
obj = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
else{
|
||||
obj = new XMLHttpRequest();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function sendReq(serverFileName, variableNames, variableValues) {
|
||||
var paramString = '';
|
||||
|
||||
variableNames = variableNames.split(',');
|
||||
variableValues = variableValues.split(',');
|
||||
|
||||
for(i=0; i<variableNames.length; i++) {
|
||||
paramString += variableNames[i]+'='+variableValues[i]+'&';
|
||||
}
|
||||
paramString = paramString.substring(0, (paramString.length-1));
|
||||
|
||||
if (paramString.length == 0) {
|
||||
http.open('get', serverFileName);
|
||||
}
|
||||
else {
|
||||
http.open('get', serverFileName+'?'+paramString);
|
||||
}
|
||||
http.onreadystatechange = handleResponse;
|
||||
http.send(null);
|
||||
}
|
||||
|
||||
function handleResponse() {
|
||||
|
||||
if(http.readyState == 4){
|
||||
responseText = http.responseText;
|
||||
document.getElementById(objectId).innerHTML = responseText;
|
||||
}
|
||||
}
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+38
-38
@@ -1,46 +1,46 @@
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#user_input").autocomplete({
|
||||
source: "inc/suchepatient.php",
|
||||
source: "../inc/suchepatient.php",
|
||||
minLength: 3,
|
||||
select: function( event, ui ) {
|
||||
event.preventDefault();
|
||||
$("#userid_input").val(ui.item.id);
|
||||
$("#user_input").val(ui.item.value);
|
||||
$("#formbenutzersuche").submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function behandelt(str) {
|
||||
|
||||
|
||||
result = $.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: 'inc/behandelt.php',
|
||||
data: ({
|
||||
terminid: str
|
||||
})
|
||||
}).responseText;
|
||||
document.getElementById(str).style.display = 'none';
|
||||
//window.location.reload(false);
|
||||
|
||||
$("#formbenutzersuche").submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function behandelt(str) {
|
||||
|
||||
|
||||
result = $.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: 'inc/behandelt.php',
|
||||
data: ({
|
||||
terminid: str
|
||||
})
|
||||
}).responseText;
|
||||
document.getElementById(str).style.display = 'none';
|
||||
//window.location.reload(false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function submitForm(sub) {
|
||||
e.preventDefault();
|
||||
result = $.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: 'impfadmin.php',
|
||||
data: ({
|
||||
aktion: 4,
|
||||
searchdate: sub
|
||||
})
|
||||
}).responseText;
|
||||
//window.location.reload(false);
|
||||
document.body.innerHTML = result;
|
||||
}
|
||||
|
||||
|
||||
function submitForm(sub) {
|
||||
e.preventDefault();
|
||||
result = $.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: 'impfadmin.php',
|
||||
data: ({
|
||||
aktion: 4,
|
||||
searchdate: sub
|
||||
})
|
||||
}).responseText;
|
||||
//window.location.reload(false);
|
||||
document.body.innerHTML = result;
|
||||
}
|
||||
+110
-110
@@ -1,111 +1,111 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
//Überprüfe, dass der User eingeloggt ist
|
||||
//Der Aufruf von check_user() muss in alle internen Seiten eingebaut sein
|
||||
$user = check_admin_user();
|
||||
|
||||
include("templates/header.inc.php");
|
||||
|
||||
echo '<div class="container main-container">';
|
||||
|
||||
function build_calendar($month, $year) {
|
||||
$daysOfWeek = array('M','T','W','T','F','S','S');
|
||||
$firstDayOfMonth = mktime(0,0,0,$month,1,$year);
|
||||
$numberDays = date('t',$firstDayOfMonth);
|
||||
$dateComponents = getdate($firstDayOfMonth);
|
||||
$monthName = $dateComponents['month'];
|
||||
$dayOfWeek = $dateComponents['wday'] -1;
|
||||
$calendar = "<table class='calendar table table-condensed table-bordered' >";
|
||||
$calendar .= "<caption><h3>$monthName $year</h3></caption>";
|
||||
$calendar .= "<tr>";
|
||||
foreach($daysOfWeek as $day) {
|
||||
$calendar .= "<th class='header'>$day</th>";
|
||||
}
|
||||
$currentDay = 1;
|
||||
$calendar .= "</tr><tr>";
|
||||
if ($dayOfWeek > 0) {
|
||||
$calendar .= "<td colspan='$dayOfWeek'> </td>";
|
||||
}
|
||||
$month = str_pad($month, 2, "0", STR_PAD_LEFT);
|
||||
while($currentDay <= $numberDays){
|
||||
if($dayOfWeek == 7){
|
||||
$dayOfWeek = 0;
|
||||
$calendar .= "</tr><tr>";
|
||||
}
|
||||
$currentDayRel = str_pad($currentDay, 2, "0", STR_PAD_LEFT);
|
||||
$date = "$year-$month-$currentDayRel";
|
||||
|
||||
// Is this today?
|
||||
if(date('Y-m-d') == $date) {
|
||||
$calendar .= "<td class='day success' rel='$date' onClick='submitForm('".$date ."')'><b>$currentDay</b>";
|
||||
|
||||
} else {
|
||||
$calendar .= "<td class='day' rel='$date' onClick='submitForm(\"".$date ."\")'>$currentDay";
|
||||
|
||||
}
|
||||
$calendar .= "<form action='". $_SERVER['PHP_SELF'] . "' name='".$date ."' method=POST><input type=hidden name=searchdate value='". $date. "'><input type=hidden name=aktion value='4'></form>";
|
||||
$calendar .= AuswertungImpfungdailycalendar($date);
|
||||
$calendar .= "</td>";
|
||||
|
||||
$currentDay++;
|
||||
$dayOfWeek++;
|
||||
}
|
||||
if($dayOfWeek != 7){
|
||||
$remainingDays = 7 - $dayOfWeek;
|
||||
$calendar .= "<td colspan='$remainingDays'> </td>";
|
||||
}
|
||||
$calendar .= "</tr>";
|
||||
$calendar .= "</table>";
|
||||
return $calendar;
|
||||
}
|
||||
|
||||
$calendar = build_calendar(7, 2021);
|
||||
|
||||
//$calendar = '<div style="width:200px">' . $calendar . '</div>';
|
||||
|
||||
$calendar .= '<style type="text/css">table tbody tr td, table tbody tr th { text-align: center; }</style>';
|
||||
|
||||
|
||||
$calendar .= '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>';
|
||||
$calendar .= "<script>function submitForm(sub) {
|
||||
result = $.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: 'impfadmin.php',
|
||||
data: ({
|
||||
aktion: 4,
|
||||
searchdate: sub
|
||||
})
|
||||
}).responseText;
|
||||
//window.location.reload(false);
|
||||
document.body.innerHTML = result;
|
||||
}</script>";
|
||||
|
||||
/*
|
||||
$calendar .= "<script>function submitForm(sub) {
|
||||
// Form fields, see IDs above
|
||||
const params = {
|
||||
aktion: 4
|
||||
}
|
||||
|
||||
const http = new XMLHttpRequest()
|
||||
http.open('POST', 'impfadmin.php')
|
||||
http.setRequestHeader('Content-type', 'application/json')
|
||||
http.send(JSON.stringify(params)) // Make sure to stringify
|
||||
http.onload = function() {
|
||||
// Do whatever with response
|
||||
//alert(sub)
|
||||
document.body.innerHTML = http.responseText;
|
||||
}
|
||||
}</script>";
|
||||
*/
|
||||
print $calendar;
|
||||
|
||||
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
<?php
|
||||
session_start();
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
//Überprüfe, dass der User eingeloggt ist
|
||||
//Der Aufruf von check_user() muss in alle internen Seiten eingebaut sein
|
||||
$user = check_admin_user();
|
||||
|
||||
include("templates/header.inc.php");
|
||||
|
||||
echo '<div class="container main-container">';
|
||||
|
||||
function build_calendar($month, $year) {
|
||||
$daysOfWeek = array('M','T','W','T','F','S','S');
|
||||
$firstDayOfMonth = mktime(0,0,0,$month,1,$year);
|
||||
$numberDays = date('t',$firstDayOfMonth);
|
||||
$dateComponents = getdate($firstDayOfMonth);
|
||||
$monthName = $dateComponents['month'];
|
||||
$dayOfWeek = $dateComponents['wday'] -1;
|
||||
$calendar = "<table class='calendar table table-condensed table-bordered' >";
|
||||
$calendar .= "<caption><h3>$monthName $year</h3></caption>";
|
||||
$calendar .= "<tr>";
|
||||
foreach($daysOfWeek as $day) {
|
||||
$calendar .= "<th class='header'>$day</th>";
|
||||
}
|
||||
$currentDay = 1;
|
||||
$calendar .= "</tr><tr>";
|
||||
if ($dayOfWeek > 0) {
|
||||
$calendar .= "<td colspan='$dayOfWeek'> </td>";
|
||||
}
|
||||
$month = str_pad($month, 2, "0", STR_PAD_LEFT);
|
||||
while($currentDay <= $numberDays){
|
||||
if($dayOfWeek == 7){
|
||||
$dayOfWeek = 0;
|
||||
$calendar .= "</tr><tr>";
|
||||
}
|
||||
$currentDayRel = str_pad($currentDay, 2, "0", STR_PAD_LEFT);
|
||||
$date = "$year-$month-$currentDayRel";
|
||||
|
||||
// Is this today?
|
||||
if(date('Y-m-d') == $date) {
|
||||
$calendar .= "<td class='day success' rel='$date' onClick='submitForm('".$date ."')'><b>$currentDay</b>";
|
||||
|
||||
} else {
|
||||
$calendar .= "<td class='day' rel='$date' onClick='submitForm(\"".$date ."\")'>$currentDay";
|
||||
|
||||
}
|
||||
$calendar .= "<form action='". $_SERVER['PHP_SELF'] . "' name='".$date ."' method=POST><input type=hidden name=searchdate value='". $date. "'><input type=hidden name=aktion value='4'></form>";
|
||||
$calendar .= AuswertungImpfungdailycalendar($date);
|
||||
$calendar .= "</td>";
|
||||
|
||||
$currentDay++;
|
||||
$dayOfWeek++;
|
||||
}
|
||||
if($dayOfWeek != 7){
|
||||
$remainingDays = 7 - $dayOfWeek;
|
||||
$calendar .= "<td colspan='$remainingDays'> </td>";
|
||||
}
|
||||
$calendar .= "</tr>";
|
||||
$calendar .= "</table>";
|
||||
return $calendar;
|
||||
}
|
||||
|
||||
$calendar = build_calendar(7, 2021);
|
||||
|
||||
//$calendar = '<div style="width:200px">' . $calendar . '</div>';
|
||||
|
||||
$calendar .= '<style type="text/css">table tbody tr td, table tbody tr th { text-align: center; }</style>';
|
||||
|
||||
|
||||
$calendar .= '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>';
|
||||
$calendar .= "<script>function submitForm(sub) {
|
||||
result = $.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: 'impfadmin.php',
|
||||
data: ({
|
||||
aktion: 4,
|
||||
searchdate: sub
|
||||
})
|
||||
}).responseText;
|
||||
//window.location.reload(false);
|
||||
document.body.innerHTML = result;
|
||||
}</script>";
|
||||
|
||||
/*
|
||||
$calendar .= "<script>function submitForm(sub) {
|
||||
// Form fields, see IDs above
|
||||
const params = {
|
||||
aktion: 4
|
||||
}
|
||||
|
||||
const http = new XMLHttpRequest()
|
||||
http.open('POST', 'impfadmin.php')
|
||||
http.setRequestHeader('Content-type', 'application/json')
|
||||
http.send(JSON.stringify(params)) // Make sure to stringify
|
||||
http.onload = function() {
|
||||
// Do whatever with response
|
||||
//alert(sub)
|
||||
document.body.innerHTML = http.responseText;
|
||||
}
|
||||
}</script>";
|
||||
*/
|
||||
print $calendar;
|
||||
|
||||
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
+95
-95
@@ -1,96 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="shortcut icon" href="favicon.png">
|
||||
|
||||
<title>Sticky Footer Navbar Template for Bootstrap</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="http://getbootstrap.com/examples/sticky-footer-navbar/sticky-footer-navbar.css" rel="stylesheet">
|
||||
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Wrap all page content here -->
|
||||
<div id="wrap">
|
||||
|
||||
<!-- Fixed navbar -->
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="dropdown-header">Nav header</li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
<li><a href="#">One more separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<div class="container">
|
||||
|
||||
<div class="page-header">
|
||||
<h1>PHP Calendar</h1>
|
||||
</div>
|
||||
|
||||
<?php print $calendar; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<div class="container">
|
||||
<p class="text-muted">Place sticky footer content here.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.0/backbone-min.js"></script>
|
||||
<!--
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.syphon/0.4.1/backbone.syphon.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.modelbinder/1.0.4/Backbone.ModelBinder.min.js"></script>
|
||||
-->
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="shortcut icon" href="favicon.png">
|
||||
|
||||
<title>Sticky Footer Navbar Template for Bootstrap</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="http://getbootstrap.com/examples/sticky-footer-navbar/sticky-footer-navbar.css" rel="stylesheet">
|
||||
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Wrap all page content here -->
|
||||
<div id="wrap">
|
||||
|
||||
<!-- Fixed navbar -->
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="dropdown-header">Nav header</li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
<li><a href="#">One more separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<div class="container">
|
||||
|
||||
<div class="page-header">
|
||||
<h1>PHP Calendar</h1>
|
||||
</div>
|
||||
|
||||
<?php print $calendar; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<div class="container">
|
||||
<p class="text-muted">Place sticky footer content here.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.0/backbone-min.js"></script>
|
||||
<!--
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.syphon/0.4.1/backbone.syphon.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.modelbinder/1.0.4/Backbone.ModelBinder.min.js"></script>
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
+44
-44
@@ -1,45 +1,45 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../inc/config.inc.php';
|
||||
require_once __DIR__ . '/../inc/functions.inc.php';
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
try {
|
||||
$templetid = $_POST['templetid'] ?? '';
|
||||
$anfrageid = (int)($_POST['anfrageid'] ?? 0);
|
||||
|
||||
if ($templetid === '' || $anfrageid <= 0) {
|
||||
throw new RuntimeException('Fehlende Parameter');
|
||||
}
|
||||
|
||||
// URL aus config-Tabelle holen (sicher, unabhängig von globalen Variablen)
|
||||
$stmt = $pdo->query("SELECT anfragebestaetigung FROM config LIMIT 1");
|
||||
$anfragebestaetigung = (string)$stmt->fetchColumn();
|
||||
|
||||
if ($anfragebestaetigung === '') {
|
||||
throw new RuntimeException('Config anfragebestaetigung ist leer');
|
||||
}
|
||||
|
||||
$result = renderTemplateForAnfrage(
|
||||
$pdo,
|
||||
$anfrageid,
|
||||
$templetid,
|
||||
$anfragebestaetigung, // aus config
|
||||
[
|
||||
// optional:
|
||||
// '%TERMINZEITVORGABE%' => $Zeitanzeige,
|
||||
],
|
||||
false // CP1252 nur wenn nötig
|
||||
);
|
||||
|
||||
echo json_encode([
|
||||
'betreff' => $result['betreff'],
|
||||
'body' => $result['body']
|
||||
]);
|
||||
|
||||
} catch (Throwable $e) {
|
||||
http_response_code(500);
|
||||
echo json_encode([
|
||||
'error' => $e->getMessage()
|
||||
]);
|
||||
<?php
|
||||
require_once __DIR__ . '/../inc/config.inc.php';
|
||||
require_once __DIR__ . '/../inc/functions.inc.php';
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
try {
|
||||
$templetid = $_POST['templetid'] ?? '';
|
||||
$anfrageid = (int)($_POST['anfrageid'] ?? 0);
|
||||
|
||||
if ($templetid === '' || $anfrageid <= 0) {
|
||||
throw new RuntimeException('Fehlende Parameter');
|
||||
}
|
||||
|
||||
// URL aus config-Tabelle holen (sicher, unabhängig von globalen Variablen)
|
||||
$stmt = $pdo->query("SELECT anfragebestaetigung FROM config LIMIT 1");
|
||||
$anfragebestaetigung = (string)$stmt->fetchColumn();
|
||||
|
||||
if ($anfragebestaetigung === '') {
|
||||
throw new RuntimeException('Config anfragebestaetigung ist leer');
|
||||
}
|
||||
|
||||
$result = renderTemplateForAnfrage(
|
||||
$pdo,
|
||||
$anfrageid,
|
||||
$templetid,
|
||||
$anfragebestaetigung, // aus config
|
||||
[
|
||||
// optional:
|
||||
// '%TERMINZEITVORGABE%' => $Zeitanzeige,
|
||||
],
|
||||
false // CP1252 nur wenn nötig
|
||||
);
|
||||
|
||||
echo json_encode([
|
||||
'betreff' => $result['betreff'],
|
||||
'body' => $result['body']
|
||||
]);
|
||||
|
||||
} catch (Throwable $e) {
|
||||
http_response_code(500);
|
||||
echo json_encode([
|
||||
'error' => $e->getMessage()
|
||||
]);
|
||||
}
|
||||
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
|
||||
require_once("inc/config.inc.php");
|
||||
// E-Mail Vorlage laden
|
||||
|
||||
$templetid = $_POST["templetid"];
|
||||
$anfrageid = $_POST["anfrageid"];
|
||||
$queryconfig = mysqli_query($con, "Select betreff,body,name FROM mailtemplates WHERE templetid='$templetid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$body = $rowconfig["body"];
|
||||
$betreff = $rowconfig["betreff"];
|
||||
$name = $rowconfig["name"];
|
||||
|
||||
|
||||
$betreff = iconv('CP1252//IGNORE', 'UTF-8' , $betreff);
|
||||
$body = iconv('CP1252//IGNORE', 'UTF-8' , $body);
|
||||
echo $betreff;
|
||||
|
||||
<?php
|
||||
|
||||
require_once("inc/config.inc.php");
|
||||
// E-Mail Vorlage laden
|
||||
|
||||
$templetid = $_POST["templetid"];
|
||||
$anfrageid = $_POST["anfrageid"];
|
||||
$queryconfig = mysqli_query($con, "Select betreff,body,name FROM mailtemplates WHERE templetid='$templetid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$body = $rowconfig["body"];
|
||||
$betreff = $rowconfig["betreff"];
|
||||
$name = $rowconfig["name"];
|
||||
|
||||
|
||||
$betreff = iconv('CP1252//IGNORE', 'UTF-8' , $betreff);
|
||||
$body = iconv('CP1252//IGNORE', 'UTF-8' , $body);
|
||||
echo $betreff;
|
||||
|
||||
?>
|
||||
+59
-59
@@ -1,60 +1,60 @@
|
||||
<?php
|
||||
|
||||
require_once("inc/config.inc.php");
|
||||
// E-Mail Vorlage laden
|
||||
|
||||
$templetid = $_POST["templetid"];
|
||||
$anfrageid = $_POST["anfrageid"];
|
||||
$queryconfig = mysqli_query($con, "Select betreff,body,name FROM mailtemplates WHERE templetid='$templetid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$body = $rowconfig["body"];
|
||||
$betreff = $rowconfig["betreff"];
|
||||
$name = $rowconfig["name"];
|
||||
|
||||
$sqlstring = "SELECT * FROM anfragen INNER JOIN user ON anfragen.personid = user.userid WHERE anfrageid ='" . $anfrageid . "'";
|
||||
$query = mysqli_query($con,$sqlstring);
|
||||
$rowtime = mysqli_fetch_assoc($query);
|
||||
$vorname = $rowtime["vorname"];
|
||||
$nachname = $rowtime["nachname"];
|
||||
$geburtstag = $rowtime["geburtstag"];
|
||||
$tele = $rowtime["tele"];
|
||||
$plz = $rowtime["plz"];
|
||||
$ort = $rowtime["ort"];
|
||||
$strasse = $rowtime["strasse"];
|
||||
$adresse = "$ort $plz, $stasse";
|
||||
$empfaenger = $rowtime["mail"];
|
||||
$hash = $rowtime["hash"];
|
||||
$timeid = $rowtime["timeid"];
|
||||
$userausgabe = $vorname . " " . $nachname;
|
||||
$anfragenlogin = $anfragebestaetigung . "?id=" . $hash ;
|
||||
|
||||
$nachricht = $rowtime["nachricht"];
|
||||
$medikamenteins = $rowtime["medikament1"];
|
||||
$medikamentzwei = $rowtime["medikament2"];
|
||||
$anforderungart = $rowtime["anforderungart"];
|
||||
|
||||
$sqlimpfstoffstring = "SELECT artname FROM anfrageart WHERE artid ='" . $anforderungart . "'";
|
||||
$queryimpfstoff = mysqli_query($con,$sqlimpfstoffstring);
|
||||
$rowimpf = mysqli_fetch_assoc($queryimpfstoff);
|
||||
$rezeptart = $rowimpf["artname"];
|
||||
$body = str_replace("%BENUTZERVORNAME%", $vorname, $body);
|
||||
$body = str_replace("%BENUTZERNACHNAME%", $nachname, $body);
|
||||
$body = str_replace("%BENUTZERGEBURTSTAG%", $geburtstag, $body);
|
||||
$body = str_replace("%BENUTZERADRESSE%", $adresse, $body);
|
||||
$body = str_replace("%TERMINZEITVORGABE%", $Zeitanzeige, $body);
|
||||
$body = str_replace("%TERMINIMPFSTOFF%", $impfstofftext, $body);
|
||||
$body = str_replace("%TERMINLOGIN%", $terminlogin, $body);
|
||||
$body = str_replace("%WARTELISTELOGIN%", $wartelistelogin, $body);
|
||||
$body = str_replace("%WARTELISTEIMPFSTOFF%", $impfstofftextwarte, $body);
|
||||
$body = str_replace("%WARTELISTEIMPFANGEBOT%", $impfangebottext, $body);
|
||||
$body = str_replace("%REZEPTART%", $rezeptart, $body);
|
||||
$body = str_replace("%MEDIKAMENTNUMMEREINS%", $medikamenteins, $body);
|
||||
$body = str_replace("%MEDIKAMENTNUMMERZWEI%", $medikamentzwei, $body);
|
||||
$body = str_replace("%ANFRAGENACHRICHT%", $nachricht, $body);
|
||||
$body = str_replace("%ANFRAGENLOGIN%", $anfragenlogin, $body);
|
||||
|
||||
$betreff = iconv('CP1252//IGNORE', 'UTF-8' , $betreff);
|
||||
$body = iconv('CP1252//IGNORE', 'UTF-8' , $body);
|
||||
echo $body;
|
||||
|
||||
<?php
|
||||
|
||||
require_once("inc/config.inc.php");
|
||||
// E-Mail Vorlage laden
|
||||
|
||||
$templetid = $_POST["templetid"];
|
||||
$anfrageid = $_POST["anfrageid"];
|
||||
$queryconfig = mysqli_query($con, "Select betreff,body,name FROM mailtemplates WHERE templetid='$templetid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$body = $rowconfig["body"];
|
||||
$betreff = $rowconfig["betreff"];
|
||||
$name = $rowconfig["name"];
|
||||
|
||||
$sqlstring = "SELECT * FROM anfragen INNER JOIN user ON anfragen.personid = user.userid WHERE anfrageid ='" . $anfrageid . "'";
|
||||
$query = mysqli_query($con,$sqlstring);
|
||||
$rowtime = mysqli_fetch_assoc($query);
|
||||
$vorname = $rowtime["vorname"];
|
||||
$nachname = $rowtime["nachname"];
|
||||
$geburtstag = $rowtime["geburtstag"];
|
||||
$tele = $rowtime["tele"];
|
||||
$plz = $rowtime["plz"];
|
||||
$ort = $rowtime["ort"];
|
||||
$strasse = $rowtime["strasse"];
|
||||
$adresse = "$ort $plz, $stasse";
|
||||
$empfaenger = $rowtime["mail"];
|
||||
$hash = $rowtime["hash"];
|
||||
$timeid = $rowtime["timeid"];
|
||||
$userausgabe = $vorname . " " . $nachname;
|
||||
$anfragenlogin = $anfragebestaetigung . "?id=" . $hash ;
|
||||
|
||||
$nachricht = $rowtime["nachricht"];
|
||||
$medikamenteins = $rowtime["medikament1"];
|
||||
$medikamentzwei = $rowtime["medikament2"];
|
||||
$anforderungart = $rowtime["anforderungart"];
|
||||
|
||||
$sqlimpfstoffstring = "SELECT artname FROM anfrageart WHERE artid ='" . $anforderungart . "'";
|
||||
$queryimpfstoff = mysqli_query($con,$sqlimpfstoffstring);
|
||||
$rowimpf = mysqli_fetch_assoc($queryimpfstoff);
|
||||
$rezeptart = $rowimpf["artname"];
|
||||
$body = str_replace("%BENUTZERVORNAME%", $vorname, $body);
|
||||
$body = str_replace("%BENUTZERNACHNAME%", $nachname, $body);
|
||||
$body = str_replace("%BENUTZERGEBURTSTAG%", $geburtstag, $body);
|
||||
$body = str_replace("%BENUTZERADRESSE%", $adresse, $body);
|
||||
$body = str_replace("%TERMINZEITVORGABE%", $Zeitanzeige, $body);
|
||||
$body = str_replace("%TERMINIMPFSTOFF%", $impfstofftext, $body);
|
||||
$body = str_replace("%TERMINLOGIN%", $terminlogin, $body);
|
||||
$body = str_replace("%WARTELISTELOGIN%", $wartelistelogin, $body);
|
||||
$body = str_replace("%WARTELISTEIMPFSTOFF%", $impfstofftextwarte, $body);
|
||||
$body = str_replace("%WARTELISTEIMPFANGEBOT%", $impfangebottext, $body);
|
||||
$body = str_replace("%REZEPTART%", $rezeptart, $body);
|
||||
$body = str_replace("%MEDIKAMENTNUMMEREINS%", $medikamenteins, $body);
|
||||
$body = str_replace("%MEDIKAMENTNUMMERZWEI%", $medikamentzwei, $body);
|
||||
$body = str_replace("%ANFRAGENACHRICHT%", $nachricht, $body);
|
||||
$body = str_replace("%ANFRAGENLOGIN%", $anfragenlogin, $body);
|
||||
|
||||
$betreff = iconv('CP1252//IGNORE', 'UTF-8' , $betreff);
|
||||
$body = iconv('CP1252//IGNORE', 'UTF-8' , $body);
|
||||
echo $body;
|
||||
|
||||
?>
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
// Zeigt alle Informationen (Standardwert ist INFO_ALL)
|
||||
phpinfo();
|
||||
|
||||
<?php
|
||||
|
||||
// Zeigt alle Informationen (Standardwert ist INFO_ALL)
|
||||
phpinfo();
|
||||
|
||||
?>
|
||||
+61
-17
@@ -1,17 +1,19 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
// WICHTIG: Pfade aus /admin heraus korrekt auflösen
|
||||
// WICHTIG: Pfade aus /admin heraus korrekt auflösen
|
||||
require_once __DIR__ . "/../inc/config.inc.php";
|
||||
require_once __DIR__ . "/../inc/functions.inc.php";
|
||||
require_once __DIR__ . "/../inc/impfworkflow_notifications.inc.php";
|
||||
|
||||
// Login prüfen
|
||||
// Login prüfen
|
||||
$user = check_admin_user();
|
||||
|
||||
include __DIR__ . "/templates/header.inc.php";
|
||||
|
||||
$user = check_admin_user();
|
||||
$internUserId = (int)$_SESSION['auth']['id'];
|
||||
$activeTab = 'data';
|
||||
|
||||
if (!$user) { echo "<div class='container main-container'><h3>Erst anmelden: <a href=login.php>Login</a></h3><br>";
|
||||
|
||||
@@ -22,11 +24,12 @@ if(isset($_GET['save'])) {
|
||||
$save = $_GET['save'];
|
||||
|
||||
if($save == 'personal_data') {
|
||||
$activeTab = 'data';
|
||||
$vorname = trim($_POST['vorname']);
|
||||
$nachname = trim($_POST['nachname']);
|
||||
|
||||
if($vorname == "" || $nachname == "") {
|
||||
$error_msg = "Bitte Vor- und Nachname ausfüllen.";
|
||||
$error_msg = "Bitte Vor- und Nachname ausfüllen.";
|
||||
} else {
|
||||
$statement = $pdo->prepare("UPDATE users SET vorname = :vorname, nachname = :nachname, updated_at=NOW() WHERE id = :userid");
|
||||
$result = $statement->execute(array('vorname' => $vorname, 'nachname'=> $nachname, 'userid' => $user['id'] ));
|
||||
@@ -34,14 +37,15 @@ if(isset($_GET['save'])) {
|
||||
$success_msg = "Daten erfolgreich gespeichert.";
|
||||
}
|
||||
} else if($save == 'email') {
|
||||
$activeTab = 'email';
|
||||
$passwort = $_POST['passwort'];
|
||||
$email = trim($_POST['email']);
|
||||
$email2 = trim($_POST['email2']);
|
||||
|
||||
if($email != $email2) {
|
||||
$error_msg = "Die eingegebenen E-Mail-Adressen stimmten nicht überein.";
|
||||
$error_msg = "Die eingegebenen E-Mail-Adressen stimmten nicht überein.";
|
||||
} else if(!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
$error_msg = "Bitte eine gültige E-Mail-Adresse eingeben.";
|
||||
$error_msg = "Bitte eine gültige E-Mail-Adresse eingeben.";
|
||||
} else if(!password_verify($passwort, $user['passwort'])) {
|
||||
$error_msg = "Bitte korrektes Passwort eingeben.";
|
||||
} else {
|
||||
@@ -51,13 +55,31 @@ if(isset($_GET['save'])) {
|
||||
$success_msg = "E-Mail-Adresse erfolgreich gespeichert.";
|
||||
}
|
||||
|
||||
} else if($save == 'impfworkflow_notification') {
|
||||
$activeTab = 'impfworkflow';
|
||||
$benachrichtigungEmail = trim((string)($_POST['benachrichtigung_email'] ?? ''));
|
||||
|
||||
if ($benachrichtigungEmail !== '' && !filter_var($benachrichtigungEmail, FILTER_VALIDATE_EMAIL)) {
|
||||
$error_msg = "Bitte eine gueltige E-Mail-Adresse fuer die Impfworkflow-Benachrichtigung eingeben.";
|
||||
} else {
|
||||
try {
|
||||
impfWorkflowNotificationSetEmail($pdo, $benachrichtigungEmail);
|
||||
$success_msg = ($benachrichtigungEmail !== '')
|
||||
? "Impfworkflow-Benachrichtigungsadresse gespeichert."
|
||||
: "Impfworkflow-Benachrichtigungsadresse geloescht.";
|
||||
} catch (Throwable $e) {
|
||||
$error_msg = "Die Impfworkflow-Benachrichtigungsadresse konnte nicht gespeichert werden: " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
} else if($save == 'passwort') {
|
||||
$activeTab = 'passwort';
|
||||
$passwortAlt = $_POST['passwortAlt'];
|
||||
$passwortNeu = trim($_POST['passwortNeu']);
|
||||
$passwortNeu2 = trim($_POST['passwortNeu2']);
|
||||
|
||||
if($passwortNeu != $passwortNeu2) {
|
||||
$error_msg = "Die eingegebenen Passwörter stimmten nicht überein.";
|
||||
$error_msg = "Die eingegebenen Passwörter stimmten nicht überein.";
|
||||
} else if($passwortNeu == "") {
|
||||
$error_msg = "Das Passwort darf nicht leer sein.";
|
||||
} else if(!password_verify($passwortAlt, $user['passwort'])) {
|
||||
@@ -107,14 +129,15 @@ endif;
|
||||
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active"><a href="#data" aria-controls="home" role="tab" data-toggle="tab">Persönliche Daten</a></li>
|
||||
<li role="presentation"><a href="#email" aria-controls="profile" role="tab" data-toggle="tab">E-Mail</a></li>
|
||||
<li role="presentation"><a href="#passwort" aria-controls="messages" role="tab" data-toggle="tab">Passwort</a></li>
|
||||
<li role="presentation" class="<?php echo ($activeTab === 'data') ? 'active' : ''; ?>"><a href="#data" aria-controls="home" role="tab" data-toggle="tab">Persönliche Daten</a></li>
|
||||
<li role="presentation" class="<?php echo ($activeTab === 'email') ? 'active' : ''; ?>"><a href="#email" aria-controls="profile" role="tab" data-toggle="tab">E-Mail</a></li>
|
||||
<li role="presentation" class="<?php echo ($activeTab === 'impfworkflow') ? 'active' : ''; ?>"><a href="#impfworkflow" aria-controls="impfworkflow" role="tab" data-toggle="tab">Impfworkflow</a></li>
|
||||
<li role="presentation" class="<?php echo ($activeTab === 'passwort') ? 'active' : ''; ?>"><a href="#passwort" aria-controls="messages" role="tab" data-toggle="tab">Passwort</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- Persönliche Daten-->
|
||||
<!-- Persönliche Daten-->
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="data">
|
||||
<div role="tabpanel" class="tab-pane <?php echo ($activeTab === 'data') ? 'active' : ''; ?>" id="data">
|
||||
<br>
|
||||
<form action="?save=personal_data" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
@@ -139,10 +162,10 @@ endif;
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Änderung der E-Mail-Adresse -->
|
||||
<div role="tabpanel" class="tab-pane" id="email">
|
||||
<!-- Änderung der E-Mail-Adresse -->
|
||||
<div role="tabpanel" class="tab-pane <?php echo ($activeTab === 'email') ? 'active' : ''; ?>" id="email">
|
||||
<br>
|
||||
<p>Zum Änderen deiner E-Mail-Adresse gib bitte dein aktuelles Passwort sowie die neue E-Mail-Adresse ein.</p>
|
||||
<p>Zum Änderen deiner E-Mail-Adresse gib bitte dein aktuelles Passwort sowie die neue E-Mail-Adresse ein.</p>
|
||||
<form action="?save=email" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inputPasswort" class="col-sm-2 control-label">Passwort</label>
|
||||
@@ -174,10 +197,31 @@ endif;
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Änderung des Passworts -->
|
||||
<div role="tabpanel" class="tab-pane" id="passwort">
|
||||
<div role="tabpanel" class="tab-pane <?php echo ($activeTab === 'impfworkflow') ? 'active' : ''; ?>" id="impfworkflow">
|
||||
<br>
|
||||
<p>Zum Änderen deines Passworts gib bitte dein aktuelles Passwort sowie das neue Passwort ein.</p>
|
||||
<p>Hier hinterlegst du die E-Mail-Adresse, an die spaeter Impfworkflow-Benachrichtigungen gesendet werden sollen.</p>
|
||||
<?php $currentNotificationEmail = impfWorkflowNotificationGetEmail($pdo); ?>
|
||||
<form action="?save=impfworkflow_notification" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inputImpfworkflowMail" class="col-sm-2 control-label">Benachrichtigungs-E-Mail</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" id="inputImpfworkflowMail" name="benachrichtigung_email" type="email" value="<?php echo htmlentities($currentNotificationEmail); ?>" placeholder="benachrichtigung@praxis.de">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<p class="help-block">Leer lassen, um Benachrichtigungen zu deaktivieren.</p>
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Änderung des Passworts -->
|
||||
<div role="tabpanel" class="tab-pane <?php echo ($activeTab === 'passwort') ? 'active' : ''; ?>" id="passwort">
|
||||
<br>
|
||||
<p>Zum Änderen deines Passworts gib bitte dein aktuelles Passwort sowie das neue Passwort ein.</p>
|
||||
<form action="?save=passwort" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inputPasswort" class="col-sm-2 control-label">Altes Passwort</label>
|
||||
|
||||
@@ -17,6 +17,7 @@ FROM (
|
||||
UNION ALL SELECT 'impfstoff_wochenplan'
|
||||
UNION ALL SELECT 'impf_zeitraum'
|
||||
UNION ALL SELECT 'impf_zeitraum_impfstoff'
|
||||
UNION ALL SELECT 'warteliste_zeitraum'
|
||||
UNION ALL SELECT 'warteliste'
|
||||
) t
|
||||
LEFT JOIN information_schema.tables it
|
||||
@@ -51,6 +52,9 @@ FROM (
|
||||
UNION ALL SELECT 'impf_zeitraum', 'impfortid'
|
||||
UNION ALL SELECT 'impf_zeitraum_impfstoff', 'zeitraum_id'
|
||||
UNION ALL SELECT 'impf_zeitraum_impfstoff', 'impfstoff_id'
|
||||
UNION ALL SELECT 'warteliste_zeitraum', 'warteid'
|
||||
UNION ALL SELECT 'warteliste_zeitraum', 'zeitraum_id'
|
||||
UNION ALL SELECT 'warteliste_zeitraum', 'created_at'
|
||||
UNION ALL SELECT 'warteliste', 'warteid'
|
||||
UNION ALL SELECT 'warteliste', 'userid'
|
||||
UNION ALL SELECT 'warteliste', 'impfenzeitraum'
|
||||
@@ -71,6 +75,7 @@ SELECT
|
||||
END AS status
|
||||
FROM (
|
||||
SELECT 'warteliste' AS table_name, 'idx_warteliste_zeitraum' AS index_name
|
||||
UNION ALL SELECT 'warteliste_zeitraum', 'idx_warteliste_zeitraum_zeitraum'
|
||||
UNION ALL SELECT 'impfstoff_wochenplan', 'idx_impfstoff_wochenplan_impfstoff'
|
||||
UNION ALL SELECT 'impfstoff_wochenplan', 'idx_impfstoff_wochenplan_wochentag'
|
||||
UNION ALL SELECT 'impf_zeitraum', 'idx_impf_zeitraum_wochentag'
|
||||
@@ -102,6 +107,24 @@ SELECT
|
||||
ELSE 'TABLE_MISSING'
|
||||
END AS status;
|
||||
|
||||
SELECT
|
||||
'meta' AS check_type,
|
||||
'impf_workflow_meta.legacy_warteliste_zeitraeume_migrated' AS object_name,
|
||||
CASE
|
||||
WHEN EXISTS (
|
||||
SELECT 1
|
||||
FROM information_schema.tables
|
||||
WHERE table_schema = DATABASE()
|
||||
AND table_name = 'impf_workflow_meta'
|
||||
) THEN COALESCE((
|
||||
SELECT CONCAT('VALUE=', meta_value)
|
||||
FROM impf_workflow_meta
|
||||
WHERE meta_key = 'legacy_warteliste_zeitraeume_migrated'
|
||||
LIMIT 1
|
||||
), 'MISSING')
|
||||
ELSE 'TABLE_MISSING'
|
||||
END AS status;
|
||||
|
||||
SELECT
|
||||
'data' AS check_type,
|
||||
'impfstoff_wochenplan rows' AS object_name,
|
||||
@@ -154,3 +177,16 @@ SELECT
|
||||
) THEN CAST((SELECT COUNT(*) FROM warteliste WHERE zeitraum_id IS NOT NULL) AS CHAR)
|
||||
ELSE 'COLUMN_MISSING'
|
||||
END AS status;
|
||||
|
||||
SELECT
|
||||
'data' AS check_type,
|
||||
'warteliste_zeitraum rows' AS object_name,
|
||||
CASE
|
||||
WHEN EXISTS (
|
||||
SELECT 1
|
||||
FROM information_schema.tables
|
||||
WHERE table_schema = DATABASE()
|
||||
AND table_name = 'warteliste_zeitraum'
|
||||
) THEN CAST((SELECT COUNT(*) FROM warteliste_zeitraum) AS CHAR)
|
||||
ELSE 'TABLE_MISSING'
|
||||
END AS status;
|
||||
|
||||
@@ -51,6 +51,14 @@ CREATE TABLE IF NOT EXISTS `impf_zeitraum_impfstoff` (
|
||||
INDEX `idx_impf_zeitraum_impfstoff_impfstoff` (`impfstoff_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `warteliste_zeitraum` (
|
||||
`warteid` INT NOT NULL,
|
||||
`zeitraum_id` INT NOT NULL,
|
||||
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`warteid`, `zeitraum_id`),
|
||||
INDEX `idx_warteliste_zeitraum_zeitraum` (`zeitraum_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
DROP PROCEDURE IF EXISTS `migrate_praxis_schema_20260320`;
|
||||
DELIMITER $$
|
||||
CREATE PROCEDURE `migrate_praxis_schema_20260320`()
|
||||
@@ -60,6 +68,8 @@ BEGIN
|
||||
DECLARE v_warteliste_exists INT DEFAULT 0;
|
||||
DECLARE v_zeitraum_id_exists INT DEFAULT 0;
|
||||
DECLARE v_warteliste_index_exists INT DEFAULT 0;
|
||||
DECLARE v_warteliste_zeitraum_exists INT DEFAULT 0;
|
||||
DECLARE v_warteliste_zeitraum_index_exists INT DEFAULT 0;
|
||||
DECLARE v_legacy_plan_exists INT DEFAULT 0;
|
||||
|
||||
SELECT COUNT(*)
|
||||
@@ -114,6 +124,35 @@ BEGIN
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
SELECT COUNT(*)
|
||||
INTO v_warteliste_zeitraum_exists
|
||||
FROM information_schema.tables
|
||||
WHERE table_schema = DATABASE()
|
||||
AND table_name = 'warteliste_zeitraum';
|
||||
|
||||
IF v_warteliste_zeitraum_exists = 0 THEN
|
||||
CREATE TABLE `warteliste_zeitraum` (
|
||||
`warteid` INT NOT NULL,
|
||||
`zeitraum_id` INT NOT NULL,
|
||||
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`warteid`, `zeitraum_id`),
|
||||
INDEX `idx_warteliste_zeitraum_zeitraum` (`zeitraum_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
SET v_warteliste_zeitraum_exists = 1;
|
||||
ELSE
|
||||
SELECT COUNT(*)
|
||||
INTO v_warteliste_zeitraum_index_exists
|
||||
FROM information_schema.statistics
|
||||
WHERE table_schema = DATABASE()
|
||||
AND table_name = 'warteliste_zeitraum'
|
||||
AND index_name = 'idx_warteliste_zeitraum_zeitraum';
|
||||
|
||||
IF v_warteliste_zeitraum_index_exists = 0 THEN
|
||||
ALTER TABLE `warteliste_zeitraum`
|
||||
ADD INDEX `idx_warteliste_zeitraum_zeitraum` (`zeitraum_id`);
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
SELECT COUNT(*)
|
||||
INTO v_legacy_plan_exists
|
||||
FROM information_schema.tables
|
||||
@@ -159,6 +198,18 @@ BEGIN
|
||||
VALUES ('legacy_wochenplan_migrated', '1') AS `incoming`
|
||||
ON DUPLICATE KEY UPDATE `meta_value` = `incoming`.`meta_value`;
|
||||
END IF;
|
||||
|
||||
IF v_warteliste_exists > 0 AND v_warteliste_zeitraum_exists > 0 THEN
|
||||
INSERT IGNORE INTO `warteliste_zeitraum` (`warteid`, `zeitraum_id`)
|
||||
SELECT `warteid`, `zeitraum_id`
|
||||
FROM `warteliste`
|
||||
WHERE `zeitraum_id` IS NOT NULL
|
||||
AND `zeitraum_id` > 0;
|
||||
|
||||
INSERT INTO `impf_workflow_meta` (`meta_key`, `meta_value`)
|
||||
VALUES ('legacy_warteliste_zeitraeume_migrated', '1') AS `incoming`
|
||||
ON DUPLICATE KEY UPDATE `meta_value` = `incoming`.`meta_value`;
|
||||
END IF;
|
||||
END $$
|
||||
DELIMITER ;
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
-- Migration fuer Mehrfach-Zeitfenster in der Impfwarteliste.
|
||||
-- Idempotent: kann mehrfach ausgefuehrt werden.
|
||||
-- Bestehende Tabellen werden nicht neu aufgebaut, sondern nur erweitert.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `impf_workflow_meta` (
|
||||
`meta_key` VARCHAR(100) NOT NULL,
|
||||
`meta_value` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`meta_key`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
DROP PROCEDURE IF EXISTS `migrate_warteliste_multi_zeitfenster_20260322`;
|
||||
DELIMITER $$
|
||||
CREATE PROCEDURE `migrate_warteliste_multi_zeitfenster_20260322`()
|
||||
BEGIN
|
||||
DECLARE v_warteliste_exists INT DEFAULT 0;
|
||||
DECLARE v_zeitraum_id_exists INT DEFAULT 0;
|
||||
DECLARE v_warteliste_index_exists INT DEFAULT 0;
|
||||
DECLARE v_warteliste_zeitraum_exists INT DEFAULT 0;
|
||||
DECLARE v_warteliste_zeitraum_index_exists INT DEFAULT 0;
|
||||
|
||||
SELECT COUNT(*)
|
||||
INTO v_warteliste_exists
|
||||
FROM information_schema.tables
|
||||
WHERE table_schema = DATABASE()
|
||||
AND table_name = 'warteliste';
|
||||
|
||||
IF v_warteliste_exists = 0 THEN
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MESSAGE_TEXT = 'Tabelle warteliste wurde nicht gefunden.';
|
||||
END IF;
|
||||
|
||||
SELECT COUNT(*)
|
||||
INTO v_zeitraum_id_exists
|
||||
FROM information_schema.columns
|
||||
WHERE table_schema = DATABASE()
|
||||
AND table_name = 'warteliste'
|
||||
AND column_name = 'zeitraum_id';
|
||||
|
||||
IF v_zeitraum_id_exists = 0 THEN
|
||||
ALTER TABLE `warteliste`
|
||||
ADD COLUMN `zeitraum_id` INT NULL AFTER `impfenzeitraum`;
|
||||
END IF;
|
||||
|
||||
SELECT COUNT(*)
|
||||
INTO v_warteliste_index_exists
|
||||
FROM information_schema.statistics
|
||||
WHERE table_schema = DATABASE()
|
||||
AND table_name = 'warteliste'
|
||||
AND index_name = 'idx_warteliste_zeitraum';
|
||||
|
||||
IF v_warteliste_index_exists = 0 THEN
|
||||
ALTER TABLE `warteliste`
|
||||
ADD INDEX `idx_warteliste_zeitraum` (`zeitraum_id`);
|
||||
END IF;
|
||||
|
||||
SELECT COUNT(*)
|
||||
INTO v_warteliste_zeitraum_exists
|
||||
FROM information_schema.tables
|
||||
WHERE table_schema = DATABASE()
|
||||
AND table_name = 'warteliste_zeitraum';
|
||||
|
||||
IF v_warteliste_zeitraum_exists = 0 THEN
|
||||
CREATE TABLE `warteliste_zeitraum` (
|
||||
`warteid` INT NOT NULL,
|
||||
`zeitraum_id` INT NOT NULL,
|
||||
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`warteid`, `zeitraum_id`),
|
||||
INDEX `idx_warteliste_zeitraum_zeitraum` (`zeitraum_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
SET v_warteliste_zeitraum_exists = 1;
|
||||
END IF;
|
||||
|
||||
SELECT COUNT(*)
|
||||
INTO v_warteliste_zeitraum_index_exists
|
||||
FROM information_schema.statistics
|
||||
WHERE table_schema = DATABASE()
|
||||
AND table_name = 'warteliste_zeitraum'
|
||||
AND index_name = 'idx_warteliste_zeitraum_zeitraum';
|
||||
|
||||
IF v_warteliste_zeitraum_index_exists = 0 THEN
|
||||
ALTER TABLE `warteliste_zeitraum`
|
||||
ADD INDEX `idx_warteliste_zeitraum_zeitraum` (`zeitraum_id`);
|
||||
END IF;
|
||||
|
||||
INSERT IGNORE INTO `warteliste_zeitraum` (`warteid`, `zeitraum_id`)
|
||||
SELECT `warteid`, `zeitraum_id`
|
||||
FROM `warteliste`
|
||||
WHERE `zeitraum_id` IS NOT NULL
|
||||
AND `zeitraum_id` > 0;
|
||||
|
||||
INSERT INTO `impf_workflow_meta` (`meta_key`, `meta_value`)
|
||||
VALUES ('legacy_warteliste_zeitraeume_migrated', '1') AS `incoming`
|
||||
ON DUPLICATE KEY UPDATE `meta_value` = `incoming`.`meta_value`;
|
||||
END $$
|
||||
DELIMITER ;
|
||||
|
||||
CALL `migrate_warteliste_multi_zeitfenster_20260322`();
|
||||
DROP PROCEDURE IF EXISTS `migrate_warteliste_multi_zeitfenster_20260322`;
|
||||
@@ -0,0 +1,24 @@
|
||||
CREATE TABLE IF NOT EXISTS time_error_notification_state (
|
||||
employee_id INT NOT NULL,
|
||||
cycle_started_on DATE NOT NULL,
|
||||
first_error_date DATE NOT NULL,
|
||||
last_notification_stage VARCHAR(50) DEFAULT NULL,
|
||||
last_notification_sent_at DATETIME DEFAULT NULL,
|
||||
employee_day_1_sent_at DATETIME DEFAULT NULL,
|
||||
employee_day_3_sent_at DATETIME DEFAULT NULL,
|
||||
admin_day_7_sent_at DATETIME DEFAULT NULL,
|
||||
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (employee_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS time_error_notifications (
|
||||
id INT NOT NULL AUTO_INCREMENT,
|
||||
employee_id INT NOT NULL,
|
||||
cycle_started_on DATE NOT NULL,
|
||||
notification_stage VARCHAR(50) NOT NULL,
|
||||
recipient_email VARCHAR(255) NOT NULL,
|
||||
sent_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY uniq_time_error_notification (employee_id, cycle_started_on, notification_stage, recipient_email)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
@@ -63,7 +63,21 @@
|
||||
<?php else: ?>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="anfragen.php">Anfragen</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Anfragen <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="anfragen.php">Übersicht Anfragen</a></li>
|
||||
<li><a href="anfragen.php?aktion=1">Anfragen bearbeiten</a></li>
|
||||
<li><a href="anfragen.php?aktion=12">Formular-Auswertung</a></li>
|
||||
<li><a href="anfragen.php?aktion=18">Mailvorlagen anlegen</a></li>
|
||||
<li><a href="anfragen.php?aktion=16">Mailvorlagen anpassen</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="anfragen.php?aktion=4">Urlaub eintragen</a></li>
|
||||
<li><a href="anfragen.php?aktion=6">Notfallsprechstunde eintragen</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="http://ts03.fritz.box:8080/" target="_blank">Anrufbeantworter</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Impfungen <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
@@ -74,17 +88,18 @@
|
||||
<li><a href="impfworkflow_stammdaten.php">Stammdaten</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<!--<li><a href="togoadmin.php">togo-Impfung</a></li>-->
|
||||
<li><a href="http://ts03.fritz.box:8080/" target="_blank">Anrufbeantworter</a></li>
|
||||
|
||||
|
||||
<li><a href="../zeiterfassung">Zeiterfassung</a></li>
|
||||
<li><a href="webseitenadmin.php">Webseiteninhalt ändern</a></li>
|
||||
<li><a href="settings.php">Einstellungen</a></li>
|
||||
<li><a href="logout.php">Logout</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Verwaltung <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="../zeiterfassung">Zeiterfassung</a></li>
|
||||
<li><a href="webseitenadmin.php">Webseiteninhalt ändern</a></li>
|
||||
<li><a href="settings.php">Einstellungen</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="zeiterfassung_hilfe.php">Hilfe</a></li>
|
||||
<li><a href="logout.php">Logout</a></li>
|
||||
</ul>
|
||||
</div><!--/.navbar-collapse -->
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
+856
-856
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,3 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/impfworkflow_warteliste.php';
|
||||
|
||||
|
||||
|
||||
+182
-169
@@ -1,169 +1,182 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
// WICHTIG: Pfade aus /admin heraus korrekt auflösen
|
||||
require_once __DIR__ . "/../inc/config.inc.php";
|
||||
require_once __DIR__ . "/../inc/functions.inc.php";
|
||||
|
||||
// Login prüfen
|
||||
$user = check_admin_user();
|
||||
|
||||
include __DIR__ . "/templates/header.inc.php";
|
||||
|
||||
$user = check_admin_user();
|
||||
$internUserId = (int)$_SESSION['auth']['id'];
|
||||
|
||||
if (!$user) { echo "<div class='container main-container'><h3>Erst anmelden: <a href=login.php>Login</a></h3><br>";
|
||||
|
||||
include("templates/footer.inc.php");
|
||||
exit; }
|
||||
?>
|
||||
<script src="js/tinymce/tinymce.min.js" referrerpolicy="origin"></script>
|
||||
|
||||
<div class="container main-container">
|
||||
<?php
|
||||
|
||||
echo '<div style="float: right; width: 200px; ">';
|
||||
echo "<form action='" . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . "' 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>
|
||||
<input type="text" id="user_input" name="skill_input" width="48"/>';
|
||||
echo "</form>";
|
||||
echo '</div>';
|
||||
|
||||
?>
|
||||
<h2>Administration - webseiteninhalt anpassen</h2>
|
||||
|
||||
Hallo <?php echo htmlspecialchars($user['vorname'] ?? '', ENT_QUOTES, 'UTF-8'); ?>,<br>
|
||||
Herzlich Willkommen im internen Bereich!<br><br>
|
||||
|
||||
<?php
|
||||
|
||||
$aktion = $_POST["aktion"] ?? null;
|
||||
$subaktion = $_POST["subaktion"] ?? null;
|
||||
|
||||
if (!check_worker()) {
|
||||
echo "Dieser Bereich ist nur für Bearbeiter freigeschaltet!<br><br><br>";
|
||||
} else {
|
||||
|
||||
// =========================
|
||||
// EDIT-MODUS
|
||||
// =========================
|
||||
if ($aktion === "edit") {
|
||||
|
||||
// ------- Speichern -------
|
||||
if ($subaktion === "save") {
|
||||
|
||||
$inhaltid = (int)($_POST["inhaltid"] ?? 0);
|
||||
$inhalt = $_POST["inhalt"] ?? "";
|
||||
$webseitentitel = $_POST["webseitentitel"] ?? "";
|
||||
|
||||
try {
|
||||
$stmt = $pdo->prepare("
|
||||
UPDATE webseiteninhalt
|
||||
SET inhalt = :inhalt,
|
||||
webseitentitel = :webseitentitel
|
||||
WHERE inhaltid = :inhaltid
|
||||
");
|
||||
$stmt->execute([
|
||||
':inhalt' => $inhalt,
|
||||
':webseitentitel' => $webseitentitel,
|
||||
':inhaltid' => $inhaltid,
|
||||
]);
|
||||
|
||||
echo "<div class='infofenster'><h4>Speicherung der Vorlage erfolgreich!</h4></div>";
|
||||
} catch (Throwable $e) {
|
||||
echo "<div class='infofenster'><h4>Fehler bei der Speicherung der Vorlage!</h4></div>";
|
||||
// Optional debug:
|
||||
// echo "<pre>" . htmlspecialchars($e->getMessage(), ENT_QUOTES, 'UTF-8') . "</pre>";
|
||||
}
|
||||
}
|
||||
|
||||
// ------- Vorlage laden -------
|
||||
$inhaltid = (int)($_POST["inhaltid"] ?? 0);
|
||||
|
||||
try {
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT webseitentitel, inhalt
|
||||
FROM webseiteninhalt
|
||||
WHERE inhaltid = ?
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([$inhaltid]);
|
||||
$rowconfig = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!$rowconfig) {
|
||||
echo "<div class='infofenster'><h4>Vorlage nicht gefunden.</h4></div>";
|
||||
} else {
|
||||
$webseitentitel = $rowconfig["webseitentitel"] ?? "";
|
||||
$inhalt = $rowconfig["inhalt"] ?? "";
|
||||
|
||||
echo "<h1>Webseiteninhalt bearbeiten</h1><br>";
|
||||
echo "<h4>Vorlage: " . htmlspecialchars($webseitentitel, ENT_QUOTES, 'UTF-8') . "</h4>";
|
||||
echo "<br><br>";
|
||||
|
||||
echo "<form action='" . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . "' method='POST'>";
|
||||
echo "<input name='webseitentitel' type='hidden' value='" . htmlspecialchars($webseitentitel, ENT_QUOTES, 'UTF-8') . "'>";
|
||||
echo "<div id='my-editor'></div>";
|
||||
// Inhalt ist HTML -> bewusst NICHT escapen, sonst zerstörst du HTML im Editor
|
||||
echo "<textarea height='200' name='inhalt' id='trumbowyg-demo'>" . $inhalt . "</textarea>";
|
||||
echo "<input name='aktion' type='hidden' value='edit'>";
|
||||
echo "<input name='subaktion' type='hidden' value='save'>";
|
||||
echo "<input name='inhaltid' type='hidden' value='" . (int)$inhaltid . "'><br><br>";
|
||||
echo "<input type='submit' value='Speichern'><br>";
|
||||
echo "</form>";
|
||||
|
||||
echo "<br><br>";
|
||||
echo "<form action='" . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . "' method='POST'>";
|
||||
echo "<input type='submit' class='btn btn-primary btn-sm' value='zurück'>";
|
||||
echo "</form>";
|
||||
}
|
||||
|
||||
} catch (Throwable $e) {
|
||||
echo "<div class='infofenster'><h4>Fehler beim Laden der Vorlage.</h4></div>";
|
||||
// Optional debug:
|
||||
// echo "<pre>" . htmlspecialchars($e->getMessage(), ENT_QUOTES, 'UTF-8') . "</pre>";
|
||||
}
|
||||
|
||||
// =========================
|
||||
// LISTE (Auswahl)
|
||||
// =========================
|
||||
} else {
|
||||
|
||||
echo "<form action='" . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . "' method='POST'>";
|
||||
echo "Wählen Sie die zu bearbeitenden Webseiteninhalt aus:<br><br>";
|
||||
|
||||
try {
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT webseitentitel, inhaltid
|
||||
FROM webseiteninhalt
|
||||
ORDER BY webseitentitel
|
||||
");
|
||||
$stmt->execute();
|
||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
echo "<input name='aktion' type='hidden' value='edit'>";
|
||||
echo "<select name='inhaltid' class='form-control'>";
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$id = (int)$row["inhaltid"];
|
||||
$titel = (string)($row["webseitentitel"] ?? "");
|
||||
echo "<option value='" . $id . "'>" . htmlspecialchars($titel, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . "</option>";
|
||||
}
|
||||
|
||||
echo "</select><br><br>";
|
||||
echo "<input type='submit' value='Bearbeiten' class='btn btn-primary btn'><br><br><br>";
|
||||
echo "</form>";
|
||||
|
||||
} catch (Throwable $e) {
|
||||
echo "<div class='infofenster'><h4>Fehler beim Laden der Liste.</h4></div>";
|
||||
// Optional debug:
|
||||
// echo "<pre>" . htmlspecialchars($e->getMessage(), ENT_QUOTES, 'UTF-8') . "</pre>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include __DIR__ . "/templates/footer.inc.php";
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
// WICHTIG: Pfade aus /admin heraus korrekt auflösen
|
||||
require_once __DIR__ . "/../inc/config.inc.php";
|
||||
require_once __DIR__ . "/../inc/functions.inc.php";
|
||||
|
||||
// Login prüfen
|
||||
$user = check_admin_user();
|
||||
|
||||
include __DIR__ . "/templates/header.inc.php";
|
||||
|
||||
$user = check_admin_user();
|
||||
$internUserId = (int)$_SESSION['auth']['id'];
|
||||
|
||||
if (!$user) { echo "<div class='container main-container'><h3>Erst anmelden: <a href=login.php>Login</a></h3><br>";
|
||||
|
||||
include("templates/footer.inc.php");
|
||||
exit; }
|
||||
?>
|
||||
<script src="js/tinymce/tinymce.min.js" referrerpolicy="origin"></script>
|
||||
|
||||
<div class="container main-container">
|
||||
<?php
|
||||
|
||||
echo '<div style="float: right; width: 200px; ">';
|
||||
echo "<form action='" . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . "' 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>
|
||||
<input type="text" id="user_input" name="skill_input" width="48"/>';
|
||||
echo "</form>";
|
||||
echo '</div>';
|
||||
|
||||
?>
|
||||
<h2>Administration - webseiteninhalt anpassen</h2>
|
||||
|
||||
Hallo <?php echo htmlspecialchars($user['vorname'] ?? '', ENT_QUOTES, 'UTF-8'); ?>,<br>
|
||||
Herzlich Willkommen im internen Bereich!<br><br>
|
||||
|
||||
<?php
|
||||
|
||||
$aktion = $_POST["aktion"] ?? null;
|
||||
$subaktion = $_POST["subaktion"] ?? null;
|
||||
|
||||
if (!check_worker()) {
|
||||
echo "Dieser Bereich ist nur für Bearbeiter freigeschaltet!<br><br><br>";
|
||||
} else {
|
||||
|
||||
// =========================
|
||||
// EDIT-MODUS
|
||||
// =========================
|
||||
if ($aktion === "edit") {
|
||||
|
||||
// ------- Speichern -------
|
||||
if ($subaktion === "save") {
|
||||
|
||||
$inhaltid = (int)($_POST["inhaltid"] ?? 0);
|
||||
$inhalt = $_POST["inhalt"] ?? "";
|
||||
$webseitentitel = $_POST["webseitentitel"] ?? "";
|
||||
$beschreibung = $_POST["beschreibung"] ?? "";
|
||||
$url = $_POST["url"] ?? "";
|
||||
|
||||
try {
|
||||
$stmt = $pdo->prepare("
|
||||
UPDATE webseiteninhalt
|
||||
SET inhalt = :inhalt,
|
||||
webseitentitel = :webseitentitel,
|
||||
beschreibung = :beschreibung,
|
||||
url = :url
|
||||
WHERE inhaltid = :inhaltid
|
||||
");
|
||||
$stmt->execute([
|
||||
':inhalt' => $inhalt,
|
||||
':webseitentitel' => $webseitentitel,
|
||||
':beschreibung' => $beschreibung,
|
||||
':url' => $url,
|
||||
':inhaltid' => $inhaltid,
|
||||
]);
|
||||
|
||||
echo "<div class='infofenster'><h4>Speicherung der Vorlage erfolgreich!</h4></div>";
|
||||
} catch (Throwable $e) {
|
||||
echo "<div class='infofenster'><h4>Fehler bei der Speicherung der Vorlage!</h4></div>";
|
||||
// Optional debug:
|
||||
// echo "<pre>" . htmlspecialchars($e->getMessage(), ENT_QUOTES, 'UTF-8') . "</pre>";
|
||||
}
|
||||
}
|
||||
|
||||
// ------- Vorlage laden -------
|
||||
$inhaltid = (int)($_POST["inhaltid"] ?? 0);
|
||||
|
||||
try {
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT webseitentitel, inhalt, beschreibung, url
|
||||
FROM webseiteninhalt
|
||||
WHERE inhaltid = ?
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([$inhaltid]);
|
||||
$rowconfig = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!$rowconfig) {
|
||||
echo "<div class='infofenster'><h4>Vorlage nicht gefunden.</h4></div>";
|
||||
} else {
|
||||
$webseitentitel = $rowconfig["webseitentitel"] ?? "";
|
||||
$inhalt = $rowconfig["inhalt"] ?? "";
|
||||
$beschreibung = $rowconfig["beschreibung"] ?? "";
|
||||
$url = $rowconfig["url"] ?? "";
|
||||
|
||||
echo "<h1>Webseiteninhalt bearbeiten</h1><br>";
|
||||
echo "<h4>Vorlage: " . htmlspecialchars($webseitentitel, ENT_QUOTES, 'UTF-8') . "</h4>";
|
||||
echo "<br><br>";
|
||||
|
||||
echo "<form action='" . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . "' method='POST'>";
|
||||
echo "<label>Titel</label><br>";
|
||||
echo "<input name='webseitentitel' type='text' class='form-control' value='" . htmlspecialchars($webseitentitel, ENT_QUOTES, 'UTF-8') . "'><br><br>";
|
||||
echo "<label>Beschreibung</label><br>";
|
||||
echo "<input name='beschreibung' type='text' class='form-control' value='" . htmlspecialchars($beschreibung, ENT_QUOTES, 'UTF-8') . "'><br><br>";
|
||||
echo "<label>URL / Hinweis</label><br>";
|
||||
echo "<input name='url' type='text' class='form-control' value='" . htmlspecialchars($url, ENT_QUOTES, 'UTF-8') . "'><br><br>";
|
||||
echo "<div id='my-editor'></div>";
|
||||
// Inhalt ist HTML -> bewusst NICHT escapen, sonst zerstörst du HTML im Editor
|
||||
echo "<textarea height='200' name='inhalt' id='trumbowyg-demo'>" . $inhalt . "</textarea>";
|
||||
echo "<input name='aktion' type='hidden' value='edit'>";
|
||||
echo "<input name='subaktion' type='hidden' value='save'>";
|
||||
echo "<input name='inhaltid' type='hidden' value='" . (int)$inhaltid . "'><br><br>";
|
||||
echo "<input type='submit' value='Speichern'><br>";
|
||||
echo "</form>";
|
||||
|
||||
echo "<br><br>";
|
||||
echo "<form action='" . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . "' method='POST'>";
|
||||
echo "<input type='submit' class='btn btn-primary btn-sm' value='zurück'>";
|
||||
echo "</form>";
|
||||
}
|
||||
|
||||
} catch (Throwable $e) {
|
||||
echo "<div class='infofenster'><h4>Fehler beim Laden der Vorlage.</h4></div>";
|
||||
// Optional debug:
|
||||
// echo "<pre>" . htmlspecialchars($e->getMessage(), ENT_QUOTES, 'UTF-8') . "</pre>";
|
||||
}
|
||||
|
||||
// =========================
|
||||
// LISTE (Auswahl)
|
||||
// =========================
|
||||
} else {
|
||||
|
||||
echo "<form action='" . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . "' method='POST'>";
|
||||
echo "Wählen Sie die zu bearbeitenden Webseiteninhalt aus:<br><br>";
|
||||
|
||||
try {
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT webseitentitel, inhaltid
|
||||
FROM webseiteninhalt
|
||||
ORDER BY webseitentitel
|
||||
");
|
||||
$stmt->execute();
|
||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
echo "<input name='aktion' type='hidden' value='edit'>";
|
||||
echo "<select name='inhaltid' class='form-control'>";
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$id = (int)$row["inhaltid"];
|
||||
$titel = (string)($row["webseitentitel"] ?? "");
|
||||
echo "<option value='" . $id . "'>" . htmlspecialchars($titel, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . "</option>";
|
||||
}
|
||||
|
||||
echo "</select><br><br>";
|
||||
echo "<input type='submit' value='Bearbeiten' class='btn btn-primary btn'><br><br><br>";
|
||||
echo "</form>";
|
||||
|
||||
} catch (Throwable $e) {
|
||||
echo "<div class='infofenster'><h4>Fehler beim Laden der Liste.</h4></div>";
|
||||
// Optional debug:
|
||||
// echo "<pre>" . htmlspecialchars($e->getMessage(), ENT_QUOTES, 'UTF-8') . "</pre>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include __DIR__ . "/templates/footer.inc.php";
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
require_once __DIR__ . "/../inc/config.inc.php";
|
||||
require_once __DIR__ . "/../inc/functions.inc.php";
|
||||
|
||||
$user = check_admin_user();
|
||||
|
||||
include __DIR__ . "/templates/header.inc.php";
|
||||
|
||||
if (!$user) {
|
||||
echo "<div class='container main-container'><h3>Erst anmelden: <a href='login.php'>Login</a></h3><br>";
|
||||
include __DIR__ . "/templates/footer.inc.php";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container main-container">
|
||||
<div class="page-header">
|
||||
<h2>FAQ und Anleitung: Admin + Zeiterfassung</h2>
|
||||
<p>Diese Seite dient als Nachschlagewerk für die tägliche Arbeit in der Administration und in der Zeiterfassung.</p>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-info">
|
||||
<strong>Kurzüberblick:</strong> Die Administration steuert Anfragen, Inhalte, Einstellungen und Sonderbereiche. Die Zeiterfassung steuert Stempelungen, Korrekturen, Abwesenheiten, Fehlbuchungen, PDF-Ausgaben und Benachrichtigungen.
|
||||
</div>
|
||||
|
||||
<h3>1. Administration</h3>
|
||||
|
||||
<h4>Anfragen</h4>
|
||||
<p>Im Bereich <strong>Anfragen</strong> werden eingehende Formularanfragen bearbeitet, gefiltert und beantwortet. Dort lassen sich offene, letzte oder alle Anfragen anzeigen und in den Bearbeitungsstatus überführen.</p>
|
||||
|
||||
<h4>Mailvorlagen</h4>
|
||||
<p>Mailvorlagen werden genutzt, um wiederkehrende Antworten und Abläufe einheitlich zu versenden. Änderungen an Vorlagen wirken sich auf spätere Nachrichten aus, daher sollten Texte dort zentral gepflegt werden.</p>
|
||||
|
||||
<h4>Formular-Auswertung</h4>
|
||||
<p>Die Formular-Auswertung dient dazu, Anfragen strukturiert auszuwerten. Das ist vor allem hilfreich, wenn Mengen, Anfragearten oder Bearbeitungsstände geprüft werden sollen.</p>
|
||||
|
||||
<h4>Impfverwaltung</h4>
|
||||
<p>Unter <strong>Impfungen</strong> werden Wartelisten, Teilnehmer, Impfevents und Stammdaten verwaltet. Dieser Bereich ist unabhängig von der Zeiterfassung, gehört aber zur Admin-Oberfläche.</p>
|
||||
|
||||
<h4>Webseiteninhalte ändern</h4>
|
||||
<p>Über <strong>Webseiteninhalt ändern</strong> werden Texte und Inhalte der öffentlichen Webseite gepflegt. Änderungen dort betreffen direkt die Darstellung der Praxis-Webseite.</p>
|
||||
|
||||
<h4>Einstellungen</h4>
|
||||
<p>Im Bereich <strong>Einstellungen</strong> werden zentrale Konfigurationen gepflegt, zum Beispiel Benachrichtigungsadressen und technische Grundeinstellungen. Änderungen dort sollten bewusst vorgenommen werden.</p>
|
||||
|
||||
<h4>Zeiterfassung aus der Admin-Oberfläche</h4>
|
||||
<p>Die Zeiterfassung ist aus dem Admin-Menü direkt erreichbar. Dort wechseln Administratoren in den operativen Bereich für Zeiten, Fehlbuchungen, Abwesenheiten und Mitarbeiterverwaltung.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>2. Zeiterfassung: Funktionen für Mitarbeiter</h3>
|
||||
|
||||
<h4>Startseite / Stempeln</h4>
|
||||
<p>Auf der Startseite der Zeiterfassung wird gestempelt. Das System setzt automatisch abwechselnd <strong>KOMMEN</strong> und <strong>GEHEN</strong>. Zusätzlich wird dort angezeigt, ob aktuell ein Buchungsproblem vorhanden ist.</p>
|
||||
|
||||
<h4>Zeitübersicht</h4>
|
||||
<p>In der <strong>Zeitübersicht</strong> können die eigenen Buchungen für einen Monat kontrolliert werden. Dort lassen sich auch Tagesansichten aufrufen und bei Bedarf manuell anpassen.</p>
|
||||
|
||||
<h4>Fehlbuchungen</h4>
|
||||
<p>Der Bereich <strong>Fehlbuchungen</strong> zeigt unvollständige oder fehlerhafte KOMMEN/GEHEN-Folgen an. Mitarbeiter sehen dort ihre eigenen problematischen Tage und können diese korrigieren.</p>
|
||||
|
||||
<h4>Abwesenheitsantrag</h4>
|
||||
<p>Über <strong>Abwesenheitsantrag</strong> werden Urlaube und weitere Abwesenheitsgründe eingereicht. Der Antrag wird anschließend über die Genehmigungsfunktionen der Admins geprüft.</p>
|
||||
|
||||
<h4>Mein Abwesenheitskalender</h4>
|
||||
<p>Im eigenen Kalender sind die persönlichen Abwesenheiten sichtbar. So kann jeder Mitarbeiter seine eigenen Anträge und genehmigten Zeiten prüfen.</p>
|
||||
|
||||
<h4>Team-Urlaubskalender</h4>
|
||||
<p>Der Team-Kalender zeigt genehmigte Urlaubseinträge des Teams sowie Betriebsurlaub. Damit lassen sich Überschneidungen und Abwesenheiten leichter erkennen.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>3. Zeiterfassung: Funktionen für Admins</h3>
|
||||
|
||||
<h4>Alle Zeitbuchungen</h4>
|
||||
<p>Unter <strong>Alle Zeitbuchungen</strong> kann für jeden Mitarbeiter ein Monat ausgewählt und angezeigt werden. Zusätzlich lassen sich Einzel-PDFs und eine Sammel-PDF für alle Mitarbeiter eines Monats erzeugen.</p>
|
||||
|
||||
<h4>PDF-Ausgaben</h4>
|
||||
<p>Die Einzel-PDF erstellt die Monatsübersicht eines einzelnen Mitarbeiters. Die Sammel-PDF enthält alle Mitarbeiter mit Buchungen im gewählten Monat. Mitarbeiter ohne Buchung im Monat werden dabei nicht ausgegeben.</p>
|
||||
|
||||
<h4>Alle Fehlbuchungen</h4>
|
||||
<p>Unter <strong>Alle Fehlbuchungen</strong> werden fehlerhafte Tage aller Mitarbeiter angezeigt. Von dort aus können Admins einzelne Tage manuell bearbeiten oder automatische Schließungen für einen Mitarbeiter durchführen.</p>
|
||||
|
||||
<h4>Fehlbuchungen automatisch schließen</h4>
|
||||
<p>Admins können für einen Mitarbeiter alle automatisch schließbaren Fehlbuchungen mit einer Stundenanzahl ergänzen. Beispiel: Fehlt das <strong>GEHEN</strong>, wird es um die angegebene Anzahl Stunden nach dem letzten <strong>KOMMEN</strong> eingetragen.</p>
|
||||
|
||||
<h4>Mitarbeiterverwaltung</h4>
|
||||
<p>In der Mitarbeiterverwaltung werden Mitarbeiter angelegt und gepflegt. Dort werden unter anderem E-Mail, Rollen, Zeiterfassungsberechtigung, Admin-Status und Kartenzuordnungen verwaltet.</p>
|
||||
|
||||
<h4>Abwesenheitsübersicht</h4>
|
||||
<p>Die Abwesenheitsübersicht dient zur Kontrolle aller Abwesenheitseinträge. Dort werden pro Mitarbeiter die Urlaubstage für den Anspruch sowie die übrigen Abwesenheitsgründe je Jahr zusammengefasst.</p>
|
||||
|
||||
<h4>Abwesenheiten genehmigen</h4>
|
||||
<p>Im Bereich <strong>Abwesenheiten genehmigen</strong> prüfen Admins eingereichte Abwesenheiten und können diese annehmen oder ablehnen.</p>
|
||||
|
||||
<h4>Leitungskalender</h4>
|
||||
<p>Der Leitungskalender zeigt alle Abwesenheitstermine über alle Personen hinweg. Damit lassen sich Urlaub, Krankheit, Weiterbildung und weitere Gründe zentral koordinieren.</p>
|
||||
|
||||
<h4>Betriebsurlaub</h4>
|
||||
<p>Unter <strong>Betriebsurlaub</strong> werden zentrale Schließzeiten der Praxis gepflegt. Diese Einträge erscheinen im Urlaubskontext und können mit Vertreterinformationen hinterlegt werden.</p>
|
||||
|
||||
<h4>Benachrichtigungen bei Zeitfehlern</h4>
|
||||
<p>Für offene Zeitfehler existiert eine gestaffelte Benachrichtigungslogik. Mitarbeiter werden erinnert, und bei länger offenen Fehlern erfolgt später eine Eskalation an Admins. Die E-Mails enthalten einen Direktlink zur Zeiterfassung.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>4. Typische Fragen von Mitarbeitern</h3>
|
||||
|
||||
<h4>Ich habe vergessen zu stempeln. Was soll ich tun?</h4>
|
||||
<p>Bitte in der Zeiterfassung den Bereich <strong>Fehlbuchungen</strong> oder die <strong>Zeitübersicht</strong> öffnen und den betroffenen Tag korrigieren. Falls das nicht möglich ist, bitte einen Admin informieren.</p>
|
||||
|
||||
<h4>Warum wird mir ein Buchungsfehler angezeigt?</h4>
|
||||
<p>Ein Fehler entsteht, wenn die Reihenfolge der Buchungen nicht stimmt, zum Beispiel zwei <strong>KOMMEN</strong> hintereinander oder wenn ein <strong>GEHEN</strong> fehlt.</p>
|
||||
|
||||
<h4>Bekomme ich Erinnerungen bei offenen Fehlern?</h4>
|
||||
<p>Ja. Offene Zeitfehler können Erinnerungen auslösen. Bleiben Fehler bestehen, werden sie nach dem vorgesehenen Ablauf weiter eskaliert.</p>
|
||||
|
||||
<h4>Kann ich meine Zeiten selbst ändern?</h4>
|
||||
<p>Eigene fehlerhafte Tage können in der Zeiterfassung angepasst werden. Größere Korrekturen oder Sammelkorrekturen werden durch Admins vorgenommen.</p>
|
||||
|
||||
<h4>Wo sehe ich meinen Urlaub?</h4>
|
||||
<p>Im Bereich <strong>Mein Abwesenheitskalender</strong>. Dort sind die eigenen Abwesenheitszeiträume sichtbar.</p>
|
||||
|
||||
<h4>Wo sehe ich, wann Kollegen im Urlaub sind?</h4>
|
||||
<p>Im <strong>Team-Urlaubskalender</strong>. Dort werden freigegebene Urlaube und Betriebsurlaub angezeigt.</p>
|
||||
|
||||
<h4>Was bedeutet Betriebsurlaub?</h4>
|
||||
<p>Betriebsurlaub sind zentrale Schließzeiten der Praxis. Diese werden administrativ gepflegt und im Abwesenheitskalender sichtbar gemacht.</p>
|
||||
|
||||
<h4>An wen wende ich mich bei falschen Zeiten, wenn ich sie nicht selbst korrigieren kann?</h4>
|
||||
<p>Dann sollte ein Admin oder Vorgesetzter informiert werden. Admins können einzelne Tage bearbeiten oder automatisch fehlende Ausstempelungen ergänzen.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>5. Typische Fragen von Admins</h3>
|
||||
|
||||
<h4>Wie finde ich schnell offene Zeitprobleme?</h4>
|
||||
<p>Über <strong>Alle Fehlbuchungen</strong> in der Zeiterfassung. Dort sind alle problematischen Tage je Mitarbeiter sichtbar.</p>
|
||||
|
||||
<h4>Wie schließe ich mehrere ähnliche Fehlbuchungen auf einmal?</h4>
|
||||
<p>In <strong>Alle Fehlbuchungen</strong> kann für einen Mitarbeiter eine Stundenanzahl eingetragen werden, um automatisch fehlende <strong>GEHEN</strong>-Buchungen zu ergänzen, wenn der letzte Eintrag des Tages ein <strong>KOMMEN</strong> ist.</p>
|
||||
|
||||
<h4>Wie erstelle ich Monatsnachweise für mehrere Mitarbeiter?</h4>
|
||||
<p>Über <strong>Alle Zeitbuchungen</strong> und dann die Sammel-PDF für den gewünschten Monat. So werden alle Mitarbeiter mit Buchungen in einem Dokument zusammengefasst.</p>
|
||||
|
||||
<h4>Warum erscheint ein Mitarbeiter nicht in der Sammel-PDF?</h4>
|
||||
<p>Mitarbeiter ohne Buchung im ausgewählten Monat werden in der Gesamt-PDF nicht aufgenommen.</p>
|
||||
|
||||
<h4>Was tun, wenn die PDF für einen Mitarbeiter nicht erzeugt wird?</h4>
|
||||
<p>Dann liegen im gewählten Monat meist noch offene Zeitfehler vor. Diese müssen zuerst bereinigt werden.</p>
|
||||
|
||||
<h4>Wo pflege ich Vertreterdaten beim Betriebsurlaub?</h4>
|
||||
<p>Im Bereich <strong>Betriebsurlaub</strong>. Dort werden Beschreibung, Vertretung, Telefonnummer, Adresse und URL gepflegt.</p>
|
||||
|
||||
<h4>Welche Abwesenheiten zählen auf den Urlaubsanspruch?</h4>
|
||||
<p>Nur <strong>Urlaub</strong> zählt auf den Urlaubsanspruch. Krankheit, Berufsschule, Weiterbildung, persönliche Gründe und Sonstiges werden separat ausgewertet.</p>
|
||||
|
||||
<h4>Wo finde ich den schnellsten Rückweg zwischen Admin und Zeiterfassung?</h4>
|
||||
<p>Es gibt direkte Menüeinträge zwischen beiden Bereichen. In der Zeiterfassung führt <strong>Zur Admin-Oberfläche</strong> zurück in die Verwaltung.</p>
|
||||
|
||||
<div class="alert alert-success" style="margin-top:30px;">
|
||||
<strong>Hinweis:</strong> Diese Seite ist als lebendes Handbuch gedacht. Wenn neue Funktionen in Admin oder Zeiterfassung hinzukommen, sollte diese Hilfeseite mit aktualisiert werden.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include __DIR__ . "/templates/footer.inc.php"; ?>
|
||||
+335
-335
@@ -1,336 +1,336 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Anfragenbestätigung</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<?php
|
||||
echo showHeaderpraxis();
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<section class="box special">
|
||||
<h2>Anfrage einsehen</h2>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
|
||||
$id = $_POST["id"] ?? ($_GET["id"] ?? null);
|
||||
|
||||
if (!$id) {
|
||||
echo "<h4>Leider konnten wir Ihre Anforderung nicht verarbeiten.</h4><br>Bitte überprüfen Sie den aufgerufenden Link.<br><br>";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Anfrage + Person laden (NEUES SCHEMA)
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT
|
||||
a.anfrageid,
|
||||
a.checked,
|
||||
a.nachricht,
|
||||
a.medikament1,
|
||||
a.medikament2,
|
||||
a.anforderungart,
|
||||
a.ordnungsid,
|
||||
p.vorname,
|
||||
p.nachname,
|
||||
p.email,
|
||||
p.tele,
|
||||
p.geburtstag
|
||||
FROM anfragen a
|
||||
INNER JOIN persons p ON a.requester_person_id = p.person_id
|
||||
WHERE a.hash = ?
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([$id]);
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!$row) {
|
||||
echo "<h4>Leider konnten wir Ihre Anforderung nicht verarbeiten.</h4><br>Bitte überprüfen Sie den aufgerufenden Link.<br><br>";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Variablen aus DB
|
||||
$anfrageid = (int)$row["anfrageid"];
|
||||
$checked = (int)$row["checked"];
|
||||
|
||||
$vorname = $row["vorname"] ?? "";
|
||||
$nachname = $row["nachname"] ?? "";
|
||||
$mail = $row["email"] ?? "";
|
||||
$tel = $row["tele"] ?? "";
|
||||
$geburtstag = $row["geburtstag"] ?? null;
|
||||
|
||||
$userausgabe = trim($vorname . " " . $nachname);
|
||||
|
||||
$nachricht = $row["nachricht"] ?? "";
|
||||
$medikamenteins = $row["medikament1"] ?? "";
|
||||
$medikamentzwei = $row["medikament2"] ?? "";
|
||||
|
||||
$anforderungart = $row["anforderungart"] ?? null;
|
||||
$ordnungsid = $row["ordnungsid"] ?? null;
|
||||
|
||||
// Ordnungsstring wie bisher (deine Funktion)
|
||||
$ordnungsstring = GetOrdnungsid($ordnungsid);
|
||||
|
||||
// Rezeptart-Name holen
|
||||
$rezeptart = null;
|
||||
if (!empty($anforderungart)) {
|
||||
$stmtArt = $pdo->prepare("SELECT artname FROM anfrageart WHERE artid = ? LIMIT 1");
|
||||
$stmtArt->execute([$anforderungart]);
|
||||
$rezeptart = $stmtArt->fetchColumn() ?: null;
|
||||
}
|
||||
|
||||
// Ausgabe sicher escapen
|
||||
$e = fn($s) => htmlspecialchars((string)$s, ENT_QUOTES, 'UTF-8');
|
||||
|
||||
if ($checked === 0) {
|
||||
|
||||
echo "<h4>Sie haben Ihre Anfrage aktuell noch nicht bestätigt!<br><br>";
|
||||
echo "Sie haben die folgenden Anfragedaten:<br><br>";
|
||||
echo "<h4>Name: " . $e($userausgabe) . "</h4>";
|
||||
echo "<h4>Art: " . $e($ordnungsstring) . " - " . $e($rezeptart) . "</h4>";
|
||||
|
||||
if (!empty($medikamenteins)) {
|
||||
echo "<h4>Medikament1: " . $e($medikamenteins) . "</h4>";
|
||||
}
|
||||
if (!empty($medikamentzwei)) {
|
||||
echo "<h4>Medikament2: " . $e($medikamentzwei) . "</h4>";
|
||||
}
|
||||
if (!empty($nachricht)) {
|
||||
echo "<h4>Nachricht: " . nl2br(strip_tags($nachricht, '<br><b><strong><i><u><p><ul><li>')) . "</h4>";
|
||||
}
|
||||
|
||||
echo "<form action='" . $e($_SERVER['PHP_SELF']) . "' method='POST'>";
|
||||
echo '<input type="hidden" name="anfrageid" value="' . $e($anfrageid) . '" />';
|
||||
echo '<input type="hidden" name="aktion" value="2" />';
|
||||
echo '<input type="submit" id="submitbox" value="Anfrage bestätigen!" />';
|
||||
echo "</form>";
|
||||
|
||||
echo "<form action='" . $e($_SERVER['PHP_SELF']) . "' method='POST'>";
|
||||
echo '<input type="hidden" name="aktion" value="1" />';
|
||||
echo '<input type="hidden" name="anfrageid" value="' . $e($anfrageid) . '" />';
|
||||
echo '<input type="submit" id="submitbox" value="Anfrage löschen!" />';
|
||||
echo "</form>";
|
||||
|
||||
} elseif ($checked === 1) {
|
||||
|
||||
echo "<h4>Sie haben Ihre Anforderung bestätigt!<br><b>Vielen Dank!</b><br>";
|
||||
echo "Sie haben die folgenden Anfragedaten:<br><br>";
|
||||
echo "<h4>Name: " . $e($userausgabe) . "</h4>";
|
||||
echo "<h4>Art: " . $e($rezeptart) . "</h4>";
|
||||
|
||||
if (!empty($medikamenteins)) {
|
||||
echo "<h4>Medikament1: " . $e($medikamenteins) . "</h4>";
|
||||
}
|
||||
if (!empty($medikamentzwei)) {
|
||||
echo "<h4>Medikament2: " . $e($medikamentzwei) . "</h4>";
|
||||
}
|
||||
if (!empty($nachricht)) {
|
||||
echo "<h4>Nachricht: " . nl2br(strip_tags($nachricht, '<br><b><strong><i><u><p><ul><li>')) . "</h4>";
|
||||
}
|
||||
|
||||
echo "Hat sich Ihre Anfrage erledigt, tragen Sie sich bitte aus, Ihre Anfrage wird gelöscht:<br>";
|
||||
echo "<form action='" . $e($_SERVER['PHP_SELF']) . "' method='POST'>";
|
||||
echo '<input type="hidden" name="aktion" value="1" />';
|
||||
echo '<input type="hidden" name="anfrageid" value="' . $e($anfrageid) . '" />';
|
||||
echo '<input type="submit" id="submitbox" value="Anfrage absagen!" />';
|
||||
echo "</form>";
|
||||
|
||||
} elseif ($checked === 2) {
|
||||
|
||||
echo "<h4>Ihre Anfrage wurde erfolgreich gelöscht!</h4><br>Wünschen Sie eine neue Anfrage, tragen Sie sich wieder über das Formular ein.<br>";
|
||||
|
||||
} elseif ($checked === 3) {
|
||||
|
||||
echo "<h4>Ihre Anfrage wurde vom Praxisteam storniert!</h4><br>Wünschen Sie eine neue Anfrage, tragen Sie sich wieder über das Formular ein.<br>";
|
||||
|
||||
} elseif ($checked === 10) {
|
||||
|
||||
echo "<h4>Ihre Anfrage wurde vom Praxisteam beantwortet!</h4><br>Prüfen Sie Ihre E-Mails auf die Antwort.<br>";
|
||||
|
||||
} else {
|
||||
echo "<h4>Status unbekannt.</h4>";
|
||||
}
|
||||
|
||||
|
||||
}else if($_POST["aktion"] == 1){
|
||||
echo "Wollen Sie wirklich Ihren Anfrage löschen?<br>Dieses ist nicht rückgängig zu machen!<br>Dann bestätigen Sie die Abmeldung:<br>";
|
||||
echo "Bitte bestätigen!";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="3" />';
|
||||
echo '<input type="hidden" name="anfrageid" id="anfrageid" value="'. $_POST["anfrageid"] .'" /><br>';
|
||||
echo '<input type="submit" id="submitbox" value="Anfrage löschen!" />';
|
||||
echo "</form>";
|
||||
|
||||
|
||||
}else if($_POST["aktion"] == 2){
|
||||
|
||||
$anfrageid = (int)($_POST["anfrageid"] ?? 0);
|
||||
if ($anfrageid <= 0) {
|
||||
die("<h4>Ungültige Anfrage-ID.</h4>");
|
||||
}
|
||||
|
||||
// 1) Prüfen/Updaten in einem Schritt: nur bestätigen, wenn noch nicht bestätigt
|
||||
$stmt = $pdo->prepare("
|
||||
UPDATE anfragen
|
||||
SET checked = 1
|
||||
WHERE anfrageid = ?
|
||||
AND checked < 1
|
||||
");
|
||||
$stmt->execute([$anfrageid]);
|
||||
|
||||
if ($stmt->rowCount() === 0) {
|
||||
// Es wurde nichts geändert -> war schon bestätigt oder existiert nicht
|
||||
// Optional: prüfen ob Anfrage existiert
|
||||
$stmt = $pdo->prepare("SELECT checked FROM anfragen WHERE anfrageid = ? LIMIT 1");
|
||||
$stmt->execute([$anfrageid]);
|
||||
$checked = $stmt->fetchColumn();
|
||||
|
||||
if ($checked === false) {
|
||||
echo "<h4>Anfrage nicht gefunden.</h4>";
|
||||
} else {
|
||||
echo "<h4>Sie haben Ihre Anfrage schon bestätigt.</h4>";
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
echo "<h4>Ihre Anfrage wurde erfolgreich bestätigt!</h4><br>";
|
||||
|
||||
|
||||
// 2) Anfrage + Person laden (NEUES SCHEMA)
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT
|
||||
ordnungsid
|
||||
FROM anfragen a
|
||||
WHERE anfrageid = ?
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([$anfrageid]);
|
||||
$ordnungsid = $stmt->fetchColumn();
|
||||
echo "Sie erhalten gleich eine schriftliche Bestätigung per E-Mail<br><br>";
|
||||
if (!$row) {
|
||||
echo "<h4>Fehler: Anfrage wurde bestätigt, aber konnte nicht geladen werden.</h4>";
|
||||
exit;
|
||||
}
|
||||
|
||||
$ordnungsid = $row["ordnungsid"] ?? null;
|
||||
|
||||
if($ordnungsid == 1){
|
||||
// Anfragen allgemein Bestätigung
|
||||
SendMailMessageVorlage($pdo, "3", $anfrageid, "19");
|
||||
}else if($ordnungsid == 2 || $ordnungsid == 3){
|
||||
// Anfragen Rezept Bestätigung
|
||||
SendMailMessageVorlage($pdo, "3", $anfrageid, "26");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else if($_POST["aktion"] == 3){
|
||||
$anfrageid = (int)($_POST["anfrageid"] ?? 0);
|
||||
if ($anfrageid <= 0) {
|
||||
die("<h4>Ungültige Anfrage-ID.</h4>");
|
||||
}
|
||||
|
||||
/*
|
||||
1) Anfrage auf "gelöscht" setzen,
|
||||
aber nur wenn noch nicht gelöscht (checked < 2)
|
||||
*/
|
||||
$stmt = $pdo->prepare("
|
||||
UPDATE anfragen
|
||||
SET checked = 2
|
||||
WHERE anfrageid = ?
|
||||
AND checked < 2
|
||||
");
|
||||
$stmt->execute([$anfrageid]);
|
||||
|
||||
if ($stmt->rowCount() === 0) {
|
||||
// Entweder existiert nicht oder war schon gelöscht
|
||||
$stmt = $pdo->prepare("SELECT checked FROM anfragen WHERE anfrageid = ? LIMIT 1");
|
||||
$stmt->execute([$anfrageid]);
|
||||
$checked = $stmt->fetchColumn();
|
||||
|
||||
if ($checked === false) {
|
||||
echo "<h4>Anfrage nicht gefunden.</h4>";
|
||||
} else {
|
||||
echo "<h4>Sie haben Ihre Anfrage schon gelöscht.</h4>";
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
echo "<h4>Ihre Anfrage wurde erfolgreich gelöscht!</h4><br>";
|
||||
echo "Sie erhalten gleich eine schriftliche Bestätigung per E-Mail<br>";
|
||||
|
||||
SendMailMessageVorlage($pdo, "3", $anfrageid, "49");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
echo "Leider konnten wir Ihre ID-Nummer nicht erkennen.<br>Bitte tragen Sie diese in dem folgendem Feld ein und klicken Sie auf 'Senden'<br><br>";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="text" name="id" id="id" value="" placeholder="ID Kennung aus der E-Mail" required /><br>';
|
||||
echo '<input type="submit" id="submitbox" value="Senden" />';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Anfragenbestätigung</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<?php
|
||||
echo showHeaderpraxis();
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<section class="box special">
|
||||
<h2>Anfrage einsehen</h2>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
|
||||
$id = $_POST["id"] ?? ($_GET["id"] ?? null);
|
||||
|
||||
if (!$id) {
|
||||
echo "<h4>Leider konnten wir Ihre Anforderung nicht verarbeiten.</h4><br>Bitte überprüfen Sie den aufgerufenden Link.<br><br>";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Anfrage + Person laden (NEUES SCHEMA)
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT
|
||||
a.anfrageid,
|
||||
a.checked,
|
||||
a.nachricht,
|
||||
a.medikament1,
|
||||
a.medikament2,
|
||||
a.anforderungart,
|
||||
a.ordnungsid,
|
||||
p.vorname,
|
||||
p.nachname,
|
||||
p.email,
|
||||
p.tele,
|
||||
p.geburtstag
|
||||
FROM anfragen a
|
||||
INNER JOIN persons p ON a.requester_person_id = p.person_id
|
||||
WHERE a.hash = ?
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([$id]);
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!$row) {
|
||||
echo "<h4>Leider konnten wir Ihre Anforderung nicht verarbeiten.</h4><br>Bitte überprüfen Sie den aufgerufenden Link.<br><br>";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Variablen aus DB
|
||||
$anfrageid = (int)$row["anfrageid"];
|
||||
$checked = (int)$row["checked"];
|
||||
|
||||
$vorname = $row["vorname"] ?? "";
|
||||
$nachname = $row["nachname"] ?? "";
|
||||
$mail = $row["email"] ?? "";
|
||||
$tel = $row["tele"] ?? "";
|
||||
$geburtstag = $row["geburtstag"] ?? null;
|
||||
|
||||
$userausgabe = trim($vorname . " " . $nachname);
|
||||
|
||||
$nachricht = $row["nachricht"] ?? "";
|
||||
$medikamenteins = $row["medikament1"] ?? "";
|
||||
$medikamentzwei = $row["medikament2"] ?? "";
|
||||
|
||||
$anforderungart = $row["anforderungart"] ?? null;
|
||||
$ordnungsid = $row["ordnungsid"] ?? null;
|
||||
|
||||
// Ordnungsstring wie bisher (deine Funktion)
|
||||
$ordnungsstring = GetOrdnungsid($ordnungsid);
|
||||
|
||||
// Rezeptart-Name holen
|
||||
$rezeptart = null;
|
||||
if (!empty($anforderungart)) {
|
||||
$stmtArt = $pdo->prepare("SELECT artname FROM anfrageart WHERE artid = ? LIMIT 1");
|
||||
$stmtArt->execute([$anforderungart]);
|
||||
$rezeptart = $stmtArt->fetchColumn() ?: null;
|
||||
}
|
||||
|
||||
// Ausgabe sicher escapen
|
||||
$e = fn($s) => htmlspecialchars((string)$s, ENT_QUOTES, 'UTF-8');
|
||||
|
||||
if ($checked === 0) {
|
||||
|
||||
echo "<h4>Sie haben Ihre Anfrage aktuell noch nicht bestätigt!<br><br>";
|
||||
echo "Sie haben die folgenden Anfragedaten:<br><br>";
|
||||
echo "<h4>Name: " . $e($userausgabe) . "</h4>";
|
||||
echo "<h4>Art: " . $e($ordnungsstring) . " - " . $e($rezeptart) . "</h4>";
|
||||
|
||||
if (!empty($medikamenteins)) {
|
||||
echo "<h4>Medikament1: " . $e($medikamenteins) . "</h4>";
|
||||
}
|
||||
if (!empty($medikamentzwei)) {
|
||||
echo "<h4>Medikament2: " . $e($medikamentzwei) . "</h4>";
|
||||
}
|
||||
if (!empty($nachricht)) {
|
||||
echo "<h4>Nachricht: " . nl2br(strip_tags($nachricht, '<br><b><strong><i><u><p><ul><li>')) . "</h4>";
|
||||
}
|
||||
|
||||
echo "<form action='" . $e($_SERVER['PHP_SELF']) . "' method='POST'>";
|
||||
echo '<input type="hidden" name="anfrageid" value="' . $e($anfrageid) . '" />';
|
||||
echo '<input type="hidden" name="aktion" value="2" />';
|
||||
echo '<input type="submit" id="submitbox" value="Anfrage bestätigen!" />';
|
||||
echo "</form>";
|
||||
|
||||
echo "<form action='" . $e($_SERVER['PHP_SELF']) . "' method='POST'>";
|
||||
echo '<input type="hidden" name="aktion" value="1" />';
|
||||
echo '<input type="hidden" name="anfrageid" value="' . $e($anfrageid) . '" />';
|
||||
echo '<input type="submit" id="submitbox" value="Anfrage löschen!" />';
|
||||
echo "</form>";
|
||||
|
||||
} elseif ($checked === 1) {
|
||||
|
||||
echo "<h4>Sie haben Ihre Anforderung bestätigt!<br><b>Vielen Dank!</b><br>";
|
||||
echo "Sie haben die folgenden Anfragedaten:<br><br>";
|
||||
echo "<h4>Name: " . $e($userausgabe) . "</h4>";
|
||||
echo "<h4>Art: " . $e($rezeptart) . "</h4>";
|
||||
|
||||
if (!empty($medikamenteins)) {
|
||||
echo "<h4>Medikament1: " . $e($medikamenteins) . "</h4>";
|
||||
}
|
||||
if (!empty($medikamentzwei)) {
|
||||
echo "<h4>Medikament2: " . $e($medikamentzwei) . "</h4>";
|
||||
}
|
||||
if (!empty($nachricht)) {
|
||||
echo "<h4>Nachricht: " . nl2br(strip_tags($nachricht, '<br><b><strong><i><u><p><ul><li>')) . "</h4>";
|
||||
}
|
||||
|
||||
echo "Hat sich Ihre Anfrage erledigt, tragen Sie sich bitte aus, Ihre Anfrage wird gelöscht:<br>";
|
||||
echo "<form action='" . $e($_SERVER['PHP_SELF']) . "' method='POST'>";
|
||||
echo '<input type="hidden" name="aktion" value="1" />';
|
||||
echo '<input type="hidden" name="anfrageid" value="' . $e($anfrageid) . '" />';
|
||||
echo '<input type="submit" id="submitbox" value="Anfrage absagen!" />';
|
||||
echo "</form>";
|
||||
|
||||
} elseif ($checked === 2) {
|
||||
|
||||
echo "<h4>Ihre Anfrage wurde erfolgreich gelöscht!</h4><br>Wünschen Sie eine neue Anfrage, tragen Sie sich wieder über das Formular ein.<br>";
|
||||
|
||||
} elseif ($checked === 3) {
|
||||
|
||||
echo "<h4>Ihre Anfrage wurde vom Praxisteam storniert!</h4><br>Wünschen Sie eine neue Anfrage, tragen Sie sich wieder über das Formular ein.<br>";
|
||||
|
||||
} elseif ($checked === 10) {
|
||||
|
||||
echo "<h4>Ihre Anfrage wurde vom Praxisteam beantwortet!</h4><br>Prüfen Sie Ihre E-Mails auf die Antwort.<br>";
|
||||
|
||||
} else {
|
||||
echo "<h4>Status unbekannt.</h4>";
|
||||
}
|
||||
|
||||
|
||||
}else if($_POST["aktion"] == 1){
|
||||
echo "Wollen Sie wirklich Ihren Anfrage löschen?<br>Dieses ist nicht rückgängig zu machen!<br>Dann bestätigen Sie die Abmeldung:<br>";
|
||||
echo "Bitte bestätigen!";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="3" />';
|
||||
echo '<input type="hidden" name="anfrageid" id="anfrageid" value="'. $_POST["anfrageid"] .'" /><br>';
|
||||
echo '<input type="submit" id="submitbox" value="Anfrage löschen!" />';
|
||||
echo "</form>";
|
||||
|
||||
|
||||
}else if($_POST["aktion"] == 2){
|
||||
|
||||
$anfrageid = (int)($_POST["anfrageid"] ?? 0);
|
||||
if ($anfrageid <= 0) {
|
||||
die("<h4>Ungültige Anfrage-ID.</h4>");
|
||||
}
|
||||
|
||||
// 1) Prüfen/Updaten in einem Schritt: nur bestätigen, wenn noch nicht bestätigt
|
||||
$stmt = $pdo->prepare("
|
||||
UPDATE anfragen
|
||||
SET checked = 1
|
||||
WHERE anfrageid = ?
|
||||
AND checked < 1
|
||||
");
|
||||
$stmt->execute([$anfrageid]);
|
||||
|
||||
if ($stmt->rowCount() === 0) {
|
||||
// Es wurde nichts geändert -> war schon bestätigt oder existiert nicht
|
||||
// Optional: prüfen ob Anfrage existiert
|
||||
$stmt = $pdo->prepare("SELECT checked FROM anfragen WHERE anfrageid = ? LIMIT 1");
|
||||
$stmt->execute([$anfrageid]);
|
||||
$checked = $stmt->fetchColumn();
|
||||
|
||||
if ($checked === false) {
|
||||
echo "<h4>Anfrage nicht gefunden.</h4>";
|
||||
} else {
|
||||
echo "<h4>Sie haben Ihre Anfrage schon bestätigt.</h4>";
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
echo "<h4>Ihre Anfrage wurde erfolgreich bestätigt!</h4><br>";
|
||||
|
||||
|
||||
// 2) Anfrage + Person laden (NEUES SCHEMA)
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT
|
||||
ordnungsid
|
||||
FROM anfragen a
|
||||
WHERE anfrageid = ?
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([$anfrageid]);
|
||||
$ordnungsid = $stmt->fetchColumn();
|
||||
echo "Sie erhalten gleich eine schriftliche Bestätigung per E-Mail<br><br>";
|
||||
if (!$row) {
|
||||
echo "<h4>Fehler: Anfrage wurde bestätigt, aber konnte nicht geladen werden.</h4>";
|
||||
exit;
|
||||
}
|
||||
|
||||
$ordnungsid = $row["ordnungsid"] ?? null;
|
||||
|
||||
if($ordnungsid == 1){
|
||||
// Anfragen allgemein Bestätigung
|
||||
SendMailMessageVorlage($pdo, "3", $anfrageid, "19");
|
||||
}else if($ordnungsid == 2 || $ordnungsid == 3){
|
||||
// Anfragen Rezept Bestätigung
|
||||
SendMailMessageVorlage($pdo, "3", $anfrageid, "26");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else if($_POST["aktion"] == 3){
|
||||
$anfrageid = (int)($_POST["anfrageid"] ?? 0);
|
||||
if ($anfrageid <= 0) {
|
||||
die("<h4>Ungültige Anfrage-ID.</h4>");
|
||||
}
|
||||
|
||||
/*
|
||||
1) Anfrage auf "gelöscht" setzen,
|
||||
aber nur wenn noch nicht gelöscht (checked < 2)
|
||||
*/
|
||||
$stmt = $pdo->prepare("
|
||||
UPDATE anfragen
|
||||
SET checked = 2
|
||||
WHERE anfrageid = ?
|
||||
AND checked < 2
|
||||
");
|
||||
$stmt->execute([$anfrageid]);
|
||||
|
||||
if ($stmt->rowCount() === 0) {
|
||||
// Entweder existiert nicht oder war schon gelöscht
|
||||
$stmt = $pdo->prepare("SELECT checked FROM anfragen WHERE anfrageid = ? LIMIT 1");
|
||||
$stmt->execute([$anfrageid]);
|
||||
$checked = $stmt->fetchColumn();
|
||||
|
||||
if ($checked === false) {
|
||||
echo "<h4>Anfrage nicht gefunden.</h4>";
|
||||
} else {
|
||||
echo "<h4>Sie haben Ihre Anfrage schon gelöscht.</h4>";
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
echo "<h4>Ihre Anfrage wurde erfolgreich gelöscht!</h4><br>";
|
||||
echo "Sie erhalten gleich eine schriftliche Bestätigung per E-Mail<br>";
|
||||
|
||||
SendMailMessageVorlage($pdo, "3", $anfrageid, "49");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
echo "Leider konnten wir Ihre ID-Nummer nicht erkennen.<br>Bitte tragen Sie diese in dem folgendem Feld ein und klicken Sie auf 'Senden'<br><br>";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="text" name="id" id="id" value="" placeholder="ID Kennung aus der E-Mail" required /><br>';
|
||||
echo '<input type="submit" id="submitbox" value="Senden" />';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+16
-16
@@ -1,17 +1,17 @@
|
||||
input[type="number"],input[type="date"] {
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-o-appearance: none;
|
||||
-ms-appearance: none;
|
||||
appearance: none;
|
||||
background: #f8f8f8;
|
||||
border-radius: 6px;
|
||||
border: solid 1px #e5e5e5;
|
||||
color: inherit;
|
||||
display: block;
|
||||
outline: 0;
|
||||
padding: 0 1em;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
height: 3em;
|
||||
input[type="number"],input[type="date"] {
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-o-appearance: none;
|
||||
-ms-appearance: none;
|
||||
appearance: none;
|
||||
background: #f8f8f8;
|
||||
border-radius: 6px;
|
||||
border: solid 1px #e5e5e5;
|
||||
color: inherit;
|
||||
display: block;
|
||||
outline: 0;
|
||||
padding: 0 1em;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
height: 3em;
|
||||
}
|
||||
+21
-21
@@ -1,22 +1,22 @@
|
||||
#marquee-cont {
|
||||
background: #ff6363;
|
||||
margin-top:10px;
|
||||
}
|
||||
#marquee-cont marquee {
|
||||
margin-top: 5px;
|
||||
background: #ff6363;
|
||||
}
|
||||
#marquee-news {
|
||||
|
||||
background: #1174A8;
|
||||
padding: 5px;
|
||||
}
|
||||
#ticker-title{
|
||||
border:none;
|
||||
padding:5px 20px;
|
||||
background:#1174A8;
|
||||
color:white;
|
||||
}
|
||||
#ticker-title:focus{
|
||||
outline:none;
|
||||
#marquee-cont {
|
||||
background: #ff6363;
|
||||
margin-top:10px;
|
||||
}
|
||||
#marquee-cont marquee {
|
||||
margin-top: 5px;
|
||||
background: #ff6363;
|
||||
}
|
||||
#marquee-news {
|
||||
|
||||
background: #1174A8;
|
||||
padding: 5px;
|
||||
}
|
||||
#ticker-title{
|
||||
border:none;
|
||||
padding:5px 20px;
|
||||
background:#1174A8;
|
||||
color:white;
|
||||
}
|
||||
#ticker-title:focus{
|
||||
outline:none;
|
||||
}
|
||||
+544
-544
File diff suppressed because it is too large
Load Diff
+36
-36
@@ -1,37 +1,37 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
// Überprüfen, ob der Benutzer angemeldet ist und die Kennung "admin" hat
|
||||
if (!isset($_SESSION['user']) || $_SESSION['user'] !== 'admin') {
|
||||
die("Unbefugter Zugriff.");
|
||||
}
|
||||
|
||||
$pdf_path = "./../datenupload/DHL-Paketmarke_PAKW6CYN3TC9_René_Lehradt_.pdf";
|
||||
if ($pdf_path) {
|
||||
if (file_exists($pdf_path)) {
|
||||
// Erzeugen eines temporären Dateinamens
|
||||
$temp_pdf_path = tempnam(sys_get_temp_dir(), 'pdf_');
|
||||
// Kopieren der PDF-Datei in den temporären Ordner
|
||||
copy($pdf_path, $temp_pdf_path);
|
||||
|
||||
// Setzen der Header für den Download
|
||||
header('Content-Type: application/pdf');
|
||||
header('Content-Disposition: attachment; filename="' . basename($pdf_path) . '"');
|
||||
header('Content-Length: ' . filesize($temp_pdf_path));
|
||||
|
||||
// Ausgabe des Inhalts der temporären Datei
|
||||
readfile($pdf_path);
|
||||
|
||||
// Löschen der temporären Datei
|
||||
unlink($temp_pdf_path);
|
||||
exit;
|
||||
} else {
|
||||
echo "Die Datei existiert nicht.";
|
||||
}
|
||||
} else {
|
||||
echo "Keine PDF-Datei gefunden.";
|
||||
}
|
||||
|
||||
|
||||
$conn->close();
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
// Überprüfen, ob der Benutzer angemeldet ist und die Kennung "admin" hat
|
||||
if (!isset($_SESSION['user']) || $_SESSION['user'] !== 'admin') {
|
||||
die("Unbefugter Zugriff.");
|
||||
}
|
||||
|
||||
$pdf_path = "./../datenupload/DHL-Paketmarke_PAKW6CYN3TC9_René_Lehradt_.pdf";
|
||||
if ($pdf_path) {
|
||||
if (file_exists($pdf_path)) {
|
||||
// Erzeugen eines temporären Dateinamens
|
||||
$temp_pdf_path = tempnam(sys_get_temp_dir(), 'pdf_');
|
||||
// Kopieren der PDF-Datei in den temporären Ordner
|
||||
copy($pdf_path, $temp_pdf_path);
|
||||
|
||||
// Setzen der Header für den Download
|
||||
header('Content-Type: application/pdf');
|
||||
header('Content-Disposition: attachment; filename="' . basename($pdf_path) . '"');
|
||||
header('Content-Length: ' . filesize($temp_pdf_path));
|
||||
|
||||
// Ausgabe des Inhalts der temporären Datei
|
||||
readfile($pdf_path);
|
||||
|
||||
// Löschen der temporären Datei
|
||||
unlink($temp_pdf_path);
|
||||
exit;
|
||||
} else {
|
||||
echo "Die Datei existiert nicht.";
|
||||
}
|
||||
} else {
|
||||
echo "Keine PDF-Datei gefunden.";
|
||||
}
|
||||
|
||||
|
||||
$conn->close();
|
||||
?>
|
||||
+33
-33
@@ -1,34 +1,34 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
$username = $_POST['username'];
|
||||
$password = $_POST['password'];
|
||||
|
||||
// Beispielauthentifizierung, ersetzen Sie dies durch Ihre eigene Logik
|
||||
if ($username === 'admin' && $password === 'password') {
|
||||
$_SESSION['user'] = 'admin';
|
||||
header("Location: upload.php"); // Weiterleitung zum Upload-Skript
|
||||
exit;
|
||||
} else {
|
||||
echo "Ungültige Anmeldedaten.";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Login</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="login.php" method="post">
|
||||
<label for="username">Benutzername:</label>
|
||||
<input type="text" name="username" id="username" required><br>
|
||||
<label for="password">Passwort:</label>
|
||||
<input type="password" name="password" id="password" required><br>
|
||||
<input type="submit" value="Login">
|
||||
</form>
|
||||
</body>
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
$username = $_POST['username'];
|
||||
$password = $_POST['password'];
|
||||
|
||||
// Beispielauthentifizierung, ersetzen Sie dies durch Ihre eigene Logik
|
||||
if ($username === 'admin' && $password === 'password') {
|
||||
$_SESSION['user'] = 'admin';
|
||||
header("Location: upload.php"); // Weiterleitung zum Upload-Skript
|
||||
exit;
|
||||
} else {
|
||||
echo "Ungültige Anmeldedaten.";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Login</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="login.php" method="post">
|
||||
<label for="username">Benutzername:</label>
|
||||
<input type="text" name="username" id="username" required><br>
|
||||
<label for="password">Passwort:</label>
|
||||
<input type="password" name="password" id="password" required><br>
|
||||
<input type="submit" value="Login">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
+464
-464
@@ -1,465 +1,465 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Formulare</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<?php
|
||||
echo showHeaderpraxis();
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<section class="box special">
|
||||
<h2>Service anfordern</h2>
|
||||
|
||||
<?php
|
||||
|
||||
if(isset($_POST["aktion"])){
|
||||
|
||||
if($_POST["aktion"] == "1"){
|
||||
|
||||
|
||||
echo '<h4>Kontrollieren Sie Ihre Angaben!</h4><br>';
|
||||
echo '<form action="'. $_SERVER['PHP_SELF'] .'" method=POST>';
|
||||
echo '<table border="0">';
|
||||
// Schleife durch Clemens 15.10.2018 - aktualisiert 01.02.2026
|
||||
foreach ($_POST as $key => $value) {
|
||||
|
||||
if ($value === "" || $key === "submit" || $key === "aktion") {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($key === "category") {
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT artname
|
||||
FROM anfrageart
|
||||
WHERE artid = :artid
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([
|
||||
':artid' => $value
|
||||
]);
|
||||
|
||||
$rowimpf = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$anfragearttext = $rowimpf['artname'] ?? '';
|
||||
|
||||
echo "<tr>
|
||||
<td width='100' valign='top' class='fett'>{$key}:</td>
|
||||
<td>" . htmlspecialchars($anfragearttext, ENT_QUOTES, 'UTF-8') . "</td>
|
||||
</tr>\n";
|
||||
|
||||
echo "<input type='hidden' name='{$key}' value='" . htmlspecialchars($value, ENT_QUOTES, 'UTF-8') . "'>\n";
|
||||
|
||||
} else {
|
||||
|
||||
echo "<tr>
|
||||
<td width='100' valign='top' class='fett'>{$key}:</td>
|
||||
<td>" . htmlspecialchars($value, ENT_QUOTES, 'UTF-8') . "</td>
|
||||
</tr>\n";
|
||||
|
||||
echo "<input type='hidden' name='{$key}' value='" . htmlspecialchars($value, ENT_QUOTES, 'UTF-8') . "'>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo '</table>';
|
||||
echo '<input type="hidden" name="aktion" value="2" />';
|
||||
echo '<input type="submit" value="Anfrage abschicken" />';
|
||||
echo '</form >';
|
||||
|
||||
|
||||
}else if($_POST["aktion"] == "2"){
|
||||
|
||||
$vorname = trim($_POST["Vorname"] ?? "");
|
||||
$nachname = trim($_POST["Name"] ?? "");
|
||||
$geburtstag = trim($_POST["Geburtsjahr"] ?? ""); // muss später YYYY-MM-DD sein
|
||||
$email = trim($_POST["Email"] ?? "");
|
||||
$tele = trim($_POST["Tel"] ?? "");
|
||||
$plz = trim($_POST["plz"] ?? "");
|
||||
$ort = trim($_POST["ort"] ?? "");
|
||||
$strasse = trim($_POST["strasse"] ?? "");
|
||||
|
||||
$medikament1 = trim($_POST["Medikament1"] ?? "");
|
||||
$medikament2 = trim($_POST["Medikament2"] ?? "");
|
||||
$nachricht = trim($_POST["message"] ?? "");
|
||||
$anforderungart = trim($_POST["category"] ?? "");
|
||||
|
||||
$abholung = $_POST["abholung"] ?? "Praxis";
|
||||
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
die("Ungültige E-Mail");
|
||||
}
|
||||
if (!$geburtstag) {
|
||||
die("Geburtsdatum fehlt");
|
||||
}
|
||||
$abholungnr = ($abholung === "Apotheke") ? "2" : "1";
|
||||
|
||||
$karte = $_POST["karte"] ?? "";
|
||||
if ($karte === "Privat") {
|
||||
$karte = "Privatrezept (Selbstzahler)";
|
||||
}
|
||||
|
||||
$nachricht = "Karte eingelesen: " . $karte . "<br>" .
|
||||
"Abholungsort: " . $abholung . "<br>" .
|
||||
$nachricht;
|
||||
|
||||
$impfstofftext = null;
|
||||
if (!empty($impfstoff)) {
|
||||
$stmt = $pdo->prepare("SELECT impfname FROM impfstoff WHERE impfid = ?");
|
||||
$stmt->execute([$impfstoff]);
|
||||
$impfstofftext = $stmt->fetchColumn();
|
||||
}
|
||||
|
||||
$sendmail = false;
|
||||
|
||||
$pdo->beginTransaction();
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
INSERT INTO persons (vorname, nachname, email, geburtstag, tele, ort, plz, strasse)
|
||||
VALUES (:vorname, :nachname, :email, :geburtstag, :tele, :ort, :plz, :strasse)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
vorname = VALUES(vorname),
|
||||
nachname = VALUES(nachname),
|
||||
tele = VALUES(tele),
|
||||
ort = VALUES(ort),
|
||||
plz = VALUES(plz),
|
||||
strasse = VALUES(strasse),
|
||||
updated_at = CURRENT_TIMESTAMP
|
||||
");
|
||||
$stmt->execute([
|
||||
':vorname' => $vorname,
|
||||
':nachname' => $nachname,
|
||||
':email' => $email,
|
||||
':geburtstag' => $geburtstag,
|
||||
':tele' => $tele,
|
||||
':ort' => $ort,
|
||||
':plz' => $plz,
|
||||
':strasse' => $strasse
|
||||
]);
|
||||
|
||||
// person_id holen (weil ON DUPLICATE nicht zuverlässig lastInsertId liefert)
|
||||
$stmt = $pdo->prepare("SELECT person_id FROM persons WHERE email = ? AND geburtstag = ?");
|
||||
$stmt->execute([$email, $geburtstag]);
|
||||
$person_id = (int)$stmt->fetchColumn();
|
||||
|
||||
if (!$person_id) {
|
||||
$pdo->rollBack();
|
||||
die("Keine eindeutige Kennung (person_id)");
|
||||
}else{
|
||||
|
||||
$hashvorher = $vorname . $nachname . $Email;
|
||||
$hash = md5($hashvorher) . date("YmdHs");
|
||||
|
||||
|
||||
$sendmail = true;
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT 1
|
||||
FROM anfragen
|
||||
WHERE requester_person_id = ?
|
||||
AND anforderungart = ?
|
||||
AND medikament1 = ?
|
||||
AND medikament2 = ?
|
||||
AND nachricht = ?
|
||||
AND create_time >= (NOW() - INTERVAL 7 DAY)
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([$person_id, $anforderungart, $medikament1, $medikament2, $nachricht]);
|
||||
$exists = (bool)$stmt->fetchColumn();
|
||||
|
||||
if (!$exists) {
|
||||
$stmt = $pdo->prepare("
|
||||
INSERT INTO anfragen
|
||||
(requester_person_id, anforderungart, medikament1, medikament2,
|
||||
nachricht, hash, create_time, ordnungsid, abholort, sicherenachricht,
|
||||
source, created_by_account_id)
|
||||
VALUES
|
||||
(?, ?, ?, ?, ?, ?, NOW(), '1', ?, '0', 'mail', NULL)
|
||||
");
|
||||
$stmt->execute([
|
||||
$person_id,
|
||||
$anforderungart,
|
||||
$medikament1,
|
||||
$medikament2,
|
||||
$nachricht,
|
||||
$hash,
|
||||
$abholungnr
|
||||
]);
|
||||
|
||||
$anfrageid = (int)$pdo->lastInsertId();
|
||||
|
||||
$pdo->commit();
|
||||
|
||||
// Achtung: deine Funktion erwartet $con (mysqli). Die musst du später auf PDO umbauen.
|
||||
// Übergangsweise: Lass die Mailfunktion noch mit mysqli laufen oder baue sie um.
|
||||
SendMailMessageVorlage($pdo, "3", $anfrageid , "18" );
|
||||
|
||||
echo "<h3>Nachricht abgeschickt!</h3><br>Sie bekommen eine Bestätigung per E-Mail!<br>Überprüfen Sie auch Ihren Spam-Filter!<br><br>Sie werden gleich weitergeleitet.<br>";
|
||||
header("refresh:15;rezepte.php");
|
||||
|
||||
} else {
|
||||
$pdo->rollBack();
|
||||
echo "<h3>Doppelte Anfrage</h3><br>Ihre Anfrage wurde schon in unserem System gespeichert.<br>Sie haben die identische Anfrage schon in den letzten sieben Tagen eingereicht.<br>Bitte warten Sie auf die Verarbeitung Ihrer Anfrage.<br><br>";
|
||||
header("refresh:15;rezepte.php");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}else{
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
Formulare anfordern, nur nach ärztlicher Absprache und Kontakt. Kassenleistungen sind an die gesetzlichen Regelungen gebunden. Fragen Sie Ihre Krankenkasse.<br>
|
||||
<br>Benutzen Sie eine Email-Adresse auf die Sie direkt zugreifen können. Bitte bestätigen Sie dann den Link in der Email. So können wir Ihnen im Verlauf den Stand der Bearbeitung Ihrer Anfrage sicher mitteilen.
|
||||
<br><br><br>
|
||||
Stellen Sie wiederholt Anfragen an die Praxis Creutzburg? <br>
|
||||
Wollen Sie bis zu sechs Medikamente beantragen?<br>
|
||||
Benötigen Sie ein längeres Textfeld?<br>
|
||||
|
||||
<br>Dann nutzen Sie auch unseren <a href="https://www.praxis-creutzburg.de/intern/">Internen Bereich</a> für Patienten.
|
||||
<br><br>
|
||||
<h4>Nutzen Sie unsere neue Datei-Upload-Funktion! </h4>
|
||||
Sie können damit dem Praxis-Team Unterlagen per PDF zur Verfügung stellen.<br>
|
||||
|
||||
Den Upload finden Sie hier: <a href="https://praxis-creutzburg.de/dateiupload.php">Datei-Upload</a><br>
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
<?php
|
||||
|
||||
// Urlaubsabfrage
|
||||
$today = date("Y-m-d");
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT urlaubid
|
||||
FROM urlaub
|
||||
WHERE start <= ?
|
||||
AND ende >= ?
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([$today, $today]);
|
||||
|
||||
$urlaubid = $stmt->fetchColumn();
|
||||
|
||||
if (!$urlaubid) {
|
||||
?>
|
||||
|
||||
<h2>ACHTUNG!</h2>
|
||||
|
||||
<h3>Fragen zu Corona?</h3>
|
||||
|
||||
Alle Informationen zur Corona-Impfung finden Sie hier:<br>
|
||||
<a href="impfanmeldung.php".php" class="button alt" style="font-size: 18px;background-color: #4CAF50;color:white;">Corona-Informationen</a><br><br>
|
||||
|
||||
<h3>Sie benötigen einen Termin?</h3>
|
||||
|
||||
Schauen Sie in unserem Online-Kalender nach einem Termin. Dort sind meist auch kurzfristige Termine vorhanden.<br>
|
||||
Untersuchungen wie Blutabnahmen, Blutbild oder Ultraschall auf Kassenleistung erfolgen ausschließlich nach direkter Rücksprache mit unserem Arzt und können nicht selbstständig online gebucht werden.<br>
|
||||
|
||||
<h4>Buchen Sie dafür zunächst einen Sprechstundentermin.</h4> Anschließend wird das weitere Vorgehen mit unserem Arzt besprochen.
|
||||
<br>
|
||||
<a href="termine.php".php" class="button alt" style="font-size: 18px;background-color: #4CAF50;color:white;">Online-Kalender</a><br><br>
|
||||
|
||||
<h3>Formular bitte ausfüllen und abschicken</h3>
|
||||
<p>Gehen Sie nach unten zum Formular und füllen Sie es (wie gewohnt) aus.</p>
|
||||
|
||||
|
||||
<?php echo '<form action="'. $_SERVER['PHP_SELF'] .'" method=POST>';
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="1" />';
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row uniform 50%">
|
||||
<?php
|
||||
echo ShowFormularFragenBenutzer();
|
||||
?>
|
||||
|
||||
<div class="12u">
|
||||
<label for="category">Ich habe eine Anfrage für folgendes Thema:</label>
|
||||
<div class="select-wrapper">
|
||||
<select name="category" id="category" required >
|
||||
<option value=""> Bitte wählen Sie aus</option>
|
||||
<?php
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT artid, artname
|
||||
FROM anfrageart
|
||||
WHERE allgemeinanforderung = 1
|
||||
");
|
||||
$stmt->execute();
|
||||
|
||||
while ($rowimpf = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$artname = $rowimpf["artname"];
|
||||
$artid = $rowimpf["artid"];
|
||||
?>
|
||||
<option value="<?php echo htmlspecialchars($artid, ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<?php echo htmlspecialchars($artname, ENT_QUOTES, 'UTF-8'); ?>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<div id="AstraInfobox"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row uniform 50%">
|
||||
|
||||
|
||||
<div class="12u">
|
||||
<textarea name="message" id="message" placeholder="Ihre Nachricht/Bemerkung" rows="6" maxlength="150"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row uniform">
|
||||
<div class="12u">
|
||||
<br>
|
||||
Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich. Kassenleistungen sind an die gesetzlichen Regelungen gebunden. Fragen Sie Ihre Krankenkasse.<br>
|
||||
Ihre Daten werden HTTPS-verschlüsselt an unser System übertragen. Sie erhalten die Antwort per E-Mail mit TLS-Verschlüsselung. Mit Absenden Ihrer Anfrage stimmen Sie diesen Bedingungen zu.<br>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row uniform">
|
||||
<div class="12u">
|
||||
<ul class="actions">
|
||||
<li><input type="submit" value="Abschicken" /></li>
|
||||
<li><input type="reset" value="Reset" class="alt" /></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
<?php }else{
|
||||
echo "<h2>Praxis im Urlaub</h2>";
|
||||
echo "Wir befinden uns aktuell im Urlaub.<br>Wenden Sie sich an unsere Vertretung oder warten Sie bis nach unserem Urlaub mit Ihrer Anfrage.<br><br>";
|
||||
|
||||
$today = date("Y-m-d");
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT ende, vertretung, vertretertelefon, vertreteradresse, vertreterurl
|
||||
FROM urlaub
|
||||
WHERE start <= :today
|
||||
AND ende >= :today
|
||||
ORDER BY ende DESC
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([':today' => $today]);
|
||||
|
||||
$row = $stmt->fetch(); // liefert Array oder false
|
||||
|
||||
if ($row) {
|
||||
$vertreter = $row["vertretung"] ?? null;
|
||||
$vertretertelefon = $row["vertretertelefon"] ?? null;
|
||||
$vertreteradresse = $row["vertreteradresse"] ?? null;
|
||||
$vertreterurl = $row["vertreterurl"] ?? null;
|
||||
$ende = $row["ende"] ?? null;
|
||||
|
||||
if ($ende) {
|
||||
$endeausgabe = date("d.m.Y", strtotime("+1 day", strtotime($ende)));
|
||||
} else {
|
||||
$endeausgabe = null;
|
||||
}
|
||||
|
||||
if (!empty($vertreter)) {
|
||||
echo "Unsere Vertretung: " . htmlspecialchars($vertreter, ENT_QUOTES, 'UTF-8') . "<br>";
|
||||
}
|
||||
if (!empty($vertreterurl)) {
|
||||
// optional: URL escapen/validieren
|
||||
echo "Webseite Vertretung: " . htmlspecialchars($vertreterurl, ENT_QUOTES, 'UTF-8') . "<br>";
|
||||
}
|
||||
if (!empty($vertretertelefon)) {
|
||||
echo "Telefonischer Kontakt Vertretung: " . htmlspecialchars($vertretertelefon, ENT_QUOTES, 'UTF-8') . "<br>";
|
||||
}
|
||||
if (!empty($vertreteradresse)) {
|
||||
echo "Adresse Vertretung: " . htmlspecialchars($vertreteradresse, ENT_QUOTES, 'UTF-8') . "<br>";
|
||||
}
|
||||
|
||||
if ($endeausgabe) {
|
||||
echo "<br>Wir stehen Ihnen ab dem " . htmlspecialchars($endeausgabe, ENT_QUOTES, 'UTF-8') . " wieder zur Verfügung.<br><br><br>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form action="index.php" method=POST>
|
||||
<input type=submit class=button value="Zurück">
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Formulare</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<?php
|
||||
echo showHeaderpraxis();
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<section class="box special">
|
||||
<h2>Service anfordern</h2>
|
||||
|
||||
<?php
|
||||
|
||||
if(isset($_POST["aktion"])){
|
||||
|
||||
if($_POST["aktion"] == "1"){
|
||||
|
||||
|
||||
echo '<h4>Kontrollieren Sie Ihre Angaben!</h4><br>';
|
||||
echo '<form action="'. $_SERVER['PHP_SELF'] .'" method=POST>';
|
||||
echo '<table border="0">';
|
||||
// Schleife durch Clemens 15.10.2018 - aktualisiert 01.02.2026
|
||||
foreach ($_POST as $key => $value) {
|
||||
|
||||
if ($value === "" || $key === "submit" || $key === "aktion") {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($key === "category") {
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT artname
|
||||
FROM anfrageart
|
||||
WHERE artid = :artid
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([
|
||||
':artid' => $value
|
||||
]);
|
||||
|
||||
$rowimpf = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$anfragearttext = $rowimpf['artname'] ?? '';
|
||||
|
||||
echo "<tr>
|
||||
<td width='100' valign='top' class='fett'>{$key}:</td>
|
||||
<td>" . htmlspecialchars($anfragearttext, ENT_QUOTES, 'UTF-8') . "</td>
|
||||
</tr>\n";
|
||||
|
||||
echo "<input type='hidden' name='{$key}' value='" . htmlspecialchars($value, ENT_QUOTES, 'UTF-8') . "'>\n";
|
||||
|
||||
} else {
|
||||
|
||||
echo "<tr>
|
||||
<td width='100' valign='top' class='fett'>{$key}:</td>
|
||||
<td>" . htmlspecialchars($value, ENT_QUOTES, 'UTF-8') . "</td>
|
||||
</tr>\n";
|
||||
|
||||
echo "<input type='hidden' name='{$key}' value='" . htmlspecialchars($value, ENT_QUOTES, 'UTF-8') . "'>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo '</table>';
|
||||
echo '<input type="hidden" name="aktion" value="2" />';
|
||||
echo '<input type="submit" value="Anfrage abschicken" />';
|
||||
echo '</form >';
|
||||
|
||||
|
||||
}else if($_POST["aktion"] == "2"){
|
||||
|
||||
$vorname = trim($_POST["Vorname"] ?? "");
|
||||
$nachname = trim($_POST["Name"] ?? "");
|
||||
$geburtstag = trim($_POST["Geburtsjahr"] ?? ""); // muss später YYYY-MM-DD sein
|
||||
$email = trim($_POST["Email"] ?? "");
|
||||
$tele = trim($_POST["Tel"] ?? "");
|
||||
$plz = trim($_POST["plz"] ?? "");
|
||||
$ort = trim($_POST["ort"] ?? "");
|
||||
$strasse = trim($_POST["strasse"] ?? "");
|
||||
|
||||
$medikament1 = trim($_POST["Medikament1"] ?? "");
|
||||
$medikament2 = trim($_POST["Medikament2"] ?? "");
|
||||
$nachricht = trim($_POST["message"] ?? "");
|
||||
$anforderungart = trim($_POST["category"] ?? "");
|
||||
|
||||
$abholung = $_POST["abholung"] ?? "Praxis";
|
||||
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
die("Ungültige E-Mail");
|
||||
}
|
||||
if (!$geburtstag) {
|
||||
die("Geburtsdatum fehlt");
|
||||
}
|
||||
$abholungnr = ($abholung === "Apotheke") ? "2" : "1";
|
||||
|
||||
$karte = $_POST["karte"] ?? "";
|
||||
if ($karte === "Privat") {
|
||||
$karte = "Privatrezept (Selbstzahler)";
|
||||
}
|
||||
|
||||
$nachricht = "Karte eingelesen: " . $karte . "<br>" .
|
||||
"Abholungsort: " . $abholung . "<br>" .
|
||||
$nachricht;
|
||||
|
||||
$impfstofftext = null;
|
||||
if (!empty($impfstoff)) {
|
||||
$stmt = $pdo->prepare("SELECT impfname FROM impfstoff WHERE impfid = ?");
|
||||
$stmt->execute([$impfstoff]);
|
||||
$impfstofftext = $stmt->fetchColumn();
|
||||
}
|
||||
|
||||
$sendmail = false;
|
||||
|
||||
$pdo->beginTransaction();
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
INSERT INTO persons (vorname, nachname, email, geburtstag, tele, ort, plz, strasse)
|
||||
VALUES (:vorname, :nachname, :email, :geburtstag, :tele, :ort, :plz, :strasse)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
vorname = VALUES(vorname),
|
||||
nachname = VALUES(nachname),
|
||||
tele = VALUES(tele),
|
||||
ort = VALUES(ort),
|
||||
plz = VALUES(plz),
|
||||
strasse = VALUES(strasse),
|
||||
updated_at = CURRENT_TIMESTAMP
|
||||
");
|
||||
$stmt->execute([
|
||||
':vorname' => $vorname,
|
||||
':nachname' => $nachname,
|
||||
':email' => $email,
|
||||
':geburtstag' => $geburtstag,
|
||||
':tele' => $tele,
|
||||
':ort' => $ort,
|
||||
':plz' => $plz,
|
||||
':strasse' => $strasse
|
||||
]);
|
||||
|
||||
// person_id holen (weil ON DUPLICATE nicht zuverlässig lastInsertId liefert)
|
||||
$stmt = $pdo->prepare("SELECT person_id FROM persons WHERE email = ? AND geburtstag = ?");
|
||||
$stmt->execute([$email, $geburtstag]);
|
||||
$person_id = (int)$stmt->fetchColumn();
|
||||
|
||||
if (!$person_id) {
|
||||
$pdo->rollBack();
|
||||
die("Keine eindeutige Kennung (person_id)");
|
||||
}else{
|
||||
|
||||
$hashvorher = $vorname . $nachname . $Email;
|
||||
$hash = md5($hashvorher) . date("YmdHs");
|
||||
|
||||
|
||||
$sendmail = true;
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT 1
|
||||
FROM anfragen
|
||||
WHERE requester_person_id = ?
|
||||
AND anforderungart = ?
|
||||
AND medikament1 = ?
|
||||
AND medikament2 = ?
|
||||
AND nachricht = ?
|
||||
AND create_time >= (NOW() - INTERVAL 7 DAY)
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([$person_id, $anforderungart, $medikament1, $medikament2, $nachricht]);
|
||||
$exists = (bool)$stmt->fetchColumn();
|
||||
|
||||
if (!$exists) {
|
||||
$stmt = $pdo->prepare("
|
||||
INSERT INTO anfragen
|
||||
(requester_person_id, anforderungart, medikament1, medikament2,
|
||||
nachricht, hash, create_time, ordnungsid, abholort, sicherenachricht,
|
||||
source, created_by_account_id)
|
||||
VALUES
|
||||
(?, ?, ?, ?, ?, ?, NOW(), '1', ?, '0', 'mail', NULL)
|
||||
");
|
||||
$stmt->execute([
|
||||
$person_id,
|
||||
$anforderungart,
|
||||
$medikament1,
|
||||
$medikament2,
|
||||
$nachricht,
|
||||
$hash,
|
||||
$abholungnr
|
||||
]);
|
||||
|
||||
$anfrageid = (int)$pdo->lastInsertId();
|
||||
|
||||
$pdo->commit();
|
||||
|
||||
// Achtung: deine Funktion erwartet $con (mysqli). Die musst du später auf PDO umbauen.
|
||||
// Übergangsweise: Lass die Mailfunktion noch mit mysqli laufen oder baue sie um.
|
||||
SendMailMessageVorlage($pdo, "3", $anfrageid , "18" );
|
||||
|
||||
echo "<h3>Nachricht abgeschickt!</h3><br>Sie bekommen eine Bestätigung per E-Mail!<br>Überprüfen Sie auch Ihren Spam-Filter!<br><br>Sie werden gleich weitergeleitet.<br>";
|
||||
header("refresh:15;rezepte.php");
|
||||
|
||||
} else {
|
||||
$pdo->rollBack();
|
||||
echo "<h3>Doppelte Anfrage</h3><br>Ihre Anfrage wurde schon in unserem System gespeichert.<br>Sie haben die identische Anfrage schon in den letzten sieben Tagen eingereicht.<br>Bitte warten Sie auf die Verarbeitung Ihrer Anfrage.<br><br>";
|
||||
header("refresh:15;rezepte.php");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}else{
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
Formulare anfordern, nur nach ärztlicher Absprache und Kontakt. Kassenleistungen sind an die gesetzlichen Regelungen gebunden. Fragen Sie Ihre Krankenkasse.<br>
|
||||
<br>Benutzen Sie eine Email-Adresse auf die Sie direkt zugreifen können. Bitte bestätigen Sie dann den Link in der Email. So können wir Ihnen im Verlauf den Stand der Bearbeitung Ihrer Anfrage sicher mitteilen.
|
||||
<br><br><br>
|
||||
Stellen Sie wiederholt Anfragen an die Praxis Creutzburg? <br>
|
||||
Wollen Sie bis zu sechs Medikamente beantragen?<br>
|
||||
Benötigen Sie ein längeres Textfeld?<br>
|
||||
|
||||
<br>Dann nutzen Sie auch unseren <a href="https://www.praxis-creutzburg.de/intern/">Internen Bereich</a> für Patienten.
|
||||
<br><br>
|
||||
<h4>Nutzen Sie unsere neue Datei-Upload-Funktion! </h4>
|
||||
Sie können damit dem Praxis-Team Unterlagen per PDF zur Verfügung stellen.<br>
|
||||
|
||||
Den Upload finden Sie hier: <a href="https://praxis-creutzburg.de/dateiupload.php">Datei-Upload</a><br>
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
<?php
|
||||
|
||||
// Urlaubsabfrage
|
||||
$today = date("Y-m-d");
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT urlaubid
|
||||
FROM urlaub
|
||||
WHERE start <= ?
|
||||
AND ende >= ?
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([$today, $today]);
|
||||
|
||||
$urlaubid = $stmt->fetchColumn();
|
||||
|
||||
if (!$urlaubid) {
|
||||
?>
|
||||
|
||||
<h2>ACHTUNG!</h2>
|
||||
|
||||
<h3>Fragen zu Corona?</h3>
|
||||
|
||||
Alle Informationen zur Corona-Impfung finden Sie hier:<br>
|
||||
<a href="impfanmeldung.php".php" class="button alt" style="font-size: 18px;background-color: #4CAF50;color:white;">Corona-Informationen</a><br><br>
|
||||
|
||||
<h3>Sie benötigen einen Termin?</h3>
|
||||
|
||||
Schauen Sie in unserem Online-Kalender nach einem Termin. Dort sind meist auch kurzfristige Termine vorhanden.<br>
|
||||
Untersuchungen wie Blutabnahmen, Blutbild oder Ultraschall auf Kassenleistung erfolgen ausschließlich nach direkter Rücksprache mit unserem Arzt und können nicht selbstständig online gebucht werden.<br>
|
||||
|
||||
<h4>Buchen Sie dafür zunächst einen Sprechstundentermin.</h4> Anschließend wird das weitere Vorgehen mit unserem Arzt besprochen.
|
||||
<br>
|
||||
<a href="termine.php".php" class="button alt" style="font-size: 18px;background-color: #4CAF50;color:white;">Online-Kalender</a><br><br>
|
||||
|
||||
<h3>Formular bitte ausfüllen und abschicken</h3>
|
||||
<p>Gehen Sie nach unten zum Formular und füllen Sie es (wie gewohnt) aus.</p>
|
||||
|
||||
|
||||
<?php echo '<form action="'. $_SERVER['PHP_SELF'] .'" method=POST>';
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="1" />';
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row uniform 50%">
|
||||
<?php
|
||||
echo ShowFormularFragenBenutzer();
|
||||
?>
|
||||
|
||||
<div class="12u">
|
||||
<label for="category">Ich habe eine Anfrage für folgendes Thema:</label>
|
||||
<div class="select-wrapper">
|
||||
<select name="category" id="category" required >
|
||||
<option value=""> Bitte wählen Sie aus</option>
|
||||
<?php
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT artid, artname
|
||||
FROM anfrageart
|
||||
WHERE allgemeinanforderung = 1
|
||||
");
|
||||
$stmt->execute();
|
||||
|
||||
while ($rowimpf = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$artname = $rowimpf["artname"];
|
||||
$artid = $rowimpf["artid"];
|
||||
?>
|
||||
<option value="<?php echo htmlspecialchars($artid, ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<?php echo htmlspecialchars($artname, ENT_QUOTES, 'UTF-8'); ?>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<div id="AstraInfobox"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row uniform 50%">
|
||||
|
||||
|
||||
<div class="12u">
|
||||
<textarea name="message" id="message" placeholder="Ihre Nachricht/Bemerkung" rows="6" maxlength="150"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row uniform">
|
||||
<div class="12u">
|
||||
<br>
|
||||
Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich. Kassenleistungen sind an die gesetzlichen Regelungen gebunden. Fragen Sie Ihre Krankenkasse.<br>
|
||||
Ihre Daten werden HTTPS-verschlüsselt an unser System übertragen. Sie erhalten die Antwort per E-Mail mit TLS-Verschlüsselung. Mit Absenden Ihrer Anfrage stimmen Sie diesen Bedingungen zu.<br>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row uniform">
|
||||
<div class="12u">
|
||||
<ul class="actions">
|
||||
<li><input type="submit" value="Abschicken" /></li>
|
||||
<li><input type="reset" value="Reset" class="alt" /></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
<?php }else{
|
||||
echo "<h2>Praxis im Urlaub</h2>";
|
||||
echo "Wir befinden uns aktuell im Urlaub.<br>Wenden Sie sich an unsere Vertretung oder warten Sie bis nach unserem Urlaub mit Ihrer Anfrage.<br><br>";
|
||||
|
||||
$today = date("Y-m-d");
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT ende, vertretung, vertretertelefon, vertreteradresse, vertreterurl
|
||||
FROM urlaub
|
||||
WHERE start <= :today
|
||||
AND ende >= :today
|
||||
ORDER BY ende DESC
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([':today' => $today]);
|
||||
|
||||
$row = $stmt->fetch(); // liefert Array oder false
|
||||
|
||||
if ($row) {
|
||||
$vertreter = $row["vertretung"] ?? null;
|
||||
$vertretertelefon = $row["vertretertelefon"] ?? null;
|
||||
$vertreteradresse = $row["vertreteradresse"] ?? null;
|
||||
$vertreterurl = $row["vertreterurl"] ?? null;
|
||||
$ende = $row["ende"] ?? null;
|
||||
|
||||
if ($ende) {
|
||||
$endeausgabe = date("d.m.Y", strtotime("+1 day", strtotime($ende)));
|
||||
} else {
|
||||
$endeausgabe = null;
|
||||
}
|
||||
|
||||
if (!empty($vertreter)) {
|
||||
echo "Unsere Vertretung: " . htmlspecialchars($vertreter, ENT_QUOTES, 'UTF-8') . "<br>";
|
||||
}
|
||||
if (!empty($vertreterurl)) {
|
||||
// optional: URL escapen/validieren
|
||||
echo "Webseite Vertretung: " . htmlspecialchars($vertreterurl, ENT_QUOTES, 'UTF-8') . "<br>";
|
||||
}
|
||||
if (!empty($vertretertelefon)) {
|
||||
echo "Telefonischer Kontakt Vertretung: " . htmlspecialchars($vertretertelefon, ENT_QUOTES, 'UTF-8') . "<br>";
|
||||
}
|
||||
if (!empty($vertreteradresse)) {
|
||||
echo "Adresse Vertretung: " . htmlspecialchars($vertreteradresse, ENT_QUOTES, 'UTF-8') . "<br>";
|
||||
}
|
||||
|
||||
if ($endeausgabe) {
|
||||
echo "<br>Wir stehen Ihnen ab dem " . htmlspecialchars($endeausgabe, ENT_QUOTES, 'UTF-8') . " wieder zur Verfügung.<br><br><br>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form action="index.php" method=POST>
|
||||
<input type=submit class=button value="Zurück">
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,2 +1,2 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/impfbestaetigung.php';
|
||||
require_once __DIR__ . '/impfbestaetigung.php';
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/impfwarteliste.php';
|
||||
require_once __DIR__ . '/impfwarteliste.php';
|
||||
|
||||
+130
-130
@@ -1,131 +1,131 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ICS.php
|
||||
* =======
|
||||
* Use this class to create an .ics file.
|
||||
*
|
||||
* Usage
|
||||
* -----
|
||||
* Basic usage - generate ics file contents (see below for available properties):
|
||||
* $ics = new ICS($props);
|
||||
* $ics_file_contents = $ics->to_string();
|
||||
*
|
||||
* Setting properties after instantiation
|
||||
* $ics = new ICS();
|
||||
* $ics->set('summary', 'My awesome event');
|
||||
*
|
||||
* You can also set multiple properties at the same time by using an array:
|
||||
* $ics->set(array(
|
||||
* 'dtstart' => 'now + 30 minutes',
|
||||
* 'dtend' => 'now + 1 hour'
|
||||
* ));
|
||||
*
|
||||
* Available properties
|
||||
* --------------------
|
||||
* description
|
||||
* String description of the event.
|
||||
* dtend
|
||||
* A date/time stamp designating the end of the event. You can use either a
|
||||
* DateTime object or a PHP datetime format string (e.g. "now + 1 hour").
|
||||
* dtstart
|
||||
* A date/time stamp designating the start of the event. You can use either a
|
||||
* DateTime object or a PHP datetime format string (e.g. "now + 1 hour").
|
||||
* location
|
||||
* String address or description of the location of the event.
|
||||
* summary
|
||||
* String short summary of the event - usually used as the title.
|
||||
* url
|
||||
* A url to attach to the the event. Make sure to add the protocol (http://
|
||||
* or https://).
|
||||
*/
|
||||
|
||||
class ICS {
|
||||
const DT_FORMAT = 'Ymd\THis\Z';
|
||||
|
||||
protected $properties = array();
|
||||
private $available_properties = array(
|
||||
'description',
|
||||
'dtend',
|
||||
'dtstart',
|
||||
'location',
|
||||
'summary',
|
||||
'url'
|
||||
);
|
||||
|
||||
public function __construct($props) {
|
||||
$this->set($props);
|
||||
}
|
||||
|
||||
public function set($key, $val = false) {
|
||||
if (is_array($key)) {
|
||||
foreach ($key as $k => $v) {
|
||||
$this->set($k, $v);
|
||||
}
|
||||
} else {
|
||||
if (in_array($key, $this->available_properties)) {
|
||||
$this->properties[$key] = $this->sanitize_val($val, $key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function to_string() {
|
||||
$rows = $this->build_props();
|
||||
return implode("\r\n", $rows);
|
||||
}
|
||||
|
||||
private function build_props() {
|
||||
// Build ICS properties - add header
|
||||
$ics_props = array(
|
||||
'BEGIN:VCALENDAR',
|
||||
'VERSION:2.0',
|
||||
'PRODID:-//hacksw/handcal//NONSGML v1.0//EN',
|
||||
'CALSCALE:GREGORIAN',
|
||||
'BEGIN:VEVENT'
|
||||
);
|
||||
|
||||
// Build ICS properties - add header
|
||||
$props = array();
|
||||
foreach($this->properties as $k => $v) {
|
||||
$props[strtoupper($k . ($k === 'url' ? ';VALUE=URI' : ''))] = $v;
|
||||
}
|
||||
|
||||
// Set some default values
|
||||
$props['DTSTAMP'] = $this->format_timestamp('now');
|
||||
$props['UID'] = uniqid();
|
||||
|
||||
// Append properties
|
||||
foreach ($props as $k => $v) {
|
||||
$ics_props[] = "$k:$v";
|
||||
}
|
||||
|
||||
// Build ICS properties - add footer
|
||||
$ics_props[] = 'END:VEVENT';
|
||||
$ics_props[] = 'END:VCALENDAR';
|
||||
|
||||
return $ics_props;
|
||||
}
|
||||
|
||||
private function sanitize_val($val, $key = false) {
|
||||
switch($key) {
|
||||
case 'dtend':
|
||||
case 'dtstamp':
|
||||
case 'dtstart':
|
||||
$val = $this->format_timestamp($val);
|
||||
break;
|
||||
default:
|
||||
$val = $this->escape_string($val);
|
||||
}
|
||||
|
||||
return $val;
|
||||
}
|
||||
|
||||
private function format_timestamp($timestamp) {
|
||||
$dt = new DateTime($timestamp);
|
||||
return $dt->format(self::DT_FORMAT);
|
||||
}
|
||||
|
||||
private function escape_string($str) {
|
||||
return preg_replace('/([\,;])/','\\\$1', $str);
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ICS.php
|
||||
* =======
|
||||
* Use this class to create an .ics file.
|
||||
*
|
||||
* Usage
|
||||
* -----
|
||||
* Basic usage - generate ics file contents (see below for available properties):
|
||||
* $ics = new ICS($props);
|
||||
* $ics_file_contents = $ics->to_string();
|
||||
*
|
||||
* Setting properties after instantiation
|
||||
* $ics = new ICS();
|
||||
* $ics->set('summary', 'My awesome event');
|
||||
*
|
||||
* You can also set multiple properties at the same time by using an array:
|
||||
* $ics->set(array(
|
||||
* 'dtstart' => 'now + 30 minutes',
|
||||
* 'dtend' => 'now + 1 hour'
|
||||
* ));
|
||||
*
|
||||
* Available properties
|
||||
* --------------------
|
||||
* description
|
||||
* String description of the event.
|
||||
* dtend
|
||||
* A date/time stamp designating the end of the event. You can use either a
|
||||
* DateTime object or a PHP datetime format string (e.g. "now + 1 hour").
|
||||
* dtstart
|
||||
* A date/time stamp designating the start of the event. You can use either a
|
||||
* DateTime object or a PHP datetime format string (e.g. "now + 1 hour").
|
||||
* location
|
||||
* String address or description of the location of the event.
|
||||
* summary
|
||||
* String short summary of the event - usually used as the title.
|
||||
* url
|
||||
* A url to attach to the the event. Make sure to add the protocol (http://
|
||||
* or https://).
|
||||
*/
|
||||
|
||||
class ICS {
|
||||
const DT_FORMAT = 'Ymd\THis\Z';
|
||||
|
||||
protected $properties = array();
|
||||
private $available_properties = array(
|
||||
'description',
|
||||
'dtend',
|
||||
'dtstart',
|
||||
'location',
|
||||
'summary',
|
||||
'url'
|
||||
);
|
||||
|
||||
public function __construct($props) {
|
||||
$this->set($props);
|
||||
}
|
||||
|
||||
public function set($key, $val = false) {
|
||||
if (is_array($key)) {
|
||||
foreach ($key as $k => $v) {
|
||||
$this->set($k, $v);
|
||||
}
|
||||
} else {
|
||||
if (in_array($key, $this->available_properties)) {
|
||||
$this->properties[$key] = $this->sanitize_val($val, $key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function to_string() {
|
||||
$rows = $this->build_props();
|
||||
return implode("\r\n", $rows);
|
||||
}
|
||||
|
||||
private function build_props() {
|
||||
// Build ICS properties - add header
|
||||
$ics_props = array(
|
||||
'BEGIN:VCALENDAR',
|
||||
'VERSION:2.0',
|
||||
'PRODID:-//hacksw/handcal//NONSGML v1.0//EN',
|
||||
'CALSCALE:GREGORIAN',
|
||||
'BEGIN:VEVENT'
|
||||
);
|
||||
|
||||
// Build ICS properties - add header
|
||||
$props = array();
|
||||
foreach($this->properties as $k => $v) {
|
||||
$props[strtoupper($k . ($k === 'url' ? ';VALUE=URI' : ''))] = $v;
|
||||
}
|
||||
|
||||
// Set some default values
|
||||
$props['DTSTAMP'] = $this->format_timestamp('now');
|
||||
$props['UID'] = uniqid();
|
||||
|
||||
// Append properties
|
||||
foreach ($props as $k => $v) {
|
||||
$ics_props[] = "$k:$v";
|
||||
}
|
||||
|
||||
// Build ICS properties - add footer
|
||||
$ics_props[] = 'END:VEVENT';
|
||||
$ics_props[] = 'END:VCALENDAR';
|
||||
|
||||
return $ics_props;
|
||||
}
|
||||
|
||||
private function sanitize_val($val, $key = false) {
|
||||
switch($key) {
|
||||
case 'dtend':
|
||||
case 'dtstamp':
|
||||
case 'dtstart':
|
||||
$val = $this->format_timestamp($val);
|
||||
break;
|
||||
default:
|
||||
$val = $this->escape_string($val);
|
||||
}
|
||||
|
||||
return $val;
|
||||
}
|
||||
|
||||
private function format_timestamp($timestamp) {
|
||||
$dt = new DateTime($timestamp);
|
||||
return $dt->format(self::DT_FORMAT);
|
||||
}
|
||||
|
||||
private function escape_string($str) {
|
||||
return preg_replace('/([\,;])/','\\\$1', $str);
|
||||
}
|
||||
}
|
||||
+568
-568
File diff suppressed because it is too large
Load Diff
+986
-986
File diff suppressed because it is too large
Load Diff
+796
-796
File diff suppressed because it is too large
Load Diff
+51
-56
@@ -1,56 +1,51 @@
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//ZContent.net//ZapCalLib 1.0//EN
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:PUBLISH
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20250912
|
||||
DTEND:20250921
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251002
|
||||
DTEND:20251005
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251020
|
||||
DTEND:20251103
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251223
|
||||
DTEND:20251228
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251230
|
||||
DTEND:20260102
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251231
|
||||
DTEND:20260102
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251231
|
||||
DTEND:20260101
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20260102
|
||||
DTEND:20260111
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20260109
|
||||
DTEND:20260110
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20260201
|
||||
DTEND:20260204
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//ZContent.net//ZapCalLib 1.0//EN
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:PUBLISH
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251002
|
||||
DTEND:20251005
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251020
|
||||
DTEND:20251103
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251223
|
||||
DTEND:20251228
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251230
|
||||
DTEND:20260102
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251231
|
||||
DTEND:20260102
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251231
|
||||
DTEND:20260101
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20260102
|
||||
DTEND:20260111
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20260109
|
||||
DTEND:20260110
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20260201
|
||||
DTEND:20260204
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
+51
-56
@@ -1,56 +1,51 @@
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//ZContent.net//ZapCalLib 1.0//EN
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:PUBLISH
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20250912
|
||||
DTEND:20250921
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251002
|
||||
DTEND:20251005
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251020
|
||||
DTEND:20251103
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251223
|
||||
DTEND:20251228
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251230
|
||||
DTEND:20260102
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251231
|
||||
DTEND:20260102
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251231
|
||||
DTEND:20260101
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20260102
|
||||
DTEND:20260111
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20260109
|
||||
DTEND:20260110
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20260201
|
||||
DTEND:20260204
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//ZContent.net//ZapCalLib 1.0//EN
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:PUBLISH
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251002
|
||||
DTEND:20251005
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251020
|
||||
DTEND:20251103
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251223
|
||||
DTEND:20251228
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251230
|
||||
DTEND:20260102
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251231
|
||||
DTEND:20260102
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20251231
|
||||
DTEND:20260101
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20260102
|
||||
DTEND:20260111
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20260109
|
||||
DTEND:20260110
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Urlaub
|
||||
DTSTART:20260201
|
||||
DTEND:20260204
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
+51
-51
@@ -1,52 +1,52 @@
|
||||
<?php
|
||||
|
||||
require_once("./zapcallib.php");
|
||||
include './../inc/config.inc.php';
|
||||
|
||||
$startdate= date('Y-m-d',(strtotime ( '-180 days' ) ));
|
||||
// SQL-Abfrage, um Urlaubstermine abzurufen
|
||||
$sql = 'SELECT DATE_ADD(start, INTERVAL 1 DAY) AS stadate , DATE_ADD(ende, INTERVAL 1 DAY) AS enddate FROM urlaub WHERE start >= "' . $startdate . '"';
|
||||
$sql = 'SELECT start AS stadate , DATE_ADD(ende, INTERVAL 1 DAY) AS enddate FROM urlaub WHERE start >= "' . $startdate . '"';
|
||||
#echo $sql;
|
||||
$result = mysqli_query($con, $sql);
|
||||
|
||||
// create the ical object
|
||||
$icalobj = new ZCiCal();
|
||||
|
||||
$title = "Urlaub";
|
||||
|
||||
// Iteriere durch die Ergebnisse und füge Events zur iCal-Datei hinzu
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
// create the event within the ical object
|
||||
$eventobj = new ZCiCalNode("VEVENT", $icalobj->curnode);
|
||||
|
||||
// add title
|
||||
$eventobj->addNode(new ZCiCalDataNode("SUMMARY:" . $title));
|
||||
|
||||
// add start date
|
||||
$eventobj->addNode(new ZCiCalDataNode("DTSTART:" . ZCiCal::fromSqlDateTime($row["stadate"])));
|
||||
|
||||
// add end date
|
||||
$eventobj->addNode(new ZCiCalDataNode("DTEND:" . ZCiCal::fromSqlDateTime($row["enddate"])));
|
||||
|
||||
}
|
||||
|
||||
// iCal-Datei ausgeben
|
||||
file_put_contents("kalender.ics", $icalobj->export());
|
||||
file_put_contents("kalender.ical", $icalobj->export());
|
||||
echo "Aktualisierung angestossen. Bitte Kalender pruefen.<br>Wenn in dieser Liste der Eintrag steht, dann sind Anfragen und Telefonanlage vorbereitet!<br><br>";
|
||||
#echo file_get_contents('./kalender.ical', true);
|
||||
$handle = fopen("./kalender.ical", "r");
|
||||
if ($handle) {
|
||||
while (($line = fgets($handle)) !== false) {
|
||||
// process the line read.
|
||||
echo $line . "<br>";
|
||||
}
|
||||
|
||||
fclose($handle);
|
||||
}
|
||||
echo"<br>Der letzte oder vorherige Eintrag bei DTSTART und DTEND sollte das gewuenschte Urlaubsdatum plus einen Tag haben.<br>
|
||||
20240330 steht fuer den 30.03.2024.<br>
|
||||
";
|
||||
|
||||
<?php
|
||||
|
||||
require_once("./zapcallib.php");
|
||||
include './../inc/config.inc.php';
|
||||
|
||||
$startdate= date('Y-m-d',(strtotime ( '-180 days' ) ));
|
||||
// SQL-Abfrage, um Urlaubstermine abzurufen
|
||||
$sql = 'SELECT DATE_ADD(start, INTERVAL 1 DAY) AS stadate , DATE_ADD(ende, INTERVAL 1 DAY) AS enddate FROM urlaub WHERE start >= "' . $startdate . '"';
|
||||
$sql = 'SELECT start AS stadate , DATE_ADD(ende, INTERVAL 1 DAY) AS enddate FROM urlaub WHERE start >= "' . $startdate . '"';
|
||||
#echo $sql;
|
||||
$result = mysqli_query($con, $sql);
|
||||
|
||||
// create the ical object
|
||||
$icalobj = new ZCiCal();
|
||||
|
||||
$title = "Urlaub";
|
||||
|
||||
// Iteriere durch die Ergebnisse und füge Events zur iCal-Datei hinzu
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
// create the event within the ical object
|
||||
$eventobj = new ZCiCalNode("VEVENT", $icalobj->curnode);
|
||||
|
||||
// add title
|
||||
$eventobj->addNode(new ZCiCalDataNode("SUMMARY:" . $title));
|
||||
|
||||
// add start date
|
||||
$eventobj->addNode(new ZCiCalDataNode("DTSTART:" . ZCiCal::fromSqlDateTime($row["stadate"])));
|
||||
|
||||
// add end date
|
||||
$eventobj->addNode(new ZCiCalDataNode("DTEND:" . ZCiCal::fromSqlDateTime($row["enddate"])));
|
||||
|
||||
}
|
||||
|
||||
// iCal-Datei ausgeben
|
||||
file_put_contents("kalender.ics", $icalobj->export());
|
||||
file_put_contents("kalender.ical", $icalobj->export());
|
||||
echo "Aktualisierung angestossen. Bitte Kalender pruefen.<br>Wenn in dieser Liste der Eintrag steht, dann sind Anfragen und Telefonanlage vorbereitet!<br><br>";
|
||||
#echo file_get_contents('./kalender.ical', true);
|
||||
$handle = fopen("./kalender.ical", "r");
|
||||
if ($handle) {
|
||||
while (($line = fgets($handle)) !== false) {
|
||||
// process the line read.
|
||||
echo $line . "<br>";
|
||||
}
|
||||
|
||||
fclose($handle);
|
||||
}
|
||||
echo"<br>Der letzte oder vorherige Eintrag bei DTSTART und DTEND sollte das gewuenschte Urlaubsdatum plus einen Tag haben.<br>
|
||||
20240330 steht fuer den 30.03.2024.<br>
|
||||
";
|
||||
|
||||
?>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 126 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 229 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg width="720" height="720" viewBox="0 0 720 720" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="720" height="720" rx="36" fill="#F3F4F6"/>
|
||||
<circle cx="360" cy="235" r="112" fill="#9CA3AF"/>
|
||||
<path d="M152 608C152 488.706 248.706 392 368 392H352C471.294 392 568 488.706 568 608V624H152V608Z" fill="#9CA3AF"/>
|
||||
<path d="M228 608C228 530.68 290.68 468 368 468H352C429.32 468 492 530.68 492 608V624H228V608Z" fill="#6B7280"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 452 B |
+1
-1
@@ -1,2 +1,2 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/impfwarteliste.php';
|
||||
require_once __DIR__ . '/impfwarteliste.php';
|
||||
|
||||
+279
-279
@@ -1,292 +1,292 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Impfung Terminbestätigung</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<img src="gif/logo-arzt-creutzburg-coppen.gif" align="left" alt="Praxis Logo Creutzburg, Facharzt für innere Medizin, Schloßstr. 18, 31863 Coppenbrügge, Sprechzeit 8-11:00 Uhr, Tel. 05156 8125" />
|
||||
<h2>Impftermin bestätigen</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
|
||||
<?php
|
||||
|
||||
#include("impfconfig.php");
|
||||
|
||||
if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
|
||||
if(isset($_POST["id"])){
|
||||
$id = $_POST["id"];
|
||||
}else if(isset($_GET["id"])){
|
||||
$id = $_GET["id"];
|
||||
}
|
||||
$queryimpf = mysqli_query($con, "SELECT * FROM impftermin WHERE hash='" . $id . "'");
|
||||
|
||||
if(mysqli_num_rows($queryimpf) == 1){
|
||||
$rowimpf = mysqli_fetch_assoc($queryimpf);
|
||||
//rowimpf = $queryimpf->fetch_assoc() ;
|
||||
$userid = $rowimpf["userid"];
|
||||
$checked = $rowimpf["checked"];
|
||||
$terminid = $rowimpf["terminid"];
|
||||
$timeid = $rowimpf["timeid"];
|
||||
//echo $userid;
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<img src="gif/logo-arzt-creutzburg-coppen.gif" align="left" alt="Praxis Logo Creutzburg, Facharzt für innere Medizin, Schloßstr. 18, 31863 Coppenbrügge, Sprechzeit 8-11:00 Uhr, Tel. 05156 8125" />
|
||||
<h2>Impftermin bestätigen</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
|
||||
<?php
|
||||
|
||||
#include("impfconfig.php");
|
||||
|
||||
if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
|
||||
if(isset($_POST["id"])){
|
||||
$id = $_POST["id"];
|
||||
}else if(isset($_GET["id"])){
|
||||
$id = $_GET["id"];
|
||||
}
|
||||
$queryimpf = mysqli_query($con, "SELECT * FROM impftermin WHERE hash='" . $id . "'");
|
||||
|
||||
if(mysqli_num_rows($queryimpf) == 1){
|
||||
$rowimpf = mysqli_fetch_assoc($queryimpf);
|
||||
//rowimpf = $queryimpf->fetch_assoc() ;
|
||||
$userid = $rowimpf["userid"];
|
||||
$checked = $rowimpf["checked"];
|
||||
$terminid = $rowimpf["terminid"];
|
||||
$timeid = $rowimpf["timeid"];
|
||||
//echo $userid;
|
||||
$queryuser = mysqli_query($con, "SELECT * FROM persons WHERE person_id='" . $userid . "'");
|
||||
$rowuser = mysqli_fetch_assoc($queryuser);
|
||||
//$rowuser = $queryuser->fetch_assoc();
|
||||
$vorname = $rowuser["vorname"];
|
||||
$nachname = $rowuser["nachname"];
|
||||
$rowuser = mysqli_fetch_assoc($queryuser);
|
||||
//$rowuser = $queryuser->fetch_assoc();
|
||||
$vorname = $rowuser["vorname"];
|
||||
$nachname = $rowuser["nachname"];
|
||||
$mail = $rowuser["email"];
|
||||
//echo $mail;
|
||||
$tel = $rowuser["tele"];
|
||||
//echo $mail;
|
||||
$tel = $rowuser["tele"];
|
||||
$userausgabe = $vorname . " " . $nachname;
|
||||
$querytime = mysqli_query($con, "Select date,start,ende,impfstoff,impfortid FROM timeslots WHERE timeid='" . $timeid . "'");
|
||||
$rowtime = mysqli_fetch_assoc($querytime);
|
||||
//$rowtime = $querytime->fetch_assoc();
|
||||
$datum = date("d.m.Y", strtotime($rowtime["date"]));
|
||||
$start = substr($rowtime["start"],0, 5);
|
||||
$ende = substr($rowtime["ende"],0, 5);
|
||||
|
||||
// Impfstoff
|
||||
$impfstoff = $rowtime["impfstoff"];
|
||||
$sqlimpfstoffstring = "SELECT * FROM impfstoff WHERE impfid ='" . $impfstoff . "'";
|
||||
$queryimpfstoff = mysqli_query($con,$sqlimpfstoffstring);
|
||||
$rowimpf = mysqli_fetch_assoc($queryimpfstoff);
|
||||
$impfstofftext = $rowimpf["impfname"];
|
||||
|
||||
$impfortid = $rowtime["impfortid"];
|
||||
$sqlimpfortstring = "SELECT * FROM impfort WHERE ortid ='" . $impfortid . "'";
|
||||
$queryimpfort = mysqli_query($con,$sqlimpfortstring);
|
||||
$rowimpfort = mysqli_fetch_assoc($queryimpfort);
|
||||
$impforttext = $rowimpfort["anzeigename"] ."- " . $rowimpfort["adresse"];
|
||||
$impforttext = iconv('CP1252//IGNORE', 'UTF-8' , $impforttext);
|
||||
|
||||
$mailbetreff = "Ihre Coronaimpfung bei Praxis Creutzburg";
|
||||
|
||||
$Zeitanzeige = $datum . " " . $start . "-" . $ende ;
|
||||
if($checked == 0){
|
||||
echo "<h4>Sie haben Ihren Termin aktuell noch nicht bestätigt!<br><br></h4><br>";
|
||||
echo "<h4>Sagen Sie einen zugesagten Termin ab, werden Sie für 7 Tage für weitere Termine gesperrt!</h4><br>Sein Sie solidarisch und kommen Sie zu Ihren festgelegten Termin!<br>Doppelbuchung und Falschangaben führen zum generellen Ausschluss einer Impfung!<br>";
|
||||
echo "Sie haben die folgenden Termindaten:<br><br>";
|
||||
echo "<h4>Name: $userausgabe</h4>";
|
||||
echo "<h4>Zeit: $Zeitanzeige</h4>";
|
||||
echo "<h4>Impfstoff: $impfstofftext</h4>";
|
||||
echo "<h4>Impfort: $impforttext</h4><br>";
|
||||
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="hidden" name="terminid" id="terminid" value="'. $terminid .'" />';
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="2" />';
|
||||
echo '<input type="submit" id="submitbox" value="Termin ZUSAGEN" />';
|
||||
echo "</form>";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="1" />';
|
||||
echo '<input type="hidden" name="terminid" id="terminid" value="'. $terminid .'" />';
|
||||
echo '<input type="submit" id="submitbox" value="Termin ABSAGEN!" />';
|
||||
echo "</form>";
|
||||
|
||||
}else if($checked == 1){
|
||||
echo "<h4>Sie haben Ihren Termin bestätigt!<br><b>Vielen Dank!</b><br><br></h4><br>";
|
||||
echo "<h4>Sagen Sie einen zugesagten Termin ab, werden Sie für 7 Tage für weitere Termine gesperrt!</h4><br>Sein Sie solidarisch und kommen Sie zu Ihren festgelegten Termin!<br>Doppelbuchung und Falschangaben führen zum generellen Ausschluss einer Impfung!<br>";
|
||||
echo "Sie haben die folgenden Termindaten:<br><br>";
|
||||
echo "<h4>Name: $userausgabe</h4>";
|
||||
echo "<h4>Zeit: $Zeitanzeige</h4>";
|
||||
echo "<h4>Impfstoff: $impfstofftext</h4>";
|
||||
echo "<h4>Impfort: $impforttext</h4><br>";
|
||||
|
||||
echo "Können Sie Ihren Termin nicht wahrnehmen tragen Sie sich bitte aus:<br>";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="1" />';
|
||||
echo '<input type="hidden" name="terminid" id="terminid" value="'. $terminid .'" />';
|
||||
echo '<input type="submit" id="submitbox" value="Termin ABSAGEN!" />';
|
||||
echo "</form>";
|
||||
|
||||
|
||||
}else if($checked == 2){
|
||||
echo "<h4>Ihr Termin wurde erfolgreich abgesagt!!</h4><br>Wünschen Sie einen neuen Termin, tragen Sie sich wieder über das Formular ein.<br>";
|
||||
|
||||
|
||||
}else if($checked == 3){
|
||||
echo "<h4>Ihr Termin wurde vom Praxisteam storniert!</h4><br>Wünschen Sie einen neuen Termin, tragen Sie sich wieder über das Formular ein.<br>";
|
||||
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
echo "<h4>Leider konnten wir Ihre Anforderung nicht verarbeiten.</h4><br>Bitte überprüfen Sie den aufgerufenden Link.<br><br>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else if($_POST["aktion"] == 1){
|
||||
echo "Wollen Sie wirklich Ihren Termin absagen?<br>Dieses ist nicht rückgängig zu machen!<br>Dann bestätigen Sie die Abmeldung:<br>";
|
||||
echo "<b>Achtung!</b> Sagen Sie Ihren festgelegten Termin ab, können Sie eine Woche keinen neuen Termin beantragen.<br>";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="3" />';
|
||||
echo '<input type="hidden" name="terminid" id="terminid" value="'. $_POST["terminid"] .'" /><br>';
|
||||
echo '<input type="submit" id="submitbox" value="Termin ABSAGEN!" />';
|
||||
echo "</form>";
|
||||
|
||||
|
||||
}else if($_POST["aktion"] == 2){
|
||||
|
||||
$querychecked = mysqli_query($con, "SELECT checked FROM impftermin WHERE terminid='" . $_POST["terminid"] . "'");
|
||||
$rowchecked = mysqli_fetch_assoc($querychecked);
|
||||
//$rowchecked = $querychecked->fetch_assoc() ;
|
||||
$checked = $rowchecked["checked"];
|
||||
if($checked >= 1){
|
||||
echo "<h4>Sie haben Ihren Termin schon bestätigt.</h4>";
|
||||
|
||||
}else{
|
||||
$query = mysqli_query($con, "Update impftermin SET checked='1' WHERE terminid ='".$_POST["terminid"]."'");
|
||||
if($query){
|
||||
echo "<h4>Ihr Termin wurde erfolgreich bestätigt!<h4><br>";
|
||||
echo "Sie erhalten gleiche eine schriftliche Bestätigung per E-Mail<br>";
|
||||
|
||||
|
||||
$queryimpf = mysqli_query($con, "SELECT * FROM impftermin WHERE terminid='" . $_POST["terminid"] . "'");
|
||||
$rowimpf = mysqli_fetch_assoc($queryimpf);
|
||||
//$rowimpf = $queryimpf->fetch_assoc() ;
|
||||
$userid = $rowimpf["userid"];
|
||||
$checked = $rowimpf["checked"];
|
||||
$terminid = $rowimpf["terminid"];
|
||||
$timeid = $rowimpf["timeid"];
|
||||
//echo $userid;
|
||||
$querytime = mysqli_query($con, "Select date,start,ende,impfstoff,impfortid FROM timeslots WHERE timeid='" . $timeid . "'");
|
||||
$rowtime = mysqli_fetch_assoc($querytime);
|
||||
//$rowtime = $querytime->fetch_assoc();
|
||||
$datum = date("d.m.Y", strtotime($rowtime["date"]));
|
||||
$start = substr($rowtime["start"],0, 5);
|
||||
$ende = substr($rowtime["ende"],0, 5);
|
||||
|
||||
// Impfstoff
|
||||
$impfstoff = $rowtime["impfstoff"];
|
||||
$sqlimpfstoffstring = "SELECT * FROM impfstoff WHERE impfid ='" . $impfstoff . "'";
|
||||
$queryimpfstoff = mysqli_query($con,$sqlimpfstoffstring);
|
||||
$rowimpf = mysqli_fetch_assoc($queryimpfstoff);
|
||||
$impfstofftext = $rowimpf["impfname"];
|
||||
|
||||
$impfortid = $rowtime["impfortid"];
|
||||
$sqlimpfortstring = "SELECT * FROM impfort WHERE ortid ='" . $impfortid . "'";
|
||||
$queryimpfort = mysqli_query($con,$sqlimpfortstring);
|
||||
$rowimpfort = mysqli_fetch_assoc($queryimpfort);
|
||||
$impforttext = $rowimpfort["anzeigename"] ."- " . $rowimpfort["adresse"];
|
||||
$impforttext = iconv('CP1252//IGNORE', 'UTF-8' , $impforttext);
|
||||
|
||||
$mailbetreff = "Ihre Coronaimpfung bei Praxis Creutzburg";
|
||||
|
||||
$Zeitanzeige = $datum . " " . $start . "-" . $ende ;
|
||||
if($checked == 0){
|
||||
echo "<h4>Sie haben Ihren Termin aktuell noch nicht bestätigt!<br><br></h4><br>";
|
||||
echo "<h4>Sagen Sie einen zugesagten Termin ab, werden Sie für 7 Tage für weitere Termine gesperrt!</h4><br>Sein Sie solidarisch und kommen Sie zu Ihren festgelegten Termin!<br>Doppelbuchung und Falschangaben führen zum generellen Ausschluss einer Impfung!<br>";
|
||||
echo "Sie haben die folgenden Termindaten:<br><br>";
|
||||
echo "<h4>Name: $userausgabe</h4>";
|
||||
echo "<h4>Zeit: $Zeitanzeige</h4>";
|
||||
echo "<h4>Impfstoff: $impfstofftext</h4>";
|
||||
echo "<h4>Impfort: $impforttext</h4><br>";
|
||||
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="hidden" name="terminid" id="terminid" value="'. $terminid .'" />';
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="2" />';
|
||||
echo '<input type="submit" id="submitbox" value="Termin ZUSAGEN" />';
|
||||
echo "</form>";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="1" />';
|
||||
echo '<input type="hidden" name="terminid" id="terminid" value="'. $terminid .'" />';
|
||||
echo '<input type="submit" id="submitbox" value="Termin ABSAGEN!" />';
|
||||
echo "</form>";
|
||||
|
||||
}else if($checked == 1){
|
||||
echo "<h4>Sie haben Ihren Termin bestätigt!<br><b>Vielen Dank!</b><br><br></h4><br>";
|
||||
echo "<h4>Sagen Sie einen zugesagten Termin ab, werden Sie für 7 Tage für weitere Termine gesperrt!</h4><br>Sein Sie solidarisch und kommen Sie zu Ihren festgelegten Termin!<br>Doppelbuchung und Falschangaben führen zum generellen Ausschluss einer Impfung!<br>";
|
||||
echo "Sie haben die folgenden Termindaten:<br><br>";
|
||||
echo "<h4>Name: $userausgabe</h4>";
|
||||
echo "<h4>Zeit: $Zeitanzeige</h4>";
|
||||
echo "<h4>Impfstoff: $impfstofftext</h4>";
|
||||
echo "<h4>Impfort: $impforttext</h4><br>";
|
||||
|
||||
echo "Können Sie Ihren Termin nicht wahrnehmen tragen Sie sich bitte aus:<br>";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="1" />';
|
||||
echo '<input type="hidden" name="terminid" id="terminid" value="'. $terminid .'" />';
|
||||
echo '<input type="submit" id="submitbox" value="Termin ABSAGEN!" />';
|
||||
echo "</form>";
|
||||
|
||||
|
||||
}else if($checked == 2){
|
||||
echo "<h4>Ihr Termin wurde erfolgreich abgesagt!!</h4><br>Wünschen Sie einen neuen Termin, tragen Sie sich wieder über das Formular ein.<br>";
|
||||
|
||||
|
||||
}else if($checked == 3){
|
||||
echo "<h4>Ihr Termin wurde vom Praxisteam storniert!</h4><br>Wünschen Sie einen neuen Termin, tragen Sie sich wieder über das Formular ein.<br>";
|
||||
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
echo "<h4>Leider konnten wir Ihre Anforderung nicht verarbeiten.</h4><br>Bitte überprüfen Sie den aufgerufenden Link.<br><br>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else if($_POST["aktion"] == 1){
|
||||
echo "Wollen Sie wirklich Ihren Termin absagen?<br>Dieses ist nicht rückgängig zu machen!<br>Dann bestätigen Sie die Abmeldung:<br>";
|
||||
echo "<b>Achtung!</b> Sagen Sie Ihren festgelegten Termin ab, können Sie eine Woche keinen neuen Termin beantragen.<br>";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="hidden" name="aktion" id="aktion" value="3" />';
|
||||
echo '<input type="hidden" name="terminid" id="terminid" value="'. $_POST["terminid"] .'" /><br>';
|
||||
echo '<input type="submit" id="submitbox" value="Termin ABSAGEN!" />';
|
||||
echo "</form>";
|
||||
|
||||
|
||||
}else if($_POST["aktion"] == 2){
|
||||
|
||||
$querychecked = mysqli_query($con, "SELECT checked FROM impftermin WHERE terminid='" . $_POST["terminid"] . "'");
|
||||
$rowchecked = mysqli_fetch_assoc($querychecked);
|
||||
//$rowchecked = $querychecked->fetch_assoc() ;
|
||||
$checked = $rowchecked["checked"];
|
||||
if($checked >= 1){
|
||||
echo "<h4>Sie haben Ihren Termin schon bestätigt.</h4>";
|
||||
|
||||
}else{
|
||||
$query = mysqli_query($con, "Update impftermin SET checked='1' WHERE terminid ='".$_POST["terminid"]."'");
|
||||
if($query){
|
||||
echo "<h4>Ihr Termin wurde erfolgreich bestätigt!<h4><br>";
|
||||
echo "Sie erhalten gleiche eine schriftliche Bestätigung per E-Mail<br>";
|
||||
|
||||
|
||||
$queryimpf = mysqli_query($con, "SELECT * FROM impftermin WHERE terminid='" . $_POST["terminid"] . "'");
|
||||
$rowimpf = mysqli_fetch_assoc($queryimpf);
|
||||
//$rowimpf = $queryimpf->fetch_assoc() ;
|
||||
$userid = $rowimpf["userid"];
|
||||
$checked = $rowimpf["checked"];
|
||||
$terminid = $rowimpf["terminid"];
|
||||
$timeid = $rowimpf["timeid"];
|
||||
//echo $userid;
|
||||
$queryuser = mysqli_query($con, "SELECT * FROM persons WHERE person_id='" . $userid . "'");
|
||||
$rowuser = mysqli_fetch_assoc($queryuser);
|
||||
//$rowuser = $queryuser->fetch_assoc();
|
||||
$vorname = $rowuser["vorname"];
|
||||
$nachname = $rowuser["nachname"];
|
||||
$rowuser = mysqli_fetch_assoc($queryuser);
|
||||
//$rowuser = $queryuser->fetch_assoc();
|
||||
$vorname = $rowuser["vorname"];
|
||||
$nachname = $rowuser["nachname"];
|
||||
$mail = $rowuser["email"];
|
||||
//echo $mail;
|
||||
$tel = $rowuser["tele"];
|
||||
//echo $mail;
|
||||
$tel = $rowuser["tele"];
|
||||
$userausgabe = $vorname . " " . $nachname;
|
||||
$querytime = mysqli_query($con, "Select date,start,ende FROM timeslots WHERE timeid='" . $timeid . "'");
|
||||
$rowtime = mysqli_fetch_assoc($querytime);
|
||||
//$rowtime = $querytime->fetch_assoc();
|
||||
$datum = date("d.m.Y", strtotime($rowtime["date"]));
|
||||
$start = substr($rowtime["start"],0, 5);
|
||||
$ende = substr($rowtime["ende"],0, 5);
|
||||
$Zeitanzeige = $datum . " " . $start. " - " . $ende;
|
||||
|
||||
|
||||
SendMailMessageVorlage($pdo, "1", $terminid, "2");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}else if($_POST["aktion"] == 3){
|
||||
$querychecked = mysqli_query($con, "SELECT checked FROM impftermin WHERE terminid='" . $_POST["terminid"] . "'");
|
||||
$querytime = mysqli_query($con, "Select date,start,ende FROM timeslots WHERE timeid='" . $timeid . "'");
|
||||
$rowtime = mysqli_fetch_assoc($querytime);
|
||||
//$rowtime = $querytime->fetch_assoc();
|
||||
$datum = date("d.m.Y", strtotime($rowtime["date"]));
|
||||
$start = substr($rowtime["start"],0, 5);
|
||||
$ende = substr($rowtime["ende"],0, 5);
|
||||
$Zeitanzeige = $datum . " " . $start. " - " . $ende;
|
||||
|
||||
|
||||
SendMailMessageVorlage($pdo, "1", $terminid, "2");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}else if($_POST["aktion"] == 3){
|
||||
$querychecked = mysqli_query($con, "SELECT checked FROM impftermin WHERE terminid='" . $_POST["terminid"] . "'");
|
||||
$rowchecked = mysqli_fetch_assoc($querychecked);
|
||||
$checked = $rowchecked["checked"];
|
||||
if($checked >= 2){
|
||||
echo "<h4>Sie haben Ihren Termin schon abgesagt.</h4>";
|
||||
|
||||
}else{
|
||||
$query = mysqli_query($con, "Update impftermin SET checked='2' WHERE terminid ='".$_POST["terminid"]."'");
|
||||
if($query){
|
||||
echo "<h4>Ihr Termin wurde erfolgreich gelöscht!<h4><br>";
|
||||
echo "Sie erhalten gleiche eine schriftliche Bestätigung per E-Mail<br>";
|
||||
|
||||
$queryimpf = mysqli_query($con, "SELECT * FROM impftermin WHERE terminid='" . $_POST["terminid"] . "'");
|
||||
$rowimpf = mysqli_fetch_assoc($queryimpf);
|
||||
//$rowimpf = $queryimpf->fetch_assoc() ;
|
||||
$userid = $rowimpf["userid"];
|
||||
$checked = $rowimpf["checked"];
|
||||
$terminid = $rowimpf["terminid"];
|
||||
$timeid = $rowimpf["timeid"];
|
||||
//echo $userid;
|
||||
if($checked >= 2){
|
||||
echo "<h4>Sie haben Ihren Termin schon abgesagt.</h4>";
|
||||
|
||||
}else{
|
||||
$query = mysqli_query($con, "Update impftermin SET checked='2' WHERE terminid ='".$_POST["terminid"]."'");
|
||||
if($query){
|
||||
echo "<h4>Ihr Termin wurde erfolgreich gelöscht!<h4><br>";
|
||||
echo "Sie erhalten gleiche eine schriftliche Bestätigung per E-Mail<br>";
|
||||
|
||||
$queryimpf = mysqli_query($con, "SELECT * FROM impftermin WHERE terminid='" . $_POST["terminid"] . "'");
|
||||
$rowimpf = mysqli_fetch_assoc($queryimpf);
|
||||
//$rowimpf = $queryimpf->fetch_assoc() ;
|
||||
$userid = $rowimpf["userid"];
|
||||
$checked = $rowimpf["checked"];
|
||||
$terminid = $rowimpf["terminid"];
|
||||
$timeid = $rowimpf["timeid"];
|
||||
//echo $userid;
|
||||
$queryuser = mysqli_query($con, "SELECT * FROM persons WHERE person_id='" . $userid . "'");
|
||||
$rowuser = mysqli_fetch_assoc($queryuser);
|
||||
//$rowuser = $queryuser->fetch_assoc();
|
||||
$vorname = $rowuser["vorname"];
|
||||
$nachname = $rowuser["nachname"];
|
||||
$rowuser = mysqli_fetch_assoc($queryuser);
|
||||
//$rowuser = $queryuser->fetch_assoc();
|
||||
$vorname = $rowuser["vorname"];
|
||||
$nachname = $rowuser["nachname"];
|
||||
$mail = $rowuser["email"];
|
||||
//echo $mail;
|
||||
$tel = $rowuser["tele"];
|
||||
//echo $mail;
|
||||
$tel = $rowuser["tele"];
|
||||
$userausgabe = $vorname . " " . $nachname;
|
||||
$querytime = mysqli_query($con, "Select date,start,ende,impfdosen FROM timeslots WHERE timeid='" . $timeid . "'");
|
||||
$rowtime = mysqli_fetch_assoc($querytime);
|
||||
//$rowtime = $querytime->fetch_assoc();
|
||||
$datum = date("d.m.Y", strtotime($rowtime["date"]));
|
||||
$start = substr($rowtime["start"],0, 5);
|
||||
$ende = substr($rowtime["ende"],0, 5);
|
||||
$dosen = $rowtime["impfdosen"];
|
||||
$dosen = $dosen + 1;
|
||||
$Zeitanzeige = $datum . " " . $start. " - " . $ende;
|
||||
$query = mysqli_query($con, "Update timeslots SET impfdosen='".$dosen."' WHERE timeid ='".$timeid."'");
|
||||
|
||||
SendMailMessageVorlage($pdo, "1", $terminid, "3");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
echo "Leider konnten wir Ihre ID-Nummer nicht erkennen.<br>Bitte tragen Sie diese in dem folgendem Feld ein und klicken Sie auf 'Senden'<br><br>";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="text" name="id" id="id" value="" placeholder="ID Kennung aus der E-Mail" required /><br>';
|
||||
echo '<input type="submit" id="submitbox" value="Senden" />';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
$querytime = mysqli_query($con, "Select date,start,ende,impfdosen FROM timeslots WHERE timeid='" . $timeid . "'");
|
||||
$rowtime = mysqli_fetch_assoc($querytime);
|
||||
//$rowtime = $querytime->fetch_assoc();
|
||||
$datum = date("d.m.Y", strtotime($rowtime["date"]));
|
||||
$start = substr($rowtime["start"],0, 5);
|
||||
$ende = substr($rowtime["ende"],0, 5);
|
||||
$dosen = $rowtime["impfdosen"];
|
||||
$dosen = $dosen + 1;
|
||||
$Zeitanzeige = $datum . " " . $start. " - " . $ende;
|
||||
$query = mysqli_query($con, "Update timeslots SET impfdosen='".$dosen."' WHERE timeid ='".$timeid."'");
|
||||
|
||||
SendMailMessageVorlage($pdo, "1", $terminid, "3");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
echo "Leider konnten wir Ihre ID-Nummer nicht erkennen.<br>Bitte tragen Sie diese in dem folgendem Feld ein und klicken Sie auf 'Senden'<br><br>";
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="text" name="id" id="id" value="" placeholder="ID Kennung aus der E-Mail" required /><br>';
|
||||
echo '<input type="submit" id="submitbox" value="Senden" />';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+155
-155
@@ -1,156 +1,156 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Corona Termin Erinnerung</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<img src="gif/logo-arzt-creutzburg-coppen.gif" align="left" alt="Praxis Logo Creutzburg, Facharzt für innere Medizin, Schloßstr. 18, 31863 Coppenbrügge, Sprechzeit 8-11:00 Uhr, Tel. 05156 8125" />
|
||||
<h2>Impftermin online anfordern erfolgreich</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$today =Date("Y-m-d",strtotime("-1 days"));
|
||||
|
||||
$querytermin = mysqli_query($con, "SELECT * FROM impftermin WHERE date_created >= '". $today . "' AND checked = '0'");
|
||||
while ($rowtermin = $querytermin->fetch_assoc()) {
|
||||
$terminid = $rowtermin["terminid"];
|
||||
$hash = $rowtermin["hash"];
|
||||
$userid = $rowtermin["userid"];
|
||||
$timeid = $rowtermin["timeid"];
|
||||
$query = mysqli_query($con, "SELECT * FROM user WHERE userid ='". $userid . "'");
|
||||
while ($row = $query->fetch_assoc()) {
|
||||
$vorname = $row["vorname"];
|
||||
$nachname = $row["nachname"];
|
||||
$jahrgang = $row["jahrgang"];
|
||||
$Email = $row["mail"];
|
||||
$tele = $row["tele"];
|
||||
|
||||
|
||||
|
||||
echo "$Email <br><br>";
|
||||
/*
|
||||
$querytime = mysqli_query($con, "Select date,start,ende FROM timeslots WHERE timeid='" . $timeid . "'");
|
||||
$rowtime = $querytime->fetch_assoc();
|
||||
$datum = date("d.m.Y", strtotime($rowtime["date"]));
|
||||
$start = substr($rowtime["start"],0, 5);
|
||||
$ende = substr($rowtime["ende"],0, 5);
|
||||
$Zeitanzeige = $datum . " " . $start. " - " . $ende;
|
||||
|
||||
$hashaufruf = "https://praxis-creutzburg.de/impfbestaetigung.php?id=$hash";
|
||||
|
||||
$nachricht = "<meta http-equiv='Content-Type' content='text/html charset=UTF-8' />
|
||||
Sehr geehrte(r) Herr/Frau $nachname,<br><br><b>Ihre Impftermin Anfrage bei Praxis-Creutzburg war erfolgreich!</b><br>
|
||||
Bitte bestätigten Sie Ihre Impfanfrage noch über dieses Formular:<br>
|
||||
<a href=$hashaufruf style='box-shadow:inset 0px -1px 15px 3px #23395e;background:linear-gradient(to bottom, #2e466e 5%, #415989 100%);background-color:#2e466e;border-radius:17px;border:1px solid #1f2f47;display:inline-block;cursor:pointer;color:#ffffff;font-family:Arial;font-size:27px;padding:20px 57px;text-decoration:none;text-shadow:0px 1px 0px #263666;' >Impftermin bestätigen</a><br><br>
|
||||
oder geben Sie die folgende Zeile in Ihrem Browser in die Adressezeile ein:<br>
|
||||
$hashaufruf<br>
|
||||
<b>Bitte bestätigen Sie Ihren Termin innerhalb von 24 Stunden!</b><br>
|
||||
Anderenfalls wird der Termin automatisch storniert.<br><br>
|
||||
Erscheinen Sie nicht zum Termin wird eine Aufwandentschädigung von 50€ fällig.<br>
|
||||
Sie können den Termin bis einen Tag vor dem Termin kostenfrei stornieren.<br><br>
|
||||
|
||||
<p>Die Impfunterlagen liegen zwei Tage vor dem Impftermin ausgedruckt aussen neben der Eingangstuer, vor der Praxis fuer Sie bereit, wenn Sie keine Moeglichkeiten zum ausdrucken haben!
|
||||
Impfaufklaerung und Einwilligung sind zusammengeheftet, beide Dokumente muessen Unterschrieben werden.</p>
|
||||
|
||||
https://www.praxis-creutzburg.de/impfunterlagen.php<br>
|
||||
Hier koennen Sie die Unterlagen zum ausdrucken herunterladen.<br>
|
||||
Unterschreiben Sie die Einwilligungserklaerung und die Impfaufklaerung!<br><b>Zwei Dokumente, zwei Unterschriften!</b><br>
|
||||
|
||||
<h4>Bitte rufen Sie uns nicht wegen Impfterminen an! </h4>
|
||||
|
||||
<b>Ihre Angaben</b><br><br>
|
||||
Name: $vorname $nachname<br>
|
||||
Termin: $Zeitanzeige<br>
|
||||
<br>
|
||||
Bitte sein Sie pünktlich zum Termin vor Ort.<br>Vielen Dank für <b>Ihre Mithilfe</b>!<br>
|
||||
<br>
|
||||
Ihr Praxis-Team<br>
|
||||
der Praxis Creutzburg<br>
|
||||
|
||||
|
||||
|
||||
";
|
||||
|
||||
echo "<h3>Nachricht abgeschickt!</h3> ";
|
||||
$betreff = 'Impftermin-Anfrage bei Praxis Creuzburg';
|
||||
|
||||
SendMailMessage($con, $Email, $betreff, $nachricht);
|
||||
*/
|
||||
SendMailMessageVorlage($pdo, "1", $terminid, "31");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<a href="impfanmeldung.php" class="button">Impftermin sichern</a>
|
||||
<br><br>
|
||||
Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich.<br>
|
||||
Elektronische Nachrichten können von Dritten gelesen werden. Bei Bedenken nutzen Sie unsere Rezepthotline für alle Serviceleistungen: 05156 99 03 77
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Corona Termin Erinnerung</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<img src="gif/logo-arzt-creutzburg-coppen.gif" align="left" alt="Praxis Logo Creutzburg, Facharzt für innere Medizin, Schloßstr. 18, 31863 Coppenbrügge, Sprechzeit 8-11:00 Uhr, Tel. 05156 8125" />
|
||||
<h2>Impftermin online anfordern erfolgreich</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$today =Date("Y-m-d",strtotime("-1 days"));
|
||||
|
||||
$querytermin = mysqli_query($con, "SELECT * FROM impftermin WHERE date_created >= '". $today . "' AND checked = '0'");
|
||||
while ($rowtermin = $querytermin->fetch_assoc()) {
|
||||
$terminid = $rowtermin["terminid"];
|
||||
$hash = $rowtermin["hash"];
|
||||
$userid = $rowtermin["userid"];
|
||||
$timeid = $rowtermin["timeid"];
|
||||
$query = mysqli_query($con, "SELECT * FROM user WHERE userid ='". $userid . "'");
|
||||
while ($row = $query->fetch_assoc()) {
|
||||
$vorname = $row["vorname"];
|
||||
$nachname = $row["nachname"];
|
||||
$jahrgang = $row["jahrgang"];
|
||||
$Email = $row["mail"];
|
||||
$tele = $row["tele"];
|
||||
|
||||
|
||||
|
||||
echo "$Email <br><br>";
|
||||
/*
|
||||
$querytime = mysqli_query($con, "Select date,start,ende FROM timeslots WHERE timeid='" . $timeid . "'");
|
||||
$rowtime = $querytime->fetch_assoc();
|
||||
$datum = date("d.m.Y", strtotime($rowtime["date"]));
|
||||
$start = substr($rowtime["start"],0, 5);
|
||||
$ende = substr($rowtime["ende"],0, 5);
|
||||
$Zeitanzeige = $datum . " " . $start. " - " . $ende;
|
||||
|
||||
$hashaufruf = "https://praxis-creutzburg.de/impfbestaetigung.php?id=$hash";
|
||||
|
||||
$nachricht = "<meta http-equiv='Content-Type' content='text/html charset=UTF-8' />
|
||||
Sehr geehrte(r) Herr/Frau $nachname,<br><br><b>Ihre Impftermin Anfrage bei Praxis-Creutzburg war erfolgreich!</b><br>
|
||||
Bitte bestätigten Sie Ihre Impfanfrage noch über dieses Formular:<br>
|
||||
<a href=$hashaufruf style='box-shadow:inset 0px -1px 15px 3px #23395e;background:linear-gradient(to bottom, #2e466e 5%, #415989 100%);background-color:#2e466e;border-radius:17px;border:1px solid #1f2f47;display:inline-block;cursor:pointer;color:#ffffff;font-family:Arial;font-size:27px;padding:20px 57px;text-decoration:none;text-shadow:0px 1px 0px #263666;' >Impftermin bestätigen</a><br><br>
|
||||
oder geben Sie die folgende Zeile in Ihrem Browser in die Adressezeile ein:<br>
|
||||
$hashaufruf<br>
|
||||
<b>Bitte bestätigen Sie Ihren Termin innerhalb von 24 Stunden!</b><br>
|
||||
Anderenfalls wird der Termin automatisch storniert.<br><br>
|
||||
Erscheinen Sie nicht zum Termin wird eine Aufwandentschädigung von 50€ fällig.<br>
|
||||
Sie können den Termin bis einen Tag vor dem Termin kostenfrei stornieren.<br><br>
|
||||
|
||||
<p>Die Impfunterlagen liegen zwei Tage vor dem Impftermin ausgedruckt aussen neben der Eingangstuer, vor der Praxis fuer Sie bereit, wenn Sie keine Moeglichkeiten zum ausdrucken haben!
|
||||
Impfaufklaerung und Einwilligung sind zusammengeheftet, beide Dokumente muessen Unterschrieben werden.</p>
|
||||
|
||||
https://www.praxis-creutzburg.de/impfunterlagen.php<br>
|
||||
Hier koennen Sie die Unterlagen zum ausdrucken herunterladen.<br>
|
||||
Unterschreiben Sie die Einwilligungserklaerung und die Impfaufklaerung!<br><b>Zwei Dokumente, zwei Unterschriften!</b><br>
|
||||
|
||||
<h4>Bitte rufen Sie uns nicht wegen Impfterminen an! </h4>
|
||||
|
||||
<b>Ihre Angaben</b><br><br>
|
||||
Name: $vorname $nachname<br>
|
||||
Termin: $Zeitanzeige<br>
|
||||
<br>
|
||||
Bitte sein Sie pünktlich zum Termin vor Ort.<br>Vielen Dank für <b>Ihre Mithilfe</b>!<br>
|
||||
<br>
|
||||
Ihr Praxis-Team<br>
|
||||
der Praxis Creutzburg<br>
|
||||
|
||||
|
||||
|
||||
";
|
||||
|
||||
echo "<h3>Nachricht abgeschickt!</h3> ";
|
||||
$betreff = 'Impftermin-Anfrage bei Praxis Creuzburg';
|
||||
|
||||
SendMailMessage($con, $Email, $betreff, $nachricht);
|
||||
*/
|
||||
SendMailMessageVorlage($pdo, "1", $terminid, "31");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<a href="impfanmeldung.php" class="button">Impftermin sichern</a>
|
||||
<br><br>
|
||||
Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich.<br>
|
||||
Elektronische Nachrichten können von Dritten gelesen werden. Bei Bedenken nutzen Sie unsere Rezepthotline für alle Serviceleistungen: 05156 99 03 77
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+164
-164
@@ -1,165 +1,165 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Corona Termin Löschung</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<img src="gif/logo-arzt-creutzburg-coppen.gif" align="left" alt="Praxis Logo Creutzburg, Facharzt für innere Medizin, Schloßstr. 18, 31863 Coppenbrügge, Sprechzeit 8-11:00 Uhr, Tel. 05156 8125" />
|
||||
<h2>Impftermin online anfordern</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
//echo $_GET["aktion"];
|
||||
if(isset($_GET["aktion"])) {
|
||||
if( $_GET["aktion"] == "AufrufzurLoeschung"){
|
||||
|
||||
|
||||
$today = date("Y-m-d");
|
||||
$yesterday = Date('Y-m-d', strtotime('-1 day'));
|
||||
$yesteryesterday = Date('Y-m-d', strtotime('-2 days'));
|
||||
$querytermin = mysqli_query($con, "SELECT * FROM impftermin INNER JOIN timeslots ON impftermin.timeid = timeslots.timeid WHERE date_created <= '". $yesteryesterday . "' AND checked = '0'");
|
||||
while ($rowtermin = $querytermin->fetch_assoc()) {
|
||||
$terminid = $rowtermin["terminid"];
|
||||
$hash = $rowtermin["hash"];
|
||||
$userid = $rowtermin["userid"];
|
||||
$timeid = $rowtermin["timeid"];
|
||||
$query = mysqli_query($con, "SELECT * FROM user WHERE userid ='". $userid . "'");
|
||||
$row = $query->fetch_assoc();
|
||||
$vorname = $row["vorname"];
|
||||
$nachname = $row["nachname"];
|
||||
$jahrgang = $row["jahrgang"];
|
||||
$mail = $row["mail"];
|
||||
$tele = $row["tele"];
|
||||
|
||||
echo "Löschen Id $terminid <br>";
|
||||
|
||||
$datum = date("d.m.Y", strtotime($row["date"]));
|
||||
$start = substr($row["start"],0, 5);
|
||||
$ende = substr($row["ende"],0, 5);
|
||||
$Zeitanzeige = $datum . " " . $start. " - " . $ende;
|
||||
$queryloeschen = mysqli_query($con, "Update impftermin SET checked='5' WHERE terminid = '". $terminid . "' ");
|
||||
|
||||
// Impfdosen um einen erhöhen
|
||||
$query = mysqli_query($con, "Select impfdosen FROM timeslots WHERE timeid='".$timeid."'");
|
||||
$row = mysqli_fetch_assoc($query);
|
||||
$dosen = $row["impfdosen"] + 1;
|
||||
$query = mysqli_query($con, "Update timeslots SET impfdosen='".$dosen ."' WHERE timeid ='".$timeid."'");
|
||||
|
||||
if($queryloeschen){
|
||||
|
||||
/*
|
||||
$dosen = $rowtermin["impfdosen"];
|
||||
$dosen = $dosen + 1;
|
||||
$query = mysqli_query($con, "Update timeslots SET impfdosen='".$dosen."' WHERE timeid ='".$timeid."'");
|
||||
|
||||
$nachricht = "<meta http-equiv='Content-Type' content='text/html charset=UTF-8' />
|
||||
Sehr geehrte(r) Herr/Frau $nachname,<br><br>
|
||||
|
||||
Ihre ausgewählter Impftermin wurde storniert, da Sie diesen nicht innerhalb von 24 Stunden bestätigt haben.<br>
|
||||
Termin: $Zeitanzeige<br>
|
||||
<br>
|
||||
Benötigen Sie einen neuen Termin, müssen Sie das Formular erneut ausfüllen.<br>
|
||||
|
||||
<h4>Bitte rufen Sie uns nicht wegen Impfterminen an! </h4>
|
||||
|
||||
<br>Vielen Dank für <b>Ihre Mithilfe</b>!<br>
|
||||
<br>
|
||||
Ihr Praxis-Team<br>
|
||||
der Praxis Creutzburg<br>
|
||||
|
||||
|
||||
|
||||
";
|
||||
$nachricht = iconv('UTF-8', 'CP1252//IGNORE', $nachricht);
|
||||
|
||||
//echo $nachricht;
|
||||
|
||||
echo "<h3>Nachricht abgeschickt!</h3> ";
|
||||
$betreff = 'Impftermin-Anfrage bei Praxis Creuzburg';
|
||||
|
||||
SendMailMessage($con, $mail, $betreff, $nachricht);
|
||||
*/
|
||||
SendMailMessageVorlage($pdo, "1", $terminid, "30");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="impfanmeldung.php" class="button">Impftermin sichern</a>
|
||||
<br><br>
|
||||
Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich.<br>
|
||||
Elektronische Nachrichten können von Dritten gelesen werden. Bei Bedenken nutzen Sie unsere Rezepthotline für alle Serviceleistungen: 05156 99 03 77
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Corona Termin Löschung</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<img src="gif/logo-arzt-creutzburg-coppen.gif" align="left" alt="Praxis Logo Creutzburg, Facharzt für innere Medizin, Schloßstr. 18, 31863 Coppenbrügge, Sprechzeit 8-11:00 Uhr, Tel. 05156 8125" />
|
||||
<h2>Impftermin online anfordern</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
//echo $_GET["aktion"];
|
||||
if(isset($_GET["aktion"])) {
|
||||
if( $_GET["aktion"] == "AufrufzurLoeschung"){
|
||||
|
||||
|
||||
$today = date("Y-m-d");
|
||||
$yesterday = Date('Y-m-d', strtotime('-1 day'));
|
||||
$yesteryesterday = Date('Y-m-d', strtotime('-2 days'));
|
||||
$querytermin = mysqli_query($con, "SELECT * FROM impftermin INNER JOIN timeslots ON impftermin.timeid = timeslots.timeid WHERE date_created <= '". $yesteryesterday . "' AND checked = '0'");
|
||||
while ($rowtermin = $querytermin->fetch_assoc()) {
|
||||
$terminid = $rowtermin["terminid"];
|
||||
$hash = $rowtermin["hash"];
|
||||
$userid = $rowtermin["userid"];
|
||||
$timeid = $rowtermin["timeid"];
|
||||
$query = mysqli_query($con, "SELECT * FROM user WHERE userid ='". $userid . "'");
|
||||
$row = $query->fetch_assoc();
|
||||
$vorname = $row["vorname"];
|
||||
$nachname = $row["nachname"];
|
||||
$jahrgang = $row["jahrgang"];
|
||||
$mail = $row["mail"];
|
||||
$tele = $row["tele"];
|
||||
|
||||
echo "Löschen Id $terminid <br>";
|
||||
|
||||
$datum = date("d.m.Y", strtotime($row["date"]));
|
||||
$start = substr($row["start"],0, 5);
|
||||
$ende = substr($row["ende"],0, 5);
|
||||
$Zeitanzeige = $datum . " " . $start. " - " . $ende;
|
||||
$queryloeschen = mysqli_query($con, "Update impftermin SET checked='5' WHERE terminid = '". $terminid . "' ");
|
||||
|
||||
// Impfdosen um einen erhöhen
|
||||
$query = mysqli_query($con, "Select impfdosen FROM timeslots WHERE timeid='".$timeid."'");
|
||||
$row = mysqli_fetch_assoc($query);
|
||||
$dosen = $row["impfdosen"] + 1;
|
||||
$query = mysqli_query($con, "Update timeslots SET impfdosen='".$dosen ."' WHERE timeid ='".$timeid."'");
|
||||
|
||||
if($queryloeschen){
|
||||
|
||||
/*
|
||||
$dosen = $rowtermin["impfdosen"];
|
||||
$dosen = $dosen + 1;
|
||||
$query = mysqli_query($con, "Update timeslots SET impfdosen='".$dosen."' WHERE timeid ='".$timeid."'");
|
||||
|
||||
$nachricht = "<meta http-equiv='Content-Type' content='text/html charset=UTF-8' />
|
||||
Sehr geehrte(r) Herr/Frau $nachname,<br><br>
|
||||
|
||||
Ihre ausgewählter Impftermin wurde storniert, da Sie diesen nicht innerhalb von 24 Stunden bestätigt haben.<br>
|
||||
Termin: $Zeitanzeige<br>
|
||||
<br>
|
||||
Benötigen Sie einen neuen Termin, müssen Sie das Formular erneut ausfüllen.<br>
|
||||
|
||||
<h4>Bitte rufen Sie uns nicht wegen Impfterminen an! </h4>
|
||||
|
||||
<br>Vielen Dank für <b>Ihre Mithilfe</b>!<br>
|
||||
<br>
|
||||
Ihr Praxis-Team<br>
|
||||
der Praxis Creutzburg<br>
|
||||
|
||||
|
||||
|
||||
";
|
||||
$nachricht = iconv('UTF-8', 'CP1252//IGNORE', $nachricht);
|
||||
|
||||
//echo $nachricht;
|
||||
|
||||
echo "<h3>Nachricht abgeschickt!</h3> ";
|
||||
$betreff = 'Impftermin-Anfrage bei Praxis Creuzburg';
|
||||
|
||||
SendMailMessage($con, $mail, $betreff, $nachricht);
|
||||
*/
|
||||
SendMailMessageVorlage($pdo, "1", $terminid, "30");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="impfanmeldung.php" class="button">Impftermin sichern</a>
|
||||
<br><br>
|
||||
Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich.<br>
|
||||
Elektronische Nachrichten können von Dritten gelesen werden. Bei Bedenken nutzen Sie unsere Rezepthotline für alle Serviceleistungen: 05156 99 03 77
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+174
-27
@@ -8,6 +8,32 @@
|
||||
<head>
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', '1');
|
||||
register_shutdown_function(static function (): void {
|
||||
$error = error_get_last();
|
||||
if ($error === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$fatalTypes = [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR];
|
||||
if (!in_array((int)$error['type'], $fatalTypes, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!headers_sent()) {
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
}
|
||||
|
||||
echo '<div style="max-width:900px;margin:20px auto;padding:16px;border:3px solid #b30000;background:#fff7f7;color:#111;font-family:Arial,sans-serif;">'
|
||||
. '<h3 style="margin-top:0;">Fehler in impfwarteliste.php</h3>'
|
||||
. '<p>Die Seite ist wegen eines PHP-Fehlers abgebrochen.</p>'
|
||||
. '<p><strong>Meldung:</strong> ' . htmlspecialchars((string)$error['message'], ENT_QUOTES, 'UTF-8') . '<br>'
|
||||
. '<strong>Datei:</strong> ' . htmlspecialchars((string)$error['file'], ENT_QUOTES, 'UTF-8') . '<br>'
|
||||
. '<strong>Zeile:</strong> ' . (int)$error['line'] . '</p>'
|
||||
. '</div>';
|
||||
});
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
@@ -26,11 +52,17 @@
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/impfworkflow_notifications.inc.php');
|
||||
$workflowSetupError = '';
|
||||
if ($con instanceof mysqli) {
|
||||
mysqli_set_charset($con, "utf8mb4");
|
||||
}
|
||||
if (isset($pdo) && $pdo instanceof PDO) {
|
||||
impfWorkflowEnsureTables($pdo);
|
||||
try {
|
||||
impfWorkflowEnsureTables($pdo);
|
||||
} catch (Throwable $e) {
|
||||
$workflowSetupError = $e->getMessage();
|
||||
}
|
||||
}
|
||||
$zeitOptionenJson = "{}";
|
||||
?>
|
||||
@@ -57,11 +89,20 @@ $mailbetreff = "Ihr Wartelistenplatz für eine Impfung bei Praxis Creutzburg";
|
||||
|
||||
<section class="box special">
|
||||
<h2>Impfwarteliste</h2>
|
||||
<?php if ($workflowSetupError !== ''): ?>
|
||||
<div style="border:3px solid red; margin: 10px 0; padding: 10px; text-align:left;">
|
||||
Die Impfworkflow-Tabellen konnten nicht automatisch geprueft werden: <?php echo htmlspecialchars($workflowSetupError, ENT_QUOTES, 'UTF-8'); ?><br>
|
||||
Bitte fuehren Sie zuerst das Migrationsskript aus.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
if($workflowSetupError !== ''){
|
||||
// Hinweis wurde bereits oberhalb ausgegeben.
|
||||
|
||||
}else if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
|
||||
if(isset($_POST["id"])){
|
||||
$id = mysqli_real_escape_string($con, $_POST["id"]);
|
||||
@@ -83,6 +124,17 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
$impfenzeitraum = $zeitraumAktuell['label'];
|
||||
}
|
||||
}
|
||||
$ausgewaehlteZeitraeume = [];
|
||||
if (isset($pdo) && $pdo instanceof PDO) {
|
||||
$ausgewaehlteZeitraeume = impfGetWartelistenZeitraeumeLabels($pdo, (int)$warteid, false);
|
||||
}
|
||||
if (!empty($ausgewaehlteZeitraeume)) {
|
||||
$impfenzeitraum = implode('<br>', array_map(static function ($label) {
|
||||
return e((string)$label);
|
||||
}, $ausgewaehlteZeitraeume));
|
||||
} else {
|
||||
$impfenzeitraum = htmlspecialchars((string)$impfenzeitraum, ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
//echo $userid;
|
||||
$queryuser = mysqli_query($con, "SELECT * FROM persons WHERE person_id='" . $userid . "'");
|
||||
$rowuser = $queryuser->fetch_assoc();
|
||||
@@ -133,7 +185,7 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
echo "<h4>Art: $Patientenart</h4>";
|
||||
echo "<h4>Telefon: $tel</h4>";
|
||||
echo "<h4>Impfstoff: $impfstofftext</h4>";
|
||||
echo "<h4>Zeitraum: $impfenzeitraum </h4><br>";
|
||||
echo "<h4>Zeitraum:<br>$impfenzeitraum</h4><br>";
|
||||
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo '<input type="hidden" name="warteid" id="warteid" value="'. $warteid .'" />';
|
||||
@@ -151,6 +203,13 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
echo "Sie haben die folgenden Angaben:<br><br>";
|
||||
echo "<h4>Name: $userausgabe</h4>";
|
||||
echo "<h4>Impfstoff: $impfstofftext</h4><br>";
|
||||
if (!empty($ausgewaehlteZeitraeume)) {
|
||||
echo "<h4>Ausgewählte Zeitfenster:<br>" . implode('<br>', array_map(static function ($label) {
|
||||
return e((string)$label);
|
||||
}, $ausgewaehlteZeitraeume)) . "</h4>";
|
||||
} else {
|
||||
echo "<h4>Zeitraum: $impfenzeitraum</h4>";
|
||||
}
|
||||
echo "<h4>Wir informieren Sie, sobald ein konkreter Impftermin für Ihren Impfstoff festgelegt wurde.</h4>";
|
||||
echo "Die Terminvergabe erfolgt durch das Praxisteam, sobald eine komplette Impfflasche mit passenden Wartelistenplätzen gefüllt ist.<br><br>";
|
||||
echo "Können Sie Ihren Warteplatz nicht wahrnehmen oder benötigen diesen nicht mehr, dann tragen Sie sich bitte aus:<br>";
|
||||
@@ -198,6 +257,24 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
echo "<input type=hidden name='".$key."' value='".$value. "'>\n";
|
||||
continue;
|
||||
}
|
||||
if($key === "impfenzeitraeume" && is_array($value)){
|
||||
$zeitraumIds = impfNormalizeZeitraumIds($value);
|
||||
$zeitraumLabels = [];
|
||||
foreach ($zeitraumIds as $zeitraumId) {
|
||||
$zeitraumRow = null;
|
||||
if (isset($pdo) && $pdo instanceof PDO) {
|
||||
$zeitraumRow = impfLoadZeitraumById($pdo, (int)$zeitraumId, true);
|
||||
}
|
||||
if ($zeitraumRow) {
|
||||
$zeitraumLabels[] = (string)$zeitraumRow['label'];
|
||||
echo '<input type="hidden" name="impfenzeitraeume[]" value="'.(int)$zeitraumId.'">' . "\n";
|
||||
}
|
||||
}
|
||||
echo "<tr><td width=100 valign=top class=fett>$key:</td><td>" . implode("<br>", array_map(static function ($label) {
|
||||
return e((string)$label);
|
||||
}, $zeitraumLabels)) . "</td></tr>\n";
|
||||
continue;
|
||||
}
|
||||
if($value !== ""){
|
||||
if($key == "Impfstoff"){
|
||||
$sqlimpfstoffstring = "SELECT * FROM impfstoff WHERE impfid ='" . $value . "' order by sortierung";
|
||||
@@ -215,6 +292,7 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
}
|
||||
$zeitraumText = $zeitraumRow ? $zeitraumRow['label'] : 'Unbekannter Zeitraum';
|
||||
echo "<tr><td width=100 valign=top class=fett>$key:</td><td>$zeitraumText</td></tr>\n";
|
||||
echo"<input type=hidden name='impfenzeitraeume[]' value='".(int)$value."'>\n";
|
||||
echo"<input type=hidden name='".$key."' value='".$value. "'>\n";
|
||||
}else{
|
||||
echo "<tr><td width=100 valign=top class=fett>$key:</td><td>$value</td></tr>\n";
|
||||
@@ -249,12 +327,12 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
$Impfaufklaerung = mysqli_real_escape_string($con, $_POST["Impfaufklaerung"] ?? "Nein");
|
||||
$WeitereFragen = mysqli_real_escape_string($con, $_POST["WeitereFragen"] ?? "Nein");
|
||||
$impfenmit = mysqli_real_escape_string($con, $_POST["zusammenmit"] ?? "");
|
||||
$impfenzeitraumId = (int)($_POST["impfenzeitraum"] ?? 0);
|
||||
$impfenzeitraumIds = impfNormalizeZeitraumIds($_POST["impfenzeitraeume"] ?? ($_POST["impfenzeitraum"] ?? []));
|
||||
$impfart = (int)($_POST["impfart"] ?? 0);
|
||||
$letzteimpfung = trim($_POST["letzteimpfung"] ?? "");
|
||||
|
||||
if ($impfstoff <= 0 || $impfart <= 0 || $impfenzeitraumId <= 0) {
|
||||
echo "<h3>Pflichtfelder fehlen</h3><br>Bitte wählen Sie Impfstoff, Zeitraum und Impfungsart aus.<br><br>";
|
||||
if ($impfstoff <= 0 || $impfart <= 0 || empty($impfenzeitraumIds)) {
|
||||
echo "<h3>Pflichtfelder fehlen</h3><br>Bitte wählen Sie Impfstoff, mindestens einen Zeitraum und die Impfungsart aus.<br><br>";
|
||||
goto end_aktion_1;
|
||||
}
|
||||
|
||||
@@ -267,12 +345,19 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
$letzteimpfung = "";
|
||||
}
|
||||
|
||||
$zeitraumRow = (isset($pdo) && $pdo instanceof PDO) ? impfLoadZeitraumById($pdo, $impfenzeitraumId, true) : null;
|
||||
if (!$zeitraumRow || !in_array($impfstoff, $zeitraumRow['impfstoff_id_list'] ?? [], true)) {
|
||||
echo "<h3>Ungültiger Zeitraum</h3><br>Bitte wählen Sie einen gültigen Zeitraum für den ausgewählten Impfstoff.<br><br>";
|
||||
goto end_aktion_1;
|
||||
$zeitraumLabels = [];
|
||||
if (isset($pdo) && $pdo instanceof PDO) {
|
||||
foreach ($impfenzeitraumIds as $impfenzeitraumId) {
|
||||
$zeitraumRow = impfLoadZeitraumById($pdo, (int)$impfenzeitraumId, true);
|
||||
if (!$zeitraumRow || !in_array($impfstoff, $zeitraumRow['impfstoff_id_list'] ?? [], true)) {
|
||||
echo "<h3>Ungültiger Zeitraum</h3><br>Bitte wählen Sie einen gültigen Zeitraum für den ausgewählten Impfstoff aus.<br><br>";
|
||||
goto end_aktion_1;
|
||||
}
|
||||
$zeitraumLabels[] = (string)$zeitraumRow['label'];
|
||||
}
|
||||
}
|
||||
$impfenzeitraum = mysqli_real_escape_string($con, $zeitraumRow['label']);
|
||||
$impfenzeitraum = mysqli_real_escape_string($con, implode(' | ', $zeitraumLabels));
|
||||
$impfenzeitraumId = (int)($impfenzeitraumIds[0] ?? 0);
|
||||
|
||||
|
||||
//echo $impfenmit;
|
||||
@@ -333,12 +418,43 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
$letzteimpfungSql = ($letzteimpfung !== "") ? ("'" . mysqli_real_escape_string($con, $letzteimpfung) . "'") : "NULL";
|
||||
$query = mysqli_query($con, "SELECT * FROM warteliste WHERE userid='" . (int)$userid . "'");
|
||||
if($query && $query->num_rows == 0){
|
||||
$query = mysqli_query($con, "INSERT INTO warteliste (userid, hash, impfenangebot, impfstoff, Patientenart,Impfaufklaerung, WeitereFragen, date_created, impfenmit, impfenzeitraum, zeitraum_id, impfart, letzteimpfung, checked) VALUES ('". (int)$userid ."', '".$hash."', '".$impfenangebot."', '".$impfstoff."', '".$Patientenart."', '".$Impfaufklaerung."', '".$WeitereFragen."', now(), '".$impfenmit."', '".$impfenzeitraum."', '". (int)$impfenzeitraumId ."', '".$impfart."', ".$letzteimpfungSql.", '0')");
|
||||
if($query){
|
||||
$warteid = mysqli_insert_id($con);
|
||||
SendMailMessageVorlage($pdo, "2", $warteid , "8" );
|
||||
$warteid = 0;
|
||||
$saveOk = false;
|
||||
$saveErrorShown = false;
|
||||
try {
|
||||
if (isset($pdo) && $pdo instanceof PDO) {
|
||||
[$ok, $msg, $newWarteid] = impfCreateWaitlistEntryForPerson(
|
||||
$pdo,
|
||||
(int)$userid,
|
||||
$impfstoff,
|
||||
$impfenzeitraumIds,
|
||||
$impfart,
|
||||
($letzteimpfung !== "") ? $letzteimpfung : null,
|
||||
0
|
||||
);
|
||||
if (!$ok) {
|
||||
throw new RuntimeException($msg);
|
||||
}
|
||||
$warteid = (int)$newWarteid;
|
||||
$pdo->prepare("UPDATE warteliste SET impfenangebot = :impfenangebot, impfenmit = :impfenmit, Impfaufklaerung = :aufklaerung, WeitereFragen = :fragen WHERE warteid = :warteid")
|
||||
->execute([
|
||||
'impfenangebot' => $impfenangebot,
|
||||
'impfenmit' => $impfenmit,
|
||||
'aufklaerung' => $Impfaufklaerung,
|
||||
'fragen' => $WeitereFragen,
|
||||
'warteid' => $warteid,
|
||||
]);
|
||||
$saveOk = true;
|
||||
} else {
|
||||
throw new RuntimeException("PDO Verbindungsobjekt fehlt.");
|
||||
}
|
||||
SendMailMessageVorlage($pdo, "2", (int)$warteid, "8" );
|
||||
echo "<h3>Nachricht abgeschickt!</h3><br>Sie müssen die Eintragung in der Warteliste noch bestätigen!<br>Überprüfen Sie auch Ihren Spam-Filter!<br><br>";
|
||||
}else{
|
||||
} catch (Throwable $e) {
|
||||
echo "<h3>Speicherung nicht erfolgreich</h3><br>" . htmlspecialchars($e->getMessage(), ENT_QUOTES, 'UTF-8') . "<br><br>";
|
||||
$saveErrorShown = true;
|
||||
}
|
||||
if(!$saveOk && !$saveErrorShown){
|
||||
echo "<h3>Speicherung nicht erfolgreich</h3><br>Ihre Anfrage konnte nicht gespeichert werden.<br>Nutzen Sie das Formular erneut<br><br>";
|
||||
}
|
||||
}else{
|
||||
@@ -381,6 +497,13 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
$userausgabe = $vorname . " " . $nachname;
|
||||
|
||||
SendMailMessageVorlage($pdo, "2", $warteid , "9" );
|
||||
if (isset($pdo) && $pdo instanceof PDO) {
|
||||
try {
|
||||
impfWorkflowNotificationProcess($pdo);
|
||||
} catch (Throwable $e) {
|
||||
error_log('impfWorkflowNotificationProcess failed in impfwarteliste confirm: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -398,11 +521,22 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
$queryimpf = mysqli_query($con, "SELECT * FROM warteliste WHERE warteid='" . $_POST["warteid"] . "'");
|
||||
$rowimpf = $queryimpf->fetch_assoc() ;
|
||||
SendMailMessageVorlage($pdo, "2", $_POST["warteid"], "10" );
|
||||
if (isset($pdo) && $pdo instanceof PDO) {
|
||||
$pdo->prepare("DELETE FROM warteliste_zeitraum WHERE warteid = :warteid")->execute([
|
||||
'warteid' => (int)$_POST["warteid"],
|
||||
]);
|
||||
}
|
||||
$query = mysqli_query($con, "DELETE FROM warteliste WHERE warteid ='".$_POST["warteid"]."'");
|
||||
if($query){
|
||||
echo "<h4>Ihr Warteplatz wurde erfolgreich gelöscht!<h4><br>";
|
||||
echo "Sie erhalten gleiche eine schriftliche Bestätigung per E-Mail<br>";
|
||||
|
||||
if (isset($pdo) && $pdo instanceof PDO) {
|
||||
try {
|
||||
impfWorkflowNotificationProcess($pdo);
|
||||
} catch (Throwable $e) {
|
||||
error_log('impfWorkflowNotificationProcess failed in impfwarteliste delete: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -443,9 +577,12 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
echo "<h4>Mail wird gleich versendet!</h4>";
|
||||
echo "<br>Überprüfen Sie auch Ihren SPAM Ordner!<br>";
|
||||
SendMailMessageVorlage($pdo, "1", (int)$terminid, "1" );
|
||||
|
||||
|
||||
$query = mysqli_query($con, "DELETE FROM warteliste WHERE warteid ='".$warteid."'");
|
||||
if (isset($pdo) && $pdo instanceof PDO) {
|
||||
$pdo->prepare("DELETE FROM warteliste_zeitraum WHERE warteid = :warteid")->execute([
|
||||
'warteid' => (int)$warteid,
|
||||
]);
|
||||
}
|
||||
$query = mysqli_query($con, "DELETE FROM warteliste WHERE warteid ='".$warteid."'");
|
||||
}else{
|
||||
echo "<h4>Fehler bei Speichern der Anfragen!</h4>";
|
||||
echo "<br>Versuchen Sie es später erneut!<br>";
|
||||
@@ -512,7 +649,7 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
}
|
||||
$zeitOptionenByImpfstoff[$iid][] = [
|
||||
'id' => (int)$zeitraum['zeitraum_id'],
|
||||
'label' => (string)$zeitraum['label'],
|
||||
'label' => impfZeitraumLabel($zeitraum, false),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -602,9 +739,9 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
</div>
|
||||
<br>
|
||||
<div class="12u">
|
||||
<label for="impfenzeitraum">Wählen Sie den möglichen Zeitbereich für den gewählten Impfstoff:</label>
|
||||
<label for="impfenzeitraeume">Wählen Sie die möglichen Zeitbereiche für den gewählten Impfstoff:</label>
|
||||
<div class="select-wrapper">
|
||||
<select name="impfenzeitraum" id="impfenzeitraum" required disabled onchange="checkZeitraum()">
|
||||
<select name="impfenzeitraeume[]" id="impfenzeitraeume" multiple size="6" required disabled onchange="checkZeitraum()">
|
||||
<option value="">- Bitte zuerst Impfstoff auswählen -</option>
|
||||
</select>
|
||||
<div id="Zeitrauminfo"></div>
|
||||
@@ -680,6 +817,7 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
|
||||
<script>
|
||||
const zeitfensterByImpfstoff = <?php echo $zeitOptionenJson ?: '{}'; ?>;
|
||||
const initialZeitraumIds = <?php echo json_encode(impfNormalizeZeitraumIds($_POST["impfenzeitraeume"] ?? ($_POST["impfenzeitraum"] ?? [])), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?>;
|
||||
|
||||
function isIE() {
|
||||
return /Trident\/|MSIE/.test(window.navigator.userAgent);
|
||||
@@ -687,7 +825,7 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
|
||||
function updateZeitfenster() {
|
||||
const impfstoff = document.getElementById('AstraImpfung');
|
||||
const zeitraum = document.getElementById('impfenzeitraum');
|
||||
const zeitraum = document.getElementById('impfenzeitraeume');
|
||||
const zeitraumInfo = document.getElementById('Zeitrauminfo');
|
||||
const submit = document.getElementById('submitbox');
|
||||
const impfstoffId = impfstoff.value;
|
||||
@@ -697,7 +835,7 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
if (!impfstoffId || optionen.length === 0) {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = '';
|
||||
opt.textContent = '- Kein Zeitbereich verfügbar -';
|
||||
opt.textContent = '- Keine Zeitbereiche verfügbar -';
|
||||
zeitraum.appendChild(opt);
|
||||
zeitraum.disabled = true;
|
||||
submit.disabled = true;
|
||||
@@ -713,11 +851,15 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
const opt = document.createElement('option');
|
||||
opt.value = String(eintrag.id || '');
|
||||
opt.textContent = eintrag.label || '';
|
||||
if (initialZeitraumIds.includes(Number(eintrag.id))) {
|
||||
opt.selected = true;
|
||||
}
|
||||
zeitraum.appendChild(opt);
|
||||
});
|
||||
zeitraum.disabled = false;
|
||||
submit.disabled = false;
|
||||
zeitraumInfo.innerHTML = '';
|
||||
checkZeitraum();
|
||||
}
|
||||
|
||||
function checklastImpf() {
|
||||
@@ -736,10 +878,14 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
|
||||
function checkZeitraum() {
|
||||
const info = document.getElementById('Zeitrauminfo');
|
||||
if (document.getElementById('impfenzeitraum').value === "") {
|
||||
const submit = document.getElementById('submitbox');
|
||||
const selected = Array.from(document.getElementById('impfenzeitraeume').selectedOptions || []).filter((opt) => opt.value !== '');
|
||||
if (selected.length === 0) {
|
||||
info.innerHTML = "";
|
||||
submit.disabled = true;
|
||||
} else {
|
||||
info.innerHTML = '<div style="border:5px solid red; margin: 5px; padding: 5px;">Bitte halten Sie sich den gewählten Zeitraum frei. Die konkrete Terminanfrage erhalten Sie später per E-Mail.</div>';
|
||||
info.innerHTML = '<div style="border:5px solid red; margin: 5px; padding: 5px;">Bitte halten Sie sich die gewählten Zeitbereiche frei. Die konkrete Terminanfrage erhalten Sie später per E-Mail.</div>';
|
||||
submit.disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -750,6 +896,7 @@ if(isset($_POST["id"]) || isset($_GET["id"])){
|
||||
}
|
||||
checklastImpf();
|
||||
updateZeitfenster();
|
||||
checkZeitraum();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,94 +1,94 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - corona warteliste info</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<img src="gif/logo-arzt-creutzburg-coppen.gif" align="left" alt="Praxis Logo Creutzburg, Facharzt für innere Medizin, Schloßstr. 18, 31863 Coppenbrügge, Sprechzeit 8-11:00 Uhr, Tel. 05156 8125" />
|
||||
<h2>Impftermin online anfordern erfolgreich</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$today =Date("Y-m-d");
|
||||
|
||||
$querytermin = mysqli_query($con, "SELECT warteid FROM warteliste WHERE checked = '0' AND (impfstoff= '1' OR impfstoff= '2' OR impfstoff= '3' OR impfstoff= '4' OR impfstoff= '6') ");
|
||||
while ($rowtermin = $querytermin->fetch_assoc()) {
|
||||
$warteid = $rowtermin["warteid"];
|
||||
|
||||
SendMailMessageVorlage($pdo, "2", $warteid , "22" );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<a href="impfanmeldung.php" class="button">Impftermin sichern</a>
|
||||
<br><br>
|
||||
Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich.<br>
|
||||
Elektronische Nachrichten können von Dritten gelesen werden. Bei Bedenken nutzen Sie unsere Rezepthotline für alle Serviceleistungen: 05156 99 03 77
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - corona warteliste info</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<img src="gif/logo-arzt-creutzburg-coppen.gif" align="left" alt="Praxis Logo Creutzburg, Facharzt für innere Medizin, Schloßstr. 18, 31863 Coppenbrügge, Sprechzeit 8-11:00 Uhr, Tel. 05156 8125" />
|
||||
<h2>Impftermin online anfordern erfolgreich</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$today =Date("Y-m-d");
|
||||
|
||||
$querytermin = mysqli_query($con, "SELECT warteid FROM warteliste WHERE checked = '0' AND (impfstoff= '1' OR impfstoff= '2' OR impfstoff= '3' OR impfstoff= '4' OR impfstoff= '6') ");
|
||||
while ($rowtermin = $querytermin->fetch_assoc()) {
|
||||
$warteid = $rowtermin["warteid"];
|
||||
|
||||
SendMailMessageVorlage($pdo, "2", $warteid , "22" );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<a href="impfanmeldung.php" class="button">Impftermin sichern</a>
|
||||
<br><br>
|
||||
Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich.<br>
|
||||
Elektronische Nachrichten können von Dritten gelesen werden. Bei Bedenken nutzen Sie unsere Rezepthotline für alle Serviceleistungen: 05156 99 03 77
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+97
-97
@@ -1,98 +1,98 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Corona wateliste info mail</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<img src="gif/logo-arzt-creutzburg-coppen.gif" align="left" alt="Praxis Logo Creutzburg, Facharzt für innere Medizin, Schloßstr. 18, 31863 Coppenbrügge, Sprechzeit 8-11:00 Uhr, Tel. 05156 8125" />
|
||||
<h2>Impftermin online anfordern erfolgreich</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$query = mysqli_query($con, "SELECT maximalmailprostunde FROM config ");
|
||||
$row = $query->fetch_assoc();
|
||||
$maximalmail = $row["maximalmailprostunde"];
|
||||
|
||||
$today =Date("Y-m-d");
|
||||
$yesteryesterday = Date('Y-m-d', strtotime('-14 days'));
|
||||
$querytermin = mysqli_query($con, "SELECT warteid FROM warteliste WHERE checked = '1' AND mailtime <='". $yesteryesterday . "' OR checked = '1' AND (impfstoff= '1' OR impfstoff= '2' OR impfstoff= '3' OR impfstoff= '4' OR impfstoff= '6') AND mailtime IS NULL LIMIT ". $maximalmail . " ");
|
||||
while ($rowtermin = $querytermin->fetch_assoc()) {
|
||||
$warteid = $rowtermin["warteid"];
|
||||
$queryupdate = mysqli_query($con, "UPDATE warteliste SET mailtime='" . date("Y-m-d h:i:s") . "' WHERE warteid ='". $warteid . "' ");
|
||||
SendMailMessageVorlage($pdo, "2", $warteid , "24" );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<a href="impfanmeldung.php" class="button">Impftermin sichern</a>
|
||||
<br><br>
|
||||
Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich.<br>
|
||||
Elektronische Nachrichten können von Dritten gelesen werden. Bei Bedenken nutzen Sie unsere Rezepthotline für alle Serviceleistungen: 05156 99 03 77
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Corona wateliste info mail</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<img src="gif/logo-arzt-creutzburg-coppen.gif" align="left" alt="Praxis Logo Creutzburg, Facharzt für innere Medizin, Schloßstr. 18, 31863 Coppenbrügge, Sprechzeit 8-11:00 Uhr, Tel. 05156 8125" />
|
||||
<h2>Impftermin online anfordern erfolgreich</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$query = mysqli_query($con, "SELECT maximalmailprostunde FROM config ");
|
||||
$row = $query->fetch_assoc();
|
||||
$maximalmail = $row["maximalmailprostunde"];
|
||||
|
||||
$today =Date("Y-m-d");
|
||||
$yesteryesterday = Date('Y-m-d', strtotime('-14 days'));
|
||||
$querytermin = mysqli_query($con, "SELECT warteid FROM warteliste WHERE checked = '1' AND mailtime <='". $yesteryesterday . "' OR checked = '1' AND (impfstoff= '1' OR impfstoff= '2' OR impfstoff= '3' OR impfstoff= '4' OR impfstoff= '6') AND mailtime IS NULL LIMIT ". $maximalmail . " ");
|
||||
while ($rowtermin = $querytermin->fetch_assoc()) {
|
||||
$warteid = $rowtermin["warteid"];
|
||||
$queryupdate = mysqli_query($con, "UPDATE warteliste SET mailtime='" . date("Y-m-d h:i:s") . "' WHERE warteid ='". $warteid . "' ");
|
||||
SendMailMessageVorlage($pdo, "2", $warteid , "24" );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<a href="impfanmeldung.php" class="button">Impftermin sichern</a>
|
||||
<br><br>
|
||||
Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich.<br>
|
||||
Elektronische Nachrichten können von Dritten gelesen werden. Bei Bedenken nutzen Sie unsere Rezepthotline für alle Serviceleistungen: 05156 99 03 77
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,2 +1,2 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/impfwarteliste.php';
|
||||
require_once __DIR__ . '/impfwarteliste.php';
|
||||
|
||||
+98
-98
@@ -1,99 +1,99 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - corona warteliste loeschung</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<img src="gif/logo-arzt-creutzburg-coppen.gif" align="left" alt="Praxis Logo Creutzburg, Facharzt für innere Medizin, Schloßstr. 18, 31863 Coppenbrügge, Sprechzeit 8-11:00 Uhr, Tel. 05156 8125" />
|
||||
<h2>Impftermin online anfordern erfolgreich</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
|
||||
|
||||
<?php
|
||||
if(isset($_GET["aktion"])) {
|
||||
if( $_GET["aktion"] == "AufrufzurLoeschung"){
|
||||
$today =Date("Y-m-d");
|
||||
$yesteryesterday = Date('Y-m-d', strtotime('-10 days'));
|
||||
$querytermin = mysqli_query($con, "SELECT warteid FROM warteliste WHERE checked = '0' AND date_created <= '" . $yesteryesterday . "'");
|
||||
while ($rowtermin = $querytermin->fetch_assoc()) {
|
||||
$warteid = $rowtermin["warteid"];
|
||||
$queryloeschen = mysqli_query($con, "DELETE FROM warteliste WHERE warteid = '". $warteid . "' ");
|
||||
|
||||
|
||||
|
||||
if($queryloeschen){
|
||||
SendMailMessageVorlage($pdo, "2", $warteid , "23" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<a href="impfanmeldung.php" class="button">Impftermin sichern</a>
|
||||
<br><br>
|
||||
Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich.<br>
|
||||
Elektronische Nachrichten können von Dritten gelesen werden. Bei Bedenken nutzen Sie unsere Rezepthotline für alle Serviceleistungen: 05156 99 03 77
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - corona warteliste loeschung</title>
|
||||
<link rel="stylesheet" href="css/formulare.css" />
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
include_once('inc/functions.formulare.inc.php');
|
||||
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<img src="gif/logo-arzt-creutzburg-coppen.gif" align="left" alt="Praxis Logo Creutzburg, Facharzt für innere Medizin, Schloßstr. 18, 31863 Coppenbrügge, Sprechzeit 8-11:00 Uhr, Tel. 05156 8125" />
|
||||
<h2>Impftermin online anfordern erfolgreich</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
|
||||
|
||||
<?php
|
||||
if(isset($_GET["aktion"])) {
|
||||
if( $_GET["aktion"] == "AufrufzurLoeschung"){
|
||||
$today =Date("Y-m-d");
|
||||
$yesteryesterday = Date('Y-m-d', strtotime('-10 days'));
|
||||
$querytermin = mysqli_query($con, "SELECT warteid FROM warteliste WHERE checked = '0' AND date_created <= '" . $yesteryesterday . "'");
|
||||
while ($rowtermin = $querytermin->fetch_assoc()) {
|
||||
$warteid = $rowtermin["warteid"];
|
||||
$queryloeschen = mysqli_query($con, "DELETE FROM warteliste WHERE warteid = '". $warteid . "' ");
|
||||
|
||||
|
||||
|
||||
if($queryloeschen){
|
||||
SendMailMessageVorlage($pdo, "2", $warteid , "23" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<a href="impfanmeldung.php" class="button">Impftermin sichern</a>
|
||||
<br><br>
|
||||
Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich.<br>
|
||||
Elektronische Nachrichten können von Dritten gelesen werden. Bei Bedenken nutzen Sie unsere Rezepthotline für alle Serviceleistungen: 05156 99 03 77
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,387 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('vacationSyncTableExists')) {
|
||||
function vacationSyncTableExists(PDO $pdo, string $table): bool
|
||||
{
|
||||
$stmt = $pdo->prepare(
|
||||
"SELECT COUNT(*)
|
||||
FROM information_schema.TABLES
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = :table_name"
|
||||
);
|
||||
$stmt->execute(['table_name' => $table]);
|
||||
return (int)$stmt->fetchColumn() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('vacationSyncTableHasColumn')) {
|
||||
function vacationSyncTableHasColumn(PDO $pdo, string $table, string $column): bool
|
||||
{
|
||||
$stmt = $pdo->prepare(
|
||||
"SELECT COUNT(*)
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = :table_name
|
||||
AND COLUMN_NAME = :column_name"
|
||||
);
|
||||
$stmt->execute([
|
||||
'table_name' => $table,
|
||||
'column_name' => $column,
|
||||
]);
|
||||
return (int)$stmt->fetchColumn() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('vacationSyncEnsureSchema')) {
|
||||
function vacationSyncEnsureSchema(PDO $pdo): void
|
||||
{
|
||||
$urlaubExists = vacationSyncTableExists($pdo, 'urlaub');
|
||||
$companyHolidaysExists = vacationSyncTableExists($pdo, 'company_holidays');
|
||||
|
||||
if (!$urlaubExists && !$companyHolidaysExists) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($urlaubExists && !vacationSyncTableHasColumn($pdo, 'urlaub', 'company_holiday_id')) {
|
||||
$pdo->exec("ALTER TABLE urlaub ADD COLUMN company_holiday_id INT NULL AFTER vertreterurl");
|
||||
}
|
||||
|
||||
if (!$companyHolidaysExists) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!vacationSyncTableHasColumn($pdo, 'company_holidays', 'urlaub_id')) {
|
||||
$pdo->exec("ALTER TABLE company_holidays ADD COLUMN urlaub_id INT NULL AFTER created_by");
|
||||
}
|
||||
|
||||
if (!vacationSyncTableHasColumn($pdo, 'company_holidays', 'vertretung')) {
|
||||
$pdo->exec("ALTER TABLE company_holidays ADD COLUMN vertretung VARCHAR(255) NOT NULL DEFAULT '' AFTER description");
|
||||
}
|
||||
|
||||
if (!vacationSyncTableHasColumn($pdo, 'company_holidays', 'vertretertelefon')) {
|
||||
$pdo->exec("ALTER TABLE company_holidays ADD COLUMN vertretertelefon VARCHAR(255) NOT NULL DEFAULT '' AFTER vertretung");
|
||||
}
|
||||
|
||||
if (!vacationSyncTableHasColumn($pdo, 'company_holidays', 'vertreteradresse')) {
|
||||
$pdo->exec("ALTER TABLE company_holidays ADD COLUMN vertreteradresse VARCHAR(1000) NOT NULL DEFAULT '' AFTER vertretertelefon");
|
||||
}
|
||||
|
||||
if (!vacationSyncTableHasColumn($pdo, 'company_holidays', 'vertreterurl')) {
|
||||
$pdo->exec("ALTER TABLE company_holidays ADD COLUMN vertreterurl VARCHAR(255) NOT NULL DEFAULT '' AFTER vertreteradresse");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('vacationSyncFindCompanyHolidayIdForUrlaub')) {
|
||||
function vacationSyncFindCompanyHolidayIdForUrlaub(PDO $pdo, int $urlaubId): int
|
||||
{
|
||||
if ($urlaubId <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!vacationSyncTableExists($pdo, 'urlaub') || !vacationSyncTableExists($pdo, 'company_holidays')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
vacationSyncEnsureSchema($pdo);
|
||||
|
||||
$stmt = $pdo->prepare("SELECT company_holiday_id FROM urlaub WHERE urlaubid = :urlaub_id LIMIT 1");
|
||||
$stmt->execute(['urlaub_id' => $urlaubId]);
|
||||
$linkedId = (int)($stmt->fetchColumn() ?: 0);
|
||||
if ($linkedId > 0) {
|
||||
return $linkedId;
|
||||
}
|
||||
|
||||
$stmt = $pdo->prepare("SELECT id FROM company_holidays WHERE urlaub_id = :urlaub_id LIMIT 1");
|
||||
$stmt->execute(['urlaub_id' => $urlaubId]);
|
||||
$linkedId = (int)($stmt->fetchColumn() ?: 0);
|
||||
if ($linkedId > 0) {
|
||||
return $linkedId;
|
||||
}
|
||||
|
||||
$stmt = $pdo->prepare("SELECT start, ende FROM urlaub WHERE urlaubid = :urlaub_id LIMIT 1");
|
||||
$stmt->execute(['urlaub_id' => $urlaubId]);
|
||||
$urlaub = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
if (!$urlaub) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT id
|
||||
FROM company_holidays
|
||||
WHERE start_date = :start_date
|
||||
AND end_date = :end_date
|
||||
ORDER BY id ASC
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([
|
||||
'start_date' => $urlaub['start'],
|
||||
'end_date' => $urlaub['ende'],
|
||||
]);
|
||||
return (int)($stmt->fetchColumn() ?: 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('vacationSyncFindUrlaubIdForCompanyHoliday')) {
|
||||
function vacationSyncFindUrlaubIdForCompanyHoliday(PDO $pdo, int $companyHolidayId): int
|
||||
{
|
||||
if ($companyHolidayId <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!vacationSyncTableExists($pdo, 'urlaub') || !vacationSyncTableExists($pdo, 'company_holidays')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
vacationSyncEnsureSchema($pdo);
|
||||
|
||||
$stmt = $pdo->prepare("SELECT urlaub_id FROM company_holidays WHERE id = :company_holiday_id LIMIT 1");
|
||||
$stmt->execute(['company_holiday_id' => $companyHolidayId]);
|
||||
$linkedId = (int)($stmt->fetchColumn() ?: 0);
|
||||
if ($linkedId > 0) {
|
||||
return $linkedId;
|
||||
}
|
||||
|
||||
$stmt = $pdo->prepare("SELECT urlaubid FROM urlaub WHERE company_holiday_id = :company_holiday_id LIMIT 1");
|
||||
$stmt->execute(['company_holiday_id' => $companyHolidayId]);
|
||||
$linkedId = (int)($stmt->fetchColumn() ?: 0);
|
||||
if ($linkedId > 0) {
|
||||
return $linkedId;
|
||||
}
|
||||
|
||||
$stmt = $pdo->prepare("SELECT start_date, end_date FROM company_holidays WHERE id = :company_holiday_id LIMIT 1");
|
||||
$stmt->execute(['company_holiday_id' => $companyHolidayId]);
|
||||
$holiday = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
if (!$holiday) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT urlaubid
|
||||
FROM urlaub
|
||||
WHERE start = :start_date
|
||||
AND ende = :end_date
|
||||
ORDER BY urlaubid ASC
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([
|
||||
'start_date' => $holiday['start_date'],
|
||||
'end_date' => $holiday['end_date'],
|
||||
]);
|
||||
return (int)($stmt->fetchColumn() ?: 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('vacationSyncCompanyHolidayFromUrlaub')) {
|
||||
function vacationSyncCompanyHolidayFromUrlaub(PDO $pdo, int $urlaubId, ?int $createdBy = null): int
|
||||
{
|
||||
if ($urlaubId <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!vacationSyncTableExists($pdo, 'urlaub') || !vacationSyncTableExists($pdo, 'company_holidays')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
vacationSyncEnsureSchema($pdo);
|
||||
|
||||
$stmtUrlaub = $pdo->prepare("
|
||||
SELECT urlaubid, start, ende, vertretung, vertretertelefon, vertreteradresse, vertreterurl, company_holiday_id
|
||||
FROM urlaub
|
||||
WHERE urlaubid = :urlaub_id
|
||||
LIMIT 1
|
||||
");
|
||||
$stmtUrlaub->execute(['urlaub_id' => $urlaubId]);
|
||||
$urlaub = $stmtUrlaub->fetch(PDO::FETCH_ASSOC);
|
||||
if (!$urlaub) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$companyHolidayId = (int)($urlaub['company_holiday_id'] ?? 0);
|
||||
if ($companyHolidayId <= 0) {
|
||||
$companyHolidayId = vacationSyncFindCompanyHolidayIdForUrlaub($pdo, $urlaubId);
|
||||
}
|
||||
|
||||
$description = 'Betriebsurlaub';
|
||||
if ($companyHolidayId > 0) {
|
||||
$stmtExisting = $pdo->prepare("SELECT description FROM company_holidays WHERE id = :company_holiday_id LIMIT 1");
|
||||
$stmtExisting->execute(['company_holiday_id' => $companyHolidayId]);
|
||||
$existingDescription = $stmtExisting->fetchColumn();
|
||||
if ($existingDescription !== false && trim((string)$existingDescription) !== '') {
|
||||
$description = (string)$existingDescription;
|
||||
}
|
||||
}
|
||||
|
||||
if ($companyHolidayId > 0) {
|
||||
$stmtUpdate = $pdo->prepare("
|
||||
UPDATE company_holidays
|
||||
SET start_date = :start_date,
|
||||
end_date = :end_date,
|
||||
vertretung = :vertretung,
|
||||
vertretertelefon = :vertretertelefon,
|
||||
vertreteradresse = :vertreteradresse,
|
||||
vertreterurl = :vertreterurl,
|
||||
urlaub_id = :urlaub_id
|
||||
WHERE id = :company_holiday_id
|
||||
");
|
||||
$stmtUpdate->execute([
|
||||
'start_date' => $urlaub['start'],
|
||||
'end_date' => $urlaub['ende'],
|
||||
'vertretung' => (string)$urlaub['vertretung'],
|
||||
'vertretertelefon' => (string)$urlaub['vertretertelefon'],
|
||||
'vertreteradresse' => (string)$urlaub['vertreteradresse'],
|
||||
'vertreterurl' => (string)$urlaub['vertreterurl'],
|
||||
'urlaub_id' => $urlaubId,
|
||||
'company_holiday_id' => $companyHolidayId,
|
||||
]);
|
||||
} else {
|
||||
$stmtInsert = $pdo->prepare("
|
||||
INSERT INTO company_holidays (
|
||||
start_date, end_date, description, vertretung, vertretertelefon, vertreteradresse, vertreterurl, created_by, urlaub_id
|
||||
)
|
||||
VALUES (
|
||||
:start_date, :end_date, :description, :vertretung, :vertretertelefon, :vertreteradresse, :vertreterurl, :created_by, :urlaub_id
|
||||
)
|
||||
");
|
||||
$stmtInsert->execute([
|
||||
'start_date' => $urlaub['start'],
|
||||
'end_date' => $urlaub['ende'],
|
||||
'description' => $description,
|
||||
'vertretung' => (string)$urlaub['vertretung'],
|
||||
'vertretertelefon' => (string)$urlaub['vertretertelefon'],
|
||||
'vertreteradresse' => (string)$urlaub['vertreteradresse'],
|
||||
'vertreterurl' => (string)$urlaub['vertreterurl'],
|
||||
'created_by' => $createdBy,
|
||||
'urlaub_id' => $urlaubId,
|
||||
]);
|
||||
$companyHolidayId = (int)$pdo->lastInsertId();
|
||||
}
|
||||
|
||||
if ($companyHolidayId > 0) {
|
||||
$stmtLink = $pdo->prepare("UPDATE urlaub SET company_holiday_id = :company_holiday_id WHERE urlaubid = :urlaub_id");
|
||||
$stmtLink->execute([
|
||||
'company_holiday_id' => $companyHolidayId,
|
||||
'urlaub_id' => $urlaubId,
|
||||
]);
|
||||
}
|
||||
|
||||
return $companyHolidayId;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('vacationSyncUrlaubFromCompanyHoliday')) {
|
||||
function vacationSyncUrlaubFromCompanyHoliday(PDO $pdo, int $companyHolidayId): int
|
||||
{
|
||||
if ($companyHolidayId <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!vacationSyncTableExists($pdo, 'company_holidays') || !vacationSyncTableExists($pdo, 'urlaub')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
vacationSyncEnsureSchema($pdo);
|
||||
|
||||
$stmtHoliday = $pdo->prepare("
|
||||
SELECT id, start_date, end_date, vertretung, vertretertelefon, vertreteradresse, vertreterurl, urlaub_id
|
||||
FROM company_holidays
|
||||
WHERE id = :company_holiday_id
|
||||
LIMIT 1
|
||||
");
|
||||
$stmtHoliday->execute(['company_holiday_id' => $companyHolidayId]);
|
||||
$holiday = $stmtHoliday->fetch(PDO::FETCH_ASSOC);
|
||||
if (!$holiday) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$urlaubId = (int)($holiday['urlaub_id'] ?? 0);
|
||||
if ($urlaubId <= 0) {
|
||||
$urlaubId = vacationSyncFindUrlaubIdForCompanyHoliday($pdo, $companyHolidayId);
|
||||
}
|
||||
|
||||
if ($urlaubId > 0) {
|
||||
$stmtUpdate = $pdo->prepare("
|
||||
UPDATE urlaub
|
||||
SET start = :start_date,
|
||||
ende = :end_date,
|
||||
vertretung = :vertretung,
|
||||
vertretertelefon = :vertretertelefon,
|
||||
vertreteradresse = :vertreteradresse,
|
||||
vertreterurl = :vertreterurl,
|
||||
company_holiday_id = :company_holiday_id
|
||||
WHERE urlaubid = :urlaub_id
|
||||
");
|
||||
$stmtUpdate->execute([
|
||||
'start_date' => $holiday['start_date'],
|
||||
'end_date' => $holiday['end_date'],
|
||||
'vertretung' => (string)$holiday['vertretung'],
|
||||
'vertretertelefon' => (string)$holiday['vertretertelefon'],
|
||||
'vertreteradresse' => (string)$holiday['vertreteradresse'],
|
||||
'vertreterurl' => (string)$holiday['vertreterurl'],
|
||||
'company_holiday_id' => $companyHolidayId,
|
||||
'urlaub_id' => $urlaubId,
|
||||
]);
|
||||
} else {
|
||||
$stmtInsert = $pdo->prepare("
|
||||
INSERT INTO urlaub
|
||||
(vertretung, start, ende, vertretertelefon, vertreteradresse, vertreterurl, company_holiday_id)
|
||||
VALUES
|
||||
(:vertretung, :start_date, :end_date, :vertretertelefon, :vertreteradresse, :vertreterurl, :company_holiday_id)
|
||||
");
|
||||
$stmtInsert->execute([
|
||||
'vertretung' => (string)$holiday['vertretung'],
|
||||
'start_date' => $holiday['start_date'],
|
||||
'end_date' => $holiday['end_date'],
|
||||
'vertretertelefon' => (string)$holiday['vertretertelefon'],
|
||||
'vertreteradresse' => (string)$holiday['vertreteradresse'],
|
||||
'vertreterurl' => (string)$holiday['vertreterurl'],
|
||||
'company_holiday_id' => $companyHolidayId,
|
||||
]);
|
||||
$urlaubId = (int)$pdo->lastInsertId();
|
||||
}
|
||||
|
||||
if ($urlaubId > 0) {
|
||||
$stmtLink = $pdo->prepare("UPDATE company_holidays SET urlaub_id = :urlaub_id WHERE id = :company_holiday_id");
|
||||
$stmtLink->execute([
|
||||
'urlaub_id' => $urlaubId,
|
||||
'company_holiday_id' => $companyHolidayId,
|
||||
]);
|
||||
}
|
||||
|
||||
return $urlaubId;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('vacationSyncDeleteCompanyHolidayByUrlaub')) {
|
||||
function vacationSyncDeleteCompanyHolidayByUrlaub(PDO $pdo, int $urlaubId): void
|
||||
{
|
||||
if (!vacationSyncTableExists($pdo, 'urlaub') || !vacationSyncTableExists($pdo, 'company_holidays')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$companyHolidayId = vacationSyncFindCompanyHolidayIdForUrlaub($pdo, $urlaubId);
|
||||
if ($companyHolidayId <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$stmt = $pdo->prepare("DELETE FROM company_holidays WHERE id = :company_holiday_id");
|
||||
$stmt->execute(['company_holiday_id' => $companyHolidayId]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('vacationSyncDeleteUrlaubByCompanyHoliday')) {
|
||||
function vacationSyncDeleteUrlaubByCompanyHoliday(PDO $pdo, int $companyHolidayId): void
|
||||
{
|
||||
if (!vacationSyncTableExists($pdo, 'urlaub') || !vacationSyncTableExists($pdo, 'company_holidays')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$urlaubId = vacationSyncFindUrlaubIdForCompanyHoliday($pdo, $companyHolidayId);
|
||||
if ($urlaubId <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$stmt = $pdo->prepare("DELETE FROM urlaub WHERE urlaubid = :urlaub_id");
|
||||
$stmt->execute(['urlaub_id' => $urlaubId]);
|
||||
}
|
||||
}
|
||||
+164
-164
@@ -1,164 +1,164 @@
|
||||
<?php
|
||||
use PHPMailer\PHPMailer\PHPMailer;
|
||||
use PHPMailer\PHPMailer\Exception;
|
||||
|
||||
require 'PHPMailer/src/Exception.php';
|
||||
require 'PHPMailer/src/PHPMailer.php';
|
||||
require 'PHPMailer/src/SMTP.php';
|
||||
|
||||
|
||||
|
||||
### Togo Termine anlegen
|
||||
|
||||
function gototerminanlegung() {
|
||||
|
||||
global $pdo;
|
||||
|
||||
$statementtermin = $pdo->prepare("SELECT * FROM togo_terminvorgaben");
|
||||
$statementtermin->execute();
|
||||
foreach ($statementtermin as $row) {
|
||||
$togovorgabenid = $row["vorgabenid"];
|
||||
$togodate = $row["date"];
|
||||
$togostart = $row["start"];
|
||||
$togoende = $row["ende"];
|
||||
$standort = $row["standort"];
|
||||
$error = $row["error"];
|
||||
$warning = $row["warning"];
|
||||
$date = new DateTime();
|
||||
if($togodate == "Mo"){
|
||||
$date->modify('next monday');
|
||||
|
||||
}elseif($togodate == "Di"){
|
||||
$$date->modify('next tuesday');
|
||||
#$nextday = date('Y-m-d', $nextTuesday);
|
||||
}elseif($togodate == "Mi"){
|
||||
$date->modify('next wednesday');
|
||||
#$nextday = date('Y-m-d', $nextTuesday);
|
||||
}elseif($togodate == "Do"){
|
||||
$date->modify('next thursday');
|
||||
#$nextday = date('Y-m-d', $nextTuesday);
|
||||
}elseif($togodate == "Fr"){
|
||||
$date->modify('next friday');
|
||||
#$nextday = date('Y-m-d', $nextTuesday);
|
||||
}elseif($togodate == "Sa"){
|
||||
$date->modify('next saturday');
|
||||
#$nextday = date('Y-m-d', $nextTuesday);
|
||||
}elseif($togodate == "so"){
|
||||
$date->modify('next sunday');
|
||||
#$nextday = date('Y-m-d', $nextTuesday);
|
||||
}else{
|
||||
$ausgabedate = "error";
|
||||
}
|
||||
$nextday = $date->format('Y-m-d');
|
||||
|
||||
$i=0;
|
||||
while($i < 4){
|
||||
|
||||
if($i!=0){
|
||||
#$nextday = date('Y-m-d', strtotime($nextday .' +7 day'));
|
||||
// Create a new DateTime object
|
||||
$currentDate = new DateTime($nextday);
|
||||
$datetempz = $currentDate->add(new DateInterval('P7D'));
|
||||
//Get yesterday date
|
||||
$nextday = $datetempz->format('Y-m-d');
|
||||
|
||||
|
||||
}
|
||||
$statementuser = $pdo->prepare("SELECT terminid FROM togo_termin WHERE date=:date AND start=:start AND end=:end AND standort=:standort");
|
||||
$statementuser->execute(array('date' => $nextday , 'start' => $togostart, 'end' => $togoende , 'standort' => $standort ));
|
||||
|
||||
$count = $statementuser->rowCount();
|
||||
if($count == 0){
|
||||
$insert = $pdo->prepare("INSERT INTO togo_termin (date, start, end,standort,error,warning) VALUES (:date, :start, :end,:standort, :error, :warning)");
|
||||
$insert->execute(array('date' => $nextday , 'start' => $togostart, 'end' => $togoende , 'standort' => $standort, 'error' => $error , 'warning' => $warning ));
|
||||
$userid = $pdo->lastInsertId();
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function SendMailMessageSilent($con, $empfaenger, $betreff, $body){
|
||||
|
||||
// LOGIN CONFIG AUSLESEN
|
||||
$queryconfig = mysqli_query($con, "Select * FROM config");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
|
||||
if($queryconfig->num_rows == 1){
|
||||
$row = mysqli_fetch_assoc($queryconfig);
|
||||
$userid = $row["mailserver"];
|
||||
echo $userid;
|
||||
}
|
||||
$mailserver = $rowconfig["mailserver"];
|
||||
$mailUsername = $rowconfig["mailUsername"];
|
||||
$mailPassword = $rowconfig["mailPassword"];
|
||||
$mailPort = $rowconfig["mailPort"];
|
||||
$mailFrom = $rowconfig["mailFrom"];
|
||||
$mailFromName = $rowconfig["mailFromName"];
|
||||
$mailSMTPSecure = $rowconfig["mailSMTPSecure"];
|
||||
|
||||
|
||||
$body = iconv('UTF-8', 'CP1252//IGNORE', $body);
|
||||
$betreff = iconv('UTF-8', 'CP1252//IGNORE', $betreff);
|
||||
//$mail = new PHPMailer(true);
|
||||
|
||||
|
||||
$mail = new PHPMailer(true);
|
||||
try {
|
||||
//Server settings
|
||||
$mail->SMTPDebug = 0; // Enable verbose debug output
|
||||
$mail->isSMTP(); // Set mailer to use SMTP
|
||||
//$mail->Host = 'vwp0583.webpack.hosteurope.de'; // Specify main and backup SMTP servers
|
||||
$mail->Host = $mailserver;
|
||||
$mail->SMTPAuth = true; // Enable SMTP authentication
|
||||
//$mail->Username = 'wp1085322-creutzburg'; // SMTP username
|
||||
//$mail->Password = 'praxis.cr'; // SMTP password
|
||||
$mail->Username = $mailUsername;
|
||||
$mail->Password = $mailPassword;
|
||||
$mail->SMTPSecure = $mailSMTPSecure; // Enable TLS encryption, `ssl` also accepted
|
||||
//$mail->Port = 587; // TCP port to connect to
|
||||
$mail->Port = $mailPort;
|
||||
//Recipients
|
||||
$mail->setFrom($mailFrom , $mailFromName);
|
||||
#$mail->addAddress('ccreutzburg@live.de', 'Joe User'); // Add a recipient
|
||||
$mail->addAddress($empfaenger); // Name is optional
|
||||
//$mail->addReplyTo('kontakt@praxis-creutzburg.de', 'Praxis Creutzburg');
|
||||
//$mail->addBCC('Arzt@praxis-creutzburg.de');
|
||||
//$mail->addBCC("praxis@balanceacademie.de");
|
||||
//Attachments
|
||||
#$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
|
||||
#$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
|
||||
|
||||
//Content
|
||||
$mail->isHTML(true); // Set email format to HTML
|
||||
$mail->Subject = $betreff;
|
||||
$mail->Body = $body;
|
||||
$mail->AltBody = $body;
|
||||
//$mail->charSet = "UTF-8";
|
||||
//$mail->Encoding = 'base64';
|
||||
|
||||
$mail->send();
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
use PHPMailer\PHPMailer\PHPMailer;
|
||||
use PHPMailer\PHPMailer\Exception;
|
||||
|
||||
require 'PHPMailer/src/Exception.php';
|
||||
require 'PHPMailer/src/PHPMailer.php';
|
||||
require 'PHPMailer/src/SMTP.php';
|
||||
|
||||
|
||||
|
||||
### Togo Termine anlegen
|
||||
|
||||
function gototerminanlegung() {
|
||||
|
||||
global $pdo;
|
||||
|
||||
$statementtermin = $pdo->prepare("SELECT * FROM togo_terminvorgaben");
|
||||
$statementtermin->execute();
|
||||
foreach ($statementtermin as $row) {
|
||||
$togovorgabenid = $row["vorgabenid"];
|
||||
$togodate = $row["date"];
|
||||
$togostart = $row["start"];
|
||||
$togoende = $row["ende"];
|
||||
$standort = $row["standort"];
|
||||
$error = $row["error"];
|
||||
$warning = $row["warning"];
|
||||
$date = new DateTime();
|
||||
if($togodate == "Mo"){
|
||||
$date->modify('next monday');
|
||||
|
||||
}elseif($togodate == "Di"){
|
||||
$$date->modify('next tuesday');
|
||||
#$nextday = date('Y-m-d', $nextTuesday);
|
||||
}elseif($togodate == "Mi"){
|
||||
$date->modify('next wednesday');
|
||||
#$nextday = date('Y-m-d', $nextTuesday);
|
||||
}elseif($togodate == "Do"){
|
||||
$date->modify('next thursday');
|
||||
#$nextday = date('Y-m-d', $nextTuesday);
|
||||
}elseif($togodate == "Fr"){
|
||||
$date->modify('next friday');
|
||||
#$nextday = date('Y-m-d', $nextTuesday);
|
||||
}elseif($togodate == "Sa"){
|
||||
$date->modify('next saturday');
|
||||
#$nextday = date('Y-m-d', $nextTuesday);
|
||||
}elseif($togodate == "so"){
|
||||
$date->modify('next sunday');
|
||||
#$nextday = date('Y-m-d', $nextTuesday);
|
||||
}else{
|
||||
$ausgabedate = "error";
|
||||
}
|
||||
$nextday = $date->format('Y-m-d');
|
||||
|
||||
$i=0;
|
||||
while($i < 4){
|
||||
|
||||
if($i!=0){
|
||||
#$nextday = date('Y-m-d', strtotime($nextday .' +7 day'));
|
||||
// Create a new DateTime object
|
||||
$currentDate = new DateTime($nextday);
|
||||
$datetempz = $currentDate->add(new DateInterval('P7D'));
|
||||
//Get yesterday date
|
||||
$nextday = $datetempz->format('Y-m-d');
|
||||
|
||||
|
||||
}
|
||||
$statementuser = $pdo->prepare("SELECT terminid FROM togo_termin WHERE date=:date AND start=:start AND end=:end AND standort=:standort");
|
||||
$statementuser->execute(array('date' => $nextday , 'start' => $togostart, 'end' => $togoende , 'standort' => $standort ));
|
||||
|
||||
$count = $statementuser->rowCount();
|
||||
if($count == 0){
|
||||
$insert = $pdo->prepare("INSERT INTO togo_termin (date, start, end,standort,error,warning) VALUES (:date, :start, :end,:standort, :error, :warning)");
|
||||
$insert->execute(array('date' => $nextday , 'start' => $togostart, 'end' => $togoende , 'standort' => $standort, 'error' => $error , 'warning' => $warning ));
|
||||
$userid = $pdo->lastInsertId();
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function SendMailMessageSilent($con, $empfaenger, $betreff, $body){
|
||||
|
||||
// LOGIN CONFIG AUSLESEN
|
||||
$queryconfig = mysqli_query($con, "Select * FROM config");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
|
||||
if($queryconfig->num_rows == 1){
|
||||
$row = mysqli_fetch_assoc($queryconfig);
|
||||
$userid = $row["mailserver"];
|
||||
echo $userid;
|
||||
}
|
||||
$mailserver = $rowconfig["mailserver"];
|
||||
$mailUsername = $rowconfig["mailUsername"];
|
||||
$mailPassword = $rowconfig["mailPassword"];
|
||||
$mailPort = $rowconfig["mailPort"];
|
||||
$mailFrom = $rowconfig["mailFrom"];
|
||||
$mailFromName = $rowconfig["mailFromName"];
|
||||
$mailSMTPSecure = $rowconfig["mailSMTPSecure"];
|
||||
|
||||
|
||||
$body = iconv('UTF-8', 'CP1252//IGNORE', $body);
|
||||
$betreff = iconv('UTF-8', 'CP1252//IGNORE', $betreff);
|
||||
//$mail = new PHPMailer(true);
|
||||
|
||||
|
||||
$mail = new PHPMailer(true);
|
||||
try {
|
||||
//Server settings
|
||||
$mail->SMTPDebug = 0; // Enable verbose debug output
|
||||
$mail->isSMTP(); // Set mailer to use SMTP
|
||||
//$mail->Host = 'vwp0583.webpack.hosteurope.de'; // Specify main and backup SMTP servers
|
||||
$mail->Host = $mailserver;
|
||||
$mail->SMTPAuth = true; // Enable SMTP authentication
|
||||
//$mail->Username = 'wp1085322-creutzburg'; // SMTP username
|
||||
//$mail->Password = 'praxis.cr'; // SMTP password
|
||||
$mail->Username = $mailUsername;
|
||||
$mail->Password = $mailPassword;
|
||||
$mail->SMTPSecure = $mailSMTPSecure; // Enable TLS encryption, `ssl` also accepted
|
||||
//$mail->Port = 587; // TCP port to connect to
|
||||
$mail->Port = $mailPort;
|
||||
//Recipients
|
||||
$mail->setFrom($mailFrom , $mailFromName);
|
||||
#$mail->addAddress('ccreutzburg@live.de', 'Joe User'); // Add a recipient
|
||||
$mail->addAddress($empfaenger); // Name is optional
|
||||
//$mail->addReplyTo('kontakt@praxis-creutzburg.de', 'Praxis Creutzburg');
|
||||
//$mail->addBCC('Arzt@praxis-creutzburg.de');
|
||||
//$mail->addBCC("praxis@balanceacademie.de");
|
||||
//Attachments
|
||||
#$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
|
||||
#$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
|
||||
|
||||
//Content
|
||||
$mail->isHTML(true); // Set email format to HTML
|
||||
$mail->Subject = $betreff;
|
||||
$mail->Body = $body;
|
||||
$mail->AltBody = $body;
|
||||
//$mail->charSet = "UTF-8";
|
||||
//$mail->Encoding = 'base64';
|
||||
|
||||
$mail->send();
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
+369
-49
@@ -35,6 +35,41 @@ if (!function_exists('impfTableHasIndex')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfEnsureTable')) {
|
||||
function impfEnsureTable(PDO $pdo, string $table, string $createSql): void
|
||||
{
|
||||
if (impfTableExists($pdo, $table)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$pdo->exec($createSql);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfNormalizeZeitraumIds')) {
|
||||
function impfNormalizeZeitraumIds($zeitraumIds): array
|
||||
{
|
||||
if ($zeitraumIds === null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!is_array($zeitraumIds)) {
|
||||
$zeitraumIds = [$zeitraumIds];
|
||||
}
|
||||
|
||||
$result = [];
|
||||
foreach ($zeitraumIds as $zeitraumId) {
|
||||
$zeitraumId = (int)$zeitraumId;
|
||||
if ($zeitraumId <= 0 || isset($result[$zeitraumId])) {
|
||||
continue;
|
||||
}
|
||||
$result[$zeitraumId] = $zeitraumId;
|
||||
}
|
||||
|
||||
return array_values($result);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWeekdayName')) {
|
||||
function impfWeekdayName(int $day): string
|
||||
{
|
||||
@@ -52,24 +87,44 @@ if (!function_exists('impfWeekdayName')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfLimitLabelLength')) {
|
||||
function impfLimitLabelLength(string $text, int $maxLength = 50): string
|
||||
{
|
||||
$text = trim($text);
|
||||
if ($text === '') {
|
||||
return $text;
|
||||
}
|
||||
|
||||
if (function_exists('mb_strimwidth')) {
|
||||
return rtrim(mb_strimwidth($text, 0, $maxLength, '...', 'UTF-8'));
|
||||
}
|
||||
|
||||
if (strlen($text) <= $maxLength) {
|
||||
return $text;
|
||||
}
|
||||
|
||||
return rtrim(substr($text, 0, max(0, $maxLength - 3))) . '...';
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowEnsureTables')) {
|
||||
function impfWorkflowEnsureTables(PDO $pdo): void
|
||||
{
|
||||
$pdo->exec("CREATE TABLE IF NOT EXISTS impf_workflow_meta (
|
||||
impfEnsureTable($pdo, 'impf_workflow_meta', "CREATE TABLE impf_workflow_meta (
|
||||
meta_key VARCHAR(100) NOT NULL,
|
||||
meta_value VARCHAR(255) NOT NULL DEFAULT '',
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (meta_key)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3");
|
||||
|
||||
$pdo->exec("CREATE TABLE IF NOT EXISTS impfstoff_workflow (
|
||||
impfEnsureTable($pdo, 'impfstoff_workflow', "CREATE TABLE impfstoff_workflow (
|
||||
impfstoff_id INT NOT NULL,
|
||||
dosen_pro_flasche INT NOT NULL,
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (impfstoff_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3");
|
||||
|
||||
$pdo->exec("CREATE TABLE IF NOT EXISTS impfstoff_wochenplan (
|
||||
impfEnsureTable($pdo, 'impfstoff_wochenplan', "CREATE TABLE impfstoff_wochenplan (
|
||||
plan_id INT NOT NULL AUTO_INCREMENT,
|
||||
impfstoff_id INT NOT NULL,
|
||||
wochentag TINYINT NOT NULL,
|
||||
@@ -83,7 +138,7 @@ if (!function_exists('impfWorkflowEnsureTables')) {
|
||||
INDEX idx_impfstoff_wochenplan_wochentag (wochentag)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3");
|
||||
|
||||
$pdo->exec("CREATE TABLE IF NOT EXISTS impf_zeitraum (
|
||||
impfEnsureTable($pdo, 'impf_zeitraum', "CREATE TABLE impf_zeitraum (
|
||||
zeitraum_id INT NOT NULL AUTO_INCREMENT,
|
||||
bezeichnung VARCHAR(120) NOT NULL DEFAULT '',
|
||||
wochentag TINYINT NOT NULL,
|
||||
@@ -101,7 +156,7 @@ if (!function_exists('impfWorkflowEnsureTables')) {
|
||||
$pdo->exec("ALTER TABLE impf_zeitraum ADD COLUMN bezeichnung VARCHAR(120) NOT NULL DEFAULT '' AFTER zeitraum_id");
|
||||
}
|
||||
|
||||
$pdo->exec("CREATE TABLE IF NOT EXISTS impf_zeitraum_impfstoff (
|
||||
impfEnsureTable($pdo, 'impf_zeitraum_impfstoff', "CREATE TABLE impf_zeitraum_impfstoff (
|
||||
zeitraum_id INT NOT NULL,
|
||||
impfstoff_id INT NOT NULL,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
@@ -109,6 +164,18 @@ if (!function_exists('impfWorkflowEnsureTables')) {
|
||||
INDEX idx_impf_zeitraum_impfstoff_impfstoff (impfstoff_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3");
|
||||
|
||||
impfEnsureTable($pdo, 'warteliste_zeitraum', "CREATE TABLE warteliste_zeitraum (
|
||||
warteid INT NOT NULL,
|
||||
zeitraum_id INT NOT NULL,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (warteid, zeitraum_id),
|
||||
INDEX idx_warteliste_zeitraum_zeitraum (zeitraum_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3");
|
||||
|
||||
if (impfTableExists($pdo, 'warteliste_zeitraum') && !impfTableHasIndex($pdo, 'warteliste_zeitraum', 'idx_warteliste_zeitraum_zeitraum')) {
|
||||
$pdo->exec("ALTER TABLE warteliste_zeitraum ADD INDEX idx_warteliste_zeitraum_zeitraum (zeitraum_id)");
|
||||
}
|
||||
|
||||
if (impfTableExists($pdo, 'warteliste') && !impfTableHasColumn($pdo, 'warteliste', 'zeitraum_id')) {
|
||||
$pdo->exec("ALTER TABLE warteliste ADD COLUMN zeitraum_id INT NULL AFTER impfenzeitraum");
|
||||
}
|
||||
@@ -117,6 +184,7 @@ if (!function_exists('impfWorkflowEnsureTables')) {
|
||||
}
|
||||
|
||||
impfWorkflowMigrateLegacyPlans($pdo);
|
||||
impfWorkflowMigrateLegacyWartelisteZeitraeume($pdo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,6 +295,42 @@ if (!function_exists('impfWorkflowMigrateLegacyPlans')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowMigrateLegacyWartelisteZeitraeume')) {
|
||||
function impfWorkflowMigrateLegacyWartelisteZeitraeume(PDO $pdo): void
|
||||
{
|
||||
if (!impfTableExists($pdo, 'warteliste') || !impfTableExists($pdo, 'warteliste_zeitraum')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (impfWorkflowGetMeta($pdo, 'legacy_warteliste_zeitraeume_migrated') === '1') {
|
||||
return;
|
||||
}
|
||||
|
||||
$manageTransaction = !$pdo->inTransaction();
|
||||
if ($manageTransaction) {
|
||||
$pdo->beginTransaction();
|
||||
}
|
||||
|
||||
try {
|
||||
$pdo->exec("INSERT IGNORE INTO warteliste_zeitraum (warteid, zeitraum_id)
|
||||
SELECT warteid, zeitraum_id
|
||||
FROM warteliste
|
||||
WHERE zeitraum_id IS NOT NULL
|
||||
AND zeitraum_id > 0");
|
||||
impfWorkflowSetMeta($pdo, 'legacy_warteliste_zeitraeume_migrated', '1');
|
||||
|
||||
if ($manageTransaction) {
|
||||
$pdo->commit();
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
if ($manageTransaction && $pdo->inTransaction()) {
|
||||
$pdo->rollBack();
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfCsvToIntList')) {
|
||||
function impfCsvToIntList(?string $csv): array
|
||||
{
|
||||
@@ -243,7 +347,7 @@ if (!function_exists('impfCsvToIntList')) {
|
||||
}
|
||||
|
||||
if (!function_exists('impfZeitraumLabel')) {
|
||||
function impfZeitraumLabel(array $zeitraum): string
|
||||
function impfZeitraumLabel(array $zeitraum, bool $includeName = true): string
|
||||
{
|
||||
$zeitText = impfWeekdayName((int)$zeitraum['wochentag']) . ' ' . substr((string)$zeitraum['start'], 0, 5) . '-' . substr((string)$zeitraum['ende'], 0, 5);
|
||||
$ort = trim((string)($zeitraum['anzeigename'] ?? '') . ' - ' . (string)($zeitraum['adresse'] ?? ''));
|
||||
@@ -252,12 +356,7 @@ if (!function_exists('impfZeitraumLabel')) {
|
||||
$zeitText .= ' (' . $ortText . ')';
|
||||
}
|
||||
|
||||
$bezeichnung = trim((string)($zeitraum['bezeichnung'] ?? ''));
|
||||
if ($bezeichnung !== '') {
|
||||
return $bezeichnung . ': ' . $zeitText;
|
||||
}
|
||||
|
||||
return $zeitText;
|
||||
return impfLimitLabelLength($zeitText, 50);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,7 +487,7 @@ if (!function_exists('impfGetWartelistenFormOptions')) {
|
||||
}
|
||||
$zeitfenster[$impfstoffId][] = [
|
||||
'id' => (int)$zeitraum['zeitraum_id'],
|
||||
'label' => (string)$zeitraum['label'],
|
||||
'label' => impfZeitraumLabel($zeitraum, false),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -406,12 +505,206 @@ if (!function_exists('impfGetWartelistenFormOptions')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfGetWartelistenZeitraeume')) {
|
||||
function impfGetWartelistenZeitraeume(PDO $pdo, int $warteid, bool $onlyActive = false): array
|
||||
{
|
||||
if ($warteid <= 0 || !impfTableExists($pdo, 'warteliste_zeitraum')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$sql = "SELECT z.zeitraum_id, z.bezeichnung, z.wochentag, z.start, z.ende, z.impfortid, z.aktiv, z.created_at,
|
||||
o.anzeigename, o.adresse
|
||||
FROM warteliste_zeitraum wz
|
||||
INNER JOIN impf_zeitraum z ON z.zeitraum_id = wz.zeitraum_id
|
||||
LEFT JOIN impfort o ON o.ortid = z.impfortid
|
||||
WHERE wz.warteid = :warteid";
|
||||
if ($onlyActive) {
|
||||
$sql .= " AND z.aktiv = 1";
|
||||
}
|
||||
$sql .= " ORDER BY z.wochentag, z.start, z.ende, z.bezeichnung, z.zeitraum_id";
|
||||
|
||||
$st = $pdo->prepare($sql);
|
||||
$st->execute(['warteid' => $warteid]);
|
||||
$rows = $st->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
foreach ($rows as &$row) {
|
||||
$row['label'] = impfZeitraumLabel($row);
|
||||
}
|
||||
unset($row);
|
||||
|
||||
if (!empty($rows)) {
|
||||
return $rows;
|
||||
}
|
||||
|
||||
$stFallback = $pdo->prepare("SELECT w.zeitraum_id, z.bezeichnung, z.wochentag, z.start, z.ende, z.impfortid, z.aktiv, z.created_at,
|
||||
o.anzeigename, o.adresse
|
||||
FROM warteliste w
|
||||
LEFT JOIN impf_zeitraum z ON z.zeitraum_id = w.zeitraum_id
|
||||
LEFT JOIN impfort o ON o.ortid = z.impfortid
|
||||
WHERE w.warteid = :warteid
|
||||
AND w.zeitraum_id IS NOT NULL
|
||||
LIMIT 1");
|
||||
$stFallback->execute(['warteid' => $warteid]);
|
||||
$row = $stFallback->fetch(PDO::FETCH_ASSOC);
|
||||
if (!$row) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$row['label'] = impfZeitraumLabel($row);
|
||||
return [$row];
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfGetWartelistenZeitraeumeLabels')) {
|
||||
function impfGetWartelistenZeitraeumeLabels(PDO $pdo, int $warteid, bool $onlyActive = false): array
|
||||
{
|
||||
$rows = impfGetWartelistenZeitraeume($pdo, $warteid, $onlyActive);
|
||||
return array_values(array_map(static function (array $row): string {
|
||||
return (string)($row['label'] ?? '');
|
||||
}, $rows));
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfGetWartelistenZeitraeumeLabelsMap')) {
|
||||
function impfGetWartelistenZeitraeumeLabelsMap(PDO $pdo, array $warteids, bool $onlyActive = false): array
|
||||
{
|
||||
$warteids = array_values(array_unique(array_filter(array_map('intval', $warteids), static function (int $warteid): bool {
|
||||
return $warteid > 0;
|
||||
})));
|
||||
|
||||
if (empty($warteids) || !impfTableExists($pdo, 'warteliste_zeitraum')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$result = [];
|
||||
foreach ($warteids as $warteid) {
|
||||
$result[$warteid] = [];
|
||||
}
|
||||
|
||||
$placeholders = [];
|
||||
$params = [];
|
||||
foreach ($warteids as $index => $warteid) {
|
||||
$key = 'wid' . $index;
|
||||
$placeholders[] = ':' . $key;
|
||||
$params[$key] = $warteid;
|
||||
}
|
||||
$inList = implode(', ', $placeholders);
|
||||
|
||||
$sql = "SELECT wz.warteid, z.zeitraum_id, z.bezeichnung, z.wochentag, z.start, z.ende, z.impfortid, z.aktiv, z.created_at,
|
||||
o.anzeigename, o.adresse
|
||||
FROM warteliste_zeitraum wz
|
||||
INNER JOIN impf_zeitraum z ON z.zeitraum_id = wz.zeitraum_id
|
||||
LEFT JOIN impfort o ON o.ortid = z.impfortid
|
||||
WHERE wz.warteid IN (" . $inList . ")";
|
||||
if ($onlyActive) {
|
||||
$sql .= " AND z.aktiv = 1";
|
||||
}
|
||||
$sql .= " ORDER BY wz.warteid, z.wochentag, z.start, z.ende, z.bezeichnung, z.zeitraum_id";
|
||||
|
||||
$st = $pdo->prepare($sql);
|
||||
$st->execute($params);
|
||||
$rows = $st->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$warteid = (int)($row['warteid'] ?? 0);
|
||||
if ($warteid <= 0) {
|
||||
continue;
|
||||
}
|
||||
$row['label'] = impfZeitraumLabel($row);
|
||||
$result[$warteid][] = (string)$row['label'];
|
||||
}
|
||||
|
||||
$missing = array_values(array_filter($warteids, static function (int $warteid) use ($result): bool {
|
||||
return empty($result[$warteid]);
|
||||
}));
|
||||
|
||||
if (empty($missing)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
$fallbackPlaceholders = [];
|
||||
$fallbackParams = [];
|
||||
foreach ($missing as $index => $warteid) {
|
||||
$key = 'f_wid' . $index;
|
||||
$fallbackPlaceholders[] = ':' . $key;
|
||||
$fallbackParams[$key] = $warteid;
|
||||
}
|
||||
$fallbackInList = implode(', ', $fallbackPlaceholders);
|
||||
|
||||
$fallbackSql = "SELECT w.warteid, w.zeitraum_id, z.bezeichnung, z.wochentag, z.start, z.ende, z.impfortid, z.aktiv, z.created_at,
|
||||
o.anzeigename, o.adresse
|
||||
FROM warteliste w
|
||||
LEFT JOIN impf_zeitraum z ON z.zeitraum_id = w.zeitraum_id
|
||||
LEFT JOIN impfort o ON o.ortid = z.impfortid
|
||||
WHERE w.warteid IN (" . $fallbackInList . ")
|
||||
AND w.zeitraum_id IS NOT NULL";
|
||||
if ($onlyActive) {
|
||||
$fallbackSql .= " AND z.aktiv = 1";
|
||||
}
|
||||
|
||||
$stFallback = $pdo->prepare($fallbackSql);
|
||||
$stFallback->execute($fallbackParams);
|
||||
$fallbackRows = $stFallback->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
foreach ($fallbackRows as $row) {
|
||||
$warteid = (int)($row['warteid'] ?? 0);
|
||||
if ($warteid <= 0) {
|
||||
continue;
|
||||
}
|
||||
$row['label'] = impfZeitraumLabel($row);
|
||||
$result[$warteid] = [(string)$row['label']];
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfSetWartelistenZeitraeume')) {
|
||||
function impfSetWartelistenZeitraeume(PDO $pdo, int $warteid, $zeitraumIds): void
|
||||
{
|
||||
$zeitraumIds = impfNormalizeZeitraumIds($zeitraumIds);
|
||||
if ($warteid <= 0) {
|
||||
throw new InvalidArgumentException('Unguelige Wartelisten-ID.');
|
||||
}
|
||||
|
||||
$manageTransaction = !$pdo->inTransaction();
|
||||
if ($manageTransaction) {
|
||||
$pdo->beginTransaction();
|
||||
}
|
||||
|
||||
try {
|
||||
$stDelete = $pdo->prepare("DELETE FROM warteliste_zeitraum WHERE warteid = :warteid");
|
||||
$stDelete->execute(['warteid' => $warteid]);
|
||||
|
||||
if (!empty($zeitraumIds)) {
|
||||
$stInsert = $pdo->prepare("INSERT INTO warteliste_zeitraum (warteid, zeitraum_id)
|
||||
VALUES (:warteid, :zeitraum_id)");
|
||||
foreach ($zeitraumIds as $zeitraumId) {
|
||||
$stInsert->execute([
|
||||
'warteid' => $warteid,
|
||||
'zeitraum_id' => $zeitraumId,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($manageTransaction) {
|
||||
$pdo->commit();
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
if ($manageTransaction && $pdo->inTransaction()) {
|
||||
$pdo->rollBack();
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfCreateWaitlistEntryForPerson')) {
|
||||
function impfCreateWaitlistEntryForPerson(
|
||||
PDO $pdo,
|
||||
int $personId,
|
||||
int $impfstoffId,
|
||||
int $zeitraumId,
|
||||
$zeitraumIds,
|
||||
int $impfart,
|
||||
?string $letzteImpfung = null,
|
||||
int $checked = 1
|
||||
@@ -422,13 +715,15 @@ if (!function_exists('impfCreateWaitlistEntryForPerson')) {
|
||||
if ($impfstoffId <= 0) {
|
||||
return [false, 'Bitte einen Impfstoff auswaehlen.', null];
|
||||
}
|
||||
if ($zeitraumId <= 0) {
|
||||
return [false, 'Bitte ein Zeitfenster auswaehlen.', null];
|
||||
}
|
||||
if ($impfart < 1 || $impfart > 4) {
|
||||
return [false, 'Bitte eine gueltige Impfungsart auswaehlen.', null];
|
||||
}
|
||||
|
||||
$zeitraumIds = impfNormalizeZeitraumIds($zeitraumIds);
|
||||
if (empty($zeitraumIds)) {
|
||||
return [false, 'Bitte mindestens ein Zeitfenster auswaehlen.', null];
|
||||
}
|
||||
|
||||
$letzteImpfung = $letzteImpfung !== null ? trim($letzteImpfung) : null;
|
||||
if ($impfart === 1) {
|
||||
$letzteImpfung = null;
|
||||
@@ -448,26 +743,32 @@ if (!function_exists('impfCreateWaitlistEntryForPerson')) {
|
||||
return [false, 'Die Person wurde nicht gefunden.', null];
|
||||
}
|
||||
|
||||
$zeitraum = impfLoadZeitraumById($pdo, $zeitraumId, true);
|
||||
if (!$zeitraum) {
|
||||
return [false, 'Das ausgewaehlte Zeitfenster ist nicht mehr verfuegbar.', null];
|
||||
}
|
||||
if (!in_array($impfstoffId, $zeitraum['impfstoff_id_list'] ?? [], true)) {
|
||||
return [false, 'Impfstoff und Zeitfenster passen nicht zusammen.', null];
|
||||
$zeitraumRows = [];
|
||||
$zeitraumLabels = [];
|
||||
foreach ($zeitraumIds as $zeitraumId) {
|
||||
$row = impfLoadZeitraumById($pdo, $zeitraumId, true);
|
||||
if (!$row) {
|
||||
return [false, 'Mindestens ein ausgewaehltes Zeitfenster ist nicht mehr verfuegbar.', null];
|
||||
}
|
||||
if (!in_array($impfstoffId, $row['impfstoff_id_list'] ?? [], true)) {
|
||||
return [false, 'Impfstoff und Zeitfenster passen nicht zusammen.', null];
|
||||
}
|
||||
$zeitraumRows[$zeitraumId] = $row;
|
||||
$zeitraumLabels[] = (string)$row['label'];
|
||||
}
|
||||
|
||||
$stDup = $pdo->prepare("SELECT warteid
|
||||
FROM warteliste
|
||||
WHERE userid = :uid
|
||||
AND checked IN (0, 1)
|
||||
AND impfstoff = :impfstoff
|
||||
AND COALESCE(zeitraum_id, 0) = :zeitraum_id
|
||||
AND impfart = :impfart
|
||||
$stDup = $pdo->prepare("SELECT w.warteid
|
||||
FROM warteliste w
|
||||
LEFT JOIN warteliste_zeitraum wz ON wz.warteid = w.warteid
|
||||
WHERE w.userid = :uid
|
||||
AND w.checked IN (0, 1)
|
||||
AND w.impfstoff = :impfstoff
|
||||
AND w.impfart = :impfart
|
||||
GROUP BY w.warteid
|
||||
LIMIT 1");
|
||||
$stDup->execute([
|
||||
'uid' => $personId,
|
||||
'impfstoff' => $impfstoffId,
|
||||
'zeitraum_id' => $zeitraumId,
|
||||
'impfart' => $impfart,
|
||||
]);
|
||||
if ($stDup->fetchColumn()) {
|
||||
@@ -477,26 +778,45 @@ if (!function_exists('impfCreateWaitlistEntryForPerson')) {
|
||||
$patientenart = ((int)($person['patientenart'] ?? 0) === 1) ? 1 : 0;
|
||||
$hash = bin2hex(random_bytes(16));
|
||||
$checkedValue = ($checked === 0) ? 0 : 1;
|
||||
$primaerZeitraumId = (int)$zeitraumIds[0];
|
||||
$impfenzeitraum = implode(' | ', $zeitraumLabels);
|
||||
|
||||
$stInsert = $pdo->prepare("INSERT INTO warteliste
|
||||
(userid, checked, hash, impfenangebot, impfstoff, Patientenart, Impfaufklaerung, WeitereFragen, impfart, impfenmit, letzteimpfung, impfenzeitraum, zeitraum_id, date_created)
|
||||
VALUES
|
||||
(:userid, :checked, :hash, 1, :impfstoff, :patientenart, 0, 0, :impfart, '', :letzteimpfung, :impfenzeitraum, :zeitraum_id, NOW())");
|
||||
$stInsert->execute([
|
||||
'userid' => $personId,
|
||||
'checked' => $checkedValue,
|
||||
'hash' => $hash,
|
||||
'impfstoff' => $impfstoffId,
|
||||
'patientenart' => $patientenart,
|
||||
'impfart' => $impfart,
|
||||
'letzteimpfung' => $letzteImpfung,
|
||||
'impfenzeitraum' => (string)$zeitraum['label'],
|
||||
'zeitraum_id' => $zeitraumId,
|
||||
]);
|
||||
$manageTransaction = !$pdo->inTransaction();
|
||||
if ($manageTransaction) {
|
||||
$pdo->beginTransaction();
|
||||
}
|
||||
|
||||
$warteid = (int)$pdo->lastInsertId();
|
||||
$personName = trim((string)$person['vorname'] . ' ' . (string)$person['nachname']);
|
||||
try {
|
||||
$stInsert = $pdo->prepare("INSERT INTO warteliste
|
||||
(userid, checked, hash, impfenangebot, impfstoff, Patientenart, Impfaufklaerung, WeitereFragen, impfart, impfenmit, letzteimpfung, impfenzeitraum, zeitraum_id, date_created)
|
||||
VALUES
|
||||
(:userid, :checked, :hash, 1, :impfstoff, :patientenart, 0, 0, :impfart, '', :letzteimpfung, :impfenzeitraum, :zeitraum_id, NOW())");
|
||||
$stInsert->execute([
|
||||
'userid' => $personId,
|
||||
'checked' => $checkedValue,
|
||||
'hash' => $hash,
|
||||
'impfstoff' => $impfstoffId,
|
||||
'patientenart' => $patientenart,
|
||||
'impfart' => $impfart,
|
||||
'letzteimpfung' => $letzteImpfung,
|
||||
'impfenzeitraum' => $impfenzeitraum,
|
||||
'zeitraum_id' => $primaerZeitraumId,
|
||||
]);
|
||||
|
||||
return [true, 'Wartelistenplatz fuer ' . $personName . ' wurde gespeichert.', $warteid];
|
||||
$warteid = (int)$pdo->lastInsertId();
|
||||
impfSetWartelistenZeitraeume($pdo, $warteid, $zeitraumIds);
|
||||
|
||||
if ($manageTransaction) {
|
||||
$pdo->commit();
|
||||
}
|
||||
|
||||
$personName = trim((string)$person['vorname'] . ' ' . (string)$person['nachname']);
|
||||
return [true, 'Wartelistenplatz fuer ' . $personName . ' wurde gespeichert.', $warteid];
|
||||
} catch (Throwable $e) {
|
||||
if ($manageTransaction && $pdo->inTransaction()) {
|
||||
$pdo->rollBack();
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1262,6 +1262,8 @@ function Userspeichern($vorname, $nachname, $geburtstag, $mail, $tele, $ort, $pl
|
||||
UPDATE persons
|
||||
SET vorname=:vorname,
|
||||
nachname=:nachname,
|
||||
geburtstag=:geburtstag,
|
||||
email=:email,
|
||||
tele=:tele,
|
||||
ort=:ort,
|
||||
plz=:plz,
|
||||
|
||||
@@ -0,0 +1,256 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('impfWorkflowNotificationEnsureMetaTable')) {
|
||||
function impfWorkflowNotificationEnsureMetaTable(PDO $pdo): void
|
||||
{
|
||||
$pdo->exec("CREATE TABLE IF NOT EXISTS impf_workflow_meta (
|
||||
meta_key VARCHAR(100) NOT NULL,
|
||||
meta_value VARCHAR(255) NOT NULL DEFAULT '',
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (meta_key)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4");
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowNotificationGetMeta')) {
|
||||
function impfWorkflowNotificationGetMeta(PDO $pdo, string $key): ?string
|
||||
{
|
||||
impfWorkflowNotificationEnsureMetaTable($pdo);
|
||||
|
||||
$st = $pdo->prepare("SELECT meta_value
|
||||
FROM impf_workflow_meta
|
||||
WHERE meta_key = :meta_key
|
||||
LIMIT 1");
|
||||
$st->execute(['meta_key' => $key]);
|
||||
$value = $st->fetchColumn();
|
||||
|
||||
return ($value === false) ? null : (string)$value;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowNotificationSetMeta')) {
|
||||
function impfWorkflowNotificationSetMeta(PDO $pdo, string $key, string $value): void
|
||||
{
|
||||
impfWorkflowNotificationEnsureMetaTable($pdo);
|
||||
|
||||
$st = $pdo->prepare("INSERT INTO impf_workflow_meta (meta_key, meta_value)
|
||||
VALUES (:meta_key, :meta_value)
|
||||
ON DUPLICATE KEY UPDATE meta_value = VALUES(meta_value)");
|
||||
$st->execute([
|
||||
'meta_key' => $key,
|
||||
'meta_value' => $value,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowNotificationGetEmail')) {
|
||||
function impfWorkflowNotificationGetEmail(PDO $pdo): string
|
||||
{
|
||||
return trim((string)(impfWorkflowNotificationGetMeta($pdo, 'benachrichtigung_email') ?? ''));
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowNotificationSetEmail')) {
|
||||
function impfWorkflowNotificationSetEmail(PDO $pdo, string $email): void
|
||||
{
|
||||
$email = trim($email);
|
||||
impfWorkflowNotificationSetMeta($pdo, 'benachrichtigung_email', $email);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowNotificationIsReady')) {
|
||||
function impfWorkflowNotificationIsReady(PDO $pdo): bool
|
||||
{
|
||||
return impfWorkflowNotificationGetEmail($pdo) !== '';
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowNotificationShouldTrigger')) {
|
||||
function impfWorkflowNotificationShouldTrigger(int $wartende, int $dosen): bool
|
||||
{
|
||||
if ($wartende < 5) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($dosen > 5) {
|
||||
return $wartende >= $dosen;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowNotificationStateKey')) {
|
||||
function impfWorkflowNotificationStateKey(int $impfstoffId, int $zeitraumId): string
|
||||
{
|
||||
return 'notification_sent_' . $impfstoffId . '_' . $zeitraumId;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowNotificationCountWaitersForPlan')) {
|
||||
function impfWorkflowNotificationCountWaitersForPlan(PDO $pdo, int $impfstoffId, int $zeitraumId): int
|
||||
{
|
||||
if ($impfstoffId <= 0 || $zeitraumId <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$st = $pdo->prepare("SELECT COUNT(DISTINCT w.userid)
|
||||
FROM warteliste w
|
||||
WHERE w.checked = 1
|
||||
AND (w.impfstoff = :iid OR w.impfstoff = 0)
|
||||
AND (
|
||||
EXISTS (
|
||||
SELECT 1
|
||||
FROM warteliste_zeitraum wz
|
||||
WHERE wz.warteid = w.warteid
|
||||
AND wz.zeitraum_id = :zid
|
||||
)
|
||||
OR (
|
||||
NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM warteliste_zeitraum wz_none
|
||||
WHERE wz_none.warteid = w.warteid
|
||||
)
|
||||
AND (w.zeitraum_id = :zid OR w.zeitraum_id IS NULL)
|
||||
)
|
||||
)");
|
||||
$st->execute([
|
||||
'iid' => $impfstoffId,
|
||||
'zid' => $zeitraumId,
|
||||
]);
|
||||
|
||||
return (int)$st->fetchColumn();
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowNotificationSendForPlan')) {
|
||||
function impfWorkflowNotificationSendForPlan(
|
||||
PDO $pdo,
|
||||
int $impfstoffId,
|
||||
string $impfstoffName,
|
||||
int $zeitraumId,
|
||||
string $zeitraumLabel,
|
||||
int $wartende,
|
||||
int $dosen
|
||||
): array {
|
||||
if ($impfstoffId <= 0 || $zeitraumId <= 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$stateKey = impfWorkflowNotificationStateKey($impfstoffId, $zeitraumId);
|
||||
$alreadySent = impfWorkflowNotificationGetMeta($pdo, $stateKey) === '1';
|
||||
$shouldTrigger = impfWorkflowNotificationShouldTrigger($wartende, $dosen);
|
||||
|
||||
if (!$shouldTrigger) {
|
||||
if ($alreadySent) {
|
||||
impfWorkflowNotificationSetMeta($pdo, $stateKey, '0');
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
if ($alreadySent) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$email = impfWorkflowNotificationGetEmail($pdo);
|
||||
if ($email === '') {
|
||||
return [];
|
||||
}
|
||||
|
||||
$thresholdText = ($dosen > 5)
|
||||
? 'Die Flasche hat mehr als 5 Dosen, daher wird erst bei einer vollen Flasche benachrichtigt.'
|
||||
: 'Es sind mindestens 5 Interessenten fuer dieses Zeitfenster vorhanden.';
|
||||
|
||||
$subject = 'Impfworkflow: Warteliste ist bereit fuer ' . $impfstoffName;
|
||||
$body = '<p>Fuer den Impfworkflow ist ein Zeitfenster benachrichtigungsreif.</p>'
|
||||
. '<p><strong>Impfstoff:</strong> ' . htmlspecialchars($impfstoffName, ENT_QUOTES, 'UTF-8') . '<br>'
|
||||
. '<strong>Zeitfenster:</strong> ' . htmlspecialchars($zeitraumLabel, ENT_QUOTES, 'UTF-8') . '<br>'
|
||||
. '<strong>Interessenten:</strong> ' . $wartende . '<br>'
|
||||
. '<strong>Dosen pro Flasche:</strong> ' . $dosen . '</p>'
|
||||
. '<p>' . htmlspecialchars($thresholdText, ENT_QUOTES, 'UTF-8') . '</p>';
|
||||
|
||||
if (!SendMailMessage($pdo, $email, $subject, $body)) {
|
||||
throw new RuntimeException('Benachrichtigungs-E-Mail konnte nicht versendet werden.');
|
||||
}
|
||||
|
||||
impfWorkflowNotificationSetMeta($pdo, $stateKey, '1');
|
||||
|
||||
return [[
|
||||
'impfstoff_id' => $impfstoffId,
|
||||
'zeitraum_id' => $zeitraumId,
|
||||
'email' => $email,
|
||||
'impfstoff' => $impfstoffName,
|
||||
'zeitraum' => $zeitraumLabel,
|
||||
'wartende' => $wartende,
|
||||
'dosen' => $dosen,
|
||||
]];
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('impfWorkflowNotificationProcess')) {
|
||||
function impfWorkflowNotificationProcess(PDO $pdo, int $impfstoffId = 0, array $zeitraumIds = []): array
|
||||
{
|
||||
if (!function_exists('impfGetZeitraeumeByImpfstoff') || !function_exists('impfLoadZeitraumById')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$zeitraumIds = array_values(array_unique(array_filter(array_map('intval', $zeitraumIds), static function (int $zeitraumId): bool {
|
||||
return $zeitraumId > 0;
|
||||
})));
|
||||
|
||||
$sql = "SELECT r.impfstoff_id, r.dosen_pro_flasche, i.impfname
|
||||
FROM impfstoff_workflow r
|
||||
INNER JOIN impfstoff i ON i.impfid = r.impfstoff_id
|
||||
WHERE (i.aktiv = 1 OR i.aktivwarteliste = 1 OR i.aktivtermin = 1 OR i.aktivgrippe = 1)";
|
||||
$params = [];
|
||||
if ($impfstoffId > 0) {
|
||||
$sql .= " AND r.impfstoff_id = :iid";
|
||||
$params['iid'] = $impfstoffId;
|
||||
}
|
||||
$sql .= " ORDER BY i.impfname";
|
||||
|
||||
$stRules = $pdo->prepare($sql);
|
||||
$stRules->execute($params);
|
||||
$rules = $stRules->fetchAll(PDO::FETCH_ASSOC);
|
||||
if (empty($rules)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$zeitraeumeByImpfstoff = impfGetZeitraeumeByImpfstoff($pdo, true);
|
||||
$sent = [];
|
||||
|
||||
foreach ($rules as $rule) {
|
||||
$currentImpfstoffId = (int)$rule['impfstoff_id'];
|
||||
$dosen = (int)$rule['dosen_pro_flasche'];
|
||||
if ($currentImpfstoffId <= 0 || $dosen <= 0 || empty($zeitraeumeByImpfstoff[$currentImpfstoffId])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($zeitraeumeByImpfstoff[$currentImpfstoffId] as $zeitraum) {
|
||||
$currentZeitraumId = (int)($zeitraum['zeitraum_id'] ?? 0);
|
||||
if ($currentZeitraumId <= 0) {
|
||||
continue;
|
||||
}
|
||||
if (!empty($zeitraumIds) && !in_array($currentZeitraumId, $zeitraumIds, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$wartende = impfWorkflowNotificationCountWaitersForPlan($pdo, $currentImpfstoffId, $currentZeitraumId);
|
||||
$sent = array_merge(
|
||||
$sent,
|
||||
impfWorkflowNotificationSendForPlan(
|
||||
$pdo,
|
||||
$currentImpfstoffId,
|
||||
(string)$rule['impfname'],
|
||||
$currentZeitraumId,
|
||||
(string)($zeitraum['label'] ?? ''),
|
||||
$wartende,
|
||||
$dosen
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $sent;
|
||||
}
|
||||
}
|
||||
+36
-36
@@ -1,37 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Patientsuche
|
||||
* @copyright Copyright (C) 2021 ctb-it.de Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
include("config.inc.php");
|
||||
|
||||
|
||||
/* retrieve the search term that autocomplete sends */
|
||||
$term = trim(strip_tags($_GET['term']));
|
||||
|
||||
$a_json = array();
|
||||
$a_json_row = array();
|
||||
|
||||
$sql = 'SELECT * FROM persons WHERE vorname LIKE "%' . $term . '%" OR nachname LIKE "%' . $term . '%" OR email LIKE "%' . $term . '%" OR tele LIKE "%' . $term . '%" ORDER BY nachname, vorname ';
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
|
||||
$userid = stripslashes($row['person_id']);
|
||||
$name = stripslashes($row['nachname']);
|
||||
$vorname = stripslashes($row['vorname']);
|
||||
$geburtstag = stripslashes($row['geburtstag']);
|
||||
$email = htmlentities(stripslashes($row['email']));
|
||||
$tele = htmlentities(stripslashes($row['tele']));
|
||||
$a_json_row["id"] = $userid;
|
||||
$a_json_row["value"] = $vorname.' '.$name.' - '.$geburtstag.' - '.$email.' - '.$tele;
|
||||
$a_json_row["label"] = $vorname.' '.$name.' - '.$geburtstag.' - '.$email.' - '.$tele;
|
||||
array_push($a_json, $a_json_row);
|
||||
|
||||
}
|
||||
// jQuery wants JSON data
|
||||
echo json_encode($a_json);
|
||||
|
||||
<?php
|
||||
/**
|
||||
* @package Patientsuche
|
||||
* @copyright Copyright (C) 2021 ctb-it.de Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
include("config.inc.php");
|
||||
|
||||
|
||||
/* retrieve the search term that autocomplete sends */
|
||||
$term = trim(strip_tags($_GET['term']));
|
||||
|
||||
$a_json = array();
|
||||
$a_json_row = array();
|
||||
|
||||
$sql = 'SELECT * FROM persons WHERE vorname LIKE "%' . $term . '%" OR nachname LIKE "%' . $term . '%" OR email LIKE "%' . $term . '%" OR tele LIKE "%' . $term . '%" ORDER BY nachname, vorname ';
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
|
||||
$userid = stripslashes($row['person_id']);
|
||||
$name = stripslashes($row['nachname']);
|
||||
$vorname = stripslashes($row['vorname']);
|
||||
$geburtstag = stripslashes($row['geburtstag']);
|
||||
$email = htmlentities(stripslashes($row['email']));
|
||||
$tele = htmlentities(stripslashes($row['tele']));
|
||||
$a_json_row["id"] = $userid;
|
||||
$a_json_row["value"] = $vorname.' '.$name.' - '.$geburtstag.' - '.$email.' - '.$tele;
|
||||
$a_json_row["label"] = $vorname.' '.$name.' - '.$geburtstag.' - '.$email.' - '.$tele;
|
||||
array_push($a_json, $a_json_row);
|
||||
|
||||
}
|
||||
// jQuery wants JSON data
|
||||
echo json_encode($a_json);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('websiteContentEnsureEntry')) {
|
||||
function websiteContentEnsureEntry(PDO $pdo, array $entry): int
|
||||
{
|
||||
$title = trim((string)($entry['webseitentitel'] ?? ''));
|
||||
if ($title === '') {
|
||||
throw new InvalidArgumentException('webseitentitel is required');
|
||||
}
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT inhaltid
|
||||
FROM webseiteninhalt
|
||||
WHERE webseitentitel = :webseitentitel
|
||||
ORDER BY inhaltid DESC
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute(['webseitentitel' => $title]);
|
||||
$existingId = (int)($stmt->fetchColumn() ?: 0);
|
||||
|
||||
if ($existingId > 0) {
|
||||
return $existingId;
|
||||
}
|
||||
|
||||
$insert = $pdo->prepare("
|
||||
INSERT INTO webseiteninhalt (webseitentitel, inhalt, beschreibung, url)
|
||||
VALUES (:webseitentitel, :inhalt, :beschreibung, :url)
|
||||
");
|
||||
$insert->execute([
|
||||
'webseitentitel' => $title,
|
||||
'inhalt' => (string)($entry['inhalt'] ?? ''),
|
||||
'beschreibung' => (string)($entry['beschreibung'] ?? ''),
|
||||
'url' => (string)($entry['url'] ?? ''),
|
||||
]);
|
||||
|
||||
return (int)$pdo->lastInsertId();
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('websiteContentEnsureEntries')) {
|
||||
function websiteContentEnsureEntries(PDO $pdo, array $entries): void
|
||||
{
|
||||
foreach ($entries as $entry) {
|
||||
websiteContentEnsureEntry($pdo, $entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('websiteContentGetByTitle')) {
|
||||
function websiteContentGetByTitle(PDO $pdo, string $title, string $fallback = ''): array
|
||||
{
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT inhaltid, webseitentitel, inhalt, beschreibung, url
|
||||
FROM webseiteninhalt
|
||||
WHERE webseitentitel = :webseitentitel
|
||||
ORDER BY inhaltid DESC
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute(['webseitentitel' => $title]);
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($row) {
|
||||
return $row;
|
||||
}
|
||||
|
||||
return [
|
||||
'inhaltid' => 0,
|
||||
'webseitentitel' => $title,
|
||||
'inhalt' => $fallback,
|
||||
'beschreibung' => '',
|
||||
'url' => '',
|
||||
];
|
||||
}
|
||||
}
|
||||
+119
-119
@@ -1,120 +1,120 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Patientsuche
|
||||
* @copyright Copyright (C) 2021 ctb-it.de Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
include("config.inc.php");
|
||||
|
||||
|
||||
if(isset($_POST["timeid"])){
|
||||
$timeid=$_POST["timeid"];
|
||||
|
||||
$statementtermin = $pdo->prepare("SELECT impfstoff, date,terminart, ZIminimal, ZImaximal, ZIaktiv, ZIbiontech, ZIastra, ZImoderna FROM timeslots INNER JOIN impfstoff ON timeslots.impfstoff = impfstoff.impfid WHERE timeid = :timeid");
|
||||
$statementtermin->execute(array('timeid' => $timeid));
|
||||
$rowtime = $statementtermin->fetch(PDO::FETCH_ASSOC);
|
||||
$ZIaktiv = $rowtime["ZIaktiv"];
|
||||
$ZIminimal = $rowtime["ZIminimal"];
|
||||
$ZImaximal = $rowtime["ZImaximal"];
|
||||
$ZIbiontech = $rowtime["ZIbiontech"];
|
||||
$ZIastra = $rowtime["ZIastra"];
|
||||
$ZImoderna = $rowtime["ZImoderna"];
|
||||
$impfname = $rowtime["impfname"];
|
||||
$terminart = $rowtime["terminart"];
|
||||
|
||||
$minimaldate = date_create($rowtime["date"]);
|
||||
date_add($minimaldate, date_interval_create_from_date_string($ZIminimal . ' days'));
|
||||
$minimaldate = date_format($minimaldate, 'Y-m-d');
|
||||
$maximaldate = date_create($rowtime["date"]);
|
||||
date_add($maximaldate, date_interval_create_from_date_string($ZImaximal . ' days'));
|
||||
$maximaldate = date_format($maximaldate, 'Y-m-d');
|
||||
$impfstoffstring = "";
|
||||
$terminartstring = "";
|
||||
|
||||
if($ZIaktiv && ($terminart == 1 || $terminart == 0) ){
|
||||
if($ZIbiontech){
|
||||
if($impfstoffstring == ""){
|
||||
$impfstoffstring = $impfstoffstring . "(impfstoff='3'";
|
||||
}else{
|
||||
$impfstoffstring = $impfstoffstring . " OR impfstoff='3'";
|
||||
}
|
||||
}
|
||||
if($ZIastra){
|
||||
if($impfstoffstring == ""){
|
||||
$impfstoffstring = $impfstoffstring . "(impfstoff='2'";
|
||||
}else{
|
||||
$impfstoffstring = $impfstoffstring . " OR impfstoff='2'";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if($ZImoderna){
|
||||
if($impfstoffstring == ""){
|
||||
$impfstoffstring = $impfstoffstring . "(impfstoff='5'";
|
||||
}else{
|
||||
$impfstoffstring = $impfstoffstring . " OR impfstoff='5'";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$impfstoffstring = $impfstoffstring . ")";
|
||||
$terminartstring = " AND (terminart='1' OR terminart='3' OR terminart='5')";
|
||||
|
||||
|
||||
|
||||
$statement = $pdo->prepare("SELECT date,start,ende,impfdosen,timeid,impfstoff FROM timeslots WHERE date>= '$minimaldate' AND date<='$maximaldate' AND $impfstoffstring $terminartstring AND impfdosen > 0");
|
||||
$statement->execute();
|
||||
$count = $statement->rowCount();
|
||||
|
||||
if($count == 0){
|
||||
echo"<h3>Zweitimpfung</h3><b>Aktuell stehen bei uns keine Termine für die Zweitimpfung zur Verfügung.</b><br>Bitte kümmern Sie sich selbstständig, um einen Termin für die Zweitimpfung.<br>Sobald wir Termine für die Zweitimpfung zur Verfügung haben, finden Sie diese auch auf dieser Webseite.<br><h4>Sehen Sie von weiteren telefonischen Anfragen ab!</h4><br>";
|
||||
}else{
|
||||
?>
|
||||
<div class="select-wrapper">
|
||||
<label for="Zweitimpfung">Die Zweitimpfung nehme ich am folgenden Termin wahr:</label>
|
||||
<select name="Zweitimpfung" id="Zweitimpfung" required onchange="checkTerminzeitraumZweit()">
|
||||
<?php
|
||||
|
||||
//echo '<form action="'. $_SERVER['PHP_SELF'] .'" method=POST>';
|
||||
echo '<option value="">- Terminzeitraum </option>';
|
||||
|
||||
foreach ($statement as $row) {
|
||||
$datum = date("d.m.Y", strtotime($row["date"]));
|
||||
$start = substr($row["start"],0, 5);
|
||||
$ende = substr($row["ende"],0, 5);
|
||||
$dosenanzahl = $row["impfdosen"];
|
||||
$timeid = $row["timeid"];
|
||||
$impfid = $row["impfstoff"];
|
||||
|
||||
$statementtermin = $pdo->prepare("SELECT impfname FROM impfstoff WHERE impfid =:impfid");
|
||||
$statementtermin->execute(array('impfid' => $impfid));
|
||||
$rowimpf = $statementtermin->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
|
||||
$impfstofftext = $rowimpf["impfname"];
|
||||
|
||||
$value = "$timeid";
|
||||
$anzeige = "$datum - $start-$ende - $dosenanzahl Plätze frei - $impfstofftext";
|
||||
echo '<option value="' . $value . '">' . $anzeige . '</option>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</select>
|
||||
<div id="TerminzeitrauminfoZweit"></div><br>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
<?php
|
||||
/**
|
||||
* @package Patientsuche
|
||||
* @copyright Copyright (C) 2021 ctb-it.de Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
include("config.inc.php");
|
||||
|
||||
|
||||
if(isset($_POST["timeid"])){
|
||||
$timeid=$_POST["timeid"];
|
||||
|
||||
$statementtermin = $pdo->prepare("SELECT impfstoff, date,terminart, ZIminimal, ZImaximal, ZIaktiv, ZIbiontech, ZIastra, ZImoderna FROM timeslots INNER JOIN impfstoff ON timeslots.impfstoff = impfstoff.impfid WHERE timeid = :timeid");
|
||||
$statementtermin->execute(array('timeid' => $timeid));
|
||||
$rowtime = $statementtermin->fetch(PDO::FETCH_ASSOC);
|
||||
$ZIaktiv = $rowtime["ZIaktiv"];
|
||||
$ZIminimal = $rowtime["ZIminimal"];
|
||||
$ZImaximal = $rowtime["ZImaximal"];
|
||||
$ZIbiontech = $rowtime["ZIbiontech"];
|
||||
$ZIastra = $rowtime["ZIastra"];
|
||||
$ZImoderna = $rowtime["ZImoderna"];
|
||||
$impfname = $rowtime["impfname"];
|
||||
$terminart = $rowtime["terminart"];
|
||||
|
||||
$minimaldate = date_create($rowtime["date"]);
|
||||
date_add($minimaldate, date_interval_create_from_date_string($ZIminimal . ' days'));
|
||||
$minimaldate = date_format($minimaldate, 'Y-m-d');
|
||||
$maximaldate = date_create($rowtime["date"]);
|
||||
date_add($maximaldate, date_interval_create_from_date_string($ZImaximal . ' days'));
|
||||
$maximaldate = date_format($maximaldate, 'Y-m-d');
|
||||
$impfstoffstring = "";
|
||||
$terminartstring = "";
|
||||
|
||||
if($ZIaktiv && ($terminart == 1 || $terminart == 0) ){
|
||||
if($ZIbiontech){
|
||||
if($impfstoffstring == ""){
|
||||
$impfstoffstring = $impfstoffstring . "(impfstoff='3'";
|
||||
}else{
|
||||
$impfstoffstring = $impfstoffstring . " OR impfstoff='3'";
|
||||
}
|
||||
}
|
||||
if($ZIastra){
|
||||
if($impfstoffstring == ""){
|
||||
$impfstoffstring = $impfstoffstring . "(impfstoff='2'";
|
||||
}else{
|
||||
$impfstoffstring = $impfstoffstring . " OR impfstoff='2'";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if($ZImoderna){
|
||||
if($impfstoffstring == ""){
|
||||
$impfstoffstring = $impfstoffstring . "(impfstoff='5'";
|
||||
}else{
|
||||
$impfstoffstring = $impfstoffstring . " OR impfstoff='5'";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$impfstoffstring = $impfstoffstring . ")";
|
||||
$terminartstring = " AND (terminart='1' OR terminart='3' OR terminart='5')";
|
||||
|
||||
|
||||
|
||||
$statement = $pdo->prepare("SELECT date,start,ende,impfdosen,timeid,impfstoff FROM timeslots WHERE date>= '$minimaldate' AND date<='$maximaldate' AND $impfstoffstring $terminartstring AND impfdosen > 0");
|
||||
$statement->execute();
|
||||
$count = $statement->rowCount();
|
||||
|
||||
if($count == 0){
|
||||
echo"<h3>Zweitimpfung</h3><b>Aktuell stehen bei uns keine Termine für die Zweitimpfung zur Verfügung.</b><br>Bitte kümmern Sie sich selbstständig, um einen Termin für die Zweitimpfung.<br>Sobald wir Termine für die Zweitimpfung zur Verfügung haben, finden Sie diese auch auf dieser Webseite.<br><h4>Sehen Sie von weiteren telefonischen Anfragen ab!</h4><br>";
|
||||
}else{
|
||||
?>
|
||||
<div class="select-wrapper">
|
||||
<label for="Zweitimpfung">Die Zweitimpfung nehme ich am folgenden Termin wahr:</label>
|
||||
<select name="Zweitimpfung" id="Zweitimpfung" required onchange="checkTerminzeitraumZweit()">
|
||||
<?php
|
||||
|
||||
//echo '<form action="'. $_SERVER['PHP_SELF'] .'" method=POST>';
|
||||
echo '<option value="">- Terminzeitraum </option>';
|
||||
|
||||
foreach ($statement as $row) {
|
||||
$datum = date("d.m.Y", strtotime($row["date"]));
|
||||
$start = substr($row["start"],0, 5);
|
||||
$ende = substr($row["ende"],0, 5);
|
||||
$dosenanzahl = $row["impfdosen"];
|
||||
$timeid = $row["timeid"];
|
||||
$impfid = $row["impfstoff"];
|
||||
|
||||
$statementtermin = $pdo->prepare("SELECT impfname FROM impfstoff WHERE impfid =:impfid");
|
||||
$statementtermin->execute(array('impfid' => $impfid));
|
||||
$rowimpf = $statementtermin->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
|
||||
$impfstofftext = $rowimpf["impfname"];
|
||||
|
||||
$value = "$timeid";
|
||||
$anzeige = "$datum - $start-$ende - $dosenanzahl Plätze frei - $impfstofftext";
|
||||
echo '<option value="' . $value . '">' . $anzeige . '</option>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</select>
|
||||
<div id="TerminzeitrauminfoZweit"></div><br>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,178 +1,179 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Startseite</title>
|
||||
</head>
|
||||
<body class="landing">
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="alt">
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<!-- Banner -->
|
||||
<section id="banner">
|
||||
|
||||
|
||||
|
||||
<h2>Praxis Heiner Creutzburg</h2>
|
||||
<h3>Facharzt für Innere Medizin, hausärztliche Versorgung</h3>
|
||||
<?php
|
||||
$ausgabe = checkurlaub();
|
||||
echo $ausgabe;
|
||||
?>
|
||||
<div id=news class="container" style="background-color: rgba(85, 85, 85, 0.6);padding:5px;">
|
||||
|
||||
<?php
|
||||
#### Inhalt Änderung nicht mehr hier durchführen sondern auf der Adminseite: https://www.praxis-creutzburg.de/admin/webseitenadmin.php
|
||||
#### Punkt Infobox Startseite Praxis
|
||||
|
||||
|
||||
### Vordefinierte InhaltsID
|
||||
$inhaltid = "2";
|
||||
|
||||
$queryconfig = mysqli_query($con, "Select webseitentitel,inhalt FROM webseiteninhalt WHERE inhaltid='$inhaltid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$webseitentitel = $rowconfig["webseitentitel"];
|
||||
$inhalt = $rowconfig["inhalt"];
|
||||
|
||||
|
||||
echo $inhalt;
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
<ul class="actions">
|
||||
<li><a href="dienstleistung.php#notfall" class="button" style="background-color: rgba(85, 85, 85, 0.6);">Notfallsprechstunde</a></li>
|
||||
<li><a href="formulare.php" class="button" style="background-color: rgba(85, 85, 85, 0.6);">Anfragen</a></li>
|
||||
|
||||
<li><a href="termine.php" class="button" style="background-color: rgba(85, 85, 85, 0.6);">Termine</a></li>
|
||||
|
||||
<li><a href="rezepte.php" class="button" style="background-color: rgba(85, 85, 85, 0.6);">Rezepte</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
<ul class="actions">
|
||||
<br><br>
|
||||
<li><a href="stellenangebote.php" class="button alt" style="background-color: rgba(252, 94, 0, 0.6);">Wir suchen Unterstützung für unser Team!</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
|
||||
<section class="box special">
|
||||
<?php
|
||||
echo showHeaderpraxis();
|
||||
?>
|
||||
<br>
|
||||
<?php
|
||||
|
||||
echo geplantenUrlaubanzeigen();
|
||||
echo "<br>";
|
||||
?>
|
||||
|
||||
<h2> Aktuelle Informationen</h2>
|
||||
<?php
|
||||
#akutelle Informationen
|
||||
$inhaltid = "12";
|
||||
$queryconfig = mysqli_query($con, "Select webseitentitel,inhalt FROM webseiteninhalt WHERE inhaltid='$inhaltid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$webseitentitel = $rowconfig["webseitentitel"];
|
||||
$text = $rowconfig["inhalt"];
|
||||
|
||||
echo $text;
|
||||
|
||||
|
||||
?>
|
||||
<hr>
|
||||
<div id="marquee-cont">
|
||||
<marquee onmouseover="this.stop();" onmouseout="this.start();" id='scroll'>
|
||||
+++<? echo $Laufband1 ?>+++ +++<? echo $Laufband2 ?>+++ +++<? echo $Laufband3 ?>+++ +++<? echo $Laufband4 ?>+++ +++<? echo $Laufband5 ?>+++ +++<? echo $Laufband6 ?>+++
|
||||
</marquee>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<br>
|
||||
<h3>Wir impfen gegen Gürtelrose, Grippe, Corona und andere Erkrankungen! Anmeldung online! Derzeit Beratung auch in der normalen Sprechstunde.</h3>
|
||||
<a href="impfanmeldung.php" class="button alt" style="background-color: rgba(85, 85, 85, 0.6);color: white;" >Impftermin sichern</a>
|
||||
<br>
|
||||
<a href="grippeimpfwarteliste.php" class="button alt" style="background-color: rgba(85, 85, 85, 0.6);color: white;" >Warteliste Grippeschutzimpfung</a>
|
||||
<br><br>
|
||||
<hr>
|
||||
<h3>Haben Sie Fragen?</h3>
|
||||
Nutzen Sie unsere Formulare für eine Anfrage an unser Praxisteam.<br><br>
|
||||
<a href="formulare.php" class="button alt" style="background-color: rgba(85, 85, 85, 0.6);color: white;" >Frage stellen</a>
|
||||
<br><br>
|
||||
<hr>
|
||||
|
||||
|
||||
<!-- laufband -->
|
||||
<div id="marquee-cont">
|
||||
<marquee onmouseover="this.stop();" onmouseout="this.start();" id='scroll'>
|
||||
+++<? echo $Laufband1 ?>+++ +++<? echo $Laufband2 ?>+++ +++<? echo $Laufband3 ?>+++ +++<? echo $Laufband4 ?>+++ +++<? echo $Laufband5 ?>+++ +++<? echo $Laufband6 ?>+++
|
||||
</marquee>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="service.php" class="button alt">Termine/absagen</a>
|
||||
|
||||
<a href="rezepte.php"class="button alt">Rezepte</a>
|
||||
|
||||
<a href="formulare.php"class="button alt">Anfrage</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
</body>
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Startseite</title>
|
||||
</head>
|
||||
<body class="landing">
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="alt">
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<!-- Banner -->
|
||||
<section id="banner">
|
||||
|
||||
|
||||
|
||||
<h2>Praxis Heiner Creutzburg</h2>
|
||||
<h3>Facharzt für Innere Medizin, hausärztliche Versorgung</h3>
|
||||
<?php
|
||||
$ausgabe = checkurlaub();
|
||||
echo $ausgabe;
|
||||
?>
|
||||
<div id=news class="container" style="background-color: rgba(85, 85, 85, 0.6);padding:5px;">
|
||||
|
||||
<?php
|
||||
#### Inhalt Änderung nicht mehr hier durchführen sondern auf der Adminseite: https://www.praxis-creutzburg.de/admin/webseitenadmin.php
|
||||
#### Punkt Infobox Startseite Praxis
|
||||
|
||||
|
||||
### Vordefinierte InhaltsID
|
||||
$inhaltid = "2";
|
||||
|
||||
$queryconfig = mysqli_query($con, "Select webseitentitel,inhalt FROM webseiteninhalt WHERE inhaltid='$inhaltid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$webseitentitel = $rowconfig["webseitentitel"];
|
||||
$inhalt = $rowconfig["inhalt"];
|
||||
|
||||
|
||||
echo $inhalt;
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
<ul class="actions">
|
||||
<li><a href="dienstleistung.php#notfall" class="button" style="background-color: rgba(85, 85, 85, 0.6);">Notfallsprechstunde</a></li>
|
||||
<li><a href="formulare.php" class="button" style="background-color: rgba(85, 85, 85, 0.6);">Anfragen</a></li>
|
||||
|
||||
<li><a href="termine.php" class="button" style="background-color: rgba(85, 85, 85, 0.6);">Termine</a></li>
|
||||
|
||||
<li><a href="rezepte.php" class="button" style="background-color: rgba(85, 85, 85, 0.6);">Rezepte</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
<!--
|
||||
<ul class="actions">
|
||||
<br><br>
|
||||
<li><a href="stellenangebote.php" class="button alt" style="background-color: rgba(252, 94, 0, 0.6);">Wir suchen Unterstützung für unser Team!</a></li>
|
||||
|
||||
</ul>
|
||||
-->
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<!-- Main -->
|
||||
<section id="main" class="container">
|
||||
|
||||
<section class="box special">
|
||||
<?php
|
||||
echo showHeaderpraxis();
|
||||
?>
|
||||
<br>
|
||||
<?php
|
||||
|
||||
echo geplantenUrlaubanzeigen();
|
||||
echo "<br>";
|
||||
?>
|
||||
|
||||
<h2> Aktuelle Informationen</h2>
|
||||
<?php
|
||||
#akutelle Informationen
|
||||
$inhaltid = "12";
|
||||
$queryconfig = mysqli_query($con, "Select webseitentitel,inhalt FROM webseiteninhalt WHERE inhaltid='$inhaltid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$webseitentitel = $rowconfig["webseitentitel"];
|
||||
$text = $rowconfig["inhalt"];
|
||||
|
||||
echo $text;
|
||||
|
||||
|
||||
?>
|
||||
<hr>
|
||||
<div id="marquee-cont">
|
||||
<marquee onmouseover="this.stop();" onmouseout="this.start();" id='scroll'>
|
||||
+++<? echo $Laufband1 ?>+++ +++<? echo $Laufband2 ?>+++ +++<? echo $Laufband3 ?>+++ +++<? echo $Laufband4 ?>+++ +++<? echo $Laufband5 ?>+++ +++<? echo $Laufband6 ?>+++
|
||||
</marquee>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<br>
|
||||
<h3>Wir impfen gegen Gürtelrose, Grippe, Corona und andere Erkrankungen! Anmeldung online! Derzeit Beratung auch in der normalen Sprechstunde.</h3>
|
||||
<a href="impfanmeldung.php" class="button alt" style="background-color: rgba(85, 85, 85, 0.6);color: white;" >Impftermin sichern</a>
|
||||
<br>
|
||||
<a href="grippeimpfwarteliste.php" class="button alt" style="background-color: rgba(85, 85, 85, 0.6);color: white;" >Warteliste Grippeschutzimpfung</a>
|
||||
<br><br>
|
||||
<hr>
|
||||
<h3>Haben Sie Fragen?</h3>
|
||||
Nutzen Sie unsere Formulare für eine Anfrage an unser Praxisteam.<br><br>
|
||||
<a href="formulare.php" class="button alt" style="background-color: rgba(85, 85, 85, 0.6);color: white;" >Frage stellen</a>
|
||||
<br><br>
|
||||
<hr>
|
||||
|
||||
|
||||
<!-- laufband -->
|
||||
<div id="marquee-cont">
|
||||
<marquee onmouseover="this.stop();" onmouseout="this.start();" id='scroll'>
|
||||
+++<? echo $Laufband1 ?>+++ +++<? echo $Laufband2 ?>+++ +++<? echo $Laufband3 ?>+++ +++<? echo $Laufband4 ?>+++ +++<? echo $Laufband5 ?>+++ +++<? echo $Laufband6 ?>+++
|
||||
</marquee>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="service.php" class="button alt">Termine/absagen</a>
|
||||
|
||||
<a href="rezepte.php"class="button alt">Rezepte</a>
|
||||
|
||||
<a href="formulare.php"class="button alt">Anfrage</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+30
-30
@@ -1,30 +1,30 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once("inc/config.inc.php");
|
||||
require_once("inc/functions.inc.php");
|
||||
|
||||
//Überprüfe, dass der User eingeloggt ist
|
||||
//Der Aufruf von check_user() muss in alle internen Seiten eingebaut sein
|
||||
$user = check_user();
|
||||
|
||||
include("templates/header.inc.php");
|
||||
|
||||
|
||||
if(check_admin()){
|
||||
echo "Admin";
|
||||
}else{
|
||||
echo "nicht Admin";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
include("templates/footer.inc.php")
|
||||
?>
|
||||
<?php
|
||||
session_start();
|
||||
require_once("inc/config.inc.php");
|
||||
require_once("inc/functions.inc.php");
|
||||
|
||||
//Überprüfe, dass der User eingeloggt ist
|
||||
//Der Aufruf von check_user() muss in alle internen Seiten eingebaut sein
|
||||
$user = check_user();
|
||||
|
||||
include("templates/header.inc.php");
|
||||
|
||||
|
||||
if(check_admin()){
|
||||
echo "Admin";
|
||||
}else{
|
||||
echo "nicht Admin";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
include("templates/footer.inc.php")
|
||||
?>
|
||||
|
||||
+39
-10
@@ -3,6 +3,7 @@
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.impfen.inc.php");
|
||||
require_once(__DIR__ . "/../inc/impfworkflow_notifications.inc.php");
|
||||
|
||||
ini_set('display_errors', '1');
|
||||
error_reporting(E_ALL);
|
||||
@@ -66,7 +67,7 @@ $zeitOptionenJson = json_encode($zeitOptionenByImpfstoff, JSON_UNESCAPED_UNICODE
|
||||
|
||||
$form = [
|
||||
'impfstoff_id' => (int)($_POST['impfstoff_id'] ?? 0),
|
||||
'zeitraum_id' => (int)($_POST['zeitraum_id'] ?? 0),
|
||||
'zeitraum_ids' => impfNormalizeZeitraumIds($_POST['zeitraum_ids'] ?? ($_POST['zeitraum_id'] ?? [])),
|
||||
'impfart' => (int)($_POST['impfart'] ?? 0),
|
||||
'letzteimpfung' => trim((string)($_POST['letzteimpfung'] ?? '')),
|
||||
];
|
||||
@@ -82,6 +83,10 @@ $stActive = $pdo->prepare("SELECT w.warteid, w.checked, w.impfart, w.letzteimpfu
|
||||
ORDER BY w.date_created DESC, w.warteid DESC");
|
||||
$stActive->execute(['pid' => $personId]);
|
||||
$activeWaitRows = $stActive->fetchAll(PDO::FETCH_ASSOC);
|
||||
foreach ($activeWaitRows as &$activeWaitRow) {
|
||||
$activeWaitRow['zeitfenster_labels'] = impfGetWartelistenZeitraeumeLabels($pdo, (int)$activeWaitRow['warteid'], false);
|
||||
}
|
||||
unset($activeWaitRow);
|
||||
|
||||
if (($_SERVER['REQUEST_METHOD'] ?? 'GET') === 'POST' && (string)($_POST['aktion'] ?? '') === 'create_waitlist') {
|
||||
try {
|
||||
@@ -89,7 +94,7 @@ if (($_SERVER['REQUEST_METHOD'] ?? 'GET') === 'POST' && (string)($_POST['aktion'
|
||||
$pdo,
|
||||
$personId,
|
||||
(int)$form['impfstoff_id'],
|
||||
(int)$form['zeitraum_id'],
|
||||
$form['zeitraum_ids'],
|
||||
(int)$form['impfart'],
|
||||
$form['letzteimpfung'] !== '' ? $form['letzteimpfung'] : null,
|
||||
1
|
||||
@@ -106,6 +111,13 @@ if (($_SERVER['REQUEST_METHOD'] ?? 'GET') === 'POST' && (string)($_POST['aktion'
|
||||
|
||||
$stActive->execute(['pid' => $personId]);
|
||||
$activeWaitRows = $stActive->fetchAll(PDO::FETCH_ASSOC);
|
||||
foreach ($activeWaitRows as &$activeWaitRow) {
|
||||
$activeWaitRow['zeitfenster_labels'] = impfGetWartelistenZeitraeumeLabels($pdo, (int)$activeWaitRow['warteid'], false);
|
||||
}
|
||||
unset($activeWaitRow);
|
||||
if (isset($pdo) && $pdo instanceof PDO) {
|
||||
impfWorkflowNotificationProcess($pdo);
|
||||
}
|
||||
} else {
|
||||
$errorMessage = (string)$message;
|
||||
}
|
||||
@@ -141,12 +153,17 @@ if (!empty($activeWaitRows)) {
|
||||
echo "Sie koennen im internen Bereich mehrere verschiedene Wartelistenanfragen anlegen. Exakte Duplikate werden weiterhin geblockt.";
|
||||
echo "</div>";
|
||||
echo "<table class='table table-bordered table-striped'>";
|
||||
echo "<thead><tr><th>Impfstoff</th><th>Zeitraum</th><th>Impfungsart</th><th>Status</th><th>Letzte Impfung</th></tr></thead><tbody>";
|
||||
echo "<thead><tr><th>Impfstoff</th><th>Zeitraeume</th><th>Impfungsart</th><th>Status</th><th>Letzte Impfung</th></tr></thead><tbody>";
|
||||
foreach ($activeWaitRows as $activeWaitRow) {
|
||||
$statusText = ((int)$activeWaitRow['checked'] === 1) ? 'Bestaetigt' : 'Unbestaetigt';
|
||||
$zeitfensterText = !empty($activeWaitRow['zeitfenster_labels'])
|
||||
? implode('<br>', array_map(static function (string $label): string {
|
||||
return e($label);
|
||||
}, $activeWaitRow['zeitfenster_labels']))
|
||||
: e((string)($activeWaitRow['impfenzeitraum'] ?? ''));
|
||||
echo "<tr>";
|
||||
echo "<td>" . e((string)($activeWaitRow['impfname'] ?? 'Unbekannt')) . "</td>";
|
||||
echo "<td>" . e((string)($activeWaitRow['impfenzeitraum'] ?? '')) . "</td>";
|
||||
echo "<td>" . $zeitfensterText . "</td>";
|
||||
echo "<td>" . e((string)($impfartLabels[(int)$activeWaitRow['impfart']] ?? ('Status ' . (int)$activeWaitRow['impfart']))) . "</td>";
|
||||
echo "<td>" . e($statusText) . "</td>";
|
||||
echo "<td>" . e((string)($activeWaitRow['letzteimpfung'] ?? '')) . "</td>";
|
||||
@@ -178,8 +195,8 @@ if (empty($verfuegbareImpfstoffe)) {
|
||||
|
||||
<div class="row" style="margin-top:12px;">
|
||||
<div class="col-sm-10">
|
||||
<label for="zeitraum_id">Welcher Zeitbereich passt fuer Sie?</label>
|
||||
<select class="form-control" name="zeitraum_id" id="zeitraum_id" required disabled>
|
||||
<label for="zeitraum_ids">Welche Zeitbereiche passen fuer Sie?</label>
|
||||
<select class="form-control" name="zeitraum_ids[]" id="zeitraum_ids" required multiple size="6" disabled onchange="checkLetzteImpfung()">
|
||||
<option value="">- Bitte zuerst Impfstoff auswaehlen -</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -215,11 +232,11 @@ if (empty($verfuegbareImpfstoffe)) {
|
||||
|
||||
<script>
|
||||
const zeitfensterByImpfstoff = <?php echo $zeitOptionenJson ?: '{}'; ?>;
|
||||
const initialZeitraumId = <?php echo (int)$form['zeitraum_id']; ?>;
|
||||
const initialZeitraumIds = <?php echo json_encode($form['zeitraum_ids'], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?>;
|
||||
|
||||
function updateZeitfenster() {
|
||||
const impfstoff = document.getElementById('impfstoff_id');
|
||||
const zeitraum = document.getElementById('zeitraum_id');
|
||||
const zeitraum = document.getElementById('zeitraum_ids');
|
||||
const submit = document.getElementById('submit_waitlist');
|
||||
const impfstoffId = impfstoff.value;
|
||||
const optionen = zeitfensterByImpfstoff[impfstoffId] || [];
|
||||
@@ -228,7 +245,7 @@ if (empty($verfuegbareImpfstoffe)) {
|
||||
if (!impfstoffId || optionen.length === 0) {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = '';
|
||||
opt.textContent = '- Kein Zeitfenster verfuegbar -';
|
||||
opt.textContent = '- Keine Zeitfenster verfuegbar -';
|
||||
zeitraum.appendChild(opt);
|
||||
zeitraum.disabled = true;
|
||||
submit.disabled = true;
|
||||
@@ -244,7 +261,7 @@ if (empty($verfuegbareImpfstoffe)) {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = String(eintrag.id || '');
|
||||
opt.textContent = eintrag.label || '';
|
||||
if (initialZeitraumId > 0 && Number(eintrag.id) === initialZeitraumId) {
|
||||
if (initialZeitraumIds.includes(Number(eintrag.id))) {
|
||||
opt.selected = true;
|
||||
}
|
||||
zeitraum.appendChild(opt);
|
||||
@@ -252,12 +269,24 @@ if (empty($verfuegbareImpfstoffe)) {
|
||||
|
||||
zeitraum.disabled = false;
|
||||
submit.disabled = false;
|
||||
checkLetzteImpfung();
|
||||
}
|
||||
|
||||
function checkLetzteImpfung() {
|
||||
const impfart = document.getElementById('impfart');
|
||||
const box = document.getElementById('letzteimpfung_box');
|
||||
const input = document.getElementById('letzteimpfung');
|
||||
const zeitraum = document.getElementById('zeitraum_ids');
|
||||
const submit = document.getElementById('submit_waitlist');
|
||||
const selectedCount = zeitraum && zeitraum.selectedOptions
|
||||
? Array.from(zeitraum.selectedOptions).filter((opt) => opt.value !== '').length
|
||||
: 0;
|
||||
|
||||
if (selectedCount === 0) {
|
||||
submit.disabled = true;
|
||||
} else if (zeitraum && !zeitraum.disabled) {
|
||||
submit.disabled = false;
|
||||
}
|
||||
|
||||
if (impfart.value === '' || impfart.value === '1') {
|
||||
box.style.display = 'none';
|
||||
|
||||
+118
-118
@@ -1,56 +1,56 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
|
||||
include("templates/header.inc.php");
|
||||
?>
|
||||
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
<?php
|
||||
if( is_checked_in_index() ){
|
||||
$user = check_intern_user();
|
||||
?>
|
||||
<h1>Interner Bereich</h1>
|
||||
|
||||
<p>Hallo <?php echo htmlentities($user['vorname']); ?>,<br>
|
||||
Herzlich Willkommen im internen Bereich von <?php echo $organisationsname; ?>!<br><br></p>
|
||||
|
||||
|
||||
<?php
|
||||
if(!check_mailreg()){
|
||||
|
||||
echo "<br><br>";
|
||||
echo "Es fehlt die Authentifizierung Ihres Kontos per E-Mail! Bitte authentifizieren Sie Ihre E-Mail-Adresse.<br>";
|
||||
echo "<form action='authmeldung.php' method=POST>";
|
||||
echo "<input name=aktion type=hidden value=1>";
|
||||
echo "<input type=submit class='btn btn-primary' value='E-Mail Authentifizierung'><br>";
|
||||
echo '</form>';
|
||||
|
||||
|
||||
}
|
||||
if(!check_userdatenvorhanden()){
|
||||
|
||||
echo "<br><br>";
|
||||
echo "Es fehlen noch Informationen in Ihrem Stammdaten. Bitte pflegen Sie die Daten nach, damit <br>";
|
||||
echo "<form action='settings.php' method=POST>";
|
||||
echo "<input name=aktion type=hidden value=1>";
|
||||
echo "<input type=submit class='btn btn-primary' value='Stammdaten pflegen'><br>";
|
||||
echo '</form>';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(check_mailreg() && check_userdatenvorhanden() ){
|
||||
?>
|
||||
<?php
|
||||
session_start();
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
|
||||
include("templates/header.inc.php");
|
||||
?>
|
||||
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
<?php
|
||||
if( is_checked_in_index() ){
|
||||
$user = check_intern_user();
|
||||
?>
|
||||
<h1>Interner Bereich</h1>
|
||||
|
||||
<p>Hallo <?php echo htmlentities($user['vorname']); ?>,<br>
|
||||
Herzlich Willkommen im internen Bereich von <?php echo $organisationsname; ?>!<br><br></p>
|
||||
|
||||
|
||||
<?php
|
||||
if(!check_mailreg()){
|
||||
|
||||
echo "<br><br>";
|
||||
echo "Es fehlt die Authentifizierung Ihres Kontos per E-Mail! Bitte authentifizieren Sie Ihre E-Mail-Adresse.<br>";
|
||||
echo "<form action='authmeldung.php' method=POST>";
|
||||
echo "<input name=aktion type=hidden value=1>";
|
||||
echo "<input type=submit class='btn btn-primary' value='E-Mail Authentifizierung'><br>";
|
||||
echo '</form>';
|
||||
|
||||
|
||||
}
|
||||
if(!check_userdatenvorhanden()){
|
||||
|
||||
echo "<br><br>";
|
||||
echo "Es fehlen noch Informationen in Ihrem Stammdaten. Bitte pflegen Sie die Daten nach, damit <br>";
|
||||
echo "<form action='settings.php' method=POST>";
|
||||
echo "<input name=aktion type=hidden value=1>";
|
||||
echo "<input type=submit class='btn btn-primary' value='Stammdaten pflegen'><br>";
|
||||
echo '</form>';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(check_mailreg() && check_userdatenvorhanden() ){
|
||||
?>
|
||||
<p>Neue Anfragen können Sie über diesen Button einreichen:<br><br></p>
|
||||
<p><a class="btn btn-primary btn-lg" href="neueanfrage.php" role="button">Neue Anfragen erstellen</a></p><br><br>
|
||||
|
||||
@@ -58,69 +58,69 @@ if( is_checked_in_index() ){
|
||||
<p><a class="btn btn-primary btn-lg" href="impfwarteliste.php" role="button">Zur Impfwarteliste</a></p><br><br>
|
||||
|
||||
<p>Hier können Sie Ihre Anfragen einsehen. Die Antwort erhalten Sie per E-Mail.<br><br></p>
|
||||
<p><a class="btn btn-primary btn-lg" href="meineanfragen.php" role="button">Meine Anfragen einsehen</a></p><br><br>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
}else{
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
}else{
|
||||
|
||||
?>
|
||||
|
||||
<h1>Interner Bereich</h1>
|
||||
|
||||
<p>Nach der Anmeldung können Sie Ihre Anfragen an <?php echo $organisationsname; ?> einsehen oder neue Anfragen erstellen.<br>
|
||||
Bevor Sie sich anmelden können, müssen Sie sich registieren.<br><br></p>
|
||||
<form action="login.php" method="post">
|
||||
<h2 class="form-signin-heading">Login</h2>
|
||||
|
||||
<?php
|
||||
if(isset($error_msg) && !empty($error_msg)) {
|
||||
echo $error_msg;
|
||||
}
|
||||
?>
|
||||
<label for="inputEmail" class="sr-only">E-Mail</label>
|
||||
<input type="email" name="email" id="inputEmail" class="form-control" placeholder="E-Mail" value="<?php echo $email_value; ?>" required autofocus>
|
||||
<label for="inputPassword" class="sr-only">Passwort</label>
|
||||
<input type="password" name="passwort" id="inputPassword" class="form-control" placeholder="Passwort" required>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" value="remember-me" name="angemeldet_bleiben" value="1" checked> Angemeldet bleiben
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary " type="submit">Login</button>
|
||||
<br><br>
|
||||
<a href="passwortvergessen.php">Passwort vergessen</a>
|
||||
</form>
|
||||
|
||||
<br><br><br><br>
|
||||
|
||||
<p><a class="btn btn-primary " href="register.php" role="button">Jetzt registrieren</a></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
include("templates/footer.inc.php")
|
||||
<p><a class="btn btn-primary btn-lg" href="meineanfragen.php" role="button">Meine Anfragen einsehen</a></p><br><br>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
}else{
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
}else{
|
||||
|
||||
?>
|
||||
|
||||
<h1>Interner Bereich</h1>
|
||||
|
||||
<p>Nach der Anmeldung können Sie Ihre Anfragen an <?php echo $organisationsname; ?> einsehen oder neue Anfragen erstellen.<br>
|
||||
Bevor Sie sich anmelden können, müssen Sie sich registieren.<br><br></p>
|
||||
<form action="login.php" method="post">
|
||||
<h2 class="form-signin-heading">Login</h2>
|
||||
|
||||
<?php
|
||||
if(isset($error_msg) && !empty($error_msg)) {
|
||||
echo $error_msg;
|
||||
}
|
||||
?>
|
||||
<label for="inputEmail" class="sr-only">E-Mail</label>
|
||||
<input type="email" name="email" id="inputEmail" class="form-control" placeholder="E-Mail" value="<?php echo $email_value; ?>" required autofocus>
|
||||
<label for="inputPassword" class="sr-only">Passwort</label>
|
||||
<input type="password" name="passwort" id="inputPassword" class="form-control" placeholder="Passwort" required>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" value="remember-me" name="angemeldet_bleiben" value="1" checked> Angemeldet bleiben
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary " type="submit">Login</button>
|
||||
<br><br>
|
||||
<a href="passwortvergessen.php">Passwort vergessen</a>
|
||||
</form>
|
||||
|
||||
<br><br><br><br>
|
||||
|
||||
<p><a class="btn btn-primary " href="register.php" role="button">Jetzt registrieren</a></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
include("templates/footer.inc.php")
|
||||
?>
|
||||
|
||||
+46
-46
@@ -1,47 +1,47 @@
|
||||
var http = createRequestObject();
|
||||
var objectId = '';
|
||||
|
||||
|
||||
function createRequestObject(htmlObjectId){
|
||||
var obj;
|
||||
var browser = navigator.appName;
|
||||
|
||||
objectId = htmlObjectId;
|
||||
|
||||
if(browser == "Microsoft Internet Explorer"){
|
||||
obj = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
else{
|
||||
obj = new XMLHttpRequest();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function sendReq(serverFileName, variableNames, variableValues) {
|
||||
var paramString = '';
|
||||
|
||||
variableNames = variableNames.split(',');
|
||||
variableValues = variableValues.split(',');
|
||||
|
||||
for(i=0; i<variableNames.length; i++) {
|
||||
paramString += variableNames[i]+'='+variableValues[i]+'&';
|
||||
}
|
||||
paramString = paramString.substring(0, (paramString.length-1));
|
||||
|
||||
if (paramString.length == 0) {
|
||||
http.open('get', serverFileName);
|
||||
}
|
||||
else {
|
||||
http.open('get', serverFileName+'?'+paramString);
|
||||
}
|
||||
http.onreadystatechange = handleResponse;
|
||||
http.send(null);
|
||||
}
|
||||
|
||||
function handleResponse() {
|
||||
|
||||
if(http.readyState == 4){
|
||||
responseText = http.responseText;
|
||||
document.getElementById(objectId).innerHTML = responseText;
|
||||
}
|
||||
var http = createRequestObject();
|
||||
var objectId = '';
|
||||
|
||||
|
||||
function createRequestObject(htmlObjectId){
|
||||
var obj;
|
||||
var browser = navigator.appName;
|
||||
|
||||
objectId = htmlObjectId;
|
||||
|
||||
if(browser == "Microsoft Internet Explorer"){
|
||||
obj = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
else{
|
||||
obj = new XMLHttpRequest();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function sendReq(serverFileName, variableNames, variableValues) {
|
||||
var paramString = '';
|
||||
|
||||
variableNames = variableNames.split(',');
|
||||
variableValues = variableValues.split(',');
|
||||
|
||||
for(i=0; i<variableNames.length; i++) {
|
||||
paramString += variableNames[i]+'='+variableValues[i]+'&';
|
||||
}
|
||||
paramString = paramString.substring(0, (paramString.length-1));
|
||||
|
||||
if (paramString.length == 0) {
|
||||
http.open('get', serverFileName);
|
||||
}
|
||||
else {
|
||||
http.open('get', serverFileName+'?'+paramString);
|
||||
}
|
||||
http.onreadystatechange = handleResponse;
|
||||
http.send(null);
|
||||
}
|
||||
|
||||
function handleResponse() {
|
||||
|
||||
if(http.readyState == 4){
|
||||
responseText = http.responseText;
|
||||
document.getElementById(objectId).innerHTML = responseText;
|
||||
}
|
||||
}
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+38
-38
@@ -1,46 +1,46 @@
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#user_input").autocomplete({
|
||||
source: "inc/suchepatient.php",
|
||||
source: "../inc/suchepatient.php",
|
||||
minLength: 3,
|
||||
select: function( event, ui ) {
|
||||
event.preventDefault();
|
||||
$("#userid_input").val(ui.item.id);
|
||||
$("#user_input").val(ui.item.value);
|
||||
$("#formbenutzersuche").submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function behandelt(str) {
|
||||
|
||||
|
||||
result = $.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: 'inc/behandelt.php',
|
||||
data: ({
|
||||
terminid: str
|
||||
})
|
||||
}).responseText;
|
||||
document.getElementById(str).style.display = 'none';
|
||||
//window.location.reload(false);
|
||||
|
||||
$("#formbenutzersuche").submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function behandelt(str) {
|
||||
|
||||
|
||||
result = $.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: 'inc/behandelt.php',
|
||||
data: ({
|
||||
terminid: str
|
||||
})
|
||||
}).responseText;
|
||||
document.getElementById(str).style.display = 'none';
|
||||
//window.location.reload(false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function submitForm(sub) {
|
||||
e.preventDefault();
|
||||
result = $.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: 'impfadmin.php',
|
||||
data: ({
|
||||
aktion: 4,
|
||||
searchdate: sub
|
||||
})
|
||||
}).responseText;
|
||||
//window.location.reload(false);
|
||||
document.body.innerHTML = result;
|
||||
}
|
||||
|
||||
|
||||
function submitForm(sub) {
|
||||
e.preventDefault();
|
||||
result = $.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: 'impfadmin.php',
|
||||
data: ({
|
||||
aktion: 4,
|
||||
searchdate: sub
|
||||
})
|
||||
}).responseText;
|
||||
//window.location.reload(false);
|
||||
document.body.innerHTML = result;
|
||||
}
|
||||
+95
-95
@@ -1,96 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="shortcut icon" href="favicon.png">
|
||||
|
||||
<title>Sticky Footer Navbar Template for Bootstrap</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="http://getbootstrap.com/examples/sticky-footer-navbar/sticky-footer-navbar.css" rel="stylesheet">
|
||||
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Wrap all page content here -->
|
||||
<div id="wrap">
|
||||
|
||||
<!-- Fixed navbar -->
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="dropdown-header">Nav header</li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
<li><a href="#">One more separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<div class="container">
|
||||
|
||||
<div class="page-header">
|
||||
<h1>PHP Calendar</h1>
|
||||
</div>
|
||||
|
||||
<?php print $calendar; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<div class="container">
|
||||
<p class="text-muted">Place sticky footer content here.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.0/backbone-min.js"></script>
|
||||
<!--
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.syphon/0.4.1/backbone.syphon.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.modelbinder/1.0.4/Backbone.ModelBinder.min.js"></script>
|
||||
-->
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="shortcut icon" href="favicon.png">
|
||||
|
||||
<title>Sticky Footer Navbar Template for Bootstrap</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="http://getbootstrap.com/examples/sticky-footer-navbar/sticky-footer-navbar.css" rel="stylesheet">
|
||||
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Wrap all page content here -->
|
||||
<div id="wrap">
|
||||
|
||||
<!-- Fixed navbar -->
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="dropdown-header">Nav header</li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
<li><a href="#">One more separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Begin page content -->
|
||||
<div class="container">
|
||||
|
||||
<div class="page-header">
|
||||
<h1>PHP Calendar</h1>
|
||||
</div>
|
||||
|
||||
<?php print $calendar; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<div class="container">
|
||||
<p class="text-muted">Place sticky footer content here.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.0/backbone-min.js"></script>
|
||||
<!--
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.syphon/0.4.1/backbone.syphon.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.modelbinder/1.0.4/Backbone.ModelBinder.min.js"></script>
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
|
||||
include('../impfconfig.php');
|
||||
// E-Mail Vorlage laden
|
||||
|
||||
$templetid = $_POST["templetid"];
|
||||
$anfrageid = $_POST["anfrageid"];
|
||||
$queryconfig = mysqli_query($con, "Select betreff,body,name FROM mailtemplates WHERE templetid='$templetid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$body = $rowconfig["body"];
|
||||
$betreff = $rowconfig["betreff"];
|
||||
$name = $rowconfig["name"];
|
||||
|
||||
|
||||
$betreff = iconv('CP1252//IGNORE', 'UTF-8' , $betreff);
|
||||
$body = iconv('CP1252//IGNORE', 'UTF-8' , $body);
|
||||
echo $betreff;
|
||||
|
||||
<?php
|
||||
|
||||
include('../impfconfig.php');
|
||||
// E-Mail Vorlage laden
|
||||
|
||||
$templetid = $_POST["templetid"];
|
||||
$anfrageid = $_POST["anfrageid"];
|
||||
$queryconfig = mysqli_query($con, "Select betreff,body,name FROM mailtemplates WHERE templetid='$templetid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$body = $rowconfig["body"];
|
||||
$betreff = $rowconfig["betreff"];
|
||||
$name = $rowconfig["name"];
|
||||
|
||||
|
||||
$betreff = iconv('CP1252//IGNORE', 'UTF-8' , $betreff);
|
||||
$body = iconv('CP1252//IGNORE', 'UTF-8' , $body);
|
||||
echo $betreff;
|
||||
|
||||
?>
|
||||
+59
-59
@@ -1,60 +1,60 @@
|
||||
<?php
|
||||
|
||||
include('../impfconfig.php');
|
||||
// E-Mail Vorlage laden
|
||||
|
||||
$templetid = $_POST["templetid"];
|
||||
$anfrageid = $_POST["anfrageid"];
|
||||
$queryconfig = mysqli_query($con, "Select betreff,body,name FROM mailtemplates WHERE templetid='$templetid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$body = $rowconfig["body"];
|
||||
$betreff = $rowconfig["betreff"];
|
||||
$name = $rowconfig["name"];
|
||||
|
||||
$sqlstring = "SELECT * FROM anfragen INNER JOIN user ON anfragen.personid = user.userid WHERE anfrageid ='" . $anfrageid . "'";
|
||||
$query = mysqli_query($con,$sqlstring);
|
||||
$rowtime = mysqli_fetch_assoc($query);
|
||||
$vorname = $rowtime["vorname"];
|
||||
$nachname = $rowtime["nachname"];
|
||||
$geburtstag = $rowtime["geburtstag"];
|
||||
$tele = $rowtime["tele"];
|
||||
$plz = $rowtime["plz"];
|
||||
$ort = $rowtime["ort"];
|
||||
$strasse = $rowtime["strasse"];
|
||||
$adresse = "$ort $plz, $stasse";
|
||||
$empfaenger = $rowtime["mail"];
|
||||
$hash = $rowtime["hash"];
|
||||
$timeid = $rowtime["timeid"];
|
||||
$userausgabe = $vorname . " " . $nachname;
|
||||
$anfragenlogin = $anfragebestaetigung . "?id=" . $hash ;
|
||||
|
||||
$nachricht = $rowtime["nachricht"];
|
||||
$medikamenteins = $rowtime["medikament1"];
|
||||
$medikamentzwei = $rowtime["medikament2"];
|
||||
$anforderungart = $rowtime["anforderungart"];
|
||||
|
||||
$sqlimpfstoffstring = "SELECT artname FROM anfrageart WHERE artid ='" . $anforderungart . "'";
|
||||
$queryimpfstoff = mysqli_query($con,$sqlimpfstoffstring);
|
||||
$rowimpf = mysqli_fetch_assoc($queryimpfstoff);
|
||||
$rezeptart = $rowimpf["artname"];
|
||||
$body = str_replace("%BENUTZERVORNAME%", $vorname, $body);
|
||||
$body = str_replace("%BENUTZERNACHNAME%", $nachname, $body);
|
||||
$body = str_replace("%BENUTZERGEBURTSTAG%", $geburtstag, $body);
|
||||
$body = str_replace("%BENUTZERADRESSE%", $adresse, $body);
|
||||
$body = str_replace("%TERMINZEITVORGABE%", $Zeitanzeige, $body);
|
||||
$body = str_replace("%TERMINIMPFSTOFF%", $impfstofftext, $body);
|
||||
$body = str_replace("%TERMINLOGIN%", $terminlogin, $body);
|
||||
$body = str_replace("%WARTELISTELOGIN%", $wartelistelogin, $body);
|
||||
$body = str_replace("%WARTELISTEIMPFSTOFF%", $impfstofftextwarte, $body);
|
||||
$body = str_replace("%WARTELISTEIMPFANGEBOT%", $impfangebottext, $body);
|
||||
$body = str_replace("%REZEPTART%", $rezeptart, $body);
|
||||
$body = str_replace("%MEDIKAMENTNUMMEREINS%", $medikamenteins, $body);
|
||||
$body = str_replace("%MEDIKAMENTNUMMERZWEI%", $medikamentzwei, $body);
|
||||
$body = str_replace("%ANFRAGENACHRICHT%", $nachricht, $body);
|
||||
$body = str_replace("%ANFRAGENLOGIN%", $anfragenlogin, $body);
|
||||
|
||||
$betreff = iconv('CP1252//IGNORE', 'UTF-8' , $betreff);
|
||||
$body = iconv('CP1252//IGNORE', 'UTF-8' , $body);
|
||||
echo $body;
|
||||
|
||||
<?php
|
||||
|
||||
include('../impfconfig.php');
|
||||
// E-Mail Vorlage laden
|
||||
|
||||
$templetid = $_POST["templetid"];
|
||||
$anfrageid = $_POST["anfrageid"];
|
||||
$queryconfig = mysqli_query($con, "Select betreff,body,name FROM mailtemplates WHERE templetid='$templetid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$body = $rowconfig["body"];
|
||||
$betreff = $rowconfig["betreff"];
|
||||
$name = $rowconfig["name"];
|
||||
|
||||
$sqlstring = "SELECT * FROM anfragen INNER JOIN user ON anfragen.personid = user.userid WHERE anfrageid ='" . $anfrageid . "'";
|
||||
$query = mysqli_query($con,$sqlstring);
|
||||
$rowtime = mysqli_fetch_assoc($query);
|
||||
$vorname = $rowtime["vorname"];
|
||||
$nachname = $rowtime["nachname"];
|
||||
$geburtstag = $rowtime["geburtstag"];
|
||||
$tele = $rowtime["tele"];
|
||||
$plz = $rowtime["plz"];
|
||||
$ort = $rowtime["ort"];
|
||||
$strasse = $rowtime["strasse"];
|
||||
$adresse = "$ort $plz, $stasse";
|
||||
$empfaenger = $rowtime["mail"];
|
||||
$hash = $rowtime["hash"];
|
||||
$timeid = $rowtime["timeid"];
|
||||
$userausgabe = $vorname . " " . $nachname;
|
||||
$anfragenlogin = $anfragebestaetigung . "?id=" . $hash ;
|
||||
|
||||
$nachricht = $rowtime["nachricht"];
|
||||
$medikamenteins = $rowtime["medikament1"];
|
||||
$medikamentzwei = $rowtime["medikament2"];
|
||||
$anforderungart = $rowtime["anforderungart"];
|
||||
|
||||
$sqlimpfstoffstring = "SELECT artname FROM anfrageart WHERE artid ='" . $anforderungart . "'";
|
||||
$queryimpfstoff = mysqli_query($con,$sqlimpfstoffstring);
|
||||
$rowimpf = mysqli_fetch_assoc($queryimpfstoff);
|
||||
$rezeptart = $rowimpf["artname"];
|
||||
$body = str_replace("%BENUTZERVORNAME%", $vorname, $body);
|
||||
$body = str_replace("%BENUTZERNACHNAME%", $nachname, $body);
|
||||
$body = str_replace("%BENUTZERGEBURTSTAG%", $geburtstag, $body);
|
||||
$body = str_replace("%BENUTZERADRESSE%", $adresse, $body);
|
||||
$body = str_replace("%TERMINZEITVORGABE%", $Zeitanzeige, $body);
|
||||
$body = str_replace("%TERMINIMPFSTOFF%", $impfstofftext, $body);
|
||||
$body = str_replace("%TERMINLOGIN%", $terminlogin, $body);
|
||||
$body = str_replace("%WARTELISTELOGIN%", $wartelistelogin, $body);
|
||||
$body = str_replace("%WARTELISTEIMPFSTOFF%", $impfstofftextwarte, $body);
|
||||
$body = str_replace("%WARTELISTEIMPFANGEBOT%", $impfangebottext, $body);
|
||||
$body = str_replace("%REZEPTART%", $rezeptart, $body);
|
||||
$body = str_replace("%MEDIKAMENTNUMMEREINS%", $medikamenteins, $body);
|
||||
$body = str_replace("%MEDIKAMENTNUMMERZWEI%", $medikamentzwei, $body);
|
||||
$body = str_replace("%ANFRAGENACHRICHT%", $nachricht, $body);
|
||||
$body = str_replace("%ANFRAGENLOGIN%", $anfragenlogin, $body);
|
||||
|
||||
$betreff = iconv('CP1252//IGNORE', 'UTF-8' , $betreff);
|
||||
$body = iconv('CP1252//IGNORE', 'UTF-8' , $body);
|
||||
echo $body;
|
||||
|
||||
?>
|
||||
+264
-264
@@ -1,265 +1,265 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
$user = check_intern_user();
|
||||
if (!$user) {
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
}
|
||||
include("templates/header.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
|
||||
<h1>Interner Bereich</h1>
|
||||
|
||||
Hallo <?php echo htmlentities($user['vorname']); ?>,<br>
|
||||
Herzlich Willkommen im internen Bereich von <?php echo $organisationsname; ?>!<br><br>
|
||||
|
||||
|
||||
<?php
|
||||
if(!check_mailreg()){
|
||||
|
||||
echo "<br><br>";
|
||||
echo "Es fehlt die Authentifizierung Ihres Kontos per E-Mail! Bitte authentifizieren Sie Ihre E-Mail-Adresse.<br>";
|
||||
echo "<form action='authmeldung.php' method=POST>";
|
||||
echo "<input name=aktion type=hidden value=1>";
|
||||
echo "<input type=submit class='btn btn-primary' value='E-Mail Authentifizierung'><br>";
|
||||
echo '</form>';
|
||||
|
||||
|
||||
}
|
||||
if(!check_userdatenvorhanden()){
|
||||
|
||||
echo "<br><br>";
|
||||
echo "Es fehlen noch Informationen in Ihrem Stammdaten. Bitte pflegen Sie die Daten nach, damit <br>";
|
||||
echo "<form action='settings.php' method=POST>";
|
||||
echo "<input name=aktion type=hidden value=1>";
|
||||
echo "<input type=submit class='btn btn-primary' value='Stammdaten pflegen'><br>";
|
||||
echo '</form>';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(check_mailreg() && check_userdatenvorhanden() ){
|
||||
if($_POST["aktion"] == "11"){
|
||||
|
||||
$sqlstring = "SELECT * FROM anfragen INNER JOIN persons ON anfragen.requester_person_id = persons.person_id INNER JOIN anfrageart ON anfragen.anforderungart = anfrageart.artid WHERE anfrageid='" . $_POST["anfrageid"] . "'";
|
||||
$query = mysqli_query($con,$sqlstring);
|
||||
// Ticket und Antwort ansehen.
|
||||
while ($row = $query->fetch_assoc()) {
|
||||
|
||||
|
||||
$anfrageid = $row["anfrageid"];
|
||||
$Zeitanzeige = $datum . " " . $start . "-" . $ende ;
|
||||
$userid = $row["userid"];
|
||||
$checked = $row["checked"];
|
||||
$workerid = $row["workerid"];
|
||||
$antwortid = $row["antwortid"];
|
||||
$date_created = $row["create_time"];
|
||||
|
||||
$vorname = $row["vorname"];
|
||||
$nachname = $row["nachname"];
|
||||
$mail = $row["mail"];
|
||||
$tel = $row["tele"];
|
||||
|
||||
$geburtstag = $row["geburtstag"];
|
||||
$ausgabegeburstag = $geburtstag;
|
||||
|
||||
$ort = $row["ort"];
|
||||
$plz = $row["plz"];
|
||||
$strasse = $row["strasse"];
|
||||
$ordnungsid = $row["ordnungsid"];
|
||||
$ordnungsstring = GetOrdnungsid($ordnungsid);
|
||||
$nachricht = $row["nachricht"];
|
||||
$medikamenteins = $row["medikament1"];
|
||||
$medikamentzwei = $row["medikament2"];
|
||||
$medikamentdrei = $row["medikament3"];
|
||||
$medikamentvier = $row["medikament4"];
|
||||
$medikamentfuenf = $row["medikament5"];
|
||||
$medikamentsechs = $row["medikament6"];
|
||||
$anfrageart = $row["artname"];
|
||||
#$anfrageart = iconv('UTF-8' ,'CP1252//IGNORE', $anfrageart);
|
||||
$antworttext = $row["antworttext"];
|
||||
$WeitereInfos= "";
|
||||
if($medikamenteins){
|
||||
$WeitereInfos .= "Medikament1: $medikamenteins<br>";
|
||||
}
|
||||
if($medikamentzwei){
|
||||
$WeitereInfos .= "Medikament2: $medikamentzwei<br>";
|
||||
}
|
||||
if($medikamentdrei){
|
||||
$WeitereInfos .= "Medikament3: $medikamentdrei<br>";
|
||||
}
|
||||
if($medikamentvier){
|
||||
$WeitereInfos .= "Medikament4: $medikamentvier<br>";
|
||||
}
|
||||
if($medikamentfuenf){
|
||||
$WeitereInfos .= "Medikament5: $medikamentfuenf<br>";
|
||||
}
|
||||
if($medikamentsechs){
|
||||
$WeitereInfos .= "Medikament6: $medikamentsechs<br>";
|
||||
}
|
||||
if($nachricht){
|
||||
$WeitereInfos .= "Nachricht: $nachricht";
|
||||
}
|
||||
|
||||
$datumausgabe= date("d.m.Y H:i", strtotime($date_created ));
|
||||
|
||||
$ausgabeworker = GetWorkerName($workerid);
|
||||
$farbe = GetStatusFarbe($checked);
|
||||
$checkausgabe = GetStatus($checked);
|
||||
|
||||
$userausgabe = $vorname . " " . $nachname;
|
||||
$adresse = $plz . " " . $ort . ", " . $strasse ;
|
||||
/*
|
||||
$queryconfig = mysqli_query($con, "Select betreff,body,name FROM mailtemplates WHERE templetid='$antwortid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$body = $rowconfig["body"];
|
||||
$betreff = $rowconfig["betreff"];
|
||||
*/
|
||||
//$name = $rowconfig["name"];
|
||||
//$betreff = iconv('CP1252//IGNORE', 'UTF-8' , $betreff);
|
||||
$body = iconv('CP1252//IGNORE', 'UTF-8' , $antworttext);
|
||||
|
||||
|
||||
echo "<b>Person:</b><br>$userausgabe <br> $mail <br><br><b>Anfrageinformationen:</b><br>$ordnungsstring - $anfrageart <br>$WeitereInfos<br><br><b>Status der Anfrage:</b><br>$checkausgabe - $datumausgabe<br><br>";
|
||||
|
||||
echo "<b>Antwortnachricht:<b><br><br>";
|
||||
echo "$body <br>";
|
||||
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo "<input name=aktion type=hidden value=1>";
|
||||
echo "<input type=submit class='btn btn-primary' value='Zurück'><br>";
|
||||
echo '</form>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
?>
|
||||
<p>Hier finden Sie die letzten 100 Anfragen für die E-Mail-Adresse '<?php echo $user["email"];?>'.<br>Die Antworten können Sie auf dieser Webseite datenschutzkonform einsehen.<br><br></p>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
//global $pdo;
|
||||
$statement = $pdo->prepare("SELECT * FROM anfragen INNER JOIN persons ON anfragen.requester_person_id = persons.person_id INNER JOIN anfrageart ON anfragen.anforderungart = anfrageart.artid WHERE persons.email = :email ORDER by create_time DESC LIMIT 100 ");
|
||||
$statement->execute(array('email' => $user["email"]));
|
||||
|
||||
|
||||
echo '<table class="table display" id="table_id" > ';
|
||||
echo '<thead><tr><th >Person/Adresse</th><th >createdate</th><th >Anfragedatum</th><th >Anfrage/Status</th><th>Aktion</th></tr> </thead>';
|
||||
echo "<tbody>";
|
||||
while($row = $statement->fetch(PDO::FETCH_ASSOC)){
|
||||
#echo $row["anfrageid"];
|
||||
#echo "<br>";
|
||||
$anfrageid = $row["anfrageid"];
|
||||
$Zeitanzeige = $datum . " " . $start . "-" . $ende ;
|
||||
$userid = $row["userid"];
|
||||
$checked = $row["checked"];
|
||||
$workerid = $row["workerid"];
|
||||
$date_created = $row["create_time"];
|
||||
$mailtime = $row["update_time"];
|
||||
|
||||
$vorname = $row["vorname"];
|
||||
$nachname = $row["nachname"];
|
||||
$mail = $row["mail"];
|
||||
$tel = $row["tele"];
|
||||
|
||||
$geburtstag = $row["geburtstag"];
|
||||
$ausgabegeburstag = $geburtstag;
|
||||
|
||||
$ort = $row["ort"];
|
||||
$plz = $row["plz"];
|
||||
$strasse = $row["strasse"];
|
||||
|
||||
$nachricht = $row["nachricht"];
|
||||
$medikamenteins = $row["medikament1"];
|
||||
$medikamentzwei = $row["medikament2"];
|
||||
$medikamentdrei = $row["medikament3"];
|
||||
$medikamentvier = $row["medikament4"];
|
||||
$medikamentfuenf = $row["medikament5"];
|
||||
$medikamentsechs = $row["medikament6"];
|
||||
$anfrageart = $row["artname"];
|
||||
$ordnungsid = $row["ordnungsid"];
|
||||
$ordnungsstring = GetOrdnungsid($ordnungsid);
|
||||
$WeitereInfos= "";
|
||||
if($medikamenteins){
|
||||
$WeitereInfos .= "Medikament1: $medikamenteins<br>";
|
||||
}
|
||||
if($medikamentzwei){
|
||||
$WeitereInfos .= "Medikament2: $medikamentzwei<br>";
|
||||
}
|
||||
if($medikamentdrei){
|
||||
$WeitereInfos .= "Medikament3: $medikamentdrei<br>";
|
||||
}
|
||||
if($medikamentvier){
|
||||
$WeitereInfos .= "Medikament4: $medikamentvier<br>";
|
||||
}
|
||||
if($medikamentfuenf){
|
||||
$WeitereInfos .= "Medikament5: $medikamentfuenf<br>";
|
||||
}
|
||||
if($nachricht){
|
||||
$WeitereInfos .= "Nachricht: $nachricht";
|
||||
}
|
||||
|
||||
$datumausgabe= date("d.m.Y H:i", strtotime($date_created ));
|
||||
$antwortzeit = date("d.m.Y H:i", strtotime($mailtime ));
|
||||
|
||||
$farbe = GetStatusFarbe($checked);
|
||||
$checkausgabe = GetStatus($checked);
|
||||
|
||||
$userausgabe = $vorname . " " . $nachname . "<br>" . $ausgabegeburstag;
|
||||
$adresse = $plz . " " . $ort . "<br>" . $strasse ;
|
||||
|
||||
echo "<tr style='background-color:". $farbe. ";' ><th scope='row' >$userausgabe <br> $adresse</th><td>$date_created</td><td>$datumausgabe</td><td >$ordnungsstring - $anfrageart <br>$WeitereInfos<br><br>Status:<br>$checkausgabe<br>$antwortzeit</td>";
|
||||
echo "<td >";
|
||||
if($checked == "10"){
|
||||
echo "
|
||||
<div style='float: left;margin:15px; height: 20px;'>
|
||||
<form action='". $_SERVER["PHP_SELF"] ."' 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'>
|
||||
</form>
|
||||
</div>
|
||||
";
|
||||
}else{
|
||||
|
||||
echo "Keine Antwort einsehbar.";
|
||||
|
||||
}
|
||||
echo "</td ></tr>";
|
||||
}
|
||||
|
||||
echo "</tbody></table>";
|
||||
//echo "</div>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
include("templates/footer.inc.php")
|
||||
<?php
|
||||
session_start();
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
$user = check_intern_user();
|
||||
if (!$user) {
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
}
|
||||
include("templates/header.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
|
||||
<h1>Interner Bereich</h1>
|
||||
|
||||
Hallo <?php echo htmlentities($user['vorname']); ?>,<br>
|
||||
Herzlich Willkommen im internen Bereich von <?php echo $organisationsname; ?>!<br><br>
|
||||
|
||||
|
||||
<?php
|
||||
if(!check_mailreg()){
|
||||
|
||||
echo "<br><br>";
|
||||
echo "Es fehlt die Authentifizierung Ihres Kontos per E-Mail! Bitte authentifizieren Sie Ihre E-Mail-Adresse.<br>";
|
||||
echo "<form action='authmeldung.php' method=POST>";
|
||||
echo "<input name=aktion type=hidden value=1>";
|
||||
echo "<input type=submit class='btn btn-primary' value='E-Mail Authentifizierung'><br>";
|
||||
echo '</form>';
|
||||
|
||||
|
||||
}
|
||||
if(!check_userdatenvorhanden()){
|
||||
|
||||
echo "<br><br>";
|
||||
echo "Es fehlen noch Informationen in Ihrem Stammdaten. Bitte pflegen Sie die Daten nach, damit <br>";
|
||||
echo "<form action='settings.php' method=POST>";
|
||||
echo "<input name=aktion type=hidden value=1>";
|
||||
echo "<input type=submit class='btn btn-primary' value='Stammdaten pflegen'><br>";
|
||||
echo '</form>';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(check_mailreg() && check_userdatenvorhanden() ){
|
||||
if($_POST["aktion"] == "11"){
|
||||
|
||||
$sqlstring = "SELECT * FROM anfragen INNER JOIN persons ON anfragen.requester_person_id = persons.person_id INNER JOIN anfrageart ON anfragen.anforderungart = anfrageart.artid WHERE anfrageid='" . $_POST["anfrageid"] . "'";
|
||||
$query = mysqli_query($con,$sqlstring);
|
||||
// Ticket und Antwort ansehen.
|
||||
while ($row = $query->fetch_assoc()) {
|
||||
|
||||
|
||||
$anfrageid = $row["anfrageid"];
|
||||
$Zeitanzeige = $datum . " " . $start . "-" . $ende ;
|
||||
$userid = $row["userid"];
|
||||
$checked = $row["checked"];
|
||||
$workerid = $row["workerid"];
|
||||
$antwortid = $row["antwortid"];
|
||||
$date_created = $row["create_time"];
|
||||
|
||||
$vorname = $row["vorname"];
|
||||
$nachname = $row["nachname"];
|
||||
$mail = $row["mail"];
|
||||
$tel = $row["tele"];
|
||||
|
||||
$geburtstag = $row["geburtstag"];
|
||||
$ausgabegeburstag = $geburtstag;
|
||||
|
||||
$ort = $row["ort"];
|
||||
$plz = $row["plz"];
|
||||
$strasse = $row["strasse"];
|
||||
$ordnungsid = $row["ordnungsid"];
|
||||
$ordnungsstring = GetOrdnungsid($ordnungsid);
|
||||
$nachricht = $row["nachricht"];
|
||||
$medikamenteins = $row["medikament1"];
|
||||
$medikamentzwei = $row["medikament2"];
|
||||
$medikamentdrei = $row["medikament3"];
|
||||
$medikamentvier = $row["medikament4"];
|
||||
$medikamentfuenf = $row["medikament5"];
|
||||
$medikamentsechs = $row["medikament6"];
|
||||
$anfrageart = $row["artname"];
|
||||
#$anfrageart = iconv('UTF-8' ,'CP1252//IGNORE', $anfrageart);
|
||||
$antworttext = $row["antworttext"];
|
||||
$WeitereInfos= "";
|
||||
if($medikamenteins){
|
||||
$WeitereInfos .= "Medikament1: $medikamenteins<br>";
|
||||
}
|
||||
if($medikamentzwei){
|
||||
$WeitereInfos .= "Medikament2: $medikamentzwei<br>";
|
||||
}
|
||||
if($medikamentdrei){
|
||||
$WeitereInfos .= "Medikament3: $medikamentdrei<br>";
|
||||
}
|
||||
if($medikamentvier){
|
||||
$WeitereInfos .= "Medikament4: $medikamentvier<br>";
|
||||
}
|
||||
if($medikamentfuenf){
|
||||
$WeitereInfos .= "Medikament5: $medikamentfuenf<br>";
|
||||
}
|
||||
if($medikamentsechs){
|
||||
$WeitereInfos .= "Medikament6: $medikamentsechs<br>";
|
||||
}
|
||||
if($nachricht){
|
||||
$WeitereInfos .= "Nachricht: $nachricht";
|
||||
}
|
||||
|
||||
$datumausgabe= date("d.m.Y H:i", strtotime($date_created ));
|
||||
|
||||
$ausgabeworker = GetWorkerName($workerid);
|
||||
$farbe = GetStatusFarbe($checked);
|
||||
$checkausgabe = GetStatus($checked);
|
||||
|
||||
$userausgabe = $vorname . " " . $nachname;
|
||||
$adresse = $plz . " " . $ort . ", " . $strasse ;
|
||||
/*
|
||||
$queryconfig = mysqli_query($con, "Select betreff,body,name FROM mailtemplates WHERE templetid='$antwortid' ");
|
||||
$rowconfig = mysqli_fetch_assoc($queryconfig);
|
||||
$body = $rowconfig["body"];
|
||||
$betreff = $rowconfig["betreff"];
|
||||
*/
|
||||
//$name = $rowconfig["name"];
|
||||
//$betreff = iconv('CP1252//IGNORE', 'UTF-8' , $betreff);
|
||||
$body = iconv('CP1252//IGNORE', 'UTF-8' , $antworttext);
|
||||
|
||||
|
||||
echo "<b>Person:</b><br>$userausgabe <br> $mail <br><br><b>Anfrageinformationen:</b><br>$ordnungsstring - $anfrageart <br>$WeitereInfos<br><br><b>Status der Anfrage:</b><br>$checkausgabe - $datumausgabe<br><br>";
|
||||
|
||||
echo "<b>Antwortnachricht:<b><br><br>";
|
||||
echo "$body <br>";
|
||||
|
||||
echo "<form action='". $_SERVER['PHP_SELF'] . "' method=POST>";
|
||||
echo "<input name=aktion type=hidden value=1>";
|
||||
echo "<input type=submit class='btn btn-primary' value='Zurück'><br>";
|
||||
echo '</form>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
?>
|
||||
<p>Hier finden Sie die letzten 100 Anfragen für die E-Mail-Adresse '<?php echo $user["email"];?>'.<br>Die Antworten können Sie auf dieser Webseite datenschutzkonform einsehen.<br><br></p>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
//global $pdo;
|
||||
$statement = $pdo->prepare("SELECT * FROM anfragen INNER JOIN persons ON anfragen.requester_person_id = persons.person_id INNER JOIN anfrageart ON anfragen.anforderungart = anfrageart.artid WHERE persons.email = :email ORDER by create_time DESC LIMIT 100 ");
|
||||
$statement->execute(array('email' => $user["email"]));
|
||||
|
||||
|
||||
echo '<table class="table display" id="table_id" > ';
|
||||
echo '<thead><tr><th >Person/Adresse</th><th >createdate</th><th >Anfragedatum</th><th >Anfrage/Status</th><th>Aktion</th></tr> </thead>';
|
||||
echo "<tbody>";
|
||||
while($row = $statement->fetch(PDO::FETCH_ASSOC)){
|
||||
#echo $row["anfrageid"];
|
||||
#echo "<br>";
|
||||
$anfrageid = $row["anfrageid"];
|
||||
$Zeitanzeige = $datum . " " . $start . "-" . $ende ;
|
||||
$userid = $row["userid"];
|
||||
$checked = $row["checked"];
|
||||
$workerid = $row["workerid"];
|
||||
$date_created = $row["create_time"];
|
||||
$mailtime = $row["update_time"];
|
||||
|
||||
$vorname = $row["vorname"];
|
||||
$nachname = $row["nachname"];
|
||||
$mail = $row["mail"];
|
||||
$tel = $row["tele"];
|
||||
|
||||
$geburtstag = $row["geburtstag"];
|
||||
$ausgabegeburstag = $geburtstag;
|
||||
|
||||
$ort = $row["ort"];
|
||||
$plz = $row["plz"];
|
||||
$strasse = $row["strasse"];
|
||||
|
||||
$nachricht = $row["nachricht"];
|
||||
$medikamenteins = $row["medikament1"];
|
||||
$medikamentzwei = $row["medikament2"];
|
||||
$medikamentdrei = $row["medikament3"];
|
||||
$medikamentvier = $row["medikament4"];
|
||||
$medikamentfuenf = $row["medikament5"];
|
||||
$medikamentsechs = $row["medikament6"];
|
||||
$anfrageart = $row["artname"];
|
||||
$ordnungsid = $row["ordnungsid"];
|
||||
$ordnungsstring = GetOrdnungsid($ordnungsid);
|
||||
$WeitereInfos= "";
|
||||
if($medikamenteins){
|
||||
$WeitereInfos .= "Medikament1: $medikamenteins<br>";
|
||||
}
|
||||
if($medikamentzwei){
|
||||
$WeitereInfos .= "Medikament2: $medikamentzwei<br>";
|
||||
}
|
||||
if($medikamentdrei){
|
||||
$WeitereInfos .= "Medikament3: $medikamentdrei<br>";
|
||||
}
|
||||
if($medikamentvier){
|
||||
$WeitereInfos .= "Medikament4: $medikamentvier<br>";
|
||||
}
|
||||
if($medikamentfuenf){
|
||||
$WeitereInfos .= "Medikament5: $medikamentfuenf<br>";
|
||||
}
|
||||
if($nachricht){
|
||||
$WeitereInfos .= "Nachricht: $nachricht";
|
||||
}
|
||||
|
||||
$datumausgabe= date("d.m.Y H:i", strtotime($date_created ));
|
||||
$antwortzeit = date("d.m.Y H:i", strtotime($mailtime ));
|
||||
|
||||
$farbe = GetStatusFarbe($checked);
|
||||
$checkausgabe = GetStatus($checked);
|
||||
|
||||
$userausgabe = $vorname . " " . $nachname . "<br>" . $ausgabegeburstag;
|
||||
$adresse = $plz . " " . $ort . "<br>" . $strasse ;
|
||||
|
||||
echo "<tr style='background-color:". $farbe. ";' ><th scope='row' >$userausgabe <br> $adresse</th><td>$date_created</td><td>$datumausgabe</td><td >$ordnungsstring - $anfrageart <br>$WeitereInfos<br><br>Status:<br>$checkausgabe<br>$antwortzeit</td>";
|
||||
echo "<td >";
|
||||
if($checked == "10"){
|
||||
echo "
|
||||
<div style='float: left;margin:15px; height: 20px;'>
|
||||
<form action='". $_SERVER["PHP_SELF"] ."' 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'>
|
||||
</form>
|
||||
</div>
|
||||
";
|
||||
}else{
|
||||
|
||||
echo "Keine Antwort einsehbar.";
|
||||
|
||||
}
|
||||
echo "</td ></tr>";
|
||||
}
|
||||
|
||||
echo "</tbody></table>";
|
||||
//echo "</div>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
include("templates/footer.inc.php")
|
||||
?>
|
||||
+810
-810
File diff suppressed because it is too large
Load Diff
+810
-810
File diff suppressed because it is too large
Load Diff
+443
-443
@@ -1,443 +1,443 @@
|
||||
<?php
|
||||
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
ini_set('display_errors', '1');
|
||||
error_reporting(E_ALL);
|
||||
|
||||
|
||||
/* ---------------------------
|
||||
Page start
|
||||
----------------------------*/
|
||||
|
||||
include(__DIR__ . "/templates/header.inc.php");
|
||||
|
||||
echo "</header>";
|
||||
echo "<div class='jumbotron'><div class='container'>";
|
||||
|
||||
$user = check_intern_user(); // intern session user
|
||||
|
||||
if (!$user) {
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo "<h1>Neue Anfrage</h1>";
|
||||
echo "<p>Hallo " . e((string)($user['vorname'] ?? '')) . ",<br></p>";
|
||||
|
||||
// Preconditions
|
||||
if (!check_mailreg()) {
|
||||
echo "<br><br>";
|
||||
echo "Es fehlt die Authentifizierung Ihres Kontos per E-Mail! Bitte authentifizieren Sie Ihre E-Mail-Adresse.<br>";
|
||||
echo "<form action='authmeldung.php' method='POST'>";
|
||||
echo "<input name='aktion' type='hidden' value='1'>";
|
||||
echo "<input type='submit' class='btn btn-primary' value='E-Mail Authentifizierung'><br>";
|
||||
echo "</form>";
|
||||
}
|
||||
|
||||
if (!check_userdatenvorhanden()) {
|
||||
echo "<br><br>";
|
||||
echo "Es fehlen noch Informationen in Ihren Stammdaten. Bitte pflegen Sie die Daten nach.<br>";
|
||||
echo "<form action='settings.php' method='POST'>";
|
||||
echo "<input name='aktion' type='hidden' value='1'>";
|
||||
echo "<input type='submit' class='btn btn-primary' value='Stammdaten pflegen'><br>";
|
||||
echo "</form>";
|
||||
}
|
||||
|
||||
if (!(check_mailreg() && check_userdatenvorhanden())) {
|
||||
echo "<br><br><br><form action='index.php' method='POST'>
|
||||
<input type='submit' class='btn btn-primary' value='Zum Hauptmenü'>
|
||||
</form>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// action routing
|
||||
$aktion = $_POST['aktion'] ?? ''; // '', choose, confirm, submit
|
||||
|
||||
// Ensure persons id early
|
||||
try {
|
||||
$internUserId = isset($_SESSION['userid']) ? (int)$_SESSION['userid'] : null;
|
||||
$personId = ensurePersonFromInternUsersByEmail($pdo, (string)($user['email'] ?? ''), $internUserId);
|
||||
} catch (Throwable $t) {
|
||||
echo "<div class='alert alert-danger'>Fehler: " . e($t->getMessage()) . "</div>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// Vacation check
|
||||
if ($aktion === 'choose' || $aktion === 'confirm' || $aktion === 'submit' || $aktion === '') {
|
||||
if (isPraxisImUrlaub($pdo)) {
|
||||
$info = loadAktuelleUrlaubsInfo($pdo);
|
||||
echo "<h2>Praxis im Urlaub</h2>";
|
||||
echo "Wir befinden uns aktuell im Urlaub.<br>Wenden Sie sich an unsere Vertretung oder warten Sie bis nach unserem Urlaub mit Ihrer Anfrage.<br><br>";
|
||||
|
||||
if ($info) {
|
||||
$ende = (string)$info['ende'];
|
||||
$endeausgabe = date("d.m.Y", strtotime("+1 day", strtotime($ende)));
|
||||
|
||||
if (!empty($info['vertretung'])) echo "Unsere Vertretung: " . e($info['vertretung']) . "<br>";
|
||||
if (!empty($info['vertreterurl'])) echo "Webseite Vertretung: " . e($info['vertreterurl']) . "<br>";
|
||||
if (!empty($info['vertretertelefon'])) echo "Telefonischer Kontakt Vertretung: " . e($info['vertretertelefon']) . "<br>";
|
||||
if (!empty($info['vertreteradresse'])) echo "Adresse Vertretung: " . e($info['vertreteradresse']) . "<br>";
|
||||
|
||||
echo "<br>Wir stehen Ihnen ab dem " . e($endeausgabe) . " wieder zur Verfügung.<br><br><br>";
|
||||
}
|
||||
|
||||
echo "<form action='index.php' method='POST'><input type='submit' class='btn btn-primary' value='Zurück'></form>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// default: show selection
|
||||
if ($aktion === '') {
|
||||
echo "<p>Wählen Sie die Anfragenart aus:<br><br></p>";
|
||||
echo "<form action='" . e($_SERVER['PHP_SELF']) . "' method='POST'>";
|
||||
echo "<input type='hidden' name='aktion' value='choose'>";
|
||||
|
||||
echo "<h4>Benutzer</h4>";
|
||||
echo "Name: " . e((string)$user["vorname"]) . " " . e((string)$user["nachname"]) . "<br>";
|
||||
echo "Geburtstag: " . e((string)$user["geburtstag"]) . "<br>";
|
||||
echo "Adresse: " . e((string)$user["strasse"]) . ", " . e((string)$user["plz"]) . ", " . e((string)$user["ort"]) . "<br>";
|
||||
|
||||
echo "<input type='hidden' name='requester_person_id' value='" . (int)$personId . "'>";
|
||||
|
||||
echo "<br><br>";
|
||||
echo "<label for='anfrageart'>Art der Anfrage:</label>";
|
||||
echo "<select class='form-control' name='anfrageart' id='anfrageart' required>
|
||||
<option value='1'>Rezeptanfrage</option>
|
||||
<option value='2'>Allgemeine Anfrage</option>
|
||||
<option value='3'>Terminabsage</option>
|
||||
</select>";
|
||||
echo "<br><br>";
|
||||
echo "<input type='submit' class='btn btn-primary' value='Anfrage stellen'><br>";
|
||||
echo "</form>";
|
||||
|
||||
echo "<br><br><br><form action='index.php' method='POST'>
|
||||
<input type='submit' class='btn btn-primary' value='Zum Hauptmenü'>
|
||||
</form>";
|
||||
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// choose -> show form
|
||||
if ($aktion === 'choose') {
|
||||
$anfrageart = (int)($_POST['anfrageart'] ?? 0);
|
||||
$requester_person_id = (int)($_POST['requester_person_id'] ?? $personId);
|
||||
|
||||
$mode = match ($anfrageart) {
|
||||
1 => 'rezept',
|
||||
2 => 'allgemein',
|
||||
3 => 'terminabsage',
|
||||
default => ''
|
||||
};
|
||||
if ($mode === '') {
|
||||
echo "<div class='alert alert-danger'>Unbekannte Anfrageart.</div>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$arten = loadAnfragearten($pdo, $mode);
|
||||
|
||||
echo "<p>Füllen Sie das Formular aus.</p>";
|
||||
echo "<form action='" . e($_SERVER['PHP_SELF']) . "' method='POST'>";
|
||||
echo "<input type='hidden' name='aktion' value='confirm'>";
|
||||
echo "<input type='hidden' name='mode' value='" . e($mode) . "'>";
|
||||
echo "<input type='hidden' name='requester_person_id' value='" . (int)$requester_person_id . "'>";
|
||||
|
||||
// User block
|
||||
echo "<h4>Benutzer</h4>";
|
||||
echo "Name: " . e((string)$user["vorname"]) . " " . e((string)$user["nachname"]) . "<br>";
|
||||
echo "Geburtstag: " . e((string)$user["geburtstag"]) . "<br>";
|
||||
echo "Adresse: " . e((string)$user["strasse"]) . ", " . e((string)$user["plz"]) . ", " . e((string)$user["ort"]) . "<br>";
|
||||
|
||||
echo "<br><br><div class='col-sm-10'>";
|
||||
echo "<label for='category'>Thema:</label>";
|
||||
echo "<select class='form-control' name='category' id='category' required>";
|
||||
echo "<option value=''>Bitte wählen Sie aus</option>";
|
||||
foreach ($arten as $a) {
|
||||
$artid = (int)$a['artid'];
|
||||
$artname = (string)$a['artname'];
|
||||
echo "<option value='{$artid}'>" . e($artname) . "</option>";
|
||||
}
|
||||
echo "</select></div>";
|
||||
|
||||
// Special fields for rezept
|
||||
if ($mode === 'rezept') {
|
||||
$curdate = date('d.m.Y');
|
||||
$curyear = date('Y');
|
||||
$curMonth = (int)date('m');
|
||||
$curQuarter = (int)ceil($curMonth / 3);
|
||||
$current_quarter = (int)ceil(date('n') / 3);
|
||||
$first_date = date('d.m.Y', strtotime(date('Y') . '-' . (($current_quarter * 3) - 2) . '-1'));
|
||||
$last_date = date('t.m.Y', strtotime(date('Y') . '-' . (($current_quarter * 3)) . '-1'));
|
||||
|
||||
echo "<div class='col-sm-10'><br>";
|
||||
echo "<label for='karte'>Ich habe dieses Quartal schon meine Gesundheitskarte in der Praxis einlesen lassen:</label><br>";
|
||||
echo "Aktuell befinden wir uns im {$curQuarter}. Quartal von {$curyear}.<br>";
|
||||
echo "Dieses geht vom <b>{$first_date} bis {$last_date}</b><br>";
|
||||
echo "Heute ist der {$curdate}.<br>";
|
||||
echo "War die Chipkarte dieses Quartal noch nicht eingelesen, ist die Abholung nur in der Praxis möglich.<br><br>";
|
||||
echo "<select class='form-control' name='karte' id='karte' required onchange='checkkarte()'>
|
||||
<option value=''>Bitte wählen Sie aus</option>
|
||||
<option value='Ja'>Ja</option>
|
||||
<option value='Nein'>Nein</option>
|
||||
<option value='Privat'>Privatrezept (Selbstzahler)</option>
|
||||
</select>";
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='col-sm-10'><br>";
|
||||
echo "<label for='abholung'>Ich möchte das Rezept hier abholen:</label>";
|
||||
echo "<select class='form-control' name='abholung' id='abholung' required onchange='checkkarte()'>
|
||||
<option value=''>Bitte wählen Sie aus</option>
|
||||
<option value='Praxis'>Praxis Creutzburg</option>
|
||||
<option value='Apotheke'>Apotheke</option>
|
||||
</select>";
|
||||
echo "</div>";
|
||||
|
||||
for ($i = 1; $i <= 6; $i++) {
|
||||
echo "<div class='col-sm-10'><br>";
|
||||
echo "<input class='form-control' type='text' name='Medikament{$i}' placeholder='Medikament, Wirkstoff, Packungsgröße' maxlength='150'>";
|
||||
echo "</div>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "<div class='col-sm-10'><br>";
|
||||
echo "<textarea class='form-control' name='message' id='message' placeholder='Ihre Nachricht/Bemerkung' rows='6' maxlength='500'></textarea>";
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='col-sm-10'><br>";
|
||||
echo "Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich.<br>";
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='col-sm-10'><br><br>";
|
||||
echo "<input class='form-control' type='submit' value='Weiter'>";
|
||||
echo "<br><br><br></div>";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
echo "<script>
|
||||
function checkkarte(){
|
||||
var karte = document.getElementById('karte');
|
||||
var abholung = document.getElementById('abholung');
|
||||
if (!karte || !abholung) return;
|
||||
if (karte.value === 'Nein') {
|
||||
abholung.value = 'Praxis';
|
||||
}
|
||||
}
|
||||
</script>";
|
||||
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// confirm -> summary
|
||||
if ($aktion === 'confirm') {
|
||||
$mode = (string)($_POST['mode'] ?? '');
|
||||
$requester_person_id = (int)($_POST['requester_person_id'] ?? 0);
|
||||
$category = (int)($_POST['category'] ?? 0);
|
||||
|
||||
if ($requester_person_id <= 0 || $category <= 0 || $mode === '') {
|
||||
echo "<div class='alert alert-danger'>Ungültige Eingaben.</div>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$anfrageartText = loadAnfrageartName($pdo, $category);
|
||||
|
||||
echo "<h4>Kontrollieren Sie Ihre Angaben!</h4><br>";
|
||||
echo "<form action='" . e($_SERVER['PHP_SELF']) . "' method='POST'>";
|
||||
echo "<input type='hidden' name='aktion' value='submit'>";
|
||||
echo "<input type='hidden' name='mode' value='" . e($mode) . "'>";
|
||||
echo "<input type='hidden' name='requester_person_id' value='" . (int)$requester_person_id . "'>";
|
||||
echo "<input type='hidden' name='category' value='" . (int)$category . "'>";
|
||||
|
||||
echo "<table border='0' class='table'>";
|
||||
echo "<tr><td class='fett' style='width:160px;'>Thema</td><td>" . e($anfrageartText) . "</td></tr>";
|
||||
|
||||
if ($mode === 'rezept') {
|
||||
$karte = (string)($_POST['karte'] ?? '');
|
||||
$abholung = (string)($_POST['abholung'] ?? '');
|
||||
echo "<input type='hidden' name='karte' value='" . e($karte) . "'>";
|
||||
echo "<input type='hidden' name='abholung' value='" . e($abholung) . "'>";
|
||||
echo "<tr><td class='fett'>Karte</td><td>" . e($karte) . "</td></tr>";
|
||||
echo "<tr><td class='fett'>Abholung</td><td>" . e($abholung) . "</td></tr>";
|
||||
|
||||
for ($i = 1; $i <= 6; $i++) {
|
||||
$med = (string)($_POST["Medikament{$i}"] ?? '');
|
||||
echo "<input type='hidden' name='Medikament{$i}' value='" . e($med) . "'>";
|
||||
if ($med !== '') {
|
||||
echo "<tr><td class='fett'>Medikament{$i}</td><td>" . e($med) . "</td></tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$message = (string)($_POST['message'] ?? '');
|
||||
echo "<input type='hidden' name='message' value='" . e($message) . "'>";
|
||||
echo "<tr><td class='fett'>Nachricht</td><td>" . nl2br(e($message)) . "</td></tr>";
|
||||
echo "</table>";
|
||||
|
||||
echo "<input type='submit' class='form-control' value='Anfrage abschicken'>";
|
||||
echo "</form>";
|
||||
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// submit -> insert + mail
|
||||
if ($aktion === 'submit') {
|
||||
$mode = (string)($_POST['mode'] ?? '');
|
||||
$requester_person_id = (int)($_POST['requester_person_id'] ?? 0);
|
||||
$anforderungart = (int)($_POST['category'] ?? 0);
|
||||
$message = (string)($_POST['message'] ?? '');
|
||||
|
||||
if ($requester_person_id <= 0 || $anforderungart <= 0) {
|
||||
echo "<div class='alert alert-danger'>Ungültige Eingaben.</div>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$nachricht = $message;
|
||||
|
||||
$abholungnr = 0;
|
||||
if ($mode === 'rezept') {
|
||||
$karte = (string)($_POST['karte'] ?? '');
|
||||
$abholung = (string)($_POST['abholung'] ?? '');
|
||||
|
||||
$abholungnr = ($abholung === 'Praxis') ? 1 : (($abholung === 'Apotheke') ? 2 : 0);
|
||||
if ($karte === 'Privat') {
|
||||
$karte = 'Privatrezept (Selbstzahler)';
|
||||
}
|
||||
$nachricht = "Karte eingelesen: {$karte}<br>Abholungsort: {$abholung}<br>" . $nachricht;
|
||||
}
|
||||
|
||||
$med = [];
|
||||
for ($i = 1; $i <= 6; $i++) {
|
||||
$med[$i] = trim((string)($_POST["Medikament{$i}"] ?? ''));
|
||||
}
|
||||
|
||||
// duplicate check (best effort)
|
||||
$exists = false;
|
||||
try {
|
||||
$stmtDup = $pdo->prepare("
|
||||
SELECT *
|
||||
FROM anfragen
|
||||
WHERE requester_person_id = :pid
|
||||
AND anforderungart = :art
|
||||
AND nachricht = :nachricht
|
||||
AND create_time >= DATE_SUB(NOW(), INTERVAL 7 DAY)
|
||||
");
|
||||
$stmtDup->execute([
|
||||
':pid' => $requester_person_id,
|
||||
':art' => $anforderungart,
|
||||
':nachricht' => $nachricht,
|
||||
]);
|
||||
$rows = $stmtDup->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
$medFieldAliases = [
|
||||
1 => ['med1', 'medikament1', 'med_1'],
|
||||
2 => ['med2', 'medikament2', 'med_2'],
|
||||
3 => ['med3', 'medikament3', 'med_3'],
|
||||
4 => ['med4', 'medikament4', 'med_4'],
|
||||
5 => ['med5', 'medikament5', 'med_5'],
|
||||
6 => ['med6', 'medikament6', 'med_6'],
|
||||
];
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$allMedsEqual = true;
|
||||
for ($i = 1; $i <= 6; $i++) {
|
||||
$dbValue = '';
|
||||
foreach ($medFieldAliases[$i] as $fieldName) {
|
||||
if (array_key_exists($fieldName, $row)) {
|
||||
$dbValue = trim((string)($row[$fieldName] ?? ''));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($dbValue !== $med[$i]) {
|
||||
$allMedsEqual = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($allMedsEqual) {
|
||||
$exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (Throwable $t) {
|
||||
error_log('Duplicate check failed: ' . $t->getMessage());
|
||||
$exists = false;
|
||||
}
|
||||
|
||||
if ($exists) {
|
||||
echo "<h3>Doppelte Anfrage</h3><br>Ihre Anfrage wurde schon in unserem System gespeichert.<br>
|
||||
Sie haben die identische Anfrage schon in den letzten sieben Tagen eingereicht.<br>
|
||||
Bitte warten Sie auf die Verarbeitung Ihrer Anfrage.<br><br>";
|
||||
echo "<form action='index.php' method='POST'>
|
||||
<input type='submit' class='btn btn-primary' value='Zum Hauptmenü'>
|
||||
</form>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$hash = bin2hex(random_bytes(16));
|
||||
$ordnungsid = ($mode === 'rezept') ? 1 : 2;
|
||||
|
||||
try {
|
||||
$anfrageid = insertAnfrage($pdo, [
|
||||
'person_id' => $requester_person_id,
|
||||
'anforderungart' => $anforderungart,
|
||||
'med1' => $med[1],
|
||||
'med2' => $med[2],
|
||||
'med3' => $med[3],
|
||||
'med4' => $med[4],
|
||||
'med5' => $med[5],
|
||||
'med6' => $med[6],
|
||||
'nachricht' => $nachricht,
|
||||
'hash' => $hash,
|
||||
'ordnungsid' => $ordnungsid,
|
||||
'abholort' => $abholungnr,
|
||||
'sicherenachricht' => 1,
|
||||
'checked' => 1,
|
||||
]);
|
||||
|
||||
$templateId = ($mode === 'rezept') ? 26 : 19;
|
||||
|
||||
// IMPORTANT: Your SendMailMessageVorlage() must accept PDO after your migration.
|
||||
SendMailMessageVorlage($pdo, "3", $anfrageid, (string)$templateId);
|
||||
|
||||
echo "<h3>Nachricht abgeschickt!</h3><br>Sie bekommen eine Bestätigung per E-Mail!<br>
|
||||
Überprüfen Sie auch Ihren Spam-Filter!<br><br>";
|
||||
|
||||
} catch (Throwable $t) {
|
||||
echo "<h3>Speicherung nicht erfolgreich</h3><br>Ihre Anfrage konnte nicht gespeichert werden.<br>";
|
||||
echo "<div class='alert alert-danger'>Fehler: " . e($t->getMessage()) . "</div>";
|
||||
}
|
||||
|
||||
echo "<br><br><br><form action='index.php' method='POST'>
|
||||
<input type='submit' class='btn btn-primary' value='Zum Hauptmenü'>
|
||||
</form>";
|
||||
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// fallback
|
||||
echo "<div class='alert alert-warning'>Unbekannte Aktion.</div>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
<?php
|
||||
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
ini_set('display_errors', '1');
|
||||
error_reporting(E_ALL);
|
||||
|
||||
|
||||
/* ---------------------------
|
||||
Page start
|
||||
----------------------------*/
|
||||
|
||||
include(__DIR__ . "/templates/header.inc.php");
|
||||
|
||||
echo "</header>";
|
||||
echo "<div class='jumbotron'><div class='container'>";
|
||||
|
||||
$user = check_intern_user(); // intern session user
|
||||
|
||||
if (!$user) {
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo "<h1>Neue Anfrage</h1>";
|
||||
echo "<p>Hallo " . e((string)($user['vorname'] ?? '')) . ",<br></p>";
|
||||
|
||||
// Preconditions
|
||||
if (!check_mailreg()) {
|
||||
echo "<br><br>";
|
||||
echo "Es fehlt die Authentifizierung Ihres Kontos per E-Mail! Bitte authentifizieren Sie Ihre E-Mail-Adresse.<br>";
|
||||
echo "<form action='authmeldung.php' method='POST'>";
|
||||
echo "<input name='aktion' type='hidden' value='1'>";
|
||||
echo "<input type='submit' class='btn btn-primary' value='E-Mail Authentifizierung'><br>";
|
||||
echo "</form>";
|
||||
}
|
||||
|
||||
if (!check_userdatenvorhanden()) {
|
||||
echo "<br><br>";
|
||||
echo "Es fehlen noch Informationen in Ihren Stammdaten. Bitte pflegen Sie die Daten nach.<br>";
|
||||
echo "<form action='settings.php' method='POST'>";
|
||||
echo "<input name='aktion' type='hidden' value='1'>";
|
||||
echo "<input type='submit' class='btn btn-primary' value='Stammdaten pflegen'><br>";
|
||||
echo "</form>";
|
||||
}
|
||||
|
||||
if (!(check_mailreg() && check_userdatenvorhanden())) {
|
||||
echo "<br><br><br><form action='index.php' method='POST'>
|
||||
<input type='submit' class='btn btn-primary' value='Zum Hauptmenü'>
|
||||
</form>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// action routing
|
||||
$aktion = $_POST['aktion'] ?? ''; // '', choose, confirm, submit
|
||||
|
||||
// Ensure persons id early
|
||||
try {
|
||||
$internUserId = isset($_SESSION['userid']) ? (int)$_SESSION['userid'] : null;
|
||||
$personId = ensurePersonFromInternUsersByEmail($pdo, (string)($user['email'] ?? ''), $internUserId);
|
||||
} catch (Throwable $t) {
|
||||
echo "<div class='alert alert-danger'>Fehler: " . e($t->getMessage()) . "</div>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// Vacation check
|
||||
if ($aktion === 'choose' || $aktion === 'confirm' || $aktion === 'submit' || $aktion === '') {
|
||||
if (isPraxisImUrlaub($pdo)) {
|
||||
$info = loadAktuelleUrlaubsInfo($pdo);
|
||||
echo "<h2>Praxis im Urlaub</h2>";
|
||||
echo "Wir befinden uns aktuell im Urlaub.<br>Wenden Sie sich an unsere Vertretung oder warten Sie bis nach unserem Urlaub mit Ihrer Anfrage.<br><br>";
|
||||
|
||||
if ($info) {
|
||||
$ende = (string)$info['ende'];
|
||||
$endeausgabe = date("d.m.Y", strtotime("+1 day", strtotime($ende)));
|
||||
|
||||
if (!empty($info['vertretung'])) echo "Unsere Vertretung: " . e($info['vertretung']) . "<br>";
|
||||
if (!empty($info['vertreterurl'])) echo "Webseite Vertretung: " . e($info['vertreterurl']) . "<br>";
|
||||
if (!empty($info['vertretertelefon'])) echo "Telefonischer Kontakt Vertretung: " . e($info['vertretertelefon']) . "<br>";
|
||||
if (!empty($info['vertreteradresse'])) echo "Adresse Vertretung: " . e($info['vertreteradresse']) . "<br>";
|
||||
|
||||
echo "<br>Wir stehen Ihnen ab dem " . e($endeausgabe) . " wieder zur Verfügung.<br><br><br>";
|
||||
}
|
||||
|
||||
echo "<form action='index.php' method='POST'><input type='submit' class='btn btn-primary' value='Zurück'></form>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// default: show selection
|
||||
if ($aktion === '') {
|
||||
echo "<p>Wählen Sie die Anfragenart aus:<br><br></p>";
|
||||
echo "<form action='" . e($_SERVER['PHP_SELF']) . "' method='POST'>";
|
||||
echo "<input type='hidden' name='aktion' value='choose'>";
|
||||
|
||||
echo "<h4>Benutzer</h4>";
|
||||
echo "Name: " . e((string)$user["vorname"]) . " " . e((string)$user["nachname"]) . "<br>";
|
||||
echo "Geburtstag: " . e((string)$user["geburtstag"]) . "<br>";
|
||||
echo "Adresse: " . e((string)$user["strasse"]) . ", " . e((string)$user["plz"]) . ", " . e((string)$user["ort"]) . "<br>";
|
||||
|
||||
echo "<input type='hidden' name='requester_person_id' value='" . (int)$personId . "'>";
|
||||
|
||||
echo "<br><br>";
|
||||
echo "<label for='anfrageart'>Art der Anfrage:</label>";
|
||||
echo "<select class='form-control' name='anfrageart' id='anfrageart' required>
|
||||
<option value='1'>Rezeptanfrage</option>
|
||||
<option value='2'>Allgemeine Anfrage</option>
|
||||
<option value='3'>Terminabsage</option>
|
||||
</select>";
|
||||
echo "<br><br>";
|
||||
echo "<input type='submit' class='btn btn-primary' value='Anfrage stellen'><br>";
|
||||
echo "</form>";
|
||||
|
||||
echo "<br><br><br><form action='index.php' method='POST'>
|
||||
<input type='submit' class='btn btn-primary' value='Zum Hauptmenü'>
|
||||
</form>";
|
||||
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// choose -> show form
|
||||
if ($aktion === 'choose') {
|
||||
$anfrageart = (int)($_POST['anfrageart'] ?? 0);
|
||||
$requester_person_id = (int)($_POST['requester_person_id'] ?? $personId);
|
||||
|
||||
$mode = match ($anfrageart) {
|
||||
1 => 'rezept',
|
||||
2 => 'allgemein',
|
||||
3 => 'terminabsage',
|
||||
default => ''
|
||||
};
|
||||
if ($mode === '') {
|
||||
echo "<div class='alert alert-danger'>Unbekannte Anfrageart.</div>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$arten = loadAnfragearten($pdo, $mode);
|
||||
|
||||
echo "<p>Füllen Sie das Formular aus.</p>";
|
||||
echo "<form action='" . e($_SERVER['PHP_SELF']) . "' method='POST'>";
|
||||
echo "<input type='hidden' name='aktion' value='confirm'>";
|
||||
echo "<input type='hidden' name='mode' value='" . e($mode) . "'>";
|
||||
echo "<input type='hidden' name='requester_person_id' value='" . (int)$requester_person_id . "'>";
|
||||
|
||||
// User block
|
||||
echo "<h4>Benutzer</h4>";
|
||||
echo "Name: " . e((string)$user["vorname"]) . " " . e((string)$user["nachname"]) . "<br>";
|
||||
echo "Geburtstag: " . e((string)$user["geburtstag"]) . "<br>";
|
||||
echo "Adresse: " . e((string)$user["strasse"]) . ", " . e((string)$user["plz"]) . ", " . e((string)$user["ort"]) . "<br>";
|
||||
|
||||
echo "<br><br><div class='col-sm-10'>";
|
||||
echo "<label for='category'>Thema:</label>";
|
||||
echo "<select class='form-control' name='category' id='category' required>";
|
||||
echo "<option value=''>Bitte wählen Sie aus</option>";
|
||||
foreach ($arten as $a) {
|
||||
$artid = (int)$a['artid'];
|
||||
$artname = (string)$a['artname'];
|
||||
echo "<option value='{$artid}'>" . e($artname) . "</option>";
|
||||
}
|
||||
echo "</select></div>";
|
||||
|
||||
// Special fields for rezept
|
||||
if ($mode === 'rezept') {
|
||||
$curdate = date('d.m.Y');
|
||||
$curyear = date('Y');
|
||||
$curMonth = (int)date('m');
|
||||
$curQuarter = (int)ceil($curMonth / 3);
|
||||
$current_quarter = (int)ceil(date('n') / 3);
|
||||
$first_date = date('d.m.Y', strtotime(date('Y') . '-' . (($current_quarter * 3) - 2) . '-1'));
|
||||
$last_date = date('t.m.Y', strtotime(date('Y') . '-' . (($current_quarter * 3)) . '-1'));
|
||||
|
||||
echo "<div class='col-sm-10'><br>";
|
||||
echo "<label for='karte'>Ich habe dieses Quartal schon meine Gesundheitskarte in der Praxis einlesen lassen:</label><br>";
|
||||
echo "Aktuell befinden wir uns im {$curQuarter}. Quartal von {$curyear}.<br>";
|
||||
echo "Dieses geht vom <b>{$first_date} bis {$last_date}</b><br>";
|
||||
echo "Heute ist der {$curdate}.<br>";
|
||||
echo "War die Chipkarte dieses Quartal noch nicht eingelesen, ist die Abholung nur in der Praxis möglich.<br><br>";
|
||||
echo "<select class='form-control' name='karte' id='karte' required onchange='checkkarte()'>
|
||||
<option value=''>Bitte wählen Sie aus</option>
|
||||
<option value='Ja'>Ja</option>
|
||||
<option value='Nein'>Nein</option>
|
||||
<option value='Privat'>Privatrezept (Selbstzahler)</option>
|
||||
</select>";
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='col-sm-10'><br>";
|
||||
echo "<label for='abholung'>Ich möchte das Rezept hier abholen:</label>";
|
||||
echo "<select class='form-control' name='abholung' id='abholung' required onchange='checkkarte()'>
|
||||
<option value=''>Bitte wählen Sie aus</option>
|
||||
<option value='Praxis'>Praxis Creutzburg</option>
|
||||
<option value='Apotheke'>Apotheke</option>
|
||||
</select>";
|
||||
echo "</div>";
|
||||
|
||||
for ($i = 1; $i <= 6; $i++) {
|
||||
echo "<div class='col-sm-10'><br>";
|
||||
echo "<input class='form-control' type='text' name='Medikament{$i}' placeholder='Medikament, Wirkstoff, Packungsgröße' maxlength='150'>";
|
||||
echo "</div>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "<div class='col-sm-10'><br>";
|
||||
echo "<textarea class='form-control' name='message' id='message' placeholder='Ihre Nachricht/Bemerkung' rows='6' maxlength='500'></textarea>";
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='col-sm-10'><br>";
|
||||
echo "Bedenken Sie bitte, dass wir einmal im Quartal Ihre Chipkarte benötigen. Ohne Chipkarte sind seit 1.1.2016 keine Kassendienstleistungen mehr möglich.<br>";
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='col-sm-10'><br><br>";
|
||||
echo "<input class='form-control' type='submit' value='Weiter'>";
|
||||
echo "<br><br><br></div>";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
echo "<script>
|
||||
function checkkarte(){
|
||||
var karte = document.getElementById('karte');
|
||||
var abholung = document.getElementById('abholung');
|
||||
if (!karte || !abholung) return;
|
||||
if (karte.value === 'Nein') {
|
||||
abholung.value = 'Praxis';
|
||||
}
|
||||
}
|
||||
</script>";
|
||||
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// confirm -> summary
|
||||
if ($aktion === 'confirm') {
|
||||
$mode = (string)($_POST['mode'] ?? '');
|
||||
$requester_person_id = (int)($_POST['requester_person_id'] ?? 0);
|
||||
$category = (int)($_POST['category'] ?? 0);
|
||||
|
||||
if ($requester_person_id <= 0 || $category <= 0 || $mode === '') {
|
||||
echo "<div class='alert alert-danger'>Ungültige Eingaben.</div>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$anfrageartText = loadAnfrageartName($pdo, $category);
|
||||
|
||||
echo "<h4>Kontrollieren Sie Ihre Angaben!</h4><br>";
|
||||
echo "<form action='" . e($_SERVER['PHP_SELF']) . "' method='POST'>";
|
||||
echo "<input type='hidden' name='aktion' value='submit'>";
|
||||
echo "<input type='hidden' name='mode' value='" . e($mode) . "'>";
|
||||
echo "<input type='hidden' name='requester_person_id' value='" . (int)$requester_person_id . "'>";
|
||||
echo "<input type='hidden' name='category' value='" . (int)$category . "'>";
|
||||
|
||||
echo "<table border='0' class='table'>";
|
||||
echo "<tr><td class='fett' style='width:160px;'>Thema</td><td>" . e($anfrageartText) . "</td></tr>";
|
||||
|
||||
if ($mode === 'rezept') {
|
||||
$karte = (string)($_POST['karte'] ?? '');
|
||||
$abholung = (string)($_POST['abholung'] ?? '');
|
||||
echo "<input type='hidden' name='karte' value='" . e($karte) . "'>";
|
||||
echo "<input type='hidden' name='abholung' value='" . e($abholung) . "'>";
|
||||
echo "<tr><td class='fett'>Karte</td><td>" . e($karte) . "</td></tr>";
|
||||
echo "<tr><td class='fett'>Abholung</td><td>" . e($abholung) . "</td></tr>";
|
||||
|
||||
for ($i = 1; $i <= 6; $i++) {
|
||||
$med = (string)($_POST["Medikament{$i}"] ?? '');
|
||||
echo "<input type='hidden' name='Medikament{$i}' value='" . e($med) . "'>";
|
||||
if ($med !== '') {
|
||||
echo "<tr><td class='fett'>Medikament{$i}</td><td>" . e($med) . "</td></tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$message = (string)($_POST['message'] ?? '');
|
||||
echo "<input type='hidden' name='message' value='" . e($message) . "'>";
|
||||
echo "<tr><td class='fett'>Nachricht</td><td>" . nl2br(e($message)) . "</td></tr>";
|
||||
echo "</table>";
|
||||
|
||||
echo "<input type='submit' class='form-control' value='Anfrage abschicken'>";
|
||||
echo "</form>";
|
||||
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// submit -> insert + mail
|
||||
if ($aktion === 'submit') {
|
||||
$mode = (string)($_POST['mode'] ?? '');
|
||||
$requester_person_id = (int)($_POST['requester_person_id'] ?? 0);
|
||||
$anforderungart = (int)($_POST['category'] ?? 0);
|
||||
$message = (string)($_POST['message'] ?? '');
|
||||
|
||||
if ($requester_person_id <= 0 || $anforderungart <= 0) {
|
||||
echo "<div class='alert alert-danger'>Ungültige Eingaben.</div>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$nachricht = $message;
|
||||
|
||||
$abholungnr = 0;
|
||||
if ($mode === 'rezept') {
|
||||
$karte = (string)($_POST['karte'] ?? '');
|
||||
$abholung = (string)($_POST['abholung'] ?? '');
|
||||
|
||||
$abholungnr = ($abholung === 'Praxis') ? 1 : (($abholung === 'Apotheke') ? 2 : 0);
|
||||
if ($karte === 'Privat') {
|
||||
$karte = 'Privatrezept (Selbstzahler)';
|
||||
}
|
||||
$nachricht = "Karte eingelesen: {$karte}<br>Abholungsort: {$abholung}<br>" . $nachricht;
|
||||
}
|
||||
|
||||
$med = [];
|
||||
for ($i = 1; $i <= 6; $i++) {
|
||||
$med[$i] = trim((string)($_POST["Medikament{$i}"] ?? ''));
|
||||
}
|
||||
|
||||
// duplicate check (best effort)
|
||||
$exists = false;
|
||||
try {
|
||||
$stmtDup = $pdo->prepare("
|
||||
SELECT *
|
||||
FROM anfragen
|
||||
WHERE requester_person_id = :pid
|
||||
AND anforderungart = :art
|
||||
AND nachricht = :nachricht
|
||||
AND create_time >= DATE_SUB(NOW(), INTERVAL 7 DAY)
|
||||
");
|
||||
$stmtDup->execute([
|
||||
':pid' => $requester_person_id,
|
||||
':art' => $anforderungart,
|
||||
':nachricht' => $nachricht,
|
||||
]);
|
||||
$rows = $stmtDup->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
$medFieldAliases = [
|
||||
1 => ['med1', 'medikament1', 'med_1'],
|
||||
2 => ['med2', 'medikament2', 'med_2'],
|
||||
3 => ['med3', 'medikament3', 'med_3'],
|
||||
4 => ['med4', 'medikament4', 'med_4'],
|
||||
5 => ['med5', 'medikament5', 'med_5'],
|
||||
6 => ['med6', 'medikament6', 'med_6'],
|
||||
];
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$allMedsEqual = true;
|
||||
for ($i = 1; $i <= 6; $i++) {
|
||||
$dbValue = '';
|
||||
foreach ($medFieldAliases[$i] as $fieldName) {
|
||||
if (array_key_exists($fieldName, $row)) {
|
||||
$dbValue = trim((string)($row[$fieldName] ?? ''));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($dbValue !== $med[$i]) {
|
||||
$allMedsEqual = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($allMedsEqual) {
|
||||
$exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (Throwable $t) {
|
||||
error_log('Duplicate check failed: ' . $t->getMessage());
|
||||
$exists = false;
|
||||
}
|
||||
|
||||
if ($exists) {
|
||||
echo "<h3>Doppelte Anfrage</h3><br>Ihre Anfrage wurde schon in unserem System gespeichert.<br>
|
||||
Sie haben die identische Anfrage schon in den letzten sieben Tagen eingereicht.<br>
|
||||
Bitte warten Sie auf die Verarbeitung Ihrer Anfrage.<br><br>";
|
||||
echo "<form action='index.php' method='POST'>
|
||||
<input type='submit' class='btn btn-primary' value='Zum Hauptmenü'>
|
||||
</form>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$hash = bin2hex(random_bytes(16));
|
||||
$ordnungsid = ($mode === 'rezept') ? 1 : 2;
|
||||
|
||||
try {
|
||||
$anfrageid = insertAnfrage($pdo, [
|
||||
'person_id' => $requester_person_id,
|
||||
'anforderungart' => $anforderungart,
|
||||
'med1' => $med[1],
|
||||
'med2' => $med[2],
|
||||
'med3' => $med[3],
|
||||
'med4' => $med[4],
|
||||
'med5' => $med[5],
|
||||
'med6' => $med[6],
|
||||
'nachricht' => $nachricht,
|
||||
'hash' => $hash,
|
||||
'ordnungsid' => $ordnungsid,
|
||||
'abholort' => $abholungnr,
|
||||
'sicherenachricht' => 1,
|
||||
'checked' => 1,
|
||||
]);
|
||||
|
||||
$templateId = ($mode === 'rezept') ? 26 : 19;
|
||||
|
||||
// IMPORTANT: Your SendMailMessageVorlage() must accept PDO after your migration.
|
||||
SendMailMessageVorlage($pdo, "3", $anfrageid, (string)$templateId);
|
||||
|
||||
echo "<h3>Nachricht abgeschickt!</h3><br>Sie bekommen eine Bestätigung per E-Mail!<br>
|
||||
Überprüfen Sie auch Ihren Spam-Filter!<br><br>";
|
||||
|
||||
} catch (Throwable $t) {
|
||||
echo "<h3>Speicherung nicht erfolgreich</h3><br>Ihre Anfrage konnte nicht gespeichert werden.<br>";
|
||||
echo "<div class='alert alert-danger'>Fehler: " . e($t->getMessage()) . "</div>";
|
||||
}
|
||||
|
||||
echo "<br><br><br><form action='index.php' method='POST'>
|
||||
<input type='submit' class='btn btn-primary' value='Zum Hauptmenü'>
|
||||
</form>";
|
||||
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// fallback
|
||||
echo "<div class='alert alert-warning'>Unbekannte Aktion.</div>";
|
||||
echo "</div></div>";
|
||||
include(__DIR__ . "/templates/footer.inc.php");
|
||||
|
||||
+111
-111
@@ -1,111 +1,111 @@
|
||||
<?php
|
||||
ob_start();
|
||||
session_start();
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
|
||||
/* ---------- Kein direkter Zugriff ---------- */
|
||||
if (empty($_SESSION['2fa_userid'])) {
|
||||
header('Location: login.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$error_msg = '';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['code'])) {
|
||||
|
||||
$userId = (int)$_SESSION['2fa_userid'];
|
||||
$codeHash = hash('sha256', $_POST['code']);
|
||||
|
||||
// 2FA-Code prüfen
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT id
|
||||
FROM intern_2fa_codes
|
||||
WHERE user_id = :uid
|
||||
AND code = :code
|
||||
AND expires_at > NOW()
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([
|
||||
'uid' => $userId,
|
||||
'code' => $codeHash
|
||||
]);
|
||||
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($row) {
|
||||
|
||||
// Code löschen (Einmalverwendung)
|
||||
$pdo->prepare("DELETE FROM intern_2fa_codes WHERE user_id = :uid")
|
||||
->execute(['uid' => $userId]);
|
||||
|
||||
session_regenerate_id(true);
|
||||
|
||||
$_SESSION['userid'] = $userId;
|
||||
$_SESSION['2fa_verified'] = true;
|
||||
unset($_SESSION['2fa_userid']);
|
||||
|
||||
/* ---------- Gerät merken ---------- */
|
||||
if (!empty($_POST['remember_device'])) {
|
||||
|
||||
$identifier = bin2hex(random_bytes(32));
|
||||
$token = bin2hex(random_bytes(32));
|
||||
|
||||
$pdo->prepare("
|
||||
INSERT INTO intern_securitytokens
|
||||
(user_id, identifier, securitytoken, expires_at)
|
||||
VALUES (:uid, :identifier, :token, :expires)
|
||||
")->execute([
|
||||
'uid' => $userId,
|
||||
'identifier' => $identifier,
|
||||
'token' => hash('sha256', $token),
|
||||
'expires' => date('Y-m-d H:i:s', time() + 30 * 24 * 3600)
|
||||
]);
|
||||
|
||||
$opts = [
|
||||
'expires' => time() + 30 * 24 * 3600,
|
||||
'path' => '/',
|
||||
'secure' => true,
|
||||
'httponly' => true,
|
||||
'samesite' => 'Lax'
|
||||
];
|
||||
|
||||
setcookie('remember_device', $identifier, $opts);
|
||||
setcookie('remember_device_token', $token, $opts);
|
||||
}
|
||||
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$error_msg = 'Falscher oder abgelaufener Code.';
|
||||
}
|
||||
|
||||
include("templates/header.inc.php");
|
||||
?>
|
||||
|
||||
<div class="container small-container-330 form-signin">
|
||||
<form action="verify_2fa.php" method="post">
|
||||
<h2 class="form-signin-heading">Zwei-Faktor-Authentifizierung</h2>
|
||||
|
||||
<p>Die Praxis Creutzburg sichert diesen Zugang mit einer Zwei-Faktor-Authentifizierung ab.<br>
|
||||
Sie benötigt neben Ihren Passwort auch den zweiten Faktor: eine zufällig generierte Nummer, die an Ihre E-Mail-Adresse versendet wurde.<br>
|
||||
Der zweite Faktor ist 5 Minuten gültig.<br>
|
||||
Prüfen Sie bitte jetzt Ihr Postfach und auch Ihren Spam-Ordner auf eine E-Mail von uns und geben Sie hier die sechsstellige Nummer ein.<br></p>
|
||||
|
||||
<?php if(!empty($error_msg)) echo $error_msg; ?>
|
||||
<label for="inputCode">6-stelliger Code</label>
|
||||
<input type="text" name="code" class="form-control" placeholder="Code eingeben" required>
|
||||
<br>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="remember_device" value="1"> Dieses Gerät für 30 Tage merken
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Bestätigen</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php include("templates/footer.inc.php"); ?>
|
||||
<?php
|
||||
ob_start();
|
||||
session_start();
|
||||
require_once(__DIR__ . "/../inc/config.inc.php");
|
||||
require_once(__DIR__ . "/../inc/functions.inc.php");
|
||||
|
||||
|
||||
/* ---------- Kein direkter Zugriff ---------- */
|
||||
if (empty($_SESSION['2fa_userid'])) {
|
||||
header('Location: login.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$error_msg = '';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['code'])) {
|
||||
|
||||
$userId = (int)$_SESSION['2fa_userid'];
|
||||
$codeHash = hash('sha256', $_POST['code']);
|
||||
|
||||
// 2FA-Code prüfen
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT id
|
||||
FROM intern_2fa_codes
|
||||
WHERE user_id = :uid
|
||||
AND code = :code
|
||||
AND expires_at > NOW()
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([
|
||||
'uid' => $userId,
|
||||
'code' => $codeHash
|
||||
]);
|
||||
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($row) {
|
||||
|
||||
// Code löschen (Einmalverwendung)
|
||||
$pdo->prepare("DELETE FROM intern_2fa_codes WHERE user_id = :uid")
|
||||
->execute(['uid' => $userId]);
|
||||
|
||||
session_regenerate_id(true);
|
||||
|
||||
$_SESSION['userid'] = $userId;
|
||||
$_SESSION['2fa_verified'] = true;
|
||||
unset($_SESSION['2fa_userid']);
|
||||
|
||||
/* ---------- Gerät merken ---------- */
|
||||
if (!empty($_POST['remember_device'])) {
|
||||
|
||||
$identifier = bin2hex(random_bytes(32));
|
||||
$token = bin2hex(random_bytes(32));
|
||||
|
||||
$pdo->prepare("
|
||||
INSERT INTO intern_securitytokens
|
||||
(user_id, identifier, securitytoken, expires_at)
|
||||
VALUES (:uid, :identifier, :token, :expires)
|
||||
")->execute([
|
||||
'uid' => $userId,
|
||||
'identifier' => $identifier,
|
||||
'token' => hash('sha256', $token),
|
||||
'expires' => date('Y-m-d H:i:s', time() + 30 * 24 * 3600)
|
||||
]);
|
||||
|
||||
$opts = [
|
||||
'expires' => time() + 30 * 24 * 3600,
|
||||
'path' => '/',
|
||||
'secure' => true,
|
||||
'httponly' => true,
|
||||
'samesite' => 'Lax'
|
||||
];
|
||||
|
||||
setcookie('remember_device', $identifier, $opts);
|
||||
setcookie('remember_device_token', $token, $opts);
|
||||
}
|
||||
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$error_msg = 'Falscher oder abgelaufener Code.';
|
||||
}
|
||||
|
||||
include("templates/header.inc.php");
|
||||
?>
|
||||
|
||||
<div class="container small-container-330 form-signin">
|
||||
<form action="verify_2fa.php" method="post">
|
||||
<h2 class="form-signin-heading">Zwei-Faktor-Authentifizierung</h2>
|
||||
|
||||
<p>Die Praxis Creutzburg sichert diesen Zugang mit einer Zwei-Faktor-Authentifizierung ab.<br>
|
||||
Sie benötigt neben Ihren Passwort auch den zweiten Faktor: eine zufällig generierte Nummer, die an Ihre E-Mail-Adresse versendet wurde.<br>
|
||||
Der zweite Faktor ist 5 Minuten gültig.<br>
|
||||
Prüfen Sie bitte jetzt Ihr Postfach und auch Ihren Spam-Ordner auf eine E-Mail von uns und geben Sie hier die sechsstellige Nummer ein.<br></p>
|
||||
|
||||
<?php if(!empty($error_msg)) echo $error_msg; ?>
|
||||
<label for="inputCode">6-stelliger Code</label>
|
||||
<input type="text" name="code" class="form-control" placeholder="Code eingeben" required>
|
||||
<br>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="remember_device" value="1"> Dieses Gerät für 30 Tage merken
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Bestätigen</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php include("templates/footer.inc.php"); ?>
|
||||
|
||||
+208
-208
@@ -1,209 +1,209 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Stellenangebote</title>
|
||||
<!-- Meta Pixel Code -->
|
||||
<script>
|
||||
!function(f,b,e,v,n,t,s)
|
||||
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
||||
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
|
||||
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
|
||||
n.queue=[];t=b.createElement(e);t.async=!0;
|
||||
t.src=v;s=b.getElementsByTagName(e)[0];
|
||||
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
||||
'https://connect.facebook.net/en_US/fbevents.js');
|
||||
fbq('init', '1304867248096206');
|
||||
fbq('track', 'PageView');
|
||||
</script>
|
||||
<noscript><img height="1" width="1" style="display:none"
|
||||
src="https://www.facebook.com/tr?id=1304867248096206&ev=PageView&noscript=1"
|
||||
/></noscript>
|
||||
<!-- End Meta Pixel Code -->
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org/",
|
||||
"@type": "JobPosting",
|
||||
"title": "Auszubildende/r zur Medizinischen Fachangestellten (MFA) (m/w/d)",
|
||||
"description": "Starte deine Karriere in unserer modernen Praxis! Bist du kommunikativ, hilfsbereit und interessierst dich für den medizinischen Bereich? Dann bist du bei uns genau richtig! Die Praxis Creutzburg bietet dir die Möglichkeit, eine abwechslungsreiche und spannende Ausbildung zur Medizinischen Fachangestellten (MFA) zu beginnen. Aufgaben: Assistenz bei Untersuchungen und Behandlungen, Patientenbetreuung und -beratung, Praxishygiene, Unterstützung bei Diagnostik und Therapie, Verwaltung und Abrechnung, Notfallmaßnahmen, Datenschutz. Wir bieten: fundierte Ausbildung, freundliches Team, moderne Ausstattung, Weiterbildungsmöglichkeiten, Unterstützung bei Führerschein und Studium.",
|
||||
"datePosted": "2025-08-26",
|
||||
"validThrough": "2025-12-31T23:59",
|
||||
"employmentType": "FULL_TIME",
|
||||
"hiringOrganization": {
|
||||
"@type": "Organization",
|
||||
"name": "Praxis Creutzburg",
|
||||
"sameAs": "https://www.praxis-creutzburg.de",
|
||||
"logo": "https://praxis-creutzburg.de/images/logo-arzt-creutzburg-coppen.gif"
|
||||
},
|
||||
"jobLocation": {
|
||||
"@type": "Place",
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"streetAddress": "Schlossstraße 18",
|
||||
"addressLocality": "Coppenbrügge",
|
||||
"postalCode": "31863",
|
||||
"addressCountry": "DE"
|
||||
}
|
||||
},
|
||||
"applicantLocationRequirements": {
|
||||
"@type": "Country",
|
||||
"name": "DE"
|
||||
},
|
||||
"educationRequirements": {
|
||||
"@type": "EducationalOccupationalCredential",
|
||||
"credentialCategory": "secondary",
|
||||
"description": "Mindestens Realschulabschluss oder sehr guter Hauptschulabschluss"
|
||||
},
|
||||
"qualifications": "Kommunikative Fähigkeiten, Verschwiegenheit, Kundenorientierung, Belastbarkeit, Teamfähigkeit, Interesse an medizinischen Themen.",
|
||||
"incentiveCompensation": "Faire Vergütung, Weiterbildungsmöglichkeiten (z. B. VERAH), Unterstützung bei Führerschein und Studium.",
|
||||
"industry": "Gesundheitswesen",
|
||||
"occupationalCategory": "3220",
|
||||
"experienceRequirements": "Keine Berufserfahrung erforderlich – Ausbildungsstelle.",
|
||||
"jobBenefits": [
|
||||
"Abwechslungsreiche Ausbildung",
|
||||
"Einblick in alle Bereiche einer Hausarztpraxis",
|
||||
"Engagiertes und freundliches Team",
|
||||
"Aktuelle IT-Ausstattung",
|
||||
"Flache Hierarchien",
|
||||
"Unterstützung bei Führerschein und Studium"
|
||||
],
|
||||
"applicationContact": {
|
||||
"@type": "ContactPoint",
|
||||
"name": "Dalia Alayan-Ibrahim",
|
||||
"email": "alayan@praxis-creutzburg.de",
|
||||
"contactType": "Bewerbung"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include("inc/config.inc.php");
|
||||
include("inc/functions.inc.php");
|
||||
include('inc/functions.impfen.inc.php');
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
|
||||
<section id="main" class="container">
|
||||
<?php
|
||||
echo showHeaderpraxis();
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<section class="box">
|
||||
<h2>Auszubildende/r zur Medizinischen Fachangestellten (MFA) (m/w/d)</h2>
|
||||
|
||||
<h3>Starte deine Karriere in unserer modernen Praxis!</h3>
|
||||
<p>Bist du kommunikativ, hilfsbereit und interessierst dich für den medizinischen Bereich? Dann bist du bei uns genau richtig! Die Praxis Creutzburg bietet dir die Möglichkeit, eine abwechslungsreiche und spannende Ausbildung zur Medizinischen Fachangestellten (MFA) zu beginnen. Wir legen großen Wert auf Teamarbeit, eine freundliche Atmosphäre und moderne Arbeitsbedingungen.</p>
|
||||
<p>Werde Teil eines motivierten Teams und profitiere von unserer langjährigen Erfahrung in der Ausbildung. Wir begleiten dich auf deinem Weg zum Erfolg und bieten dir beste Voraussetzungen für deine berufliche Zukunft.</p>
|
||||
|
||||
<h2>Wir suchen dich!</h2>
|
||||
<p>Wir suchen zu <strong>sofort</strong> eine/n motivierte/n Auszubildende/n zur Verstärkung unseres Praxisteams.</p>
|
||||
|
||||
<h3>Deine Aufgaben:</h3>
|
||||
<ul>
|
||||
<li>Assistenz bei Untersuchungen und Behandlungen</li>
|
||||
<li>Patientenbetreuung und -beratung</li>
|
||||
<li>Gesundheitsschutz und Maßnahmen zur Arbeits- und Praxishygiene</li>
|
||||
<li>Gesetzliche und vertragliche Vorgaben der medizinischen Versorgung einhalten</li>
|
||||
<li>Assistenz bei Diagnostik und Therapie</li>
|
||||
<li>Umgang mit Arzneimitteln, Injektionen und Infusionen</li>
|
||||
<li>Planung und Umsetzung von Präventions- und Rehabilitationsmaßnahmen</li>
|
||||
<li>Betriebsorganisation, Verwaltung und Abrechnung durchführen</li>
|
||||
<li>Qualitätsmanagement und Dokumentationen sicherstellen</li>
|
||||
<li>Schriftverkehr und organisatorische Aufgaben übernehmen</li>
|
||||
<li>Notfallmaßnahmen einleiten und begleiten</li>
|
||||
<li>Datenschutz und Datensicherheit gewährleisten</li>
|
||||
</ul>
|
||||
|
||||
<h3>Dein Profil:</h3>
|
||||
<ul>
|
||||
<li>Mindestens einen Realschulabschluss oder sehr guten Hauptschulabschluss</li>
|
||||
<li>Ausgeprägte kommunikative Fähigkeiten und ein hohes Maß an Verschwiegenheit</li>
|
||||
<li>Kundenorientierung und ein sicheres Auftreten</li>
|
||||
<li>Belastbarkeit und exaktes Arbeiten auch unter Druck</li>
|
||||
<li>Selbstständigkeit und Teamfähigkeit</li>
|
||||
<li>Interesse an medizinischen Themen und Organisation</li>
|
||||
</ul>
|
||||
|
||||
<h3>Wir bieten:</h3>
|
||||
<ul>
|
||||
<li>Eine fundierte und abwechslungsreiche Ausbildung</li>
|
||||
<li>Einblick in alle Bereiche einer ländlichen Hausarztpraxis</li>
|
||||
<li>Ein engagiertes und freundliches Team</li>
|
||||
<li>Aktuelle IT-Ausstattung inklusive Telefonanlage</li>
|
||||
<li>Flache Hierarchien und offene Kommunikation</li>
|
||||
<li>Faire Vergütung und Vertrauensarbeitszeit</li>
|
||||
<li>Weiterbildungsmöglichkeiten z.B. VERAH</li>
|
||||
<li>Unterstützung bei einem Führerschein</li>
|
||||
<li>Unterstützung bei einem ausbildungsbegleitendem Studium </li>
|
||||
<li>Raum für patientenorientiere Lösungen, wie z.B. <a href="https://www.dewezet.de/lokales/hameln-pyrmont/hameln/sumpfblume-impfen-bis-die-nadel-glueht-D27ZAZAAF52AY2FFA4365B44YA.html" target="_blank">bei unseren Impfaktionen</a></li>
|
||||
|
||||
</ul>
|
||||
<h3>Fragen:</h3>
|
||||
<p>Du hast grundsätzlich Fragen oder etwas ist unklar?<br>
|
||||
Telefonisch kannst du uns eine Nachricht auf unserem Anrufbeantworter hinterlassen. <br>Unser Praxisteam ruft dich schnellstmöglich zurück.<br>
|
||||
Per Mail wende dich bitte an Dalia Alayan-Ibrahim <a href="mailto:alayan@praxis-creutzburg.de">alayan@praxis-creutzburg.de</a><br>
|
||||
</p>
|
||||
|
||||
<section class="box" style="border-left:4px solid #2e7; background:#f7fff9;">
|
||||
<h3 style="margin-bottom:.4rem;">Onlinebewerbung</h3>
|
||||
<p style="margin:0 0 .8rem 0;">
|
||||
Bei uns kannst du dich <strong>einfach und schnell</strong> online bewerben! Die Bewerbung dauert 1-2 Minuten.
|
||||
</p>
|
||||
<ul class="actions">
|
||||
<li><a href="kurzbewerbung.php" class="button">Onlinebewerbung</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<h3>Bewerbung:</h3>
|
||||
<p>Bitte sende deine vollständigen Bewerbungsunterlagen an:</p>
|
||||
<p><strong>Praxis Creutzburg</strong><br>
|
||||
z.H. Dalia Alayan-Ibrahim<br>
|
||||
Schlossstraße 18<br>
|
||||
31863 Coppenbrügge<br>
|
||||
E-Mail: <a href="mailto:alayan@praxis-creutzburg.de">alayan@praxis-creutzburg.de</a></p>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="stellenangebote.php" method=POST>
|
||||
<input type=submit class=button value="Zu den Stellenangeboten">
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?></body>
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Stellenangebote</title>
|
||||
<!-- Meta Pixel Code -->
|
||||
<script>
|
||||
!function(f,b,e,v,n,t,s)
|
||||
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
||||
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
|
||||
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
|
||||
n.queue=[];t=b.createElement(e);t.async=!0;
|
||||
t.src=v;s=b.getElementsByTagName(e)[0];
|
||||
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
||||
'https://connect.facebook.net/en_US/fbevents.js');
|
||||
fbq('init', '1304867248096206');
|
||||
fbq('track', 'PageView');
|
||||
</script>
|
||||
<noscript><img height="1" width="1" style="display:none"
|
||||
src="https://www.facebook.com/tr?id=1304867248096206&ev=PageView&noscript=1"
|
||||
/></noscript>
|
||||
<!-- End Meta Pixel Code -->
|
||||
<!--
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org/",
|
||||
"@type": "JobPosting",
|
||||
"title": "Auszubildende/r zur Medizinischen Fachangestellten (MFA) (m/w/d)",
|
||||
"description": "Starte deine Karriere in unserer modernen Praxis! Bist du kommunikativ, hilfsbereit und interessierst dich für den medizinischen Bereich? Dann bist du bei uns genau richtig! Die Praxis Creutzburg bietet dir die Möglichkeit, eine abwechslungsreiche und spannende Ausbildung zur Medizinischen Fachangestellten (MFA) zu beginnen. Aufgaben: Assistenz bei Untersuchungen und Behandlungen, Patientenbetreuung und -beratung, Praxishygiene, Unterstützung bei Diagnostik und Therapie, Verwaltung und Abrechnung, Notfallmaßnahmen, Datenschutz. Wir bieten: fundierte Ausbildung, freundliches Team, moderne Ausstattung, Weiterbildungsmöglichkeiten, Unterstützung bei Führerschein und Studium.",
|
||||
"datePosted": "2025-08-26",
|
||||
"validThrough": "2025-12-31T23:59",
|
||||
"employmentType": "FULL_TIME",
|
||||
"hiringOrganization": {
|
||||
"@type": "Organization",
|
||||
"name": "Praxis Creutzburg",
|
||||
"sameAs": "https://www.praxis-creutzburg.de",
|
||||
"logo": "https://praxis-creutzburg.de/images/logo-arzt-creutzburg-coppen.gif"
|
||||
},
|
||||
"jobLocation": {
|
||||
"@type": "Place",
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"streetAddress": "Schlossstraße 18",
|
||||
"addressLocality": "Coppenbrügge",
|
||||
"postalCode": "31863",
|
||||
"addressCountry": "DE"
|
||||
}
|
||||
},
|
||||
"applicantLocationRequirements": {
|
||||
"@type": "Country",
|
||||
"name": "DE"
|
||||
},
|
||||
"educationRequirements": {
|
||||
"@type": "EducationalOccupationalCredential",
|
||||
"credentialCategory": "secondary",
|
||||
"description": "Mindestens Realschulabschluss oder sehr guter Hauptschulabschluss"
|
||||
},
|
||||
"qualifications": "Kommunikative Fähigkeiten, Verschwiegenheit, Kundenorientierung, Belastbarkeit, Teamfähigkeit, Interesse an medizinischen Themen.",
|
||||
"incentiveCompensation": "Faire Vergütung, Weiterbildungsmöglichkeiten (z. B. VERAH), Unterstützung bei Führerschein und Studium.",
|
||||
"industry": "Gesundheitswesen",
|
||||
"occupationalCategory": "3220",
|
||||
"experienceRequirements": "Keine Berufserfahrung erforderlich – Ausbildungsstelle.",
|
||||
"jobBenefits": [
|
||||
"Abwechslungsreiche Ausbildung",
|
||||
"Einblick in alle Bereiche einer Hausarztpraxis",
|
||||
"Engagiertes und freundliches Team",
|
||||
"Aktuelle IT-Ausstattung",
|
||||
"Flache Hierarchien",
|
||||
"Unterstützung bei Führerschein und Studium"
|
||||
],
|
||||
"applicationContact": {
|
||||
"@type": "ContactPoint",
|
||||
"name": "Dalia Alayan-Ibrahim",
|
||||
"email": "alayan@praxis-creutzburg.de",
|
||||
"contactType": "Bewerbung"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
-->
|
||||
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include("inc/config.inc.php");
|
||||
include("inc/functions.inc.php");
|
||||
include('inc/functions.impfen.inc.php');
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
<!--
|
||||
<section id="main" class="container">
|
||||
<?php
|
||||
echo showHeaderpraxis();
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<section class="box">
|
||||
<h2>Auszubildende/r zur Medizinischen Fachangestellten (MFA) (m/w/d)</h2>
|
||||
|
||||
<h3>Starte deine Karriere in unserer modernen Praxis!</h3>
|
||||
<p>Bist du kommunikativ, hilfsbereit und interessierst dich für den medizinischen Bereich? Dann bist du bei uns genau richtig! Die Praxis Creutzburg bietet dir die Möglichkeit, eine abwechslungsreiche und spannende Ausbildung zur Medizinischen Fachangestellten (MFA) zu beginnen. Wir legen großen Wert auf Teamarbeit, eine freundliche Atmosphäre und moderne Arbeitsbedingungen.</p>
|
||||
<p>Werde Teil eines motivierten Teams und profitiere von unserer langjährigen Erfahrung in der Ausbildung. Wir begleiten dich auf deinem Weg zum Erfolg und bieten dir beste Voraussetzungen für deine berufliche Zukunft.</p>
|
||||
|
||||
<h2>Wir suchen dich!</h2>
|
||||
<p>Wir suchen zu <strong>sofort</strong> eine/n motivierte/n Auszubildende/n zur Verstärkung unseres Praxisteams.</p>
|
||||
|
||||
<h3>Deine Aufgaben:</h3>
|
||||
<ul>
|
||||
<li>Assistenz bei Untersuchungen und Behandlungen</li>
|
||||
<li>Patientenbetreuung und -beratung</li>
|
||||
<li>Gesundheitsschutz und Maßnahmen zur Arbeits- und Praxishygiene</li>
|
||||
<li>Gesetzliche und vertragliche Vorgaben der medizinischen Versorgung einhalten</li>
|
||||
<li>Assistenz bei Diagnostik und Therapie</li>
|
||||
<li>Umgang mit Arzneimitteln, Injektionen und Infusionen</li>
|
||||
<li>Planung und Umsetzung von Präventions- und Rehabilitationsmaßnahmen</li>
|
||||
<li>Betriebsorganisation, Verwaltung und Abrechnung durchführen</li>
|
||||
<li>Qualitätsmanagement und Dokumentationen sicherstellen</li>
|
||||
<li>Schriftverkehr und organisatorische Aufgaben übernehmen</li>
|
||||
<li>Notfallmaßnahmen einleiten und begleiten</li>
|
||||
<li>Datenschutz und Datensicherheit gewährleisten</li>
|
||||
</ul>
|
||||
|
||||
<h3>Dein Profil:</h3>
|
||||
<ul>
|
||||
<li>Mindestens einen Realschulabschluss oder sehr guten Hauptschulabschluss</li>
|
||||
<li>Ausgeprägte kommunikative Fähigkeiten und ein hohes Maß an Verschwiegenheit</li>
|
||||
<li>Kundenorientierung und ein sicheres Auftreten</li>
|
||||
<li>Belastbarkeit und exaktes Arbeiten auch unter Druck</li>
|
||||
<li>Selbstständigkeit und Teamfähigkeit</li>
|
||||
<li>Interesse an medizinischen Themen und Organisation</li>
|
||||
</ul>
|
||||
|
||||
<h3>Wir bieten:</h3>
|
||||
<ul>
|
||||
<li>Eine fundierte und abwechslungsreiche Ausbildung</li>
|
||||
<li>Einblick in alle Bereiche einer ländlichen Hausarztpraxis</li>
|
||||
<li>Ein engagiertes und freundliches Team</li>
|
||||
<li>Aktuelle IT-Ausstattung inklusive Telefonanlage</li>
|
||||
<li>Flache Hierarchien und offene Kommunikation</li>
|
||||
<li>Faire Vergütung und Vertrauensarbeitszeit</li>
|
||||
<li>Weiterbildungsmöglichkeiten z.B. VERAH</li>
|
||||
<li>Unterstützung bei einem Führerschein</li>
|
||||
<li>Unterstützung bei einem ausbildungsbegleitendem Studium </li>
|
||||
<li>Raum für patientenorientiere Lösungen, wie z.B. <a href="https://www.dewezet.de/lokales/hameln-pyrmont/hameln/sumpfblume-impfen-bis-die-nadel-glueht-D27ZAZAAF52AY2FFA4365B44YA.html" target="_blank">bei unseren Impfaktionen</a></li>
|
||||
|
||||
</ul>
|
||||
<h3>Fragen:</h3>
|
||||
<p>Du hast grundsätzlich Fragen oder etwas ist unklar?<br>
|
||||
Telefonisch kannst du uns eine Nachricht auf unserem Anrufbeantworter hinterlassen. <br>Unser Praxisteam ruft dich schnellstmöglich zurück.<br>
|
||||
Per Mail wende dich bitte an Dalia Alayan-Ibrahim <a href="mailto:alayan@praxis-creutzburg.de">alayan@praxis-creutzburg.de</a><br>
|
||||
</p>
|
||||
|
||||
<section class="box" style="border-left:4px solid #2e7; background:#f7fff9;">
|
||||
<h3 style="margin-bottom:.4rem;">Onlinebewerbung</h3>
|
||||
<p style="margin:0 0 .8rem 0;">
|
||||
Bei uns kannst du dich <strong>einfach und schnell</strong> online bewerben! Die Bewerbung dauert 1-2 Minuten.
|
||||
</p>
|
||||
<ul class="actions">
|
||||
<li><a href="kurzbewerbung.php" class="button">Onlinebewerbung</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<h3>Bewerbung:</h3>
|
||||
<p>Bitte sende deine vollständigen Bewerbungsunterlagen an:</p>
|
||||
<p><strong>Praxis Creutzburg</strong><br>
|
||||
z.H. Dalia Alayan-Ibrahim<br>
|
||||
Schlossstraße 18<br>
|
||||
31863 Coppenbrügge<br>
|
||||
E-Mail: <a href="mailto:alayan@praxis-creutzburg.de">alayan@praxis-creutzburg.de</a></p>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="stellenangebote.php" method=POST>
|
||||
<input type=submit class=button value="Zu den Stellenangeboten">
|
||||
</form>
|
||||
</section>
|
||||
-->
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?></body>
|
||||
</html>
|
||||
+216
-215
@@ -1,216 +1,217 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Stellenangebote</title>
|
||||
<!-- Meta Pixel Code -->
|
||||
<script>
|
||||
!function(f,b,e,v,n,t,s)
|
||||
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
||||
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
|
||||
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
|
||||
n.queue=[];t=b.createElement(e);t.async=!0;
|
||||
t.src=v;s=b.getElementsByTagName(e)[0];
|
||||
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
||||
'https://connect.facebook.net/en_US/fbevents.js');
|
||||
fbq('init', '1304867248096206');
|
||||
fbq('track', 'PageView');
|
||||
</script>
|
||||
<noscript><img height="1" width="1" style="display:none"
|
||||
src="https://www.facebook.com/tr?id=1304867248096206&ev=PageView&noscript=1"
|
||||
/></noscript>
|
||||
<!-- End Meta Pixel Code -->
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org/",
|
||||
"@type": "JobPosting",
|
||||
"title": "Medizinische Fachangestellte (MFA) in Teilzeit (m/w/d)",
|
||||
"description": "Zur Verstärkung unseres Teams suchen wir ab sofort eine Medizinische Fachangestellte (MFA) in Teilzeit mit ca. 20 Stunden pro Woche. Aufgaben: Assistenz bei Untersuchungen und Behandlungen, Patientenbetreuung und -beratung, Praxishygiene, Assistenz bei Diagnostik und Therapie, Umgang mit Arzneimitteln, Injektionen und Infusionen, Organisation und Abrechnung, Notfallmaßnahmen, Datenschutz. Dein Profil: Abgeschlossene Ausbildung als MFA, Teilzeitverfügbarkeit (20 Std./Woche), professionelles Auftreten, Teamgeist, Verschwiegenheit, Laborerfahrung und EDV-Kenntnisse von Vorteil. Wir bieten: Abwechslungsreiche Tätigkeit, modernes Arbeitsumfeld, flache Hierarchien, strukturierte Praxisprozesse, papierlose Patientenakte, Online-Systeme, Weiterbildungsmöglichkeiten (z.B. VERAH), tarifnahe Vergütung, Unterstützung bei Studium, patientenorientierte Lösungen.",
|
||||
"datePosted": "2025-08-26",
|
||||
"validThrough": "2025-12-31T23:59",
|
||||
"employmentType": "PART_TIME",
|
||||
"hiringOrganization": {
|
||||
"@type": "Organization",
|
||||
"name": "Praxis Creutzburg",
|
||||
"sameAs": "https://www.praxis-creutzburg.de",
|
||||
"logo": "https://www.praxis-creutzburg.de/logo.png"
|
||||
},
|
||||
"jobLocation": {
|
||||
"@type": "Place",
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"streetAddress": "Schlossstraße 18",
|
||||
"addressLocality": "Coppenbrügge",
|
||||
"postalCode": "31863",
|
||||
"addressCountry": "DE"
|
||||
}
|
||||
},
|
||||
"applicantLocationRequirements": {
|
||||
"@type": "Country",
|
||||
"name": "DE"
|
||||
},
|
||||
"educationRequirements": {
|
||||
"@type": "EducationalOccupationalCredential",
|
||||
"credentialCategory": "vocational",
|
||||
"description": "Abgeschlossene Ausbildung als Medizinische Fachangestellte (MFA)"
|
||||
},
|
||||
"qualifications": "Abgeschlossene MFA-Ausbildung, Teilzeitverfügbarkeit (20 Std./Woche), freundliches Auftreten, Teamgeist, Verschwiegenheit, Laborerfahrung und EDV-Kenntnisse von Vorteil.",
|
||||
"incentiveCompensation": "An den Tarif angelehnte Vergütung, Weiterbildungsmöglichkeiten (z.B. VERAH), Unterstützung bei Studium.",
|
||||
"industry": "Gesundheitswesen",
|
||||
"occupationalCategory": "3256",
|
||||
"experienceRequirements": "Berufserfahrung als Medizinische Fachangestellte wünschenswert.",
|
||||
"jobBenefits": [
|
||||
"Abwechslungsreiche Tätigkeit",
|
||||
"Modernes Arbeitsumfeld",
|
||||
"Flache Hierarchien",
|
||||
"Strukturierte Praxisprozesse",
|
||||
"Papierlose Patientenakte & Online-Systeme",
|
||||
"Flexible Arbeitsgestaltung",
|
||||
"Weiterbildungsmöglichkeiten (z. B. VERAH)",
|
||||
"Tarifnahe Vergütung",
|
||||
"Unterstützung bei Studium",
|
||||
"Patientenorientierte Lösungen"
|
||||
],
|
||||
"applicationContact": {
|
||||
"@type": "ContactPoint",
|
||||
"name": "Dalia Alayan-Ibrahim",
|
||||
"email": "alayan@praxis-creutzburg.de",
|
||||
"contactType": "Bewerbung"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
|
||||
<section id="main" class="container">
|
||||
<?php
|
||||
echo showHeaderpraxis();
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<section class="box">
|
||||
<h3>Ihre Hausarztpraxis in Coppenbrügge und Bisperode</h3>
|
||||
|
||||
Die Praxis Creutzburg hat aktuell die folgende Stellausschreibungen.<br>
|
||||
|
||||
</section>
|
||||
<section class="box">
|
||||
<h2>Medizinische Fachangestellte (MFA) in Teilzeit (m/w/d)</h2>
|
||||
|
||||
<h2>Wir suchen dich!</h2>
|
||||
<p>Zur Verstärkung unseres Teams suchen wir ab <strong>sofort</strong> eine <strong>Medizinische Fachangestellte (MFA)</strong> in Teilzeit mit ca. <strong>20 Stunden pro Woche</strong>.</p>
|
||||
|
||||
<h3>Deine Aufgaben:</h3>
|
||||
<ul>
|
||||
<li>Assistenz bei Untersuchungen und Behandlungen</li>
|
||||
<li>Patientenbetreuung und -beratung</li>
|
||||
<li>Gesundheitsschutz und Maßnahmen zur Arbeits- und Praxishygiene</li>
|
||||
<li>Gesetzliche und vertragliche Vorgaben der medizinischen Versorgung einhalten</li>
|
||||
<li>Assistenz bei Diagnostik und Therapie</li>
|
||||
<li>Umgang mit Arzneimitteln, Injektionen und Infusionen</li>
|
||||
<li>Planung und Umsetzung von Präventions- und Rehabilitationsmaßnahmen</li>
|
||||
<li>Betriebsorganisation, Verwaltung und Abrechnung durchführen</li>
|
||||
<li>Qualitätsmanagement und Dokumentationen sicherstellen</li>
|
||||
<li>Schriftverkehr und organisatorische Aufgaben übernehmen</li>
|
||||
<li>Notfallmaßnahmen einleiten und begleiten</li>
|
||||
<li>Datenschutz und Datensicherheit gewährleisten</li>
|
||||
</ul>
|
||||
|
||||
<section>
|
||||
<h2>Dein Profil:</h2>
|
||||
<ul>
|
||||
<li>Abgeschlossene Ausbildung als Medizinische Fachangestellte (MFA)</li>
|
||||
<li>Teilzeitverfügbarkeit (20 Stunden pro Woche)</li>
|
||||
<li>Freundliches und professionelles Auftreten</li>
|
||||
<li>Zuverlässigkeit, Verschwiegenheit und Teamgeist</li>
|
||||
<li>Laborerfahrung und EDV-Kenntnisse sind von Vorteil</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<h3>Wir bieten:</h3>
|
||||
<ul>
|
||||
<li>Eine abwechslungsreiche Tätigkeit in einem modernen Arbeitsumfeld</li>
|
||||
<li>Flache Hierarchien und ein familäres Miteinander</li>
|
||||
<li>Sehr gut struktierte Praxisprozesse und Terminplanung</li>
|
||||
<li>Moderne IT-Ausstattung inkl. papierloser Patientenakte, Online-Anfragesystem und Telefonanlage</li>
|
||||
<li>Flexible Anpassung an aktuelle Situationen</li>
|
||||
<li>Weiterbildungsmöglichkeiten z.B. VERAH uvw.</li>
|
||||
<li>Eine an den Tarif angelehnte Vergütung</li>
|
||||
<li>Ein Chef, der hinter seinen Mitarbeitern steht</li>
|
||||
<li>Unterstützung bei einem ausbildungsbegleitendem Studium </li>
|
||||
<li>Raum für patientenorientiere Lösungen, wie z.B. <a href="https://www.dewezet.de/lokales/hameln-pyrmont/hameln/sumpfblume-impfen-bis-die-nadel-glueht-D27ZAZAAF52AY2FFA4365B44YA.html" target="_blank">bei unseren Impfaktionen</a></li>
|
||||
|
||||
</ul>
|
||||
<h3>Fragen:</h3>
|
||||
<p>Du hast grundsätzlich Fragen oder etwas ist unklar?<br>
|
||||
Telefonisch kannst du uns eine Nachricht auf unserem Anrufbeantworter hinterlassen. <br>Unser Praxisteam ruft dich schnellstmöglich zurück.<br>
|
||||
Per Mail wende dich bitte an Dalia Alayan-Ibrahim <a href="mailto:alayan@praxis-creutzburg.de">alayan@praxis-creutzburg.de</a><br>
|
||||
</p>
|
||||
|
||||
<section class="box" style="border-left:4px solid #2e7; background:#f7fff9;">
|
||||
<h3 style="margin-bottom:.4rem;">Onlinebewerbung</h3>
|
||||
<p style="margin:0 0 .8rem 0;">
|
||||
Bei uns kannst du dich <strong>einfach und schnell</strong> online bewerben! Die Bewerbung dauert 1-2 Minuten.
|
||||
</p>
|
||||
<ul class="actions">
|
||||
<li><a href="kurzbewerbung.php" class="button">Onlinebewerbung</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<h3>Bewerbung:</h3>
|
||||
<p>Bitte sende deine vollständigen Bewerbungsunterlagen an:</p>
|
||||
<p><strong>Praxis Creutzburg</strong><br>
|
||||
z.H. Dalia Alayan-Ibrahim<br>
|
||||
Schlossstraße 18<br>
|
||||
31863 Coppenbrügge<br>
|
||||
E-Mail: <a href="mailto:alayan@praxis-creutzburg.de">alayan@praxis-creutzburg.de</a></p>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="stellenangebote.php" method=POST>
|
||||
<input type=submit class=button value="Zu den Stellenangeboten">
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?></body>
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Alpha by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
|
||||
include('header.php');
|
||||
|
||||
?>
|
||||
<title>Praxis Creutzburg - Stellenangebote</title>
|
||||
<!-- Meta Pixel Code -->
|
||||
<script>
|
||||
!function(f,b,e,v,n,t,s)
|
||||
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
||||
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
|
||||
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
|
||||
n.queue=[];t=b.createElement(e);t.async=!0;
|
||||
t.src=v;s=b.getElementsByTagName(e)[0];
|
||||
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
||||
'https://connect.facebook.net/en_US/fbevents.js');
|
||||
fbq('init', '1304867248096206');
|
||||
fbq('track', 'PageView');
|
||||
</script>
|
||||
<noscript><img height="1" width="1" style="display:none"
|
||||
src="https://www.facebook.com/tr?id=1304867248096206&ev=PageView&noscript=1"
|
||||
/></noscript>
|
||||
<!-- End Meta Pixel Code -->
|
||||
<!--
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org/",
|
||||
"@type": "JobPosting",
|
||||
"title": "Medizinische Fachangestellte (MFA) in Teilzeit (m/w/d)",
|
||||
"description": "Zur Verstärkung unseres Teams suchen wir ab sofort eine Medizinische Fachangestellte (MFA) in Teilzeit mit ca. 20 Stunden pro Woche. Aufgaben: Assistenz bei Untersuchungen und Behandlungen, Patientenbetreuung und -beratung, Praxishygiene, Assistenz bei Diagnostik und Therapie, Umgang mit Arzneimitteln, Injektionen und Infusionen, Organisation und Abrechnung, Notfallmaßnahmen, Datenschutz. Dein Profil: Abgeschlossene Ausbildung als MFA, Teilzeitverfügbarkeit (20 Std./Woche), professionelles Auftreten, Teamgeist, Verschwiegenheit, Laborerfahrung und EDV-Kenntnisse von Vorteil. Wir bieten: Abwechslungsreiche Tätigkeit, modernes Arbeitsumfeld, flache Hierarchien, strukturierte Praxisprozesse, papierlose Patientenakte, Online-Systeme, Weiterbildungsmöglichkeiten (z.B. VERAH), tarifnahe Vergütung, Unterstützung bei Studium, patientenorientierte Lösungen.",
|
||||
"datePosted": "2025-08-26",
|
||||
"validThrough": "2025-12-31T23:59",
|
||||
"employmentType": "PART_TIME",
|
||||
"hiringOrganization": {
|
||||
"@type": "Organization",
|
||||
"name": "Praxis Creutzburg",
|
||||
"sameAs": "https://www.praxis-creutzburg.de",
|
||||
"logo": "https://www.praxis-creutzburg.de/logo.png"
|
||||
},
|
||||
"jobLocation": {
|
||||
"@type": "Place",
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"streetAddress": "Schlossstraße 18",
|
||||
"addressLocality": "Coppenbrügge",
|
||||
"postalCode": "31863",
|
||||
"addressCountry": "DE"
|
||||
}
|
||||
},
|
||||
"applicantLocationRequirements": {
|
||||
"@type": "Country",
|
||||
"name": "DE"
|
||||
},
|
||||
"educationRequirements": {
|
||||
"@type": "EducationalOccupationalCredential",
|
||||
"credentialCategory": "vocational",
|
||||
"description": "Abgeschlossene Ausbildung als Medizinische Fachangestellte (MFA)"
|
||||
},
|
||||
"qualifications": "Abgeschlossene MFA-Ausbildung, Teilzeitverfügbarkeit (20 Std./Woche), freundliches Auftreten, Teamgeist, Verschwiegenheit, Laborerfahrung und EDV-Kenntnisse von Vorteil.",
|
||||
"incentiveCompensation": "An den Tarif angelehnte Vergütung, Weiterbildungsmöglichkeiten (z.B. VERAH), Unterstützung bei Studium.",
|
||||
"industry": "Gesundheitswesen",
|
||||
"occupationalCategory": "3256",
|
||||
"experienceRequirements": "Berufserfahrung als Medizinische Fachangestellte wünschenswert.",
|
||||
"jobBenefits": [
|
||||
"Abwechslungsreiche Tätigkeit",
|
||||
"Modernes Arbeitsumfeld",
|
||||
"Flache Hierarchien",
|
||||
"Strukturierte Praxisprozesse",
|
||||
"Papierlose Patientenakte & Online-Systeme",
|
||||
"Flexible Arbeitsgestaltung",
|
||||
"Weiterbildungsmöglichkeiten (z. B. VERAH)",
|
||||
"Tarifnahe Vergütung",
|
||||
"Unterstützung bei Studium",
|
||||
"Patientenorientierte Lösungen"
|
||||
],
|
||||
"applicationContact": {
|
||||
"@type": "ContactPoint",
|
||||
"name": "Dalia Alayan-Ibrahim",
|
||||
"email": "alayan@praxis-creutzburg.de",
|
||||
"contactType": "Bewerbung"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
-->
|
||||
|
||||
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<!-- Header -->
|
||||
<header id="header" class="../skel-layers-fixed">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
include('menu.php');
|
||||
include_once("inc/config.inc.php");
|
||||
include_once("inc/functions.inc.php");
|
||||
include_once('inc/functions.impfen.inc.php');
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- Main -->
|
||||
|
||||
<section id="main" class="container">
|
||||
<?php
|
||||
echo showHeaderpraxis();
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="12u">
|
||||
|
||||
<!-- Form -->
|
||||
<!--
|
||||
<section class="box">
|
||||
<h3>Ihre Hausarztpraxis in Coppenbrügge und Bisperode</h3>
|
||||
|
||||
Die Praxis Creutzburg hat aktuell die folgende Stellausschreibungen.<br>
|
||||
|
||||
</section>
|
||||
<section class="box">
|
||||
<h2>Medizinische Fachangestellte (MFA) in Teilzeit (m/w/d)</h2>
|
||||
|
||||
<h2>Wir suchen dich!</h2>
|
||||
<p>Zur Verstärkung unseres Teams suchen wir ab <strong>sofort</strong> eine <strong>Medizinische Fachangestellte (MFA)</strong> in Teilzeit mit ca. <strong>20 Stunden pro Woche</strong>.</p>
|
||||
|
||||
<h3>Deine Aufgaben:</h3>
|
||||
<ul>
|
||||
<li>Assistenz bei Untersuchungen und Behandlungen</li>
|
||||
<li>Patientenbetreuung und -beratung</li>
|
||||
<li>Gesundheitsschutz und Maßnahmen zur Arbeits- und Praxishygiene</li>
|
||||
<li>Gesetzliche und vertragliche Vorgaben der medizinischen Versorgung einhalten</li>
|
||||
<li>Assistenz bei Diagnostik und Therapie</li>
|
||||
<li>Umgang mit Arzneimitteln, Injektionen und Infusionen</li>
|
||||
<li>Planung und Umsetzung von Präventions- und Rehabilitationsmaßnahmen</li>
|
||||
<li>Betriebsorganisation, Verwaltung und Abrechnung durchführen</li>
|
||||
<li>Qualitätsmanagement und Dokumentationen sicherstellen</li>
|
||||
<li>Schriftverkehr und organisatorische Aufgaben übernehmen</li>
|
||||
<li>Notfallmaßnahmen einleiten und begleiten</li>
|
||||
<li>Datenschutz und Datensicherheit gewährleisten</li>
|
||||
</ul>
|
||||
|
||||
<section>
|
||||
<h2>Dein Profil:</h2>
|
||||
<ul>
|
||||
<li>Abgeschlossene Ausbildung als Medizinische Fachangestellte (MFA)</li>
|
||||
<li>Teilzeitverfügbarkeit (20 Stunden pro Woche)</li>
|
||||
<li>Freundliches und professionelles Auftreten</li>
|
||||
<li>Zuverlässigkeit, Verschwiegenheit und Teamgeist</li>
|
||||
<li>Laborerfahrung und EDV-Kenntnisse sind von Vorteil</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<h3>Wir bieten:</h3>
|
||||
<ul>
|
||||
<li>Eine abwechslungsreiche Tätigkeit in einem modernen Arbeitsumfeld</li>
|
||||
<li>Flache Hierarchien und ein familäres Miteinander</li>
|
||||
<li>Sehr gut struktierte Praxisprozesse und Terminplanung</li>
|
||||
<li>Moderne IT-Ausstattung inkl. papierloser Patientenakte, Online-Anfragesystem und Telefonanlage</li>
|
||||
<li>Flexible Anpassung an aktuelle Situationen</li>
|
||||
<li>Weiterbildungsmöglichkeiten z.B. VERAH uvw.</li>
|
||||
<li>Eine an den Tarif angelehnte Vergütung</li>
|
||||
<li>Ein Chef, der hinter seinen Mitarbeitern steht</li>
|
||||
<li>Unterstützung bei einem ausbildungsbegleitendem Studium </li>
|
||||
<li>Raum für patientenorientiere Lösungen, wie z.B. <a href="https://www.dewezet.de/lokales/hameln-pyrmont/hameln/sumpfblume-impfen-bis-die-nadel-glueht-D27ZAZAAF52AY2FFA4365B44YA.html" target="_blank">bei unseren Impfaktionen</a></li>
|
||||
|
||||
</ul>
|
||||
<h3>Fragen:</h3>
|
||||
<p>Du hast grundsätzlich Fragen oder etwas ist unklar?<br>
|
||||
Telefonisch kannst du uns eine Nachricht auf unserem Anrufbeantworter hinterlassen. <br>Unser Praxisteam ruft dich schnellstmöglich zurück.<br>
|
||||
Per Mail wende dich bitte an Dalia Alayan-Ibrahim <a href="mailto:alayan@praxis-creutzburg.de">alayan@praxis-creutzburg.de</a><br>
|
||||
</p>
|
||||
|
||||
<section class="box" style="border-left:4px solid #2e7; background:#f7fff9;">
|
||||
<h3 style="margin-bottom:.4rem;">Onlinebewerbung</h3>
|
||||
<p style="margin:0 0 .8rem 0;">
|
||||
Bei uns kannst du dich <strong>einfach und schnell</strong> online bewerben! Die Bewerbung dauert 1-2 Minuten.
|
||||
</p>
|
||||
<ul class="actions">
|
||||
<li><a href="kurzbewerbung.php" class="button">Onlinebewerbung</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<h3>Bewerbung:</h3>
|
||||
<p>Bitte sende deine vollständigen Bewerbungsunterlagen an:</p>
|
||||
<p><strong>Praxis Creutzburg</strong><br>
|
||||
z.H. Dalia Alayan-Ibrahim<br>
|
||||
Schlossstraße 18<br>
|
||||
31863 Coppenbrügge<br>
|
||||
E-Mail: <a href="mailto:alayan@praxis-creutzburg.de">alayan@praxis-creutzburg.de</a></p>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="stellenangebote.php" method=POST>
|
||||
<input type=submit class=button value="Zu den Stellenangeboten">
|
||||
</form>
|
||||
</section>
|
||||
-->
|
||||
<?php
|
||||
|
||||
include_once('footer.php');
|
||||
|
||||
?></body>
|
||||
</html>
|
||||
+16
-16
@@ -1,17 +1,17 @@
|
||||
input[type="number"],input[type="date"] {
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-o-appearance: none;
|
||||
-ms-appearance: none;
|
||||
appearance: none;
|
||||
background: #f8f8f8;
|
||||
border-radius: 6px;
|
||||
border: solid 1px #e5e5e5;
|
||||
color: inherit;
|
||||
display: block;
|
||||
outline: 0;
|
||||
padding: 0 1em;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
height: 3em;
|
||||
input[type="number"],input[type="date"] {
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-o-appearance: none;
|
||||
-ms-appearance: none;
|
||||
appearance: none;
|
||||
background: #f8f8f8;
|
||||
border-radius: 6px;
|
||||
border: solid 1px #e5e5e5;
|
||||
color: inherit;
|
||||
display: block;
|
||||
outline: 0;
|
||||
padding: 0 1em;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
height: 3em;
|
||||
}
|
||||
+21
-21
@@ -1,22 +1,22 @@
|
||||
#marquee-cont {
|
||||
background: #ff6363;
|
||||
margin-top:10px;
|
||||
}
|
||||
#marquee-cont marquee {
|
||||
margin-top: 5px;
|
||||
background: #ff6363;
|
||||
}
|
||||
#marquee-news {
|
||||
|
||||
background: #1174A8;
|
||||
padding: 5px;
|
||||
}
|
||||
#ticker-title{
|
||||
border:none;
|
||||
padding:5px 20px;
|
||||
background:#1174A8;
|
||||
color:white;
|
||||
}
|
||||
#ticker-title:focus{
|
||||
outline:none;
|
||||
#marquee-cont {
|
||||
background: #ff6363;
|
||||
margin-top:10px;
|
||||
}
|
||||
#marquee-cont marquee {
|
||||
margin-top: 5px;
|
||||
background: #ff6363;
|
||||
}
|
||||
#marquee-news {
|
||||
|
||||
background: #1174A8;
|
||||
padding: 5px;
|
||||
}
|
||||
#ticker-title{
|
||||
border:none;
|
||||
padding:5px 20px;
|
||||
background:#1174A8;
|
||||
color:white;
|
||||
}
|
||||
#ticker-title:focus{
|
||||
outline:none;
|
||||
}
|
||||
+446
-446
File diff suppressed because one or more lines are too long
+371
-371
@@ -1,372 +1,372 @@
|
||||
// By default, Klaro will load the config from a global "klaroConfig" variable.
|
||||
// You can change this by specifying the "data-config" attribute on your
|
||||
// script take, e.g. like this:
|
||||
// <script src="klaro.js" data-config="myConfigVariableName" />
|
||||
var klaroConfig = {
|
||||
// With the 0.7.0 release we introduce a 'version' paramter that will make
|
||||
// if easier for us to keep configuration files backwards-compatible in the future.
|
||||
version: 1,
|
||||
|
||||
// You can customize the ID of the DIV element that Klaro will create
|
||||
// when starting up. If undefined, Klaro will use 'klaro'.
|
||||
elementID: 'klaro',
|
||||
|
||||
// You can override CSS style variables here. For IE11, Klaro will
|
||||
// dynamically inject the variables into the CSS. If you still consider
|
||||
// supporting IE9-10 (which you probably shouldn't) you need to use Klaro
|
||||
// with an external stylesheet as the dynamic replacement won't work there.
|
||||
styling: {
|
||||
theme: ['light', 'top', 'wide'],
|
||||
},
|
||||
|
||||
// Setting this to true will keep Klaro from automatically loading itself
|
||||
// when the page is being loaded.
|
||||
noAutoLoad: false,
|
||||
|
||||
// Setting this to true will render the descriptions of the consent
|
||||
// modal and consent notice are HTML. Use with care.
|
||||
htmlTexts: true,
|
||||
|
||||
// Setting 'embedded' to true will render the Klaro modal and notice without
|
||||
// the modal background, allowing you to e.g. embed them into a specific element
|
||||
// of your website, such as your privacy notice.
|
||||
embedded: false,
|
||||
|
||||
// You can group services by their purpose in the modal. This is advisable
|
||||
// if you have a large number of services. Users can then enable or disable
|
||||
// entire groups of services instead of having to enable or disable every service.
|
||||
groupByPurpose: true,
|
||||
|
||||
// How Klaro should store the user's preferences. It can be either 'cookie'
|
||||
// (the default) or 'localStorage'.
|
||||
storageMethod: 'cookie',
|
||||
|
||||
// You can customize the name of the cookie that Klaro uses for storing
|
||||
// user consent decisions. If undefined, Klaro will use 'klaro'.
|
||||
cookieName: 'klaro',
|
||||
|
||||
// You can also set a custom expiration time for the Klaro cookie.
|
||||
// By default, it will expire after 120 days.
|
||||
cookieExpiresAfterDays: 365,
|
||||
|
||||
// You can change to cookie domain for the consent manager itself.
|
||||
// Use this if you want to get consent once for multiple matching domains.
|
||||
// If undefined, Klaro will use the current domain.
|
||||
//cookieDomain: '.github.com',
|
||||
|
||||
// You can change to cookie path for the consent manager itself.
|
||||
// Use this to restrict the cookie visibility to a specific path.
|
||||
// If undefined, Klaro will use '/' as cookie path.
|
||||
//cookiePath: '/',
|
||||
|
||||
// Defines the default state for services (true=enabled by default).
|
||||
default: false,
|
||||
|
||||
// If "mustConsent" is set to true, Klaro will directly display the consent
|
||||
// manager modal and not allow the user to close it before having actively
|
||||
// consented or declines the use of third-party services.
|
||||
mustConsent: false,
|
||||
|
||||
// Show "accept all" to accept all services instead of "ok" that only accepts
|
||||
// required and "default: true" services
|
||||
acceptAll: true,
|
||||
|
||||
// replace "decline" with cookie manager modal
|
||||
hideDeclineAll: false,
|
||||
|
||||
// hide "learnMore" link
|
||||
hideLearnMore: false,
|
||||
|
||||
// show cookie notice as modal
|
||||
noticeAsModal: false,
|
||||
|
||||
// You can also remove the 'Realized with Klaro!' text in the consent modal.
|
||||
// Please don't do this! We provide Klaro as a free open source tool.
|
||||
// Placing a link to our website helps us spread the word about it,
|
||||
// which ultimately enables us to make Klaro! better for everyone.
|
||||
// So please be fair and keep the link enabled. Thanks :)
|
||||
//disablePoweredBy: true,
|
||||
|
||||
// you can specify an additional class (or classes) that will be added to the Klaro `div`
|
||||
//additionalClass: 'my-klaro',
|
||||
|
||||
// You can define the UI language directly here. If undefined, Klaro will
|
||||
// use the value given in the global "lang" variable. If that does
|
||||
// not exist, it will use the value given in the "lang" attribute of your
|
||||
// HTML tag. If that also doesn't exist, it will use 'en'.
|
||||
//lang: 'en',
|
||||
|
||||
// You can overwrite existing translations and add translations for your
|
||||
// service descriptions and purposes. See `src/translations/` for a full
|
||||
// list of translations that can be overwritten:
|
||||
// https://github.com/KIProtect/klaro/tree/master/src/translations
|
||||
|
||||
// Example config that shows how to overwrite translations:
|
||||
// https://github.com/KIProtect/klaro/blob/master/src/configs/i18n.js
|
||||
translations: {
|
||||
// translationsed defined under the 'zz' language code act as default
|
||||
// translations.
|
||||
zz: {
|
||||
privacyPolicyUrl: '/#privacy',
|
||||
},
|
||||
// If you erase the "consentModal" translations, Klaro will use the
|
||||
// bundled translations.
|
||||
de: {
|
||||
privacyPolicyUrl: '/#datenschutz',
|
||||
consentModal: {
|
||||
description:
|
||||
'Hier können Sie einsehen und anpassen, welche Information wir über Sie sammeln. Einträge die als "Beispiel" gekennzeichnet sind dienen lediglich zu Demonstrationszwecken und werden nicht wirklich verwendet.',
|
||||
},
|
||||
adsense: {
|
||||
description: 'Anzeigen von Werbeanzeigen (Beispiel)',
|
||||
title: 'Google AdSense Werbezeugs',
|
||||
},
|
||||
matomo: {
|
||||
description: 'Sammeln von Besucherstatistiken',
|
||||
},
|
||||
camera: {
|
||||
description:
|
||||
'Eine Überwachungskamera (nur ein Beispiel zu IMG-Tags)',
|
||||
},
|
||||
cloudflare: {
|
||||
description: 'Schutz gegen DDoS-Angriffe',
|
||||
},
|
||||
intercom: {
|
||||
description:
|
||||
'Chat Widget & Sammeln von Besucherstatistiken (nur ein Beispiel)',
|
||||
},
|
||||
mouseflow: {
|
||||
description: 'Echtzeit-Benutzeranalyse (nur ein Beispiel)',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web-Schriftarten von Google gehostet',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Besucher-Statistiken',
|
||||
security: 'Sicherheit',
|
||||
livechat: 'Live Chat',
|
||||
advertising: 'Anzeigen von Werbung',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
en: {
|
||||
consentModal: {
|
||||
title: '<u>test</u>',
|
||||
description:
|
||||
'Here you can see and customize the information that we collect about you. Entries marked as "Example" are just for demonstration purposes and are not really used on this website.',
|
||||
},
|
||||
adsense: {
|
||||
description: 'Displaying of advertisements (just an example)',
|
||||
title: 'Google Adsense Advertisement',
|
||||
},
|
||||
matomo: {
|
||||
description: 'Collecting of visitor statistics',
|
||||
},
|
||||
camera: {
|
||||
description:
|
||||
'A surveillance camera (just an example for an IMG tag)',
|
||||
},
|
||||
cloudflare: {
|
||||
description: 'Protection against DDoS attacks',
|
||||
},
|
||||
intercom: {
|
||||
description:
|
||||
'Chat widget & collecting of visitor statistics (just an example)',
|
||||
},
|
||||
mouseflow: {
|
||||
description: 'Real-Time user analytics (just an example)',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web fonts hosted by Google',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Analytics',
|
||||
security: 'Security',
|
||||
livechat: 'Livechat',
|
||||
advertising: 'Advertising',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// This is a list of third-party services that Klaro will manage for you.
|
||||
services: [
|
||||
{
|
||||
name: 'twitter',
|
||||
default: false,
|
||||
contextualConsentOnly: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
name: 'youtube',
|
||||
default: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
// Each service should have a unique (and short) name.
|
||||
name: 'matomo',
|
||||
|
||||
// If "default" is set to true, the service will be enabled by default
|
||||
// Overwrites global "default" setting.
|
||||
// We recommend leaving this to "false" for services that collect
|
||||
// personal information.
|
||||
default: true,
|
||||
|
||||
// The title of you service as listed in the consent modal.
|
||||
title: 'Matomo/Piwik',
|
||||
|
||||
// The purpose(s) of this service. Will be listed on the consent notice.
|
||||
// Do not forget to add translations for all purposes you list here.
|
||||
purposes: ['analytics'],
|
||||
|
||||
// A list of regex expressions or strings giving the names of
|
||||
// cookies set by this service. If the user withdraws consent for a
|
||||
// given service, Klaro will then automatically delete all matching
|
||||
// cookies.
|
||||
cookies: [
|
||||
// you can also explicitly provide a path and a domain for
|
||||
// a given cookie. This is necessary if you have services that
|
||||
// set cookies for a path that is not "/" or a domain that
|
||||
// is not the current domain. If you do not set these values
|
||||
// properly, the cookie can't be deleted by Klaro
|
||||
// (there is no way to access the path or domain of a cookie in JS)
|
||||
// Notice that it is not possible to delete cookies that were set
|
||||
// on a third-party domain! See the note at mdn:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#new-cookie_domain
|
||||
[/^_pk_.*$/, '/', 'klaro.kiprotect.com'], //for the production version
|
||||
[/^_pk_.*$/, '/', 'localhost'], //for the local version
|
||||
'piwik_ignore',
|
||||
],
|
||||
|
||||
// An optional callback function that will be called each time
|
||||
// the consent state for the service changes (true=consented). Passes
|
||||
// the `service` config as the second parameter as well.
|
||||
callback: function(consent, service) {
|
||||
// This is an example callback function.
|
||||
console.log(
|
||||
'User consent for service ' + service.name + ': consent=' + consent
|
||||
);
|
||||
// To be used in conjunction with Matomo 'requireCookieConsent' Feature, Matomo 3.14.0 or newer
|
||||
// For further Information see https://matomo.org/faq/new-to-piwik/how-can-i-still-track-a-visitor-without-cookies-even-if-they-decline-the-cookie-consent/
|
||||
/*
|
||||
if(consent==true){
|
||||
_paq.push(['rememberCookieConsentGiven']);
|
||||
} else {
|
||||
_paq.push(['forgetCookieConsentGiven']);
|
||||
}
|
||||
*/
|
||||
},
|
||||
|
||||
// If "required" is set to true, Klaro will not allow this service to
|
||||
// be disabled by the user.
|
||||
required: false,
|
||||
|
||||
// If "optOut" is set to true, Klaro will load this service even before
|
||||
// the user gave explicit consent.
|
||||
// We recommend always leaving this "false".
|
||||
optOut: false,
|
||||
|
||||
// If "onlyOnce" is set to true, the service will only be executed
|
||||
// once regardless how often the user toggles it on and off.
|
||||
onlyOnce: true,
|
||||
},
|
||||
|
||||
// The services will appear in the modal in the same order as defined here.
|
||||
{
|
||||
name: 'inlineTracker',
|
||||
title: 'Inline Tracker',
|
||||
purposes: ['analytics'],
|
||||
cookies: ['inline-tracker'],
|
||||
optOut: false,
|
||||
},
|
||||
{
|
||||
name: 'externalTracker',
|
||||
title: 'External Tracker',
|
||||
purposes: ['analytics', 'security'],
|
||||
cookies: ['external-tracker'],
|
||||
},
|
||||
{
|
||||
name: 'intercom',
|
||||
title: 'Intercom',
|
||||
default: true,
|
||||
purposes: ['livechat'],
|
||||
},
|
||||
{
|
||||
name: 'mouseflow',
|
||||
title: 'Mouseflow',
|
||||
purposes: ['analytics'],
|
||||
},
|
||||
{
|
||||
name: 'adsense',
|
||||
// if you omit the title here Klaro will try to look it up in the
|
||||
// translations
|
||||
//title: 'Google AdSense',
|
||||
purposes: ['advertising'],
|
||||
},
|
||||
{
|
||||
name: 'camera',
|
||||
title: 'Surveillance Camera',
|
||||
purposes: ['security'],
|
||||
},
|
||||
/* {
|
||||
name: 'googleFonts',
|
||||
title: 'Google Fonts',
|
||||
purposes: ['styling'],
|
||||
},*/
|
||||
{
|
||||
name: 'cloudflare',
|
||||
title: 'Cloudflare',
|
||||
purposes: ['security'],
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'google-tag-manager',
|
||||
purposes: ['marketing'],
|
||||
onAccept: `
|
||||
// we notify the tag manager about all services that were accepted. You can define
|
||||
// a custom event in GTM to load the service if consent was given.
|
||||
for(let k of Object.keys(opts.consents)){
|
||||
if (opts.consents[k]){
|
||||
let eventName = 'klaro-'+k+'-accepted'
|
||||
dataLayer.push({'event': eventName})
|
||||
}
|
||||
}
|
||||
// if consent for Google Analytics was granted we enable analytics storage
|
||||
if (opts.consents[opts.vars.googleAnalyticsName || 'google-analytics']){
|
||||
console.log("Google analytics usage was granted")
|
||||
gtag('consent', 'update', {'analytics_storage': 'granted'})
|
||||
}
|
||||
// if consent for Google Ads was granted we enable ad storage
|
||||
if (opts.consents[opts.vars.adStorageName || 'google-ads']){
|
||||
console.log("Google ads usage was granted")
|
||||
gtag('consent', 'update', {'ad_storage': 'granted'})
|
||||
}
|
||||
`,
|
||||
onInit: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
onDecline: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
vars: {
|
||||
googleAnalytics: 'google-analytics'
|
||||
}
|
||||
},
|
||||
{
|
||||
// In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.
|
||||
name: 'google-analytics',
|
||||
purposes: ['marketing'],
|
||||
cookies: [
|
||||
/^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use
|
||||
],
|
||||
}
|
||||
],
|
||||
// By default, Klaro will load the config from a global "klaroConfig" variable.
|
||||
// You can change this by specifying the "data-config" attribute on your
|
||||
// script take, e.g. like this:
|
||||
// <script src="klaro.js" data-config="myConfigVariableName" />
|
||||
var klaroConfig = {
|
||||
// With the 0.7.0 release we introduce a 'version' paramter that will make
|
||||
// if easier for us to keep configuration files backwards-compatible in the future.
|
||||
version: 1,
|
||||
|
||||
// You can customize the ID of the DIV element that Klaro will create
|
||||
// when starting up. If undefined, Klaro will use 'klaro'.
|
||||
elementID: 'klaro',
|
||||
|
||||
// You can override CSS style variables here. For IE11, Klaro will
|
||||
// dynamically inject the variables into the CSS. If you still consider
|
||||
// supporting IE9-10 (which you probably shouldn't) you need to use Klaro
|
||||
// with an external stylesheet as the dynamic replacement won't work there.
|
||||
styling: {
|
||||
theme: ['light', 'top', 'wide'],
|
||||
},
|
||||
|
||||
// Setting this to true will keep Klaro from automatically loading itself
|
||||
// when the page is being loaded.
|
||||
noAutoLoad: false,
|
||||
|
||||
// Setting this to true will render the descriptions of the consent
|
||||
// modal and consent notice are HTML. Use with care.
|
||||
htmlTexts: true,
|
||||
|
||||
// Setting 'embedded' to true will render the Klaro modal and notice without
|
||||
// the modal background, allowing you to e.g. embed them into a specific element
|
||||
// of your website, such as your privacy notice.
|
||||
embedded: false,
|
||||
|
||||
// You can group services by their purpose in the modal. This is advisable
|
||||
// if you have a large number of services. Users can then enable or disable
|
||||
// entire groups of services instead of having to enable or disable every service.
|
||||
groupByPurpose: true,
|
||||
|
||||
// How Klaro should store the user's preferences. It can be either 'cookie'
|
||||
// (the default) or 'localStorage'.
|
||||
storageMethod: 'cookie',
|
||||
|
||||
// You can customize the name of the cookie that Klaro uses for storing
|
||||
// user consent decisions. If undefined, Klaro will use 'klaro'.
|
||||
cookieName: 'klaro',
|
||||
|
||||
// You can also set a custom expiration time for the Klaro cookie.
|
||||
// By default, it will expire after 120 days.
|
||||
cookieExpiresAfterDays: 365,
|
||||
|
||||
// You can change to cookie domain for the consent manager itself.
|
||||
// Use this if you want to get consent once for multiple matching domains.
|
||||
// If undefined, Klaro will use the current domain.
|
||||
//cookieDomain: '.github.com',
|
||||
|
||||
// You can change to cookie path for the consent manager itself.
|
||||
// Use this to restrict the cookie visibility to a specific path.
|
||||
// If undefined, Klaro will use '/' as cookie path.
|
||||
//cookiePath: '/',
|
||||
|
||||
// Defines the default state for services (true=enabled by default).
|
||||
default: false,
|
||||
|
||||
// If "mustConsent" is set to true, Klaro will directly display the consent
|
||||
// manager modal and not allow the user to close it before having actively
|
||||
// consented or declines the use of third-party services.
|
||||
mustConsent: false,
|
||||
|
||||
// Show "accept all" to accept all services instead of "ok" that only accepts
|
||||
// required and "default: true" services
|
||||
acceptAll: true,
|
||||
|
||||
// replace "decline" with cookie manager modal
|
||||
hideDeclineAll: false,
|
||||
|
||||
// hide "learnMore" link
|
||||
hideLearnMore: false,
|
||||
|
||||
// show cookie notice as modal
|
||||
noticeAsModal: false,
|
||||
|
||||
// You can also remove the 'Realized with Klaro!' text in the consent modal.
|
||||
// Please don't do this! We provide Klaro as a free open source tool.
|
||||
// Placing a link to our website helps us spread the word about it,
|
||||
// which ultimately enables us to make Klaro! better for everyone.
|
||||
// So please be fair and keep the link enabled. Thanks :)
|
||||
//disablePoweredBy: true,
|
||||
|
||||
// you can specify an additional class (or classes) that will be added to the Klaro `div`
|
||||
//additionalClass: 'my-klaro',
|
||||
|
||||
// You can define the UI language directly here. If undefined, Klaro will
|
||||
// use the value given in the global "lang" variable. If that does
|
||||
// not exist, it will use the value given in the "lang" attribute of your
|
||||
// HTML tag. If that also doesn't exist, it will use 'en'.
|
||||
//lang: 'en',
|
||||
|
||||
// You can overwrite existing translations and add translations for your
|
||||
// service descriptions and purposes. See `src/translations/` for a full
|
||||
// list of translations that can be overwritten:
|
||||
// https://github.com/KIProtect/klaro/tree/master/src/translations
|
||||
|
||||
// Example config that shows how to overwrite translations:
|
||||
// https://github.com/KIProtect/klaro/blob/master/src/configs/i18n.js
|
||||
translations: {
|
||||
// translationsed defined under the 'zz' language code act as default
|
||||
// translations.
|
||||
zz: {
|
||||
privacyPolicyUrl: '/#privacy',
|
||||
},
|
||||
// If you erase the "consentModal" translations, Klaro will use the
|
||||
// bundled translations.
|
||||
de: {
|
||||
privacyPolicyUrl: '/#datenschutz',
|
||||
consentModal: {
|
||||
description:
|
||||
'Hier können Sie einsehen und anpassen, welche Information wir über Sie sammeln. Einträge die als "Beispiel" gekennzeichnet sind dienen lediglich zu Demonstrationszwecken und werden nicht wirklich verwendet.',
|
||||
},
|
||||
adsense: {
|
||||
description: 'Anzeigen von Werbeanzeigen (Beispiel)',
|
||||
title: 'Google AdSense Werbezeugs',
|
||||
},
|
||||
matomo: {
|
||||
description: 'Sammeln von Besucherstatistiken',
|
||||
},
|
||||
camera: {
|
||||
description:
|
||||
'Eine Überwachungskamera (nur ein Beispiel zu IMG-Tags)',
|
||||
},
|
||||
cloudflare: {
|
||||
description: 'Schutz gegen DDoS-Angriffe',
|
||||
},
|
||||
intercom: {
|
||||
description:
|
||||
'Chat Widget & Sammeln von Besucherstatistiken (nur ein Beispiel)',
|
||||
},
|
||||
mouseflow: {
|
||||
description: 'Echtzeit-Benutzeranalyse (nur ein Beispiel)',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web-Schriftarten von Google gehostet',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Besucher-Statistiken',
|
||||
security: 'Sicherheit',
|
||||
livechat: 'Live Chat',
|
||||
advertising: 'Anzeigen von Werbung',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
en: {
|
||||
consentModal: {
|
||||
title: '<u>test</u>',
|
||||
description:
|
||||
'Here you can see and customize the information that we collect about you. Entries marked as "Example" are just for demonstration purposes and are not really used on this website.',
|
||||
},
|
||||
adsense: {
|
||||
description: 'Displaying of advertisements (just an example)',
|
||||
title: 'Google Adsense Advertisement',
|
||||
},
|
||||
matomo: {
|
||||
description: 'Collecting of visitor statistics',
|
||||
},
|
||||
camera: {
|
||||
description:
|
||||
'A surveillance camera (just an example for an IMG tag)',
|
||||
},
|
||||
cloudflare: {
|
||||
description: 'Protection against DDoS attacks',
|
||||
},
|
||||
intercom: {
|
||||
description:
|
||||
'Chat widget & collecting of visitor statistics (just an example)',
|
||||
},
|
||||
mouseflow: {
|
||||
description: 'Real-Time user analytics (just an example)',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web fonts hosted by Google',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Analytics',
|
||||
security: 'Security',
|
||||
livechat: 'Livechat',
|
||||
advertising: 'Advertising',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// This is a list of third-party services that Klaro will manage for you.
|
||||
services: [
|
||||
{
|
||||
name: 'twitter',
|
||||
default: false,
|
||||
contextualConsentOnly: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
name: 'youtube',
|
||||
default: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
// Each service should have a unique (and short) name.
|
||||
name: 'matomo',
|
||||
|
||||
// If "default" is set to true, the service will be enabled by default
|
||||
// Overwrites global "default" setting.
|
||||
// We recommend leaving this to "false" for services that collect
|
||||
// personal information.
|
||||
default: true,
|
||||
|
||||
// The title of you service as listed in the consent modal.
|
||||
title: 'Matomo/Piwik',
|
||||
|
||||
// The purpose(s) of this service. Will be listed on the consent notice.
|
||||
// Do not forget to add translations for all purposes you list here.
|
||||
purposes: ['analytics'],
|
||||
|
||||
// A list of regex expressions or strings giving the names of
|
||||
// cookies set by this service. If the user withdraws consent for a
|
||||
// given service, Klaro will then automatically delete all matching
|
||||
// cookies.
|
||||
cookies: [
|
||||
// you can also explicitly provide a path and a domain for
|
||||
// a given cookie. This is necessary if you have services that
|
||||
// set cookies for a path that is not "/" or a domain that
|
||||
// is not the current domain. If you do not set these values
|
||||
// properly, the cookie can't be deleted by Klaro
|
||||
// (there is no way to access the path or domain of a cookie in JS)
|
||||
// Notice that it is not possible to delete cookies that were set
|
||||
// on a third-party domain! See the note at mdn:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#new-cookie_domain
|
||||
[/^_pk_.*$/, '/', 'klaro.kiprotect.com'], //for the production version
|
||||
[/^_pk_.*$/, '/', 'localhost'], //for the local version
|
||||
'piwik_ignore',
|
||||
],
|
||||
|
||||
// An optional callback function that will be called each time
|
||||
// the consent state for the service changes (true=consented). Passes
|
||||
// the `service` config as the second parameter as well.
|
||||
callback: function(consent, service) {
|
||||
// This is an example callback function.
|
||||
console.log(
|
||||
'User consent for service ' + service.name + ': consent=' + consent
|
||||
);
|
||||
// To be used in conjunction with Matomo 'requireCookieConsent' Feature, Matomo 3.14.0 or newer
|
||||
// For further Information see https://matomo.org/faq/new-to-piwik/how-can-i-still-track-a-visitor-without-cookies-even-if-they-decline-the-cookie-consent/
|
||||
/*
|
||||
if(consent==true){
|
||||
_paq.push(['rememberCookieConsentGiven']);
|
||||
} else {
|
||||
_paq.push(['forgetCookieConsentGiven']);
|
||||
}
|
||||
*/
|
||||
},
|
||||
|
||||
// If "required" is set to true, Klaro will not allow this service to
|
||||
// be disabled by the user.
|
||||
required: false,
|
||||
|
||||
// If "optOut" is set to true, Klaro will load this service even before
|
||||
// the user gave explicit consent.
|
||||
// We recommend always leaving this "false".
|
||||
optOut: false,
|
||||
|
||||
// If "onlyOnce" is set to true, the service will only be executed
|
||||
// once regardless how often the user toggles it on and off.
|
||||
onlyOnce: true,
|
||||
},
|
||||
|
||||
// The services will appear in the modal in the same order as defined here.
|
||||
{
|
||||
name: 'inlineTracker',
|
||||
title: 'Inline Tracker',
|
||||
purposes: ['analytics'],
|
||||
cookies: ['inline-tracker'],
|
||||
optOut: false,
|
||||
},
|
||||
{
|
||||
name: 'externalTracker',
|
||||
title: 'External Tracker',
|
||||
purposes: ['analytics', 'security'],
|
||||
cookies: ['external-tracker'],
|
||||
},
|
||||
{
|
||||
name: 'intercom',
|
||||
title: 'Intercom',
|
||||
default: true,
|
||||
purposes: ['livechat'],
|
||||
},
|
||||
{
|
||||
name: 'mouseflow',
|
||||
title: 'Mouseflow',
|
||||
purposes: ['analytics'],
|
||||
},
|
||||
{
|
||||
name: 'adsense',
|
||||
// if you omit the title here Klaro will try to look it up in the
|
||||
// translations
|
||||
//title: 'Google AdSense',
|
||||
purposes: ['advertising'],
|
||||
},
|
||||
{
|
||||
name: 'camera',
|
||||
title: 'Surveillance Camera',
|
||||
purposes: ['security'],
|
||||
},
|
||||
/* {
|
||||
name: 'googleFonts',
|
||||
title: 'Google Fonts',
|
||||
purposes: ['styling'],
|
||||
},*/
|
||||
{
|
||||
name: 'cloudflare',
|
||||
title: 'Cloudflare',
|
||||
purposes: ['security'],
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'google-tag-manager',
|
||||
purposes: ['marketing'],
|
||||
onAccept: `
|
||||
// we notify the tag manager about all services that were accepted. You can define
|
||||
// a custom event in GTM to load the service if consent was given.
|
||||
for(let k of Object.keys(opts.consents)){
|
||||
if (opts.consents[k]){
|
||||
let eventName = 'klaro-'+k+'-accepted'
|
||||
dataLayer.push({'event': eventName})
|
||||
}
|
||||
}
|
||||
// if consent for Google Analytics was granted we enable analytics storage
|
||||
if (opts.consents[opts.vars.googleAnalyticsName || 'google-analytics']){
|
||||
console.log("Google analytics usage was granted")
|
||||
gtag('consent', 'update', {'analytics_storage': 'granted'})
|
||||
}
|
||||
// if consent for Google Ads was granted we enable ad storage
|
||||
if (opts.consents[opts.vars.adStorageName || 'google-ads']){
|
||||
console.log("Google ads usage was granted")
|
||||
gtag('consent', 'update', {'ad_storage': 'granted'})
|
||||
}
|
||||
`,
|
||||
onInit: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
onDecline: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
vars: {
|
||||
googleAnalytics: 'google-analytics'
|
||||
}
|
||||
},
|
||||
{
|
||||
// In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.
|
||||
name: 'google-analytics',
|
||||
purposes: ['marketing'],
|
||||
cookies: [
|
||||
/^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use
|
||||
],
|
||||
}
|
||||
],
|
||||
};
|
||||
+237
-237
@@ -1,238 +1,238 @@
|
||||
// By default, Klaro will load the config from a global "klaroConfig" variable.
|
||||
// You can change this by specifying the "data-config" attribute on your
|
||||
// script take, e.g. like this:
|
||||
// <script src="klaro.js" data-config="myConfigVariableName" />
|
||||
var klaroConfig = {
|
||||
// With the 0.7.0 release we introduce a 'version' paramter that will make
|
||||
// if easier for us to keep configuration files backwards-compatible in the future.
|
||||
version: 1,
|
||||
|
||||
// You can customize the ID of the DIV element that Klaro will create
|
||||
// when starting up. If undefined, Klaro will use 'klaro'.
|
||||
elementID: 'klaro',
|
||||
|
||||
// You can override CSS style variables here. For IE11, Klaro will
|
||||
// dynamically inject the variables into the CSS. If you still consider
|
||||
// supporting IE9-10 (which you probably shouldn't) you need to use Klaro
|
||||
// with an external stylesheet as the dynamic replacement won't work there.
|
||||
styling: {
|
||||
theme: ['light', 'top', 'wide'],
|
||||
},
|
||||
|
||||
// Setting this to true will keep Klaro from automatically loading itself
|
||||
// when the page is being loaded.
|
||||
noAutoLoad: false,
|
||||
|
||||
// Setting this to true will render the descriptions of the consent
|
||||
// modal and consent notice are HTML. Use with care.
|
||||
htmlTexts: true,
|
||||
|
||||
// Setting 'embedded' to true will render the Klaro modal and notice without
|
||||
// the modal background, allowing you to e.g. embed them into a specific element
|
||||
// of your website, such as your privacy notice.
|
||||
embedded: false,
|
||||
|
||||
// You can group services by their purpose in the modal. This is advisable
|
||||
// if you have a large number of services. Users can then enable or disable
|
||||
// entire groups of services instead of having to enable or disable every service.
|
||||
groupByPurpose: true,
|
||||
|
||||
// How Klaro should store the user's preferences. It can be either 'cookie'
|
||||
// (the default) or 'localStorage'.
|
||||
storageMethod: 'cookie',
|
||||
|
||||
// You can customize the name of the cookie that Klaro uses for storing
|
||||
// user consent decisions. If undefined, Klaro will use 'klaro'.
|
||||
cookieName: 'klaro',
|
||||
|
||||
// You can also set a custom expiration time for the Klaro cookie.
|
||||
// By default, it will expire after 120 days.
|
||||
cookieExpiresAfterDays: 365,
|
||||
|
||||
// You can change to cookie domain for the consent manager itself.
|
||||
// Use this if you want to get consent once for multiple matching domains.
|
||||
// If undefined, Klaro will use the current domain.
|
||||
//cookieDomain: '.github.com',
|
||||
|
||||
// You can change to cookie path for the consent manager itself.
|
||||
// Use this to restrict the cookie visibility to a specific path.
|
||||
// If undefined, Klaro will use '/' as cookie path.
|
||||
//cookiePath: '/',
|
||||
|
||||
// Defines the default state for services (true=enabled by default).
|
||||
default: false,
|
||||
|
||||
// If "mustConsent" is set to true, Klaro will directly display the consent
|
||||
// manager modal and not allow the user to close it before having actively
|
||||
// consented or declines the use of third-party services.
|
||||
mustConsent: true,
|
||||
|
||||
// Show "accept all" to accept all services instead of "ok" that only accepts
|
||||
// required and "default: true" services
|
||||
acceptAll: true,
|
||||
|
||||
// replace "decline" with cookie manager modal
|
||||
hideDeclineAll: true,
|
||||
|
||||
// hide "learnMore" link
|
||||
hideLearnMore: false,
|
||||
|
||||
// show cookie notice as modal
|
||||
noticeAsModal: false,
|
||||
|
||||
// You can also remove the 'Realized with Klaro!' text in the consent modal.
|
||||
// Please don't do this! We provide Klaro as a free open source tool.
|
||||
// Placing a link to our website helps us spread the word about it,
|
||||
// which ultimately enables us to make Klaro! better for everyone.
|
||||
// So please be fair and keep the link enabled. Thanks :)
|
||||
//disablePoweredBy: true,
|
||||
|
||||
// you can specify an additional class (or classes) that will be added to the Klaro `div`
|
||||
//additionalClass: 'my-klaro',
|
||||
|
||||
// You can define the UI language directly here. If undefined, Klaro will
|
||||
// use the value given in the global "lang" variable. If that does
|
||||
// not exist, it will use the value given in the "lang" attribute of your
|
||||
// HTML tag. If that also doesn't exist, it will use 'en'.
|
||||
lang: 'de',
|
||||
|
||||
// You can overwrite existing translations and add translations for your
|
||||
// service descriptions and purposes. See `src/translations/` for a full
|
||||
// list of translations that can be overwritten:
|
||||
// https://github.com/KIProtect/klaro/tree/master/src/translations
|
||||
|
||||
// Example config that shows how to overwrite translations:
|
||||
// https://github.com/KIProtect/klaro/blob/master/src/configs/i18n.js
|
||||
translations: {
|
||||
// translationsed defined under the 'zz' language code act as default
|
||||
// translations.
|
||||
zz: {
|
||||
privacyPolicyUrl: '/datenschutz',
|
||||
},
|
||||
// If you erase the "consentModal" translations, Klaro will use the
|
||||
// bundled translations.
|
||||
de: {
|
||||
privacyPolicyUrl: '/datenschutz',
|
||||
|
||||
consentModal: {
|
||||
title: '<u>Cookie Consent Tool</u>',
|
||||
description:
|
||||
'Wir verwenden Cookies um Inhalte und Funktionen für soziale Medien anbieten zu können und die Zugriffe auf unsere Website zu analysieren. Ich bin damit einverstanden und kann meine Einwilligung jederzeit mit Wirkung für die Zukunft widerrufen oder ändern.',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web-Schriftarten von Google gehostet',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Besucher-Statistiken',
|
||||
security: 'Sicherheit',
|
||||
livechat: 'Live Chat',
|
||||
advertising: 'Anzeigen von Werbung',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
en: {
|
||||
consentModal: {
|
||||
title: '<u>Cookie Consent Tool</u>',
|
||||
description:
|
||||
'We use cookies to provide content and social media features and to analyze traffic to our website. I agree to this and can revoke or change my consent at any time with effect for the future.',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web fonts hosted by Google',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Analytics',
|
||||
security: 'Security',
|
||||
livechat: 'Livechat',
|
||||
advertising: 'Advertising',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// This is a list of third-party services that Klaro will manage for you.
|
||||
services: [
|
||||
{
|
||||
name: 'twitter',
|
||||
default: true,
|
||||
contextualConsentOnly: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
name: 'youtube',
|
||||
default: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
name: 'doctolib',
|
||||
default: true,
|
||||
purposes: ['styling'],
|
||||
|
||||
cookies: [
|
||||
[/^__cf_bm.*$/, '/', '.doctolib.de'],
|
||||
[/^_doctolib_session.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^cookies.js.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^esid.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^temporary_appointment_id.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^_doctolib_session.*$/, '/', 'www.doctolib.de'],
|
||||
[/^ssid.*$/, '/', 'www.doctolib.de'],
|
||||
['temporary_appointment_id', '/', 'www.doctolib.de'],
|
||||
[/^_pk_.*$/, '/', 'klaro.kiprotect.com'], //for the production version
|
||||
[/^_pk_.*$/, '/', 'localhost'], //for the local version
|
||||
'piwik_ignore',
|
||||
|
||||
],
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'google-tag-manager',
|
||||
default: true,
|
||||
purposes: ['analytics'],
|
||||
onAccept: `
|
||||
// we notify the tag manager about all services that were accepted. You can define
|
||||
// a custom event in GTM to load the service if consent was given.
|
||||
for(let k of Object.keys(opts.consents)){
|
||||
if (opts.consents[k]){
|
||||
let eventName = 'klaro-'+k+'-accepted'
|
||||
dataLayer.push({'event': eventName})
|
||||
}
|
||||
}
|
||||
// if consent for Google Analytics was granted we enable analytics storage
|
||||
if (opts.consents[opts.vars.googleAnalyticsName || 'google-analytics']){
|
||||
console.log("Google analytics usage was granted")
|
||||
gtag('consent', 'update', {'analytics_storage': 'granted'})
|
||||
}
|
||||
// if consent for Google Ads was granted we enable ad storage
|
||||
if (opts.consents[opts.vars.adStorageName || 'google-ads']){
|
||||
console.log("Google ads usage was granted")
|
||||
gtag('consent', 'update', {'ad_storage': 'granted'})
|
||||
}
|
||||
`,
|
||||
onInit: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
onDecline: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
vars: {
|
||||
googleAnalytics: 'google-analytics'
|
||||
}
|
||||
},
|
||||
{
|
||||
// In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.
|
||||
default: true,
|
||||
name: 'google-analytics',
|
||||
purposes: ['analytics'],
|
||||
cookies: [
|
||||
/^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use
|
||||
],
|
||||
}
|
||||
],
|
||||
// By default, Klaro will load the config from a global "klaroConfig" variable.
|
||||
// You can change this by specifying the "data-config" attribute on your
|
||||
// script take, e.g. like this:
|
||||
// <script src="klaro.js" data-config="myConfigVariableName" />
|
||||
var klaroConfig = {
|
||||
// With the 0.7.0 release we introduce a 'version' paramter that will make
|
||||
// if easier for us to keep configuration files backwards-compatible in the future.
|
||||
version: 1,
|
||||
|
||||
// You can customize the ID of the DIV element that Klaro will create
|
||||
// when starting up. If undefined, Klaro will use 'klaro'.
|
||||
elementID: 'klaro',
|
||||
|
||||
// You can override CSS style variables here. For IE11, Klaro will
|
||||
// dynamically inject the variables into the CSS. If you still consider
|
||||
// supporting IE9-10 (which you probably shouldn't) you need to use Klaro
|
||||
// with an external stylesheet as the dynamic replacement won't work there.
|
||||
styling: {
|
||||
theme: ['light', 'top', 'wide'],
|
||||
},
|
||||
|
||||
// Setting this to true will keep Klaro from automatically loading itself
|
||||
// when the page is being loaded.
|
||||
noAutoLoad: false,
|
||||
|
||||
// Setting this to true will render the descriptions of the consent
|
||||
// modal and consent notice are HTML. Use with care.
|
||||
htmlTexts: true,
|
||||
|
||||
// Setting 'embedded' to true will render the Klaro modal and notice without
|
||||
// the modal background, allowing you to e.g. embed them into a specific element
|
||||
// of your website, such as your privacy notice.
|
||||
embedded: false,
|
||||
|
||||
// You can group services by their purpose in the modal. This is advisable
|
||||
// if you have a large number of services. Users can then enable or disable
|
||||
// entire groups of services instead of having to enable or disable every service.
|
||||
groupByPurpose: true,
|
||||
|
||||
// How Klaro should store the user's preferences. It can be either 'cookie'
|
||||
// (the default) or 'localStorage'.
|
||||
storageMethod: 'cookie',
|
||||
|
||||
// You can customize the name of the cookie that Klaro uses for storing
|
||||
// user consent decisions. If undefined, Klaro will use 'klaro'.
|
||||
cookieName: 'klaro',
|
||||
|
||||
// You can also set a custom expiration time for the Klaro cookie.
|
||||
// By default, it will expire after 120 days.
|
||||
cookieExpiresAfterDays: 365,
|
||||
|
||||
// You can change to cookie domain for the consent manager itself.
|
||||
// Use this if you want to get consent once for multiple matching domains.
|
||||
// If undefined, Klaro will use the current domain.
|
||||
//cookieDomain: '.github.com',
|
||||
|
||||
// You can change to cookie path for the consent manager itself.
|
||||
// Use this to restrict the cookie visibility to a specific path.
|
||||
// If undefined, Klaro will use '/' as cookie path.
|
||||
//cookiePath: '/',
|
||||
|
||||
// Defines the default state for services (true=enabled by default).
|
||||
default: false,
|
||||
|
||||
// If "mustConsent" is set to true, Klaro will directly display the consent
|
||||
// manager modal and not allow the user to close it before having actively
|
||||
// consented or declines the use of third-party services.
|
||||
mustConsent: true,
|
||||
|
||||
// Show "accept all" to accept all services instead of "ok" that only accepts
|
||||
// required and "default: true" services
|
||||
acceptAll: true,
|
||||
|
||||
// replace "decline" with cookie manager modal
|
||||
hideDeclineAll: true,
|
||||
|
||||
// hide "learnMore" link
|
||||
hideLearnMore: false,
|
||||
|
||||
// show cookie notice as modal
|
||||
noticeAsModal: false,
|
||||
|
||||
// You can also remove the 'Realized with Klaro!' text in the consent modal.
|
||||
// Please don't do this! We provide Klaro as a free open source tool.
|
||||
// Placing a link to our website helps us spread the word about it,
|
||||
// which ultimately enables us to make Klaro! better for everyone.
|
||||
// So please be fair and keep the link enabled. Thanks :)
|
||||
//disablePoweredBy: true,
|
||||
|
||||
// you can specify an additional class (or classes) that will be added to the Klaro `div`
|
||||
//additionalClass: 'my-klaro',
|
||||
|
||||
// You can define the UI language directly here. If undefined, Klaro will
|
||||
// use the value given in the global "lang" variable. If that does
|
||||
// not exist, it will use the value given in the "lang" attribute of your
|
||||
// HTML tag. If that also doesn't exist, it will use 'en'.
|
||||
lang: 'de',
|
||||
|
||||
// You can overwrite existing translations and add translations for your
|
||||
// service descriptions and purposes. See `src/translations/` for a full
|
||||
// list of translations that can be overwritten:
|
||||
// https://github.com/KIProtect/klaro/tree/master/src/translations
|
||||
|
||||
// Example config that shows how to overwrite translations:
|
||||
// https://github.com/KIProtect/klaro/blob/master/src/configs/i18n.js
|
||||
translations: {
|
||||
// translationsed defined under the 'zz' language code act as default
|
||||
// translations.
|
||||
zz: {
|
||||
privacyPolicyUrl: '/datenschutz',
|
||||
},
|
||||
// If you erase the "consentModal" translations, Klaro will use the
|
||||
// bundled translations.
|
||||
de: {
|
||||
privacyPolicyUrl: '/datenschutz',
|
||||
|
||||
consentModal: {
|
||||
title: '<u>Cookie Consent Tool</u>',
|
||||
description:
|
||||
'Wir verwenden Cookies um Inhalte und Funktionen für soziale Medien anbieten zu können und die Zugriffe auf unsere Website zu analysieren. Ich bin damit einverstanden und kann meine Einwilligung jederzeit mit Wirkung für die Zukunft widerrufen oder ändern.',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web-Schriftarten von Google gehostet',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Besucher-Statistiken',
|
||||
security: 'Sicherheit',
|
||||
livechat: 'Live Chat',
|
||||
advertising: 'Anzeigen von Werbung',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
en: {
|
||||
consentModal: {
|
||||
title: '<u>Cookie Consent Tool</u>',
|
||||
description:
|
||||
'We use cookies to provide content and social media features and to analyze traffic to our website. I agree to this and can revoke or change my consent at any time with effect for the future.',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web fonts hosted by Google',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Analytics',
|
||||
security: 'Security',
|
||||
livechat: 'Livechat',
|
||||
advertising: 'Advertising',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// This is a list of third-party services that Klaro will manage for you.
|
||||
services: [
|
||||
{
|
||||
name: 'twitter',
|
||||
default: true,
|
||||
contextualConsentOnly: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
name: 'youtube',
|
||||
default: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
name: 'doctolib',
|
||||
default: true,
|
||||
purposes: ['styling'],
|
||||
|
||||
cookies: [
|
||||
[/^__cf_bm.*$/, '/', '.doctolib.de'],
|
||||
[/^_doctolib_session.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^cookies.js.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^esid.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^temporary_appointment_id.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^_doctolib_session.*$/, '/', 'www.doctolib.de'],
|
||||
[/^ssid.*$/, '/', 'www.doctolib.de'],
|
||||
['temporary_appointment_id', '/', 'www.doctolib.de'],
|
||||
[/^_pk_.*$/, '/', 'klaro.kiprotect.com'], //for the production version
|
||||
[/^_pk_.*$/, '/', 'localhost'], //for the local version
|
||||
'piwik_ignore',
|
||||
|
||||
],
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'google-tag-manager',
|
||||
default: true,
|
||||
purposes: ['analytics'],
|
||||
onAccept: `
|
||||
// we notify the tag manager about all services that were accepted. You can define
|
||||
// a custom event in GTM to load the service if consent was given.
|
||||
for(let k of Object.keys(opts.consents)){
|
||||
if (opts.consents[k]){
|
||||
let eventName = 'klaro-'+k+'-accepted'
|
||||
dataLayer.push({'event': eventName})
|
||||
}
|
||||
}
|
||||
// if consent for Google Analytics was granted we enable analytics storage
|
||||
if (opts.consents[opts.vars.googleAnalyticsName || 'google-analytics']){
|
||||
console.log("Google analytics usage was granted")
|
||||
gtag('consent', 'update', {'analytics_storage': 'granted'})
|
||||
}
|
||||
// if consent for Google Ads was granted we enable ad storage
|
||||
if (opts.consents[opts.vars.adStorageName || 'google-ads']){
|
||||
console.log("Google ads usage was granted")
|
||||
gtag('consent', 'update', {'ad_storage': 'granted'})
|
||||
}
|
||||
`,
|
||||
onInit: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
onDecline: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
vars: {
|
||||
googleAnalytics: 'google-analytics'
|
||||
}
|
||||
},
|
||||
{
|
||||
// In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.
|
||||
default: true,
|
||||
name: 'google-analytics',
|
||||
purposes: ['analytics'],
|
||||
cookies: [
|
||||
/^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use
|
||||
],
|
||||
}
|
||||
],
|
||||
};
|
||||
+18
-18
@@ -1,19 +1,19 @@
|
||||
function zweitterminpruefen() {
|
||||
var e = document.getElementById("Terminzeitraum");
|
||||
var timeidjs = e.value;
|
||||
var e = document.getElementById("impfart");
|
||||
var impfart = e.value;
|
||||
if(impfart == 2){
|
||||
result = $.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: 'inc/zweittermin.php',
|
||||
data: ({
|
||||
timeid: timeidjs
|
||||
})
|
||||
}).responseText;
|
||||
|
||||
document.getElementById("Zweittermin").innerHTML = $result;
|
||||
}
|
||||
|
||||
function zweitterminpruefen() {
|
||||
var e = document.getElementById("Terminzeitraum");
|
||||
var timeidjs = e.value;
|
||||
var e = document.getElementById("impfart");
|
||||
var impfart = e.value;
|
||||
if(impfart == 2){
|
||||
result = $.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: 'inc/zweittermin.php',
|
||||
data: ({
|
||||
timeid: timeidjs
|
||||
})
|
||||
}).responseText;
|
||||
|
||||
document.getElementById("Zweittermin").innerHTML = $result;
|
||||
}
|
||||
|
||||
}
|
||||
+446
-446
File diff suppressed because one or more lines are too long
+371
-371
@@ -1,372 +1,372 @@
|
||||
// By default, Klaro will load the config from a global "klaroConfig" variable.
|
||||
// You can change this by specifying the "data-config" attribute on your
|
||||
// script take, e.g. like this:
|
||||
// <script src="klaro.js" data-config="myConfigVariableName" />
|
||||
var klaroConfig = {
|
||||
// With the 0.7.0 release we introduce a 'version' paramter that will make
|
||||
// if easier for us to keep configuration files backwards-compatible in the future.
|
||||
version: 1,
|
||||
|
||||
// You can customize the ID of the DIV element that Klaro will create
|
||||
// when starting up. If undefined, Klaro will use 'klaro'.
|
||||
elementID: 'klaro',
|
||||
|
||||
// You can override CSS style variables here. For IE11, Klaro will
|
||||
// dynamically inject the variables into the CSS. If you still consider
|
||||
// supporting IE9-10 (which you probably shouldn't) you need to use Klaro
|
||||
// with an external stylesheet as the dynamic replacement won't work there.
|
||||
styling: {
|
||||
theme: ['light', 'top', 'wide'],
|
||||
},
|
||||
|
||||
// Setting this to true will keep Klaro from automatically loading itself
|
||||
// when the page is being loaded.
|
||||
noAutoLoad: false,
|
||||
|
||||
// Setting this to true will render the descriptions of the consent
|
||||
// modal and consent notice are HTML. Use with care.
|
||||
htmlTexts: true,
|
||||
|
||||
// Setting 'embedded' to true will render the Klaro modal and notice without
|
||||
// the modal background, allowing you to e.g. embed them into a specific element
|
||||
// of your website, such as your privacy notice.
|
||||
embedded: false,
|
||||
|
||||
// You can group services by their purpose in the modal. This is advisable
|
||||
// if you have a large number of services. Users can then enable or disable
|
||||
// entire groups of services instead of having to enable or disable every service.
|
||||
groupByPurpose: true,
|
||||
|
||||
// How Klaro should store the user's preferences. It can be either 'cookie'
|
||||
// (the default) or 'localStorage'.
|
||||
storageMethod: 'cookie',
|
||||
|
||||
// You can customize the name of the cookie that Klaro uses for storing
|
||||
// user consent decisions. If undefined, Klaro will use 'klaro'.
|
||||
cookieName: 'klaro',
|
||||
|
||||
// You can also set a custom expiration time for the Klaro cookie.
|
||||
// By default, it will expire after 120 days.
|
||||
cookieExpiresAfterDays: 365,
|
||||
|
||||
// You can change to cookie domain for the consent manager itself.
|
||||
// Use this if you want to get consent once for multiple matching domains.
|
||||
// If undefined, Klaro will use the current domain.
|
||||
//cookieDomain: '.github.com',
|
||||
|
||||
// You can change to cookie path for the consent manager itself.
|
||||
// Use this to restrict the cookie visibility to a specific path.
|
||||
// If undefined, Klaro will use '/' as cookie path.
|
||||
//cookiePath: '/',
|
||||
|
||||
// Defines the default state for services (true=enabled by default).
|
||||
default: false,
|
||||
|
||||
// If "mustConsent" is set to true, Klaro will directly display the consent
|
||||
// manager modal and not allow the user to close it before having actively
|
||||
// consented or declines the use of third-party services.
|
||||
mustConsent: false,
|
||||
|
||||
// Show "accept all" to accept all services instead of "ok" that only accepts
|
||||
// required and "default: true" services
|
||||
acceptAll: true,
|
||||
|
||||
// replace "decline" with cookie manager modal
|
||||
hideDeclineAll: false,
|
||||
|
||||
// hide "learnMore" link
|
||||
hideLearnMore: false,
|
||||
|
||||
// show cookie notice as modal
|
||||
noticeAsModal: false,
|
||||
|
||||
// You can also remove the 'Realized with Klaro!' text in the consent modal.
|
||||
// Please don't do this! We provide Klaro as a free open source tool.
|
||||
// Placing a link to our website helps us spread the word about it,
|
||||
// which ultimately enables us to make Klaro! better for everyone.
|
||||
// So please be fair and keep the link enabled. Thanks :)
|
||||
//disablePoweredBy: true,
|
||||
|
||||
// you can specify an additional class (or classes) that will be added to the Klaro `div`
|
||||
//additionalClass: 'my-klaro',
|
||||
|
||||
// You can define the UI language directly here. If undefined, Klaro will
|
||||
// use the value given in the global "lang" variable. If that does
|
||||
// not exist, it will use the value given in the "lang" attribute of your
|
||||
// HTML tag. If that also doesn't exist, it will use 'en'.
|
||||
//lang: 'en',
|
||||
|
||||
// You can overwrite existing translations and add translations for your
|
||||
// service descriptions and purposes. See `src/translations/` for a full
|
||||
// list of translations that can be overwritten:
|
||||
// https://github.com/KIProtect/klaro/tree/master/src/translations
|
||||
|
||||
// Example config that shows how to overwrite translations:
|
||||
// https://github.com/KIProtect/klaro/blob/master/src/configs/i18n.js
|
||||
translations: {
|
||||
// translationsed defined under the 'zz' language code act as default
|
||||
// translations.
|
||||
zz: {
|
||||
privacyPolicyUrl: '/#privacy',
|
||||
},
|
||||
// If you erase the "consentModal" translations, Klaro will use the
|
||||
// bundled translations.
|
||||
de: {
|
||||
privacyPolicyUrl: '/#datenschutz',
|
||||
consentModal: {
|
||||
description:
|
||||
'Hier können Sie einsehen und anpassen, welche Information wir über Sie sammeln. Einträge die als "Beispiel" gekennzeichnet sind dienen lediglich zu Demonstrationszwecken und werden nicht wirklich verwendet.',
|
||||
},
|
||||
adsense: {
|
||||
description: 'Anzeigen von Werbeanzeigen (Beispiel)',
|
||||
title: 'Google AdSense Werbezeugs',
|
||||
},
|
||||
matomo: {
|
||||
description: 'Sammeln von Besucherstatistiken',
|
||||
},
|
||||
camera: {
|
||||
description:
|
||||
'Eine Überwachungskamera (nur ein Beispiel zu IMG-Tags)',
|
||||
},
|
||||
cloudflare: {
|
||||
description: 'Schutz gegen DDoS-Angriffe',
|
||||
},
|
||||
intercom: {
|
||||
description:
|
||||
'Chat Widget & Sammeln von Besucherstatistiken (nur ein Beispiel)',
|
||||
},
|
||||
mouseflow: {
|
||||
description: 'Echtzeit-Benutzeranalyse (nur ein Beispiel)',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web-Schriftarten von Google gehostet',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Besucher-Statistiken',
|
||||
security: 'Sicherheit',
|
||||
livechat: 'Live Chat',
|
||||
advertising: 'Anzeigen von Werbung',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
en: {
|
||||
consentModal: {
|
||||
title: '<u>test</u>',
|
||||
description:
|
||||
'Here you can see and customize the information that we collect about you. Entries marked as "Example" are just for demonstration purposes and are not really used on this website.',
|
||||
},
|
||||
adsense: {
|
||||
description: 'Displaying of advertisements (just an example)',
|
||||
title: 'Google Adsense Advertisement',
|
||||
},
|
||||
matomo: {
|
||||
description: 'Collecting of visitor statistics',
|
||||
},
|
||||
camera: {
|
||||
description:
|
||||
'A surveillance camera (just an example for an IMG tag)',
|
||||
},
|
||||
cloudflare: {
|
||||
description: 'Protection against DDoS attacks',
|
||||
},
|
||||
intercom: {
|
||||
description:
|
||||
'Chat widget & collecting of visitor statistics (just an example)',
|
||||
},
|
||||
mouseflow: {
|
||||
description: 'Real-Time user analytics (just an example)',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web fonts hosted by Google',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Analytics',
|
||||
security: 'Security',
|
||||
livechat: 'Livechat',
|
||||
advertising: 'Advertising',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// This is a list of third-party services that Klaro will manage for you.
|
||||
services: [
|
||||
{
|
||||
name: 'twitter',
|
||||
default: false,
|
||||
contextualConsentOnly: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
name: 'youtube',
|
||||
default: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
// Each service should have a unique (and short) name.
|
||||
name: 'matomo',
|
||||
|
||||
// If "default" is set to true, the service will be enabled by default
|
||||
// Overwrites global "default" setting.
|
||||
// We recommend leaving this to "false" for services that collect
|
||||
// personal information.
|
||||
default: true,
|
||||
|
||||
// The title of you service as listed in the consent modal.
|
||||
title: 'Matomo/Piwik',
|
||||
|
||||
// The purpose(s) of this service. Will be listed on the consent notice.
|
||||
// Do not forget to add translations for all purposes you list here.
|
||||
purposes: ['analytics'],
|
||||
|
||||
// A list of regex expressions or strings giving the names of
|
||||
// cookies set by this service. If the user withdraws consent for a
|
||||
// given service, Klaro will then automatically delete all matching
|
||||
// cookies.
|
||||
cookies: [
|
||||
// you can also explicitly provide a path and a domain for
|
||||
// a given cookie. This is necessary if you have services that
|
||||
// set cookies for a path that is not "/" or a domain that
|
||||
// is not the current domain. If you do not set these values
|
||||
// properly, the cookie can't be deleted by Klaro
|
||||
// (there is no way to access the path or domain of a cookie in JS)
|
||||
// Notice that it is not possible to delete cookies that were set
|
||||
// on a third-party domain! See the note at mdn:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#new-cookie_domain
|
||||
[/^_pk_.*$/, '/', 'klaro.kiprotect.com'], //for the production version
|
||||
[/^_pk_.*$/, '/', 'localhost'], //for the local version
|
||||
'piwik_ignore',
|
||||
],
|
||||
|
||||
// An optional callback function that will be called each time
|
||||
// the consent state for the service changes (true=consented). Passes
|
||||
// the `service` config as the second parameter as well.
|
||||
callback: function(consent, service) {
|
||||
// This is an example callback function.
|
||||
console.log(
|
||||
'User consent for service ' + service.name + ': consent=' + consent
|
||||
);
|
||||
// To be used in conjunction with Matomo 'requireCookieConsent' Feature, Matomo 3.14.0 or newer
|
||||
// For further Information see https://matomo.org/faq/new-to-piwik/how-can-i-still-track-a-visitor-without-cookies-even-if-they-decline-the-cookie-consent/
|
||||
/*
|
||||
if(consent==true){
|
||||
_paq.push(['rememberCookieConsentGiven']);
|
||||
} else {
|
||||
_paq.push(['forgetCookieConsentGiven']);
|
||||
}
|
||||
*/
|
||||
},
|
||||
|
||||
// If "required" is set to true, Klaro will not allow this service to
|
||||
// be disabled by the user.
|
||||
required: false,
|
||||
|
||||
// If "optOut" is set to true, Klaro will load this service even before
|
||||
// the user gave explicit consent.
|
||||
// We recommend always leaving this "false".
|
||||
optOut: false,
|
||||
|
||||
// If "onlyOnce" is set to true, the service will only be executed
|
||||
// once regardless how often the user toggles it on and off.
|
||||
onlyOnce: true,
|
||||
},
|
||||
|
||||
// The services will appear in the modal in the same order as defined here.
|
||||
{
|
||||
name: 'inlineTracker',
|
||||
title: 'Inline Tracker',
|
||||
purposes: ['analytics'],
|
||||
cookies: ['inline-tracker'],
|
||||
optOut: false,
|
||||
},
|
||||
{
|
||||
name: 'externalTracker',
|
||||
title: 'External Tracker',
|
||||
purposes: ['analytics', 'security'],
|
||||
cookies: ['external-tracker'],
|
||||
},
|
||||
{
|
||||
name: 'intercom',
|
||||
title: 'Intercom',
|
||||
default: true,
|
||||
purposes: ['livechat'],
|
||||
},
|
||||
{
|
||||
name: 'mouseflow',
|
||||
title: 'Mouseflow',
|
||||
purposes: ['analytics'],
|
||||
},
|
||||
{
|
||||
name: 'adsense',
|
||||
// if you omit the title here Klaro will try to look it up in the
|
||||
// translations
|
||||
//title: 'Google AdSense',
|
||||
purposes: ['advertising'],
|
||||
},
|
||||
{
|
||||
name: 'camera',
|
||||
title: 'Surveillance Camera',
|
||||
purposes: ['security'],
|
||||
},
|
||||
/* {
|
||||
name: 'googleFonts',
|
||||
title: 'Google Fonts',
|
||||
purposes: ['styling'],
|
||||
},*/
|
||||
{
|
||||
name: 'cloudflare',
|
||||
title: 'Cloudflare',
|
||||
purposes: ['security'],
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'google-tag-manager',
|
||||
purposes: ['marketing'],
|
||||
onAccept: `
|
||||
// we notify the tag manager about all services that were accepted. You can define
|
||||
// a custom event in GTM to load the service if consent was given.
|
||||
for(let k of Object.keys(opts.consents)){
|
||||
if (opts.consents[k]){
|
||||
let eventName = 'klaro-'+k+'-accepted'
|
||||
dataLayer.push({'event': eventName})
|
||||
}
|
||||
}
|
||||
// if consent for Google Analytics was granted we enable analytics storage
|
||||
if (opts.consents[opts.vars.googleAnalyticsName || 'google-analytics']){
|
||||
console.log("Google analytics usage was granted")
|
||||
gtag('consent', 'update', {'analytics_storage': 'granted'})
|
||||
}
|
||||
// if consent for Google Ads was granted we enable ad storage
|
||||
if (opts.consents[opts.vars.adStorageName || 'google-ads']){
|
||||
console.log("Google ads usage was granted")
|
||||
gtag('consent', 'update', {'ad_storage': 'granted'})
|
||||
}
|
||||
`,
|
||||
onInit: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
onDecline: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
vars: {
|
||||
googleAnalytics: 'google-analytics'
|
||||
}
|
||||
},
|
||||
{
|
||||
// In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.
|
||||
name: 'google-analytics',
|
||||
purposes: ['marketing'],
|
||||
cookies: [
|
||||
/^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use
|
||||
],
|
||||
}
|
||||
],
|
||||
// By default, Klaro will load the config from a global "klaroConfig" variable.
|
||||
// You can change this by specifying the "data-config" attribute on your
|
||||
// script take, e.g. like this:
|
||||
// <script src="klaro.js" data-config="myConfigVariableName" />
|
||||
var klaroConfig = {
|
||||
// With the 0.7.0 release we introduce a 'version' paramter that will make
|
||||
// if easier for us to keep configuration files backwards-compatible in the future.
|
||||
version: 1,
|
||||
|
||||
// You can customize the ID of the DIV element that Klaro will create
|
||||
// when starting up. If undefined, Klaro will use 'klaro'.
|
||||
elementID: 'klaro',
|
||||
|
||||
// You can override CSS style variables here. For IE11, Klaro will
|
||||
// dynamically inject the variables into the CSS. If you still consider
|
||||
// supporting IE9-10 (which you probably shouldn't) you need to use Klaro
|
||||
// with an external stylesheet as the dynamic replacement won't work there.
|
||||
styling: {
|
||||
theme: ['light', 'top', 'wide'],
|
||||
},
|
||||
|
||||
// Setting this to true will keep Klaro from automatically loading itself
|
||||
// when the page is being loaded.
|
||||
noAutoLoad: false,
|
||||
|
||||
// Setting this to true will render the descriptions of the consent
|
||||
// modal and consent notice are HTML. Use with care.
|
||||
htmlTexts: true,
|
||||
|
||||
// Setting 'embedded' to true will render the Klaro modal and notice without
|
||||
// the modal background, allowing you to e.g. embed them into a specific element
|
||||
// of your website, such as your privacy notice.
|
||||
embedded: false,
|
||||
|
||||
// You can group services by their purpose in the modal. This is advisable
|
||||
// if you have a large number of services. Users can then enable or disable
|
||||
// entire groups of services instead of having to enable or disable every service.
|
||||
groupByPurpose: true,
|
||||
|
||||
// How Klaro should store the user's preferences. It can be either 'cookie'
|
||||
// (the default) or 'localStorage'.
|
||||
storageMethod: 'cookie',
|
||||
|
||||
// You can customize the name of the cookie that Klaro uses for storing
|
||||
// user consent decisions. If undefined, Klaro will use 'klaro'.
|
||||
cookieName: 'klaro',
|
||||
|
||||
// You can also set a custom expiration time for the Klaro cookie.
|
||||
// By default, it will expire after 120 days.
|
||||
cookieExpiresAfterDays: 365,
|
||||
|
||||
// You can change to cookie domain for the consent manager itself.
|
||||
// Use this if you want to get consent once for multiple matching domains.
|
||||
// If undefined, Klaro will use the current domain.
|
||||
//cookieDomain: '.github.com',
|
||||
|
||||
// You can change to cookie path for the consent manager itself.
|
||||
// Use this to restrict the cookie visibility to a specific path.
|
||||
// If undefined, Klaro will use '/' as cookie path.
|
||||
//cookiePath: '/',
|
||||
|
||||
// Defines the default state for services (true=enabled by default).
|
||||
default: false,
|
||||
|
||||
// If "mustConsent" is set to true, Klaro will directly display the consent
|
||||
// manager modal and not allow the user to close it before having actively
|
||||
// consented or declines the use of third-party services.
|
||||
mustConsent: false,
|
||||
|
||||
// Show "accept all" to accept all services instead of "ok" that only accepts
|
||||
// required and "default: true" services
|
||||
acceptAll: true,
|
||||
|
||||
// replace "decline" with cookie manager modal
|
||||
hideDeclineAll: false,
|
||||
|
||||
// hide "learnMore" link
|
||||
hideLearnMore: false,
|
||||
|
||||
// show cookie notice as modal
|
||||
noticeAsModal: false,
|
||||
|
||||
// You can also remove the 'Realized with Klaro!' text in the consent modal.
|
||||
// Please don't do this! We provide Klaro as a free open source tool.
|
||||
// Placing a link to our website helps us spread the word about it,
|
||||
// which ultimately enables us to make Klaro! better for everyone.
|
||||
// So please be fair and keep the link enabled. Thanks :)
|
||||
//disablePoweredBy: true,
|
||||
|
||||
// you can specify an additional class (or classes) that will be added to the Klaro `div`
|
||||
//additionalClass: 'my-klaro',
|
||||
|
||||
// You can define the UI language directly here. If undefined, Klaro will
|
||||
// use the value given in the global "lang" variable. If that does
|
||||
// not exist, it will use the value given in the "lang" attribute of your
|
||||
// HTML tag. If that also doesn't exist, it will use 'en'.
|
||||
//lang: 'en',
|
||||
|
||||
// You can overwrite existing translations and add translations for your
|
||||
// service descriptions and purposes. See `src/translations/` for a full
|
||||
// list of translations that can be overwritten:
|
||||
// https://github.com/KIProtect/klaro/tree/master/src/translations
|
||||
|
||||
// Example config that shows how to overwrite translations:
|
||||
// https://github.com/KIProtect/klaro/blob/master/src/configs/i18n.js
|
||||
translations: {
|
||||
// translationsed defined under the 'zz' language code act as default
|
||||
// translations.
|
||||
zz: {
|
||||
privacyPolicyUrl: '/#privacy',
|
||||
},
|
||||
// If you erase the "consentModal" translations, Klaro will use the
|
||||
// bundled translations.
|
||||
de: {
|
||||
privacyPolicyUrl: '/#datenschutz',
|
||||
consentModal: {
|
||||
description:
|
||||
'Hier können Sie einsehen und anpassen, welche Information wir über Sie sammeln. Einträge die als "Beispiel" gekennzeichnet sind dienen lediglich zu Demonstrationszwecken und werden nicht wirklich verwendet.',
|
||||
},
|
||||
adsense: {
|
||||
description: 'Anzeigen von Werbeanzeigen (Beispiel)',
|
||||
title: 'Google AdSense Werbezeugs',
|
||||
},
|
||||
matomo: {
|
||||
description: 'Sammeln von Besucherstatistiken',
|
||||
},
|
||||
camera: {
|
||||
description:
|
||||
'Eine Überwachungskamera (nur ein Beispiel zu IMG-Tags)',
|
||||
},
|
||||
cloudflare: {
|
||||
description: 'Schutz gegen DDoS-Angriffe',
|
||||
},
|
||||
intercom: {
|
||||
description:
|
||||
'Chat Widget & Sammeln von Besucherstatistiken (nur ein Beispiel)',
|
||||
},
|
||||
mouseflow: {
|
||||
description: 'Echtzeit-Benutzeranalyse (nur ein Beispiel)',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web-Schriftarten von Google gehostet',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Besucher-Statistiken',
|
||||
security: 'Sicherheit',
|
||||
livechat: 'Live Chat',
|
||||
advertising: 'Anzeigen von Werbung',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
en: {
|
||||
consentModal: {
|
||||
title: '<u>test</u>',
|
||||
description:
|
||||
'Here you can see and customize the information that we collect about you. Entries marked as "Example" are just for demonstration purposes and are not really used on this website.',
|
||||
},
|
||||
adsense: {
|
||||
description: 'Displaying of advertisements (just an example)',
|
||||
title: 'Google Adsense Advertisement',
|
||||
},
|
||||
matomo: {
|
||||
description: 'Collecting of visitor statistics',
|
||||
},
|
||||
camera: {
|
||||
description:
|
||||
'A surveillance camera (just an example for an IMG tag)',
|
||||
},
|
||||
cloudflare: {
|
||||
description: 'Protection against DDoS attacks',
|
||||
},
|
||||
intercom: {
|
||||
description:
|
||||
'Chat widget & collecting of visitor statistics (just an example)',
|
||||
},
|
||||
mouseflow: {
|
||||
description: 'Real-Time user analytics (just an example)',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web fonts hosted by Google',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Analytics',
|
||||
security: 'Security',
|
||||
livechat: 'Livechat',
|
||||
advertising: 'Advertising',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// This is a list of third-party services that Klaro will manage for you.
|
||||
services: [
|
||||
{
|
||||
name: 'twitter',
|
||||
default: false,
|
||||
contextualConsentOnly: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
name: 'youtube',
|
||||
default: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
// Each service should have a unique (and short) name.
|
||||
name: 'matomo',
|
||||
|
||||
// If "default" is set to true, the service will be enabled by default
|
||||
// Overwrites global "default" setting.
|
||||
// We recommend leaving this to "false" for services that collect
|
||||
// personal information.
|
||||
default: true,
|
||||
|
||||
// The title of you service as listed in the consent modal.
|
||||
title: 'Matomo/Piwik',
|
||||
|
||||
// The purpose(s) of this service. Will be listed on the consent notice.
|
||||
// Do not forget to add translations for all purposes you list here.
|
||||
purposes: ['analytics'],
|
||||
|
||||
// A list of regex expressions or strings giving the names of
|
||||
// cookies set by this service. If the user withdraws consent for a
|
||||
// given service, Klaro will then automatically delete all matching
|
||||
// cookies.
|
||||
cookies: [
|
||||
// you can also explicitly provide a path and a domain for
|
||||
// a given cookie. This is necessary if you have services that
|
||||
// set cookies for a path that is not "/" or a domain that
|
||||
// is not the current domain. If you do not set these values
|
||||
// properly, the cookie can't be deleted by Klaro
|
||||
// (there is no way to access the path or domain of a cookie in JS)
|
||||
// Notice that it is not possible to delete cookies that were set
|
||||
// on a third-party domain! See the note at mdn:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#new-cookie_domain
|
||||
[/^_pk_.*$/, '/', 'klaro.kiprotect.com'], //for the production version
|
||||
[/^_pk_.*$/, '/', 'localhost'], //for the local version
|
||||
'piwik_ignore',
|
||||
],
|
||||
|
||||
// An optional callback function that will be called each time
|
||||
// the consent state for the service changes (true=consented). Passes
|
||||
// the `service` config as the second parameter as well.
|
||||
callback: function(consent, service) {
|
||||
// This is an example callback function.
|
||||
console.log(
|
||||
'User consent for service ' + service.name + ': consent=' + consent
|
||||
);
|
||||
// To be used in conjunction with Matomo 'requireCookieConsent' Feature, Matomo 3.14.0 or newer
|
||||
// For further Information see https://matomo.org/faq/new-to-piwik/how-can-i-still-track-a-visitor-without-cookies-even-if-they-decline-the-cookie-consent/
|
||||
/*
|
||||
if(consent==true){
|
||||
_paq.push(['rememberCookieConsentGiven']);
|
||||
} else {
|
||||
_paq.push(['forgetCookieConsentGiven']);
|
||||
}
|
||||
*/
|
||||
},
|
||||
|
||||
// If "required" is set to true, Klaro will not allow this service to
|
||||
// be disabled by the user.
|
||||
required: false,
|
||||
|
||||
// If "optOut" is set to true, Klaro will load this service even before
|
||||
// the user gave explicit consent.
|
||||
// We recommend always leaving this "false".
|
||||
optOut: false,
|
||||
|
||||
// If "onlyOnce" is set to true, the service will only be executed
|
||||
// once regardless how often the user toggles it on and off.
|
||||
onlyOnce: true,
|
||||
},
|
||||
|
||||
// The services will appear in the modal in the same order as defined here.
|
||||
{
|
||||
name: 'inlineTracker',
|
||||
title: 'Inline Tracker',
|
||||
purposes: ['analytics'],
|
||||
cookies: ['inline-tracker'],
|
||||
optOut: false,
|
||||
},
|
||||
{
|
||||
name: 'externalTracker',
|
||||
title: 'External Tracker',
|
||||
purposes: ['analytics', 'security'],
|
||||
cookies: ['external-tracker'],
|
||||
},
|
||||
{
|
||||
name: 'intercom',
|
||||
title: 'Intercom',
|
||||
default: true,
|
||||
purposes: ['livechat'],
|
||||
},
|
||||
{
|
||||
name: 'mouseflow',
|
||||
title: 'Mouseflow',
|
||||
purposes: ['analytics'],
|
||||
},
|
||||
{
|
||||
name: 'adsense',
|
||||
// if you omit the title here Klaro will try to look it up in the
|
||||
// translations
|
||||
//title: 'Google AdSense',
|
||||
purposes: ['advertising'],
|
||||
},
|
||||
{
|
||||
name: 'camera',
|
||||
title: 'Surveillance Camera',
|
||||
purposes: ['security'],
|
||||
},
|
||||
/* {
|
||||
name: 'googleFonts',
|
||||
title: 'Google Fonts',
|
||||
purposes: ['styling'],
|
||||
},*/
|
||||
{
|
||||
name: 'cloudflare',
|
||||
title: 'Cloudflare',
|
||||
purposes: ['security'],
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'google-tag-manager',
|
||||
purposes: ['marketing'],
|
||||
onAccept: `
|
||||
// we notify the tag manager about all services that were accepted. You can define
|
||||
// a custom event in GTM to load the service if consent was given.
|
||||
for(let k of Object.keys(opts.consents)){
|
||||
if (opts.consents[k]){
|
||||
let eventName = 'klaro-'+k+'-accepted'
|
||||
dataLayer.push({'event': eventName})
|
||||
}
|
||||
}
|
||||
// if consent for Google Analytics was granted we enable analytics storage
|
||||
if (opts.consents[opts.vars.googleAnalyticsName || 'google-analytics']){
|
||||
console.log("Google analytics usage was granted")
|
||||
gtag('consent', 'update', {'analytics_storage': 'granted'})
|
||||
}
|
||||
// if consent for Google Ads was granted we enable ad storage
|
||||
if (opts.consents[opts.vars.adStorageName || 'google-ads']){
|
||||
console.log("Google ads usage was granted")
|
||||
gtag('consent', 'update', {'ad_storage': 'granted'})
|
||||
}
|
||||
`,
|
||||
onInit: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
onDecline: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
vars: {
|
||||
googleAnalytics: 'google-analytics'
|
||||
}
|
||||
},
|
||||
{
|
||||
// In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.
|
||||
name: 'google-analytics',
|
||||
purposes: ['marketing'],
|
||||
cookies: [
|
||||
/^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use
|
||||
],
|
||||
}
|
||||
],
|
||||
};
|
||||
+237
-237
@@ -1,238 +1,238 @@
|
||||
// By default, Klaro will load the config from a global "klaroConfig" variable.
|
||||
// You can change this by specifying the "data-config" attribute on your
|
||||
// script take, e.g. like this:
|
||||
// <script src="klaro.js" data-config="myConfigVariableName" />
|
||||
var klaroConfig = {
|
||||
// With the 0.7.0 release we introduce a 'version' paramter that will make
|
||||
// if easier for us to keep configuration files backwards-compatible in the future.
|
||||
version: 1,
|
||||
|
||||
// You can customize the ID of the DIV element that Klaro will create
|
||||
// when starting up. If undefined, Klaro will use 'klaro'.
|
||||
elementID: 'klaro',
|
||||
|
||||
// You can override CSS style variables here. For IE11, Klaro will
|
||||
// dynamically inject the variables into the CSS. If you still consider
|
||||
// supporting IE9-10 (which you probably shouldn't) you need to use Klaro
|
||||
// with an external stylesheet as the dynamic replacement won't work there.
|
||||
styling: {
|
||||
theme: ['light', 'top', 'wide'],
|
||||
},
|
||||
|
||||
// Setting this to true will keep Klaro from automatically loading itself
|
||||
// when the page is being loaded.
|
||||
noAutoLoad: false,
|
||||
|
||||
// Setting this to true will render the descriptions of the consent
|
||||
// modal and consent notice are HTML. Use with care.
|
||||
htmlTexts: true,
|
||||
|
||||
// Setting 'embedded' to true will render the Klaro modal and notice without
|
||||
// the modal background, allowing you to e.g. embed them into a specific element
|
||||
// of your website, such as your privacy notice.
|
||||
embedded: false,
|
||||
|
||||
// You can group services by their purpose in the modal. This is advisable
|
||||
// if you have a large number of services. Users can then enable or disable
|
||||
// entire groups of services instead of having to enable or disable every service.
|
||||
groupByPurpose: true,
|
||||
|
||||
// How Klaro should store the user's preferences. It can be either 'cookie'
|
||||
// (the default) or 'localStorage'.
|
||||
storageMethod: 'cookie',
|
||||
|
||||
// You can customize the name of the cookie that Klaro uses for storing
|
||||
// user consent decisions. If undefined, Klaro will use 'klaro'.
|
||||
cookieName: 'klaro',
|
||||
|
||||
// You can also set a custom expiration time for the Klaro cookie.
|
||||
// By default, it will expire after 120 days.
|
||||
cookieExpiresAfterDays: 365,
|
||||
|
||||
// You can change to cookie domain for the consent manager itself.
|
||||
// Use this if you want to get consent once for multiple matching domains.
|
||||
// If undefined, Klaro will use the current domain.
|
||||
//cookieDomain: '.github.com',
|
||||
|
||||
// You can change to cookie path for the consent manager itself.
|
||||
// Use this to restrict the cookie visibility to a specific path.
|
||||
// If undefined, Klaro will use '/' as cookie path.
|
||||
//cookiePath: '/',
|
||||
|
||||
// Defines the default state for services (true=enabled by default).
|
||||
default: false,
|
||||
|
||||
// If "mustConsent" is set to true, Klaro will directly display the consent
|
||||
// manager modal and not allow the user to close it before having actively
|
||||
// consented or declines the use of third-party services.
|
||||
mustConsent: true,
|
||||
|
||||
// Show "accept all" to accept all services instead of "ok" that only accepts
|
||||
// required and "default: true" services
|
||||
acceptAll: true,
|
||||
|
||||
// replace "decline" with cookie manager modal
|
||||
hideDeclineAll: true,
|
||||
|
||||
// hide "learnMore" link
|
||||
hideLearnMore: false,
|
||||
|
||||
// show cookie notice as modal
|
||||
noticeAsModal: false,
|
||||
|
||||
// You can also remove the 'Realized with Klaro!' text in the consent modal.
|
||||
// Please don't do this! We provide Klaro as a free open source tool.
|
||||
// Placing a link to our website helps us spread the word about it,
|
||||
// which ultimately enables us to make Klaro! better for everyone.
|
||||
// So please be fair and keep the link enabled. Thanks :)
|
||||
//disablePoweredBy: true,
|
||||
|
||||
// you can specify an additional class (or classes) that will be added to the Klaro `div`
|
||||
//additionalClass: 'my-klaro',
|
||||
|
||||
// You can define the UI language directly here. If undefined, Klaro will
|
||||
// use the value given in the global "lang" variable. If that does
|
||||
// not exist, it will use the value given in the "lang" attribute of your
|
||||
// HTML tag. If that also doesn't exist, it will use 'en'.
|
||||
lang: 'de',
|
||||
|
||||
// You can overwrite existing translations and add translations for your
|
||||
// service descriptions and purposes. See `src/translations/` for a full
|
||||
// list of translations that can be overwritten:
|
||||
// https://github.com/KIProtect/klaro/tree/master/src/translations
|
||||
|
||||
// Example config that shows how to overwrite translations:
|
||||
// https://github.com/KIProtect/klaro/blob/master/src/configs/i18n.js
|
||||
translations: {
|
||||
// translationsed defined under the 'zz' language code act as default
|
||||
// translations.
|
||||
zz: {
|
||||
privacyPolicyUrl: '/datenschutz',
|
||||
},
|
||||
// If you erase the "consentModal" translations, Klaro will use the
|
||||
// bundled translations.
|
||||
de: {
|
||||
privacyPolicyUrl: '/datenschutz',
|
||||
|
||||
consentModal: {
|
||||
title: '<u>Cookie Consent Tool</u>',
|
||||
description:
|
||||
'Wir verwenden Cookies um Inhalte und Funktionen für soziale Medien anbieten zu können und die Zugriffe auf unsere Website zu analysieren. Ich bin damit einverstanden und kann meine Einwilligung jederzeit mit Wirkung für die Zukunft widerrufen oder ändern.',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web-Schriftarten von Google gehostet',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Besucher-Statistiken',
|
||||
security: 'Sicherheit',
|
||||
livechat: 'Live Chat',
|
||||
advertising: 'Anzeigen von Werbung',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
en: {
|
||||
consentModal: {
|
||||
title: '<u>Cookie Consent Tool</u>',
|
||||
description:
|
||||
'We use cookies to provide content and social media features and to analyze traffic to our website. I agree to this and can revoke or change my consent at any time with effect for the future.',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web fonts hosted by Google',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Analytics',
|
||||
security: 'Security',
|
||||
livechat: 'Livechat',
|
||||
advertising: 'Advertising',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// This is a list of third-party services that Klaro will manage for you.
|
||||
services: [
|
||||
{
|
||||
name: 'twitter',
|
||||
default: true,
|
||||
contextualConsentOnly: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
name: 'youtube',
|
||||
default: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
name: 'doctolib',
|
||||
default: true,
|
||||
purposes: ['styling'],
|
||||
|
||||
cookies: [
|
||||
[/^__cf_bm.*$/, '/', '.doctolib.de'],
|
||||
[/^_doctolib_session.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^cookies.js.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^esid.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^temporary_appointment_id.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^_doctolib_session.*$/, '/', 'www.doctolib.de'],
|
||||
[/^ssid.*$/, '/', 'www.doctolib.de'],
|
||||
['temporary_appointment_id', '/', 'www.doctolib.de'],
|
||||
[/^_pk_.*$/, '/', 'klaro.kiprotect.com'], //for the production version
|
||||
[/^_pk_.*$/, '/', 'localhost'], //for the local version
|
||||
'piwik_ignore',
|
||||
|
||||
],
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'google-tag-manager',
|
||||
default: true,
|
||||
purposes: ['analytics'],
|
||||
onAccept: `
|
||||
// we notify the tag manager about all services that were accepted. You can define
|
||||
// a custom event in GTM to load the service if consent was given.
|
||||
for(let k of Object.keys(opts.consents)){
|
||||
if (opts.consents[k]){
|
||||
let eventName = 'klaro-'+k+'-accepted'
|
||||
dataLayer.push({'event': eventName})
|
||||
}
|
||||
}
|
||||
// if consent for Google Analytics was granted we enable analytics storage
|
||||
if (opts.consents[opts.vars.googleAnalyticsName || 'google-analytics']){
|
||||
console.log("Google analytics usage was granted")
|
||||
gtag('consent', 'update', {'analytics_storage': 'granted'})
|
||||
}
|
||||
// if consent for Google Ads was granted we enable ad storage
|
||||
if (opts.consents[opts.vars.adStorageName || 'google-ads']){
|
||||
console.log("Google ads usage was granted")
|
||||
gtag('consent', 'update', {'ad_storage': 'granted'})
|
||||
}
|
||||
`,
|
||||
onInit: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
onDecline: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
vars: {
|
||||
googleAnalytics: 'google-analytics'
|
||||
}
|
||||
},
|
||||
{
|
||||
// In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.
|
||||
default: true,
|
||||
name: 'google-analytics',
|
||||
purposes: ['analytics'],
|
||||
cookies: [
|
||||
/^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use
|
||||
],
|
||||
}
|
||||
],
|
||||
// By default, Klaro will load the config from a global "klaroConfig" variable.
|
||||
// You can change this by specifying the "data-config" attribute on your
|
||||
// script take, e.g. like this:
|
||||
// <script src="klaro.js" data-config="myConfigVariableName" />
|
||||
var klaroConfig = {
|
||||
// With the 0.7.0 release we introduce a 'version' paramter that will make
|
||||
// if easier for us to keep configuration files backwards-compatible in the future.
|
||||
version: 1,
|
||||
|
||||
// You can customize the ID of the DIV element that Klaro will create
|
||||
// when starting up. If undefined, Klaro will use 'klaro'.
|
||||
elementID: 'klaro',
|
||||
|
||||
// You can override CSS style variables here. For IE11, Klaro will
|
||||
// dynamically inject the variables into the CSS. If you still consider
|
||||
// supporting IE9-10 (which you probably shouldn't) you need to use Klaro
|
||||
// with an external stylesheet as the dynamic replacement won't work there.
|
||||
styling: {
|
||||
theme: ['light', 'top', 'wide'],
|
||||
},
|
||||
|
||||
// Setting this to true will keep Klaro from automatically loading itself
|
||||
// when the page is being loaded.
|
||||
noAutoLoad: false,
|
||||
|
||||
// Setting this to true will render the descriptions of the consent
|
||||
// modal and consent notice are HTML. Use with care.
|
||||
htmlTexts: true,
|
||||
|
||||
// Setting 'embedded' to true will render the Klaro modal and notice without
|
||||
// the modal background, allowing you to e.g. embed them into a specific element
|
||||
// of your website, such as your privacy notice.
|
||||
embedded: false,
|
||||
|
||||
// You can group services by their purpose in the modal. This is advisable
|
||||
// if you have a large number of services. Users can then enable or disable
|
||||
// entire groups of services instead of having to enable or disable every service.
|
||||
groupByPurpose: true,
|
||||
|
||||
// How Klaro should store the user's preferences. It can be either 'cookie'
|
||||
// (the default) or 'localStorage'.
|
||||
storageMethod: 'cookie',
|
||||
|
||||
// You can customize the name of the cookie that Klaro uses for storing
|
||||
// user consent decisions. If undefined, Klaro will use 'klaro'.
|
||||
cookieName: 'klaro',
|
||||
|
||||
// You can also set a custom expiration time for the Klaro cookie.
|
||||
// By default, it will expire after 120 days.
|
||||
cookieExpiresAfterDays: 365,
|
||||
|
||||
// You can change to cookie domain for the consent manager itself.
|
||||
// Use this if you want to get consent once for multiple matching domains.
|
||||
// If undefined, Klaro will use the current domain.
|
||||
//cookieDomain: '.github.com',
|
||||
|
||||
// You can change to cookie path for the consent manager itself.
|
||||
// Use this to restrict the cookie visibility to a specific path.
|
||||
// If undefined, Klaro will use '/' as cookie path.
|
||||
//cookiePath: '/',
|
||||
|
||||
// Defines the default state for services (true=enabled by default).
|
||||
default: false,
|
||||
|
||||
// If "mustConsent" is set to true, Klaro will directly display the consent
|
||||
// manager modal and not allow the user to close it before having actively
|
||||
// consented or declines the use of third-party services.
|
||||
mustConsent: true,
|
||||
|
||||
// Show "accept all" to accept all services instead of "ok" that only accepts
|
||||
// required and "default: true" services
|
||||
acceptAll: true,
|
||||
|
||||
// replace "decline" with cookie manager modal
|
||||
hideDeclineAll: true,
|
||||
|
||||
// hide "learnMore" link
|
||||
hideLearnMore: false,
|
||||
|
||||
// show cookie notice as modal
|
||||
noticeAsModal: false,
|
||||
|
||||
// You can also remove the 'Realized with Klaro!' text in the consent modal.
|
||||
// Please don't do this! We provide Klaro as a free open source tool.
|
||||
// Placing a link to our website helps us spread the word about it,
|
||||
// which ultimately enables us to make Klaro! better for everyone.
|
||||
// So please be fair and keep the link enabled. Thanks :)
|
||||
//disablePoweredBy: true,
|
||||
|
||||
// you can specify an additional class (or classes) that will be added to the Klaro `div`
|
||||
//additionalClass: 'my-klaro',
|
||||
|
||||
// You can define the UI language directly here. If undefined, Klaro will
|
||||
// use the value given in the global "lang" variable. If that does
|
||||
// not exist, it will use the value given in the "lang" attribute of your
|
||||
// HTML tag. If that also doesn't exist, it will use 'en'.
|
||||
lang: 'de',
|
||||
|
||||
// You can overwrite existing translations and add translations for your
|
||||
// service descriptions and purposes. See `src/translations/` for a full
|
||||
// list of translations that can be overwritten:
|
||||
// https://github.com/KIProtect/klaro/tree/master/src/translations
|
||||
|
||||
// Example config that shows how to overwrite translations:
|
||||
// https://github.com/KIProtect/klaro/blob/master/src/configs/i18n.js
|
||||
translations: {
|
||||
// translationsed defined under the 'zz' language code act as default
|
||||
// translations.
|
||||
zz: {
|
||||
privacyPolicyUrl: '/datenschutz',
|
||||
},
|
||||
// If you erase the "consentModal" translations, Klaro will use the
|
||||
// bundled translations.
|
||||
de: {
|
||||
privacyPolicyUrl: '/datenschutz',
|
||||
|
||||
consentModal: {
|
||||
title: '<u>Cookie Consent Tool</u>',
|
||||
description:
|
||||
'Wir verwenden Cookies um Inhalte und Funktionen für soziale Medien anbieten zu können und die Zugriffe auf unsere Website zu analysieren. Ich bin damit einverstanden und kann meine Einwilligung jederzeit mit Wirkung für die Zukunft widerrufen oder ändern.',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web-Schriftarten von Google gehostet',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Besucher-Statistiken',
|
||||
security: 'Sicherheit',
|
||||
livechat: 'Live Chat',
|
||||
advertising: 'Anzeigen von Werbung',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
en: {
|
||||
consentModal: {
|
||||
title: '<u>Cookie Consent Tool</u>',
|
||||
description:
|
||||
'We use cookies to provide content and social media features and to analyze traffic to our website. I agree to this and can revoke or change my consent at any time with effect for the future.',
|
||||
},
|
||||
googleFonts: {
|
||||
description: 'Web fonts hosted by Google',
|
||||
},
|
||||
purposes: {
|
||||
analytics: 'Analytics',
|
||||
security: 'Security',
|
||||
livechat: 'Livechat',
|
||||
advertising: 'Advertising',
|
||||
styling: 'Styling',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// This is a list of third-party services that Klaro will manage for you.
|
||||
services: [
|
||||
{
|
||||
name: 'twitter',
|
||||
default: true,
|
||||
contextualConsentOnly: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
name: 'youtube',
|
||||
default: true,
|
||||
purposes: ['marketing'],
|
||||
},
|
||||
{
|
||||
name: 'doctolib',
|
||||
default: true,
|
||||
purposes: ['styling'],
|
||||
|
||||
cookies: [
|
||||
[/^__cf_bm.*$/, '/', '.doctolib.de'],
|
||||
[/^_doctolib_session.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^cookies.js.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^esid.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^temporary_appointment_id.*$/, '/', 'partners.doctolib.de'],
|
||||
[/^_doctolib_session.*$/, '/', 'www.doctolib.de'],
|
||||
[/^ssid.*$/, '/', 'www.doctolib.de'],
|
||||
['temporary_appointment_id', '/', 'www.doctolib.de'],
|
||||
[/^_pk_.*$/, '/', 'klaro.kiprotect.com'], //for the production version
|
||||
[/^_pk_.*$/, '/', 'localhost'], //for the local version
|
||||
'piwik_ignore',
|
||||
|
||||
],
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'google-tag-manager',
|
||||
default: true,
|
||||
purposes: ['analytics'],
|
||||
onAccept: `
|
||||
// we notify the tag manager about all services that were accepted. You can define
|
||||
// a custom event in GTM to load the service if consent was given.
|
||||
for(let k of Object.keys(opts.consents)){
|
||||
if (opts.consents[k]){
|
||||
let eventName = 'klaro-'+k+'-accepted'
|
||||
dataLayer.push({'event': eventName})
|
||||
}
|
||||
}
|
||||
// if consent for Google Analytics was granted we enable analytics storage
|
||||
if (opts.consents[opts.vars.googleAnalyticsName || 'google-analytics']){
|
||||
console.log("Google analytics usage was granted")
|
||||
gtag('consent', 'update', {'analytics_storage': 'granted'})
|
||||
}
|
||||
// if consent for Google Ads was granted we enable ad storage
|
||||
if (opts.consents[opts.vars.adStorageName || 'google-ads']){
|
||||
console.log("Google ads usage was granted")
|
||||
gtag('consent', 'update', {'ad_storage': 'granted'})
|
||||
}
|
||||
`,
|
||||
onInit: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
onDecline: `
|
||||
// initialization code here (will be executed only once per page-load)
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments)}
|
||||
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
|
||||
gtag('set', 'ads_data_redaction', true)
|
||||
`,
|
||||
vars: {
|
||||
googleAnalytics: 'google-analytics'
|
||||
}
|
||||
},
|
||||
{
|
||||
// In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.
|
||||
default: true,
|
||||
name: 'google-analytics',
|
||||
purposes: ['analytics'],
|
||||
cookies: [
|
||||
/^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use
|
||||
],
|
||||
}
|
||||
],
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user