Commit cd51841e authored by Stefan Bublies's avatar Stefan Bublies
Browse files

Update Classes/Controller/HiOrgServerSchnittstelleController.php

parent 0b5b9881
......@@ -30,6 +30,11 @@ namespace DTInternet\DtiHiorg\Controller;
/**
* HiOrgServerSchnittstelleController
*/
use TYPO3\CMS\Core\Utility\DebugUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Page\PageRenderer;
class HiOrgServerSchnittstelleController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
/**
......@@ -40,6 +45,18 @@ class HiOrgServerSchnittstelleController extends \TYPO3\CMS\Extbase\Mvc\Controll
*/
protected $hiOrgServerSchnittstelleRepository = NULL;
/**
* Init
*
* @return void
*/
protected function initializeAction()
{
parent::initializeAction();
$pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
$pageRenderer->addCssFile('typo3conf/ext/dti_hiorg/Resources/Public/Stylesheets/drkcms_hiorg.css');
}
/**
* action list
*
......@@ -53,10 +70,19 @@ class HiOrgServerSchnittstelleController extends \TYPO3\CMS\Extbase\Mvc\Controll
$aparams01 = $this->settings['hiorg']['params01'];
$aparams02 = $this->settings['hiorg']['params02'];
$aparams03 = $this->settings['hiorg']['params03'];
$akurstyp = $this->settings['hiorg']['kurstyp'];
$akursConfigId = $this->settings['hiorg']['kursconfigid'];
$aintern = $this->settings['hiorg']['intern'];
$akuerzel = $this->settings['hiorg']['include'];
$url = "https://www.hiorg-server.de/".$adisplay.($akurstyp ? 'kurstyp='.$akurstyp : '').($aintern ? 'nurint='.$aintern : '')."&ov=$akuerzel&onlytable=1".($aparams01 ? '&monate='.$aparams01 : '').($aparams02? '&anz='.$aparams02 : '').($aparams03? '&gruppe='.$aparams03 : '');
$asandienstArt = $this->settings['hiorg']['sandienstart'];
if ($adisplay == 'kurse_extern.php?') {
$url = "https://www.hiorg-server.de/".$adisplay.'ov='.$akuerzel.'&'.($akursConfigId ? 'id='.$akursConfigId : '');
} elseif ($adisplay == 'sanform.php?') {
$url = "https://www.hiorg-server.de/".$adisplay.'ov='.$akuerzel.($asandienstArt ? '&art='.$asandienstArt : '').'&fromextern=1';
} else {
$url = "https://www.hiorg-server.de/".$adisplay.($aintern ? 'nurint='.$aintern : '')."&ov=$akuerzel&onlytable=1".($aparams01 ? '&monate='.$aparams01 : '').($aparams02? '&anz='.$aparams02 : '').($aparams03? '&gruppe='.$aparams03 : '');
}
if(function_exists("curl_init")) {
$ch = curl_init($url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment