-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
53 lines (49 loc) · 1.18 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
<?php
/**
* SampiCMS main file
*
* Starts SampiCMS
*
* @author Sven Dubbeld <[email protected]>
* @version 0.0.1-alpha
*/
/**
* Namespace
*/
namespace SampiCMS;
use SampiCMS;
// Use gzip for improved speeds, if available
if (substr_count ( $_SERVER ['HTTP_ACCEPT_ENCODING'], 'gzip' )) {
ob_start ( "ob_gzhandler" );
} else {
ob_start ();
}
session_start();
/**
* Absolute path to the root of SampiCMS.
*/
define ( 'SampiCMS\ROOT', dirname(__FILE__) );
/**
* Relative (web) path to the root of SampiCMS.
*/
define ( 'SampiCMS\REL_ROOT', substr($_SERVER['SCRIPT_NAME'],0,-10) );
/**
* Absolute path to the admin root.
*/
define ( 'SampiCMS\ADMIN_ROOT', SampiCMS\ROOT . '/sampi/admin' );
/**
* Relative (web) path to the root of SampiCMS.
*/
define ( 'SampiCMS\ADMIN_REL_ROOT', SampiCMS\REL_ROOT . '/sampi/admin' );
/**
* Absolute path to the mobile API root.
*/
define ( 'SampiCMS\API_ROOT', SampiCMS\ADMIN_ROOT . '/mobileapi' );
/**
* Relative (web) path to the mobile API root.
*/
define ( 'SampiCMS\API_REL_ROOT', SampiCMS\ADMIN_REL_ROOT . '/mobileapi' );
require_once SampiCMS\ROOT . '/sampi/settings.php';
require_once SampiCMS\ROOT . '/sampi/functions.php';
init ();
?>