45 lines
908 B
PHP
45 lines
908 B
PHP
<?php
|
|
|
|
namespace HermannTelser\Gutachten\Uploads;
|
|
|
|
use HermannTelser\Gutachten\Utility\Message;
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
|
|
/***
|
|
*
|
|
* This file is part of the "NuhOdds Comparatore" Extension for TYPO3 CMS.
|
|
*
|
|
* For the full copyright and license information, please read the
|
|
* LICENSE.txt file that was distributed with this source code.
|
|
*
|
|
* (c) 2019 Hermann Telser <hermann.telser@gmail.com>
|
|
*
|
|
***/
|
|
class _UploadsController
|
|
{
|
|
public function __construct()
|
|
{
|
|
$arr = [];
|
|
switch (GeneralUtility::_GP('action')) {
|
|
// DOWNLOADS
|
|
case 'allgemein':
|
|
$arr = UploadAllgemein::upload();
|
|
break;
|
|
case 'nutzflaechen':
|
|
$arr = UploadNutzflaechen::upload();
|
|
break;
|
|
|
|
default:
|
|
Message::error(
|
|
__FILE__,
|
|
__LINE__,
|
|
'no controller switch defined'
|
|
);
|
|
}
|
|
|
|
header('Content-Type: application/json');
|
|
echo json_encode($arr);
|
|
exit();
|
|
}
|
|
}
|