Files
gutachten_t3/packages/gutachten/Classes/DB/Insert/AddGutachter.php
T

35 lines
774 B
PHP

<?php
namespace HermannTelser\Gutachten\DB\Insert;
use TYPO3\CMS\Core\Utility\GeneralUtility;
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 AddGutachter
{
public static function add()
{
$data = json_decode(GeneralUtility::_GP('data'));
$insert_array = [];
foreach ($data as $key => $value) {
$key = str_replace('1', '', $key);
$insert_array[$key] = $value;
}
DbFunction::secureInsert('tx_gutachten_gutachter', $insert_array);
echo 1;
exit;
}
}