<?php
session_start();
// Includes
include('includes/config.inc.php');
include('includes/database.inc.php');
include('includes/user.inc.php');
include('includes/controller.inc.php');
include('includes/model.inc.php');
include('includes/view.inc.php');
include('includes/functions.inc.php');
include('includes/label.inc.php');
include('includes/document.inc.php');
include('includes/mailbox.inc.php');
include('includes/mailboxfolder.inc.php');
require('includes/call.inc.php');
require('includes/mail.inc.php');

$db = new Database($CONFIG['dbHost'], $CONFIG['dbUser'], $CONFIG['dbPassword'], $CONFIG['dbDatabase']);
$user = new User(isset($_SESSION['username']) ? $_SESSION['username'] : NULL);

// $_GET und $_POST zusammenfasen
$request = $_REQUEST;
// Controller erstellen
$controller = new Controller($request);
// Inhalt der Webanwendung ausgeben.
echo $controller->display();

$db->close();

?>
