diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-09-02 16:19:13 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-09-02 16:19:13 +0200 |
commit | cbecc0dfc819febf4c2b36791d5a2a7e69d842af (patch) | |
tree | c181eb875cef9ca6a48f0b807905d7a2c15bee98 /public/w/article.php | |
parent | e9b2ca7c06875069fa03379258625490872cc33d (diff) | |
download | wcms-cbecc0dfc819febf4c2b36791d5a2a7e69d842af.tar.gz wcms-cbecc0dfc819febf4c2b36791d5a2a7e69d842af.zip |
2.5 mobile update + minor upgrades and fixes
Diffstat (limited to 'public/w/article.php')
-rw-r--r-- | public/w/article.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/public/w/article.php b/public/w/article.php new file mode 100644 index 0000000..e5cfff7 --- /dev/null +++ b/public/w/article.php @@ -0,0 +1,28 @@ +<?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'])); + $aff->copy($art, $app->getlister(['id', 'titre'])); + $aff->aside($app); + echo '</section>'; + } else { + echo '<section class="lecture">'; + $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 |