<?php

// Einbinden der benötigten Dateien und Bibliotheken //////////////////////////
///////////////////////////////////////////////////////////////////////////////
include "includedef.php4";
 

// Objekte instanziieren //////////////////////////////////////////////////////
///////////////////////////////////////
$toolObj = new Tools ();
$ActionHandlerObj = new actionhandler_chipdb ();
$adminmode = false;

$action = $_GET["action"];
$herstellerID = $_POST["herstellerID"];
$fahrzeugID = $_GET["fahrzeugID"];

//actionhandler
print ($toolObj->ReadTemplate ("templates/main.html", "*", "<!-- begin page //-->"));
switch ($action) {
    case "show_hersteller":
        $ActionHandlerObj->showHersteller($adminmode);
        break;
    case "show_fahrzeuge":
        $ActionHandlerObj->showFahrzeuge($herstellerID, $adminmode);
        break;
    case "show_datenblatt":
        $ActionHandlerObj->showDatenblatt($fahrzeugID, $herstellerID);
        break;
    default:
        // action == Home oder nicht angegeben //////////////////////////////////////////////////
        $ActionHandlerObj->showHersteller ($adminmode);
}
print ($toolObj->ReadTemplate ("templates/main.html", "<!-- end page //-->", "*"));
?>