assign('sksscreens', $c->getPicArray()); $match = $router->match(); $tracking = DI::getInstance()->get('tracking'); $tracking->setCurrentUserIp($_SERVER['REMOTE_ADDR']); $tracking->setCurrentUserAgent($_SERVER['HTTP_USER_AGENT']); $tracking->setCurrentUserReferer($_SERVER['HTTP_REFERER']); $tracking->checkUniqueUser(); if($match === false) { $tpl->display('errorpages/404.tpl'); } else { try { require $match['target']; } catch(Exception $e) { return $e->getMessage(); } }