feat : mise en place d'un routeur et form de co OK

This commit is contained in:
Freedyx29
2025-10-10 10:59:19 +02:00
parent bd0f9430c1
commit 718812f299
6 changed files with 143 additions and 0 deletions

6
public/css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

10
public/css/styles.css Normal file
View File

@@ -0,0 +1,10 @@
#formLogin{
background-color: rgb(232, 238, 239);
border:1px solid darkcyan;
border-radius: 10px;
padding: 15px;
}
td a {
color: white !important;;
}

42
public/index.php Normal file
View File

@@ -0,0 +1,42 @@
<?php
session_start();
require_once __DIR__ . "/../controleurs/ControleurAuthentification.php";
// require_once __DIR__ . "/../utils_inc/inc_pdo.php";
define("BASE_URL", "/contribEvo/");
$pdo = new PDO('mysql:host=mysqlsrv;dbname=contrib', "contrib_root", "123abc");
// index.php?=route=maRoute&param1=truc
// => route reçu en get
$route = isset($_GET['route']) ? $_GET['route'] : null;
/*
if (isset($_GET["route"])) {
$route = $_GET["route"];
} else {
$route = null;
}
*/
if ($route == "coucou"){
$ctr = new ControleurAuthentification();
$ctr->coucou();
exit();
}
if ($route == "afficherFormCo") {
$ctr = new ControleurAuthentification();
$ctr->afficherFormCo();
exit();
}
if ($route == "traiterFormCo") {
$ctr = new ControleurAuthentification();
$ctr->traiterFormCo($pdo);
exit();
}
echo "Route inconnue";

7
public/js/bootstrap.bundle.min.js vendored Normal file

File diff suppressed because one or more lines are too long