Esempio n. 1
0
 /**
  * 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);
 }
 protected function initSagpDb()
 {
     self::$sagpSql = t3lib_div::makeInstance('t3lib_db');
     //		self::$sagpDb = self::$sagpSql->sql_pconnect("splx8001.hs-esslingen.de","sagp_practdb_rw","FC3AyFZh6RfCE4Xq") or die('Could not connect to SAGP-Mysql server.' );
     self::$sagpDb = self::$sagpSql->sql_pconnect("splx8001.hs-esslingen.de", "wwwtypo3he", "KFBWUzLFA75CESbF") or die('Could not connect to SAGP-Mysql server.');
     self::$sagpSql->sql_select_db("sagp_practdb", self::$sagpDb) or die('Could not select database.');
     return self::$sagpSql;
 }