<?php
// Script to update the school/institution name in the database

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

// Define the new school names (you can change these to your desired names)
$new_school_name_bn = 'আপনার কাস্টম স্কুল নাম'; // Replace with your school's name in Bengali
$new_school_name_en = 'Your Custom School Name'; // Replace with your school's name in English

try {
    // Update the system names in the database
    $result_bn = set_setting($pdo, 'system_name', $new_school_name_bn);
    $result_en = set_setting($pdo, 'system_name_en', $new_school_name_en);
    
    if ($result_bn && $result_en) {
        echo "✅ School names updated successfully!\n";
        echo "Bengali name: " . $new_school_name_bn . "\n";
        echo "English name: " . $new_school_name_en . "\n";
        echo "\nThe changes will be reflected throughout the application immediately.\n";
    } else {
        echo "❌ Failed to update school names.\n";
    }
} catch (Exception $e) {
    echo "❌ Error occurred while updating school names: " . $e->getMessage() . "\n";
}
?>