From 5a6d7248fcbc3f88fe66f3b52d51087698c3e6ba Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Tue, 17 Apr 2018 15:46:41 +0200 Subject: title intro lien --- public/w/index.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'public/w/index.php') 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 '

' . $_GET['tag'] . '

'; - $aff->tag($app->getlister(), $_GET['tag']); + $aff->tag($app->getlister(['id', 'titre', 'intro', 'tag'], 'id'), $_GET['tag']); + +} elseif (isset($_GET['lien'])) { + echo '

' . $_GET['lien'] . '

'; + $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 ''; -- cgit v1.2.3