50 lines
1.5 KiB
PHP
50 lines
1.5 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" />
|
|
</head>
|
|
<body class="is-preload">
|
|
<?php
|
|
|
|
require_once __DIR__ . '/app/ledger.php';
|
|
require_once __DIR__ . '/app/notices.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>";
|
|
}
|
|
}
|
|
|
|
?>
|
|
<!-- Wrapper -->
|
|
<div id="wrapper">
|
|
|
|
<!-- Main -->
|
|
<div id="main">
|
|
<div class="inner">
|