forked from RaspbianFrance/raspisms
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
executable file
·36 lines (30 loc) · 939 Bytes
/
index.php
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
<?php
session_start();
##############
# INCLUSIONS #
##############
//On va inclure l'ensemble des fichiers necessaires
require_once('./mvc/constants.php');
require_once('./mvc/autoload.php');
require_once('./mvc/conn_bdd.php');
require_once('./mvc/secho.php');
require_once('./mvc/Controller.php');
require_once('./mvc/Router.php');
require_once('./mvc/Model.php');
#########
# MODEL #
#########
//On va appeler un modèle, est l'initialiser
$db = new DataBase($bdd);;
//On va ajouter les réglages globaux de RaspiSMS modifiables via l'interface
$settings = $db->getFromTableWhere('settings');
foreach ($settings as $setting)
{
define('RASPISMS_SETTINGS_' . mb_convert_case($setting['name'], MB_CASE_UPPER), $setting['value']);
}
###########
# ROUTAGE #
###########
//Partie gérant l'appel des controlleurs
$router = new Router($_SERVER['REQUEST_URI']);
$router->loadRoute($_SERVER['REQUEST_URI']);