* @link http://www.pioder.pl/ * @license see LICENSE.txt **/ $_GET['mode'] = (isset($_GET['mode'])) ? trim(strip_tags($_GET['mode'])) : ''; $_GET['submode'] = (isset($_GET['submode'])) ? trim(strip_tags($_GET['submode'])) : ''; require_once('./config.php'); require_once('./inc/constants.php'); require_once('./inc/database_connection.php'); require_once('./inc/bbcode.php'); require_once('./inc/misc_functions.php'); try { switch ($_GET['mode']) { default: require_once('./inc/controllers/MainController.class.php'); $ob = new MainController($DB); if ($_GET['mode'] != null) $ob->$_GET['mode'](); else $ob->loadDefault(); break; case 'admin': require_once('./inc/controllers/AdminController.class.php'); $ob = new AdminController($DB); if ($_GET['submode'] != null) $ob->$_GET['submode'](); else $ob->loadDefault(); break; } } catch (Exception $e) { echo 'Unexpected error occured:
'.$e->getMessage().'

File: '.$e->getFile().'
Line: '.$e->getLine().'
Trace: '.$e->getTraceAsString().'
'; exit; } ?>