backup du projet

This commit is contained in:
Yasder5
2026-02-26 00:19:11 +01:00
commit 4655c05be6
670 changed files with 87655 additions and 0 deletions

36
index.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
session_start();
require(__DIR__ . "/vendor/autoload.php");
//environnement
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->safeLoad();
$strCtrl = $_GET['ctrl']??'project';
$strMethod = $_GET['action']??'home';
$boolError = false;
$strFileName = "./controllers/".$strCtrl."_controller.php";
if(file_exists($strFileName)){
require($strFileName);
$strClassName = ucfirst($strCtrl)."Ctrl";
if(class_exists($strClassName)){
$objController = new $strClassName();
if(method_exists($objController,$strMethod)){
$objController->$strMethod ();
}else{
$boolError = true;
}
}else{
$boolError = true;
}
}else{
$boolError = true;
}
if($boolError){
header("Location:index.php?ctrl=error&action=error_404");
}