bludit/index.php

50 lines
860 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
* All Bludit code is released under the GNU General Public License.
*/
// Check installation
if( !file_exists('content/databases/site.php') )
{
header('Location:./install.php');
exit('<a href="./install.php">First, install Bludit</a>');
}
2015-03-08 18:02:59 +01:00
// DEBUG:
$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-06-22 00:01:07 +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
}
2015-03-08 18:02:59 +01:00
// DEBUG:
2015-05-05 03:00:01 +02:00
// Print all variables/objects
//print_r(get_defined_vars());
//var_dump($_SESSION);
//var_dump($Login->fingerPrint());