TYPO3 CMS  TYPO3_6-2
ElementBrowserFramesetController.php
Go to the documentation of this file.
1 <?php
3 
18 
25 
26  // Internal, dynamic
30  public $content;
31 
38  public function main() {
39  // Setting GPvars:
41  $bparams = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('bparams');
42  $moduleUrl = BackendUtility::getModuleUrl('wizard_element_browser') . '&mode=';
43  // Set doktype:
44  $GLOBALS['TBE_TEMPLATE']->docType = 'xhtml_frames';
45  $GLOBALS['TBE_TEMPLATE']->JScode = $GLOBALS['TBE_TEMPLATE']->wrapScriptTags('
46  function closing() { //
47  close();
48  }
49  function setParams(mode,params) { //
50  parent.content.location.href = ' . GeneralUtility::quoteJSvalue($moduleUrl) . '+mode+"&bparams="+params;
51  }
52  if (!window.opener) {
53  alert("ERROR: Sorry, no link to main window... Closing");
54  close();
55  }
56  ');
57  $this->content .= $GLOBALS['TBE_TEMPLATE']->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:TYPO3_Element_Browser'));
58  // URL for the inner main frame:
59  $url = $GLOBALS['BACK_PATH'] . $moduleUrl . rawurlencode($mode) . '&bparams=' . rawurlencode($bparams);
60  // Create the frameset for the window:
61  // Formerly there were a ' onunload="closing();"' in the <frameset> tag - but it failed on Safari browser on Mac unless the handler was "onUnload"
62  $this->content .= '
63  <frameset rows="*,1" framespacing="0" frameborder="0" border="0">
64  <frame name="content" src="' . htmlspecialchars($url) . '" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" noresize="noresize" />
65  <frame name="menu" src="' . $GLOBALS['BACK_PATH'] . 'dummy.php" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" noresize="noresize" />
66  </frameset>
67  ';
68  $this->content .= '
69 </html>';
70  }
71 
77  public function printContent() {
78  echo $this->content;
79  }
80 
81 }
static getModuleUrl($moduleName, $urlParameters=array(), $backPathOverride=FALSE, $returnAbsoluteUrl=FALSE)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]