-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
36 lines (25 loc) · 932 Bytes
/
Copy pathindex.php
File metadata and controls
36 lines (25 loc) · 932 Bytes
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
<?php
session_start();
require_once("application/sys/master.php");
$master = master::get_instance();
//create the config class
$master->helper('application/sys/config.php');
$master->config = new config();
//load resources
$master->load($master->config->resources);
//create db connection
$master->DB->con = $master->config->_db();
if(!$master->config->triggered()) {
if($master->location == 'logout')
$master->login->logout();
//check if location is safe, if not make it safe!!!!
if(!$master->controller($master->location)) {
$master->location = $master->config->default_controller;
$master->controller($master->location);
}
//goto location->index
$master->{$master->location}->index();
}
function redirect($loc) {
header('Location: '.BASEPATH.$loc);
}