doing convert to views and add login page

This commit is contained in:
adri
2019-01-02 18:00:16 +01:00
parent 2f1cd4273e
commit 227827b913
17 changed files with 601 additions and 101 deletions

35
test.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
define('SITE_ROOT', dirname(__FILE__));
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
session_start();
require_once SITE_ROOT.'/vendor/autoload.php';
$loader = new Twig_Loader_Filesystem( SITE_ROOT.'/views');
$twig = new Twig_Environment($loader, array(
'cache' => /*SITE_ROOT.'/twig/compilation_cache'*/false,
));
if(isset($_GET["page"]))
{
switch ($_GET["page"]) {
case 'table':
include './control/table.php';
break;
case 'login':
include './control/login.php';
break;
default:
include './control/table.php';
break;
}
}
else {
include './control/table.php';
}
?>