diff options
Diffstat (limited to 'view/album.php')
| -rw-r--r-- | view/album.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/view/album.php b/view/album.php index 795491d..f8879aa 100644 --- a/view/album.php +++ b/view/album.php | |||
| @@ -84,18 +84,19 @@ else | |||
| 84 | ?> | 84 | ?> |
| 85 | </article> | 85 | </article> |
| 86 | <?php | 86 | <?php |
| 87 | // boutons modifier et supprimer, mais pas monter ni descendre | 87 | |
| 88 | // modifier ouvre l'éditeur, supprimer renvoie vers la discographie | ||
| 89 | if($_SESSION['admin'] == 1 && (!isset($_GET['action']) || $_GET['action'] !== 'edition')) | ||
| 90 | { | ||
| 91 | $lien_partage = 'index.php?page=' . $page . '&file_code=' . $fileCode; | ||
| 92 | global $host; | ||
| 93 | ?> | 88 | ?> |
| 94 | <p> | 89 | <p> |
| 95 | <a class="infobulle" href="<?= $lien_partage ?>" > | 90 | <a class="infobulle" href="<?= $lien_partage ?>" > |
| 96 | <img src="public/icone_partager.png" onclick="copierDansPressePapier('<?= $host ?>/<?= $lien_partage ?>')" > | 91 | <img src="public/icone_partager.png" onclick="copierDansPressePapier('<?= $host ?>/<?= $lien_partage ?>')" > |
| 97 | <button>Partager</button> | 92 | <button>Partager</button> |
| 98 | </a> | 93 | </a> |
| 94 | <?php | ||
| 95 | // boutons modifier et supprimer, mais pas monter ni descendre | ||
| 96 | // modifier ouvre l'éditeur, supprimer renvoie vers la discographie | ||
| 97 | if($_SESSION['admin'] == 1 && (!isset($_GET['action']) || $_GET['action'] !== 'edition')) | ||
| 98 | { | ||
| 99 | ?> | ||
| 99 | <a class="infobulle" href="index.php?page=album&action=edition&file_code=<?= $fileCode ?>" > | 100 | <a class="infobulle" href="index.php?page=album&action=edition&file_code=<?= $fileCode ?>" > |
| 100 | <img src="public/icone_modifier.png" > | 101 | <img src="public/icone_modifier.png" > |
| 101 | <button>Modifier</button> | 102 | <button>Modifier</button> |
| @@ -104,8 +105,10 @@ if($_SESSION['admin'] == 1 && (!isset($_GET['action']) || $_GET['action'] !== 'e | |||
| 104 | <img src="public/icone_supprimer.png" > | 105 | <img src="public/icone_supprimer.png" > |
| 105 | <button>Supprimer</button> | 106 | <button>Supprimer</button> |
| 106 | </a> | 107 | </a> |
| 108 | <?php | ||
| 109 | } | ||
| 110 | ?> | ||
| 107 | <button><a href="index.php?page=discographie" >Retour page discographie</a></button> | 111 | <button><a href="index.php?page=discographie" >Retour page discographie</a></button> |
| 108 | </p> | 112 | </p> |
| 109 | <?php | 113 | <?php |
| 110 | } | ||
| 111 | $content = ob_get_clean(); | 114 | $content = ob_get_clean(); |
