<?php
require 'core/library/environment.php';
environment::load(E_ALL | E_STRICT, 'core/template/exception.php');
ini_set('display_errors', 1);

include 'core/library/fractal.php';
fractal::load(array('admin/', 'extend/', 'core/'), 'library/');

call_user_func_array('db::set', include 'dsn.php');

$request = new request(include 'admin/config/front.php');

if ($request->PATH_INFO=="")
        $request->PATH_INFO=$request->ORIG_PATH_INFO;



$request->PATH_INFO=str_replace("/web.php","/", $request->PATH_INFO);
$request->PATH_INFO=str_replace("/admin.php","/", $request->PATH_INFO);



$response = $request->execute($request->PATH_INFO);
$response->send();
