diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-03-20 14:37:49 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-03-20 14:37:49 +0100 |
commit | 552dd49b00cedb168c95cdf841971e93b0ad678d (patch) | |
tree | 350b824cba024ad65eb186110d36b9dc275f2f59 /class/class.aff.php | |
parent | 1654358ea4e4c0a100d7e58b1001ece1f908b7b3 (diff) | |
download | wcms-552dd49b00cedb168c95cdf841971e93b0ad678d.tar.gz wcms-552dd49b00cedb168c95cdf841971e93b0ad678d.zip |
get tag
Diffstat (limited to 'class/class.aff.php')
-rw-r--r-- | class/class.aff.php | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/class/class.aff.php b/class/class.aff.php index d9bb56b..46402f4 100644 --- a/class/class.aff.php +++ b/class/class.aff.php @@ -52,7 +52,7 @@ class Aff if ($this->session() >= self::$edit) { ?> - <article> + <article class="edit"> <form class="edit" action="?id=<?= $art->id() ?>" method="post"> <input type="submit" value="modifier"> <label for="titre">Titre :</label> @@ -62,10 +62,10 @@ class Aff <label for="intro">Introduction :</label> <input type="text" name="intro" id="intro" value="<?= $art->intro(); ?>"> <label for="tag">Tag(s) :</label> - <input type="text" name="tag" id="tag" value="<?= $art->tag(); ?>"> + <input type="text" name="tag" id="tag" value="<?= $art->tag('string'); ?>"> <label for="css">Styles CSS :</label> <textarea name="css" id="css"><?= $art->css(); ?></textarea> - <label for="secure">Niveau de sécuritée :</label> + <label for="secure">Niveau de sécurité :</label> <select name="secure" id="secure"> <option value="0" <?= $art->secure() == 0 ? 'selected' : '' ?>>0</option> <option value="1" <?= $art->secure() == 1 ? 'selected' : '' ?>>1</option> @@ -104,6 +104,9 @@ public function head($title) } + + + public function home($list) { echo '<ul>'; @@ -118,6 +121,22 @@ public function head($title) echo ' </ul> '; } + public function tag($getlist, $tag) + { + echo '<ul>'; + foreach ($getlist as $item) { + if (in_array($tag, $item->tag('array'))) { + echo '<li><a href="?id=' . $item->id() . '">' . $item->titre() . '</a> - ' . $item->intro(); + if ($this->session() >= 2) { + echo ' - <a href="?id=' . $item->id() . '&edit=1">modifier</a></li>'; + } else { + echo '</li>'; + } + } + } + echo ' </ul> '; + } + public function aside($list) { if ($this->session() >= 2) { |