-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·56 lines (41 loc) · 1.15 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
<?php ob_start();
if (! isset($_SESSION)) {
session_start();
}
// header('location: mobile/index.php');
// exit();
require 'Mobile-Detect-2.8.34/Mobile_Detect.php';
$detect = new Mobile_Detect();
if ($detect->isMobile()) {
header('location: mobile/index.php');
exit();
} else {
if (! isset($_SESSION)) {
session_start();
}
if (! (isset($_SESSION['login']) && $_SESSION['login'] == true)) {
header('location: loginView.php');
exit();
}
if (($_SESSION['tipo'] == '1') || ($_SESSION['tipo'] == '2')) {
header('location: application/index.php');
exit();
}
require 'init.php';
require_once 'application/modulos/dao/Connection.php';
$fullpath = "";
$ret = array();
if (strpos($_SERVER['REQUEST_URI'], "=") != 0) {
$url = Urlnow();
} else {
$url = 'celulas.fabianospdev.com.br/index.php';
}
$ret = viewpage($url);
if ((isset($ret) !== false) && $ret !== "") {
$fullpath = $ret[0] . '/' . $ret[1] . '/' . $ret[2] . '.php';
} else {
$fullpath = "begin.php";
}
include_once 'indexView.php';
} // fim do else inicial
?>