function main() { $feUserObj = tslib_eidtools::initFeUser(); // Initialize FE user object tslib_eidtools::connectDB(); //Connect to database $table = 'tx_drwiki_pages'; $myPid = intval(t3lib_div::_GET('myPid')); $myKeyword = $GLOBALS['TYPO3_DB']->fullQuoteStr(trim(t3lib_div::_GET('myKeyword')), $table); $myKeyword = substr($myKeyword, 1, strlen($myKeyword) - 2); $searchString = $table . ".pid IN (" . $myPid . ") AND keyword like '%" . $myKeyword . "%'"; // get Database entries $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, $searchString); $results = array(); while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $results[$row["uid"]] = $row["keyword"]; } // Wir geben der Anfrage ein XML Objekt zurŸck $ajax_return_data = t3lib_div::array2xml($results); header('Expires: Mon, 26 Jul 2000 03:00:00 GMT'); header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . 'GMT'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); header('Content-Length: ' . strlen($ajax_return_data)); header('Content-Type: text/xml'); echo $ajax_return_data; }
/** * Main function * * @param [type] $$backRef: ... * @param [type] $menuItems: ... * @param [type] $table: ... * @param [type] $uid: ... * @return [type] ... */ function main(&$backRef, $menuItems, $table, $uid) { global $BE_USER, $TCA, $LANG; $localItems = array(); if (!$backRef->cmLevel) { // Returns directly, because the clicked item was not from the pages table if ($table == "tx_l10nmgr_cfg") { // Adds the regular item: $LL = $this->includeLL(); // Repeat this (below) for as many items you want to add! // Remember to add entries in the localconf.php file for additional titles. $url = t3lib_extMgm::extRelPath("l10nmgr") . "cm1/index.php?id=" . $uid; $localItems[] = $backRef->linkItem($GLOBALS["LANG"]->getLLL("cm1_title", $LL), $backRef->excludeIcon('<img src="' . t3lib_extMgm::extRelPath("l10nmgr") . 'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" />'), $backRef->urlRefForCM($url), 1); } $localItems["moreoptions_tx_l10nmgr_cm3"] = $backRef->linkItem('L10Nmgr tools', '', "top.loadTopMenu('" . t3lib_div::linkThisScript() . "&cmLevel=1&subname=moreoptions_tx_l10nmgrXX_cm3');return false;", 0, 1); // Simply merges the two arrays together and returns ... $menuItems = array_merge($menuItems, $localItems); } elseif (t3lib_div::_GET('subname') == 'moreoptions_tx_l10nmgrXX_cm3') { $url = t3lib_extMgm::extRelPath("l10nmgr") . "cm3/index.php?id=" . $uid . '&table=' . $table; $localItems[] = $backRef->linkItem('Create priority', '', $backRef->urlRefForCM($url . '&cmd=createPriority'), 1); $localItems[] = $backRef->linkItem('Manage priorities', '', $backRef->urlRefForCM($url . '&cmd=managePriorities'), 1); $localItems[] = $backRef->linkItem('Update Index', '', $backRef->urlRefForCM($url . '&cmd=updateIndex'), 1); $localItems[] = $backRef->linkItem('Flush Translations', '', $backRef->urlRefForCM($url . '&cmd=flushTranslations'), 1); $menuItems = array_merge($menuItems, $localItems); } return $menuItems; }
/** * Check FE Session * * @return boolean */ public function render() { // settings global $TYPO3_CONF_VARS; $userObj = tslib_eidtools::initFeUser(); $GLOBALS['TSFE'] = t3lib_div::makeInstance( 'tslib_fe', $TYPO3_CONF_VARS, t3lib_div::_GET('id'), 0, true ); $GLOBALS['TSFE']->fe_user = $userObj; // random value for session storing $value = md5(time()); // store in session $GLOBALS['TSFE']->fe_user->setKey('ses', $this->sessionKey, $value); $GLOBALS['TSFE']->storeSessionData(); if ($GLOBALS['TSFE']->fe_user->getKey('ses', $this->sessionKey) === $value) { return true; } return false; }
/** * Main function * * @return void */ function main() { switch ((string) t3lib_div::_GET('cmd')) { case 'menuitem': echo ' <img src="gfx/x_t3logo.png" width="61" height="16" hspace="3" alt="" />'; $menuItems = array(array('title' => 'About TYPO3', 'xurl' => 'http://typo3.com/', 'subitems' => array(array('title' => 'License', 'xurl' => 'http://typo3.com/License.1625.0.html'), array('title' => 'Support', 'subitems' => array(array('title' => 'Mailing lists', 'xurl' => 'http://lists.netfielders.de/cgi-bin/mailman/listinfo'), array('title' => 'Documentation', 'xurl' => 'http://typo3.org/documentation/'), array('title' => 'Find consultancy', 'xurl' => 'http://typo3.com/Consultancies.1248.0.html'))), array('title' => 'Contribute', 'xurl' => 'http://typo3.org/community/participate/'), array('title' => 'Donate', 'xurl' => 'http://typo3.com/Donations.1261.0.html', 'icon' => '1'))), array('title' => 'Extensions', 'url' => 'mod/tools/em/index.php'), array('title' => 'Menu preferences and such things', 'onclick' => 'alert("A dialog is now shown which will allow user configuration of items in the menu");event.stopPropagation();', 'state' => 'checked'), array('title' => '--div--'), array('title' => 'Recent Items', 'id' => $this->id . '_recent', 'subitems' => array(), 'html' => $this->menuItemObject($this->id . '_recent', ' fetched: false, onActivate: function() { // if (!this.fetched) { //Element.update("' . $this->id . '_recent-layer","asdfasdf"); getElementContent("' . $this->id . '_recent-layer", 0, "logomenu.php?cmd=recent") this.fetched = true; // } } ')), array('title' => '--div--'), array('title' => 'View frontend', 'xurl' => t3lib_div::getIndpEnv('TYPO3_SITE_URL')), array('title' => 'Log out', 'onclick' => "top.document.location='logout.php';")); echo $this->menuLayer($menuItems); break; case 'recent': $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('sys_log.*, MAX(sys_log.tstamp) AS tstamp_MAX', 'sys_log,pages', 'pages.uid=sys_log.event_pid AND sys_log.userid=' . intval($GLOBALS['BE_USER']->user['uid']) . ' AND sys_log.event_pid>0 AND sys_log.type=1 AND sys_log.action=2 AND sys_log.error=0', 'tablename,recuid', 'tstamp_MAX DESC', 20); $items = array(); while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $elRow = t3lib_BEfunc::getRecord($row['tablename'], $row['recuid']); if (is_array($elRow)) { $items[] = array('title' => t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($row['tablename'], $elRow), $GLOBALS['BE_USER']->uc['titleLen']) . ' - ' . t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $row['tstamp_MAX']), 'icon' => array(t3lib_iconworks::getIcon($row['tablename'], $elRow), 'width="18" height="16"'), 'onclick' => 'content.' . t3lib_BEfunc::editOnClick('&edit[' . $row['tablename'] . '][' . $row['recuid'] . ']=edit', '', 'dummy.php')); } } echo $this->menuItems($items); break; } }
public function renderElement_preProcessRow(&$row, $table, $parent) { $portalSeite = FALSE; if ($table == 'pages') { $get = t3lib_div::_GET(); $idGet = $get['id']; /* * Verweis testen: * bei Seiten vom Typ Verweis werden nicht die Daten der Originalseite * sondern die Daten der Zielseite übergeben (andere Id) */ if (!empty($idGet) && $idGet != $row['uid']) { $dokType = $this->getPageData($idGet, 'doktype'); } else { $dokType = $row['doktype']; } /* * Seiten vom Typ Verweis nicht ändern */ if ($dokType != 4) { $mp = $get['MP']; $uid = $row['uid']; $pid = $row['pid']; if ($uid == 92125) { $portalSeite = TRUE; } else { if (!empty($mp)) { $mountPageLists = explode(',', $mp); $mountPages = explode('-', $mountPageLists[0]); $pid = $mountPages[1]; } if ($this->isParentPage($pid, 92125)) { $portalSeite = TRUE; } } if ($portalSeite) { /* t3lib_div::devLog("MP: " . print_r($mp,true), 'tx_he_tools_templavoila_hooks', 0); //t3lib_div::devLog("row: " . print_r($row,true), 'tx_he_tools_templavoila_hooks', 0); t3lib_div::devLog("Portalseite: $uid, tx_templavoila_ds: " . $row['tx_templavoila_ds'], 'tx_he_tools_templavoila_hooks', 0); */ if (!empty($row['tx_templavoila_ds'])) { switch ($row['tx_templavoila_ds']) { // dreispaltig case 4: $row['tx_templavoila_ds'] = 19; $row['tx_templavoila_to'] = 39; break; // zweispaltig // zweispaltig case 9: $row['tx_templavoila_ds'] = 18; $row['tx_templavoila_to'] = 36; break; } } } } } }
/** * action new * * @param Tx_T3orgSpamremover_Domain_Model_SpamReport $newSpamReport * @dontvalidate $newSpamReport * @return void */ public function newAction(Tx_T3orgSpamremover_Domain_Model_SpamReport $newSpamReport = NULL) { try { $newSpamReport = $this->addDefaultValuesToReport($newSpamReport); // don't use plugin specific parameters, because url should be public API if (t3lib_div::_GET('spammer')) { /** @var Tx_T3orgSpamremover_Domain_Repository_SpammerRepository $spammerRepository */ $spammerRepository = $this->objectManager->get('Tx_T3orgSpamremover_Domain_Repository_SpammerRepository'); $spammer = $spammerRepository->getSpammerByMd5Email(t3lib_div::_GET('spammer')); if (!$spammer) { throw new InvalidArgumentException('The given user is not found. The user might have been deleted in the meantime.'); } $newSpamReport->setSpammer($spammer); } elseif (!$newSpamReport->getSpammer()) { if ($this->isLoggedInUserAnAdministrator()) { $this->redirect('list', 'Spammer'); } throw new InvalidArgumentException('No user given'); } if (t3lib_div::_GET('link')) { $newSpamReport->setLink((string) t3lib_div::_GET('link')); } $this->view->assign('newSpamReport', $newSpamReport); } catch (InvalidArgumentException $e) { $this->view->assign('error_text', $e->getMessage()); } }
/** * Sets up this testcase */ public function setUp() { $this->getBackup = t3lib_div::_GET(); $this->postBackup = t3lib_div::_POST(); $this->typo3DbBackup = $GLOBALS['TYPO3_DB']; $GLOBALS['TYPO3_DB'] = $this->getMock('t3lib_DB', array()); $this->backendConfigurationManager = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_Configuration_BackendConfigurationManager'), array('dummy')); }
public static function getMergedGP() { $gp = array_merge(t3lib_div::_GET(), t3lib_div::_POST()); $prefix = Tx_Formhandler_Globals::$formValuesPrefix; if ($prefix) { $gp = $gp[$prefix]; } return $gp; }
function auswertung() { $get = t3lib_div::_GET(); $post = t3lib_div::_POST(); $out = '<h1> Hier kommt eine Auswertung </h1>'; $out .= '<h3>Get: ' . print_r($get, true) . '</h3>'; $out .= '<h3>Post: ' . print_r($post, true) . '</h3>'; return $out; }
/** * Sets up this testcase */ public function setUp() { $this->getBackup = t3lib_div::_GET(); $this->postBackup = t3lib_div::_POST(); $this->typo3DbBackup = $GLOBALS['TYPO3_DB']; $GLOBALS['TYPO3_DB'] = $this->getMock('t3lib_DB', array()); $this->extConfBackup = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']; $this->backendConfigurationManager = $this->getAccessibleMock('Tx_Extbase_Configuration_BackendConfigurationManager', array('getTypoScriptSetup')); }
public function setUp() { $this->tsfeBackup = $GLOBALS['TSFE']; $GLOBALS['TSFE'] = $this->getMock('tslib_fe', array(), array(), '', FALSE); $this->getBackup = t3lib_div::_GET(); $this->contentObject = $this->getMock('tslib_cObj'); $this->request = $this->getMock('Tx_Extbase_MVC_Web_Request'); $this->uriBuilder = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Web_Routing_UriBuilder'), array('dummy'), array($this->contentObject)); $this->uriBuilder->setRequest($this->request); }
/** * Default constructor. */ public function __construct() { $this->supportedDrivers = $this->getSupportedDrivers(); $this->availableDrivers = $this->getAvailableDrivers(); $configDriver =& $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dbal']['handlerCfg']['_DEFAULT']['config']['driver']; $this->driver = t3lib_div::_GET('driver'); if (!$this->driver && $configDriver) { $this->driver = $configDriver; } }
public function setUp() { $this->tsfeBackup = $GLOBALS['TSFE']; $GLOBALS['TSFE'] = $this->getMock('tslib_fe', array(), array(), '', FALSE); $this->getBackup = t3lib_div::_GET(); $this->mockContentObject = $this->getMock('tslib_cObj'); $this->mockRequest = $this->getMock('Tx_Extbase_MVC_Web_Request'); $this->uriBuilder = $this->getAccessibleMock('Tx_Extbase_MVC_Web_Routing_UriBuilder', array('build')); $this->uriBuilder->setRequest($this->mockRequest); $this->uriBuilder->_set('contentObject', $this->mockContentObject); }
protected function loadGP() { $gp = array_merge(t3lib_div::_GET(), t3lib_div::_POST()); if ($this->formValuesPrefix) { $gp = $gp[$this->formValuesPrefix]; } if (!is_array($gp)) { $gp = array(); } return $gp; }
function add_totop_params() { $params_search = t3lib_div::_GET('tx_indexedsearch'); if ($params_search) { $addParams = t3lib_div::_GET('no_cache') ? '&no_cache=1' : ''; foreach ($params_search as $k => $v) { $addParams .= '&tx_indexedsearch[' . $k . ']=' . $v; } } return $addParams; }
/** * Set current query * * @param Tx_Youtubeapi_Domain_Model_Video $query The query * @return void */ public function setQuery($settings) { $this->settings = $settings; $this->vars = t3lib_div::_GET('tx_youtubeapi_pi1'); $this->postvars = t3lib_div::_POST('tx_youtubeapi_pi1'); if ($this->postvars[search]) { $GLOBALS['TSFE']->fe_user->setKey("ses", "search", $this->postvars[search]); $this->settings['searchTerms'] = $GLOBALS["TSFE"]->fe_user->getKey("ses", "search"); } if ($this->postvars[maxResults]) { $GLOBALS['TSFE']->fe_user->setKey("ses", "maxResults", $this->postvars[maxResults]); } $this->settings['maxResults'] = $GLOBALS["TSFE"]->fe_user->getKey("ses", "maxResults") ? $GLOBALS["TSFE"]->fe_user->getKey("ses", "maxResults") : $this->settings['maxResults']; $limit = $this->settings['maxResults']; if ($this->vars) { $page = (int) $this->vars[page]; $start = $page * $limit + 1; } else { $start = 1; } $this->yt = new Zend_Gdata_YouTube(); $this->query = $this->yt->newVideoQuery(); $this->query->orderBy = $this->settings['orderBy']; $this->query->startIndex = $this->vars['start'] ? $this->vars['start'] : (int) $start; $this->query->maxResults = (int) $limit; print_r($this->settings['channel']); // Build search (flexform values will be overidden by searchoptions in FE) if ($this->postvars[type] == "") { $this->query->videoQuery = $this->postvars[search] ? $this->postvars[search] : $this->settings['searchTerm']; } // searching by keywords if ($this->settings['keywords'] || $this->postvars[type] == "keyword") { $keywords = $this->postvars[search] ? $this->postvars[search] : $this->settings['keywords']; $this->query->category = $this->_keyworded($keywords); } // searching by category if (($this->settings['category'] || $this->postvars[type] == "category") && !$this->settings['keywords']) { $category = $this->postvars[search] ? $this->postvars[search] : $this->settings['category']; $this->query->category = $this->_categorized($category); } // searching by category and keywords if (($this->settings['keywords'] || $this->postvars[type] == "keyword") && ($this->settings['category'] || $this->postvars[type] == "category")) { if ($this->settings['keywords'] && $this->postvars[type] == "category") { $keywords = $this->settings['keywords']; $category = $this->postvars[search]; } if ($this->settings['category'] && $this->postvars[type] == "keyword") { $keywords = $this->postvars[search]; $category = $this->settings['category']; } $this->query->category = $this->_categorized($category) . "/" . $this->_keyworded($keywords); } }
/** * Initializes the search component. * * Sets the sorting query parameters * */ public function initializeSearchComponent() { if (!empty($this->searchConfiguration['query.']['sortBy'])) { $this->query->addQueryParameter('sort', $this->searchConfiguration['query.']['sortBy']); } $solrGetParameters = t3lib_div::_GET('tx_solr'); if (!empty($this->searchConfiguration['sorting']) && !empty($solrGetParameters['sort']) && preg_match('/^([a-z0-9_]+ (asc|desc)[, ]*)*([a-z0-9_]+ (asc|desc))+$/i', $solrGetParameters['sort'])) { $sortHelper = t3lib_div::makeInstance('Tx_Solr_Sorting', $this->searchConfiguration['sorting.']['options.']); $sortField = $sortHelper->getSortFieldFromUrlParameter($solrGetParameters['sort']); $this->query->setSorting($sortField); } }
/** * Resolves the current iteration index (relative) of a loop to the absolute * number counting from zero of the total number of results. * * @param array $arguments * @return string */ public function execute(array $arguments = array()) { $numberOfResults = $this->search->getNumberOfResults(); $currentIterationIndex = $arguments[0]; $resultsPerPage = $this->search->getResultsPerPage(); $currentPage = 0; $getParameters = t3lib_div::_GET('tx_solr'); if (isset($getParameters['page'])) { $currentPage = intval($getParameters['page']); } return $currentPage * $resultsPerPage + $currentIterationIndex; }
/** * 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'], 'auswahl', 'allgemein'); $host = t3lib_div::getIndpEnv('HTTP_HOST'); $this->pageLink = $this->pi_getPageLink($id); $get = t3lib_div::_GET(); if ($get['L'] == 1) { $this->language = 'en'; } else { $this->language = 'de'; } $GLOBALS['TSFE']->additionalHeaderData['he_tools_pi2'] .= ' <link rel="stylesheet" type="text/css" href="/typo3conf/ext/he_tools/pi2/he_img_links.css" /> '; switch ($modus) { case "STARTSEITE_FAKULTAET": $pfad = '/fileadmin/medien/fakultaeten/allgemein/startseite_fakultaeten/'; $konfiguration = self::$tabConfig['STARTSEITE_FAKULTAET']; $content = $this->renderFakultaetsSeite($konfiguration, $this->cObj->data['pi_flexform']['data'], $pfad); break; case "STARTSEITE_STUDIENGANG": $pfad = '/fileadmin/medien/fakultaeten/allgemein/startseite_studiengaenge/'; $konfiguration = self::$tabConfig['STARTSEITE_STUDIENGANG']; $content = $this->renderStudiengangSeite($konfiguration, $this->cObj->data['pi_flexform']['data'], $pfad); break; case "FREIE_CONTAINER_EINSTIEG": $content = $this->renderFreieContainerEinstieg($this->cObj->data['pi_flexform']['data']); break; case "FREIE_CONTAINER_UNTERSEITE": $content = $this->renderFreieContainerUnterseite($this->cObj->data['pi_flexform']['data']); break; case "FREIE_CONTAINER_UNTERSEITE_TEXT": $content = $this->renderFreieContainerUnterseite($this->cObj->data['pi_flexform']['data'], TRUE); break; case "STARTSEITE_JUBILAEUM": $content = $this->renderStartseiteJubilaeum($this->cObj->data['pi_flexform']['data']); break; case "UNTERSEITE_JUBILAEUM": $content = $this->jubilaeumUnterseite($this->cObj->data['pi_flexform']['data']); break; default: $content = '<h3>noch nicht implementiert: ' . $kuerzel . '</h3>'; break; } $content = '<div id="he_container">' . $content . '</div>'; return $this->pi_wrapInBaseClass($content); }
/** * Main function, rendering the element browser in RTE mode. * * @return void */ function main() { // Setting alternative web browsing mounts (ONLY local to browse_links.php this script so they stay "read-only") $altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.altElementBrowserMountPoints')); // Clear temporary DB mounts $tmpMount = t3lib_div::_GET('setTempDBmount'); if (isset($tmpMount)) { $GLOBALS['BE_USER']->setAndSaveSessionData('pageTree_temporaryMountPoint', intval($tmpMount)); } // Set temporary DB mounts $tempDBmount = intval($GLOBALS['BE_USER']->getSessionData('pageTree_temporaryMountPoint')); if ($tempDBmount) { $altMountPoints = $tempDBmount; } if ($altMountPoints) { $GLOBALS['BE_USER']->groupData['webmounts'] = implode(',', array_unique(t3lib_div::intExplode(',', $altMountPoints))); $GLOBALS['WEBMOUNTS'] = $GLOBALS['BE_USER']->returnWebmounts(); } // Setting alternative file browsing mounts (ONLY local to browse_links.php this script so they stay "read-only") $altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.folderTree.altElementBrowserMountPoints')); if ($altMountPoints) { $altMountPoints = t3lib_div::trimExplode(',', $altMountPoints); foreach ($altMountPoints as $filePathRelativeToFileadmindir) { $GLOBALS['BE_USER']->addFileMount('', $filePathRelativeToFileadmindir, $filePathRelativeToFileadmindir, 1, 'readonly'); } $GLOBALS['FILEMOUNTS'] = $GLOBALS['BE_USER']->returnFilemounts(); } // Render type by user function $browserRendered = false; if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'])) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'] as $classRef) { $browserRenderObj = t3lib_div::getUserObj($classRef); if (is_object($browserRenderObj) && method_exists($browserRenderObj, 'isValid') && method_exists($browserRenderObj, 'render')) { if ($browserRenderObj->isValid($this->mode, $this)) { $this->content .= $browserRenderObj->render($this->mode, $this); $browserRendered = true; break; } } } } // If type was not rendered, use default rendering functions if (!$browserRendered) { $GLOBALS['SOBE']->browser = t3lib_div::makeInstance('tx_rtehtmlarea_browse_links'); $GLOBALS['SOBE']->browser->init(); $modData = $GLOBALS['BE_USER']->getModuleData('browse_links.php', 'ses'); list($modData, $store) = $GLOBALS['SOBE']->browser->processSessionData($modData); $GLOBALS['BE_USER']->pushModuleData('browse_links.php', $modData); $this->content = $GLOBALS['SOBE']->browser->main_rte(); } }
/** * @param string $content The content * @param array $configuration The TS configuration array * @return string $content The processed content */ public function run($content, $configuration) { $this->initializeClassLoader(); $this->objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager'); $this->initializeConfiguration($configuration); $this->configureObjectManager(); $ajaxWidgetContextHolder = $this->objectManager->get('Tx_Fluid_Core_Widget_AjaxWidgetContextHolder'); $widgetIdentifier = t3lib_div::_GET('fluid-widget-id'); $widgetContext = $ajaxWidgetContextHolder->get($widgetIdentifier); $configuration['extensionName'] = $widgetContext->getParentExtensionName(); $configuration['pluginName'] = $widgetContext->getParentPluginName(); $extbaseBootstrap = $this->objectManager->get('Tx_Extbase_Core_Bootstrap'); $extbaseBootstrap->cObj = $this->cObj; return $extbaseBootstrap->run($content, $configuration); }
/** * Creates a link to a given page with a given link text with the current * tx_solr parameters appended to the URL * * @param array Array of arguments, [0] is the link text, [1] is the (optional) page Id to link to (otherwise TSFE->id), [2] are additional URL parameters, [3] use cache, defaults to FALSE * @return string complete anchor tag with URL and link text */ public function execute(array $arguments = array()) { $linkText = $arguments[0]; $pageId = $arguments[1] ? intval($arguments[1]) : $GLOBALS['TSFE']->id; $additionalParameters = $arguments[2] ? $arguments[2] : ''; $useCache = $arguments[3] ? TRUE : FALSE; $query = $this->search->getQuery(); $prefix = 'tx_solr'; $getParameters = t3lib_div::_GET($prefix); $piVars = is_array($getParameters) ? $getParameters : array(); $queryParameters = array_merge($piVars, array('q' => $query->getKeywords())); $queryParameters = $query->removeUnwantedUrlParameters($queryParameters); $linkConfiguration = array('useCacheHash' => $useCache, 'no_cache' => FALSE, 'parameter' => $pageId, 'additionalParams' => t3lib_div::implodeArrayForUrl('', array($prefix => $queryParameters), '', TRUE) . $additionalParameters); return $this->contentObject->typoLink($linkText, $linkConfiguration); }
public function main($parent, $pageId) { $this->post = t3lib_div::_POST(); $this->get = t3lib_div::_GET(); $erg = '<script src="../typo3conf/ext/he_portal/res/jquery/js/jquery-1.7.1b.min.js" type="text/javascript"></script> <script src="../typo3conf/ext/he_portal/res/jquery/js/portal.js" type="text/javascript"></script><br> <div class="aliasVerwaltung"> <h1 class="heading">Alias Verwaltung</h1> <form method="post" action="">'; $aliasListe = $this->post['aliasListe']; $aliasEingabe = $this->post['aliasEingabe']; $aliasSpeichern = $this->post['aliasSpeichern']; $filter = $this->post['filter']; $alias = $this->post['alias']; $url = $this->post['url']; $lang = $this->post['lang']; $uid = $this->post['uid']; $auswahl = ''; if (empty($aliasListe) && empty($aliasEingabe) && empty($aliasSpeichern) && empty($abbrechen)) { $action = $this->get['action']; if ($action != '') { switch ($action) { case 'edit': $aliasUid = $this->get['aliasUid']; if (!empty($aliasUid)) { $auswahl = $this->aliasBearbeiten($aliasUid, $pageId); } break; } } } else { if ($aliasEingabe != '') { $auswahl = $this->aliasEingabe($alias, $url, $lang, $pageId); } else { if ($aliasSpeichern != '') { $erg .= $this->aliasSpeichern($alias, $url, $lang, $uid); } } } if (empty($auswahl)) { $erg .= $this->aliasEingabe($alias, $url, $lang, $pageId); $erg .= $this->aliasListe($filter); } else { $erg .= $auswahl; } $erg .= '</div>'; return $erg; }
public function main($parent, $pageId) { $this->post = t3lib_div::_POST(); $this->get = t3lib_div::_GET(); $erg = '<div class="qrCodes">'; $erg .= '<h1 class="heading">QR-Codes</h1>'; $filter = $this->post['filter']; $alias = $this->post['alias']; $url = $this->post['url']; $lang = $this->post['lang']; $uid = $this->post['uid']; $auswahl = $this->aliasListe($filter); $erg .= $auswahl; $erg .= '</div>'; return $erg; }
function getCacheID($cache_id = null) { // If caching is disabled in TYPO3 make sure it's disabled in Smarty as well if ($GLOBALS['TSFE']->no_cache || t3lib_div::_GP('no_cache')) { $this->caching = false; return; // Exit here } // If cHash is set, use it for the cache_id if (t3lib_div::_GP('cHash')) { return t3lib_div::_GP('cHash'); } // Otherwise create a unique cache_id from POST/GET vars // TODO: Observe how well Smarty caching works in the context of TYPO3. Disabling caching is generally recommended... return $cache_id ? $cache_id : t3lib_div::shortMD5(serialize(array_merge(t3lib_div::_GET(), t3lib_div::_POST()))); }
public function kennungenVerwalten() { if (!tx_he_tools_util::userEingeloggt()) { return $this->zeigeLoginLink(); } $username = $GLOBALS['TSFE']->fe_user->user['username']; $get = t3lib_div::_GET(); $post = t3lib_div::_POST(); if (isset($get['antragsId']) && isset($get['csvExport'])) { $uid = $get['antragsId']; if ($this->zugriffErlaubt($username, $uid, 'csvExport')) { return $this->csvExport($username, $uid); } } if (isset($get['antragsId']) && isset($get['angelegt'])) { $uid = $get['antragsId']; if ($this->zugriffErlaubt($username, $uid, 'angelegt')) { if ($get['noEmail'] == 1) { return $this->kennungenAngelegt($uid, false); } elseif ($get['confirm'] == 1) { return $this->kennungenAngelegt($uid); } else { return $this->zeigeFormularKennungenAngelegt($uid); } } } if (isset($get['antragsId']) && $get['loeschen'] == 1) { $antragsId = $get['antragsId']; if ($this->zugriffErlaubt($username, $antragsId, 'loeschen')) { $this->antragLoeschen($antragsId, $username); $page = $GLOBALS['TSFE']->id; $pageUrl = 'https://www.hs-esslingen.de/index.php?id=' . $page; t3lib_utility_Http::redirect($pageUrl); exit; } } $GLOBALS['TSFE']->additionalHeaderData['he_tools_css_1'] .= ' <link href="' . t3lib_extMgm::siteRelPath('he_tools') . 'res/css/cisco_guests_form.css" rel="stylesheet" type="text/css" /> <link href="/typo3/sysext/t3skin/stylesheets/sprites/t3skin.css" rel="stylesheet" type="text/css" /> '; if (!empty($get['antragsId'])) { $out = $this->antragsdatenEinzeln($username, $get['antragsId']); } else { $out = $this->antragsdatenListe($username); } return $out; }
public function main($parent, $pageId) { $this->post = t3lib_div::_POST(); $this->get = t3lib_div::_GET(); $erg .= '<div class="portalFunktionen">'; $erg .= '<h1>Portal Funktionen</h1>'; $erg .= '<form name="alias" method="post" action="">'; $gadgetsAktivieren = $this->post['gadgetsAktivieren']; $gadgetAuswahl = $this->post['gadgetAuswahl']; if (!empty($gadgetsAktivieren) || !empty($gadgetAuswahl)) { $erg .= $this->gadgetsAktivieren($gadgetAuswahl); } $erg .= '<input type="submit" name="gadgetsAktivieren" value="Gadgets für alle aktivieren"/>'; $erg .= '</form>'; $erg .= '</div>'; return $erg; }
/** * Gets the facet's currently user-selected options * * @return array An array with user-selected facet options. */ public function getSelectedOptions() { $selectedOptions = array(); #FIXME $resultParameters = t3lib_div::_GET('tx_solr'); $filterParameters = array(); if (isset($resultParameters['filter'])) { $filterParameters = (array) array_map('urldecode', $resultParameters['filter']); } foreach ($filterParameters as $filter) { list($facetName, $filterValue) = explode(':', $filter); if ($facetName == $this->name) { $selectedOptions[] = $filterValue; } } return $selectedOptions; }
/** * Check if the context is active now. * * @param array $arDependencies Array of dependent context objects * * @return boolean True if the context is active, false if not */ public function match(array $arDependencies = array()) { $param = trim($this->getConfValue('field_name')); if ($param === '') { throw new Exception('Parameter name missing from GET Parameter' . ' context configuration'); } $value = t3lib_div::_GET($param); if ($value === null) { //load from session if no param given list($bUseMatch, $bMatch) = $this->getMatchFromSession(); if ($bUseMatch) { return $this->invert($bMatch); } } // Register param on TSFE service for cache and linkVars management Tx_Contexts_Context_Type_GetParam_TsfeService::register($param, $value, !(bool) $this->use_session); return $this->invert($this->storeInSession($this->matchParameters($value))); }
private function getObjectsUsingPlainSQL() { $objects = array(); $pageUid = t3lib_div::_GET('id'); if (!ctype_digit($pageUid) || empty($pageUid)) { return 'No pid'; } $query = " SELECT uid FROM tx_asd_domain_model_test WHERE pid = " . $pageUid . " AND deleted = 0 AND hidden = 0"; $res = $GLOBALS['TYPO3_DB']->sql_query($query); while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $objects[] = $this->testRepository->findByUid((int) $row['uid']); } return $objects; }