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
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125 if (!defined('TYPO3_MODE')) die("Can't include this file directly.");
00126
00127 require_once(PATH_t3lib.'class.t3lib_ajax.php');
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145 function fw($str) {
00146 return $str;
00147 }
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169 class template {
00170
00171
00172 var $backPath = '';
00173 var $form='';
00174 var $JScodeLibArray = array();
00175 var $JScode='';
00176 var $JScodeArray = array();
00177 var $postCode='';
00178 var $docType = '';
00179 var $moduleTemplate = '';
00180
00181
00182 var $scriptID='';
00183 var $bodyTagId='';
00184 var $bodyTagAdditions='';
00185 var $inDocStyles='';
00186 var $inDocStylesArray=array();
00187 var $form_rowsToStylewidth = 9.58;
00188 var $form_largeComp = 1.33;
00189 var $endJS=1;
00190 protected $additionalStyleSheets=array();
00191
00192
00193
00194 var $bgColor = '#F7F3EF';
00195 var $bgColor2 = '#9BA1A8';
00196 var $bgColor3 = '#F6F2E6';
00197 var $bgColor4 = '#D9D5C9';
00198 var $bgColor5 = '#ABBBB4';
00199 var $bgColor6 = '#E7DBA8';
00200 var $hoverColor = '#254D7B';
00201 var $styleSheetFile = 'stylesheet.css';
00202 var $styleSheetFile2 = '';
00203 var $styleSheetFile_post = '';
00204 var $backGroundImage = '';
00205 var $inDocStyles_TBEstyle = '';
00206
00207
00208 var $parseTimeFlag = 0;
00209
00210
00211 var $charset = 'iso-8859-1';
00212
00213 var $sectionFlag=0;
00214 var $divClass = '';
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227 function template() {
00228 global $TBE_STYLES;
00229
00230
00231 if (($temp_M = (string) t3lib_div::_GET('M')) && $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M]) {
00232 $this->scriptID = ereg_replace('^.*\/(sysext|ext)\/', 'ext/', $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M] . 'index.php');
00233 } else {
00234 $this->scriptID = ereg_replace('^.*\/(sysext|ext)\/', 'ext/', substr(PATH_thisScript, strlen(PATH_site)));
00235 }
00236 if (TYPO3_mainDir!='typo3/' && substr($this->scriptID,0,strlen(TYPO3_mainDir)) == TYPO3_mainDir) {
00237 $this->scriptID = 'typo3/'.substr($this->scriptID,strlen(TYPO3_mainDir));
00238 }
00239
00240 $this->bodyTagId = ereg_replace('[^[:alnum:]-]','-',$this->scriptID);
00241
00242
00243 if (is_array($TBE_STYLES['scriptIDindex'][$this->scriptID])) {
00244 $ovr = $TBE_STYLES['scriptIDindex'][$this->scriptID];
00245 $TBE_STYLES = t3lib_div::array_merge_recursive_overrule($TBE_STYLES,$ovr);
00246 unset($TBE_STYLES['scriptIDindex'][$this->scriptID]);
00247 }
00248
00249
00250 if ($TBE_STYLES['mainColors']['bgColor']) $this->bgColor=$TBE_STYLES['mainColors']['bgColor'];
00251 if ($TBE_STYLES['mainColors']['bgColor1']) $this->bgColor1=$TBE_STYLES['mainColors']['bgColor1'];
00252 if ($TBE_STYLES['mainColors']['bgColor2']) $this->bgColor2=$TBE_STYLES['mainColors']['bgColor2'];
00253 if ($TBE_STYLES['mainColors']['bgColor3']) $this->bgColor3=$TBE_STYLES['mainColors']['bgColor3'];
00254 if ($TBE_STYLES['mainColors']['bgColor4']) $this->bgColor4=$TBE_STYLES['mainColors']['bgColor4'];
00255 if ($TBE_STYLES['mainColors']['bgColor5']) $this->bgColor5=$TBE_STYLES['mainColors']['bgColor5'];
00256 if ($TBE_STYLES['mainColors']['bgColor6']) $this->bgColor6=$TBE_STYLES['mainColors']['bgColor6'];
00257 if ($TBE_STYLES['mainColors']['hoverColor']) $this->hoverColor=$TBE_STYLES['mainColors']['hoverColor'];
00258
00259
00260 if ($TBE_STYLES['stylesheet']) $this->styleSheetFile = $TBE_STYLES['stylesheet'];
00261 if ($TBE_STYLES['stylesheet2']) $this->styleSheetFile2 = $TBE_STYLES['stylesheet2'];
00262 if ($TBE_STYLES['styleSheetFile_post']) $this->styleSheetFile_post = $TBE_STYLES['styleSheetFile_post'];
00263 if ($TBE_STYLES['inDocStyles_TBEstyle']) $this->inDocStyles_TBEstyle = $TBE_STYLES['inDocStyles_TBEstyle'];
00264
00265
00266 if ($TBE_STYLES['background']) $this->backGroundImage = $TBE_STYLES['background'];
00267 }
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305 function wrapClickMenuOnIcon($str,$table,$uid='',$listFr=1,$addParams='',$enDisItems='', $returnOnClick=FALSE) {
00306 $backPath = rawurlencode($this->backPath).'|'.t3lib_div::shortMD5($this->backPath.'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']);
00307 $onClick = 'showClickmenu("'.$table.'","'.$uid.'","'.$listFr.'","'.str_replace('+','%2B',$enDisItems).'","'.str_replace('&','&',addcslashes($backPath,'"')).'","'.str_replace('&','&',addcslashes($addParams,'"')).'");return false;';
00308 return $returnOnClick ? $onClick : '<a href="#" onclick="'.htmlspecialchars($onClick).'"'.($GLOBALS['TYPO3_CONF_VARS']['BE']['useOnContextMenuHandler'] ? ' oncontextmenu="'.htmlspecialchars($onClick).'"' : '').'>'.$str.'</a>';
00309 }
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322 function viewPageIcon($id,$backPath,$addParams='hspace="3"') {
00323 global $BE_USER;
00324 $str = '';
00325
00326 if ($BE_USER->check('modules','web_list')) {
00327 $href=$backPath.'db_list.php?id='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
00328 $str.= '<a href="'.htmlspecialchars($href).'">'.
00329 '<img'.t3lib_iconWorks::skinImg($backPath,'gfx/list.gif','width="11" height="11"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList',1).'"'.($addParams?' '.trim($addParams):'').' alt="" />'.
00330 '</a>';
00331 }
00332
00333 $str.= '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($id,$backPath,t3lib_BEfunc::BEgetRootLine($id))).'">'.
00334 '<img'.t3lib_iconWorks::skinImg($backPath,'gfx/zoom.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage',1).'"'.($addParams?' '.trim($addParams):"").' hspace="3" alt="" />'.
00335 '</a>';
00336 return $str;
00337 }
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348 function issueCommand($params,$rUrl='') {
00349 $rUrl = $rUrl ? $rUrl : t3lib_div::getIndpEnv('REQUEST_URI');
00350 return $this->backPath.'tce_db.php?'.
00351 $params.
00352 '&redirect='.($rUrl==-1?"'+T3_THIS_LOCATION+'":rawurlencode($rUrl)).
00353 '&vC='.rawurlencode($GLOBALS['BE_USER']->veriCode()).
00354 '&prErr=1&uPT=1';
00355 }
00356
00357
00358
00359
00360
00361
00362
00363 function isCMlayers() {
00364 return !$GLOBALS['BE_USER']->uc['disableCMlayers'] && $GLOBALS['CLIENT']['FORMSTYLE'] && !($GLOBALS['CLIENT']['SYSTEM']=='mac' && $GLOBALS['CLIENT']['BROWSER']=='Opera');
00365 }
00366
00367
00368
00369
00370
00371
00372
00373 function thisBlur() {
00374 return ($GLOBALS['CLIENT']['FORMSTYLE']?'this.blur();':'');
00375 }
00376
00377
00378
00379
00380
00381
00382
00383 function helpStyle() {
00384 return $GLOBALS['CLIENT']['FORMSTYLE'] ? ' style="cursor:help;"':'';
00385 }
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400 function getHeader($table,$row,$path,$noViewPageIcon=0,$tWrap=array('','')) {
00401 global $TCA;
00402 if (is_array($row) && $row['uid']) {
00403 $iconImgTag=t3lib_iconWorks::getIconImage($table,$row,$this->backPath,'title="'.htmlspecialchars($path).'"');
00404 $title= strip_tags($row[$TCA[$table]['ctrl']['label']]);
00405 $viewPage = $noViewPageIcon ? '' : $this->viewPageIcon($row['uid'],$this->backPath,'');
00406 if ($table=='pages') $path.=' - '.t3lib_BEfunc::titleAttribForPages($row,'',0);
00407 } else {
00408 $iconImgTag='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_website.gif',$wHattribs='width="18" height="16"').' title="'.htmlspecialchars($path).'" alt="" />';
00409 $title=$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
00410 }
00411
00412 return '<span class="typo3-moduleHeader">'.$this->wrapClickMenuOnIcon($iconImgTag,$table,$row['uid']).
00413 $viewPage.
00414 $tWrap[0].htmlspecialchars(t3lib_div::fixed_lgd_cs($title,45)).$tWrap[1].'</span>';
00415 }
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426 function getFileheader($title,$path,$iconfile) {
00427 $fileInfo = t3lib_div::split_fileref($title);
00428 $title = htmlspecialchars(t3lib_div::fixed_lgd_cs($fileInfo['path'],-35)).'<b>'.htmlspecialchars($fileInfo['file']).'</b>';
00429 return '<span class="typo3-moduleHeader"><img'.t3lib_iconWorks::skinImg($this->backPath,$iconfile,'width="18" height="16"').' title="'.htmlspecialchars($path).'" alt="" />'.$title.'</span>';
00430 }
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441 function makeShortcutIcon($gvList,$setList,$modName,$motherModName="") {
00442 $backPath=$this->backPath;
00443 $storeUrl=$this->makeShortcutUrl($gvList,$setList);
00444 $pathInfo = parse_url(t3lib_div::getIndpEnv('REQUEST_URI'));
00445
00446
00447 if (ereg('typo3/mod\.php$', $pathInfo['path']) && isset($GLOBALS['TBE_MODULES']['_PATHS'][$modName])) {
00448 $storeUrl = '&M='.$modName.$storeUrl;
00449 }
00450
00451 if (!strcmp($motherModName,'1')) {
00452 $mMN="&motherModName='+top.currentModuleLoaded+'";
00453 } elseif ($motherModName) {
00454 $mMN='&motherModName='.rawurlencode($motherModName);
00455 } else $mMN='';
00456
00457 $onClick = 'top.ShortcutManager.createShortcut('
00458 .$GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.makeShortcut')).', '
00459 .'\''.$backPath.'\', '
00460 .'\''.rawurlencode($modName).'\', '
00461 .'\''.rawurlencode($pathInfo['path']."?".$storeUrl).$mMN.'\''
00462 .');return false;';
00463
00464 $sIcon = '<a href="#" onclick="'.htmlspecialchars($onClick).'"><img'.t3lib_iconWorks::skinImg($backPath,'gfx/shortcut.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.makeShortcut',1).'" alt="" /></a>';
00465 return $sIcon;
00466 }
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478 function makeShortcutUrl($gvList,$setList) {
00479 $GET = t3lib_div::_GET();
00480 $storeArray = array_merge(
00481 t3lib_div::compileSelectedGetVarsFromArray($gvList,$GET),
00482 array('SET'=>t3lib_div::compileSelectedGetVarsFromArray($setList, (array)$GLOBALS['SOBE']->MOD_SETTINGS))
00483 );
00484 $storeUrl = t3lib_div::implodeArrayForUrl('',$storeArray);
00485 return $storeUrl;
00486 }
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499 function formWidth($size=48,$textarea=0,$styleOverride='') {
00500 $wAttrib = $textarea?'cols':'size';
00501 if (!$GLOBALS['CLIENT']['FORMSTYLE']) {
00502 $size = $size;
00503 $retVal = ' '.$wAttrib.'="'.$size.'"';
00504 } else {
00505 $pixels = ceil($size*$this->form_rowsToStylewidth);
00506 $retVal = $styleOverride ? ' style="'.$styleOverride.'"' : ' style="width:'.$pixels.'px;"';
00507 }
00508 return $retVal;
00509 }
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524 function formWidthText($size=48,$styleOverride='',$wrap='') {
00525 $wTags = $this->formWidth($size,1,$styleOverride);
00526
00527 if (strtolower(trim($wrap))!='off' && $GLOBALS['CLIENT']['BROWSER']=='net' && $GLOBALS['CLIENT']['VERSION']>=5) {
00528 $wTags.=' cols="'.$size.'"';
00529 }
00530 return $wTags;
00531 }
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541 function redirectUrls($thisLocation='') {
00542 $thisLocation = $thisLocation?$thisLocation:t3lib_div::linkThisScript(
00543 array(
00544 'CB'=>'',
00545 'SET'=>'',
00546 'cmd' => '',
00547 'popViewId'=>''
00548 ));
00549
00550 $out ="
00551 var T3_RETURN_URL = '".str_replace('%20','',rawurlencode(t3lib_div::_GP('returnUrl')))."';
00552 var T3_THIS_LOCATION = '".str_replace('%20','',rawurlencode($thisLocation))."';
00553 ";
00554 return $out;
00555 }
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565 function formatTime($tstamp,$type) {
00566 $dateStr = '';
00567 switch($type) {
00568 case 1: $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'],$tstamp);
00569 break;
00570 case 10: $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'],$tstamp);
00571 break;
00572 }
00573 return $dateStr;
00574 }
00575
00576
00577
00578
00579
00580
00581
00582 function parseTime() {
00583 if ($this->parseTimeFlag && $GLOBALS['BE_USER']->isAdmin()) {
00584 return '<p>(ParseTime: '.(t3lib_div::milliseconds()-$GLOBALS['PARSETIME_START']).' ms</p>
00585 <p>REQUEST_URI-length: '.strlen(t3lib_div::getIndpEnv('REQUEST_URI')).')</p>';
00586 }
00587 }
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615 function startPage($title) {
00616
00617 if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preStartPageHook'])) {
00618 $preStartPageHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preStartPageHook'];
00619 if (is_array($preStartPageHook)) {
00620 $hookParameters = array(
00621 'title' => &$title,
00622 );
00623 foreach ($preStartPageHook as $hookFunction) {
00624 t3lib_div::callUserFunction($hookFunction, $hookParameters, $this);
00625 }
00626 }
00627 }
00628
00629
00630 $charSet = $this->initCharset();
00631 $generator = $this->generator();
00632
00633
00634 # $this->JScodeArray[]='alert(document.compatMode);';
00635
00636
00637 header ('Content-Type:text/html;charset='.$this->charset);
00638
00639 switch($this->docType) {
00640 case 'html_3':
00641 $headerStart = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">';
00642 break;
00643 case 'xhtml_strict':
00644 $headerStart = '<!DOCTYPE html
00645 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
00646 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
00647 <?xml version="1.0" encoding="'.$this->charset.'"?>
00648 <?xml-stylesheet href="#internalStyle" type="text/css"?>
00649 ';
00650 break;
00651 case 'xhtml_frames':
00652 $headerStart = '<!DOCTYPE html
00653 PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
00654 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
00655 <?xml version="1.0" encoding="'.$this->charset.'"?>
00656 ';
00657 break;
00658
00659 case 'xhtml_trans':
00660 default:
00661 $headerStart = '<!DOCTYPE html
00662 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
00663 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
00664 <?xml version="1.0" encoding="'.$this->charset.'"?>
00665 <?xml-stylesheet href="#internalStyle" type="text/css"?>
00666 ';
00667 }
00668
00669
00670
00671 if (!$GLOBALS['BE_USER']->uc['disableTabInTextarea']) {
00672 $this->loadJavascriptLib('tab.js');
00673 }
00674
00675
00676 $str = $headerStart.'
00677 <html>
00678 <head>
00679 <!-- TYPO3 Script ID: '.htmlspecialchars($this->scriptID).' -->
00680 '.$charSet.'
00681 '.$generator.'
00682 <title>'.htmlspecialchars($title).'</title>
00683 '.$this->docStyle().'
00684 '.implode("\n", $this->JScodeLibArray).'
00685 '.$this->JScode.'
00686 '.$this->wrapScriptTags(implode("\n", $this->JScodeArray)).'
00687 <!--###POSTJSMARKER###-->
00688 </head>
00689 ';
00690 $this->JScodeLibArray=array();
00691 $this->JScode='';
00692 $this->JScodeArray=array();
00693
00694 if ($this->docType=='xhtml_frames') {
00695 return $str;
00696 } else
00697 $str.=$this->docBodyTagBegin().
00698 ($this->divClass?'
00699
00700 <!-- Wrapping DIV-section for whole page BEGIN -->
00701 <div class="'.$this->divClass.'">
00702 ':'').trim($this->form);
00703 return $str;
00704 }
00705
00706
00707
00708
00709
00710
00711
00712 function endPage() {
00713 $str = $this->sectionEnd().
00714 $this->postCode.
00715 $this->endPageJS().
00716 $this->wrapScriptTags(t3lib_BEfunc::getUpdateSignalCode()).
00717 $this->parseTime().
00718 ($this->form?'
00719 </form>':'');
00720
00721 if ($this->docType!='xhtml_frames') {
00722
00723 $str .= ($this->divClass?'
00724
00725 <!-- Wrapping DIV-section for whole page END -->
00726 </div>':'').'
00727 </body> ';
00728
00729 }
00730
00731 $str .= '</html>';
00732
00733
00734 if (TYPO3_DLOG) t3lib_div::devLog('END of BACKEND session', 'template', 0, array('_FLUSH' => true));
00735
00736 return $str;
00737 }
00738
00739
00740
00741
00742
00743
00744
00745
00746 function header($text) {
00747 $str='
00748
00749 <!-- MAIN Header in page top -->
00750 <h2>'.htmlspecialchars($text).'</h2>
00751 ';
00752 return $this->sectionEnd().$str;
00753 }
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766
00767 function section($label,$text,$nostrtoupper=FALSE,$sH=FALSE,$type=0,$allowHTMLinHeader=FALSE) {
00768 $str='';
00769
00770
00771 if ($label) {
00772 if (!$allowHTMLinHeader) $label = htmlspecialchars($label);
00773 $str.=$this->sectionHeader($this->icons($type).$label, $sH, $nostrtoupper ? '' : ' class="uppercase"');
00774 }
00775
00776 $str.='
00777
00778 <!-- Section content -->
00779 '.$text;
00780
00781 return $this->sectionBegin().$str;
00782 }
00783
00784
00785
00786
00787
00788
00789
00790
00791 function divider($dist) {
00792 $dist = intval($dist);
00793 $str='
00794
00795 <!-- DIVIDER -->
00796 <hr style="margin-top: '.$dist.'px; margin-bottom: '.$dist.'px;" />
00797 ';
00798 return $this->sectionEnd().$str;
00799 }
00800
00801
00802
00803
00804
00805
00806
00807 function spacer($dist) {
00808 if ($dist>0) {
00809 return '
00810
00811 <!-- Spacer element -->
00812 <div style="padding-top: '.intval($dist).'px;"></div>
00813 ';
00814 }
00815 }
00816
00817
00818
00819
00820
00821
00822
00823
00824
00825
00826 function sectionHeader($label,$sH=FALSE,$addAttrib='') {
00827 $tag = ($sH?'h3':'h4');
00828 $str='
00829
00830 <!-- Section header -->
00831 <'.$tag.$addAttrib.'>'.$label.'</'.$tag.'>
00832 ';
00833 return $this->sectionBegin().$str;
00834 }
00835
00836
00837
00838
00839
00840
00841
00842
00843 function sectionBegin() {
00844 if (!$this->sectionFlag) {
00845 $this->sectionFlag=1;
00846 $str='
00847
00848 <!-- ***********************
00849 Begin output section.
00850 *********************** -->
00851 <div>
00852 ';
00853 return $str;
00854 } else return '';
00855 }
00856
00857
00858
00859
00860
00861
00862
00863
00864 function sectionEnd() {
00865 if ($this->sectionFlag) {
00866 $this->sectionFlag=0;
00867 return '
00868 </div>
00869 <!-- *********************
00870 End output section.
00871 ********************* -->
00872 ';
00873 } else return '';
00874 }
00875
00876
00877
00878
00879
00880
00881
00882
00883
00884 function middle() {
00885 }
00886
00887
00888
00889
00890
00891
00892
00893 function endPageJS() {
00894 return ($this->endJS?'
00895 <script type="text/javascript">
00896
00897 if (top.busy && top.busy.loginRefreshed) {
00898 top.busy.loginRefreshed();
00899 }
00900
00901 </script>':'');
00902 }
00903
00904
00905
00906
00907
00908
00909
00910 function docBodyTagBegin() {
00911 $bodyContent = 'body onclick="if (top.menuReset) top.menuReset();" '.trim($this->bodyTagAdditions.($this->bodyTagId ? ' id="'.$this->bodyTagId.'"' : ''));
00912 return '<'.trim($bodyContent).'>';
00913 }
00914
00915
00916
00917
00918
00919
00920 function docStyle() {
00921
00922
00923 if ($this->backGroundImage) {
00924 $this->inDocStylesArray[]=' BODY { background-image: url('.$this->backPath.$this->backGroundImage.'); }';
00925 }
00926
00927
00928 $this->inDocStylesArray[] = $this->inDocStyles;
00929 $this->inDocStylesArray[] = $this->inDocStyles_TBEstyle;
00930
00931
00932 $inDocStyles = implode('
00933 ',$this->inDocStylesArray);
00934
00935
00936 $style=trim('
00937 '.($this->styleSheetFile?'<link rel="stylesheet" type="text/css" href="'.$this->backPath.$this->styleSheetFile.'" />':'').'
00938 '.($this->styleSheetFile2?'<link rel="stylesheet" type="text/css" href="'.$this->backPath.$this->styleSheetFile2.'" />':'').'
00939 <style type="text/css" id="internalStyle">
00940
00941 '.trim($inDocStyles).'
00942
00943
00944 </style>
00945 '.($this->styleSheetFile_post?'<link rel="stylesheet" type="text/css" href="'.$this->backPath.$this->styleSheetFile_post.'" />':'').'
00946 '.implode("\n", $this->additionalStyleSheets)
00947 )
00948 ;
00949 $this->inDocStyles='';
00950 $this->inDocStylesArray=array();
00951
00952 return '
00953 '.$style;
00954 }
00955
00956
00957
00958
00959
00960
00961
00962
00963
00964
00965 function addStyleSheet($key, $href, $title='', $relation='stylesheet') {
00966 if (!isset($this->additionalStyleSheets[$key])) {
00967 $this->additionalStyleSheets[$key] = '<link rel="' . $relation . '" type="text/css" href="' . $href . '"' . ($title ? (' title="' . $title . '"') : '') . ' />';
00968 }
00969 }
00970
00971
00972
00973
00974
00975
00976
00977
00978 function insertStylesAndJS($content) {
00979
00980 $this->inDocStylesArray[] = $this->inDocStyles;
00981 $styles = "\n".implode("\n", $this->inDocStylesArray);
00982 $content = str_replace('',$styles,$content);
00983
00984
00985 $jscode = $this->JScode."\n".$this->wrapScriptTags(implode("\n", $this->JScodeArray));
00986 $content = str_replace('<!--###POSTJSMARKER###-->',$jscode,$content);
00987
00988 return $content;
00989 }
00990
00991
00992
00993
00994
00995
00996
00997
00998 function initCharset() {
00999
01000 $this->charset = $GLOBALS['LANG']->charSet ? $GLOBALS['LANG']->charSet : $this->charset;
01001
01002 return '<meta http-equiv="Content-Type" content="text/html; charset='.$this->charset.'" />';
01003 }
01004
01005
01006
01007
01008
01009
01010 function generator() {
01011 $str = 'TYPO3 '.TYPO3_branch.', http:
01012 return '<meta name="generator" content="'.$str .'" />';
01013 }
01014
01015
01016
01017
01018
01019
01020
01021
01022
01023
01024
01025
01026
01027
01028
01029
01030
01031
01032
01033
01034
01035
01036
01037
01038
01039
01040
01041
01042
01043 function icons($type, $styleAttribValue='') {
01044 switch($type) {
01045 case '3':
01046 $icon = 'gfx/icon_fatalerror.gif';
01047 break;
01048 case '2':
01049 $icon = 'gfx/icon_warning.gif';
01050 break;
01051 case '1':
01052 $icon = 'gfx/icon_note.gif';
01053 break;
01054 case '-1':
01055 $icon = 'gfx/icon_ok.gif';
01056 break;
01057 default:
01058 break;
01059 }
01060 if ($icon) {
01061 return '<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' class="absmiddle"'.($styleAttribValue ? ' style="'.htmlspecialchars($styleAttribValue).'"' : '').' alt="" />';
01062 }
01063 }
01064
01065
01066
01067
01068
01069
01070
01071
01072 function t3Button($onClick,$label) {
01073 $button = '<input type="submit" onclick="'.htmlspecialchars($onClick).'; return false;" value="'.htmlspecialchars($label).'" />';
01074 return $button;
01075 }
01076
01077
01078
01079
01080
01081
01082
01083 function dfw($string) {
01084 return '<span class="typo3-dimmed">'.$string.'</span>';
01085 }
01086
01087