From 53a5f6b267b1deb8c5f10973c1a238ff74a33e5a Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sat, 17 Mar 2018 11:19:05 +0100 Subject: Commit initial --- .gitignore | 2 ++ class/art.php | 12 +++++++++++ composer.json | 5 +++++ composer.lock | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ config.sample.php | 11 ++++++++++ fn/fn.php | 28 ++++++++++++++++++++++++ index.php | 0 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 +++++++++++++++++ 14 files changed, 142 insertions(+) create mode 100644 .gitignore create mode 100644 class/art.php create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 config.sample.php create mode 100644 fn/fn.php create mode 100644 index.php create mode 100644 style.css create mode 100644 w/art.php create mode 100644 w/art_create.php create mode 100644 w/art_delete.php create mode 100644 w/art_display.php create mode 100644 w/art_edit.php create mode 100644 w/index.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..19c393f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +vendor/* +config.php \ No newline at end of file diff --git a/class/art.php b/class/art.php new file mode 100644 index 0000000..6b126ea --- /dev/null +++ b/class/art.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..74ec1b5 --- /dev/null +++ b/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "michelf/php-markdown": "^1.8" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..ddf48ac --- /dev/null +++ b/composer.lock @@ -0,0 +1,64 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "32c0f24f10c2954c56607edd1e5f94e9", + "packages": [ + { + "name": "michelf/php-markdown", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/michelf/php-markdown.git", + "reference": "01ab082b355bf188d907b9929cd99b2923053495" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/michelf/php-markdown/zipball/01ab082b355bf188d907b9929cd99b2923053495", + "reference": "01ab082b355bf188d907b9929cd99b2923053495", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Michelf\\": "Michelf/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Michel Fortin", + "email": "michel.fortin@michelf.ca", + "homepage": "https://michelf.ca/", + "role": "Developer" + }, + { + "name": "John Gruber", + "homepage": "https://daringfireball.net/" + } + ], + "description": "PHP Markdown", + "homepage": "https://michelf.ca/projects/php-markdown/", + "keywords": [ + "markdown" + ], + "time": "2018-01-15T00:49:33+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/config.sample.php b/config.sample.php new file mode 100644 index 0000000..9238ddb --- /dev/null +++ b/config.sample.php @@ -0,0 +1,11 @@ + 'localhost', + 'dbname' => 'wiki', + 'user' => 'root', + 'password' => 'mdp', + 'domaine' => 'vincent.club1.fr' +] + +?> \ No newline at end of file diff --git a/fn/fn.php b/fn/fn.php new file mode 100644 index 0000000..e64a9c4 --- /dev/null +++ b/fn/fn.php @@ -0,0 +1,28 @@ +secure + +session + +getMessage()); + } + return $bdd; +} + +function session() +{ + session_start(); +} + +function secure() +{ + if (!isset($_SESSION['id'])) { + header("location: /"); + } +} +?> + diff --git a/index.php b/index.php new file mode 100644 index 0000000..e69de29 diff --git a/style.css b/style.css new file mode 100644 index 0000000..e69de29 diff --git a/w/art.php b/w/art.php new file mode 100644 index 0000000..e69de29 diff --git a/w/art_create.php b/w/art_create.php new file mode 100644 index 0000000..e69de29 diff --git a/w/art_delete.php b/w/art_delete.php new file mode 100644 index 0000000..e69de29 diff --git a/w/art_display.php b/w/art_display.php new file mode 100644 index 0000000..e69de29 diff --git a/w/art_edit.php b/w/art_edit.php new file mode 100644 index 0000000..e69de29 diff --git a/w/index.php b/w/index.php new file mode 100644 index 0000000..ebf7106 --- /dev/null +++ b/w/index.php @@ -0,0 +1,20 @@ +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