smarty ça casse les couilles zebi
This commit is contained in:
parent
b1960b2f35
commit
aec3c845e0
469 changed files with 53465 additions and 69 deletions
33
index.php
Normal file
33
index.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
session_start();
|
||||
require("./vendor/autoload.php");
|
||||
$strCtrl = $_GET['ctrl']??'project';
|
||||
$strMethod = $_GET['action']??'home';
|
||||
$intId = $_GET['id']??null;
|
||||
|
||||
$boolError = false;
|
||||
$strFileName = "./controllers/".$strCtrl."_controller.php";
|
||||
if($intId!=null){
|
||||
echo $intId;
|
||||
}
|
||||
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){
|
||||
echo "error 404 - la page elle existe pas ";
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue