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
00055 $BACK_PATH = '';
00056 require('init.php');
00057 require('template.php');
00058 require_once('class.webpagetree.php');
00059
00060
00068 class SC_alt_db_navframe {
00069
00070
00071 var $content;
00072 var $pagetree;
00073
00079 var $doc;
00080 var $active_tempMountPoint = 0;
00081 var $backPath;
00082
00083
00084 var $ajax;
00085 var $currentSubScript;
00086 var $cMR;
00087 var $setTempDBmount;
00088
00094 function init() {
00095 global $BE_USER,$BACK_PATH;
00096
00097
00098 $this->backPath = $BACK_PATH;
00099
00100
00101 $this->ajax = t3lib_div::_GP('ajax');
00102 $this->cMR = t3lib_div::_GP('cMR');
00103 $this->currentSubScript = t3lib_div::_GP('currentSubScript');
00104 $this->setTempDBmount = t3lib_div::_GP('setTempDBmount');
00105
00106
00107 $this->pagetree = t3lib_div::makeInstance('webPageTree');
00108 $this->pagetree->ext_IconMode = $BE_USER->getTSConfigVal('options.pageTree.disableIconLinkToContextmenu');
00109 $this->pagetree->ext_showPageId = $BE_USER->getTSConfigVal('options.pageTree.showPageIdWithTitle');
00110 $this->pagetree->ext_dontSeparateNotinmenuPages = $BE_USER->getTSConfigVal('options.pageTree.dontSeparateNotinmenuPages');
00111 $this->pagetree->ext_dontAlphasortNotinmenuPages = $BE_USER->getTSConfigVal('options.pageTree.dontAlphasortNotinmenuPages');
00112 $this->pagetree->thisScript = 'alt_db_navframe.php';
00113 $this->pagetree->addField('alias');
00114 $this->pagetree->addField('shortcut');
00115 $this->pagetree->addField('shortcut_mode');
00116 $this->pagetree->addField('mount_pid');
00117 $this->pagetree->addField('mount_pid_ol');
00118 $this->pagetree->addField('nav_hide');
00119 $this->pagetree->addField('url');
00120
00121
00122 $this->initializeTemporaryDBmount();
00123
00124
00125 if (!$this->ajax) {
00126
00127 $this->doHighlight = !$BE_USER->getTSConfigVal('options.pageTree.disableTitleHighlight');
00128
00129
00130 if ($this->doHighlight) {
00131 if ($BE_USER->workspace === 0) $hlClass = 'active';
00132 else $hlClass = 'active active-ws wsver'.$BE_USER->workspace;
00133 }
00134
00135
00136 $this->doc = t3lib_div::makeInstance('template');
00137 $this->doc->backPath = $BACK_PATH;
00138 $this->doc->docType = 'xhtml_trans';
00139
00140
00141 $this->doc->JScode = '
00142 <script type="text/javascript" src="'.$this->backPath.'contrib/prototype/prototype.js"></script>
00143 <script type="text/javascript" src="'.$this->backPath.'tree.js"></script>'."\n";
00144
00145 $this->doc->JScode .= $this->doc->wrapScriptTags(
00146 ($this->currentSubScript?'top.currentSubScript=unescape("'.rawurlencode($this->currentSubScript).'");':'').'
00147
00148 Tree.thisScript = "'.$this->pagetree->thisScript.'";
00149 '.($this->doHighlight ? 'Tree.highlightClass = "'.$hlClass.'";' : '').'
00150
00151 DragDrop.changeURL = "'.$this->backPath.'alt_clickmenu.php";
00152 DragDrop.backPath = "'.t3lib_div::shortMD5(''.'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']).'";
00153 DragDrop.table = "pages";
00154
00155
00156 function jumpTo(id, linkObj, highlightID, bank) {
00157 var theUrl = top.TS.PATH_typo3 + top.currentSubScript + "?id=" + id;
00158 top.fsMod.currentBank = bank;
00159
00160 if (top.condensedMode) top.content.location.href = theUrl;
00161 else parent.list_frame.location.href=theUrl;
00162
00163 '.($this->doHighlight ? 'Tree.highlightActiveItem("web", highlightID + "_" + bank);' : '').'
00164 '.(!$GLOBALS['CLIENT']['FORMSTYLE'] ? '' : 'if (linkObj) linkObj.blur(); ').'
00165 return false;
00166 }
00167 '.($this->cMR?"jumpTo(top.fsMod.recentIds['web'],'');":'').'
00168 ');
00169
00170
00171 $CMparts=$this->doc->getContextMenuCode();
00172 $this->doc->bodyTagAdditions = $CMparts[1];
00173 $this->doc->bodyTagId = 'bodyTag';
00174 $this->doc->JScode.= $CMparts[0];
00175 $this->doc->postCode.= $CMparts[2];
00176 }
00177 }
00178
00179
00185 function main() {
00186 global $LANG,$CLIENT;
00187
00188
00189 $tree = $this->pagetree->getBrowsableTree();
00190
00191
00192 if ($this->ajax) {
00193 $this->content = $LANG->csConvObj->utf8_encode($tree, $LANG->charSet);
00194 return;
00195 }
00196
00197
00198 $this->content = $this->doc->startPage('TYPO3 Page Tree');
00199
00200
00201 if ($GLOBALS['BE_USER']->workspace!==0 || $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.onlineWorkspaceInfo')) {
00202 switch($GLOBALS['BE_USER']->workspace) {
00203 case 0:
00204 $wsTitle = ' '.$this->doc->icons(2).'['.$LANG->sL('LLL:EXT:lang/locallang_misc.xml:shortcut_onlineWS',1).']';
00205 break;
00206 case -1:
00207 $wsTitle = '['.$LANG->sL('LLL:EXT:lang/locallang_misc.xml:shortcut_offlineWS',1).']';
00208 break;
00209 default:
00210 $wsTitle = '['.$GLOBALS['BE_USER']->workspace.'] '.htmlspecialchars($GLOBALS['BE_USER']->workspaceRec['title']);
00211 break;
00212 }
00213
00214 $this->content.= '
00215 <div class="bgColor4 workspace-info">'.
00216 '<a href="'.htmlspecialchars('mod/user/ws/index.php').'" target="content">'.
00217 '<img'.t3lib_iconWorks::skinImg('','gfx/i/sys_workspace.png','width="18" height="16"').' align="top" alt="" />'.
00218 '</a>'.$wsTitle.'
00219 </div>
00220 ';
00221 }
00222
00223 if (!$GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.hideFilter')) {
00224 $this->content.= '
00225 <div class="bgColor4">
00226 Filter: <input type="text" value="" name="_livesearch" id="_livesearch" onkeyup="filter(this.value);"/>
00227 </div><br>
00228 ';
00229 }
00230
00231
00232 if ($this->active_tempMountPoint) {
00233 $this->content.= '
00234 <div class="bgColor4 c-notice">
00235 <img'.t3lib_iconWorks::skinImg('','gfx/icon_note.gif','width="18" height="16"').' align="top" alt="" />'.
00236 '<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' => 0))).'">'.
00237 $LANG->sl('LLL:EXT:lang/locallang_core.php:labels.temporaryDBmount',1).
00238 '</a><br/>
00239 '.$LANG->sl('LLL:EXT:lang/locallang_core.php:labels.path',1).': <span title="'.htmlspecialchars($this->active_tempMountPoint['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->active_tempMountPoint['_thePath'],-50)).'</span>
00240 </div>
00241 ';
00242 }
00243
00244
00245 $this->content.= $tree;
00246
00247
00248 $this->content.= '
00249 <p class="c-refresh">
00250 <a href="'.htmlspecialchars(t3lib_div::getIndpEnv('REQUEST_URI')).'">'.
00251 '<img'.t3lib_iconWorks::skinImg('','gfx/refresh_n.gif','width="14" height="14"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.refresh',1).'" alt="" />'.
00252 $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.refresh',1).'</a>
00253 </p>
00254 <br />';
00255
00256
00257 $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'pagetree', $GLOBALS['BACK_PATH']);
00258
00259
00260 $this->content .=$this->doc->wrapScriptTags('
00261 '.($this->doHighlight ? 'Tree.highlightActiveItem("",top.fsMod.navFrameHighlightedID["web"]);' : '').'
00262 '.(!$this->doc->isCMlayers() ? 'Tree.activateDragDrop = false;' : 'Tree.registerDragDropHandlers();')
00263 );
00264 }
00265
00271 function printContent() {
00272
00273 if ($this->ajax) {
00274 header('X-JSON: ('.($this->pagetree->ajaxStatus?'true':'false').')');
00275 header('Content-type: text/html; charset=utf-8');
00276
00277 } else {
00278 $this->content.= $this->doc->endPage();
00279 $this->content = $this->doc->insertStylesAndJS($this->content);
00280 }
00281 echo $this->content;
00282 }
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00299 function initializeTemporaryDBmount(){
00300 global $BE_USER;
00301
00302
00303 if (strlen($this->setTempDBmount)) {
00304 $set = t3lib_div::intInRange($this->setTempDBmount,0);
00305 if ($set>0 && $BE_USER->isInWebMount($set)) {
00306 $this->settingTemporaryMountPoint($set);
00307 } else {
00308 $this->settingTemporaryMountPoint(0);
00309 }
00310 }
00311
00312
00313 $temporaryMountPoint = intval($BE_USER->getSessionData('pageTree_temporaryMountPoint'));
00314
00315
00316 if ($temporaryMountPoint > 0 && $BE_USER->isInWebMount($temporaryMountPoint)) {
00317 if ($this->active_tempMountPoint = t3lib_BEfunc::readPageAccess($temporaryMountPoint, $BE_USER->getPagePermsClause(1))) {
00318 $this->pagetree->MOUNTS = array($temporaryMountPoint);
00319 }
00320 else {
00321
00322 $this->settingTemporaryMountPoint(0);
00323 }
00324 }
00325 }
00326
00327
00334 function settingTemporaryMountPoint($pageId) {
00335 global $BE_USER;
00336
00337
00338 $BE_USER->setAndSaveSessionData('pageTree_temporaryMountPoint',intval($pageId));
00339 }
00340 }
00341
00342
00343
00344 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_db_navframe.php']) {
00345 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_db_navframe.php']);
00346 }
00347
00348
00349
00350
00351
00352
00353 $SOBE = t3lib_div::makeInstance('SC_alt_db_navframe');
00354 $SOBE->init();
00355 $SOBE->main();
00356 $SOBE->printContent();
00357
00358 ?>
This documentation has been generated automatically from TYPO3 source code using
Doxygen and is provided as is by
Cast Iron Coding
as a courtesy to other TYPO3 developers and users. Please consider
Cast Iron Coding — a full-service web development
agency in Portland, Oregon specializing in TYPO3 extension development — for all of your TYPO3 development and consulting needs!