tout le front ok

This commit is contained in:
2026-08-20 11:14:25 +00:00
parent 5a67aa6e9c
commit 3711452c50
5 changed files with 228 additions and 160 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
header('Content-Type: application/json');
// Paramètres de connexion à votre base de données GF
$host = "localhost";
$username = "root";
$password = "sysadm-1963";
$database = "GF";
try {
$pdo = new PDO("mysql:host=$host;dbname=$database;charset=utf8mb4", $username, $password);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// Requête pour récupérer les actions configurées avec afficher = 1 dans la table indice
$stmt = $pdo->prepare("SELECT * FROM indice WHERE afficher = 1");
$stmt->execute();
$actionsConfig = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo json_encode([
"status" => "success",
"data" => $actionsConfig
]);
} catch (PDOException $e) {
echo json_encode([
"status" => "error",
"message" => $e->getMessage()
]);
}