Location: PHPKode > projects > Exero CMS > upload/global.php
<?
/*========================================*\
| Exero CMS                                |
|==========================================|
|          http://ecms.getox.net           |
|https://sourceforge.net/projects/exerocms/|
|==========================================|
|     Exero CMS is released under the      |
|     GNU General Public License (GPL)     |
| opensource.org/licenses/gpl-license.php  |
\*========================================*/
// Start the session
session_start();
// Get Config File
require("config.php");
// Include MySQL Class
include("class/mysql.php");
// Connect to the Database
$db = new ecmsDatabase;
$db->connect($database['server'],$database['username'],$database['password']);
$db->selectdb($database['database']);
// Include ecms Core class
include("class/core.php");
$ecms = new ExeroCMS;
$ecms->init();
// Include User Class
include("class/user.php");
$user = new ecmsUser;
$user->check();
// Theme
$ecms->theme = $ecms->settings['defaulttheme'];
// Include functions
include("functions/functions.php");

// Check if SEO links are enabled
if($ecms->settings['mod_rewrite']) {
	$_REQUEST = modrewriteurl();
}
if(isset($_REQUEST['module'])) {
	$ecms->thismodule = $_REQUEST['module'];
} else {
	$defaultmod = explode("/",$ecms->settings['defaultmod']);
	$ecms->thismodule = $defaultmod['0'];
}
$ecms->rooturl = '/'.str_replace(array('index.php','/'),'',$_SERVER['PHP_SELF']);

// Check if site is active
if(!$ecms->settings['siteactive']) {
	$message = $ecms->settings['maintmessage'];
	include("themes/$ecms->theme/error.php");
	exit;
}
// Load Global Modules
$globalmodules = $db->query("SELECT * FROM ".TABLE_PREFIX."globalmodules");
while($globalmod = $db->fetch_array($globalmodules)) {
	include("modules/".$globalmod['module']."/".$globalmod['file']);
}
?>
Return current item: Exero CMS