plateforme-tfjm2/server_files/config.php

37 lines
890 B
PHP
Raw Normal View History

2019-08-21 20:56:46 +00:00
<?php
/**
* Config options
*/
$YEAR = $_ENV["TFJM_YEAR"];
$URL_BASE = $_ENV["TFJM_URL_BASE"];
$LOCAL_PATH = $_ENV["TFJM_LOCAL_PATH"];
$MAIL_ADDRESS = $_ENV["TFJM_MAIL_ADDRESS"];
2019-08-21 20:56:46 +00:00
/**
* DB infos
*/
$DB_HOST = $_ENV["TFJM_DB_HOST"];
$DB_NAME = $_ENV["TFJM_DB_NAME"];
$DB_USER = $_ENV["TFJM_DB_USER"];
$DB_PASSWORD = $_ENV["TFJM_DB_PASSWORD"];
2019-08-21 20:56:46 +00:00
try {
$DB = new PDO("mysql:host=$DB_HOST;dbname=$DB_NAME;charset=utf8", "$DB_USER", "$DB_PASSWORD", array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
2019-08-21 20:56:46 +00:00
}
catch (Exception $ex) {
die("Erreur lors de la connexion à la base de données : " . $ex->getMessage());
}
session_start();
setlocale(LC_ALL, "fr_FR.utf8");
2019-09-06 11:48:50 +00:00
require_once "model.php";
require_once "classes/Role.php";
require_once "classes/Team.php";
require_once "classes/Tournament.php";
require_once "classes/User.php";
require_once "classes/ValidationStatus.php";
2019-08-21 20:56:46 +00:00
2019-09-06 11:48:50 +00:00
loadUserValues();