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
00038 require ('init.php');
00039 require ('template.php');
00040
00041 require_once(PATH_t3lib.'class.t3lib_topmenubase.php');
00042
00043
00044
00052 class SC_logomenu extends t3lib_topmenubase {
00053
00054 var $id = '_logomenu';
00055
00061 function main() {
00062 switch((string)t3lib_div::_GET('cmd')) {
00063 case 'menuitem':
00064 echo '
00065 <img src="gfx/x_t3logo.png" width="61" height="16" hspace="3" alt="" />';
00066
00067 $menuItems = array(
00068 array(
00069 'title' => 'About TYPO3',
00070 'xurl' => 'http:
00071 'subitems' => array(
00072 array(
00073 'title' => 'License',
00074 'xurl' => 'http:
00075 ),
00076 array(
00077 'title' => 'Support',
00078 'subitems' => array(
00079 array(
00080 'title' => 'Mailing lists',
00081 'xurl' => 'http:
00082 ),
00083 array(
00084 'title' => 'Documentation',
00085 'xurl' => 'http:
00086 ),
00087 array(
00088 'title' => 'Find consultancy',
00089 'xurl' => 'http:
00090 ),
00091 )
00092 ),
00093 array(
00094 'title' => 'Contribute',
00095 'xurl' => 'http:
00096 ),
00097 array(
00098 'title' => 'Donate',
00099 'xurl' => 'http:
00100 'icon' => '1'
00101 )
00102 )
00103 ),
00104 array(
00105 'title' => 'Extensions',
00106 'url' => 'mod/tools/em/index.php'
00107 ),
00108 array(
00109 'title' => 'Menu preferences and such things',
00110 'onclick' => 'alert("A dialog is now shown which will allow user configuration of items in the menu");event.stopPropagation();',
00111 'state' => 'checked'
00112 ),
00113 array(
00114 'title' => '--div--'
00115 ),
00116 array(
00117 'title' => 'Recent Items',
00118 'id' => $this->id.'_recent',
00119 'subitems' => array(),
00120 'html' => $this->menuItemObject($this->id.'_recent','
00121 fetched: false,
00122 onActivate: function() {
00123
00124
00125 getElementContent("'.$this->id.'_recent-layer", 0, "logomenu.php?cmd=recent")
00126 this.fetched = true;
00127
00128 }
00129 ')
00130 ),
00131 array(
00132 'title' => '--div--'
00133 ),
00134 array(
00135 'title' => 'View frontend',
00136 'xurl' => t3lib_div::getIndpEnv('TYPO3_SITE_URL')
00137 ),
00138 array(
00139 'title' => 'Log out',
00140 'onclick' => "top.document.location='logout.php';"
00141 ),
00142 );
00143
00144 echo $this->menuLayer($menuItems);
00145 break;
00146 case 'recent':
00147
00148 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
00149 'sys_log.*, MAX(sys_log.tstamp) AS tstamp_MAX',
00150 'sys_log,pages',
00151 'pages.uid=sys_log.event_pid AND sys_log.userid='.intval($GLOBALS['BE_USER']->user['uid']).
00152 ' AND sys_log.event_pid>0 AND sys_log.type=1 AND sys_log.action=2 AND sys_log.error=0',
00153 'tablename,recuid',
00154 'tstamp_MAX DESC',
00155 20
00156 );
00157
00158 $items = array();
00159
00160 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
00161 $elRow = t3lib_BEfunc::getRecord($row['tablename'],$row['recuid']);
00162 if (is_array($elRow)) {
00163 $items[] = array(
00164 'title' => t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($row['tablename'],$elRow),$GLOBALS['BE_USER']->uc['titleLen']).' - '.t3lib_BEfunc::calcAge(time()-$row['tstamp_MAX']),
00165 'icon' => array(t3lib_iconworks::getIcon($row['tablename'],$elRow),'width="18" height="16"'),
00166 'onclick' => 'content.'.t3lib_BEfunc::editOnClick('&edit['.$row['tablename'].']['.$row['recuid'].']=edit','','dummy.php')
00167 );
00168 }
00169 }
00170
00171 echo $this->menuItems($items);
00172 break;
00173 }
00174 }
00175 }
00176
00177
00178 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/logomenu.php']) {
00179 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/logomenu.php']);
00180 }
00181
00182
00183
00184
00185 $SOBE = t3lib_div::makeInstance('SC_logomenu');
00186 $SOBE->main();
00187 ?>