diff --git a/_sakura/changelog.json b/_sakura/changelog.json index dc52f93..1eea13e 100644 --- a/_sakura/changelog.json +++ b/_sakura/changelog.json @@ -19,7 +19,8 @@ "20150427.8", "20150428", "20150429", - "20150430" + "20150430", + "20150501" ] @@ -846,6 +847,15 @@ "change": "Begin work on management panel." } + ], + + "20150501": [ + + { + "type": "UPD", + "change": "Improve error page." + } + ] } diff --git a/_sakura/components/Main.php b/_sakura/components/Main.php index 6e152db..0dc4129 100644 --- a/_sakura/components/Main.php +++ b/_sakura/components/Main.php @@ -7,8 +7,8 @@ namespace Sakura; class Main { - public static $_MD; // Markdown class container - public static $_IN_MANAGE = false; // Manage thing + public static $_MD; // Markdown class container + public static $_MANAGE_MODE = false; // Management mode // Constructor public static function init($config) { @@ -29,8 +29,11 @@ class Main { // Create new session Session::init(); + // Check if management mode was requested + self::$_MANAGE_MODE = defined('SAKURA_MANAGE'); + // Templating engine - Templates::init(Configuration::getConfig('site_style')); + Templates::init(self::$_MANAGE_MODE ? Configuration::getConfig('manage_style') : Configuration::getConfig('site_style')); // Assign servers file to whois class Whois::setServers(Configuration::getLocalConfig('etc', 'whoisservers')); @@ -73,7 +76,7 @@ class Main { } // Error Handler - public static function ErrorHandler($errno, $errstr, $errfile, $errline) { + public static function errorHandler($errno, $errstr, $errfile, $errline) { // Set some variables to work with including A HUGE fallback hackjob for the templates folder $errstr = str_replace(ROOT, '', $errstr); diff --git a/_sakura/components/Manage.php b/_sakura/components/Manage.php new file mode 100644 index 0000000..0c88f92 --- /dev/null +++ b/_sakura/components/Manage.php @@ -0,0 +1,12 @@ +Failed to load database driver.'); // Set Error handler -set_error_handler(array('Sakura\Main', 'ErrorHandler')); +set_error_handler(array('Sakura\Main', 'errorHandler')); // Initialise Flashii Class Main::init($sakuraConf); @@ -57,6 +58,9 @@ Main::init($sakuraConf); $renderData = array( 'sakura' => [ 'version' => SAKURA_VERSION, + 'vlabel' => SAKURA_VLABEL, + 'vtype' => SAKURA_VTYPE, + 'vcolour' => SAKURA_COLOUR, 'urls' => Configuration::getLocalConfig('urls'), 'charset' => Configuration::getConfig('charset'), 'currentpage' => '//'. $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'], diff --git a/_sakura/templates/broomcloset/global/footer.tpl b/_sakura/templates/broomcloset/global/footer.tpl new file mode 100644 index 0000000..786ab60 --- /dev/null +++ b/_sakura/templates/broomcloset/global/footer.tpl @@ -0,0 +1,7 @@ + +
+ +