diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-05-07 11:34:45 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-05-07 11:34:45 +0200 |
commit | 97d6db419e1782abaa554dc9b88c208835d1a8b4 (patch) | |
tree | 4effa38f18eb0249d0587902cf9e34efd784eb82 /class/class.aff.php | |
parent | 8ad36569c333324614a864225d507972247f22be (diff) | |
download | wcms-97d6db419e1782abaa554dc9b88c208835d1a8b4.tar.gz wcms-97d6db419e1782abaa554dc9b88c208835d1a8b4.zip |
W 2.1 M 0.1
Diffstat (limited to 'class/class.aff.php')
-rw-r--r-- | class/class.aff.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/class/class.aff.php b/class/class.aff.php index 61ee142..a62274e 100644 --- a/class/class.aff.php +++ b/class/class.aff.php @@ -42,7 +42,7 @@ class Aff section a[target="_blank"] { color: <?= $art->couleurlienblank() ?>; } - <?= $art->css() ?> + <?= $art->csstemplate($app) ?> </style> <section> <h1><?= $art->titre() ?></h1> @@ -55,7 +55,7 @@ class Aff echo '</body>'; } - public function edit(Art $art) + public function edit(Art $art, $list) { if ($this->session() >= self::$edit) { @@ -82,6 +82,18 @@ class Aff </details> <details close> <summary>CSS</summary> + <label for="template">Template :</label> + <select name="template" id="template"> + <?php + foreach ($list as $item) { + if ($item['id'] == $art->template()) { + echo '<option value="' . $item['id'] . '" selected >' . $item['titre'] . '</option>'; + } else { + echo '<option value="' . $item['id'] . '">' . $item['titre'] . '</option>'; + } + } + ?> + </select> <label for="css">Styles CSS :</label> <textarea name="css" id="css"><?= $art->css(); ?></textarea> <label for="couleurtext">Couleur du texte :</label> @@ -299,7 +311,7 @@ public function head($title, $tool) </br> <?php - if (isset($_GET['id']) and $app->exist($_GET['id'])) { + if (isset($_GET['id'])) { if ($this->session() == 0) { ?> <form action="?id=<?= $_GET['id'] ?>" method="post"> @@ -318,7 +330,7 @@ public function head($title, $tool) </form> <?php - if ($this->session() == 2) { + if ($this->session() == 2 and $app->exist($_GET['id'])) { ?> <a class="button" href="?id=<?= $_GET['id'] ?>" target="_blank">display</a> </br> |