diff options
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')); |