git.schokokeks.org
Repositories
Help
Report an Issue
bibweb.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
a3414cd
Branches
Tags
master
bibweb.git
notification.php
Umstellung auf neue (anonyme) API
Bernd Wurst
commited
a3414cd
at 2025-11-09 07:03:45
notification.php
Blame
History
Raw
<?php require_once "lib/api.php"; require_once "lib/auftrag.php"; session_start(); if (!isset($_SESSION['phone']) || (!isset($_SESSION['name']) && !isset($_SESSION['firma']) && !isset($_SESSION['lname']))) { header('Location: index.php?error&num='.urlencode($_SESSION['phone']).'&name='.urlencode($_SESSION['name'])); die(); } // Hier ist der Kunde erstellt und mit Kundennummer bekannt. $headline = 'Benachrichtigung wählen'; $content = '<p>Wie möchten Sie bevorzugt kontaktiert werden, wenn Ihr Auftrag erledigt ist?</p> <form class="form" action="save.php" method="post"> <input type="hidden" name="form" value="notification"> <div class="row mb-1 g-3">'; $num = 0; $phonenumbers = array_filter($_SESSION['phonenumbers'], function($v) { return str_starts_with($v, '+491'); }); $emailaddrs = $_SESSION['emailaddrs']; $num = count($phonenumbers) * 2 + count($emailaddrs); if ($num < 2) { // Nichts zum aussuchen! header('Location: gitterbox.php'); } foreach ($phonenumbers as $phone) { $phone = format_number_national($phone); $content .= ' <div class="col-sm-6"><a href="#" class="btn btn-lg btn-light w-100" id="btn-whatsapp">Whatsapp an<br> '.$phone.'</a></div>'; $content .= ' <div class="col-sm-6"><a href="#" class="btn btn-lg btn-light w-100" id="btn-sms">SMS an<br> '.$phone.'</a></div>'; } foreach ($emailaddrs as $email) { $content .= ' </div> <div class="row"> <div class="col-sm-12"><a href="#" class="btn btn-lg btn-light w-100" id="btn-email">E-Mail an<br> '.$email.'</a></div>'; } $content .= '<input type="hidden" name="notification" id="notification" value=""> </div>'; $content .= '</form>'; include("template.php");