diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-03-17 22:15:58 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-03-17 22:15:58 +0100 |
commit | bd20965314da58dd81a19ed20e9b539b7045257a (patch) | |
tree | 4fb453918810e24037fe58c097f10c7d36d3d9fb /public/w | |
parent | a8d40a4ac2f73da9509bde6c8337c13042cc6992 (diff) | |
download | wcms-bd20965314da58dd81a19ed20e9b539b7045257a.tar.gz wcms-bd20965314da58dd81a19ed20e9b539b7045257a.zip |
class stables
Diffstat (limited to 'public/w')
-rw-r--r-- | public/w/index.php | 56 |
1 files changed, 41 insertions, 15 deletions
diff --git a/public/w/index.php b/public/w/index.php index 85c0902..4d28510 100644 --- a/public/w/index.php +++ b/public/w/index.php @@ -8,7 +8,7 @@ require('fn/fn.php'); require('class/class.art.php'); require('class/class.app.php'); $config = include('config.php'); -$app = new App(); +$app = new App($config); session(); @@ -26,6 +26,25 @@ head('article'); // '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); @@ -37,25 +56,32 @@ head('article'); // echo '<p>article exist :' . $app->exist('articlet') . '</p>'; // var_dump($app->exist('articlet')); -// $app->get('articlet'); -// echo '<pre>'; -// print_r($art); -// print_r($app); -// echo '</pre>'; -try { - $bdd = new PDO('mysql:host=localhost;dbname=wcms;charset=utf8', 'root', ''); -} catch (Exeption $e) { - die('Erreur : ' . $e->getMessage()); -} +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>'; + -$q = $bdd->query('SELECT * FROM art WHERE id = articlet'); -$donnees = $q->fetch(); -var_dump($donnees); -$q = closeCursor(); |