forked from rahulsalla/csf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
78 lines (60 loc) · 1.56 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
<?php
/**
* Main index file
*
* PHP version 5
*
* @package Csf
* @author Robert Pahle <[email protected]>
* @author Rahul Salla <[email protected]>
* @license https://gdta.asu.edu/license.txt
* @link http://gdta.asu.edu/csf
**/
$browser = $_SERVER['HTTP_USER_AGENT'];
if (preg_match('/Chrome/i', $browser) == false) {
# echo 'Warning: Using a browser other than Chrome is not supported...';
# echo 'You are currently using '. $browser;
}
if (!array_key_exists('id', $_GET)) {
header('Location: '.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&id='.time());
}
if (array_key_exists('dashboard', $_GET)) {
$dashboard = $_GET['dashboard'];
} else {
$dashboard = '';
}
if (array_key_exists('setup', $_GET)) {
$setup = $_GET['setup'];
} else {
$setup = '';
}
if (array_key_exists('id', $_GET)) {
$idvalue = $_GET['id'];
} else {
$idvalue = '';
}
if (array_key_exists('uid', $_GET)) {
$uid = $_GET['uid'];
} else {
$uid = '';
}
require_once "includes/optionFunctions.php";
require_once "includes/functions.php";
#$_SESSION['demo'] = 'test';
#var_dump($_SESSION);
#die();
if (array_key_exists('dashboard', $_GET)) {
$dashboard = $_GET['dashboard'];
require_once("includes/user.php");
checkauth('dashboard='.$dashboard);
start_dashboard();
start_options_javascript();
put_javascript();
echo place_inputs();
echo place_vizs();
stop_dashboard();
} else {
require_once("includes/user.php");
checkauth('dashboard_list');
show_dashboardlist();
}