-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
94 lines (71 loc) · 2.77 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
// Instantiate the object broker since it will keep
// track of all objects later on and will be provided to every object
// in order to allow easy interaction
include_once('object_broker.php.inc');
$object_broker = new OBJECT_BROKER();
// NOW we instantiate objects that are needed in order to get things
// going on a regular basis, like writers, databases, etc.
include_once('controllers/controller_config.php.inc');
$config = $object_broker->instance['config'] = new CONTROLLER_CONFIG();
include_once('controllers/controller_db.php.inc');
// connect to basic database
$db = $object_broker->instance['db'] = new CONTROLLER_DB($object_broker);
include_once('controllers/controller_session.php.inc');
$session = $object_broker->instance['session'] = new CONTROLLER_SESSION($object_broker);
require('./vendor/autoload.php');
use Jaxon\Jaxon;
use function Jaxon\jaxon;
$jaxon = jaxon();
include('controllers/controller_jaxon.php.inc');
$jaxon->register(Jaxon::CALLABLE_CLASS, Interactives::class);
if($jaxon->canProcessRequest())
{
$jaxon->processRequest();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>EEG Registrierungsportal | R-EEG-ISTRY</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="/assets/css/main.css" />
<link rel="stylesheet" href="/assets/css/secondary.css" />
</head>
<body class="is-preload">
<?php
if(isset($_REQUEST['join']))
{
include_once('views/view_join.inc.php');
$view_join = new VIEW_JOIN($object_broker);
$view_join->view_render();
}
elseif(isset($_REQUEST['lookup']))
{
include_once('views/view_lookup.inc.php');
$view_lookup = new VIEW_LOOKUP($object_broker);
$view_lookup->view_render();
}
elseif(isset($_REQUEST['debug']))
{
include_once('views/view_debug.inc.php');
$view_debug = new VIEW_DEBUG();
$view_debug->view_render();
}
else
{
include_once('views/view_default.inc.php');
view_render();
}
?>
<!-- Scripts -->
<script src="assets/js/main.js"></script>
</body>
<!-- Jaxon CSS -->
<?php echo $jaxon->getCss(), "\n"; ?>
<!-- Jaxon JS -->
<?php echo $jaxon->getJs(), "\n"; ?>
<!-- Jaxon script -->
<?php echo $jaxon->getScript(), "\n"; ?>
</html>