46 lines
1013 B
PHP
46 lines
1013 B
PHP
<?php
|
|
|
|
namespace HermannTelser\Gutachten\DB\Insert;
|
|
|
|
use HermannTelser\Gutachten\DB\DbFunction;
|
|
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>, NUH-Odds GmbH
|
|
*
|
|
***/
|
|
|
|
class AddMerkmal
|
|
{
|
|
public static function create()
|
|
{
|
|
// DbFunction::$debug = 1;
|
|
|
|
$projektid = GeneralUtility::_GP('projektid');
|
|
if (!$projektid) {
|
|
exit;
|
|
}
|
|
|
|
$colid = DbFunction::get('tx_gutachten_help', 'colid', ['pid' => $projektid, 'ORDER' => ['colid' => 'DESC']]);
|
|
if (!$colid) {
|
|
$colid = 'a';
|
|
} else {
|
|
++$colid;
|
|
}
|
|
|
|
$insert_array = [];
|
|
$insert_array['pid'] = $projektid;
|
|
$insert_array['colid'] = $colid;
|
|
$insert_array['coltitel'] = 'Neues Merkmal';
|
|
DbFunction::secureInsert('tx_gutachten_help', $insert_array);
|
|
echo 1;
|
|
exit;
|
|
}
|
|
}
|