<?php
require_once 'config/database.php';
require_once 'includes/site_settings.php';
require_once 'includes/banner.php';
?>
<!DOCTYPE html>
<html lang="bn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Watermark Test</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
</head>
<body>
    <?php include 'includes/banner.php'; ?>
    
    <div class="container mt-5">
        <h1>Watermark Test Page</h1>
        <p>This page should display the watermark in the banner above.</p>
        
        <h3>Current Watermark Settings:</h3>
        <ul>
            <li><strong>Enabled:</strong> <?php echo $watermark_enabled === '1' ? 'Yes' : 'No'; ?></li>
            <li><strong>Type:</strong> <?php echo $watermark_type; ?></li>
            <li><strong>Opacity:</strong> <?php echo $watermark_opacity; ?></li>
            <li><strong>Speed:</strong> <?php echo $watermark_speed; ?></li>
            <li><strong>Animation:</strong> <?php echo $watermark_animation; ?></li>
        </ul>
        
        <?php if ($watermark_type === 'image' && !empty($watermark_image_paths_array)): ?>
        <h3>Watermark Images:</h3>
        <ul>
            <?php foreach ($watermark_image_paths_array as $index => $image_path): ?>
                <li>
                    <?php echo htmlspecialchars($image_path); ?> 
                    (<?php echo file_exists(__DIR__ . '/' . $image_path) ? 'Exists' : 'Not Found'; ?>)
                    <?php if (file_exists(__DIR__ . '/' . $image_path)): ?>
                        <br><img src="<?php echo htmlspecialchars($image_path); ?>" alt="Preview" style="max-width: 200px; max-height: 100px;">
                    <?php endif; ?>
                </li>
            <?php endforeach; ?>
        </ul>
        <?php endif; ?>
    </div>
</body>
</html>