From a4746d4842cc2c449d2acbf2c15bd6bd8f7750e2 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 16 Apr 2026 23:52:33 -0500 Subject: [PATCH] Update login.php --- login.php | 446 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 443 insertions(+), 3 deletions(-) diff --git a/login.php b/login.php index bdc8c46..2725f74 100644 --- a/login.php +++ b/login.php @@ -1,12 +1,452 @@ fetchAll('SELECT clave, valor FROM lab_config ORDER BY clave'); + foreach ($rows as $r) { + $cfg[$r['clave']] = $r['valor']; + } +} catch (Exception $e) { + // BD no disponible: continuar con defaults +} + +$empresa = htmlspecialchars($cfg['empresa_nombre'] ?? 'Laboratorio Clínico', ENT_QUOTES, 'UTF-8'); +$subtitulo= htmlspecialchars($cfg['empresa_subtitulo'] ?? 'Sistema de Gestión ERP', ENT_QUOTES, 'UTF-8'); +$color = preg_match('/^#[0-9a-fA-F]{3,8}$/', $cfg['doc_color'] ?? '') ? $cfg['doc_color'] : '#1565c0'; +$logo = $cfg['doc_logo_base64'] ?? ''; + +// Calcular color derivado más oscuro para el gradiente +function adjustColor(string $hex, int $amount): string { + $hex = ltrim($hex, '#'); + $r = max(0, min(255, hexdec(substr($hex, 0, 2)) + $amount)); + $g = max(0, min(255, hexdec(substr($hex, 2, 2)) + $amount)); + $b = max(0, min(255, hexdec(substr($hex, 4, 2)) + $amount)); + return sprintf('#%02x%02x%02x', $r, $g, $b); +} +$colorDark = adjustColor($color, -40); +?> + + +
+ + +Bienvenido
+Inicia sesión en el sistema ERP
+ + +