forked from asxzy/Program-O
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
40 lines (37 loc) · 1.02 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
<?php
/***************************************
* http://www.program-o.com
* PROGRAM O
* Version: 2.3.1
* 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
{
# Config exists we will goto the bot
$thisFile = __FILE__;
require_once('config/global_config.php');
$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');
elseif (file_exists(_INSTALL_PATH_ . 'upgrade.php')) header('Location: ' . _INSTALL_URL_ . 'upgrade.php?returnTo=' . $gui);
else header("location: gui/$gui");
}
?>