forked from TheGamesDB/TheGamesDB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
60 lines (50 loc) · 1.21 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
57
58
59
60
<?php
## Workaround Fix for lack of "register globals" in PHP 5.4+
require_once("globalsfix.php");
## Connect to the database
include("include.php");
## Other Includes
include("extentions/wideimage/WideImage.php"); ## Image Manipulation Library
$time = time();
## Load Modules
include("modules/mod_userinit.php");
include("modules/mod_language.php");
include("modules/mod_main.php");
include("modules/mod_elasticsearch.php");
include("modules/mod_game.php");
include("modules/mod_platform.php");
include("modules/mod_comment.php");
include("modules/mod_user.php");
include("modules/mod_admin.php");
include("modules/mod_other.php");
if ($tab != "login" && isset($redirect))
{
header("Location: $baseurl$redirect");
exit;
}
## Default tab
if ($tab == "") {
$tab = 'mainmenu';
}
if($tab != "mainmenu")
{
if(!isset($headless))
{
$tabFile = "tab_$tab.php";
if (!file_exists($tabFile)) {
header("HTTP/1.0 404 Not Found");
$tabFile = "tab_404.php";
}
// Load Template Header
include("templates/default/header.php");
// Load Tab Content
include($tabFile);
// Load Template Header
include("templates/default/footer.php");
}
}
else
{
include("templates/default/front.php");
}
?>