/**
  * The main method of the PlugIn
  *
  * @param	string		$content: The PlugIn content
  * @param	array		$conf: The PlugIn configuration
  * @return	The content that is displayed on the website
  */
 function main($content, $conf)
 {
     $id = $GLOBALS['TSFE']->id;
     $this->conf = $conf;
     $this->pi_setPiVarDefaults();
     $this->pi_initPIflexForm();
     $modus = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'mode');
     $host = t3lib_div::getIndpEnv('HTTP_HOST');
     $this->pageLink = $this->pi_getPageLink($id);
     $get = t3lib_div::_GET();
     switch ($modus) {
         case "PRAXIS":
             $pmAdmin = new tx_he_tools_powermail();
             $content = $pmAdmin->admin($conf, $this->cObj);
             break;
         case "PRAXIS_AAA":
             $pmAdmin = new tx_he_tools_powermail();
             $content = $pmAdmin->exportFormularAAA();
             break;
         case "POWERMAIL_EXPORT_STUDIENBERATUNG":
             $pmAdmin = new tx_he_tools_powermail();
             $content = $pmAdmin->exportFormularStudienberatung();
             break;
         case "RZ_VERFUEGBARKEIT":
             $content = tx_he_tools_rz_skripte::rz_verfuegbarkeit();
             break;
         case "RZ_ACCESS_POINTS":
             $content = tx_he_tools_rz_skripte::rz_access_points();
             break;
         case "RZ_WETTER_AKTUELL_KURZ":
             $GLOBALS["TSFE"]->set_no_cache();
             /**@var $wetterStation tx_he_tools_wetterstation */
             $wetterStation = t3lib_div::makeInstance('tx_he_tools_wetterstation');
             $content = $wetterStation->aktuellesWetter();
             break;
         case "RZ_WETTER_AKTUELL_DETAILS":
             $GLOBALS["TSFE"]->set_no_cache();
             /**@var $wetterStation tx_he_tools_wetterstation */
             $wetterStation = t3lib_div::makeInstance('tx_he_tools_wetterstation');
             $content = $wetterStation->aktuellesWetter(true);
             break;
         case "RZ_WETTER_FORMULAR":
             $GLOBALS["TSFE"]->set_no_cache();
             /**@var $wetterStation tx_he_tools_wetterstation */
             $wetterStation = t3lib_div::makeInstance('tx_he_tools_wetterstation');
             $content = $wetterStation->wetterFormular();
             break;
         case "ZEITSCHRIFTENLISTE":
             $zeitschriften = new tx_he_tools_zeitschriftenlisten($this->extKey);
             $content = $zeitschriften->renderZeitschriftenListe();
             break;
         case "SUCHERGEBNISSE":
             if ($get['mode'] && $get['eingabe']) {
                 $obj = new tx_he_tools_suchergebnisse($this->extKey);
                 $content = $obj->suchergebnisse($get['mode'], $get['eingabe']);
             }
             break;
         case "VERWENDUNG_STUDIENGEBUEHREN":
             $content = tx_he_tools_rz_skripte::studiengebuehrenListe($this->pageLink);
             break;
         case "MOTD":
             $content = tx_he_tools_rz_skripte::motd();
             break;
         case "MODUL_TABELLE":
             $studiengang = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'studiengang');
             $schwerpunkt = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'schwerpunkt');
             $spoVersion = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'spo_version');
             $module = new tx_he_tools_module();
             $content = $module->modulUebersicht($conf, $this, $studiengang, $schwerpunkt, $spoVersion);
             break;
         case "MODUL_HANDBUCH":
             $studiengang = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'studiengang');
             $schwerpunkt = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'schwerpunkt');
             $spoVersion = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'spo_version');
             $module = new tx_he_tools_module();
             $content = $module->modulHandbuch($conf, $this, $studiengang, $schwerpunkt, $spoVersion);
             break;
         case "MODUL_TABELLE_LSF":
             $GLOBALS["TSFE"]->set_no_cache();
             $studiengang = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'studiengang');
             $schwerpunkt = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'schwerpunkt');
             $spoVersion = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'spo_version');
             $linksDeaktivieren = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'links_deaktivieren');
             $module = new tx_he_tools_module();
             $content = $module->modulUebersicht_lsf($this, $studiengang, $schwerpunkt, $spoVersion);
             break;
         case "MODUL_HANDBUCH_LSF":
             $GLOBALS["TSFE"]->set_no_cache();
             $studiengang = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'studiengang');
             $schwerpunkt = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'schwerpunkt');
             $spoVersion = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'spo_version');
             $module = new tx_he_tools_module();
             $content = $module->modulHandbuch_lsf($this, $studiengang, $schwerpunkt, $spoVersion);
             break;
         case "MODULUEBERSICHT_LSF":
             $GLOBALS["TSFE"]->set_no_cache();
             $studiengang = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'studiengang_lsf');
             $vertiefung = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'vertiefung_lsf');
             $darstellung = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'darstellungs_art');
             $spoVersion = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'spo_version');
             $maxCol = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'max_col');
             $linksDeaktivieren = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'links_deaktivieren');
             $module = new tx_he_tools_module();
             $content = $module->modulUebersicht_lsfNeu($this, $studiengang, $vertiefung, $spoVersion, $darstellung, $maxCol, $linksDeaktivieren);
             break;
         case "MODULUEBERSICHT_LSF_VERT":
             $GLOBALS["TSFE"]->set_no_cache();
             $studiengang = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'studiengang_lsf');
             $vertiefung = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'vertiefung_lsf');
             $darstellung = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'darstellungs_art');
             $spoVersion = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'spo_version');
             $maxCol = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'max_col');
             $module = new tx_he_tools_module();
             $content = $module->modulUebersicht_lsf_vertiefungen($this, $studiengang, $vertiefung, $spoVersion, $darstellung, $maxCol);
             break;
         case "MODULHANDBUCH_LSF":
             $GLOBALS["TSFE"]->set_no_cache();
             $studiengang = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'studiengang_lsf');
             $vertiefung = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'vertiefung_lsf');
             $spoVersion = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'spo_version');
             $module = new tx_he_tools_module();
             $content = $module->modulHandbuch_lsfNeu($this, $studiengang, $vertiefung, $spoVersion);
             break;
         case "MODULE_ENGLISCH_LSF_VERANSTALTUNGEN":
             //$GLOBALS["TSFE"]->set_no_cache();
             $module = new tx_he_tools_lsf($this->cObj);
             $content = $module->veranstaltungenEnglisch();
             break;
         case "MODULE_ENGLISCH_LSF_MODULBESCHREIBUNGEN":
             //$GLOBALS["TSFE"]->set_no_cache();
             $module = new tx_he_tools_lsf($this->cObj);
             $content = $module->moduleEnglisch();
             break;
         case "MODULE_ENGLISCH_LSF_TEILLEISTUNGEN":
             //$GLOBALS["TSFE"]->set_no_cache();
             $module = new tx_he_tools_lsf($this->cObj);
             $content = $module->teilleistungenEnglisch();
             break;
         case "MODULE_ENGLISCH_LSF_TEILLEISTUNGEN":
             //$GLOBALS["TSFE"]->set_no_cache();
             $module = new tx_he_tools_lsf($this->cObj);
             $content = $module->teilleistungenEnglisch();
             break;
         case "MODULE_ENGLISCH_TYPO3":
             $content = tx_he_tools_rz_skripte::modulbeschreibungenEnglisch($this);
             break;
         case "SOAP_TEST_LSF":
             if ($GLOBALS['TSFE']->fe_user->user['username'] != 'hemp' && $GLOBALS['TSFE']->fe_user->user['username'] != 'mmirsch') {
                 $content = 'Kein Zugriff';
             } else {
                 $GLOBALS["TSFE"]->set_no_cache();
                 $module = new tx_he_tools_lsf($this->cObj);
                 $content = $module->soapTest();
             }
             break;
         case "GADGETS":
             $gadget = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'gadgetkuerzel');
             $content = $this->eigeneGadgets($gadget);
             break;
         case "TOOLS":
             $kuerzel = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'toolskuerzel', 'settings');
             $content = $this->tools($kuerzel, $get, $conf);
             break;
         case "DATA_VIEW":
             $elem = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'dataview');
             $content = $this->dataView($elem, $get);
             break;
         case "HOCHSCHULEXPRESS":
             $bild = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'hex_image');
             $bereich = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'hex_bereichstitel');
             $ueberschrift = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'hex_ueberschrift');
             $spalteLinks = $this->pi_RTEcssText($this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'hex_spalte_links'));
             $spalteRechts = $this->pi_RTEcssText($this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'hex_spalte_rechts'));
             $hochschulexpress = t3lib_div::makeInstance('tx_he_tools_hochschulexpress');
             $content = $hochschulexpress->bereichAnzeigen($this->cObj, $bild, $bereich, $ueberschrift, $spalteLinks, $spalteRechts);
             break;
         case "HOCHSCHULTICKER":
             $bild = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'hex_image');
             $bereich = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'hex_bereichstitel');
             $spalteRechts = $this->pi_RTEcssText($this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'hex_spalte_rechts'));
             $hochschulexpress = t3lib_div::makeInstance('tx_he_tools_hochschulexpress');
             $content = $hochschulexpress->bereichAnzeigenZweispaltig($this->cObj, $bild, $bereich, $spalteRechts);
             break;
         case "FAQ_EINTRAEGE":
             $eintraege = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'faq_eintraege');
             $layout = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'faq_layout');
             $faqs = t3lib_div::makeInstance('tx_he_tools_spezial_elemente');
             $pidList = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_hetools_pi1.']['pid_wussten_sie_schon'];
             $content = $faqs->faqs($this, $eintraege, $layout, $pidList);
             break;
         case "ECHUG":
             $funktion = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'echug_funktionen');
             $echug = t3lib_div::makeInstance('tx_he_tools_echug');
             if ($funktion == 'UMFRAGE') {
                 $content = $echug->umfrage();
             } elseif ($funktion == 'AUSWERTUNG') {
                 $content = $echug->auswertung();
             }
             break;
         case 'ONLINE_SB':
             $GLOBALS["TSFE"]->set_no_cache();
             $funktion = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'sb_funktion');
             $onlineSb = t3lib_div::makeInstance('tx_he_tools_online_sb', $this);
             switch ($funktion) {
                 case 'LOGIN_WARNUNG':
                     $content = $onlineSb->pruefeAnmeldeZustand();
                     break;
                 case 'CREATE_FE_USER':
                     $content = $onlineSb->benutzerAnlegen();
                     break;
                 case 'LOGIN_FORMULAR':
                     $content = $onlineSb->loginFormular();
                     break;
                 case 'SHOW_REG_DATA':
                     $content = $onlineSb->zeigeRegistrierungsdaten();
                     break;
                 case 'ANFRAGEN_BEARBEITEN':
                     $content = $onlineSb->anfrageBearbeiten();
                     break;
                 case 'ANFRAGEN_ANZEIGEN':
                     $content = $onlineSb->anfragenAnzeigen();
                     break;
                 case 'LOGOUT_FORMULAR':
                     $content = $onlineSb->logoutFormular();
                     break;
                 case 'ANFRAGENSTATISTIK':
                     $content = $onlineSb->anfragenstatistikAnzeigen();
                     break;
                 default:
                     $content = '<h3>noch nicht implementiert : ' . $funktion . '</h3>';
             }
             break;
         case "TEST":
             $test = t3lib_div::makeInstance('tx_he_tools_jqplot');
             $content = $test->main();
             break;
     }
     return $this->pi_wrapInBaseClass($content);
 }
 public function raumSuche($eingabe)
 {
     $soap = new tx_he_tools_lsf();
     print_r($soap->raeumeListe($eingabe));
 }
 public function modulHandbuch_lsf(&$piObj, $studiengang, $schwerpunkt, $version)
 {
     $where = 'deleted=0 AND title="' . $studiengang . '"';
     if (!empty($schwerpunkt)) {
         $where .= ' AND schwerpunkt="' . $schwerpunkt . '"';
         $studiengangBezeichnung = $studiengang . ' - ' . $schwerpunkt;
     } else {
         $studiengangBezeichnung = $studiengang;
     }
     $abfrage = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,lsf_stdg,lsf_abs,fakultaet,abschluss,sem_schwp', 'tx_hetools_module_studiengaenge', $where);
     if ($daten = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($abfrage)) {
         $studiengang = $daten['lsf_stdg'];
         $abschlussLsf = $daten['lsf_abs'];
         $abschluss = $daten['abschluss'];
         $semVertiefung = $daten['sem_schwp'];
         $kuerzelFakultaet = $daten['fakultaet'];
         $fakultaeten = tx_he_tools_util::gibfakultaetenListe();
         $fakultaetsBezeichung = $fakultaeten[$kuerzelFakultaet];
         $module = new tx_he_tools_lsf($piObj->cObj);
         $vertiefungLsf = '';
         $whereVertiefung = 'modstud_id=' . $daten['uid'];
         $abfrageVertiefung = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_hetools_module_vertiefungen', $whereVertiefung);
         while ($datenVertiefung = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($abfrageVertiefung)) {
             if (!empty($datenVertiefung['version'])) {
                 if ($datenVertiefung['version'] == $poVersionSelected) {
                     $vertiefungLsf = $datenVertiefung['kuerzel'];
                 }
             } else {
                 $vertiefungLsf = $datenVertiefung['kuerzel'];
             }
         }
         return $module->erzeugeModulHandbuch($studiengang, $abschlussLsf, $vertiefungLsf, $abschluss, $version, $semVertiefung, $studiengangBezeichnung, $fakultaetsBezeichung);
     } else {
         $out = '<h3>Es wurde kein Eintrag für den Studiengang "' . $studiengang . '" ';
         if (!empty($schwerpunkt)) {
             $out .= 'und den Schwerpunkt "' . $schwerpunkt . '" ';
         }
         $out .= 'gefunden!</h3>';
         $out .= 'where:' . $where;
         return $out;
     }
 }