Documentation TYPO3 par Ameos

browser.php

00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
00006 *  All rights reserved
00007 *
00008 *  This script is part of the TYPO3 project. The TYPO3 project is
00009 *  free software; you can redistribute it and/or modify
00010 *  it under the terms of the GNU General Public License as published by
00011 *  the Free Software Foundation; either version 2 of the License, or
00012 *  (at your option) any later version.
00013 *
00014 *  The GNU General Public License can be found at
00015 *  http://www.gnu.org/copyleft/gpl.html.
00016 *  A copy is found in the textfile GPL.txt and important notices to the license
00017 *  from the author is found in LICENSE.txt distributed with these scripts.
00018 *
00019 *
00020 *  This script is distributed in the hope that it will be useful,
00021 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 *  GNU General Public License for more details.
00024 *
00025 *  This copyright notice MUST APPEAR in all copies of the script!
00026 ***************************************************************/
00049 require ('init.php');
00050 require ('template.php');
00051 
00052 
00053 
00054 
00055 
00056 
00057 
00058 
00066 class SC_browser {
00067 
00068                 // Internal, dynamic
00069         var $content;
00070 
00077         function main() {
00078 
00079                         // Setting GPvars:
00080                 $mode =t3lib_div::_GP('mode');
00081                 $bparams = t3lib_div::_GP('bparams');
00082 
00083 
00084                         // Set doktype:
00085                 $GLOBALS['TBE_TEMPLATE']->docType='xhtml_frames';
00086                 $GLOBALS['TBE_TEMPLATE']->JScode=$GLOBALS['TBE_TEMPLATE']->wrapScriptTags('
00087                                 function closing()      {       //
00088                                         close();
00089                                 }
00090                                 function setParams(mode,params) {       //
00091                                         parent.content.location.href = "browse_links.php?mode="+mode+"&bparams="+params;
00092                                 }
00093                                 if (!window.opener)     {
00094                                         alert("ERROR: Sorry, no link to main window... Closing");
00095                                         close();
00096                                 }
00097                 ');
00098 
00099                 $this->content.=$GLOBALS['TBE_TEMPLATE']->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:TYPO3_Element_Browser'));
00100 
00101                         // URL for the inner main frame:
00102                 $url = $GLOBALS['BACK_PATH'].'browse_links.php?mode='.rawurlencode($mode).'&bparams='.rawurlencode($bparams);
00103 
00104                         // Create the frameset for the window:
00105                         // Formerly there were a ' onunload="closing();"' in the <frameset> tag - but it failed on Safari browser on Mac unless the handler was "onUnload"
00106                 $this->content.='
00107                         <frameset rows="*,1" framespacing="0" frameborder="0" border="0">
00108                                 <frame name="content" src="'.htmlspecialchars($url).'" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" noresize="noresize" />
00109                                 <frame name="menu" src="'.$GLOBALS['BACK_PATH'].'dummy.php" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" noresize="noresize" />
00110                         </frameset>
00111                 ';
00112 
00113                 $this->content.='
00114 </html>';
00115         }
00116 
00122         function printContent() {
00123                 echo $this->content;
00124         }
00125 }
00126 
00127 // Include extension?
00128 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/browser.php'])       {
00129         include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/browser.php']);
00130 }
00131 
00132 
00133 
00134 
00135 
00136 
00137 
00138 
00139 
00140 
00141 // Make instance:
00142 $SOBE = t3lib_div::makeInstance('SC_browser');
00143 $SOBE->main();
00144 $SOBE->printContent();
00145 ?>


Généré par Les experts TYPO3 avec  doxygen 1.4.6