-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.php
More file actions
52 lines (39 loc) · 1.95 KB
/
Copy pathApp.php
File metadata and controls
52 lines (39 loc) · 1.95 KB
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
<?php
// import Init file:
require_once __DIR__ . '/config/Init.php';
##############################################################
######################### middleware #########################
##############################################################
## public site cluster ##
Middleware::auth('login.php', 'index.php', false);
Middleware::auth('index.php', 'login.php', true);
Middleware::auth('microdraw.php', 'login.php', true);
Middleware::auth('highstakes.php', 'login.php', true);
Middleware::auth('microdraws.php', 'login.php', true);
Middleware::auth('disclaimer.php', 'login.php', true);
Middleware::auth('privacy.php', 'login.php', true);
Middleware::auth('404.php', 'login.php', true);
## public site cluster ##
## status protected pages ##
if (UrlParser::absolutePath() === "microdraw.php" && !Type::info(1, ['allowed'])->allowed) Redirector::home();
if (UrlParser::absolutePath() === "highstakes.php" && !Type::info(2, ['allowed'])->allowed) Redirector::home();
if (UrlParser::absolutePath() === "microdraws.php" && !Type::info(3, ['allowed'])->allowed) Redirector::home();
if (UrlParser::absolutePath() === "unkownpage.php" && !Type::info(4, ['allowed'])->allowed) Redirector::home();
if (UrlParser::absolutePath() === "unkownpage.php" && !Type::info(5, ['allowed'])->allowed) Redirector::home();
if (UrlParser::absolutePath() === "unkownpage.php" && !Type::info(6, ['allowed'])->allowed) Redirector::home();
## status protected pages ##
##############################################################
####################### debuggin only ########################
##############################################################
if (DEBUG_MODE) {
if (UrlParser::absolutePath() === "App.php") {
echo Settings::mode();
}
} else {
if (UrlParser::absolutePath() === "App.php") {
## include 404 page ##
http_response_code(404);
include __DIR__ . "/404.php";
## include 404 page ##
}
}