* Fixed bug #1537: Shortcut icon syntax incorrect/incomplete
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / tslib / class.tslib_pagegen.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
6 * All rights reserved
7 *
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.
13 *
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.
18 *
19 *
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.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * Libraries for pagegen.php
29 * The script "pagegen.php" is included by "index_ts.php" when a page is not cached but needs to be rendered.
30 *
31 * $Id$
32 * Revised for TYPO3 3.6 June/2003 by Kasper Skaarhoj
33 * XHTML compliant
34 *
35 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
36 */
37 /**
38 * [CLASS/FUNCTION INDEX of SCRIPT]
39 *
40 *
41 *
42 * 88: class TSpagegen
43 * 95: function pagegenInit()
44 * 271: function getIncFiles()
45 * 304: function JSeventFunctions()
46 * 338: function renderContent()
47 * 365: function renderContentWithHeader($pageContent)
48 *
49 * SECTION: Helper functions
50 * 827: function inline2TempFile($str,$ext)
51 *
52 *
53 * 881: class FE_loadDBGroup extends t3lib_loadDBGroup
54 *
55 * TOTAL FUNCTIONS: 6
56 * (This index is automatically created/updated by the extension "extdeveval")
57 *
58 */
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78 /**
79 * Class for starting TypoScript page generation
80 *
81 * The class is not instantiated as an objects but called directly with the "::" operator.
82 * eg: TSpagegen::pagegenInit()
83 *
84 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
85 * @package TYPO3
86 * @subpackage tslib
87 */
88 class TSpagegen {
89
90 /**
91 * Setting some vars in TSFE, primarily based on TypoScript config settings.
92 *
93 * @return void
94 */
95 function pagegenInit() {
96 if ($GLOBALS['TSFE']->page['content_from_pid']>0) {
97 $temp_copy_TSFE = clone($GLOBALS['TSFE']); // make REAL copy of TSFE object - not reference!
98 $temp_copy_TSFE->id = $GLOBALS['TSFE']->page['content_from_pid']; // Set ->id to the content_from_pid value - we are going to evaluate this pid as was it a given id for a page-display!
99 $temp_copy_TSFE->getPageAndRootlineWithDomain($GLOBALS['TSFE']->config['config']['content_from_pid_allowOutsideDomain']?0:$GLOBALS['TSFE']->domainStartPage);
100 $GLOBALS['TSFE']->contentPid = intval($temp_copy_TSFE->id);
101 unset($temp_copy_TSFE);
102 }
103 if ($GLOBALS['TSFE']->config['config']['MP_defaults']) {
104 $temp_parts = t3lib_div::trimExplode('|',$GLOBALS['TSFE']->config['config']['MP_defaults'],1);
105 reset($temp_parts);
106 while(list(,$temp_p)=each($temp_parts)) {
107 list($temp_idP,$temp_MPp) = explode(':',$temp_p,2);
108 $temp_ids=t3lib_div::intExplode(',',$temp_idP);
109 reset($temp_ids);
110 while(list(,$temp_id)=each($temp_ids)) {
111 $GLOBALS['TSFE']->MP_defaults[$temp_id]=$temp_MPp;
112 }
113 }
114 }
115 if ($GLOBALS['TSFE']->config['config']['simulateStaticDocuments_pEnc_onlyP']) {
116 $temp_parts = t3lib_div::trimExplode(',',$GLOBALS['TSFE']->config['config']['simulateStaticDocuments_pEnc_onlyP'],1);
117 foreach ($temp_parts as $temp_p) {
118 $GLOBALS['TSFE']->pEncAllowedParamNames[$temp_p]=1;
119 }
120 }
121
122
123 // Global vars...
124 $GLOBALS['TSFE']->indexedDocTitle = $GLOBALS['TSFE']->page['title'];
125 $GLOBALS['TSFE']->debug = ''.$GLOBALS['TSFE']->config['config']['debug'];
126
127 // Base url:
128 if ($GLOBALS['TSFE']->config['config']['baseURL']) {
129 if ($GLOBALS['TSFE']->config['config']['baseURL']==='1') {
130 // Deprecated property, going to be dropped.
131 $error = 'Unsupported TypoScript property was found in this template: "config.baseURL="1"
132
133 This setting has been deprecated in TYPO 3.8.1 due to security concerns.
134 You need to change this value to the URL of your website root, otherwise TYPO3 will not work!
135
136 See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.typo3.org/index.php/TYPO3_3.8.1</a> for more information.';
137
138 $GLOBALS['TSFE']->printError(nl2br($error));
139 exit;
140 } else {
141 $GLOBALS['TSFE']->baseUrl = $GLOBALS['TSFE']->config['config']['baseURL'];
142 }
143 $GLOBALS['TSFE']->anchorPrefix = substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'),strlen(t3lib_div::getIndpEnv('TYPO3_SITE_URL')));
144 }
145
146 // Internal and External target defaults
147 $GLOBALS['TSFE']->intTarget = ''.$GLOBALS['TSFE']->config['config']['intTarget'];
148 $GLOBALS['TSFE']->extTarget = ''.$GLOBALS['TSFE']->config['config']['extTarget'];
149 if ($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses'] === 'ascii') {
150 $GLOBALS['TSFE']->spamProtectEmailAddresses = 'ascii';
151 } else {
152 $GLOBALS['TSFE']->spamProtectEmailAddresses = t3lib_div::intInRange($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses'],-10,10,0);
153 }
154
155
156 $GLOBALS['TSFE']->absRefPrefix = trim(''.$GLOBALS['TSFE']->config['config']['absRefPrefix']);
157 if ((!strcmp($GLOBALS['TSFE']->config['config']['simulateStaticDocuments'],'PATH_INFO') || $GLOBALS['TSFE']->absRefPrefix_force)
158 && !$GLOBALS['TSFE']->absRefPrefix) {
159 $GLOBALS['TSFE']->absRefPrefix=t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')).'/';
160 } // Force absRefPrefix to this value is PATH_INFO is used.
161
162 if ($GLOBALS['TSFE']->type && $GLOBALS['TSFE']->config['config']['frameReloadIfNotInFrameset']) {
163 $tdlLD = $GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page,'_top',$GLOBALS['TSFE']->no_cache,'');
164 $GLOBALS['TSFE']->JSCode = 'if(!parent.'.trim($GLOBALS['TSFE']->sPre).' && !parent.view_frame) top.location.href="'.$GLOBALS['TSFE']->baseUrlWrap($tdlLD['totalURL']).'"';
165 }
166 $GLOBALS['TSFE']->compensateFieldWidth = ''.$GLOBALS['TSFE']->config['config']['compensateFieldWidth'];
167 $GLOBALS['TSFE']->lockFilePath = ''.$GLOBALS['TSFE']->config['config']['lockFilePath'];
168 $GLOBALS['TSFE']->lockFilePath = $GLOBALS['TSFE']->lockFilePath ? $GLOBALS['TSFE']->lockFilePath : 'fileadmin/';
169 $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_noScaleUp'] = isset($GLOBALS['TSFE']->config['config']['noScaleUp']) ? ''.$GLOBALS['TSFE']->config['config']['noScaleUp'] : $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_noScaleUp'];
170 $GLOBALS['TSFE']->TYPO3_CONF_VARS['GFX']['im_noScaleUp'] = $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_noScaleUp'];
171
172 $GLOBALS['TSFE']->ATagParams = trim($GLOBALS['TSFE']->config['config']['ATagParams']) ? ' '.trim($GLOBALS['TSFE']->config['config']['ATagParams']) : '';
173 if ($GLOBALS['TSFE']->config['config']['setJS_mouseOver']) $GLOBALS['TSFE']->setJS('mouseOver');
174 if ($GLOBALS['TSFE']->config['config']['setJS_openPic']) $GLOBALS['TSFE']->setJS('openPic');
175
176 $GLOBALS['TSFE']->sWordRegEx='';
177 $GLOBALS['TSFE']->sWordList = t3lib_div::_GP('sword_list');
178 if (is_array($GLOBALS['TSFE']->sWordList)) {
179 $standAlone = trim(''.$GLOBALS['TSFE']->config['config']['sword_standAlone']);
180 $noMixedCase = trim(''.$GLOBALS['TSFE']->config['config']['sword_noMixedCase']);
181
182 $space = ($standAlone) ? '[[:space:]]' : '';
183 reset($GLOBALS['TSFE']->sWordList);
184 while (list($key,$val) = each($GLOBALS['TSFE']->sWordList)) {
185 if (trim($val)) {
186 if (!$noMixedCase) {
187 $GLOBALS['TSFE']->sWordRegEx.= $space.sql_regcase(quotemeta($val)).$space.'|';
188 } else {
189 $GLOBALS['TSFE']->sWordRegEx.= $space.quotemeta($val).$space.'|';
190 }
191 }
192 }
193 $GLOBALS['TSFE']->sWordRegEx = ereg_replace('\|$','',$GLOBALS['TSFE']->sWordRegEx);
194 }
195
196 // linkVars
197 $linkVars = (string)$GLOBALS['TSFE']->config['config']['linkVars'];
198 if ($linkVars) {
199 $linkVarArr = explode(',',$linkVars);
200
201 $GLOBALS['TSFE']->linkVars='';
202 $GET = t3lib_div::_GET();
203
204 foreach ($linkVarArr as $val) {
205 $val = trim($val);
206
207 if (preg_match('/^(.*)\((.+)\)$/',$val,$match)) {
208 $val = trim($match[1]);
209 $test = trim($match[2]);
210 } else unset($test);
211
212 if ($val && isset($GET[$val])) {
213 if (!is_array($GET[$val])) {
214 $tmpVal = rawurlencode($GET[$val]);
215
216 if ($test && !TSpagegen::isAllowedLinkVarValue($tmpVal,$test)) {
217 continue; // Error: This value was not allowed for this key
218 }
219
220 $value = '&'.$val.'='.$tmpVal;
221 } else {
222 if ($test && strcmp('array',$test)) {
223 continue; // Error: This key must not be an array!
224 }
225 $value = t3lib_div::implodeArrayForUrl($val,$GET[$val]);
226 }
227 } else continue;
228
229 $GLOBALS['TSFE']->linkVars.= $value;
230 }
231 unset($GET);
232 } else {
233 $GLOBALS['TSFE']->linkVars='';
234 }
235
236 // Setting XHTML-doctype from doctype
237 if (!$GLOBALS['TSFE']->config['config']['xhtmlDoctype']) {
238 $GLOBALS['TSFE']->config['config']['xhtmlDoctype'] = $GLOBALS['TSFE']->config['config']['doctype'];
239 }
240
241 if ($GLOBALS['TSFE']->config['config']['xhtmlDoctype']) {
242 $GLOBALS['TSFE']->xhtmlDoctype = $GLOBALS['TSFE']->config['config']['xhtmlDoctype'];
243
244 // Checking XHTML-docytpe
245 switch((string)$GLOBALS['TSFE']->config['config']['xhtmlDoctype']) {
246 case 'xhtml_trans':
247 case 'xhtml_strict':
248 case 'xhtml_frames':
249 $GLOBALS['TSFE']->xhtmlVersion = 100;
250 break;
251 case 'xhtml_basic':
252 $GLOBALS['TSFE']->xhtmlVersion = 105;
253 break;
254 case 'xhtml_11':
255 $GLOBALS['TSFE']->xhtmlVersion = 110;
256 break;
257 case 'xhtml_2':
258 $GLOBALS['TSFE']->xhtmlVersion = 200;
259 break;
260 default:
261 $GLOBALS['TSFE']->xhtmlDoctype = '';
262 $GLOBALS['TSFE']->xhtmlVersion = 0;
263 }
264 }
265 }
266
267 /**
268 * Returns an array with files to include. These files are the ones set up in TypoScript config.
269 *
270 * @return array Files to include. Paths are relative to PATH_site.
271 */
272 function getIncFiles() {
273 $incFilesArray = array();
274 // Get files from config.includeLibrary
275 $includeLibrary = trim(''.$GLOBALS['TSFE']->config['config']['includeLibrary']);
276 if ($includeLibrary) {
277 $incFile=$GLOBALS['TSFE']->tmpl->getFileName($includeLibrary);
278 if ($incFile) {
279 $incFilesArray[] = $incFile;
280 }
281 }
282
283 if (is_array($GLOBALS['TSFE']->pSetup['includeLibs.'])) {$incLibs=$GLOBALS['TSFE']->pSetup['includeLibs.'];} else {$incLibs=array();}
284 if (is_array($GLOBALS['TSFE']->tmpl->setup['includeLibs.'])) {$incLibs+=$GLOBALS['TSFE']->tmpl->setup['includeLibs.'];} // toplevel 'includeLibs' is added to the PAGE.includeLibs. In that way, PAGE-libs get first priority, because if the key already exist, it's not altered. (Due to investigation by me)
285 if (count($incLibs)) {
286 reset($incLibs);
287 while(list(,$theLib)=each($incLibs)) {
288 if (!is_array($theLib) && $incFile=$GLOBALS['TSFE']->tmpl->getFileName($theLib)) {
289 $incFilesArray[] = $incFile;
290 }
291 }
292 }
293 // Include HTML mail library?
294 if ($GLOBALS['TSFE']->config['config']['incT3Lib_htmlmail']) {
295 $incFilesArray[] = 't3lib/class.t3lib_htmlmail.php';
296 }
297 return $incFilesArray;
298 }
299
300 /**
301 * Processing JavaScript handlers
302 *
303 * @return array Array with a) a JavaScript section with event handlers and variables set and b) an array with attributes for the body tag.
304 */
305 function JSeventFunctions() {
306 $functions = array();
307 $setEvents = array();
308 $setBody = array();
309
310 foreach ($GLOBALS['TSFE']->JSeventFuncCalls as $event => $handlers) {
311 if (count($handlers)) {
312 $functions[] = ' function T3_'.$event.'Wrapper(e) { '.implode(' ',$handlers).' }';
313 $setEvents[] = ' document.'.$event.'=T3_'.$event.'Wrapper;';
314 if ($event == 'onload') {
315 $setBody[]='onload="T3_onloadWrapper();"'; // dubiuos double setting breaks on some browser - do we need it?
316 }
317 }
318 }
319
320 return array(count($functions)? implode(chr(10), $functions) . chr(10) . implode(chr(10), $setEvents) : '', $setBody);
321 }
322
323 /**
324 * Rendering the page content
325 *
326 * @return void
327 */
328 function renderContent() {
329 // PAGE CONTENT
330 $GLOBALS['TT']->incStackPointer();
331 $GLOBALS['TT']->push($GLOBALS['TSFE']->sPre, 'PAGE');
332 $pageContent = $GLOBALS['TSFE']->cObj->cObjGet($GLOBALS['TSFE']->pSetup);
333
334 if ($GLOBALS['TSFE']->pSetup['wrap']) {$pageContent = $GLOBALS['TSFE']->cObj->wrap($pageContent, $GLOBALS['TSFE']->pSetup['wrap']);}
335 if ($GLOBALS['TSFE']->pSetup['stdWrap.']) {$pageContent = $GLOBALS['TSFE']->cObj->stdWrap($pageContent, $GLOBALS['TSFE']->pSetup['stdWrap.']);}
336
337 // PAGE HEADER (after content - maybe JS is inserted!
338
339 // if 'disableAllHeaderCode' is set, all the header-code is discarded!
340 if ($GLOBALS['TSFE']->config['config']['disableAllHeaderCode']) {
341 $GLOBALS['TSFE']->content = $pageContent;
342 } else {
343 TSpagegen::renderContentWithHeader($pageContent);
344 }
345 $GLOBALS['TT']->pull($GLOBALS['TT']->LR?$GLOBALS['TSFE']->content:'');
346 $GLOBALS['TT']->decStackPointer();
347 }
348
349 /**
350 * Rendering normal HTML-page with header by wrapping the generated content ($pageContent) in body-tags and setting the header accordingly.
351 *
352 * @param string The page content which TypoScript objects has generated
353 * @return void
354 */
355 function renderContentWithHeader($pageContent) {
356 $customContent = $GLOBALS['TSFE']->config['config']['headerComment'];
357 if (trim($customContent)) {
358 $customContent = chr(10).$customContent;
359 } else $customContent='';
360
361 // Setting charset:
362 $theCharset = $GLOBALS['TSFE']->metaCharset;
363
364 // Reset the content variables:
365 $GLOBALS['TSFE']->content='';
366 $htmlTagAttributes = array();
367 $htmlLang = $GLOBALS['TSFE']->config['config']['htmlTag_langKey'] ? $GLOBALS['TSFE']->config['config']['htmlTag_langKey'] : 'en';
368
369 // Set content direction: (More info: http://www.tau.ac.il/~danon/Hebrew/HTML_and_Hebrew.html)
370 if ($GLOBALS['TSFE']->config['config']['htmlTag_dir']) {
371 $htmlTagAttributes['dir'] = htmlspecialchars($GLOBALS['TSFE']->config['config']['htmlTag_dir']);
372 }
373
374 // Setting document type:
375 $docTypeParts = array();
376 // Part 1: XML prologue
377 switch((string)$GLOBALS['TSFE']->config['config']['xmlprologue']) {
378 case 'none':
379 break;
380 case 'xml_10':
381 $docTypeParts[]='<?xml version="1.0" encoding="'.$theCharset.'"?>';
382 break;
383 case 'xml_11':
384 $docTypeParts[]='<?xml version="1.1" encoding="'.$theCharset.'"?>';
385 break;
386 case '':
387 if ($GLOBALS['TSFE']->xhtmlVersion) $docTypeParts[]='<?xml version="1.0" encoding="'.$theCharset.'"?>';
388 break;
389 default:
390 $docTypeParts[]=$GLOBALS['TSFE']->config['config']['xmlprologue'];
391 }
392 // Part 2: DTD
393 if ($GLOBALS['TSFE']->config['config']['doctype']) {
394 switch((string)$GLOBALS['TSFE']->config['config']['doctype']) {
395 case 'xhtml_trans':
396 $docTypeParts[]='<!DOCTYPE html
397 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
398 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
399 break;
400 case 'xhtml_strict':
401 $docTypeParts[]='<!DOCTYPE html
402 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
403 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
404 break;
405 case 'xhtml_frames':
406 $docTypeParts[]='<!DOCTYPE html
407 PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
408 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">';
409 break;
410 case 'xhtml_basic':
411 $docTypeParts[]='<!DOCTYPE html
412 PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
413 "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">';
414 break;
415 case 'xhtml_11':
416 $docTypeParts[]='<!DOCTYPE html
417 PUBLIC "-//W3C//DTD XHTML 1.1//EN"
418 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';
419 break;
420 case 'xhtml_2':
421 $docTypeParts[]='<!DOCTYPE html
422 PUBLIC "-//W3C//DTD XHTML 2.0//EN"
423 "http://www.w3.org/TR/xhtml2/DTD/xhtml2.dtd">';
424 break;
425 case 'none':
426 break;
427 default:
428 $docTypeParts[] = $GLOBALS['TSFE']->config['config']['doctype'];
429 }
430 } else {
431 $docTypeParts[]='<!DOCTYPE html
432 PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
433 }
434
435 if ($GLOBALS['TSFE']->xhtmlVersion) {
436
437 // Setting <html> tag attributes:
438 $htmlTagAttributes['xmlns'] = 'http://www.w3.org/1999/xhtml';
439 $htmlTagAttributes['xml:lang'] = $htmlLang;
440 if ($GLOBALS['TSFE']->xhtmlVersion < 110) {
441 $htmlTagAttributes['lang'] = $htmlLang;
442 }
443 }
444
445 // Swap XML and doctype order around (for MSIE / Opera standards compliance)
446 if ($GLOBALS['TSFE']->config['config']['doctypeSwitch']) {
447 $docTypeParts = array_reverse($docTypeParts);
448 }
449
450 // Adding doctype parts:
451 $GLOBALS['TSFE']->content.= count($docTypeParts) ? implode(chr(10),$docTypeParts).chr(10) : '';
452
453 // Begin header section:
454 if (strcmp($GLOBALS['TSFE']->config['config']['htmlTag_setParams'],'none')) {
455 $_attr = $GLOBALS['TSFE']->config['config']['htmlTag_setParams'] ? $GLOBALS['TSFE']->config['config']['htmlTag_setParams'] : t3lib_div::implodeAttributes($htmlTagAttributes);
456 } else {
457 $_attr = '';
458 }
459 $GLOBALS['TSFE']->content.='<html'.($_attr ? ' '.$_attr : '').'>';
460
461 // Head tag:
462 $headTag = $GLOBALS['TSFE']->pSetup['headTag'] ? $GLOBALS['TSFE']->pSetup['headTag'] : '<head>';
463 $GLOBALS['TSFE']->content.= chr(10).$headTag;
464
465 // Setting charset meta tag:
466 $GLOBALS['TSFE']->content.='
467 <meta http-equiv="Content-Type" content="text/html; charset='.$theCharset.'" />';
468
469 $GLOBALS['TSFE']->content.='
470
471 <!-- '.($customContent?$customContent.chr(10):'').'
472 This website is powered by TYPO3 - inspiring people to share!
473 TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.
474 TYPO3 is copyright 1998-2008 of Kasper Skaarhoj. Extensions are copyright of their respective owners.
475 Information and contribution at http://typo3.com/ and http://typo3.org/
476 -->
477 ';
478
479
480 if ($GLOBALS['TSFE']->baseUrl) {
481 $GLOBALS['TSFE']->content.='
482 <base href="'.htmlspecialchars($GLOBALS['TSFE']->baseUrl).'" />';
483 }
484
485 if ($GLOBALS['TSFE']->pSetup['shortcutIcon']) {
486 $favIcon = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $GLOBALS['TSFE']->tmpl->getFileName($GLOBALS['TSFE']->pSetup['shortcutIcon']);
487 $iconMimeType = '';
488 if (function_exists('finfo_open')) {
489 $finfo = finfo_open(FILEINFO_MIME);
490 $iconMimeType = ' type="'.finfo_file($finfo,$favIcon).'"';
491 finfo_close($finfo);
492 }
493
494 $GLOBALS['TSFE']->content.= '
495 <link rel="shortcut icon" href="'.htmlspecialchars($favIcon).'"'.$iconMimeType.' />
496 <link rel="icon" href="'.htmlspecialchars($favIcon).'"'.$iconMimeType.' />';
497 }
498
499 // Including CSS files
500 if (is_array($GLOBALS['TSFE']->tmpl->setup['plugin.'])) {
501 $temp_styleLines=array();
502 foreach ($GLOBALS['TSFE']->tmpl->setup['plugin.'] as $key=>$iCSScode) {
503 if (is_array($iCSScode) && $iCSScode['_CSS_DEFAULT_STYLE']) {
504 $temp_styleLines[]='/* default styles for extension "'.substr($key,0,-1).'" */'.chr(10).$iCSScode['_CSS_DEFAULT_STYLE'];
505 }
506 }
507 if (count($temp_styleLines)) {
508 if ($GLOBALS['TSFE']->config['config']['inlineStyle2TempFile']) {
509 $GLOBALS['TSFE']->content.=TSpagegen::inline2TempFile(implode(chr(10),$temp_styleLines),'css');
510 } else {
511 $GLOBALS['TSFE']->content.='
512 <style type="text/css">
513 /*<![CDATA[*/
514 <!--
515 '.implode(chr(10),$temp_styleLines).'
516 -->
517 /*]]>*/
518 </style>';
519 }
520 }
521 }
522
523 if ($GLOBALS['TSFE']->pSetup['stylesheet']) {
524 $ss = $GLOBALS['TSFE']->tmpl->getFileName($GLOBALS['TSFE']->pSetup['stylesheet']);
525 if ($ss) {
526 $GLOBALS['TSFE']->content.='
527 <link rel="stylesheet" type="text/css" href="'.htmlspecialchars($ss).'" />';
528 }
529 }
530 if (is_array($GLOBALS['TSFE']->pSetup['includeCSS.'])) {
531 foreach ($GLOBALS['TSFE']->pSetup['includeCSS.'] as $key=>$iCSSfile) {
532 if (!is_array($iCSSfile)) {
533 $ss=$GLOBALS['TSFE']->tmpl->getFileName($iCSSfile);
534 if ($ss) {
535 if ($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['import']) {
536 if (substr($ss,0,1)!='/') { // To fix MSIE 6 that cannot handle these as relative paths (according to Ben v Ende)
537 $ss = t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')).'/'.$ss;
538 }
539 $GLOBALS['TSFE']->content.='
540 <style type="text/css">
541 <!--
542 @import url("'.htmlspecialchars($ss).'") '.htmlspecialchars($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['media']).';
543 -->
544 </style>
545 ';
546 } else {
547 $GLOBALS['TSFE']->content.='
548 <link rel="'.($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['alternate'] ? 'alternate stylesheet' : 'stylesheet').'" type="text/css" href="'.htmlspecialchars($ss).'"'.
549 ($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['title'] ? ' title="'.htmlspecialchars($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['title']).'"' : '').
550 ($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['media'] ? ' media="'.htmlspecialchars($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['media']).'"' : '').
551 ' />';
552 }
553 }
554 }
555 }
556 }
557
558 // Stylesheets
559 $style='';
560 $style.=trim($GLOBALS['TSFE']->pSetup['CSS_inlineStyle']).chr(10);
561
562 if ($GLOBALS['TSFE']->pSetup['insertClassesFromRTE']) {
563 $pageTSConfig = $GLOBALS['TSFE']->getPagesTSconfig();
564 $RTEclasses = $pageTSConfig['RTE.']['classes.'];
565 if (is_array($RTEclasses)) {
566 foreach ($RTEclasses as $RTEclassName=>$RTEvalueArray) {
567 if ($RTEvalueArray['value']) {
568 $style.='
569 .'.substr($RTEclassName,0,-1).' {'.$RTEvalueArray['value'].'}';
570 }
571 }
572 }
573
574 if ($GLOBALS['TSFE']->pSetup['insertClassesFromRTE.']['add_mainStyleOverrideDefs'] && is_array($pageTSConfig['RTE.']['default.']['mainStyleOverride_add.'])) {
575 $mSOa_tList = t3lib_div::trimExplode(',',strtoupper($GLOBALS['TSFE']->pSetup['insertClassesFromRTE.']['add_mainStyleOverrideDefs']),1);
576 foreach ($pageTSConfig['RTE.']['default.']['mainStyleOverride_add.'] as $mSOa_key=>$mSOa_value) {
577 if (!is_array($mSOa_value) && (in_array('*',$mSOa_tList)||in_array($mSOa_key,$mSOa_tList))) {
578 $style.='
579 '.$mSOa_key.' {'.$mSOa_value.'}';
580 }
581 }
582 }
583 }
584
585 // Setting body tag margins in CSS:
586 if (isset($GLOBALS['TSFE']->pSetup['bodyTagMargins']) && $GLOBALS['TSFE']->pSetup['bodyTagMargins.']['useCSS']) {
587 $margins = intval($GLOBALS['TSFE']->pSetup['bodyTagMargins']);
588 $style.='
589 BODY {margin: '.$margins.'px '.$margins.'px '.$margins.'px '.$margins.'px;}';
590 }
591
592 if ($GLOBALS['TSFE']->pSetup['noLinkUnderline']) {
593 $style.='
594 A:link {text-decoration: none}
595 A:visited {text-decoration: none}
596 A:active {text-decoration: none}';
597 }
598 if (trim($GLOBALS['TSFE']->pSetup['hover'])) {
599 $style.='
600 A:hover {color: '.trim($GLOBALS['TSFE']->pSetup['hover']).';}';
601 }
602 if (trim($GLOBALS['TSFE']->pSetup['hoverStyle'])) {
603 $style.='
604 A:hover {'.trim($GLOBALS['TSFE']->pSetup['hoverStyle']).'}';
605 }
606 if ($GLOBALS['TSFE']->pSetup['smallFormFields']) {
607 $style.='
608 SELECT { font-family: Verdana, Arial, Helvetica; font-size: 10px }
609 TEXTAREA { font-family: Verdana, Arial, Helvetica; font-size: 10px}
610 INPUT { font-family: Verdana, Arial, Helvetica; font-size: 10px }';
611 }
612 if ($GLOBALS['TSFE']->pSetup['adminPanelStyles']) {
613 $style.='
614
615 /* Default styles for the Admin Panel */
616 TABLE.typo3-adminPanel { border: 1px solid black; background-color: #F6F2E6; }
617 TABLE.typo3-adminPanel TR.typo3-adminPanel-hRow TD { background-color: #9BA1A8; }
618 TABLE.typo3-adminPanel TR.typo3-adminPanel-itemHRow TD { background-color: #ABBBB4; }
619 TABLE.typo3-adminPanel TABLE, TABLE.typo3-adminPanel TD { border: 0px; }
620 TABLE.typo3-adminPanel TD FONT { font-family: verdana; font-size: 10px; color: black; }
621 TABLE.typo3-adminPanel TD A FONT { font-family: verdana; font-size: 10px; color: black; }
622 TABLE.typo3-editPanel { border: 1px solid black; background-color: #F6F2E6; }
623 TABLE.typo3-editPanel TD { border: 0px; }
624 ';
625 }
626
627 if (trim($style)) {
628 if ($GLOBALS['TSFE']->config['config']['inlineStyle2TempFile']) {
629 $GLOBALS['TSFE']->content.=TSpagegen::inline2TempFile($style, 'css');
630 } else {
631 $GLOBALS['TSFE']->content.='
632 <style type="text/css">
633 /*<![CDATA[*/
634 <!--'.$style.'
635 -->
636 /*]]>*/
637 </style>';
638 }
639 }
640
641 // JavaScript files
642 if (is_array($GLOBALS['TSFE']->pSetup['includeJS.'])) {
643 foreach ($GLOBALS['TSFE']->pSetup['includeJS.'] as $key=>$JSfile) {
644 if (!is_array($JSfile)) {
645 $ss = $GLOBALS['TSFE']->tmpl->getFileName($JSfile);
646 if ($ss) {
647 $type = $GLOBALS['TSFE']->pSetup['includeJS.'][$key.'.']['type'];
648 if (!$type) $type = 'text/javascript';
649
650 $GLOBALS['TSFE']->content.='
651 <script src="'.htmlspecialchars($ss).'" type="'.htmlspecialchars($type).'"></script>';
652 }
653 }
654 }
655 }
656
657
658
659
660
661 // Headerdata
662 if (is_array($GLOBALS['TSFE']->pSetup['headerData.'])) {
663 $GLOBALS['TSFE']->content.= chr(10).$GLOBALS['TSFE']->cObj->cObjGet($GLOBALS['TSFE']->pSetup['headerData.'],'headerData.');
664 }
665
666 // Title
667 $titleTagContent = $GLOBALS['TSFE']->tmpl->printTitle(
668 $GLOBALS['TSFE']->altPageTitle?$GLOBALS['TSFE']->altPageTitle:$GLOBALS['TSFE']->page['title'],
669 $GLOBALS['TSFE']->config['config']['noPageTitle'],
670 $GLOBALS['TSFE']->config['config']['pageTitleFirst']
671 );
672 if ($GLOBALS['TSFE']->config['config']['titleTagFunction']) {
673 $titleTagContent = $GLOBALS['TSFE']->cObj->callUserFunction($GLOBALS['TSFE']->config['config']['titleTagFunction'], array(), $titleTagContent);
674 }
675
676 if (strlen($titleTagContent) && intval($GLOBALS['TSFE']->config['config']['noPageTitle'])!==2) {
677 $GLOBALS['TSFE']->content.='
678 <title>'.htmlspecialchars($titleTagContent).'</title>';
679 }
680 $GLOBALS['TSFE']->content.='
681 <meta name="generator" content="TYPO3 '.TYPO3_branch.' CMS" />';
682
683 $conf=$GLOBALS['TSFE']->pSetup['meta.'];
684 if (is_array($conf)) {
685 reset($conf);
686 while(list($theKey,$theValue)=each($conf)) {
687 if (!strstr($theKey,'.') || !isset($conf[substr($theKey,0,-1)])) { // Only if 1) the property is set but not the value itself, 2) the value and/or any property
688 if (strstr($theKey,'.')) {
689 $theKey = substr($theKey,0,-1);
690 }
691 $val = $GLOBALS['TSFE']->cObj->stdWrap($conf[$theKey],$conf[$theKey.'.']);
692 $key = $theKey;
693 if (trim($val)) {
694 $a='name';
695 if (strtolower($key)=='refresh') {$a='http-equiv';}
696 $GLOBALS['TSFE']->content.= '
697 <meta '.$a.'="'.$key.'" content="'.htmlspecialchars(trim($val)).'" />';
698 }
699 }
700 }
701 }
702
703 unset($GLOBALS['TSFE']->additionalHeaderData['JSCode']);
704 unset($GLOBALS['TSFE']->additionalHeaderData['JSImgCode']);
705
706 if (is_array($GLOBALS['TSFE']->config['INTincScript'])) {
707 // Storing the JSCode and JSImgCode vars...
708 $GLOBALS['TSFE']->additionalHeaderData['JSCode'] = $GLOBALS['TSFE']->JSCode;
709 $GLOBALS['TSFE']->additionalHeaderData['JSImgCode'] = $GLOBALS['TSFE']->JSImgCode;
710 $GLOBALS['TSFE']->config['INTincScript_ext']['divKey'] = $GLOBALS['TSFE']->uniqueHash();
711 $GLOBALS['TSFE']->config['INTincScript_ext']['additionalHeaderData'] = $GLOBALS['TSFE']->additionalHeaderData; // Storing the header-data array
712 $GLOBALS['TSFE']->config['INTincScript_ext']['additionalJavaScript'] = $GLOBALS['TSFE']->additionalJavaScript; // Storing the JS-data array
713 $GLOBALS['TSFE']->config['INTincScript_ext']['additionalCSS'] = $GLOBALS['TSFE']->additionalCSS; // Storing the Style-data array
714
715 $GLOBALS['TSFE']->additionalHeaderData = array('<!--HD_'.$GLOBALS['TSFE']->config['INTincScript_ext']['divKey'].'-->'); // Clearing the array
716 $GLOBALS['TSFE']->divSection.= '<!--TDS_'.$GLOBALS['TSFE']->config['INTincScript_ext']['divKey'].'-->';
717 } else {
718 $GLOBALS['TSFE']->INTincScript_loadJSCode();
719 }
720 $JSef = TSpagegen::JSeventFunctions();
721
722 // Adding default Java Script:
723 $_scriptCode = '
724 var browserName = navigator.appName;
725 var browserVer = parseInt(navigator.appVersion);
726 var version = "";
727 var msie4 = (browserName == "Microsoft Internet Explorer" && browserVer >= 4);
728 if ((browserName == "Netscape" && browserVer >= 3) || msie4 || browserName=="Konqueror" || browserName=="Opera") {version = "n3";} else {version = "n2";}
729 // Blurring links:
730 function blurLink(theObject) { //
731 if (msie4) {theObject.blur();}
732 }
733 ' . $JSef[0];
734
735 if ($GLOBALS['TSFE']->spamProtectEmailAddresses && $GLOBALS['TSFE']->spamProtectEmailAddresses !== 'ascii') {
736 $_scriptCode.= '
737 // decrypt helper function
738 function decryptCharcode(n,start,end,offset) {
739 n = n + offset;
740 if (offset > 0 && n > end) {
741 n = start + (n - end - 1);
742 } else if (offset < 0 && n < start) {
743 n = end - (start - n - 1);
744 }
745 return String.fromCharCode(n);
746 }
747 // decrypt string
748 function decryptString(enc,offset) {
749 var dec = "";
750 var len = enc.length;
751 for(var i=0; i < len; i++) {
752 var n = enc.charCodeAt(i);
753 if (n >= 0x2B && n <= 0x3A) {
754 dec += decryptCharcode(n,0x2B,0x3A,offset); // 0-9 . , - + / :
755 } else if (n >= 0x40 && n <= 0x5A) {
756 dec += decryptCharcode(n,0x40,0x5A,offset); // A-Z @
757 } else if (n >= 0x61 && n <= 0x7A) {
758 dec += decryptCharcode(n,0x61,0x7A,offset); // a-z
759 } else {
760 dec += enc.charAt(i);
761 }
762 }
763 return dec;
764 }
765 // decrypt spam-protected emails
766 function linkTo_UnCryptMailto(s) {
767 location.href = decryptString(s,'.($GLOBALS['TSFE']->spamProtectEmailAddresses*-1).');
768 }
769 ';
770 }
771
772 //add inline JS
773 $_inlineJS = '';
774 // defined in TS with page.inlineJS
775 if (is_array($GLOBALS['TSFE']->pSetup['inlineJS.'])) {
776 $GLOBALS['TSFE']->inlineJS[]= $GLOBALS['TSFE']->cObj->cObjGet($GLOBALS['TSFE']->pSetup['inlineJS.'],'inlineJS.');
777 }
778 // defined in php
779 if(is_array($GLOBALS['TSFE']->inlineJS)) {
780 foreach($GLOBALS['TSFE']->inlineJS as $key=>$val) {
781 if(!is_array($val)) {
782 $_inlineJS .= chr(10).$val.chr(10);
783 }
784 }
785 }
786
787 // Should minify?
788 if ($GLOBALS['TSFE']->config['config']['minifyJS']) {
789 $minifyErrorScript = $minifyErrorInline = '';
790 $_scriptCode = t3lib_div::minifyJavaScript($_scriptCode,$minifyErrorScript);
791 if ($minifyErrorScript) {
792 $GLOBALS['TT']->setTSlogMessage($minifyErrorScript, 3);
793 }
794 if ($_inlineJS) {
795 $_inlineJS = t3lib_div::minifyJavaScript($_inlineJS,$minifyErrorInline);
796 if ($minifyErrorInline) {
797 $GLOBALS['TT']->setTSlogMessage($minifyErrorInline, 3);
798 }
799 }
800 }
801
802 if (!$GLOBALS['TSFE']->config['config']['removeDefaultJS']) {
803 // inlude default and inlineJS
804 $GLOBALS['TSFE']->content.='
805 <script type="text/javascript">
806 /*<![CDATA[*/
807 <!--'.$_scriptCode.$_inlineJS.'
808 // -->
809 /*]]>*/
810 </script>';
811 } elseif ($GLOBALS['TSFE']->config['config']['removeDefaultJS']==='external') {
812 // put default and inlineJS in external file
813 $GLOBALS['TSFE']->content.= TSpagegen::inline2TempFile($_scriptCode.$_inlineJS, 'js');
814 } else {
815 // include only inlineJS
816 $GLOBALS['TSFE']->content.='
817 <script type="text/javascript">
818 /*<![CDATA[*/
819 <!--'.$_inlineJS.'
820 // -->
821 /*]]>*/
822 </script>';
823 }
824
825 $GLOBALS['TSFE']->content.= chr(10).implode($GLOBALS['TSFE']->additionalHeaderData,chr(10)).'
826 </head>';
827 if ($GLOBALS['TSFE']->pSetup['frameSet.']) {
828 $fs = t3lib_div::makeInstance('tslib_frameset');
829 $GLOBALS['TSFE']->content.= $fs->make($GLOBALS['TSFE']->pSetup['frameSet.']);
830 $GLOBALS['TSFE']->content.= chr(10).'<noframes>'.chr(10);
831 }
832
833 // Bodytag:
834 $defBT = $GLOBALS['TSFE']->pSetup['bodyTagCObject'] ? $GLOBALS['TSFE']->cObj->cObjGetSingle($GLOBALS['TSFE']->pSetup['bodyTagCObject'],$GLOBALS['TSFE']->pSetup['bodyTagCObject.'],'bodyTagCObject') : '';
835 if (!$defBT) $defBT = $GLOBALS['TSFE']->defaultBodyTag;
836 $bodyTag = $GLOBALS['TSFE']->pSetup['bodyTag'] ? $GLOBALS['TSFE']->pSetup['bodyTag'] : $defBT;
837 if ($bgImg=$GLOBALS['TSFE']->cObj->getImgResource($GLOBALS['TSFE']->pSetup['bgImg'],$GLOBALS['TSFE']->pSetup['bgImg.'])) {
838 $bodyTag = ereg_replace('>$','',trim($bodyTag)).' background="'.$GLOBALS["TSFE"]->absRefPrefix.$bgImg[3].'">';
839 }
840
841 if (isset($GLOBALS['TSFE']->pSetup['bodyTagMargins'])) {
842 $margins = intval($GLOBALS['TSFE']->pSetup['bodyTagMargins']);
843 if ($GLOBALS['TSFE']->pSetup['bodyTagMargins.']['useCSS']) {
844 // Setting margins in CSS, see above
845 } else {
846 $bodyTag = ereg_replace('>$','',trim($bodyTag)).' leftmargin="'.$margins.'" topmargin="'.$margins.'" marginwidth="'.$margins.'" marginheight="'.$margins.'">';
847 }
848 }
849
850 if (trim($GLOBALS['TSFE']->pSetup['bodyTagAdd'])) {
851 $bodyTag = ereg_replace('>$','',trim($bodyTag)).' '.trim($GLOBALS['TSFE']->pSetup['bodyTagAdd']).'>';
852 }
853
854 if (count($JSef[1])) { // Event functions:
855 $bodyTag = ereg_replace('>$','',trim($bodyTag)).' '.trim(implode(' ',$JSef[1])).'>';
856 }
857 $GLOBALS['TSFE']->content.= chr(10).$bodyTag;
858
859
860 // Div-sections
861 if ($GLOBALS['TSFE']->divSection) {
862 $GLOBALS['TSFE']->content.= chr(10).$GLOBALS['TSFE']->divSection;
863 }
864
865 // Page content
866 $GLOBALS['TSFE']->content.= chr(10).$pageContent;
867
868 // Ending page
869 $GLOBALS['TSFE']->content.= chr(10).'</body>';
870 if ($GLOBALS['TSFE']->pSetup['frameSet.']) {
871 $GLOBALS['TSFE']->content.= chr(10).'</noframes>';
872 }
873 $GLOBALS['TSFE']->content.=chr(10).'</html>';
874 }
875
876
877
878
879
880
881
882
883
884
885
886
887
888 /*************************
889 *
890 * Helper functions
891 * Remember: Calls internally must still be done on the non-instantiated class: TSpagegen::inline2TempFile()
892 *
893 *************************/
894
895 /**
896 * Writes string to a temporary file named after the md5-hash of the string
897 *
898 * @param string CSS styles / JavaScript to write to file.
899 * @param string Extension: "css" or "js"
900 * @return string <script> or <link> tag for the file.
901 */
902 function inline2TempFile($str,$ext) {
903
904 // Create filename / tags:
905 $script = '';
906 switch($ext) {
907 case 'js':
908 $script = 'typo3temp/javascript_'.substr(md5($str),0,10).'.js';
909 $output = '
910 <script type="text/javascript" src="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.$script).'"></script>';
911 break;
912 case 'css':
913 $script = 'typo3temp/stylesheet_'.substr(md5($str),0,10).'.css';
914 $output = '
915 <link rel="stylesheet" type="text/css" href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.$script).'" />';
916 break;
917 }
918
919 // Write file:
920 if ($script) {
921 if (!@is_file(PATH_site.$script)) {
922 t3lib_div::writeFile(PATH_site.$script,$str);
923 }
924 }
925
926 return $output;
927 }
928
929 /**
930 * Checks if the value defined in "config.linkVars" contains an allowed value. Otherwise, return false which means the value will not be added to any links.
931 *
932 * @param string The string in which to find $needle
933 * @param string The string to find in $haystack
934 * @return boolean Returns true if $needle matches or is found in $haystack
935 */
936 function isAllowedLinkVarValue($haystack,$needle) {
937 $OK = false;
938
939 if ($needle=='int' || $needle=='integer') { // Integer
940
941 if (t3lib_div::testInt($haystack)) {
942 $OK = true;
943 }
944
945 } elseif (preg_match('/^\/.+\/[imsxeADSUXu]*$/', $needle)) { // Regular expression, only "//" is allowed as delimiter
946
947 if (@preg_match($needle, $haystack)) {
948 $OK = true;
949 }
950
951 } elseif (strstr($needle,'-')) { // Range
952
953 if (t3lib_div::testInt($haystack)) {
954 $range = explode('-',$needle);
955 if ($range[0] <= $haystack && $range[1] >= $haystack) {
956 $OK = true;
957 }
958 }
959
960 } elseif (strstr($needle,'|')) { // List
961
962 $haystack = str_replace(' ','',$haystack); // Trim the input
963 if (strstr('|'.$needle.'|', '|'.$haystack.'|')) {
964 $OK = true;
965 }
966
967 } elseif (!strcmp($needle,$haystack)) { // String comparison
968 $OK = true;
969 }
970
971 return $OK;
972 }
973 }
974
975 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/class.tslib_pagegen.php']) {
976 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/class.tslib_pagegen.php']);
977 }
978
979
980
981 // ********************************************************
982 // Includes the search-class if $sword and $scols are set.
983 // ********************************************************
984 if (t3lib_div::_GP('sword') && t3lib_div::_GP('scols')) {
985 require_once(PATH_tslib.'class.tslib_search.php');
986 }
987
988 // ************
989 // LoadDBGroup
990 // ************
991 require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
992
993 /**
994 * Class for fetching record relations for the frontend.
995 *
996 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
997 * @package TYPO3
998 * @subpackage tslib
999 * @see tslib_cObj::RECORDS()
1000 */
1001 class FE_loadDBGroup extends t3lib_loadDBGroup {
1002 var $fromTC = 0; // Means that everything is returned instead of only uid and label-field
1003 }
1004
1005 // **********************************
1006 // includes stuff for graphical work
1007 // **********************************
1008 require_once(PATH_t3lib.'class.t3lib_stdgraphic.php');
1009 require_once(PATH_tslib.'class.tslib_gifbuilder.php');
1010
1011 // *************************
1012 // includes menu-management
1013 // *************************
1014 require_once(PATH_tslib.'class.tslib_menu.php');
1015
1016 // *************************
1017 // Global content object...
1018 // *************************
1019 require_once(PATH_tslib.'class.tslib_content.php');
1020
1021 ?>