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 ***************************************************************/
30 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
33 * [CLASS/FUNCTION INDEX of SCRIPT]
39 require ('template.php');
41 require_once(PATH_t3lib
.'class.t3lib_topmenubase.php');
46 * Script Class for rendering logo menu
48 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
52 class SC_logomenu
extends t3lib_topmenubase
{
54 var $id = '_logomenu';
62 switch((string)t3lib_div
::_GET('cmd')) {
65 <img src="gfx/x_t3logo.png" width="61" height="16" hspace="3" alt="" />';
69 'title' => 'About TYPO3',
70 'xurl' => 'http://typo3.com/',
74 'xurl' => 'http://typo3.com/License.1625.0.html',
80 'title' => 'Mailing lists',
81 'xurl' => 'http://lists.netfielders.de/cgi-bin/mailman/listinfo',
84 'title' => 'Documentation',
85 'xurl' => 'http://typo3.org/documentation/',
88 'title' => 'Find consultancy',
89 'xurl' => 'http://typo3.com/Consultancies.1248.0.html',
94 'title' => 'Contribute',
95 'xurl' => 'http://typo3.org/community/participate/'
99 'xurl' => 'http://typo3.com/Donations.1261.0.html',
105 'title' => 'Extensions',
106 'url' => 'mod/tools/em/index.php'
109 'title' => 'Menu preferences and such things',
110 'onclick' => 'alert("A dialog is now shown which will allow user configuration of items in the menu");event.stopPropagation();',
117 'title' => 'Recent Items',
118 'id' => $this->id
.'_recent',
119 'subitems' => array(),
120 'html' => $this->menuItemObject($this->id
.'_recent','
122 onActivate: function() {
123 // if (!this.fetched) {
124 //Element.update("'.$this->id
.'_recent-layer","asdfasdf");
125 getElementContent("'.$this->id
.'_recent-layer", 0, "logomenu.php?cmd=recent")
135 'title' => 'View frontend',
136 'xurl' => t3lib_div
::getIndpEnv('TYPO3_SITE_URL')
139 'title' => 'Log out',
140 'onclick' => "top.document.location='logout.php';"
144 echo $this->menuLayer($menuItems);
148 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
149 'sys_log.*, MAX(sys_log.tstamp) AS tstamp_MAX',
151 'pages.uid=sys_log.event_pid AND sys_log.userid='.intval($GLOBALS['BE_USER']->user
['uid']).
152 ' AND sys_log.event_pid>0 AND sys_log.type=1 AND sys_log.action=2 AND sys_log.error=0',
160 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
161 $elRow = t3lib_BEfunc
::getRecord($row['tablename'],$row['recuid']);
162 if (is_array($elRow)) {
164 'title' => t3lib_div
::fixed_lgd_cs(t3lib_BEfunc
::getRecordTitle($row['tablename'],$elRow),$GLOBALS['BE_USER']->uc
['titleLen']).' - '.t3lib_BEfunc
::calcAge(time()-$row['tstamp_MAX']),
165 'icon' => array(t3lib_iconworks
::getIcon($row['tablename'],$elRow),'width="18" height="16"'),
166 'onclick' => 'content.'.t3lib_BEfunc
::editOnClick('&edit['.$row['tablename'].']['.$row['recuid'].']=edit','','dummy.php')
171 echo $this->menuItems($items);
177 // Include extension?
178 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['typo3/logomenu.php']) {
179 include_once($TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['typo3/logomenu.php']);
185 $SOBE = t3lib_div
::makeInstance('SC_logomenu');