<?php

/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

if (!defined('BASEDIR')) {
  include_once '..' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'constants.php';
}

CodingOperations::encodeEingaben();
CodingOperations::setObStartIfInternalAndExternalEncodingAreDiffrent();

SecurityOperations::PurgeInput();

$expCalc = new ExportCalculation();
if (RequestOperations::getVarValue('type', 0) === 'json') {
  echo $expCalc->getVarValue4System('kategorienliste_json');
} else { 
  $exportCalcCategoryUrl = new \Kufer\Web\Classes\Export\ExportCalculation\ExportCalcCategoryURL($expCalc);
  echo $exportCalcCategoryUrl->resolveVar('unterkategorienliste_sicht542');
}

CodingOperations::encodeAnzeige();