Choose where this advertisement should be visible.
+
+
>
diff --git a/admin/ads.php b/admin/ads.php
index 823914c..49a61e1 100644
--- a/admin/ads.php
+++ b/admin/ads.php
@@ -9,6 +9,7 @@ $pdo->exec("CREATE TABLE IF NOT EXISTS ads_images (
title VARCHAR(255) DEFAULT NULL,
sort_order INT DEFAULT 0,
is_active TINYINT(1) DEFAULT 1,
+ display_layout ENUM('both', 'split', 'fullscreen') DEFAULT 'both',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)");
@@ -53,7 +54,7 @@ include 'includes/header.php';
These images will be displayed in a slider on the ads.php page.
- You can upload up to 7 images for optimal performance.
+ You can now choose to show specific images in Split View or Fullscreen layout.
@@ -69,6 +70,7 @@ include 'includes/header.php';
Order
Preview
Title / Caption
+
Layout
Status
Actions
@@ -87,6 +89,20 @@ include 'includes/header.php';
= htmlspecialchars($ad['title'] ?: 'No title') ?>
= htmlspecialchars($ad['image_path']) ?>
+
+
+ = $layoutLabel ?>
+
Active
@@ -102,7 +118,7 @@ include 'includes/header.php';
-
+
No advertisement images found. Click "Add Image" to get started.
diff --git a/admin/includes/header.php b/admin/includes/header.php
index d4f3b03..976aca5 100644
--- a/admin/includes/header.php
+++ b/admin/includes/header.php
@@ -54,7 +54,7 @@ function getGroupToggleClass($pages) {
-
+
diff --git a/admin/tables.php b/admin/tables.php
index 1fb81b4..118dc6a 100644
--- a/admin/tables.php
+++ b/admin/tables.php
@@ -28,6 +28,15 @@ $tables = $tables_pagination['data'];
$areas = $pdo->query("SELECT id, name FROM areas ORDER BY name ASC")->fetchAll();
include 'includes/header.php';
+
+// Determine base URL for QR codes
+$isHttps = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
+ || ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? '') === 'https'
+ || $_SERVER['SERVER_PORT'] == 443;
+$protocol = $isHttps ? "https://" : "http://";
+$host = $_SERVER['HTTP_HOST'];
+$dir = dirname($_SERVER['PHP_SELF'], 2);
+$baseUrl = $protocol . $host . ($dir === '/' ? '' : $dir) . '/qorder.php';
?>
@@ -55,13 +64,20 @@ include 'includes/header.php';