-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·55 lines (41 loc) · 911 Bytes
/
index.php
File metadata and controls
executable file
·55 lines (41 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
session_start();
error_reporting(-1);
// Load Smarty library
require 'lib/smarty/libs/Smarty.class.php';
require 'app/autoload.php';
use app\Engine;
use app\Controller;
$app = new Engine();
$app->route('/', function(){
$c = new Controller\Front();
$c->home();
});
$app->route('/accueil', function(){
$c = new Controller\Front();
$c->home();
});
$app->route('/deconnexion', function(){
$c = new Controller\Front();
$c->deconnexion();
});
$app->route('/ajouter-categories', function(){
$c = new Controller\Front();
$c->home();
});
$app->route('/ajouter-souscategories', function(){
$c = new Controller\Front();
$c->home();
});
$app->route('/add-task', function(){
$c = new Controller\Front();
$c->addTask();
});
$app->route('/remove-task', function(){
$c = new Controller\Front();
$c->removeTask();
});
$app->map('notFound', function(){
include '404.html';
});
$app->start();