diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-11-11 17:19:26 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-11-11 17:19:26 +0100 |
commit | d7f3313ff4514e38c9f53439cd1a1287e56e45f7 (patch) | |
tree | abff39ab11cb317f5fcd2db558da1c59bdae9239 /app/class/w.article.php | |
parent | 2f363e8fa26ab849539e64ff7caa21bd164e8979 (diff) | |
download | wcms-d7f3313ff4514e38c9f53439cd1a1287e56e45f7.tar.gz wcms-d7f3313ff4514e38c9f53439cd1a1287e56e45f7.zip |
reboot folder
Diffstat (limited to 'app/class/w.article.php')
-rw-r--r-- | app/class/w.article.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/app/class/w.article.php b/app/class/w.article.php new file mode 100644 index 0000000..2476353 --- /dev/null +++ b/app/class/w.article.php @@ -0,0 +1,32 @@ +<?php + +if ($app->exist($_GET['id'])) { + + $art = $app->get($_GET['id']); + + if (isset($_GET['edit']) and $_GET['edit'] == 1 and $app->session() >= $app::EDITOR) { + echo '<section class=edit>'; + $aff->edit($art, $app, $app->getlister(['id', 'title']), $config->fontsize(), $app->getlistermedia($app::MEDIA_DIR, 'image')); + $aff->aside($app); + echo '</section>'; + } else { + echo '<section class="lecture">'; + + + $art->autotaglistupdate($app->taglist($app->getlister(['id', 'title', 'description', 'tag']), $art->autotaglist())); + + + $aff->lecture($art, $app); + echo '</section>'; + + } +} else { + echo '<span class="alert">This article does not exist yet</span>'; + + if ($app->session() >= $app::EDITOR) { + echo '<form action="?id=' . $_GET['id'] . '&edit=1" method="post"><input type="hidden" name="action" value="new"><input type="submit" value="Create"></form>'; + } + +} + +?>
\ No newline at end of file |