session_start(); // stop error reporting for curious eyes, should be set to E_ALL when debugging error_reporting(E_ALL); // application absolute path to source files define('BASEDIR', @realpath(dirname(__FILE__))); define('INCDIR', BASEDIR.'/controllers/'); define('VIEWDIR', BASEDIR.'/templates/'); define('MODELDIR', BASEDIR.'/models/'); //Include required files require(BASEDIR.'/libs/funcs.inc.php'); require(BASEDIR.'/libs/config.inc.php'); require(BASEDIR.'/libs/database.inc.php'); require(BASEDIR.'/libs/nav-active.php'); // Now that we have the parts, let's run a few more test and then execute the function in the class file if (is_readable($file) == false) { //header("location:https://www.grandtravelplanners.com/404.html"); echo 'Requested module \''.$filename.'\' is missing. Execution stopped.'; //exit(); } else { include($file); //include view if($layout==true) include($viewfile); } ?>