diff --git a/Source/Config/config.php b/Source/Config/config.php index 5481e73..2995d00 100644 --- a/Source/Config/config.php +++ b/Source/Config/config.php @@ -15,12 +15,32 @@ $views['questions'] = 'Views/HTML/questions.php'; $views['responses'] = 'Views/HTML/responses.php'; $views['thanks'] = 'Views/HTML/thanks.php'; +$_SERVER['BASE_URI'] = ''; + +$controller['Candidate'] = 'ControllerCandidate'; +$controller['Admin'] = 'ControllerAdmin'; + $googleApis = "https://fonts.googleapis.com"; $googleStatic = "https://fonts.gstatic.com"; $poppins = "https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap"; $icon = "https://cdn.uca.fr/images/favicon/favicon.ico"; $logoUCA = "https://cdn.uca.fr/images/logos/logo_uca_mini_light.png"; +function connect() +{ + $dsn = "mysql:host=localhost;dbname=formulaire;charset=utf8"; + $login = "root"; + + try { + $connection = new Connection($dsn, $login, "root"); + } catch (PDOException $e) { + http_response_code(404); + return http_response_code(); + } + + return $connection; +} + $emailMaxLength=150; $pseudoMaxLength=50; $passwordMaxLength=500;