bludit/index.php

43 lines
732 B
PHP
Raw Normal View History

2015-03-08 18:02:59 +01:00
<?php
2015-05-15 00:07:45 +02:00
/*
* Bludit
* http://www.bludit.com
* Author Diego Najar
2015-07-15 02:07:07 +02:00
* Bludit is opensource software licensed under the MIT license.
2015-05-15 00:07:45 +02:00
*/
// Check installation
if( !file_exists('content/databases/site.php') )
{
header('Location:./install.php');
exit('<a href="./install.php">First, install Bludit</a>');
}
2015-08-04 05:10:12 +02:00
// Load time init
2015-03-08 18:02:59 +01:00
$loadTime = microtime(true);
2015-05-05 03:00:01 +02:00
// Security constant
2015-03-08 18:02:59 +01:00
define('BLUDIT', true);
2015-06-22 00:01:07 +02:00
// Directory separator
define('DS', DIRECTORY_SEPARATOR);
2015-05-05 03:00:01 +02:00
// PHP paths
2015-08-08 02:39:10 +02:00
define('PATH_ROOT', __DIR__.DS);
define('PATH_BOOT', PATH_ROOT.'kernel'.DS.'boot'.DS);
2015-03-08 18:02:59 +01:00
2015-05-05 03:00:01 +02:00
// Init
require(PATH_BOOT.'init.php');
2015-03-08 18:02:59 +01:00
2015-03-27 02:00:01 +01:00
// Admin area
if($Url->whereAmI()==='admin')
{
2015-05-05 03:00:01 +02:00
require(PATH_BOOT.'admin.php');
2015-03-27 02:00:01 +01:00
}
// Site
else
{
2015-05-05 03:00:01 +02:00
require(PATH_BOOT.'site.php');
2015-03-27 02:00:01 +01:00
}