aboutsummaryrefslogtreecommitdiff
path: root/public/w/index.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-05-02 00:54:41 +0200
committervincent-peugnet <v.peugnet@free.fr>2018-05-02 00:54:41 +0200
commit8ad36569c333324614a864225d507972247f22be (patch)
treeb42ddb543f9370d4e1ac5400047d7138bdbeab7d /public/w/index.php
parentdf7d23a090526aff78a60872f7ba5d1169cbc735 (diff)
downloadwcms-8ad36569c333324614a864225d507972247f22be.tar.gz
wcms-8ad36569c333324614a864225d507972247f22be.zip
bugs corriges css + top
Diffstat (limited to 'public/w/index.php')
-rw-r--r--public/w/index.php15
1 files changed, 11 insertions, 4 deletions
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 '<body>';
$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 '</body>';
-
?>