33c095f5dd30abec207faa11dfce24caf0f9956a
[TYPO3CMS/Extensions/static_info_tables.git] / class.tx_staticinfotables_div.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2004-2008 René Fritz (r.fritz@colorcube.de)
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 *
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
24 /**
25 * Misc functions to access the static info tables
26 *
27 * $Id$
28 *
29 * @author René Fritz <r.fritz@colorcube.de>
30 * @package TYPO3
31 */
32 /**
33 * [CLASS/FUNCTION INDEX of SCRIPT]
34 *
35 *
36 *
37 * 57: class tx_staticinfotables_div
38 * 68: function getTCAlabelField($table, $loadTCA=TRUE, $lang='', $local=FALSE)
39 * 117: function isoCodeType($isoCode)
40 * 139: function getIsoCodeField($table, $isoCode, $loadTCA=TRUE, $index=0)
41 * 165: function getTCAsortField($table, $loadTCA=TRUE)
42 * 177: function getCurrentLanguage()
43 * 210: function getCurrentSystemLanguage($where='')
44 * 243: function getCollateLocale()
45 * 276: function getTitleFromIsoCode($table, $isoCode, $lang='', $local=FALSE)
46 * 336: function replaceMarkersInSQL($sql, $table, $row)
47 * 378: function selectItemsTCA($params)
48 * 475: function updateHotlist ($table, $indexValue, $indexField='', $app='')
49 * 545: function &fetchCountries($country, $iso2='', $iso3='', $isonr='')
50 * 590: function quoteJSvalue($value, $inScriptTags = false)
51 * 612: function loadTcaAdditions($ext_keys)
52 *
53 * TOTAL FUNCTIONS: 14
54 * (This index is automatically created/updated by the extension "extdeveval")
55 *
56 */
57 class tx_staticinfotables_div {
58
59 /**
60 * Returns a label field for the current language
61 *
62 * @param string table name
63 * @param boolean If set (default) the TCA definition of the table should be loaded with t3lib_div::loadTCA(). It will be needed to set it to false if you call this function from inside of tca.php
64 * @param string language to be used
65 * @param boolean If set, we are looking for the "local" title field
66 * @return string field name
67 */
68 function getTCAlabelField($table, $loadTCA=TRUE, $lang='', $local=FALSE) {
69 global $TCA, $LANG, $TSFE;
70
71 if (is_object($LANG)) {
72 $csConvObj = $LANG->csConvObj;
73 } elseif (is_object($TSFE)) {
74 $csConvObj = $TSFE->csConvObj;
75 }
76
77 if (!is_object($csConvObj)) {
78 include_once(PATH_t3lib.'class.t3lib_cs.php');
79 // The object may not exist yet, so we need to create it now.
80 $csConvObj = &t3lib_div::makeInstance('t3lib_cs');
81 }
82
83 $labelFields = array();
84 if($table && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'][$table]['label_fields'])) {
85 if ($loadTCA) {
86 t3lib_div::loadTCA($table);
87
88 // get all extending TCAs
89 if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['extendingTCA'])) {
90 tx_staticinfotables_div::loadTcaAdditions($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['extendingTCA']);
91 }
92 }
93
94 $lang = $lang ? $lang : tx_staticinfotables_div::getCurrentLanguage();
95
96 foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'][$table]['label_fields'] as $field) {
97 if ($local) {
98 $labelField = str_replace ('##', 'local', $field);
99 } else {
100 $labelField = str_replace ('##', $csConvObj->conv_case('utf-8',$lang,'toLower'), $field);
101 }
102 if (is_array($TCA[$table]['columns'][$labelField])) {
103 $labelFields[] = $labelField;
104 }
105 }
106 }
107 return $labelFields;
108 }
109
110
111 /**
112 * Returns the type of an iso code: nr, 2, 3
113 *
114 * @param string iso code
115 * @return string iso code type
116 */
117 function isoCodeType($isoCode) {
118 $type = '';
119 if (t3lib_div::testInt($isoCode)) {
120 $type = 'nr';
121 } elseif (strlen($isoCode) == 2) {
122 $type = '2';
123 } elseif (strlen($isoCode) == 3) {
124 $type = '3';
125 }
126 return $type;
127 }
128
129
130 /**
131 * Returns a iso code field for the passed table and iso code
132 *
133 * @param string table name
134 * @param string iso code
135 * @param boolean If set (default) the TCA definition of the table should be loaded with t3lib_div::loadTCA(). It will be needed to set it to false if you call this function from inside of tca.php
136 * @param [type] $index: ...
137 * @return string field name
138 */
139 function getIsoCodeField($table, $isoCode, $loadTCA=TRUE, $index=0) {
140 global $TCA;
141
142 if ($isoCode && $table && ($isoCodeField = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'][$table]['isocode_field'][$index])) {
143 if ($loadTCA) {
144 t3lib_div::loadTCA($table);
145 }
146
147 $type = tx_staticinfotables_div::isoCodeType($isoCode);
148
149 $isoCodeField = str_replace ('##', $type, $isoCodeField);
150 if (is_array($TCA[$table]['columns'][$isoCodeField])) {
151 return $isoCodeField;
152 }
153 }
154 return FALSE;
155 }
156
157
158 /**
159 * Returns a sort field for the current language
160 *
161 * @param string table name
162 * @param boolean If set (default) the TCA definition of the table should be loaded
163 * @return string field name
164 */
165 function getTCAsortField($table, $loadTCA=TRUE) {
166 $labelFields = tx_staticinfotables_div::getTCAlabelField($table, $loadTCA);
167
168 return $labelFields[0];
169 }
170
171
172 /**
173 * Returns the current language as iso-2-alpha code
174 *
175 * @return string 'DE', 'EN', 'DK', ...
176 */
177 function getCurrentLanguage() {
178 global $LANG, $TSFE, $TYPO3_DB;
179
180 if (is_object($LANG)) {
181 $langCodeT3 = $LANG->lang;
182 $csConvObj = $LANG->csConvObj;
183 } elseif (is_object($TSFE)) {
184 $langCodeT3 = $TSFE->lang;
185 $csConvObj = $TSFE->csConvObj;
186 } else {
187 return 'EN';
188 }
189
190 $res = $TYPO3_DB->exec_SELECTquery(
191 'lg_iso_2,lg_country_iso_2',
192 'static_languages',
193 'lg_typo3='.$TYPO3_DB->fullQuoteStr($langCodeT3,'static_languages')
194 );
195 while ($row = $TYPO3_DB->sql_fetch_assoc($res)) {
196 $lang = $row['lg_iso_2'].($row['lg_country_iso_2']?'_'.$row['lg_country_iso_2']:'');
197 }
198 $TYPO3_DB->sql_free_result($res);
199
200 $rc = $lang ? $lang : $csConvObj->conv_case('utf-8',$langCodeT3,'toUpper');
201 return $rc;
202 }
203
204 /**
205 * Returns the row of the current system language
206 *
207 * @param [type] $where: ...
208 * @return array row in the sys_language table
209 */
210 function getCurrentSystemLanguage($where='') {
211 global $LANG, $TSFE, $TYPO3_DB;
212
213 $rc = array();
214
215 if (is_object($LANG)) {
216 $langCodeT3 = $LANG->lang;
217 } elseif (is_object($TSFE)) {
218 $langCodeT3 = $TSFE->lang;
219 } else {
220 return $rc;
221 }
222
223 $res = $TYPO3_DB->exec_SELECTquery(
224 'sys_language.uid',
225 'sys_language LEFT JOIN static_languages ON sys_language.static_lang_isocode=static_languages.uid',
226 'static_languages.lg_typo3='.$TYPO3_DB->fullQuoteStr($langCodeT3,'static_languages').
227 $where
228 );
229 while($row = $TYPO3_DB->sql_fetch_assoc($res)) {
230 $rc[$row['uid']] = $row;
231 }
232
233 $TYPO3_DB->sql_free_result($res);
234 return $rc;
235 }
236
237 /*
238 *
239 * Returns the locale to used when sorting labels
240 *
241 * @return string locale
242 */
243 function getCollateLocale() {
244 global $LANG, $TSFE, $TYPO3_DB;
245
246 if (is_object($LANG)) {
247 $langCodeT3 = $LANG->lang;
248 } elseif (is_object($TSFE)) {
249 $langCodeT3 = $TSFE->lang;
250 } else {
251 return 'C';
252 }
253
254 $res = $TYPO3_DB->exec_SELECTquery(
255 'lg_collate_locale',
256 'static_languages',
257 'lg_typo3='.$TYPO3_DB->fullQuoteStr($langCodeT3,'static_languages')
258 );
259 while ($row = $TYPO3_DB->sql_fetch_assoc($res)) {
260 $locale = $row['lg_collate_locale'];
261 }
262 $TYPO3_DB->sql_free_result($res);
263 return $locale ? $locale : 'C';
264 }
265
266
267 /**
268 * Fetches short title from an iso code
269 *
270 * @param string table name
271 * @param string iso code
272 * @param string language code - if not set current default language is used
273 * @param boolean local name only - if set local title is returned
274 * @return string short title
275 */
276 function getTitleFromIsoCode($table, $isoCode, $lang='', $local=FALSE) {
277 global $TSFE, $TYPO3_DB;
278
279 $title = '';
280 $titleFields = tx_staticinfotables_div::getTCAlabelField($table, TRUE, $lang, $local);
281 if (count ($titleFields)) {
282 $prefixedTitleFields = array();
283 foreach ($titleFields as $titleField) {
284 $prefixedTitleFields[] = $table.'.'.$titleField;
285 }
286 $fields = implode(',', $prefixedTitleFields);
287 $whereClause = '';
288 if (!is_array($isoCode)) {
289 $isoCode = array($isoCode);
290 }
291 $index = 0;
292 foreach ($isoCode as $index => $code) {
293 if ($code != '') {
294 $tmpField = tx_staticinfotables_div::getIsoCodeField($table, $code, TRUE, $index);
295 $tmpValue = $TYPO3_DB->fullQuoteStr($code,$table);
296 if ($tmpField && $tmpValue) {
297 $whereClause .= ($index?' AND ':'').$table.'.'.$tmpField.' = '.$tmpValue;
298 }
299 }
300 }
301
302 if (is_object($TSFE)) {
303 $enableFields = $TSFE->sys_page->enableFields($table);
304 } else {
305 $enableFields = t3lib_BEfunc::deleteClause($table);
306 }
307
308 $res = $TYPO3_DB->exec_SELECTquery(
309 $fields,
310 $table,
311 $whereClause.$enableFields
312 );
313 if ($row = $TYPO3_DB->sql_fetch_assoc($res)) {
314 foreach ($titleFields as $titleField) {
315 if ($row[$titleField]) {
316 $title = $row[$titleField];
317 break;
318 }
319 }
320 }
321 $TYPO3_DB->sql_free_result($res);
322 }
323
324 return $title;
325 }
326
327
328 /**
329 * Replaces any dynamic markers in a SQL statement.
330 *
331 * @param string The SQL statement with dynamic markers.
332 * @param string Name of the table.
333 * @param array Database row.
334 * @return string SQL query with dynamic markers subsituted.
335 */
336 function replaceMarkersInSQL($sql, $table, $row) {
337
338 $TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig($table, $row);
339
340 /* Replace references to specific fields with value of that field */
341 if (strstr($sql,'###REC_FIELD_')) {
342 $sql_parts = explode('###REC_FIELD_',$sql);
343 while(list($kk,$vv)=each($sql_parts)) {
344 if ($kk) {
345 $sql_subpart = explode('###',$vv,2);
346 $sql_parts[$kk]=$TSconfig['_THIS_ROW'][$sql_subpart[0]].$sql_subpart[1];
347 }
348 }
349 $sql = implode('',$sql_parts);
350 }
351
352 /* Replace markers with TSConfig values */
353 $sql = str_replace('###THIS_UID###',intval($TSconfig['_THIS_UID']),$sql);
354 $sql = str_replace('###THIS_CID###',intval($TSconfig['_THIS_CID']),$sql);
355 $sql = str_replace('###SITEROOT###',intval($TSconfig['_SITEROOT']),$sql);
356 $sql = str_replace('###PAGE_TSCONFIG_ID###',intval($TSconfig[$field]['PAGE_TSCONFIG_ID']),$sql);
357 $sql = str_replace('###PAGE_TSCONFIG_IDLIST###',$GLOBALS['TYPO3_DB']->cleanIntList($TSconfig[$field]['PAGE_TSCONFIG_IDLIST']),$sql);
358 $sql = str_replace('###PAGE_TSCONFIG_STR###',$GLOBALS['TYPO3_DB']->quoteStr($TSconfig[$field]['PAGE_TSCONFIG_STR'], $table),$sql);
359
360 return $sql;
361 }
362
363
364 /**
365 * Function to use in own TCA definitions
366 * Adds additional select items
367 *
368 * items reference to the array of items (label,value,icon)
369 * config The config array for the field.
370 * TSconfig The "itemsProcFunc." from fieldTSconfig of the field.
371 * table Table name
372 * row Record row
373 * field Field name
374 *
375 * @param array itemsProcFunc data array:
376 * @return void The $items array may have been modified
377 */
378 function selectItemsTCA($params) {
379 global $TCA;
380
381 $where = '';
382 $config = &$params['config'];
383 $table = $config['itemsProcFunc_config']['table'];
384 $tcaWhere = $config['itemsProcFunc_config']['where'];
385 if ($tcaWhere) {
386 $where = tx_staticinfotables_div::replaceMarkersInSQL($tcaWhere, $params['table'], $params['row']);
387 }
388
389 if ($table) {
390 $indexField = $config['itemsProcFunc_config']['indexField'];
391 $indexField = $indexField ? $indexField : 'uid';
392
393 $lang = strtolower(tx_staticinfotables_div::getCurrentLanguage());
394 $titleFields = tx_staticinfotables_div::getTCAlabelField($table, TRUE, $lang);
395 $prefixedTitleFields = array();
396 foreach ($titleFields as $titleField) {
397 $prefixedTitleFields[] = $table.'.'.$titleField;
398 }
399 $fields = $table.'.'.$indexField.','.implode(',', $prefixedTitleFields);
400
401 if ($config['itemsProcFunc_config']['prependHotlist']) {
402
403 $limit = $config['itemsProcFunc_config']['hotlistLimit'];
404 $limit = $limit ? $limit : '8';
405 $app = $config['itemsProcFunc_config']['hotlistApp'];
406 $app = $app ? $app : TYPO3_MODE;
407
408 $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
409 $fields,
410 $table,
411 'tx_staticinfotables_hotlist',
412 '', // $foreign_table
413 'AND tx_staticinfotables_hotlist.tablenames='.$GLOBALS['TYPO3_DB']->fullQuoteStr($table,'tx_staticinfotables_hotlist').' AND tx_staticinfotables_hotlist.application='.$GLOBALS['TYPO3_DB']->fullQuoteStr($app,'tx_staticinfotables_hotlist'),
414 '',
415 'tx_staticinfotables_hotlist.sorting DESC', // $orderBy
416 $limit
417 );
418
419 $cnt = 0;
420 $rows = array();
421 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
422
423 foreach ($titleFields as $titleField) {
424 if ($row[$titleField]) {
425 $rows[$row[$indexField]] = $row[$titleField];
426 break;
427 }
428 }
429 $cnt++;
430 }
431 $GLOBALS['TYPO3_DB']->sql_free_result($res);
432
433 if (!isset($config['itemsProcFunc_config']['hotlistSort']) || $config['itemsProcFunc_config']['hotlistSort']) {
434 asort ($rows);
435 }
436
437 foreach ($rows as $index => $title) {
438 $params['items'][] = array($title, $index, '');
439 $cnt++;
440 }
441 if($cnt && !$config['itemsProcFunc_config']['hotlistOnly']) {
442 $params['items'][] = array('--------------', '', '');
443 }
444 }
445
446 // Set ORDER BY:
447 $orderBy = $titleFields[0];
448
449 if(!$config['itemsProcFunc_config']['hotlistOnly']) {
450 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $table, '1=1'.$where.t3lib_BEfunc::deleteClause($table), '', $orderBy);
451 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
452 foreach ($titleFields as $titleField) {
453 if ($row[$titleField]) {
454 $params['items'][] = array($row[$titleField], $row[$indexField], '');
455 break;
456 }
457 }
458 }
459 $GLOBALS['TYPO3_DB']->sql_free_result($res);
460 }
461 }
462 }
463
464
465 /**
466 * Updates the hotlist table.
467 * This means that a hotlist entry will be created or the counter of an existing entry will be increased
468 *
469 * @param string table name: static_countries, ...
470 * @param string value of the following index field
471 * @param string the field which holds the value and is an index field: uid (default) or one of the iso code fields which are also unique
472 * @param string This indicates a counter group. Default is TYPO3_MOD (BE or FE). If you want a unique hotlist for your application you can provide here a name (e.g. extension key)
473 * @return void
474 */
475 function updateHotlist ($table, $indexValue, $indexField='', $app='') {
476
477 if ($table && $indexValue) {
478 $indexField = $indexField ? $indexField : 'uid';
479 $app = $app ? $app : TYPO3_MODE;
480
481 if ($indexField=='uid') {
482 $uid = $indexValue;
483
484 } else {
485 // fetch original record
486 $fields = array();
487 $fields[$indexField] = $indexField;
488 $fields['uid'] = 'uid';
489
490 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(implode(',',$fields), $table, $indexField.'='.$GLOBALS['TYPO3_DB']->fullQuoteStr($indexValue,$table).t3lib_BEfunc::deleteClause($table));
491 if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
492 $uid = $row['uid'];
493 }
494 $GLOBALS['TYPO3_DB']->sql_free_result($res);
495 }
496
497 if ($uid) {
498 // update record from hotlist table
499 $newRow = array('sorting' => 'sorting+1');
500 // $res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
501 // 'tx_staticinfotables_hotlist',
502 // 'uid_local='.$uid.
503 // ' AND application='.$GLOBALS['TYPO3_DB']->fullQuoteStr($app,'tx_staticinfotables_hotlist').
504 // ' AND tablenames='.$GLOBALS['TYPO3_DB']->fullQuoteStr($table,'tx_staticinfotables_hotlist').
505 // t3lib_BEfunc::deleteClause('tx_staticinfotables_hotlist'),
506 // $newRow
507 // );
508
509 // the dumb update function does not allow to use sorting+1 - that's why this trick is necessary
510
511 $GLOBALS['TYPO3_DB']->sql_query(str_replace('"sorting+1"', 'sorting+1', $GLOBALS['TYPO3_DB']->UPDATEquery(
512 'tx_staticinfotables_hotlist',
513 'uid_local='.$uid.
514 ' AND application='.$GLOBALS['TYPO3_DB']->fullQuoteStr($app,'tx_staticinfotables_hotlist').
515 ' AND tablenames='.$GLOBALS['TYPO3_DB']->fullQuoteStr($table,'tx_staticinfotables_hotlist').
516 t3lib_BEfunc::deleteClause('tx_staticinfotables_hotlist'),
517 $newRow)));
518
519 if (!$GLOBALS['TYPO3_DB']->sql_affected_rows()) {
520 // insert new hotlist entry
521 $row = array(
522 'uid_local' => $uid,
523 'tablenames' => $table,
524 'application' => $app,
525 'sorting' => 1,
526 );
527 $res = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_staticinfotables_hotlist', $row);
528 $GLOBALS['TYPO3_DB']->sql_free_result($res);
529 }
530 }
531 }
532 }
533
534
535 /**
536 * Get a list of countries by specific parameters or parts of names of countries
537 * in different languages. Parameters might be left empty.
538 *
539 * @param string a name of the country or a part of it in any language
540 * @param string ISO alpha-2 code of the country
541 * @param string ISO alpha-3 code of the country
542 * @param array Database row.
543 * @return array Array of rows of country records
544 */
545 function &fetchCountries($country, $iso2='', $iso3='', $isonr='') {
546 global $TYPO3_DB;
547
548 $rcArray = array();
549 $where = '';
550
551 $table = 'static_countries';
552 if ($country != '') {
553 $value = $TYPO3_DB->fullQuoteStr(trim('%'.$country.'%'),$table);
554 $where = 'cn_official_name_local LIKE '.$value.' OR cn_official_name_en LIKE '.$value.' OR cn_short_local LIKE '.$value;
555 }
556
557 if ($isonr != '') {
558 $where = 'cn_iso_nr='.$TYPO3_DB->fullQuoteStr(trim($isonr),$table);
559 }
560
561 if ($iso2 != '') {
562 $where = 'cn_iso_2='.$TYPO3_DB->fullQuoteStr(trim($iso2),$table);
563 }
564
565 if ($iso3 !='') {
566 $where = 'cn_iso_3='.$TYPO3_DB->fullQuoteStr(trim($iso3),$table);
567 }
568
569 if ($where != '') {
570 $res = $TYPO3_DB->exec_SELECTquery('*', $table, $where);
571
572 if ($res) {
573 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
574 $rcArray[] = $row;
575 }
576 }
577 $GLOBALS['TYPO3_DB']->sql_free_result($res);
578 }
579 return $rcArray;
580 }
581
582
583 /**
584 * Quotes a string for usage as JS parameter. Depends wheter the value is used in script tags (it doesn't need/must not get htmlspecialchar'ed in this case)
585 *
586 * @param string The string to encode.
587 * @param boolean If the values get's used in <script> tags.
588 * @return string The encoded value already quoted
589 */
590 function quoteJSvalue($value, $inScriptTags = false) {
591 global $TSFE;
592
593 $value = addcslashes($value, '"'.chr(10).chr(13));
594 if (!$inScriptTags) {
595
596 $charset = $TSFE->renderCharset;
597 $value = htmlspecialchars($value,ENT_COMPAT,$charset);
598 }
599 return '"'.$value.'"';
600 }
601
602
603 /**
604 * loadTcaAdditions($ext_keys)
605 *
606 * See: div extension
607 * It has been copied here in order not to depend on this class library only for this function.
608 *
609 * @param array extension keys which have TCA additions to load
610 * @return [type] ...
611 */
612 function loadTcaAdditions($ext_keys){
613 global $_EXTKEY, $TCA;
614
615 //Merge all ext_keys
616 if (is_array($ext_keys)) {
617 for($i = 0; $i < sizeof($ext_keys); $i++) {
618 if (t3lib_extMgm::isLoaded($ext_keys[$i])) {
619 //Include the ext_table
620 $_EXTKEY = $ext_keys[$i];
621 include(t3lib_extMgm::extPath($ext_keys[$i]).'ext_tables.php');
622 }
623 }
624 }
625 }
626 }
627
628
629 if (defined('TYPO3_MODE') && $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/static_info_tables/class.tx_staticinfotables_div.php']) {
630 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/static_info_tables/class.tx_staticinfotables_div.php']);
631 }
632 ?>