bludit/index.php

41 lines
741 B
PHP
Raw Normal View History

2015-03-08 14:02:59 -03:00
<?php
2015-05-14 22:07:45 +00:00
/*
* Bludit
* http://www.bludit.com
* Author Diego Najar
2015-07-14 21:07:07 -03:00
* Bludit is opensource software licensed under the MIT license.
2015-05-14 22:07:45 +00: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 00:10:12 -03:00
// Load time init
2015-03-08 14:02:59 -03:00
$loadTime = microtime(true);
2015-05-05 01:00:01 +00:00
// Security constant
2015-03-08 14:02:59 -03:00
define('BLUDIT', true);
2015-06-21 19:01:07 -03:00
// Directory separator
define('DS', DIRECTORY_SEPARATOR);
2015-08-16 21:24:22 -03:00
// PHP paths for init
2015-08-07 21:39:10 -03:00
define('PATH_ROOT', __DIR__.DS);
define('PATH_BOOT', PATH_ROOT.'kernel'.DS.'boot'.DS);
2015-03-08 14:02:59 -03:00
2015-05-05 01:00:01 +00:00
// Init
require(PATH_BOOT.'init.php');
2015-03-08 14:02:59 -03:00
2015-03-27 01:00:01 +00:00
// Admin area
2015-08-16 23:33:49 -03:00
if($Url->whereAmI()==='admin') {
2015-05-05 01:00:01 +00:00
require(PATH_BOOT.'admin.php');
2015-03-27 01:00:01 +00:00
}
// Site
2015-08-16 23:33:49 -03:00
else {
2015-05-05 01:00:01 +00:00
require(PATH_BOOT.'site.php');
2015-03-27 01:00:01 +00:00
}