-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
42 lines (34 loc) · 810 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
35
36
37
38
39
40
41
42
<?php
/**
* Auteur : CARDINAL Florian
* Date : 02/05/2020 14:01
* Page : index.php
*/
declare(strict_types = 1);
require_once('./core/connect.php');
require_once('./core/logger.php');
require_once('./core/services.php');
require_once('./core/models/ACMPModel.php');
session_start();
if(
!empty($_SERVER['HTTP_X_REQUESTED_WITH'])
&& (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest')
&& (strtolower($_SERVER['REQUEST_METHOD']) === 'post')
) {
/**
* XHR Request Only
*/
require_once('./core/controllers/ACMPController.php');
require_once('./core/XHRRoute.php');
log::write('XHR');
}
else {
/**
* HTTP Request & Other
*/
require_once('./core/HTTPRoute.php');
log::write(strtoupper($_SERVER['REQUEST_SCHEME']));
}
/**
* END
*/