-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
56 lines (45 loc) · 1.13 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
session_start();
require_once 'src/db.class.php';
require __DIR__ . '/vendor/autoload.php';
$router = new \Bramus\Router\Router();
//main page-landing-page
$router->match('GET|POST', '/', function() {
require_once("src/index.php");
});
//faq
$router->match('GET|POST', '/faq', function() {
require_once("src/faq.php");
});
//terms
$router->match('GET|POST', '/terms', function() {
require_once("src/terms.php");
});
//login
$router->match('GET|POST', '/register', function() {
require_once("src/register.php");
});
//register
$router->match('GET|POST', '/login', function() {
require_once("src/login.php");
});
//account
$router->match('GET|POST', '/account', function() {
require_once("src/account.php");
});
//chat
$router->match('GET|POST', '/chat', function() {
require_once("src/chat.php");
});
//privacy
$router->match('GET|POST', '/privacy', function() {
require_once("src/privacy.php");
});
//logout
$router->match('GET|POST', '/logout', function() {
session_destroy();
header("Location: /login");
});
// Run it!
$router->run();
?>