This commit is contained in:
2025-12-06 03:17:46 +01:00
parent d5268a98ac
commit b7de08c9a1
3 changed files with 13 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
<?php <?php
$mode = strtolower($_GET['mode'] ?? 'templates'); $mode = strtolower($_GET['mode'] ?? 'templates');
$id = (int)($_GET['id'] ?? 0); $id = (int)($_GET['id'] ?? 0);
$ts = time(); $assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
?><!doctype html> ?><!doctype html>
<html lang="de"> <html lang="de">
<head> <head>
@@ -41,7 +41,7 @@ $ts = time();
function loadLocalScript(src, onok){ function loadLocalScript(src, onok){
// Hinzufügen des Cache-Bust-Parameters zur URL // Hinzufügen des Cache-Bust-Parameters zur URL
// Die Variable $ts wird durch PHP im HTML-Kontext eingefügt // Die Variable $ts wird durch PHP im HTML-Kontext eingefügt
const url = src + (src.indexOf('?') === -1 ? '?v=' : '&v=') + <?=$ts?>; const url = src + (src.indexOf('?') === -1 ? '?v=' : '&v=') + <?= json_encode($assetVersion) ?>;
var s=document.createElement('script'); s.src=url; s.async=false; var s=document.createElement('script'); s.src=url; s.async=false;
s.onload=function(){ logToParent('script-ok', src); onok&&onok(); }; s.onload=function(){ logToParent('script-ok', src); onok&&onok(); };
s.onerror=function(){ var b=document.getElementById('badge'); if(b){ b.textContent='Fehlt: '+src; b.style.background='#fee2e2'; b.style.color='#7f1d1d'; b.style.borderColor='#fecaca'; } logToParent('script-missing', src); }; s.onerror=function(){ var b=document.getElementById('badge'); if(b){ b.textContent='Fehlt: '+src; b.style.background='#fee2e2'; b.style.color='#7f1d1d'; b.style.borderColor='#fecaca'; } logToParent('script-missing', src); };

View File

@@ -1,5 +1,6 @@
<?php <?php
$base = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') ?: ''; $base = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') ?: '';
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
?> ?>
<!doctype html> <!doctype html>
<html lang="de"> <html lang="de">
@@ -18,10 +19,10 @@ $base = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') ?: '';
<script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.tailwindcss.com"></script>
<!-- Admin-Theme (neu) --> <!-- Admin-Theme (neu) -->
<link rel="stylesheet" href="assets/css/admin.css?v=2025-10-061"> <link rel="stylesheet" href="assets/css/admin.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
<!-- Toast danach --> <!-- Toast danach -->
<link rel="stylesheet" href="assets/css/toast.css"> <link rel="stylesheet" href="assets/css/toast.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
<!-- Kleine Hilfs-Utilities (belassen, falls admin.css andere Werte hat) --> <!-- Kleine Hilfs-Utilities (belassen, falls admin.css andere Werte hat) -->
<style> <style>
@@ -162,8 +163,8 @@ $base = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') ?: '';
<div id="toast-root"></div> <div id="toast-root"></div>
<script src="assets/js/toast.js"></script> <script src="assets/js/toast.js?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>"></script>
<script type="module" src="assets/js/app.js?v=20250907"></script> <script type="module" src="assets/js/app.js?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>"></script>
<script type="module" src="assets/js/ui-tools.js?v=20250907"></script> <script type="module" src="assets/js/ui-tools.js?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>"></script>
</body> </body>
</html> </html>

View File

@@ -1,5 +1,6 @@
<?php <?php
// login.php Staging Login // login.php Staging Login
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
?><!doctype html> ?><!doctype html>
<html lang="de"> <html lang="de">
<head> <head>
@@ -8,12 +9,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Admin-Theme (neu) --> <!-- Admin-Theme (neu) -->
<link rel="stylesheet" href="/assets/css/app.css?v=2025-10-061"> <link rel="stylesheet" href="/assets/css/app.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
<link rel="stylesheet" href="/assets/css/admin.css?v=2025-10-061"> <link rel="stylesheet" href="/assets/css/admin.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
<!-- Toast --> <!-- Toast -->
<link rel="stylesheet" href="/assets/css/toast.css"> <link rel="stylesheet" href="/assets/css/toast.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
<script src="/assets/js/toast.js" defer></script> <script src="/assets/js/toast.js?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>" defer></script>
<!-- Klein & lokal: Nur falls admin.css kein eigenes Login-Layout setzt --> <!-- Klein & lokal: Nur falls admin.css kein eigenes Login-Layout setzt -->
<style> <style>