From 8ad36569c333324614a864225d507972247f22be Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 2 May 2018 00:54:41 +0200 Subject: bugs corriges css + top --- public/w/index.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'public/w') diff --git a/public/w/index.php b/public/w/index.php index d961d56..695ce56 100644 --- a/public/w/index.php +++ b/public/w/index.php @@ -38,6 +38,16 @@ if (isset($_POST['action'])) { } break; + case 'template': + if ($app->exist($_GET['id'])) { + $template = $app->get($_POST['template']); + $art = $app->get($_POST['id']); + $art->setcss($template->css()); + $app->update($art); + header('Location: ?id=' . $art->id() . '&edit=1'); + } + break; + case 'delete': if ($app->exist($_GET['id'])) { $art = new Art($_POST); @@ -89,7 +99,6 @@ $aff->head($titre, 'w'); // ______________________________________________________ B O D Y _______________________________________________________________ -echo ''; $aff->nav($app); if (isset($_GET['id'])) { @@ -100,6 +109,7 @@ if (isset($_GET['id'])) { if (isset($_GET['edit']) and $_GET['edit'] == 1) { $aff->edit($art); + $aff->template($art, $app->lister()); $aff->aside($app->lister()); } else { $aff->lecture($art, $app); @@ -137,11 +147,8 @@ if (isset($_GET['id'])) { } else { $tri = 'id'; } - $aff->search(); $aff->home2table($app->getlister(['id', 'titre', 'intro', 'lien'], $tri)); } -echo ''; - ?> -- cgit v1.2.3