diff options
Diffstat (limited to 'view/articlesContent.php')
| -rw-r--r-- | view/articlesContent.php | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/view/articlesContent.php b/view/articlesContent.php index 87b3676..a03b39d 100644 --- a/view/articlesContent.php +++ b/view/articlesContent.php | |||
| @@ -61,7 +61,9 @@ for($i = 0; $i < $Articles->fileListCount; $i++) | |||
| 61 | <article id="<?= $Articles->fileList[$i]['fileCode'] ?>"> | 61 | <article id="<?= $Articles->fileList[$i]['fileCode'] ?>"> |
| 62 | <div <?= $style ?>> | 62 | <div <?= $style ?>> |
| 63 | <?php | 63 | <?php |
| 64 | 64 | $lien_partage = 'index.php?page=' . $page . '#' . $Articles->fileList[$i]['fileCode']; | |
| 65 | global $host; | ||
| 66 | |||
| 65 | // remplacer un article par l'éditeur | 67 | // remplacer un article par l'éditeur |
| 66 | if($_SESSION['admin'] == 1 && isset($_GET['action']) && $_GET['action'] == 'editor' && isset($_GET['file_code']) | 68 | if($_SESSION['admin'] == 1 && isset($_GET['action']) && $_GET['action'] == 'editor' && isset($_GET['file_code']) |
| 67 | && $_GET['file_code'] == $Articles->fileList[$i]['fileCode'] | 69 | && $_GET['file_code'] == $Articles->fileList[$i]['fileCode'] |
| @@ -72,6 +74,15 @@ for($i = 0; $i < $Articles->fileListCount; $i++) | |||
| 72 | <h3>Modification d'un article</h3> | 74 | <h3>Modification d'un article</h3> |
| 73 | <?php | 75 | <?php |
| 74 | echo($editeurHTML); // injection de template-editor.php | 76 | echo($editeurHTML); // injection de template-editor.php |
| 77 | ?> | ||
| 78 | </div> | ||
| 79 | <p class="boutonArticle" > | ||
| 80 | <a class="infobulle" href="<?= $lien_partage ?>" > | ||
| 81 | <img src="public/icone_partager.png" onclick="copierDansPressePapier('<?= $host ?>/<?= $lien_partage ?>')" > | ||
| 82 | <button>Partager</button> | ||
| 83 | </a> | ||
| 84 | </p> | ||
| 85 | <?php | ||
| 75 | } | 86 | } |
| 76 | 87 | ||
| 77 | // placer un article | 88 | // placer un article |
| @@ -79,19 +90,18 @@ for($i = 0; $i < $Articles->fileListCount; $i++) | |||
| 79 | { | 90 | { |
| 80 | // et voila | 91 | // et voila |
| 81 | echo($Articles->fileList[$i]['content'] . "\n"); | 92 | echo($Articles->fileList[$i]['content'] . "\n"); |
| 82 | 93 | ?> | |
| 83 | // bouton | ||
| 84 | if($_SESSION['admin'] == 1) | ||
| 85 | { | ||
| 86 | $lien_partage = 'index.php?page=' . $page . '#' . $Articles->fileList[$i]['fileCode']; | ||
| 87 | global $host; | ||
| 88 | ?> | ||
| 89 | </div> | 94 | </div> |
| 90 | <p class="boutonArticle" > | 95 | <p class="boutonArticle" > |
| 91 | <a class="infobulle" href="<?= $lien_partage ?>" > | 96 | <a class="infobulle" href="<?= $lien_partage ?>" > |
| 92 | <img src="public/icone_partager.png" onclick="copierDansPressePapier('<?= $host ?>/<?= $lien_partage ?>')" > | 97 | <img src="public/icone_partager.png" onclick="copierDansPressePapier('<?= $host ?>/<?= $lien_partage ?>')" > |
| 93 | <button>Partager</button> | 98 | <button>Partager</button> |
| 94 | </a> | 99 | </a> |
| 100 | <?php | ||
| 101 | // bouton | ||
| 102 | if($_SESSION['admin'] == 1) | ||
| 103 | { | ||
| 104 | ?> | ||
| 95 | <a class="infobulle" href="index.php?page=<?= $page ?>&action=editor&file_code=<?= $Articles->fileList[$i]['fileCode'] ?>#<?= $Articles->fileList[$i]['fileCode'] ?>" > | 105 | <a class="infobulle" href="index.php?page=<?= $page ?>&action=editor&file_code=<?= $Articles->fileList[$i]['fileCode'] ?>#<?= $Articles->fileList[$i]['fileCode'] ?>" > |
| 96 | <img src="public/icone_modifier.png" > | 106 | <img src="public/icone_modifier.png" > |
| 97 | <button>Modifier</button> | 107 | <button>Modifier</button> |
| @@ -109,7 +119,7 @@ for($i = 0; $i < $Articles->fileListCount; $i++) | |||
| 109 | <button>Supprimer</button> | 119 | <button>Supprimer</button> |
| 110 | </a> | 120 | </a> |
| 111 | </p> | 121 | </p> |
| 112 | <?php | 122 | <?php |
| 113 | } | 123 | } |
| 114 | } | 124 | } |
| 115 | ?> | 125 | ?> |
