当前位置: 首页>>代码示例>>PHP>>正文


PHP t3lib_div::getURL方法代码示例

本文整理汇总了PHP中t3lib_div::getURL方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_div::getURL方法的具体用法?PHP t3lib_div::getURL怎么用?PHP t3lib_div::getURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在t3lib_div的用法示例。


在下文中一共展示了t3lib_div::getURL方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Analyze a given JS script
  * @param $file
  * @param $string
  * @param $config
  * @return void
  */
 public function __construct($inputFile = '', $string = FALSE, $config = array())
 {
     $this->configXML = $config;
     if ($string || ($string = t3lib_div::getURL($inputFile))) {
         // we just look for double quote
         $string = str_replace("'", '"', $string);
         $result = array();
         $components = array();
         if (count($this->configXML) > 0) {
             // build the components array
             foreach ($this->configXML as $group) {
                 if (count($group['files']) > 0) {
                     foreach ($group['files'] as $file) {
                         $components[$file['name']] = $file;
                         $components[$file['name']]['groupname'] = $group['name'];
                     }
                 }
             }
             // search for
             foreach ($this->configXML as $group) {
                 if (count($group['files']) > 0) {
                     foreach ($group['files'] as $file) {
                         if ($this->contains($string, $file['sources']) === TRUE) {
                             $result = array_merge($result, array($components[$file['depends']]['name'] => $components[$file['depends']]['groupname']));
                             $result = array_merge($result, array($file['name'] => $components[$file['name']]['groupname']));
                         }
                     }
                 }
             }
         }
         $this->dependencies = $result;
     }
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:40,代码来源:class.analyzeJqJS.php

示例2: getPagePath

 /**
  * Creates URL to page using page id and parameters
  *
  * @param int $pageId
  * @param string $parameters
  * @return	string	Path to page or empty string
  */
 public static function getPagePath($pageId, $parameters = '')
 {
     if (is_array($parameters)) {
         $parameters = t3lib_div::implodeArrayForUrl('', $parameters);
     }
     $data = array('id' => intval($pageId));
     if ($parameters != '' && $parameters[0] == '&') {
         $data['parameters'] = $parameters;
     }
     $siteUrl = self::getSiteUrl($pageId);
     if ($siteUrl) {
         $url = $siteUrl . 'index.php?eID=pagepath&data=' . base64_encode(serialize($data));
         // Send TYPO3 cookies as this may affect path generation
         $headers = array('Cookie: fe_typo_user=' . $_COOKIE['fe_typo_user']);
         $result = t3lib_div::getURL($url, false, $headers);
         $urlParts = parse_url($result);
         if (!is_array($urlParts)) {
             // filter_var is too strict (for example, underscore characters make it fail). So we use parse_url here for a quick check.
             $result = '';
         } elseif ($result) {
             // See if we need to prepend domain part
             if ($urlParts['host'] == '') {
                 $result = rtrim($siteUrl, '/') . '/' . ltrim($result, '/');
             }
         }
     } else {
         $result = '';
     }
     return $result;
 }
开发者ID:educo-adymorz,项目名称:typo3-pagepath,代码行数:37,代码来源:class.tx_pagepath_api.php

示例3: __construct

 /**
  * The constructor for a finisher setting the component manager and the configuration.
  *
  * @param Tx_Formhandler_Component_Manager $componentManager
  * @param Tx_Formhandler_Configuration $configuration
  * @author Reinhard Führicht <rf@typoheads.at>
  * @return void
  */
 public function __construct(Tx_Formhandler_Component_Manager $componentManager, Tx_Formhandler_Configuration $configuration)
 {
     $this->componentManager = $componentManager;
     $this->configuration = $configuration;
     $this->templatePath = t3lib_extMgm::extPath('formhandler') . 'Resources/HTML/backend/';
     $this->templateFile = $this->templatePath . 'template.html';
     $this->templateCode = t3lib_div::getURL($this->templateFile);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:16,代码来源:Tx_Formhandler_Controller_Backend.php

示例4: init

 /**
  * init method to load translation data and set log table.
  *
  * @global $LANG
  * @return void
  */
 protected function init()
 {
     global $LANG;
     $LANG->includeLLFile('EXT:formhandler/Resources/Language/locallang.xml');
     $templatePath = t3lib_extMgm::extPath('formhandler') . 'Resources/HTML/backend/';
     $templateFile = $templatePath . 'template.html';
     $this->templateCode = t3lib_div::getURL($templateFile);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:14,代码来源:Tx_Formhandler_Controller_BackendClearLogs.php

示例5: main

 /**
  * Main function
  *
  * @param	string		Absolute path to the selected PHP file
  * @param	string		Extension dir (local, global, system) relative to PATH_site
  * @return	string		HTML content.
  */
 function main($phpFile, $extensionDir)
 {
     if (@is_file($phpFile)) {
         $fCheck = $this->checkLLfilename($phpFile);
         if (!$fCheck) {
             $fileContent = t3lib_div::xml2array(t3lib_div::getURL($phpFile));
             if (@is_array($fileContent)) {
                 return $this->renderForm($fileContent, $phpFile);
             } else {
                 return 'ERROR: File is not XML: ' . $fileContent;
             }
         } else {
             return 'ERROR: ' . $fCheck;
         }
     }
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:23,代码来源:class.tx_extdeveval_llxmlsplit.php

示例6: createPdf

 function createPdf($abschlussLsf, $spoVersion, $fakultaet, $studiengangLsf, $vertiefungLsf = '')
 {
     $error = FALSE;
     $url = 'http://www3.hs-esslingen.de/qislsf/rds?state=modulBeschrGast&createPDF=Y&create=blobs&modulversion.semester=&modulversion.versionsid=' . '&nodeID=auswahlBaum|abschluss:abschl=' . $abschlussLsf . '|studiengang:stg=' . $studiengangLsf . '|stgSpecials:vert=' . $vertiefungLsf . ',schwp=,kzfa=H,pversion=' . $spoVersion . '&expand=1&asi=#';
     $dateiName = $studiengangLsf;
     if (!empty($vertiefungLsf)) {
         $dateiName .= '_' . $vertiefungLsf;
     }
     $dateiName .= '_' . $spoVersion;
     $dateiNameDe = $dateiName . '_de.pdf';
     $pfad = 'fileadmin/medien/fakultaeten/allgemein/modulbeschreibungen/' . $fakultaet;
     $documentRoot = t3lib_div::getIndpEnv(TYPO3_DOCUMENT_ROOT);
     $pfadKomplett = $documentRoot . '/' . $pfad;
     if (!is_dir($pfadKomplett)) {
         mkdir($pfadKomplett, 0755);
     }
     $dateiPfad = $pfadKomplett . '/' . $dateiNameDe;
     $redirectHeader = t3lib_div::getURL($url, 1, true, $report);
     preg_match('#^(.*)(http://www3.hs-esslingen.de/qislsf/.*&asi=)(.*)#Uis', $redirectHeader, $matches);
     $urlNew = $matches[2];
     $content = t3lib_div::getURL($urlNew, 1, true, $report);
     if ($report['error']) {
         $error = 'Fehler beim Einlesen des PDFs: "' . $dateiPfad . '"';
     } else {
         file_put_contents($dateiPfad, $content);
         /*
         $urlEnStart = 'http://www3.hs-esslingen.de/qislsf/rds?state=user&type=5&language=en';
         preg_match('#^(.*)(http://www3.hs-esslingen.de/qislsf/.*&asi=)(.*)#Uis',$redirectHeader,$matches);
         
         $content = t3lib_div::getURL($urlNew, 1, true, $report);
         $dateiNameEn = $dateiName . '_en.pdf';
         $dateiPfad = $pfadKomplett . '/' . $dateiNameEn;
         $redirectHeader = t3lib_div::getURL($url, 1, true, $report);
         preg_match('#^(.*)(http://www3.hs-esslingen.de/qislsf/.*&asi=)(.*)#Uis',$redirectHeader,$matches);
         $urlNew = $matches[2];
         $content = t3lib_div::getURL($urlNew, 1, true, $report);
         if ($report['error']) {
         	$error = 'Fehler beim Einlesen des PDFs: "' . $dateiPfad . '"';
         } else {
         	file_put_contents($dateiPfad, $content);
         }
         */
     }
     return $error;
 }
开发者ID:mmirsch,项目名称:he_tools1,代码行数:45,代码来源:class.tx_hetools_loesche_modul_pdfs.php

示例7: listMimeTypes

    /**
     * List media types, along with options to edit & delete
     *
     * @return	string		HTML table of all the mimetypes
     */
    function listMimeTypes()
    {
        global $LANG, $BACK_PATH, $BE_USER;
        // Load template
        $content = t3lib_parsehtml::getSubpart(t3lib_div::getURL($BACK_PATH . t3lib_extMgm::extRelPath('dam') . 'modfunc_tools_mimetypes/template.html'), '###MOD_TEMPLATE###');
        $rowTemplate[1] = t3lib_parsehtml::getSubpart($content, '###ROW_1###');
        $rowTemplate[2] = t3lib_parsehtml::getSubpart($content, '###ROW_2###');
        // Add some JS
        $this->pObj->doc->JScode .= $this->pObj->doc->wrapScriptTags('
				function deleteRecord(id)	{	//
					if (confirm(' . $LANG->JScharCode($LANG->getLL('deleteWarning')) . '))	{
						window.location.href = "' . $BACK_PATH . 'tce_db.php?cmd[tx_dam_media_types]["+id+"][delete]=1&redirect=' . rawurlencode(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')) . '&id=' . tx_dam_db::getPid() . '&vC=' . $BE_USER->veriCode() . '&prErr=1&uPT=1";
					}
					return false;
				}
		');
        // Get content
        $alternate = 1;
        $rows = '';
        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_dam_media_types', '', '', 'ext ASC');
        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
            $editURL = $BACK_PATH . 'alt_doc.php?returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')) . '&id=' . tx_dam_db::getPid() . '&edit[tx_dam_media_types][' . $row['uid'] . ']=edit';
            //$deleteURL = $BACK_PATH . 'alt_doc.php?returnUrl=' . rawurlencode( t3lib_div::getIndpEnv('TYPO3_REQUEST_URL') ) . '&id=' . tx_dam_db::getPid() . '&edit[tx_dam_media_types][' . $row['uid'] . '][delete]=1';
            $rowMarkers['EDIT'] = '<a href="#" onclick="window.location.href=\'' . $editURL . '\'; return false;"><img' . t3lib_iconWorks::skinImg($this->pObj->doc->backPath, 'gfx/edit2.gif', 'width="11" height="12"') . ' title="Edit this type" alt="" height="16" width="16"></a>';
            $rowMarkers['DELETE'] = '<a href="#" onclick="deleteRecord(' . $row['uid'] . ')"><img' . t3lib_iconWorks::skinImg($this->pObj->doc->backPath, 'gfx/deletedok.gif', 'width="11" height="12"') . ' title="Delete this type" alt="" height="16" width="16"></a>';
            $rowMarkers['EXTENSION'] = $row['ext'];
            $rowMarkers['MIME'] = $row['mime'];
            $rowMarkers['ICON'] = '<img src="' . $BACK_PATH . tx_dam::icon_getFileType(array('file_type' => $row['ext'], 'media_type' => $row['type'])) . '" />';
            $rows .= t3lib_parsehtml::substituteMarkerArray($rowTemplate[$alternate], $rowMarkers, '###|###');
            // Cycle the alternating rows
            if ($alternate == 2) {
                $alternate = 1;
            } else {
                $alternate = 2;
            }
        }
        $content = t3lib_parsehtml::substituteSubpart($content, '###ROWS###', $rows);
        $GLOBALS['TYPO3_DB']->sql_free_result($res);
        return $content;
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:45,代码来源:class.tx_dam_tools_mimetypes.php

示例8: main

 /**
  * Main function, rendering the content of the rename form
  *
  * @return	void
  */
 function main()
 {
     global $LANG;
     $content = '';
     if (is_array($this->pObj->data) and isset($this->pObj->data['file_content'])) {
         // process conent update
         $error = tx_dam::process_editFile($this->pObj->media->getInfoArray(), $this->pObj->data['file_content']);
         if ($error) {
             $content .= $this->pObj->errorMessageBox($error);
         } elseif (t3lib_div::_GP('_saveandclosedok_x')) {
             $this->pObj->redirect(true);
             return;
         }
     }
     $content .= $this->renderForm(t3lib_div::getURL($this->pObj->media->getPathAbsolute()));
     return $content;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:22,代码来源:class.tx_dam_edit_text.php

示例9: getUrlHeaders

 /**
  * Getting HTTP request headers of URL
  *
  * @param	string		The URL
  * @param	integer		Timeout (seconds?)
  * @return	mixed		If no answer, returns false. Otherwise an array where HTTP headers are keys
  */
 function getUrlHeaders($url)
 {
     $content = t3lib_div::getURL($url, 2);
     // Try to get the headers only
     if (strlen($content)) {
         // Compile headers:
         $headers = t3lib_div::trimExplode(LF, $content, 1);
         $retVal = array();
         foreach ($headers as $line) {
             if (!strlen(trim($line))) {
                 break;
                 // Stop at the first empty line (= end of header)
             }
             list($headKey, $headValue) = explode(':', $line, 2);
             $retVal[$headKey] = $headValue;
         }
         return $retVal;
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:26,代码来源:class.indexer.php

示例10: addStyles

 /**
  * Add CSS styles
  *
  * This functions reads the module's stylesheet and replace some
  * colors to add skinning compatibility.
  *
  * @return		CSS styles, ready to be included in a <style> tag
  */
 function addStyles()
 {
     // Get stylesheet path
     $path = t3lib_extMgm::extPath('tscobj') . 'wiz1/stylesheet.css.tmpl';
     // Read stylesheet
     $styles = t3lib_div::getURL($path);
     // Replace color markers
     $styles = str_replace('###COLOR1###', $this->doc->bgColor5, $styles);
     $styles = str_replace('###COLOR2###', $this->doc->bgColor6, $styles);
     $styles = str_replace('###COLOR3###', $this->doc->bgColor3, $styles);
     // Return CSS styles
     return $styles;
 }
开发者ID:Gerberus,项目名称:tscobj,代码行数:21,代码来源:index.php

示例11: getMimeType

 /**
  * This function returns the mime type of the file specified by the url
  *
  * @param	string		$url: the url
  * @return	string		$mimeType: the mime type found in the header
  */
 public function getMimeType($url)
 {
     $mimeType = '';
     $headers = trim(t3lib_div::getURL($url, 2));
     if ($headers) {
         $matches = array();
         if (preg_match('/(Content-Type:[\\s]*)([a-zA-Z_0-9\\/\\-\\.\\+]*)([\\s]|$)/', $headers, $matches)) {
             $mimeType = trim($matches[2]);
         }
     }
     return $mimeType;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:18,代码来源:class.t3lib_htmlmail.php

示例12: pageErrorHandler

 /**
  * Generic error page handler.
  * Exits.
  *
  * @param	mixed		Which type of handling; If a true PHP-boolean or TRUE then a ->printError message is outputted. If integer an error message with that number is shown. Otherwise the $code value is expected to be a "Location:" header value.
  * @param	string		If set, this is passed directly to the PHP function, header()
  * @param	string		If set, error messages will also mention this as the reason for the page-not-found.
  * @return	void		(The function exits!)
  */
 function pageErrorHandler($code, $header = '', $reason = '')
 {
     // Issue header in any case:
     if ($header) {
         $headerArr = preg_split('/\\r|\\n/', $header, -1, PREG_SPLIT_NO_EMPTY);
         foreach ($headerArr as $header) {
             header($header);
         }
     }
     // Create response:
     if (gettype($code) == 'boolean' || !strcmp($code, 1)) {
         // Simply boolean; Just shows TYPO3 error page with reason:
         $this->printError('The page did not exist or was inaccessible.' . ($reason ? ' Reason: ' . htmlspecialchars($reason) : ''));
     } elseif (t3lib_div::isFirstPartOfStr($code, 'USER_FUNCTION:')) {
         $funcRef = trim(substr($code, 14));
         $params = array('currentUrl' => t3lib_div::getIndpEnv('REQUEST_URI'), 'reasonText' => $reason, 'pageAccessFailureReasons' => $this->getPageAccessFailureReasons());
         echo t3lib_div::callUserFunction($funcRef, $params, $this);
     } elseif (t3lib_div::isFirstPartOfStr($code, 'READFILE:')) {
         $readFile = t3lib_div::getFileAbsFileName(trim(substr($code, 9)));
         if (@is_file($readFile)) {
             $fileContent = t3lib_div::getUrl($readFile);
             $fileContent = str_replace('###CURRENT_URL###', t3lib_div::getIndpEnv('REQUEST_URI'), $fileContent);
             $fileContent = str_replace('###REASON###', htmlspecialchars($reason), $fileContent);
             echo $fileContent;
         } else {
             $this->printError('Configuration Error: 404 page "' . $readFile . '" could not be found.');
         }
     } elseif (t3lib_div::isFirstPartOfStr($code, 'REDIRECT:')) {
         t3lib_utility_Http::redirect(substr($code, 9));
     } elseif (strlen($code)) {
         // Check if URL is relative
         $url_parts = parse_url($code);
         if ($url_parts['host'] == '') {
             $url_parts['host'] = t3lib_div::getIndpEnv('HTTP_HOST');
             $code = t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST') . $code;
             $checkBaseTag = false;
         } else {
             $checkBaseTag = true;
         }
         // Check recursion
         if ($code == t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')) {
             if ($reason == '') {
                 $reason = 'Page cannot be found.';
             }
             $reason .= LF . LF . 'Additionally, ' . $code . ' was not found while trying to retrieve the error document.';
             $this->printError('Reason: ' . nl2br(htmlspecialchars($reason)));
             exit;
         }
         // Prepare headers
         $headerArr = array('User-agent: ' . t3lib_div::getIndpEnv('HTTP_USER_AGENT'), 'Referer: ' . t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'));
         $res = t3lib_div::getURL($code, 1, $headerArr);
         // Header and content are separated by an empty line
         list($header, $content) = explode(CRLF . CRLF, $res, 2);
         $content .= CRLF;
         if (false === $res) {
             // Last chance -- redirect
             t3lib_utility_Http::redirect($code);
         } else {
             $forwardHeaders = array('Content-Type:');
             $headerArr = preg_split('/\\r|\\n/', $header, -1, PREG_SPLIT_NO_EMPTY);
             foreach ($headerArr as $header) {
                 foreach ($forwardHeaders as $h) {
                     if (preg_match('/^' . $h . '/', $header)) {
                         header($header);
                     }
                 }
             }
             // Put <base> if necesary
             if ($checkBaseTag) {
                 // If content already has <base> tag, we do not need to do anything
                 if (false === stristr($content, '<base ')) {
                     // Generate href for base tag
                     $base = $url_parts['scheme'] . '://';
                     if ($url_parts['user'] != '') {
                         $base .= $url_parts['user'];
                         if ($url_parts['pass'] != '') {
                             $base .= ':' . $url_parts['pass'];
                         }
                         $base .= '@';
                     }
                     $base .= $url_parts['host'];
                     // Add path portion skipping possible file name
                     $base .= preg_replace('/(.*\\/)[^\\/]*/', '${1}', $url_parts['path']);
                     // Put it into content (generate also <head> if necessary)
                     $replacement = LF . '<base href="' . htmlentities($base) . '" />' . LF;
                     if (stristr($content, '<head>')) {
                         $content = preg_replace('/(<head>)/i', '\\1' . $replacement, $content);
                     } else {
                         $content = preg_replace('/(<html[^>]*>)/i', '\\1<head>' . $replacement . '</head>', $content);
                     }
                 }
//.........这里部分代码省略.........
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:101,代码来源:class.tslib_fe.php

示例13: getZIPFileContents

 /**
  * Returns the contents of a specific file within the ZIP
  *
  * @return	string	contents
  */
 function getZIPFileContents($ZIPfile, $filename)
 {
     if (file_exists($ZIPfile)) {
         // Unzipping SXW file, getting filelist:
         $tempPath = PATH_site . 'typo3temp/tx_tsconfighelp_ziptemp/';
         t3lib_div::mkdir($tempPath);
         $this->unzip($ZIPfile, $tempPath);
         $output = t3lib_div::getURL($tempPath . $filename);
         $cmd = 'rm -r "' . $tempPath . '"';
         t3lib_utility_Command::exec($cmd);
         return $output;
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:18,代码来源:index.php

示例14: getBeLayout

 /**
  * @param void
  * @return mixed
  */
 public function getBeLayout()
 {
     $beLayout = FALSE;
     if ($this->row['belayout']) {
         $beLayout = t3lib_div::getURL(t3lib_div::getFileAbsFileName($this->row['belayout']));
     } else {
         $beLayout = $this->getDatastructure()->getBeLayout();
     }
     return $beLayout;
 }
开发者ID:rod86,项目名称:t3sandbox,代码行数:14,代码来源:class.tx_templavoila_template.php

示例15: main


//.........这里部分代码省略.........
                $theVar = $GLOBALS['TBE_MODULES'];
                t3lib_div::naturalKeySortRecursive($theVar);
                $arrayBrowser->varName = '$TBE_MODULES';
                break;
            case 6:
                $theVar = $GLOBALS['TBE_MODULES_EXT'];
                t3lib_div::naturalKeySortRecursive($theVar);
                $arrayBrowser->varName = '$TBE_MODULES_EXT';
                break;
            case 7:
                $theVar = $GLOBALS['TBE_STYLES'];
                t3lib_div::naturalKeySortRecursive($theVar);
                $arrayBrowser->varName = '$TBE_STYLES';
                break;
            case 8:
                $theVar = $GLOBALS['BE_USER']->uc;
                t3lib_div::naturalKeySortRecursive($theVar);
                $arrayBrowser->varName = '$BE_USER->uc';
                break;
            case 9:
                $theVar = $GLOBALS['TYPO3_USER_SETTINGS'];
                t3lib_div::naturalKeySortRecursive($theVar);
                $arrayBrowser->varName = '$TYPO3_USER_SETTINGS';
                break;
            default:
                $theVar = array();
                break;
        }
        // Update node:
        $update = 0;
        $node = t3lib_div::_GET('node');
        if (is_array($node)) {
            // If any plus-signs were clicked, it's registred.
            $this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']] = $arrayBrowser->depthKeys($node, $this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']]);
            $update = 1;
        }
        if ($update) {
            $GLOBALS['BE_USER']->pushModuleData($this->MCONF['name'], $this->MOD_SETTINGS);
        }
        $arrayBrowser->depthKeys = $this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']];
        $arrayBrowser->regexMode = $this->MOD_SETTINGS['regexsearch'];
        $arrayBrowser->fixedLgd = $this->MOD_SETTINGS['fixedLgd'];
        $arrayBrowser->searchKeysToo = TRUE;
        $search_field = t3lib_div::_GP('search_field');
        if (t3lib_div::_POST('search') && trim($search_field)) {
            // If any POST-vars are send, update the condition array
            $arrayBrowser->depthKeys = $arrayBrowser->getSearchKeys($theVar, '', $search_field, array());
        }
        $tree = $arrayBrowser->tree($theVar, '', '');
        $label = $this->MOD_MENU['function'][$this->MOD_SETTINGS['function']];
        $this->content .= $this->doc->sectionEnd();
        // Variable name:
        if (t3lib_div::_GP('varname')) {
            $line = t3lib_div::_GP('_') ? t3lib_div::_GP('_') : t3lib_div::_GP('varname');
            if (t3lib_div::_GP('writetoexttables')) {
                // Write the line to extTables.php
                // change value to $GLOBALS
                $length = strpos($line, '[');
                $var = substr($line, 0, $length);
                $changedLine = '$GLOBALS[\'' . substr($line, 1, $length - 1) . '\']' . substr($line, $length);
                // insert line  in extTables.php
                $extTables = t3lib_div::getURL(PATH_typo3conf . TYPO3_extTableDef_script);
                $extTables = '<?php' . preg_replace('/<\\?php|\\?>/is', '', $extTables) . $changedLine . LF . '?>';
                $success = t3lib_div::writeFile(PATH_typo3conf . TYPO3_extTableDef_script, $extTables);
                if ($success) {
                    // show flash message
                    $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', '', sprintf($GLOBALS['LANG']->getLL('writeMessage', TRUE), TYPO3_extTableDef_script, '<br />', '<strong>' . $changedLine . '</strong>'), t3lib_FlashMessage::OK);
                } else {
                    // Error: show flash message
                    $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', '', sprintf($GLOBALS['LANG']->getLL('writeMessageFailed', TRUE), TYPO3_extTableDef_script), t3lib_FlashMessage::ERROR);
                }
                $this->content .= $flashMessage->render();
            }
            $this->content .= '<div id="lowlevel-config-var">
				<strong>' . $GLOBALS['LANG']->getLL('variable', TRUE) . '</strong><br />
				<input type="text" name="_" value="' . trim(htmlspecialchars($line)) . '" size="120" /><br/>';
            if (TYPO3_extTableDef_script !== '' && ($this->MOD_SETTINGS['function'] === '1' || $this->MOD_SETTINGS['function'] === '4')) {
                // write only for $TCA and TBE_STYLES if  TYPO3_extTableDef_script is defined
                $this->content .= '<br /><input type="submit" name="writetoexttables" value="' . $GLOBALS['LANG']->getLL('writeValue', TRUE) . '" /></div>';
            } else {
                $this->content .= $GLOBALS['LANG']->getLL('copyPaste', TRUE) . LF . '</div>';
            }
        }
        $this->content .= '<br /><table border="0" cellpadding="0" cellspacing="0" class="t3-tree t3-tree-config">';
        $this->content .= '<tr>
					<th class="t3-row-header t3-tree-config-header">' . $label . '</th>
				</tr>
				<tr>
					<td>' . $tree . '</td>
				</tr>
			</table>
		';
        // Setting up the buttons and markers for docheader
        $docHeaderButtons = $this->getButtons();
        $markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => $this->getFuncMenu(), 'CONTENT' => $this->content);
        // Build the <body> for the module
        $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
        // Renders the module page
        $this->content = $this->doc->render('Configuration', $this->content);
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:index.php


注:本文中的t3lib_div::getURL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。