first commit
This commit is contained in:
commit
e81864e683
2984 files changed
+267797
No files matched your search
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Zuladungsliste\Einreichen;
|
||||
|
||||
use HermannTelser\Zuladungsliste\Utilities\Message;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/***
|
||||
*
|
||||
* This file is part of the "Zuladungsliste Steiermark" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2017 - 2022 Hermann Telser <hermann.telser@gmail.com>
|
||||
*
|
||||
* All rights reserved
|
||||
* ************************************************************* */
|
||||
|
||||
class EinreichungenUser
|
||||
{
|
||||
public static function laden()
|
||||
{
|
||||
// lösche Einreichung
|
||||
$uid = GeneralUtility::_GP('uid');
|
||||
if (!is_numeric($uid)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_zuladungsliste_domain_model_wettbewerbe_einreichungen');
|
||||
$queryBuilder
|
||||
->update('tx_zuladungsliste_domain_model_wettbewerbe_einreichungen')
|
||||
->where(
|
||||
$queryBuilder->expr()->eq('uid', (int) $uid)
|
||||
)
|
||||
->set('tstamp', time())
|
||||
->set('deleted', (int) 1)
|
||||
->execute();
|
||||
|
||||
echo $queryBuilder->getSQL();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Zuladungsliste\Einreichen;
|
||||
|
||||
use HermannTelser\Zuladungsliste\Utilities\Message;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/***
|
||||
*
|
||||
* This file is part of the "Zuladungsliste Steiermark" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2017 - 2022 Hermann Telser <hermann.telser@gmail.com>
|
||||
*
|
||||
* All rights reserved
|
||||
* ************************************************************* */
|
||||
|
||||
class EinreichungenUser
|
||||
{
|
||||
public static function laden()
|
||||
{
|
||||
// EIGEREICHTE PROJEKT
|
||||
$user = $GLOBALS['TSFE']->fe_user->user;
|
||||
|
||||
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_zuladungsliste_domain_model_wettbewerbe_einreichungen');
|
||||
// $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
|
||||
$queryBuilder
|
||||
->select('uid', 'crdate', 'wettbewerb', 'beschreibung', 'entscheidungstermin', 'verfahrensort', 'bundesland', 'dokument_orig_name', 'aufgenommen', 'abgelehnt', 'begruendung')
|
||||
->from('tx_zuladungsliste_domain_model_wettbewerbe_einreichungen')
|
||||
->where($queryBuilder->expr()->eq('cruser_id', $user['uid']))
|
||||
->orderBy('aufgenommen');
|
||||
$statement = $queryBuilder->execute()->fetchAll();
|
||||
|
||||
$arr = array();
|
||||
foreach ($statement as $key => $value) {
|
||||
$value["status"] = 0;
|
||||
if($value["aufgenommen"] > 0){
|
||||
$value["status"] = 1;
|
||||
}
|
||||
else if ($value["abgelehnt"] > 0){
|
||||
$value["status"] = 2;
|
||||
}
|
||||
$arr[] = $value;
|
||||
}
|
||||
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($arr);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Zuladungsliste\Einreichen;
|
||||
|
||||
use ForceUTF8\Encoding;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/***
|
||||
*
|
||||
* This file is part of the "Zuladungsliste Steiermark" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2017 - 2022 Hermann Telser <hermann.telser@gmail.com>
|
||||
*
|
||||
* All rights reserved
|
||||
* ************************************************************* */
|
||||
|
||||
class _EinreichenController
|
||||
{
|
||||
public function __construct($xaction)
|
||||
{
|
||||
switch ($xaction) {
|
||||
case 'lade_einreichungen':
|
||||
return EinreichungenUser::laden();
|
||||
break;
|
||||
default:
|
||||
Message::error(__FILE__, __LINE__, 'no xaction switch defined');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user