Exemplo n.º 1
0
 function main()
 {
     $feUserObj = tslib_eidtools::initFeUser();
     // Initialize FE user object
     tslib_eidtools::connectDB();
     //Connect to database
     $id = t3lib_div::_GP('id');
     $action = t3lib_div::_GP('action');
     $username = $feUserObj->user[username];
     $get = t3lib_div::_GET();
     $post = t3lib_div::_POST();
     //t3lib_div::devLog('$get: ' . print_r($get,true), 'tx_he_tools_eid', 0);
     //t3lib_div::devLog('$post: ' . print_r($post,true), 'tx_he_tools_eid', 0);
     /** @var  $dbSuche  tx_he_tools_lib_db_suche */
     $dbSuche = t3lib_div::makeInstance('tx_he_tools_lib_db_suche');
     if ($action === 'hochschule_a_bis_z_suche') {
         $buchstabe = $get['buchstabe'];
         $eingabe = $get['eingabe'];
         $trenner = $get['trenner'];
         return $dbSuche->hochschuleABisZSucheGetList($eingabe, $buchstabe, $trenner, $username);
     } else {
         if ($action === 'abfall_a_bis_z_suche') {
             $buchstabe = $get['buchstabe'];
             $eingabe = $get['eingabe'];
             $trenner = $get['trenner'];
             return $dbSuche->abfallABisZSucheGetList($eingabe, $buchstabe, $trenner);
         } else {
             if ($action === 'ajaxContentForm') {
                 $data = array();
                 foreach ($get as $key => $val) {
                     if ($key != 'eID' && $key != 'app' && $key != 'action') {
                         $data[$key] = $val;
                     }
                     $data['username'] = $username;
                 }
                 return $dbSuche->ajaxContentFormGetList($get['app'], $data);
             } else {
                 if ($action === 'personensuche') {
                     if (empty($username)) {
                         exit;
                     }
                     if (isset($get['eingabe'])) {
                         $eingabe = $get['eingabe'];
                     } else {
                         $eingabe = '';
                     }
                     if (isset($get['bereich'])) {
                         $bereich = $get['bereich'];
                     } else {
                         $bereich = '';
                     }
                     if (isset($get['rolle'])) {
                         $rolle = $get['rolle'];
                     } else {
                         $rolle = '';
                     }
                     return $dbSuche->personenSucheGetList($eingabe, $bereich, $rolle);
                 } else {
                     if ($action === 'typo3_be_userliste') {
                         return tx_he_tools_pers_verwaltung::printBenutzerlisteBackend($get['val'], $get['groups']);
                     } else {
                         if ($action === 'typo3_fe_userliste') {
                             return tx_he_tools_pers_verwaltung::printBenutzerlisteFrontend($get['val'], $get['studis'], $get['groups']);
                         } else {
                             if ($action === 'typo3_fe_userliste_ohne_backend') {
                                 return tx_he_tools_pers_verwaltung::printBenutzerlisteFrontendOhneBackend(trim($get['val']));
                             } else {
                                 if ($action === 'addBeUser') {
                                     $returnUrl = $get['returnUrl'];
                                     $username = trim($get['fe_username']);
                                     return tx_he_tools_pers_verwaltung::addBackendUserFromFrontendUserData($username, $returnUrl);
                                 } else {
                                     if ($action === 'typo3_be_aliasliste_search') {
                                         return tx_he_tools_alias::printAliaslisteSearch($get['scriptUrl'], $get['val']);
                                     } else {
                                         if ($action === 'typo3_be_aliasliste_id') {
                                             return tx_he_tools_alias::printAliaslisteId($get['scriptUrl'], $get['val']);
                                         } else {
                                             if ($action === 'typo3_be_aliasLoeschen') {
                                                 return tx_he_tools_alias::aliasLoeschen($get['aliasUid']);
                                             } else {
                                                 if ($action === 'erzeugeKurzUrl') {
                                                     if (isset($get['length'])) {
                                                         $length = $get['length'];
                                                     } else {
                                                         $length = '';
                                                     }
                                                     $kurzUrl = tx_he_tools_alias::erzeugeKurzUrl($length);
                                                     self::returnTextData($kurzUrl);
                                                 } else {
                                                     if ($action === 'qr_url') {
                                                         $url = $get['url'];
                                                         if (isset($get['size'])) {
                                                             $size = $get['size'];
                                                         } else {
                                                             $size = '';
                                                         }
                                                         return tx_he_tools_qr_codes::getUrlLink($url, $size);
                                                     } else {
                                                         if ($action === 'download_qr_code') {
                                                             if (!isset($get['url'])) {
                                                                 return 'Keine URL übergeben!';
                                                             } else {
                                                                 $url = $get['url'];
                                                                 if (isset($get['size'])) {
                                                                     $size = $get['size'];
                                                                 } else {
                                                                     $size = '';
                                                                 }
                                                                 if (isset($get['alias'])) {
                                                                     $alias = $get['alias'];
                                                                 } else {
                                                                     $alias = '';
                                                                 }
                                                                 return tx_he_tools_qr_codes::downloadQrCode($url, $alias, $size);
                                                             }
                                                         } else {
                                                             if ($action === 'qr_alias_liste') {
                                                                 if (isset($get['quality'])) {
                                                                     $quality = $get['quality'];
                                                                 } else {
                                                                     $quality = '';
                                                                 }
                                                                 return tx_he_tools_qr_codes::printAliasliste($get['val'], $quality);
                                                             } else {
                                                                 if ($action === 'solr_action') {
                                                                     $solr = t3lib_div::makeInstance('tx_he_tools_solr');
                                                                     return $solr->eidAction($get);
                                                                 } else {
                                                                     if ($action === 'get_page_tstamp') {
                                                                         $res = tx_he_tools_util::getPageTstamp($get['uid']);
                                                                         $this->returnTextData($res);
                                                                     } else {
                                                                         if ($action === 'get_infoscreen_page_tstamp') {
                                                                             $res = tx_he_tools_infoscreen::getInfoscreenPageTstamp($get['uid']);
                                                                             $this->returnTextData($res);
                                                                         } else {
                                                                             if ($action === 'fe_logout') {
                                                                                 $where = 'ses_id = "' . $feUserObj->user['ses_id'] . '" AND ses_name = "fe_typo_user"';
                                                                                 $GLOBALS['TYPO3_DB']->exec_DELETEquery('fe_sessions', $where);
                                                                                 print 1;
                                                                                 exit;
                                                                             } else {
                                                                                 if ($action === 'fe_user_exists') {
                                                                                     $username = $get['username'];
                                                                                     $result = 0;
                                                                                     if (!empty($username)) {
                                                                                         $where = 'username = "******" AND deleted=0 and disable=0';
                                                                                         $anzahl = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'fe_users', $where);
                                                                                         if ($anzahl > 0) {
                                                                                             $result = 1;
                                                                                         }
                                                                                     }
                                                                                     print $result;
                                                                                     exit;
                                                                                 } else {
                                                                                     if ($action === 'gib_lsf_modb_vertiefungen') {
                                                                                         $lsf = t3lib_div::makeInstance('tx_he_tools_lsf');
                                                                                         $modulId = $get['modId'];
                                                                                         $data = $lsf->gibVertiefungenSelect($modulId);
                                                                                         $this->returnTextData($data);
                                                                                     } else {
                                                                                         if ($action === 'gib_lsf_modb_versionen') {
                                                                                             $lsf = t3lib_div::makeInstance('tx_he_tools_lsf');
                                                                                             $vertiefung = $get['vertiefung'];
                                                                                             $version = $get['version'];
                                                                                             $data = $lsf->gibVersionenSelect($vertiefung);
                                                                                             $this->returnTextData($data);
                                                                                         } else {
                                                                                             if ($action === 'test_gastkennungen_csv_exportiert') {
                                                                                                 $gastKennungen = t3lib_div::makeInstance('tx_he_tools_gast_kennungen');
                                                                                                 $uid = $get['uid'];
                                                                                                 $csvTest = $gastKennungen->csvDatenExportiert($uid);
                                                                                                 $this->returnJsonData($csvTest);
                                                                                                 exit;
                                                                                             } else {
                                                                                                 if ($action === 'gastkennung_loeschen') {
                                                                                                     $gastKennungen = t3lib_div::makeInstance('tx_he_tools_gast_kennungen');
                                                                                                     $antragsId = $get['antragsId'];
                                                                                                     $gastKennungen->gastKennungLoeschen($antragsId, $username);
                                                                                                     exit;
                                                                                                 } else {
                                                                                                     if ($action === 'file_download') {
                                                                                                         $fileUrl = base64_decode($get['file']);
                                                                                                         return tx_he_tools_util::downloadFile($fileUrl);
                                                                                                     }
                                                                                                 }
                                                                                             }
                                                                                         }
                                                                                     }
                                                                                 }
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return false;
 }
Exemplo n.º 2
0
 /**
  * Generates the module content
  *
  * @return	void
  */
 function moduleContent()
 {
     $util = new he_backend_util();
     switch ((string) $this->MOD_SETTINGS['function']) {
         case '1a':
             $this->content .= $this->pers_verwaltung->backend();
             break;
         case '1b':
             $this->content .= $this->pers_verwaltung->frontend();
             break;
         case '1c':
             $this->content .= $this->pers_verwaltung->addBackendUser();
             break;
         case '2':
             $this->content .= $this->seitenbaumAktionen($this->id);
             break;
         case 3:
             $this->content .= $this->bearbeiterAnzeigen($this->id);
             break;
         case 4:
             $app = new tx_he_tools_be_mountpoints();
             $this->content .= $app->temporaraerenMountPointAuswaehlen($this->id);
             break;
         case 5:
             $this->content .= $util->artikelExporte();
             break;
         case 7:
             //								$lsfTest = new tx_he_tools_lsf();
             //							  $this->content .= $lsfTest->test($this->MCONF['_']);
             break;
         case 8:
             $app = new he_tools_sys_logs();
             $this->content .= $app->main($this->id);
             break;
         case 10:
             $app = new tx_he_tools_alias();
             $this->content .= $app->main($this, $this->id);
             break;
         case 11:
             $app = new tx_he_tools_portal();
             $this->content .= $app->main($this, $this->id);
             break;
         case 12:
             $app = new tx_he_tools_solr();
             $this->content .= $app->main($this, $this->id);
             break;
         case 101:
             $this->content .= $this->qsmDatenImportieren();
             break;
         case 102:
             $buchungen = new tx_he_tools_veranstaltungs_buchung();
             $this->content .= $buchungen->backend_util($this->id);
             break;
         case 103:
             $zeitschriften = new tx_he_tools_zeitschriftenlisten('tx_he_tools');
             $zeitschriften->gibZeitschriftenListe($zeitschriftenListe);
             $this->exportiereZeitschriftenListe($zeitschriftenListe);
             break;
         case 104:
             $app = new tx_he_surveys_lib_import();
             $this->content .= $app->main($this->id, $this->file);
             break;
         case 105:
             $this->content .= $this->bearbeiterExportieren($this->id);
             break;
         case 106:
             $this->content .= $this->seitenRedakteureExportieren($this->id);
             break;
         case 107:
             $app = new tx_he_tools_qr_codes();
             $this->content .= $app->main($this, $this->id);
             break;
         case 999:
             $this->content .= $this->testfunktion();
             break;
             /*
             								case 99:
             							  $this->content .= $util->firmendaten_exportieren($this->id);
             								break;
             							case 101:
             								$werMachtWas = new he_werMachtWas();
             								$this->content .= $werMachtWas->importWerMachtWas();
             								break;
             */
         /*
         								case 99:
         							  $this->content .= $util->firmendaten_exportieren($this->id);
         								break;
         							case 101:
         								$werMachtWas = new he_werMachtWas();
         								$this->content .= $werMachtWas->importWerMachtWas();
         								break;
         */
         default:
             $this->content .= (string) $this->MOD_SETTINGS['function'];
             break;
     }
 }