diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-04-17 15:46:41 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-04-17 15:46:41 +0200 |
commit | 5a6d7248fcbc3f88fe66f3b52d51087698c3e6ba (patch) | |
tree | 086d3542a0ec7c3b0e8aeb0ae5d62d7067409bb3 /public/w/index.php | |
parent | 899a4bd60570ff9b77fabe89dd4902f09bbdeb47 (diff) | |
download | wcms-5a6d7248fcbc3f88fe66f3b52d51087698c3e6ba.tar.gz wcms-5a6d7248fcbc3f88fe66f3b52d51087698c3e6ba.zip |
title intro lien
Diffstat (limited to 'public/w/index.php')
-rw-r--r-- | public/w/index.php | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/public/w/index.php b/public/w/index.php index 0a153b0..9c4ee32 100644 --- a/public/w/index.php +++ b/public/w/index.php @@ -34,7 +34,7 @@ if (isset($_POST['action'])) { if ($app->exist($_GET['id'])) { $art = new Art($_POST); $app->update($art); - header('Location: ?id=' . $art->id() . '&edit=1'); + //header('Location: ?id=' . $art->id() . '&edit=1'); } break; @@ -94,7 +94,6 @@ $aff->nav($app); if (isset($_GET['id'])) { - if ($app->exist($_GET['id'])) { $art = $app->get($_GET['id']); @@ -103,7 +102,7 @@ if (isset($_GET['id'])) { $aff->edit($art); $aff->aside($app->lister()); } else { - $aff->lecture($art); + $aff->lecture($art, $app); } } else { @@ -126,10 +125,20 @@ if (isset($_GET['id'])) { } } elseif (isset($_GET['tag'])) { echo '<h4>' . $_GET['tag'] . '</h4>'; - $aff->tag($app->getlister(), $_GET['tag']); + $aff->tag($app->getlister(['id', 'titre', 'intro', 'tag'], 'id'), $_GET['tag']); + +} elseif (isset($_GET['lien'])) { + echo '<h4>' . $_GET['lien'] . '</h4>'; + $aff->lien($app->getlister(['id', 'titre', 'intro', 'lien'], 'id'), $_GET['lien']); } else { - $aff->home($app->lister()); + if (isset($_GET['tri'])) { + $tri = strip_tags($_GET['tri']); + } else { + $tri = 'id'; + } + $aff->search(); + $aff->home2table($app->getlister(['id', 'titre', 'intro', 'lien'], $tri)); } echo '</body>'; |