-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathindex.php
63 lines (50 loc) · 1.33 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
<?php
/*
*---------------------------------------------------------------
* CONFIGURATION
*---------------------------------------------------------------
*
* Different variables to be configured
*/
// The directory where your pointclouds are saved
define("DATAFOLDER", "data");
// The filenames of the pointclouds
define("PCFILE", "pc.csv");
define("PCINFO", "info.csv");
define("PCIMG", "img.png");
// Can be development or production
define("ENVIRONMENT", "development");
// The development url
define("DEVELURL", "http://localhost/srv.uib.es/pointclouds/");
// The production url
define("PRODURL", "http://srv.uib.es/pointclouds/");
/*
*---------------------------------------------------------------
* URL PARSER
*---------------------------------------------------------------
*
* Parses the url and load the correct page.
*/
// Parse the url
include('app/helpers/url.php');
$pathInfo = parsePath();
// Load pages
if (sizeof($pathInfo['call_parts']) > 0) {
$page = $pathInfo['call_parts'][0];
switch ($page) {
case 'view':
$pcFolder = (isset($_REQUEST['c']) ? $_REQUEST['c'] : null);
include('app/views/viewer.php');
break;
case '404':
include('app/views/404.php');
break;
default:
include('app/views/home.php');
break;
}
}
else {
include('app/views/home.php');
}
?>