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
00053 require ('init.php');
00054 require ('template.php');
00055 require_once (PATH_t3lib.'class.t3lib_loadmodules.php');
00056 require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
00057 require_once ('class.alt_menu_functions.inc');
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00080 class SC_alt_menu {
00081
00082
00083 var $_clearCacheFiles;
00084
00091 function init() {
00092 global $TBE_MODULES;
00093
00094
00095 $this->_clearCacheFiles = t3lib_div::_GP('_clearCacheFiles');
00096
00097
00098 $this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
00099 $this->loadModules->observeWorkspaces = TRUE;
00100 $this->loadModules->load($TBE_MODULES);
00101 }
00102
00108 function main() {
00109 global $BE_USER,$TYPO3_CONF_VARS,$TBE_TEMPLATE;
00110
00111 $TBE_TEMPLATE->docType='xhtml_trans';
00112 $TBE_TEMPLATE->divClass='vertical-menu';
00113 $TBE_TEMPLATE->bodyTagAdditions = 'onload="top.restoreHighlightedModuleMenuItem()"';
00114 $this->content.=$TBE_TEMPLATE->startPage('Vertical Backend Menu');
00115 $backPath = $GLOBALS['BACK_PATH'];
00116
00117
00118 $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
00119 $this->content.= $alt_menuObj->topMenu($this->loadModules->modules);
00120
00121
00122 if($BE_USER->isAdmin()) {
00123 $functionsArray = $alt_menuObj->adminFunctions($backPath);
00124
00125 $this->content.='
00126
00127 <!--
00128 Menu with admin functions: Clearing cache:
00129 -->
00130 <div id="typo3-alt-menu-php-adminFunc">';
00131
00132
00133
00134 $this->content.='
00135 <table border="0" cellpadding="0" cellspacing="1" width="100%" id="typo3-adminmenu">';
00136
00137
00138 $this->content.='
00139 <tr class="c-mainitem">
00140 <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>
00141 </tr>';
00142
00143 $rows=array();
00144 foreach($functionsArray as $functionsArraySetup) {
00145 $rows[]='
00146 <tr class="c-subitem">
00147 <td valign="top" align="center" class="icon">'.$functionsArraySetup['icon'].'</td>
00148 <td><a href="'.htmlspecialchars($functionsArraySetup['href']).'">'.htmlspecialchars($functionsArraySetup['title']).'</a></td>
00149 </tr>';
00150 }
00151
00152
00153 $this->content.=implode('
00154 <tr>
00155 <td colspan="2"><img'.t3lib_iconWorks::skinImg($backPath,'gfx/altmenuline.gif','width="105" height="3"').' alt="" /></td>
00156 </tr>',$rows);
00157
00158 $this->content.='
00159 </table>';
00160 $this->content.=t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'menu_adminFunction', $GLOBALS['BACK_PATH']);
00161 $this->content.='
00162 </div>
00163 ';
00164 }
00165
00166
00167 if($BE_USER->user['ses_backuserid']) {
00168 $username = '<p id="username" class="typo3-red-background">[SU: '.htmlspecialchars($BE_USER->user['username']).']</p>';
00169 } else {
00170 $username = '<p id="username">['.htmlspecialchars($BE_USER->user['username']).']</p>';
00171 }
00172
00173 $this->content.='
00174
00175
00176 <!--
00177 Logout button / username
00178 -->
00179 <div id="typo3-alt-menu-php-logininfo">'.$alt_menuObj->topButtons().$username.'
00180 </div>';
00181
00182
00183 $this->content.=$TBE_TEMPLATE->endPage();
00184 }
00185
00191 function printContent() {
00192 echo $this->content;
00193 }
00194 }
00195
00196
00197 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_menu.php']) {
00198 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_menu.php']);
00199 }
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213 $SOBE = t3lib_div::makeInstance('SC_alt_menu');
00214 $SOBE->init();
00215 $SOBE->main();
00216 $SOBE->printContent();
00217 ?>