2b3e9593062e186919d3aa3b324b6a41e76dd09e
2 /***************************************************************
5 * (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
28 * Displays the vertical menu in the left most frame of TYPO3s backend
31 * Revised for TYPO3 3.6 2/2003 by Kasper Skaarhoj
32 * XHTML-trans compliant
34 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
35 * @co-author Sebastian Kurfürst <sebastian@garbage-group.de>
38 * [CLASS/FUNCTION INDEX of SCRIPT]
42 * 80: class SC_alt_menu
44 * 108: function main()
45 * 190: function printContent()
48 * (This index is automatically created/updated by the extension "extdeveval")
54 require ('template.php');
55 require_once (PATH_t3lib
.'class.t3lib_loadmodules.php');
56 require_once (PATH_t3lib
.'class.t3lib_basicfilefunc.php');
57 require_once ('class.alt_menu_functions.inc');
73 * Script Class for rendering the vertical menu in the left side of the backend frameset
75 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
76 * @co-author Sebastian Kurfürst <sebastian@garbage-group.de>
82 // Internal, Static: GPvar
83 var $_clearCacheFiles;
87 * Loads the backend modules available for the logged in user.
95 $this->_clearCacheFiles
= t3lib_div
::_GP('_clearCacheFiles');
97 // Loads the backend modules available for the logged in user.
98 $this->loadModules
= t3lib_div
::makeInstance('t3lib_loadModules');
99 $this->loadModules
->observeWorkspaces
= TRUE;
100 $this->loadModules
->load($TBE_MODULES);
104 * Main content generated
109 global $BE_USER,$TYPO3_CONF_VARS,$TBE_TEMPLATE;
111 $TBE_TEMPLATE->docType
='xhtml_trans';
112 $TBE_TEMPLATE->divClass
='vertical-menu';
113 $TBE_TEMPLATE->bodyTagAdditions
= 'onload="top.restoreHighlightedModuleMenuItem()"';
114 $this->content
.=$TBE_TEMPLATE->startPage('Vertical Backend Menu');
115 $backPath = $GLOBALS['BACK_PATH'];
118 $alt_menuObj = t3lib_div
::makeInstance('alt_menu_functions');
119 $this->content
.= $alt_menuObj->topMenu($this->loadModules
->modules
);
121 // clear cache commands for Admins
122 if($BE_USER->isAdmin()) { // && $BE_USER->workspace===0 NOT used anyway because under a workspace developers might still like to clear cache!
123 $functionsArray = $alt_menuObj->adminFunctions($backPath);
128 Menu with admin functions: Clearing cache:
130 <div id="typo3-alt-menu-php-adminFunc">';
133 // Table with those admin functions
135 <table border="0" cellpadding="0" cellspacing="1" width="100%" id="typo3-adminmenu">';
137 // Header: Admin functions
139 <tr class="c-mainitem">
140 <td colspan="2"><span class="c-label"><b>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.adminFunctions',1).'</b> </span><span class="c-iconCollapse"></span></td>
144 foreach($functionsArray as $functionsArraySetup) {
146 <tr class="c-subitem">
147 <td valign="top" align="center" class="icon">'.$functionsArraySetup['icon'].'</td>
148 <td><a href="'.htmlspecialchars($functionsArraySetup['href']).'">'.htmlspecialchars($functionsArraySetup['title']).'</a></td>
152 // Imploding around the divider table row:
153 $this->content
.=implode('
155 <td colspan="2"><img'.t3lib_iconWorks
::skinImg($backPath,'gfx/altmenuline.gif','width="105" height="3"').' alt="" /></td>
160 $this->content
.=t3lib_BEfunc
::cshItem('xMOD_csh_corebe', 'menu_adminFunction', $GLOBALS['BACK_PATH']);
167 if($BE_USER->user
['ses_backuserid']) {
168 $username = '<p id="username" class="typo3-red-background">[SU: '.htmlspecialchars($BE_USER->user
['username']).']</p>';
170 $username = '<p id="username">['.htmlspecialchars($BE_USER->user
['username']).']</p>';
172 // Printing bottons (logout button)
177 Logout button / username
179 <div id="typo3-alt-menu-php-logininfo">'.$alt_menuObj->topButtons().$username.'
183 $this->content
.=$TBE_TEMPLATE->endPage();
187 * Outputting the accumulated content to screen
191 function printContent() {
196 // Include extension?
197 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['typo3/alt_menu.php']) {
198 include_once($TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['typo3/alt_menu.php']);
213 $SOBE = t3lib_div
::makeInstance('SC_alt_menu');
216 $SOBE->printContent();