Felder aus Organisation Bestellformular in Emailmessage aufgenommen.

This commit is contained in:
Andreas Hnida 2024-02-23 10:23:15 +00:00
commit 26ff5ea026
2 changed files with 22 additions and 10 deletions

View file

@ -190,7 +190,7 @@ table .far {
#formular button, #notification { #formular button, #notification {
width:400px; width:400px;
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
margin-bottom:10px; margin-bottom:10px!important;
margin-top:10px; margin-top:10px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;

View file

@ -1,20 +1,32 @@
<?php <?php
header('Access-Control-Allow-Origin: *'); // Erlaubt Zugriffe von jedem Ursprung header('Access-Control-Allow-Origin: *'); // Erlaubt Zugriffe von jedem Ursprung
header('Content-Type: application/json'); // Setzt den Content-Type der Antwort auf JSON header('Content-Type: application/json'); // Setzt den Content-Type der Antwort auf JSON
function constructMessage() { function constructMessage() {
$message = "Formular: " . "\n" . filter_input(INPUT_POST, 'formularart') . "\n\n\n\n"; $message = "Formular: " . "\n" . filter_input(INPUT_POST, 'formularart') . "\n\n\n\n";
$message .= "Geschlecht: " . "\n" . filter_input(INPUT_POST, 'gender') . "\n\n"; $organisation = filter_input(INPUT_POST, 'organisation');
$message .= "Sprache: " . "\n" . filter_input(INPUT_POST, 'sprache') . "\n\n"; if (isset($organisation)) {
$message .= "Nachname: " . "\n" . filter_input(INPUT_POST, 'name') . "\n\n"; $message .= "Organisation: " . "\n" . $organisation . "\n\n";
$message .= "Vorname: " . "\n" . filter_input(INPUT_POST, 'vorname') . "\n\n"; }
$message .= "ZSR Nummer: " . "\n" . filter_input(INPUT_POST, 'zsr_nummer') . "\n\n";
$message .= "EAN / GLN-Nr: " . "\n" . filter_input(INPUT_POST, 'ean_nummer') . "\n\n";
$message .= "Telefon: " . "\n" . filter_input(INPUT_POST, 'telefon') . "\n\n";
$message .= "Email: " . "\n" . filter_input(INPUT_POST, 'email') . "\n\n\n";
$message .= "Strasse: " . "\n" . filter_input(INPUT_POST, 'strasse') . "\n\n"; $message .= "Strasse: " . "\n" . filter_input(INPUT_POST, 'strasse') . "\n\n";
$message .= "PLZ Ort: " . "\n" . filter_input(INPUT_POST, 'plz_ort') . "\n\n"; $message .= "PLZ Ort: " . "\n" . filter_input(INPUT_POST, 'plz_ort') . "\n\n";
$message .= "Telefon: " . "\n" . filter_input(INPUT_POST, 'telefon') . "\n\n"; $message .= "Geschlecht: " . "\n" . filter_input(INPUT_POST, 'gender') . "\n\n";
$message .= "Email: " . "\n" . filter_input(INPUT_POST, 'email') . "\n\n"; $message .= "Sprache: " . "\n" . filter_input(INPUT_POST, 'sprache') . "\n\n\n";
$message .= "ZSR Nummer: " . "\n" . filter_input(INPUT_POST, 'zsr_nummer') . "\n\n"; $message .= "Nachname: " . "\n" . filter_input(INPUT_POST, 'name') . "\n\n";
$bestehend = filter_input(INPUT_POST, 'bestehend'); $message .= "Vorname: " . "\n" . filter_input(INPUT_POST, 'vorname') . "\n\n";
$message .= "Ansprechpartner Telefon: " . "\n" . filter_input(INPUT_POST, 'ansprechpartner_telefon') . "\n\n";
$message .= "Ansprechpartner Email: " . "\n" . filter_input(INPUT_POST, 'ansprechpartner_email') . "\n\n";
// Form inputs von Organisation
$organisationPaket = filter_input(INPUT_POST, 'organisation-paket');
if (isset($organisationPaket)) {
$message .= "Organisation Paket: " . "\n" . $organisationPaket . "\n\n";
}
$bestehend = filter_input(INPUT_POST, 'bestehend');
// Form inputs von Erstbestellung // Form inputs von Erstbestellung
if (isset($bestehend)) { if (isset($bestehend)) {
$message .= "Wünschen Sie einen neuer Server oder den Zugang zu einem bestehenden Team-Server?: " . "\n" . $bestehend . "\n\n"; $message .= "Wünschen Sie einen neuer Server oder den Zugang zu einem bestehenden Team-Server?: " . "\n" . $bestehend . "\n\n";