2 /***************************************************************
5 * (c) 2006 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 ***************************************************************/
32 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
35 * [CLASS/FUNCTION INDEX of SCRIPT]
41 require ('template.php');
43 require_once(PATH_t3lib
.'class.t3lib_topmenubase.php');
48 * Script Class for rendering logo menu
50 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
54 class SC_logomenu
extends t3lib_topmenubase
{
56 var $id = '_logomenu';
64 switch((string)t3lib_div
::_GET('cmd')) {
67 <img src="gfx/x_t3logo.png" width="61" height="16" hspace="3" alt="" />';
71 'title' => 'About TYPO3',
72 'xurl' => 'http://typo3.com/',
76 'xurl' => 'http://typo3.com/License.1625.0.html',
82 'title' => 'Mailing lists',
83 'xurl' => 'http://lists.netfielders.de/cgi-bin/mailman/listinfo',
86 'title' => 'Documentation',
87 'xurl' => 'http://typo3.org/documentation/',
90 'title' => 'Find consultancy',
91 'xurl' => 'http://typo3.com/Consultancies.1248.0.html',
96 'title' => 'Contribute',
97 'xurl' => 'http://typo3.org/community/participate/'
101 'xurl' => 'http://typo3.com/Donations.1261.0.html',
107 'title' => 'Extensions',
108 'url' => 'mod/tools/em/index.php'
111 'title' => 'Menu preferences and such things',
112 'onclick' => 'alert("A dialog is now shown which will allow user configuration of items in the menu");event.stopPropagation();',
119 'title' => 'Recent Items',
120 'id' => $this->id
.'_recent',
121 'subitems' => array(),
122 'html' => $this->menuItemObject($this->id
.'_recent','
124 onActivate: function() {
125 // if (!this.fetched) {
126 //Element.update("'.$this->id
.'_recent-layer","asdfasdf");
127 getElementContent("'.$this->id
.'_recent-layer", 0, "logomenu.php?cmd=recent")
137 'title' => 'View frontend',
138 'xurl' => t3lib_div
::getIndpEnv('TYPO3_SITE_URL')
141 'title' => 'Log out',
142 'onclick' => "top.document.location='logout.php';"
146 echo $this->menuLayer($menuItems);
150 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
151 'sys_log.*, MAX(sys_log.tstamp) AS tstamp_MAX',
153 'pages.uid=sys_log.event_pid AND sys_log.userid='.intval($GLOBALS['BE_USER']->user
['uid']).
154 ' AND sys_log.event_pid>0 AND sys_log.type=1 AND sys_log.action=2 AND sys_log.error=0',
162 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
163 $elRow = t3lib_BEfunc
::getRecord($row['tablename'],$row['recuid']);
164 if (is_array($elRow)) {
166 'title' => t3lib_div
::fixed_lgd_cs(t3lib_BEfunc
::getRecordTitle($row['tablename'],$elRow),$GLOBALS['BE_USER']->uc
['titleLen']).' - '.t3lib_BEfunc
::calcAge(time()-$row['tstamp_MAX']),
167 'icon' => array(t3lib_iconworks
::getIcon($row['tablename'],$elRow),'width="18" height="16"'),
168 'onclick' => 'content.'.t3lib_BEfunc
::editOnClick('&edit['.$row['tablename'].']['.$row['recuid'].']=edit','','dummy.php')
173 echo $this->menuItems($items);
179 // Include extension?
180 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['typo3/logomenu.php']) {
181 include_once($TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['typo3/logomenu.php']);
187 $SOBE = t3lib_div
::makeInstance('SC_logomenu');