summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php28
1 files changed, 24 insertions, 4 deletions
diff --git a/index.php b/index.php
index d998d96..a7815be 100644
--- a/index.php
+++ b/index.php
@@ -49,7 +49,7 @@ elseif($ckeditor->getStorageMode() === 'files')
49 $texte = trim(file_get_contents(CKEditor::DATA_PATH . '/html/' . $id . '.html')); 49 $texte = trim(file_get_contents(CKEditor::DATA_PATH . '/html/' . $id . '.html'));
50 //$texte = addslashes($texte); // échappe ', ", \ et NULL, je sais pas si c'est bien 50 //$texte = addslashes($texte); // échappe ', ", \ et NULL, je sais pas si c'est bien
51 51
52 // ouvrir l'éditeur sur un des articles ou aucun 52 // vue - afficher des articles et éventuellement l'éditeur dans un des articles
53 if(isset($_GET['action']) && $_GET['action'] === 'open_editor') 53 if(isset($_GET['action']) && $_GET['action'] === 'open_editor')
54 { 54 {
55 if($id === $id_article) 55 if($id === $id_article)
@@ -62,11 +62,31 @@ elseif($ckeditor->getStorageMode() === 'files')
62 $articles_content[] = $ckeditor->displayArticle($id, $texte); 62 $articles_content[] = $ckeditor->displayArticle($id, $texte);
63 } 63 }
64 } 64 }
65 else // affichage article 65 else
66 { 66 {
67 $articles_content[] = $ckeditor->displayArticle($id, $texte); 67 $articles_content[] = $ckeditor->displayArticle($id, $texte);
68 } 68 }
69 } 69 }
70} 70}
71 71// vue
72require 'src/view/templates/page.php'; 72?>
73<!DOCTYPE html>
74<html lang="fr">
75<head>
76 <meta charset="utf-8">
77 <title></title>
78 <link rel="icon" type="image/png" href="">
79 <?= $ckeditor->getCSSOutsideEditorTag() ?>
80 <?= $ckeditor->getCSSEditorTag() ?>
81</head>
82<body>
83 <div>
84<?php
85foreach($articles_content as $article)
86{
87 echo $article;
88}
89?>
90 </div>
91</body>
92</html>