79 lines
2.8 KiB
PHP
79 lines
2.8 KiB
PHP
<!DOCTYPE HTML>
|
|
<!--
|
|
Miniport by HTML5 UP
|
|
html5up.net | @ajlkn
|
|
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
|
-->
|
|
<html>
|
|
<head>
|
|
<title>Kaffeeliste</title>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="stylesheet" href="assets/css/main.css" />
|
|
<link rel="stylesheet" href="assets/css/app.css" />
|
|
<?php echo app_analytics_head_html(); ?>
|
|
<?php
|
|
|
|
require_once __DIR__ . '/app/ledger.php';
|
|
require_once __DIR__ . '/app/notices.php';
|
|
require_once __DIR__ . '/app/features.php';
|
|
require_once __DIR__ . '/app/branding.php';
|
|
|
|
// Eigenes Design des Mandanten: die Akzentfarbe wird als kleines Stylesheet
|
|
// direkt hier eingebettet - eine eigene CSS-Datei je Mandant waere ein
|
|
// zusaetzlicher Request fuer wenige Zeilen. Die Farbe ist als Hex-Wert
|
|
// validiert (saas_update_tenant_settings), kann also nicht aus der
|
|
// Style-Deklaration ausbrechen.
|
|
$headerBranding = app_branding_for_current_user(app_db_pdo());
|
|
if ($headerBranding['color'] !== '') {
|
|
echo "\t\t<style>\n" . app_branding_css($headerBranding['color']) . "\t\t</style>\n";
|
|
}
|
|
|
|
?>
|
|
</head>
|
|
<body class="is-preload">
|
|
<?php
|
|
|
|
// Aktuellen Hinweis fuer den passenden Mandanten abrufen: eingeloggte
|
|
// SaaS-Nutzer sehen den Hinweis ihres Mandanten, der Legacy-/Dev-Fallback
|
|
// zeigt den Hinweis des Default-Mandanten.
|
|
$headerPdo = app_db_pdo();
|
|
$headerSaasUser = saas_current_user($headerPdo);
|
|
$headerNoticeTenantId = 0;
|
|
if ($headerSaasUser !== null) {
|
|
$headerNoticeTenantId = (int)$headerSaasUser['tenant_id'];
|
|
} else {
|
|
$headerDefaultTenant = ledger_fetch_default_tenant($headerPdo);
|
|
if ($headerDefaultTenant !== null) {
|
|
$headerNoticeTenantId = (int)$headerDefaultTenant['id'];
|
|
}
|
|
}
|
|
|
|
if ($headerNoticeTenantId > 0) {
|
|
$headerNotice = notices_fetch_active($headerPdo, $headerNoticeTenantId);
|
|
if ($headerNotice !== null) {
|
|
echo "<div style='background-color: #ffeb3b; padding: 25px; text-align: center; font-weight: bold; font-size: 20px;'>"
|
|
. saas_html($headerNotice['message']) .
|
|
"</div>";
|
|
}
|
|
}
|
|
|
|
// Unbestaetigte Adresse: die eigene Kaffeeliste laesst sich weiter fuehren,
|
|
// aber Einladungen, Info-Mails und der Jahresabschluss sind gesperrt. Der
|
|
// Hinweis erklaert das, bevor jemand in die Sperre laeuft.
|
|
if ($headerSaasUser !== null && ($headerSaasUser['email_verified_at'] ?? null) === null) {
|
|
echo "<div style='background-color: #fff3cd; padding: 15px; text-align: center;'>"
|
|
. 'Deine E-Mail-Adresse ist noch nicht bestätigt. Mitglieder einladen, '
|
|
. 'Info-Mails und der Jahresabschluss sind bis dahin gesperrt. '
|
|
. '<a href="email-verifikation-senden.php">Bestätigungslink erneut anfordern</a>'
|
|
. "</div>";
|
|
}
|
|
|
|
?>
|
|
<!-- Wrapper -->
|
|
<div id="wrapper">
|
|
|
|
<!-- Main -->
|
|
<div id="main">
|
|
<div class="inner">
|