This repository has been archived by the owner on Jul 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
75 lines (64 loc) · 1.75 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
<?php
if (preg_match('/(?i)msie [5-8]/', $_SERVER['HTTP_USER_AGENT'])) {
echo ($_SERVER['HTTP_USER_AGENT']);
echo "<h2>Sorry! Your browser is outdated and not compatible with this site!!!</h2> "
. "Please use any modern browsers such as Firefox, Opera, Chrome, IE 10+ ";
exit;
}
$dont_check_login = true;
?>
<?php
if (file_exists('install.php')) {
if (isset($_GET['install'])) {
if ($_GET['install'] == 'done') {
// Delete the insatll file after installation
@unlink('install.php');
// Redirect to main page
header('location: index.php');
}
} else {
header('location: install.php');
}
return;
}
//header('location: form.php?class_name=user_dashboard_v');
if (empty($_GET['class_name']) && empty($_GET['cname'])) {
$class_names[] = 'index';
} else if (!empty($_GET['class_name'])) {
$class_names[] = $_GET['class_name'];
} elseif (!empty($_GET['cname'])) {
$class_names[] = $_GET['cname'];
}
if (empty($_GET['doc_type']) && empty($_GET['dtype'])) {
$doc_type = 'content';
} else if (!empty($_GET['doc_type'])) {
$doc_type = $_GET['doc_type'];
} elseif (!empty($_GET['dtype'])) {
$doc_type = $_GET['dtype'];
}
include_once("includes/functions/loader.inc");
switch ($doc_type) {
case 'content' :
if ($class == 'index') {
if (!empty($si) && ($si->default_home_page == 'content')) {
include_once THEME_DIR . '/home_page_template.php';
} else if (!empty($si) && !empty(($si->default_home_page))) {
include_once THEME_DIR . $si->default_home_page;
} else {
header('location: form.php?class_name=user_dashboard_v');
}
} else {
include_once 'content.php';
}
break;
case 'product' :
include_once 'product.php';
break;
case 'form' :
include_once 'form.php';
break;
default :
include_once 'content.php';
break;
}
?>