2015-03-08 18:02:59 +01:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
|
2018-07-25 23:42:00 +02:00
|
|
|
// // Start session if the cookie is defined
|
|
|
|
// if (Cookie::get('BLUDIT-KEY')) {
|
|
|
|
// if (!Session::started()) {
|
|
|
|
// Session::start();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
2016-01-08 00:43:09 +01:00
|
|
|
// Load plugins rules
|
|
|
|
include(PATH_RULES.'60.plugins.php');
|
|
|
|
|
2017-07-05 19:59:51 +02:00
|
|
|
// Plugins before all
|
|
|
|
Theme::plugins('beforeAll');
|
2016-01-08 00:43:09 +01:00
|
|
|
|
|
|
|
// Load rules
|
2017-05-16 00:46:20 +02:00
|
|
|
include(PATH_RULES.'69.pages.php');
|
2015-03-27 02:00:01 +01:00
|
|
|
include(PATH_RULES.'99.header.php');
|
2015-07-20 05:14:12 +02:00
|
|
|
include(PATH_RULES.'99.paginator.php');
|
2015-08-02 04:47:45 +02:00
|
|
|
include(PATH_RULES.'99.themes.php');
|
2015-07-20 05:14:12 +02:00
|
|
|
|
|
|
|
// Plugins before site loaded
|
|
|
|
Theme::plugins('beforeSiteLoad');
|
2015-05-05 03:00:01 +02:00
|
|
|
|
|
|
|
// Theme init.php
|
2018-07-17 19:13:01 +02:00
|
|
|
if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'init.php')) {
|
|
|
|
include(PATH_THEMES.$site->theme().DS.'init.php');
|
2015-08-17 04:33:49 +02:00
|
|
|
}
|
2015-05-05 03:00:01 +02:00
|
|
|
|
|
|
|
// Theme HTML
|
2018-07-17 19:13:01 +02:00
|
|
|
if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'index.php')) {
|
|
|
|
include(PATH_THEMES.$site->theme().DS.'index.php');
|
2017-10-22 21:28:44 +02:00
|
|
|
} else {
|
2018-08-03 19:03:09 +02:00
|
|
|
$language->p('Please check your theme configuration');
|
2015-09-08 02:51:48 +02:00
|
|
|
}
|
2015-07-20 05:14:12 +02:00
|
|
|
|
|
|
|
// Plugins after site loaded
|
2015-11-28 15:47:03 +01:00
|
|
|
Theme::plugins('afterSiteLoad');
|
2017-07-05 19:59:51 +02:00
|
|
|
|
|
|
|
// Plugins after all
|
|
|
|
Theme::plugins('afterAll');
|
2018-07-25 23:42:00 +02:00
|
|
|
|