<?php

define('CONTROL_DIR',ABSPATH.'controllers');
define('VIEWS_DIR', ABSPATH.'views');
define('VIEWS_URL', default_url.'/views');

$control = resolvePath();

if(!$control) {
	$control = array('controller' => 'default', 'params' => 'home');
}
$controller = CONTROL_DIR.'/'.$control['controller'].'.php';

if(!file_exists($controller )) {
	$control = return_404();
}

$params = $control['params'];
load_view_functions();
require(CONTROL_DIR.'/'.$control['controller'].'.php');