108 lines
2.6 KiB
PHP
108 lines
2.6 KiB
PHP
<?php
|
|
|
|
namespace HermannTelser\Gutachten\DB\Update;
|
|
|
|
use HermannTelser\Gutachten\Utility\Message;
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
use HermannTelser\Gutachten\Berechnungen\Berechnung;
|
|
use HermannTelser\Gutachten\DB\DbFunction;
|
|
|
|
/***
|
|
*
|
|
* 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>, NUH-Odds GmbH
|
|
*
|
|
***/
|
|
|
|
class _UpdateController
|
|
{
|
|
public function __construct()
|
|
{
|
|
$id = GeneralUtility::_GP('id');
|
|
if($id && is_numeric($id)){
|
|
DbFunction::query("UPDATE tx_gutachten_projekte SET timestamp = current_timestamp WHERE id=". GeneralUtility::_GP('id'));
|
|
}
|
|
|
|
$arr = [];
|
|
switch (GeneralUtility::_GP('action')) {
|
|
// update
|
|
case 'abgleich_raume_generell':
|
|
AbgleichRaumeGenerell::update();
|
|
break;
|
|
case 'update_projektestandards':
|
|
UpdateProjektStandards::update();
|
|
break;
|
|
case 'update_project_platzhalter':
|
|
UpdateProjektPlatzhalter::update();
|
|
// Berechnung::berechnen();
|
|
break;
|
|
case 'update_project':
|
|
UpdateProjekt::update();
|
|
// Berechnung::berechnen();
|
|
break;
|
|
case 'update_notizen':
|
|
UpdateNotizen::update();
|
|
// Berechnung::berechnen();
|
|
break;
|
|
case 'update_aufstellung':
|
|
UpdateAufstellung::update();
|
|
break;
|
|
case 'update_field':
|
|
UpdateField::update();
|
|
break;
|
|
case 'toggle_field':
|
|
ToggleField::update();
|
|
break;
|
|
case 'update_row':
|
|
UpdateRow::update();
|
|
break;
|
|
case 'update_method_many':
|
|
UpdateMethodMany::update();
|
|
Berechnung::berechnen();
|
|
break;
|
|
case 'update_austellung_many':
|
|
UpdateAufstellungMany::update();
|
|
break;
|
|
case 'update_method':
|
|
UpdateMethod::update();
|
|
Berechnung::berechnen();
|
|
break;
|
|
case 'update_allgemein':
|
|
UpdateAllgemeine::update();
|
|
break;
|
|
case 'update_orientierung_typen_colums':
|
|
UpdateOrientierungTypenColums::update();
|
|
break;
|
|
case 'update_raeume_alle_orientierung':
|
|
UpdateRaeumeAlleOrientierung::update();
|
|
break;
|
|
case 'update_methoden_projekt_factoren':
|
|
UpdateMethodenProjektFactoren::update();
|
|
break;
|
|
case 'update_raume_all':
|
|
UpdateAllgemeineAll::update();
|
|
break;
|
|
default:
|
|
Message::error(
|
|
__FILE__,
|
|
__LINE__,
|
|
'no controller switch defined'
|
|
);
|
|
}
|
|
|
|
if (null !== GeneralUtility::_GP('berechnen')) {
|
|
Berechnung::berechnen();
|
|
}
|
|
echo 1;
|
|
exit;
|
|
|
|
// header('Content-Type: application/json');
|
|
// echo json_encode($arr);
|
|
// exit();
|
|
}
|
|
}
|