Skip to content

Commit

Permalink
Update index.php
Browse files Browse the repository at this point in the history
Ajout de commentaire et Todo.
  • Loading branch information
nienfba committed Jun 10, 2015
1 parent f5bc52a commit 1b3b467
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
<?php
/**
* Controleur principal
* Configuration de l'application et appel des controleurs
* @author Fabien Selles
* @copyright Parc National des Écrins
*/
try
{
/* Initialisation de l'application */
include_once('config/bootstrap.php');

/*Récupération du controler et de l'action*/
if(isset($_GET['controler']) && $_GET['controler']!='')
$controler = trim(htmlentities($_GET['controler']));
if(isset($_GET['action']) && $_GET['action']!='')
$action = trim(htmlentities($_GET['action']));


/* Appel du controleur */
$controler = new $controler($action);
}
catch(Exception $e)
{
/* Gestion des exceptions et erreurs catchables selon le mode Debug */
if (config::get('debug') == true)
{
echo '<pre>';
Expand All @@ -25,6 +34,7 @@
}
else
{
/* ToDo : afficher un message lisible utilisateur */
echo 'No debug';
}
}
Expand Down

0 comments on commit 1b3b467

Please sign in to comment.