<?php
//Include Common Files @1-B23AA250
define("RelativePath", "../../..");
define("PathToCurrentPage", "/core.sym/fe/aanbod/");
define("FileName", "element.php");
include_once(RelativePath . "/Common.php");
include_once(RelativePath . "/Template.php");
include_once(RelativePath . "/Sorter.php");
include_once(RelativePath . "/Navigator.php");
//End Include Common Files

//Include Page implementation @2-63A90D11
include_once(RelativePath . "/core.sym/fe/header_footer/inc_header.php");
//End Include Page implementation

//Include Page implementation @3-06A0432E
include_once(RelativePath . "/core.sym/fe/header_footer/inc_footer.php");
//End Include Page implementation

//Initialize Page @1-78DCD650
// Variables
$FileName = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
$ComponentName = "";
$Attributes = "";

// Events;
$CCSEvents = [];
$CCSEventResult = "";

$FileName = FileName;
$Redirect = "";
$TemplateFileName = "element.html";
$BlockToParse = "main";
$TemplateEncoding = "CP1252";
$ContentType = "text/html";
$PathToRoot = "../../../";
//End Initialize Page

//Include events file @1-C2E54A05
include_once("./element_events.php");
//End Include events file

//Retrieve cached page @1-3F2FB784
$CCSEvents["OnCache"] = "Page_OnCache";
$MainPage->CachePage = PathToCurrentPage . $FileName;
$MainPage->CacheAction = "Fetch";
$MainPage->CacheParameters = array();
$CCSEventResult = CCGetEvent($CCSEvents, "OnCache", $MainPage);
if ($CCSEventResult) {;
    $MainPage->CacheParameters[] = array("Source" => "Session", "Target" => "Key", "Name" => "dblanguage");
    $MainPage->CacheParameters[] = array("Source" => "URL", "Target" => "Disable", "Name" => "ccsForm");
    $MainPage->CacheParameters[] = array("Source" => "URL", "Target" => "Key", "Name" => "elementnaam");
    $MainPage->CacheParameters[] = array("Source" => "URL", "Target" => "Key", "Name" => "element_id");
    $MainPage->CacheParameters[] = array("Source" => "URL", "Target" => "Key", "Name" => "tabnr");
    $MainPage->CacheParameters[] = array("Source" => "URL", "Target" => "Key", "Name" => "popup");
    $MainPage->CacheParameters[] = array("Source" => "URL", "Target" => "Disable", "Name" => "action");
    $MainPage->CacheDisabled = $CCSCacheManager->IsDisabled($MainPage->CacheParameters);
    if (!$MainPage->CacheDisabled) {
        $MainPage->CacheKey = $CCSCacheManager->GetCacheKey($MainPage->CachePage, $MainPage->CacheParameters);
        $MainPage->CacheObject = $CCSCacheManager->GetObject($MainPage->CacheKey);
        if ($MainPage->CacheObject !== false){
            if ($Charset) {
                header("Content-Type: " . $ContentType . "; charset=" . $Charset);
            } else {
                header("Content-Type: " . $ContentType);
            }
            echo $MainPage->CacheObject;
            $CCSCacheManager->Finalize();
            exit;
        }
    }
}
//End Retrieve cached page

//Before Initialize @1-E870CEBC
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage);
//End Before Initialize

//Initialize Objects @1-B2437692
$Attributes = new clsAttributes("page:");
$MainPage->Attributes = & $Attributes;

// Controls
$inc_header = new clsinc_header("../header_footer/", "inc_header", $MainPage);
$inc_header->Initialize();
$lblHistory = new clsControl(ccsLabel, "lblHistory", "lblHistory", ccsText, "", CCGetRequestParam("lblHistory", ccsGet, NULL), $MainPage);
$lblHistory->HTML = true;
$lblPageHeader = new clsControl(ccsLabel, "lblPageHeader", "lblPageHeader", ccsText, "", CCGetRequestParam("lblPageHeader", ccsGet, NULL), $MainPage);
$lblPageHeader->HTML = true;
$lblSiteStructuur = new clsControl(ccsLabel, "lblSiteStructuur", "lblSiteStructuur", ccsText, "", CCGetRequestParam("lblSiteStructuur", ccsGet, NULL), $MainPage);
$lblSiteStructuur->HTML = true;
$lblPageIcons = new clsControl(ccsLabel, "lblPageIcons", "lblPageIcons", ccsText, "", CCGetRequestParam("lblPageIcons", ccsGet, NULL), $MainPage);
$lblPageIcons->HTML = true;
$lblTabblad = new clsControl(ccsLabel, "lblTabblad", "lblTabblad", ccsText, "", CCGetRequestParam("lblTabblad", ccsGet, NULL), $MainPage);
$lblTabblad->HTML = true;
$content = new clsControl(ccsLabel, "content", "content", ccsText, "", CCGetRequestParam("content", ccsGet, NULL), $MainPage);
$content->HTML = true;
$inc_footer = new clsinc_footer("../header_footer/", "inc_footer", $MainPage);
$inc_footer->Initialize();
$MainPage->inc_header = & $inc_header;
$MainPage->lblHistory = & $lblHistory;
$MainPage->lblPageHeader = & $lblPageHeader;
$MainPage->lblSiteStructuur = & $lblSiteStructuur;
$MainPage->lblPageIcons = & $lblPageIcons;
$MainPage->lblTabblad = & $lblTabblad;
$MainPage->content = & $content;
$MainPage->inc_footer = & $inc_footer;

BindEvents();

$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);

if ($Charset) {
    header("Content-Type: " . $ContentType . "; charset=" . $Charset);
} else {
    header("Content-Type: " . $ContentType);
}
//End Initialize Objects

//Initialize HTML Template @1-00BDF672
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
$Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
$Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "CP1252", "replace");
$Tpl->block_path = "/$BlockToParse";
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
$Attributes->SetValue("pathToRoot", "../../../");
$Attributes->Show();
//End Initialize HTML Template

//Execute Components @1-DCBE5AC7
$inc_header->Operations();
$inc_footer->Operations();
//End Execute Components

//Go to destination page @1-25976DB3
if($Redirect)
{
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
    header("Location: " . $Redirect);
    $inc_header->Class_Terminate();
    unset($inc_header);
    $inc_footer->Class_Terminate();
    unset($inc_footer);
    unset($Tpl);
    exit;
}
//End Go to destination page

//Show Page @1-58283698
$inc_header->Show();
$inc_footer->Show();
$lblHistory->Show();
$lblPageHeader->Show();
$lblSiteStructuur->Show();
$lblPageIcons->Show();
$lblTabblad->Show();
$content->Show();
$Tpl->block_path = "";
$Tpl->Parse($BlockToParse, false);
if (!isset($main_block)) $main_block = $Tpl->GetVar($BlockToParse);
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage);
if ($CCSEventResult) echo $main_block;
//End Show Page

//Store page to cache @1-B974FE4D
$MainPage->CacheAction = "Store";
$CCSEventResult = CCGetEvent($CCSEvents, "OnCache", $MainPage);
if (!$MainPage->CacheDisabled && $CCSEventResult)
    $CCSCacheManager->PutObject($MainPage->CacheKey, $main_block, 14400);
$CCSCacheManager->Finalize();
//End Store page to cache

//Unload Page @1-FCD28BDA
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$inc_header->Class_Terminate();
unset($inc_header);
$inc_footer->Class_Terminate();
unset($inc_footer);
unset($Tpl);
//End Unload Page


?>
