-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
52 lines (49 loc) · 1.26 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
<?php
/***************************************
* http://www.program-o.com
* PROGRAM O
* Version: 2.4.8
* FILE: index.php
* AUTHOR: Elizabeth Perreau and Dave Morton
* DATE: 02-13-2013
* DETAILS: Program O's starting point
***************************************/
if (!file_exists('config/global_config.php'))
{
# No config exists we will run install
header('location: install/install_programo.php');
}
else
{
$get_vars = filter_input_array(INPUT_GET);
$qs = '';
if (!empty($get_vars))
{
$qs = '?';
foreach ($get_vars as $key => $value)
{
$qs .= "$key=$value&";
}
$qs = rtrim($qs, '&');
}
# Config exists we will goto the bot
$thisFile = __FILE__;
require_once('config/global_config.php');
/** @noinspection PhpUndefinedVariableInspection */
$format = (isset($get_vars['format'])) ? $get_vars['format'] : $format;
$format = strtoupper($format);
switch ($format)
{
case 'JSON':
$gui = 'jquery';
break;
case 'XML':
$gui= 'xml';
break;
default:
$gui = 'plain';
}
if (!defined('SCRIPT_INSTALLED')) header('location: ' . _INSTALL_URL_ . 'install_programo.php');
else header("location: gui/$gui/$qs");
}
?>