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
00041 if (!is_object($this)) die ('Error: No parent object present.');
00042
00043
00044
00045
00046
00047 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages_language_overlay', 'pid='.intval($GLOBALS['TSFE']->id).$GLOBALS['TSFE']->sys_page->enableFields('pages_language_overlay'), 'sys_language_uid');
00048
00049 $langArr = array();
00050 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
00051 $langArr[$row['sys_language_uid']] = $row['title'];
00052 }
00053
00054
00055 $pointer = '<img src="'.t3lib_extMgm::siteRelPath('cms').'tslib/media/icons_misc/content_client.gif" width="7" height="10" align="middle" alt="" />';
00056
00057
00058 $flags = array();
00059 $flags[] = ($GLOBALS['TSFE']->sys_language_uid==0?$pointer:'').'<a href="'.htmlspecialchars('index.php?id='.$GLOBALS['TSFE']->id.'&L=0').'" target="_top"><img src="typo3/sysext/cms/tslib/media/uploads/flag_uk.gif" width="21" height="13" hspace="5" border="0" alt="" /></a>';
00060 $flags[] = ($GLOBALS['TSFE']->sys_language_uid==1?$pointer:'').'<a href="'.htmlspecialchars('index.php?id='.$GLOBALS['TSFE']->id.'&L=1').'" target="_top"><img src="typo3/sysext/cms/tslib/media/uploads/flag_dk'.($langArr[1]?'':'_d').'.gif" width="21" height="13" hspace="5" border="0" alt="" /></a>';
00061 $flags[] = ($GLOBALS['TSFE']->sys_language_uid==2?$pointer:'').'<a href="'.htmlspecialchars('index.php?id='.$GLOBALS['TSFE']->id.'&L=2').'" target="_top"><img src="typo3/sysext/cms/tslib/media/uploads/flag_de'.($langArr[2]?'':'_d').'.gif" width="21" height="13" hspace="5" border="0" alt="" /></a>';
00062
00063
00064 $content = '<table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="clear.gif" width="30" height="1" alt="" /></td><td>'.implode('',$flags).'</td></tr></table>';
00065
00066 ?>