diff --git a/web/scripts/config.php b/web/fitness-config.php similarity index 100% rename from web/scripts/config.php rename to web/fitness-config.php diff --git a/web/html/index.php b/web/html/index.php index 403543d..46abda2 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -1,7 +1,7 @@ Welcome to the demo'; @@ -15,10 +15,36 @@ $name = $_SESSION['name'] ?? 'unknown'; $email = $_SESSION['email'] ?? 'unknown'; $groups = $_SESSION['groups'] ?? []; -echo '

Logged in as ' . htmlspecialchars($name) . '

'; -echo ''; -// echo '

Logout

'; \ No newline at end of file + +if ($debug_output) { + echo '

Logged in as ' . htmlspecialchars($name) . '

'; + echo ''; +} +// echo '

Logout

'; +?> + + + + + +Fitness Tracker + + + + + + + diff --git a/web/scripts/add_provider.php b/web/scripts/add_provider.php index 8f80890..330ad3a 100644 --- a/web/scripts/add_provider.php +++ b/web/scripts/add_provider.php @@ -5,7 +5,7 @@ // When the form is submitted, it POSTs JSON to /providers. // file settings -require_once __DIR__ . '/config.php'; +require_once __DIR__ . '/../fitness-config.php'; // Helper to call the API ------------------------------------------- function callApi(string $method, string $path, $body = null) diff --git a/web/scripts/edit_provider.php b/web/scripts/edit_provider.php index a3ad9d0..6503829 100644 --- a/web/scripts/edit_provider.php +++ b/web/scripts/edit_provider.php @@ -3,7 +3,7 @@ // Edit an existing fitness provider. // Handles rate options similar to add_provider.php. -require_once __DIR__ . '/config.php'; +require_once __DIR__ . '/../fitness-config.php'; $provider_id = (int)($_GET['id'] ?? 0); if ($provider_id <= 0) { diff --git a/web/scripts/list_providers.php b/web/scripts/list_providers.php index 57cc7ee..8cba48f 100644 --- a/web/scripts/list_providers.php +++ b/web/scripts/list_providers.php @@ -5,7 +5,7 @@ // The API endpoint for providers is /providers. // file settings -require_once __DIR__ . '/config.php'; +require_once __DIR__ . '/../fitness-config.php'; // --- Helper to call the API ------------------------------------------- function callApi(string $method, string $path, $body = null) { diff --git a/web/scripts/settings.php b/web/scripts/settings.php index 7c63cf0..8c3fe4e 100644 --- a/web/scripts/settings.php +++ b/web/scripts/settings.php @@ -5,7 +5,7 @@ // The design follows the pattern used in list_providers.php. // file settings -require_once __DIR__ . '/config.php'; +require_once __DIR__ . '/../fitness-config.php'; // --- Helper to call the Flask API ------------------------------------------- function callApi(string $method, string $path, $body = null) diff --git a/web/scripts/upload_photos.php b/web/scripts/upload_photos.php index efecec7..2b47d60 100644 --- a/web/scripts/upload_photos.php +++ b/web/scripts/upload_photos.php @@ -1,5 +1,5 @@