Chore: Verschiebe Git-Repository in das Hauptverzeichnis und richte .gitignore ein

This commit is contained in:
salam committed 2026-10-19 10:11:04 +02:00
commit 96d0545193
502 files changed
+176027

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
<?php
namespace HermannTelser\Gutachten\Settings;
use HermannTelser\Gutachten\DB\DbFunction;
use HermannTelser\Gutachten\DB\Select;
use TYPO3\CMS\Core\Utility\GeneralUtility;
set_time_limit(0);
class Sonderzeichen
{
/***************************************************
* print sql querries
***************************************************/
public static function run()
{
// DbFunction::$debug = 1;
$from = array("Ÿ", "Š", "š", "§");
$to = array("ü", "ä", "ö", "ß");
$_arr = DbFunction::select('tx_gutachten_allgemein', ['id', 'typ']);
foreach ($_arr as $key => $value) {
$value_array['typ'] = str_replace($from, $to, $value['typ']);
DbFunction::secureUpdate('tx_gutachten_allgemein', $value_array, ['id' => $value['id']]);
}
$_arr = DbFunction::select('tx_gutachten_raume_all', ['id', 'raum']);
foreach ($_arr as $key => $value) {
$value_array['raum'] = str_replace($from, $to, $value['raum']);
DbFunction::secureUpdate('tx_gutachten_raume_all', $value_array, ['id' => $value['id']]);
}
$_arr = DbFunction::select('tx_gutachten_raume_generell', ['id', 'raum']);
foreach ($_arr as $key => $value) {
$value_array['raum'] = str_replace($from, $to, $value['raum']);
DbFunction::secureUpdate('tx_gutachten_raume_generell', $value_array, ['id' => $value['id']]);
}
echo 1;
exit;
}
}
@@ -0,0 +1,43 @@
<?php
namespace HermannTelser\Gutachten\Settings;
use HermannTelser\Gutachten\DB\DbFunction;
use HermannTelser\Gutachten\DB\Select;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class TextEdit
{
/**
* @param mixed $id
*
* @return bool
*/
public static function update()
{
$table = GeneralUtility::_GP('table');
$field = GeneralUtility::_GP('field');
$value = GeneralUtility::_GP('value');
$id = GeneralUtility::_GP('id');
if (-1 == $id) {
$insert_array = [];
$insert_array[$field] = $value;
DbFunction::secureInsert($table, $insert_array);
} else {
$update_array = [];
if ('tx_gutachten_raume_generell' == $table) {
if ('raumart' == $field) {
$update_array['tt_raumart_id'] = Select::methoden_by_raumart($value);
} elseif ('factor' == $field) {
$update_array['factor'] = str_replace(',', '.', $value);
}
} else {
$update_array[$field] = $value;
}
DbFunction::secureUpdate($table, $update_array, ['id' => $id]);
}
if ('tx_gutachten_raume_basis' == $table) {
DbFunction::query("Update tx_gutachten_raume_basis SET summe_az = a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u where id=$id");
}
}
}
@@ -0,0 +1,24 @@
<?php
namespace HermannTelser\Gutachten\Settings;
use HermannTelser\Gutachten\DB\DbFunction;
class ToggleHelp
{
/**
* @param mixed $id
*
* @return bool
*/
public static function toggle()
{
$help = DbFunction::get('fe_users', 'tx_help', ['uid' => $GLOBALS['TSFE']->fe_user->user['uid']]);
$help = 1 == $help ? 0 : 1;
$update_array = [];
$update_array['tx_help'] = $help;
DbFunction::secureUpdate('fe_users', $update_array, ['uid' => $GLOBALS['TSFE']->fe_user->user['uid']]);
echo $help;
exit;
}
}
@@ -0,0 +1,27 @@
<?php
namespace HermannTelser\Gutachten\Settings;
use HermannTelser\Gutachten\DB\DbFunction;
class ToggleTheme
{
/**
* @param mixed $id
*
* @return bool
*/
public static function toggle()
{
$theme = $GLOBALS['TSFE']->fe_user->user['tx_nuh_layout'];
$userid = $GLOBALS['TSFE']->fe_user->user['uid'];
$update_array = [];
$update_array['tx_nuh_layout'] = 'light' == $theme ? 'dark' : 'light';
DbFunction::secureUpdate('fe_users', $update_array, ['uid' => $userid]);
echo 1;
exit;
}
}
@@ -0,0 +1,68 @@
<?php
namespace HermannTelser\Gutachten\Settings;
use HermannTelser\Gutachten\Berechnungen\Berechnung;
use HermannTelser\Gutachten\DB\DbFunction;
use HermannTelser\Gutachten\Utility\Message;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Frontend\Utility\EidUtility;
/***
*
* 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 _SettingsController
{
public function __construct()
{
$arr = [];
switch (GeneralUtility::_GP('action')) {
// SETTINGS
case 'load_localscope':
$arr = [];
$feUserObj = EidUtility::initFEuser();
$arr['uid'] = $feUserObj->user['uid'];
$arr['username'] = $feUserObj->user['first_name'];
$arr['tx_help'] = $feUserObj->user['tx_help'];
break;
case 'toggle_theme':
ToggleTheme::toggle();
exit;
case 'toggle_help_onoff':
ToggleHelp::toggle();
exit;
case 'tooltip':
$id = GeneralUtility::_GP('id');
echo DbFunction::get('tx_gutachten_tooltip', 'tip', ['id' => GeneralUtility::_GP('id')]);
exit;
break;
case 'textedit':
TextEdit::update();
Berechnung::berechnen();
echo 1;
exit;
break;
case 'sonderzeichen':
Sonderzeichen::run();
break;
default:
Message::error(
__FILE__,
__LINE__,
'no controller switch defined'
);
}
header('Content-Type: application/json');
echo json_encode($arr);
exit();
}
}