diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-10-18 01:08:46 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-10-18 01:08:46 +0200 |
commit | 7b2e48276b2a3ceff83c906d38077f8d0479c3df (patch) | |
tree | 0fc26bb1cbae5a30583292fbfb2b752fb623a94d /w/controller/w.article.php | |
parent | 65796d4a2349e71ca05f5f298d6f94ff792d88b2 (diff) | |
download | wcms-7b2e48276b2a3ceff83c906d38077f8d0479c3df.tar.gz wcms-7b2e48276b2a3ceff83c906d38077f8d0479c3df.zip |
2.92 new architecture + quickcss class
Diffstat (limited to 'w/controller/w.article.php')
-rw-r--r-- | w/controller/w.article.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/w/controller/w.article.php b/w/controller/w.article.php new file mode 100644 index 0000000..307caa4 --- /dev/null +++ b/w/controller/w.article.php @@ -0,0 +1,33 @@ +<?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', 'titre']), $config->fontsize(), $app->getlistermedia($app::MEDIA_DIR, 'image')); + //$aff->copy($art, $app->getlister(['id', 'titre'])); + $aff->aside($app); + echo '</section>'; + } else { + echo '<section class="lecture">'; + + + $art->autotaglistupdate($app->taglist($app->getlister(['id', 'titre', 'intro', '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 |