require_once 'vendor/autoload.php';
Twig_Autoloader::register();
$view = $_SESSION['view'];
$loader = new Twig_Loader_String("templates/$view");
$twig = new Twig_Environment($loader, array(
'cache' => 'templates/_GlobalCache',
'auto_reload' => true
));
echo $twig->render('index.php', array(
'user' => $_SESSION['ref']
));
$loader = new Twig_Loader_String(file_get_contents("templates/$view"));