diff --git a/autoloader.php b/autoloader.php index ca24bd1..ce28dce 100755 --- a/autoloader.php +++ b/autoloader.php @@ -18,42 +18,7 @@ } - - /* Secure Hash Function - * - * @raw Data to hash - * @salt Salt to use for hashing - * @pepper Pepper to use for hashing - * - */ - function secure_hash(String $raw, String $salt='2104\'dsa:">AS"D:', String $pepper='3894.234123;\'21'){ - return hash('sha512', $pepper.hash('sha512', $raw.$salt)); - } - - - - /* AUTOLOADER - * - * @className Nom de la classe appelee - * - */ - function autoloader($className){ - $path = ''; - - /* [1] On utilise le namespace pour localiser - ===============================================*/ - // On remplace les '\' par des '/' - $path = str_replace('\\', '/', $className) . '.php'; - $path = __BUILD__.'/'.$path; - - // Si le fichier existe - if( file_exists($path) ) - require_once $path; // on inclue le fichier - - } - - // On definit l'autoloader comme autoloader (obvious) - spl_autoload_register('autoloader', false, true); + \session_start(); ?> diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..0dca2c6 --- /dev/null +++ b/composer.json @@ -0,0 +1,27 @@ +{ + "name": "ptut", + "description": "PTUT website", + "license": "proprietary", + "authors": [ + { + "name": "xdrm-brackets", + "email": "xdrm.brackets.dev@gmail.com" + }, { + "name": "SeekDasky", + "email": "mascaro.lucas@yahoo.fr" + }, { + "name": "G. Fauvet", + "email": "gfauvet@gmail.com" + } + ], + "autoload": { + "psr-4": { + "api\\": "build/api", + "database\\": "build/database", + "error\\": "build/error", + "http\\": "build/http", + "router\\": "build/router" + }, + "files": ["autoloader.php"] + } +} diff --git a/public_html/index.php b/public_html/index.php index c57fb65..475e764 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -1,4 +1,4 @@ -