diff --git a/customer-display.php b/customer-display.php index 60fd9a0..e7499fe 100644 --- a/customer-display.php +++ b/customer-display.php @@ -1,3 +1,32 @@ +query("SELECT * FROM settings")->fetchAll(PDO::FETCH_ASSOC); + foreach ($rows as $r) { + $settings[$r['key']] = $r['value']; + } +} catch (Exception $e) { + // Fallback if DB fails +} + +$title = $settings['customer_display_greeting_title'] ?? 'Welcome'; +$subtitle = $settings['customer_display_greeting_text'] ?? 'We are ready to serve you.'; +$slides = []; +if (!empty($settings['display_slide_1'])) $slides[] = $settings['display_slide_1']; +if (!empty($settings['display_slide_2'])) $slides[] = $settings['display_slide_2']; +if (!empty($settings['display_slide_3'])) $slides[] = $settings['display_slide_3']; + +// Fallbacks +if (empty($slides)) { + $slides = [ + 'https://images.unsplash.com/photo-1441986300917-64674bd600d8?q=80&w=1920&auto=format&fit=crop', + 'https://images.unsplash.com/photo-1472851294608-415170d4e897?q=80&w=1920&auto=format&fit=crop', + 'https://images.unsplash.com/photo-1556742049-0cfed4f7a07d?q=80&w=1920&auto=format&fit=crop', + 'https://images.unsplash.com/photo-1528698827591-e19ccd7bc23d?q=80&w=1920&auto=format&fit=crop' + ]; +} +?> @@ -34,6 +63,7 @@ flex: 1; display: flex; overflow: hidden; + } .items-section { flex: 2; @@ -102,19 +132,74 @@ line-height: 1.2; } .welcome-screen { + position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; - color: var(--text-muted); + color: white; + overflow: hidden; + background: #212529; + } + .slideshow-bg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1; + } + .slideshow-bg::after { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); /* Overlay */ + z-index: 2; + } + .slide { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-size: cover; + background-position: center; + opacity: 0; + transition: opacity 2s ease-in-out; + transform: scale(1.1); /* Subtle zoom effect start */ + transition: opacity 2s ease-in-out, transform 10s ease; + } + .slide.active { + opacity: 1; + transform: scale(1); + z-index: 1; + } + .welcome-content { + position: relative; + z-index: 10; + padding: 3rem; + max-width: 800px; + animation: fadeIn 1s ease-out; + } + .welcome-logo { + max-height: 15vh; + margin-bottom: 2rem; + filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3)); + } + @keyframes fadeIn { + from { opacity: 0; transform: translateY(20px); } + to { opacity: 1; transform: translateY(0); } } .welcome-icon { font-size: 15vmin; margin-bottom: 1rem; - color: var(--border); - opacity: 0.5; + color: rgba(255,255,255,0.8); + text-shadow: 0 4px 10px rgba(0,0,0,0.3); } /* Custom scrollbar */ ::-webkit-scrollbar { @@ -177,11 +262,23 @@
-
- +
+ $url): ?> +
+ +
+ +
+ + + + + +
+ +

+

-

Welcome

-

Next customer, please.

diff --git a/index.php b/index.php index cbce7a2..bb3fdc9 100644 --- a/index.php +++ b/index.php @@ -776,7 +776,7 @@ if (isset($_POST['add_hr_department'])) { } // Handle file uploads - $files = ['company_logo', 'favicon', 'manager_signature']; + $files = ['company_logo', 'favicon', 'manager_signature', 'display_slide_1', 'display_slide_2', 'display_slide_3']; foreach ($files as $file_key) { if (isset($_FILES[$file_key]) && $_FILES[$file_key]['error'] === 0) { $ext = pathinfo($_FILES[$file_key]['name'], PATHINFO_EXTENSION); @@ -945,6 +945,7 @@ $page_permissions = [ 'role_groups' => 'users_view', 'users' => 'users_view', 'scale_devices' => 'users_view', + 'customer_display_settings' => 'settings_view', 'backups' => 'users_view', 'logs' => 'users_view', 'cash_registers' => 'users_view', @@ -1783,11 +1784,11 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Accounting System'; -