From 6429cb3f90a23fd1aae0d2298c54e8a88d213bcf Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sat, 17 Mar 2018 12:33:32 +0100 Subject: Added app class and reorganisation of the folders --- class/art.php | 12 ------------ class/class.app.php | 30 ++++++++++++++++++++++++++++++ class/class.art.php | 12 ++++++++++++ index.php | 0 public/index.php | 0 public/rsc/css/style.css | 0 public/w/art.php | 0 public/w/art_create.php | 0 public/w/art_delete.php | 0 public/w/art_display.php | 0 public/w/art_edit.php | 0 public/w/index.php | 21 +++++++++++++++++++++ style.css | 0 w/art.php | 0 w/art_create.php | 0 w/art_delete.php | 0 w/art_display.php | 0 w/art_edit.php | 0 w/index.php | 20 -------------------- 19 files changed, 63 insertions(+), 32 deletions(-) delete mode 100644 class/art.php create mode 100644 class/class.app.php create mode 100644 class/class.art.php delete mode 100644 index.php create mode 100644 public/index.php create mode 100644 public/rsc/css/style.css create mode 100644 public/w/art.php create mode 100644 public/w/art_create.php create mode 100644 public/w/art_delete.php create mode 100644 public/w/art_display.php create mode 100644 public/w/art_edit.php create mode 100644 public/w/index.php delete mode 100644 style.css delete mode 100644 w/art.php delete mode 100644 w/art_create.php delete mode 100644 w/art_delete.php delete mode 100644 w/art_display.php delete mode 100644 w/art_edit.php delete mode 100644 w/index.php diff --git a/class/art.php b/class/art.php deleted file mode 100644 index 6b126ea..0000000 --- a/class/art.php +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/class/class.app.php b/class/class.app.php new file mode 100644 index 0000000..4078c17 --- /dev/null +++ b/class/class.app.php @@ -0,0 +1,30 @@ +bdd = new PDO('mysql:host=' . $host . ';dbname=' . $dbname . ';charset=utf8', $user, $password); + } catch (Exeption $e) { + die('Erreur : ' . $e->getMessage()); + } + } + + public function getBdd() + { + return $this->bdd; + } + + public function createfrombdd($id, $bdd) + { + + } + +} +?> \ No newline at end of file diff --git a/class/class.art.php b/class/class.art.php new file mode 100644 index 0000000..6b126ea --- /dev/null +++ b/class/class.art.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/index.php b/index.php deleted file mode 100644 index e69de29..0000000 diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..e69de29 diff --git a/public/rsc/css/style.css b/public/rsc/css/style.css new file mode 100644 index 0000000..e69de29 diff --git a/public/w/art.php b/public/w/art.php new file mode 100644 index 0000000..e69de29 diff --git a/public/w/art_create.php b/public/w/art_create.php new file mode 100644 index 0000000..e69de29 diff --git a/public/w/art_delete.php b/public/w/art_delete.php new file mode 100644 index 0000000..e69de29 diff --git a/public/w/art_display.php b/public/w/art_display.php new file mode 100644 index 0000000..e69de29 diff --git a/public/w/art_edit.php b/public/w/art_edit.php new file mode 100644 index 0000000..e69de29 diff --git a/public/w/index.php b/public/w/index.php new file mode 100644 index 0000000..6299fd1 --- /dev/null +++ b/public/w/index.php @@ -0,0 +1,21 @@ +createfrombdd($id, $app->getBdd()); + +include($root . '/head.php') + +?> \ No newline at end of file diff --git a/style.css b/style.css deleted file mode 100644 index e69de29..0000000 diff --git a/w/art.php b/w/art.php deleted file mode 100644 index e69de29..0000000 diff --git a/w/art_create.php b/w/art_create.php deleted file mode 100644 index e69de29..0000000 diff --git a/w/art_delete.php b/w/art_delete.php deleted file mode 100644 index e69de29..0000000 diff --git a/w/art_display.php b/w/art_display.php deleted file mode 100644 index e69de29..0000000 diff --git a/w/art_edit.php b/w/art_edit.php deleted file mode 100644 index e69de29..0000000 diff --git a/w/index.php b/w/index.php deleted file mode 100644 index ebf7106..0000000 --- a/w/index.php +++ /dev/null @@ -1,20 +0,0 @@ -createfrombdd($id, bddconnect($config['host'], $config['dbname'], $config['user'], $config['password'])); - -include($root . '/head.php') - -?> \ No newline at end of file -- cgit v1.2.3