![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/soundstudiopro.com/public_html/ |
<?php
// Run Site Settings Database Updates
require_once 'config/database.php';
echo "<h1>Site Settings Database Updates</h1>";
try {
$pdo = getDBConnection();
// Create site_settings table
echo "<h2>Creating site_settings table...</h2>";
$sql = "
CREATE TABLE IF NOT EXISTS site_settings (
id INT AUTO_INCREMENT PRIMARY KEY,
setting_key VARCHAR(100) NOT NULL UNIQUE,
setting_value TEXT,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)";
$pdo->exec($sql);
echo "✅ site_settings table created successfully<br>";
// Insert default settings
echo "<h2>Inserting default settings...</h2>";
$default_settings = [
'ajax_enabled' => '1',
'debug_mode' => '0',
'stripe_live_mode' => '1',
'auto_refresh_payment_methods' => '0',
'global_player_enabled' => '1',
'auto_play_enabled' => '0',
'shuffle_enabled' => '0'
];
$stmt = $pdo->prepare("
INSERT INTO site_settings (setting_key, setting_value)
VALUES (?, ?)
ON DUPLICATE KEY UPDATE setting_value = VALUES(setting_value)
");
foreach ($default_settings as $key => $value) {
$stmt->execute([$key, $value]);
echo "✅ Setting '$key' = '$value' inserted/updated<br>";
}
echo "<h2>✅ All updates completed successfully!</h2>";
echo "<p><a href='/admin.php?tab=site-settings'>Go to Site Settings</a></p>";
} catch (Exception $e) {
echo "<h2>❌ Error occurred:</h2>";
echo "<p>" . htmlspecialchars($e->getMessage()) . "</p>";
}
?>