Compare commits

..

10 Commits

Author SHA1 Message Date
5b31147c49 baenner 2026-01-14 02:15:56 +01:00
3042f6f5ec asdasd 2026-01-14 02:03:56 +01:00
0abf367497 asdasd 2026-01-14 00:23:10 +01:00
f2af02c2d1 asdasd 2026-01-13 01:56:49 +01:00
a2f51b2fc1 adasd 2026-01-13 01:47:23 +01:00
37e81ae825 asdsd 2026-01-13 01:39:57 +01:00
baef24772b asdasd 2026-01-13 01:37:32 +01:00
9fa40a1d1f logos 2026-01-13 01:20:40 +01:00
00d3a8ab19 adasd 2026-01-12 22:45:10 +01:00
c2cd4734e7 asdad 2026-01-12 22:44:44 +01:00
19 changed files with 21 additions and 196 deletions

View File

@@ -1,10 +1,10 @@
<?php <?php
// Template-Mapping (Staging) // Template-Mapping (Staging)
$emailtemplates = [ $emailtemplates = [
'registration_confirm' => 'neues-template-neue-logik', 'registration_confirm' => 'confirm-email',
'registration_welcome' => 'template-1', 'registration_welcome' => 'welcome-email',
'registration_resend_code' => 'template-mit-block', 'registration_resend_code' => 'confirm-email-resend',
'password_reset' => 'template-mit-block', 'password_reset' => 'password-reset',
]; ];
/** /**

BIN
public/assets/bilder/404.jpg Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

BIN
public/assets/bilder/logo_female.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 94 KiB

BIN
public/assets/bilder/logo_male.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View File

@@ -5,10 +5,8 @@
.page_404 img{ width:100%;} .page_404 img{ width:100%;}
.four_zero_four_bg{ .four_zero_four_bg{
display: flex;
background-image: url(//bilder.kusche.berlin/404image.gif); justify-content: center;
height: 400px;
background-position: center;
} }
@@ -26,4 +24,11 @@
background: #39ac31; background: #39ac31;
margin: 20px 0; margin: 20px 0;
display: inline-block;} display: inline-block;}
.contant_box_404{ margin-top:-50px;} .contant_box_404{ margin-top:24px;}
.page_404_image{
width: 100%;
max-width: 720px;
height: auto;
display: block;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -7,18 +7,14 @@
<div class="col-sm-10 col-sm-offset-1 text-center" <div class="col-sm-10 col-sm-offset-1 text-center"
> >
<div class="four_zero_four_bg"> <div class="four_zero_four_bg">
<h1 class="text-center "></h1> <picture>
<source media="(max-width: 400px)" srcset="/assets/bilder/404portrait.jpg">
<img src="/assets/bilder/404.jpg" alt="404" class="page_404_image rounded-lg">
</picture>
</div> </div>
<div class="contant_box_404"> <div class="contant_box_404">
<h3 class="h2"> <a href="https://kusche.berlin" class="btn">Zur Startseite</a>
Hier fehlt irgendwas </div>
</h3>
<p>die aufgerufene Seite existiert (noch) nicht!</p>
<a href="https://kusche.berlin" class="link_404">Zur Startseite</a>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,176 +0,0 @@
<?php
declare(strict_types=1);
/**
* EmailTemplate Bridge Schema-API für Quellsysteme.
*
* Diese Datei kann auf einer geschützten Quelle (z.B. Kundenserver) installiert werden.
* Sie liefert dem EmailTemplate-System Informationen über verfügbare Tabellen/Spalten,
* ohne direkten DB-Zugriff von außen zu erlauben.
*
* Sicherheit:
* - Authentifizierung per statischem Token (per Header oder Query-Parameter).
* - Optional können Host/IP-Checks ergänzt werden.
*
* Aktionen:
* - action=schema (Default) → Gibt Tabellen inkl. Spaltendefinition zurück.
* - action=ping → Kleiner Health-Check.
*
* Hinweise:
* - DB-Daten können direkt unten eingetragen oder aus einer separaten Datei geladen werden.
* - Der Token sollte für jede Installation eindeutig sein.
*/
$bridgeConfig = [
'token' => getenv('EMAILTEMPLATE_BRIDGE_TOKEN') ?: 'kgIqdL9aNWsFWy6mhSRpnuLc1EbZ62sGCcJAwjjlqqznEGE13szhksWUan0cEdjE',
'db' => [
'dsn' => getenv('EMAILTEMPLATE_BRIDGE_DSN') ?: 'mysql:host=127.0.0.1;dbname=example;charset=utf8mb4',
'user' => getenv('EMAILTEMPLATE_BRIDGE_DB_USER') ?: 'root',
'pass' => getenv('EMAILTEMPLATE_BRIDGE_DB_PASS') ?: '',
'options' => [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
],
],
//'tables_allow' => ['event', 'mail_accounts', 'users', 'verification_codes'], // optional whitelist: ['customers', 'orders']
];
$localOverride = __DIR__ . '/emailtemplate.bridge.conf.php';
if (is_file($localOverride)) {
$override = include $localOverride;
if (is_array($override)) {
$bridgeConfig = array_replace_recursive($bridgeConfig, $override);
}
}
function bridgeRespond($payload, int $status = 200): void
{
http_response_code($status);
header('Content-Type: application/json; charset=utf-8');
header('Cache-Control: no-store, max-age=0');
echo json_encode($payload, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
exit;
}
function bridgeRequireToken(array $config): void
{
$expected = (string)($config['token'] ?? '');
if ($expected === '') {
bridgeRespond(['ok' => false, 'error' => 'Bridge token not configured'], 500);
}
$provided = null;
if (!empty($_SERVER['HTTP_AUTHORIZATION']) && stripos($_SERVER['HTTP_AUTHORIZATION'], 'Bearer ') === 0) {
$provided = trim(substr($_SERVER['HTTP_AUTHORIZATION'], 7));
} elseif (!empty($_SERVER['HTTP_X_EMAILTEMPLATE_TOKEN'])) {
$provided = trim($_SERVER['HTTP_X_EMAILTEMPLATE_TOKEN']);
} elseif (isset($_GET['token'])) {
$provided = (string)$_GET['token'];
} elseif (isset($_POST['token'])) {
$provided = (string)$_POST['token'];
}
if (!$provided || !hash_equals($expected, $provided)) {
bridgeRespond(['ok' => false, 'error' => 'Unauthorized'], 403);
}
}
function bridgeDb(array $config): PDO
{
static $pdo = null;
if ($pdo instanceof PDO) {
return $pdo;
}
try {
$pdo = new PDO(
$config['db']['dsn'],
$config['db']['user'],
$config['db']['pass'],
$config['db']['options']
);
} catch (Throwable $e) {
bridgeRespond(['ok' => false, 'error' => 'DB connection failed', 'detail' => $e->getMessage()], 500);
}
return $pdo;
}
bridgeRequireToken($bridgeConfig);
$action = strtolower((string)($_GET['action'] ?? $_POST['action'] ?? 'schema'));
if ($action === 'ping') {
bridgeRespond(['ok' => true, 'time' => date(DATE_ATOM)]);
}
if ($action !== 'schema') {
bridgeRespond(['ok' => false, 'error' => 'Unknown action'], 404);
}
$pdo = bridgeDb($bridgeConfig);
try {
$dbName = '';
if (preg_match('/dbname=([^;]+)/i', $bridgeConfig['db']['dsn'], $m)) {
$dbName = $m[1];
}
$tablesStmt = $pdo->query('SHOW FULL TABLES');
$tables = [];
$whitelist = [];
if (!empty($bridgeConfig['tables_allow']) && is_array($bridgeConfig['tables_allow'])) {
foreach ($bridgeConfig['tables_allow'] as $tbl) {
if (is_string($tbl) && $tbl !== '') {
$whitelist[strtolower($tbl)] = true;
}
}
}
while ($row = $tablesStmt->fetch(PDO::FETCH_NUM)) {
$tableName = $row[0];
if ($tableName === null) {
continue;
}
if ($whitelist && empty($whitelist[strtolower($tableName)])) {
continue;
}
$columnsStmt = $pdo->prepare(
'SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT, COLUMN_KEY, EXTRA
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = :schema AND TABLE_NAME = :table
ORDER BY ORDINAL_POSITION'
);
$columnsStmt->execute([
':schema' => $dbName ?: $pdo->query('SELECT DATABASE()')->fetchColumn(),
':table' => $tableName,
]);
$columns = [];
foreach ($columnsStmt as $col) {
$columns[] = [
'name' => $col['COLUMN_NAME'],
'type' => $col['DATA_TYPE'],
'nullable' => ($col['IS_NULLABLE'] === 'YES'),
'default' => $col['COLUMN_DEFAULT'],
'key' => $col['COLUMN_KEY'],
'extra' => $col['EXTRA'],
'placeholder'=> strtoupper($tableName) . '__' . strtoupper($col['COLUMN_NAME']),
];
}
$tables[] = [
'name' => $tableName,
'columns' => $columns,
];
}
bridgeRespond([
'ok' => true,
'tables' => $tables,
'fetched' => date(DATE_ATOM),
]);
} catch (Throwable $e) {
bridgeRespond(['ok' => false, 'error' => 'Schema fetch failed', 'detail' => $e->getMessage()], 500);
}
// Bridge DB Setup: direkte Angaben aus dem EmailTemplate-Backend.

View File

@@ -96,7 +96,7 @@ $bridgeConfig = [
], ],
// Optional: Tabellen-Whitelist // Optional: Tabellen-Whitelist
'tables_allow' => ['event', 'mail_accounts', 'users', 'verification_codes'], // z.B. ['customers', 'orders'] // 'tables_allow' => ['event', 'mail_accounts', 'users', 'verification_codes'], // z.B. ['customers', 'orders']
]; ];