'prout', // 'titre' => 'Prout', // 'soustitre' => 'mega prout !', // 'intro' => 'bienvenue dans le mega prout', // 'datemodif' => new DateTimeImmutable(null, timezone_open("Europe/Paris")) // ]); // $arraytest = ([ // 'id' => 'articlet2', // 'titre' => 'titre', // 'soustitre' => 'soustitre', // 'intro' => 'intro', // 'tag' => 'sans tag,', // 'datecreation' => '2018-03-17 18:31:34', // 'datemodif' => '2018-03-17 18:31:34', // 'css' => 'display: inline:', // 'html' => 'coucou les loulous', // 'secure' => 0, // 'couleurtext' => '#000000', // 'couleurbkg' => '#ffffff', // 'couleurlien' => '#2a3599' // ]); // $art = new Art($arreytest); // echo '
';
// print_r($art);
// print_r($app);
// echo '
'; // $app->add($art); // echo '

art count :' . $app->count() . '

'; // echo '

article exist :' . $app->exist('articlet') . '

'; // var_dump($app->exist('articlet')); $session = 2; if (isset($_GET['id'])) { if ($session == 2) { ?> exist($_GET['id'])) { if (isset($_POST['action']) and $_POST['action'] == 'update') { $art = new Art($_POST); var_dump($art); $app->update($art); header('Location: ?id=' . $art->id() . '&edit=1'); } $art = $app->get($_GET['id']); if (isset($_GET['display']) and $_GET['display'] == 1) { $art->display($session); } if (isset($_GET['edit']) and $_GET['edit'] == 1) { $art->edit($session); } } else { if (isset($_POST['action'])) { if ($_POST['action'] == 'new') { $art = new Art($_GET); $art->default(); var_dump($art); $app->add($art); header('Location: ?id=' . $_GET['id'] . '&edit=1'); } } else { echo '

Cet article n\'éxiste pas encore

'; if ($session >= 2) { echo '
'; } echo 'retour maison'; } } } else { echo "

Bienvenue sur ce site.

"; $app->menu($session); } ?>