aboutsummaryrefslogtreecommitdiff
path: root/public/w/index.php
blob: 99d8cb6000f284f0cd6ec7ea67cccd1274284823 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php

//inw

require('../../fn/fn.php');
require('../../class/class.art.php');
require('../../class/class.app.php');
$config = include('../../config.php');
$app = new App($config);

session();

// fin de in


head('article');


// $art = new Art([
//     'id' => '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 '<pre>';
// print_r($art);
// print_r($app);
// echo '</pre>';

// $app->add($art);

// echo '<p>art count :' . $app->count() . '</p>';
// echo '<p>article exist :' . $app->exist('articlet') . '</p>';
// var_dump($app->exist('articlet'));



echo '<pre>';
$art = $app->get('articlet');

var_dump($art);

echo 'count : ' . $app->count();

 var_dump($app->exist('bouffffe'));
 var_dump($app->exist('bouffe'));


 $art2 = new Art($arraytest);

//  $app->add($art2);

$app->update($art2);

var_dump($app->getlist());

echo '</pre>';







?>