<?php
require_once 'config/database.php';
require_once 'includes/site_settings.php';

try {
    // Set the watermark type to image
    set_setting($pdo, 'watermark_type', 'image');
    
    echo "Watermark type updated to 'image' successfully!\n";
    
    // Verify the update
    $updatedType = get_setting($pdo, 'watermark_type');
    echo "Verified setting: " . $updatedType . "\n";
    
    // Also check current settings
    $settings = get_all_settings($pdo);
    echo "\nCurrent Watermark Settings:\n";
    echo "==========================\n";
    echo "watermark_enabled: " . ($settings['watermark_enabled'] ?? 'NOT SET') . "\n";
    echo "watermark_type: " . ($settings['watermark_type'] ?? 'NOT SET') . "\n";
    echo "watermark_image_paths: " . ($settings['watermark_image_paths'] ?? 'NOT SET') . "\n";
    
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}
?>