00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00052 $BACK_PATH='';
00053 require ('init.php');
00054 require ('template.php');
00055 $LANG->includeLLFile('EXT:lang/locallang_browse_links.xml');
00056
00057 require_once (PATH_typo3.'/class.browse_links.php');
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00078 class SC_browse_links {
00079
00080
00091 var $mode;
00092
00101 var $browser;
00102
00103
00109 function init () {
00110
00111
00112 $this->mode = t3lib_div::_GP('mode');
00113 if (!$this->mode) {
00114 $this->mode = 'rte';
00115 }
00116
00117
00118
00119 $this->doc = t3lib_div::makeInstance('template');
00120 $this->doc->docType= 'xhtml_trans';
00121 $this->doc->backPath = $GLOBALS['BACK_PATH'];
00122 }
00123
00124
00130 function main() {
00131 global $BE_USER, $BACK_PATH;
00132
00133 $this->content = '';
00134
00135
00136 $browserRendered = false;
00137 if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'])) {
00138 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'] as $classRef) {
00139 $browserRenderObj = t3lib_div::getUserObj($classRef);
00140 if(is_object($browserRenderObj) && method_exists($browserRenderObj, 'isValid') && method_exists($browserRenderObj, 'render')) {
00141 if ($browserRenderObj->isValid($this->mode, $this)) {
00142 $this->content .= $browserRenderObj->render($this->mode, $this);
00143 $browserRendered = true;
00144 break;
00145 }
00146 }
00147 }
00148 }
00149
00150
00151 if(!$browserRendered) {
00152
00153 $this->browser = t3lib_div::makeInstance('browse_links');
00154 $this->browser->init();
00155
00156 $modData = $BE_USER->getModuleData('browse_links.php','ses');
00157 list($modData, $store) = $this->browser->processSessionData($modData);
00158 $BE_USER->pushModuleData('browse_links.php',$modData);
00159
00160
00161 switch((string)$this->mode) {
00162 case 'rte':
00163 $this->content = $this->browser->main_rte();
00164 break;
00165 case 'db':
00166 $this->content = $this->browser->main_db();
00167 break;
00168 case 'file':
00169 case 'filedrag':
00170 $this->content = $this->browser->main_file();
00171 break;
00172 case 'wizard':
00173 $this->content = $this->browser->main_rte(1);
00174 break;
00175 }
00176 }
00177 }
00178
00184 function printContent() {
00185 echo $this->content;
00186 }
00187
00188
00189 }
00190
00191
00192
00193 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/browse_links.php']) {
00194 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/browse_links.php']);
00195 }
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205 $SOBE = t3lib_div::makeInstance('SC_browse_links');
00206 $SOBE->init();
00207 $SOBE->main();
00208 $SOBE->printContent();
00209 ?>