| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
// All installation specific parameters should be in a file |
|---|
| 6 |
// that is not part of the standard distribution. |
|---|
| 7 |
if (!file_exists(dirname(__FILE__)."/config.php")) { |
|---|
| 8 |
die('Elgg configuration error: config.php is missing. Please see INSTALL file.'); |
|---|
| 9 |
} |
|---|
| 10 |
require_once(dirname(__FILE__)."/config.php"); |
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
if (!file_exists(dirname(__FILE__)."/.htaccess")) { |
|---|
| 14 |
die('Elgg configuration error: .htaccess is missing. Please see INSTALL file.'); |
|---|
| 15 |
} |
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
require_once(dirname(__FILE__).'/sanitychecks.php'); |
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
require_once($CFG->dirroot.'lib/datalib.php'); |
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
require_once($CFG->dirroot.'lib/elgglib.php'); |
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
require_once($CFG->dirroot.'lib/setup.php'); |
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
require_once(dirname(__FILE__)."/includes_system.php"); |
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
require_once($CFG->dirroot.'lib/constants.php'); |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
require_once($CFG->dirroot.'lib/dbsetup.php'); |
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
* INSERT PLUGINS HERE |
|---|
| 40 |
* Eventually this should be replaced with plugin autodiscovery |
|---|
| 41 |
****************************************************************************/ |
|---|
| 42 |
|
|---|
| 43 |
// XMLRPC |
|---|
| 44 |
// @include($CFG->dirroot . "units/rpc/main.php"); |
|---|
| 45 |
|
|---|
| 46 |
/*************************************************************************** |
|---|
| 47 |
* CONTENT MODULES |
|---|
| 48 |
* This should make languages easier, although some kind of |
|---|
| 49 |
* selection process will be required |
|---|
| 50 |
****************************************************************************/ |
|---|
| 51 |
|
|---|
| 52 |
// General |
|---|
| 53 |
include_once($CFG->dirroot . "content/general/main.php"); |
|---|
| 54 |
|
|---|
| 55 |
include_once($CFG->dirroot . "content/mainindex/main.php"); |
|---|
| 56 |
|
|---|
| 57 |
include_once($CFG->dirroot . "content/users/main.php"); |
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
* HELP MODULES |
|---|
| 61 |
****************************************************************************/ |
|---|
| 62 |
|
|---|
| 63 |
// Include main |
|---|
| 64 |
include_once($CFG->dirroot . "help/mainindex/main.php"); |
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
@include($CFG->dirroot . "units/tinymce/main.php"); |
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
// require($CFG->dirroot . "units/calendar/main.php"); |
|---|
| 71 |
|
|---|
| 72 |
/*************************************************************************** |
|---|
| 73 |
* START-OF-PAGE RUNNING |
|---|
| 74 |
****************************************************************************/ |
|---|
| 75 |
|
|---|
| 76 |
run("init"); |
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
// and walled garden functionality is turned on, redirect to |
|---|
| 80 |
// the logon screen |
|---|
| 81 |
if (!empty($CFG->walledgarden) && context != "login" && !logged_on) { |
|---|
| 82 |
|
|---|
| 83 |
header("Location: " . $CFG->wwwroot . "login/index.php"); |
|---|
| 84 |
exit(); |
|---|
| 85 |
|
|---|
| 86 |
} |
|---|
| 87 |
|
|---|
| 88 |
?> |
|---|