*/ require ('init.php'); require ('template.php'); /** * Script Class, putting the frameset together. * * @author Kasper Skårhøj * @package TYPO3 * @subpackage core */ class SC_browser { // Internal, dynamic var $content; /** * Main function. * Creates the header code in XHTML, the JavaScript, then the frameset for the two frames. * * @return void */ function main() { // Setting GPvars: $mode =t3lib_div::_GP('mode'); $bparams = t3lib_div::_GP('bparams'); // Set doktype: $GLOBALS['TBE_TEMPLATE']->docType='xhtml_frames'; $GLOBALS['TBE_TEMPLATE']->JScode=$GLOBALS['TBE_TEMPLATE']->wrapScriptTags(' function closing() { // close(); } function setParams(mode,params) { // parent.content.location.href = "browse_links.php?mode="+mode+"&bparams="+params; } if (!window.opener) { alert("ERROR: Sorry, no link to main window... Closing"); close(); } '); $this->content.=$GLOBALS['TBE_TEMPLATE']->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:TYPO3_Element_Browser')); // URL for the inner main frame: $url = $GLOBALS['BACK_PATH'].'browse_links.php?mode='.rawurlencode($mode).'&bparams='.rawurlencode($bparams); // Create the frameset for the window: // Formerly there were a ' onunload="closing();"' in the tag - but it failed on Safari browser on Mac unless the handler was "onUnload" $this->content.=' '; $this->content.=' '; } /** * Outputs the page content. * * @return void */ function printContent() { echo $this->content; } } if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/browser.php'])) { include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/browser.php']); } // Make instance: $SOBE = t3lib_div::makeInstance('SC_browser'); $SOBE->main(); $SOBE->printContent(); ?>