💬 Ajoute les catégories et des nouveaux textes

This commit is contained in:
2019-09-19 17:17:57 +02:00
parent 983e025f5f
commit e678b9e4c3
5 changed files with 319 additions and 145 deletions

View File

@@ -1,4 +1,11 @@
<?php
header('Content-Type: application/json');
readfile(__DIR__.'/emails.json');
header('Content-Type: application/json');
$json_content = json_decode(file_get_contents(__DIR__.'/emails.json'), true)[0];
$topic = $_POST['topic'];
if (array_key_exists($topic, $json_content)) {
echo json_encode($json_content[$topic]);
}