diff options
author | git-pc-greta <ordipolo@gmx.fr> | 2025-02-03 22:41:21 +0100 |
---|---|---|
committer | git-pc-greta <ordipolo@gmx.fr> | 2025-02-03 22:41:21 +0100 |
commit | 51a5391c96043829f7bbccda1262a51a8b8f93d8 (patch) | |
tree | 948d1ff5ad20fdeb8c2f11cb47a6700111d9385d /index.php | |
parent | 13f24b014d07ab3f28c7a8ede4f4bd6eaebbaad4 (diff) | |
download | ckeditor5-51a5391c96043829f7bbccda1262a51a8b8f93d8.zip |
bouton supprimer
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -71,6 +71,20 @@ elseif($ckeditor->getStorageMode() === 'files') | |||
71 | $id_array[] = rtrim($file_name, '.html'); | 71 | $id_array[] = rtrim($file_name, '.html'); |
72 | } | 72 | } |
73 | } | 73 | } |
74 | |||
75 | // suppression et rechargement | ||
76 | if(isset($_GET['action']) && $_GET['action'] === 'delete_article') | ||
77 | { | ||
78 | if(in_array($id_article, $id_array)) | ||
79 | { | ||
80 | unlink(CKEditor::DATA_PATH . '/html/' . $id_article . '.html'); | ||
81 | //$ckeditor->deleteSideEffects(); | ||
82 | } | ||
83 | header('Location: index.php?page=' . $from); | ||
84 | die; | ||
85 | } | ||
86 | |||
87 | // affichage | ||
74 | foreach($id_array as $id) | 88 | foreach($id_array as $id) |
75 | { | 89 | { |
76 | $texte = trim(file_get_contents(CKEditor::DATA_PATH . '/html/' . $id . '.html')); | 90 | $texte = trim(file_get_contents(CKEditor::DATA_PATH . '/html/' . $id . '.html')); |