-
Notifications
You must be signed in to change notification settings - Fork 22
/
index.php
40 lines (25 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
<?php
//if the 202-config.php doesn't exist, we need to build one
if ( !file_exists( $_SERVER['DOCUMENT_ROOT'] . '/202-config.php') ) {
require_once($_SERVER['DOCUMENT_ROOT'] . '/202-config/functions.php');
//check to make sure this user has php 5 or greater
$php_version = phpversion();
$php_version = substr($php_version,0,1);
if ($php_version < 5) {
_die("Prosper202 requires PHP 5 or greater to run. Your server does not meet the <a href='http://prosper.tracking202.com/apps/about/requirements/'>minimum requirements to run Prosper202</a>. Please either have your hosting provider upgrade to PHP 5 or simply sign up with one of our <a href='http://prosper.tracking202.com/apps/hosting/'>recommended hosting providers</a>.");
}
//require the 202-config.php file
_die("There doesn't seem to be a <code>202-config.php</code> file. I need this before we can get started. Need more help? <a href=\"http://prosper202.com/apps/about/contact/\">Contact Us</a>. You can <a href='/202-config/setup-config.php'>create a <code>202-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file.", "202 › Error");
} else {
require_once($_SERVER['DOCUMENT_ROOT'] . '/202-config/connect.php');
if ( is_installed() == false) {
header('location: /202-config/install.php');
} else {
if ( upgrade_needed() == true) {
header('location: /202-config/upgrade.php');
} else {
header('location: /tracking202/overview/');
// header('location: /202-login.php');
}
}
}