💬 Ajoute les catégories et des nouveaux textes
This commit is contained in:
1 parent
983e025f5f
commit
e678b9e4c3
5 files changed
+319
-145
No files matched your search
+6
-1
@@ -1,7 +1,12 @@
|
||||
<?php
|
||||
|
||||
$slug = $_POST['slug'];
|
||||
$emails_json = json_decode(file_get_contents(__DIR__.'/emails.json'), true);
|
||||
$topic = $_POST['topic'];
|
||||
$emails_json = json_decode(file_get_contents(__DIR__.'/emails.json'), true)[0];
|
||||
if (!array_key_exists($topic, $emails_json)) {
|
||||
header('HTTP/1.0 404 Not Found');
|
||||
}
|
||||
$emails_json = $emails_json[$topic];
|
||||
$emails = [];
|
||||
foreach ($emails_json as $email) {
|
||||
$emails[$email['slug']] = $email;
|
||||
|
||||
Reference in new issue
Block a user