Restructure: move all files from Public HTML/ to root for Hostinger deployment

This commit is contained in:
Krikorios
2026-02-22 02:37:32 +02:00
parent 515080774a
commit e3a74b2d50
103 changed files with 62 additions and 147 deletions
+46
View File
@@ -0,0 +1,46 @@
<?php
/**
* Public Site Settings API (safe subset only)
*/
require_once 'config.php';
if ($_SERVER['REQUEST_METHOD'] !== 'GET') {
jsonResponse(['success' => false, 'message' => 'Method not allowed'], 405);
}
$all = getSettingsMap();
$allowedKeys = [
'site_name',
'site_tagline',
'site_description',
'contact_email',
'contact_phone',
'contact_address',
'business_hours',
'support_hours',
'maps_url',
'social_facebook',
'social_linkedin',
'social_twitter',
'social_instagram',
'social_youtube',
'social_github',
'primary_color',
'secondary_color',
'accent_color'
];
$data = [];
foreach ($allowedKeys as $key) {
if (isset($all[$key]) && $all[$key] !== '') {
$data[$key] = $all[$key];
}
}
if (!isset($data['contact_email']) || $data['contact_email'] === '') {
$data['contact_email'] = ADMIN_EMAIL;
}
jsonResponse(['success' => true, 'data' => $data]);