Cleanup: Updated copyright comments
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / layout / db_new_content_el.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2010 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 * New content elements wizard
29 * (Part of the 'cms' extension)
30 *
31 * $Id$
32 * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
33 * XHTML compatible.
34 *
35 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
36 */
37 /**
38 * [CLASS/FUNCTION INDEX of SCRIPT]
39 *
40 *
41 *
42 * 101: class ext_posMap extends t3lib_positionMap
43 * 111: function wrapRecordTitle($str,$row)
44 * 125: function onClickInsertRecord($row,$vv,$moveUid,$pid,$sys_lang=0)
45 *
46 *
47 * 153: class SC_db_new_content_el
48 * 176: function init()
49 * 212: function main()
50 * 359: function printContent()
51 *
52 * SECTION: OTHER FUNCTIONS:
53 * 388: function getWizardItems()
54 * 398: function wizardArray()
55 * 549: function removeInvalidElements(&$wizardItems)
56 *
57 * TOTAL FUNCTIONS: 8
58 * (This index is automatically created/updated by the extension "extdeveval")
59 *
60 */
61
62
63 unset($MCONF);
64 require('conf.php');
65 require($BACK_PATH.'init.php');
66 require($BACK_PATH.'template.php');
67
68 // Unset MCONF/MLANG since all we wanted was back path etc. for this particular script.
69 unset($MCONF);
70 unset($MLANG);
71
72 // Merging locallang files/arrays:
73 $LANG->includeLLFile('EXT:lang/locallang_misc.xml');
74 $LOCAL_LANG_orig = $LOCAL_LANG;
75 $LANG->includeLLFile('EXT:cms/layout/locallang_db_new_content_el.xml');
76 $LOCAL_LANG = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG_orig,$LOCAL_LANG);
77
78 // Exits if 'cms' extension is not loaded:
79 t3lib_extMgm::isLoaded('cms',1);
80
81
82
83
84
85
86
87 /**
88 * Local position map class
89 *
90 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
91 * @package TYPO3
92 * @subpackage core
93 */
94 class ext_posMap extends t3lib_positionMap {
95 var $dontPrintPageInsertIcons = 1;
96
97 /**
98 * Wrapping the title of the record - here we just return it.
99 *
100 * @param string The title value.
101 * @param array The record row.
102 * @return string Wrapped title string.
103 */
104 function wrapRecordTitle($str,$row) {
105 return $str;
106 }
107
108 /**
109 * Create on-click event value.
110 *
111 * @param array The record.
112 * @param string Column position value.
113 * @param integer Move uid
114 * @param integer PID value.
115 * @param integer System language
116 * @return string
117 */
118 function onClickInsertRecord($row,$vv,$moveUid,$pid,$sys_lang=0) {
119 $table='tt_content';
120
121 $location=$this->backPath.'alt_doc.php?edit[tt_content]['.(is_array($row)?-$row['uid']:$pid).']=new&defVals[tt_content][colPos]='.$vv.'&defVals[tt_content][sys_language_uid]='.$sys_lang.'&returnUrl='.rawurlencode($GLOBALS['SOBE']->R_URI);
122
123 return 'window.location.href=\''.$location.'\'+document.editForm.defValues.value; return false;';
124 }
125 }
126
127
128
129
130
131
132
133
134
135
136
137
138
139 /**
140 * Script Class for the New Content element wizard
141 *
142 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
143 * @package TYPO3
144 * @subpackage core
145 */
146 class SC_db_new_content_el {
147
148 // Internal, static (from GPvars):
149 var $id; // Page id
150 var $sys_language=0; // Sys language
151 var $R_URI=''; // Return URL.
152 var $colPos; // If set, the content is destined for a specific column.
153 var $uid_pid; //
154
155 // Internal, static:
156 var $modTSconfig=array(); // Module TSconfig.
157
158 /**
159 * Internal backend template object
160 *
161 * @var mediumDoc
162 */
163 var $doc;
164
165 // Internal, dynamic:
166 var $include_once = array(); // Includes a list of files to include between init() and main() - see init()
167 var $content; // Used to accumulate the content of the module.
168 var $access; // Access boolean.
169 var $config; // config of the wizard
170
171
172 /**
173 * Constructor, initializing internal variables.
174 *
175 * @return void
176 */
177 function init() {
178 global $BE_USER,$BACK_PATH,$TBE_MODULES_EXT;
179
180 // Setting class files to include:
181 if (is_array($TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses'])) {
182 $this->include_once = array_merge($this->include_once,$TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']);
183 }
184
185 // Setting internal vars:
186 $this->id = intval(t3lib_div::_GP('id'));
187 $this->sys_language = intval(t3lib_div::_GP('sys_language_uid'));
188 $this->R_URI = t3lib_div::_GP('returnUrl');
189 $this->colPos = t3lib_div::_GP('colPos');
190 $this->uid_pid = intval(t3lib_div::_GP('uid_pid'));
191
192 $this->MCONF['name'] = 'xMOD_db_new_content_el';
193 $this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.wizards.newContentElement');
194
195 $config = t3lib_BEfunc::getPagesTSconfig($this->id);
196 $this->config = $config['mod.']['wizards.']['newContentElement.'];
197
198 // Starting the document template object:
199 $this->doc = t3lib_div::makeInstance('template');
200 $this->doc->backPath = $BACK_PATH;
201 $this->doc->setModuleTemplate('templates/db_new_content_el.html');
202 $this->doc->JScode='';
203 $this->doc->JScodeLibArray['dyntabmenu'] = $this->doc->getDynTabMenuJScode();
204 $this->doc->form='<form action="" name="editForm"><input type="hidden" name="defValues" value="" />';
205
206 // Setting up the context sensitive menu:
207 $this->doc->getContextMenuCode();
208
209 // Getting the current page and receiving access information (used in main())
210 $perms_clause = $BE_USER->getPagePermsClause(1);
211 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$perms_clause);
212 $this->access = is_array($this->pageinfo) ? 1 : 0;
213 }
214
215 /**
216 * Creating the module output.
217 *
218 * @return void
219 */
220 function main() {
221 global $LANG,$BACK_PATH;
222
223
224 if ($this->id && $this->access) {
225
226 // Init position map object:
227 $posMap = t3lib_div::makeInstance('ext_posMap');
228 $posMap->cur_sys_language = $this->sys_language;
229 $posMap->backPath = $BACK_PATH;
230
231 if ((string)$this->colPos!='') { // If a column is pre-set:
232 if ($this->uid_pid<0) {
233 $row=array();
234 $row['uid']=abs($this->uid_pid);
235 } else {
236 $row='';
237 }
238 $this->onClickEvent = $posMap->onClickInsertRecord($row, $this->colPos, '', $this->uid_pid, $this->sys_language);
239 } else {
240 $this->onClickEvent = '';
241 }
242
243
244 // ***************************
245 // Creating content
246 // ***************************
247 // use a wrapper div
248 $this->content .= '<div id="user-setup-wrapper">';
249 $this->content.=$this->doc->header($LANG->getLL('newContentElement'));
250 $this->content.=$this->doc->spacer(5);
251
252 // Wizard
253 $code='';
254 $wizardItems = $this->getWizardItems();
255
256 // Wrapper for wizards
257 $this->elementWrapper['sectionHeader'] = array('<h3 class="bgColor5">', '</h3>');
258 $this->elementWrapper['section'] = array('<table border="0" cellpadding="1" cellspacing="2">', '</table>');
259 $this->elementWrapper['wizard'] = array('<tr>', '</tr>');
260 $this->elementWrapper['wizardPart'] = array('<td>', '</td>');
261 // copy wrapper for tabs
262 $this->elementWrapperForTabs = $this->elementWrapper;
263
264
265 // Hook for manipulating wizardItems, wrapper, onClickEvent etc.
266 if(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'])) {
267 foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'] as $classData) {
268 $hookObject = t3lib_div::getUserObj($classData);
269
270 if(!($hookObject instanceof cms_newContentElementWizardsHook)) {
271 throw new UnexpectedValueException('$hookObject must implement interface cms_newContentElementWizardItemsHook', 1227834741);
272 }
273
274 $hookObject->manipulateWizardItems($wizardItems, $this);
275 }
276 }
277
278 if ($this->config['renderMode'] == 'tabs' && $this->elementWrapperForTabs != $this->elementWrapper) {
279 // restore wrapper for tabs if they are overwritten in hook
280 $this->elementWrapper = $this->elementWrapperForTabs;
281 }
282
283 // add document inline javascript
284 $this->doc->JScode = $this->doc->wrapScriptTags('
285 function goToalt_doc() { //
286 ' . $this->onClickEvent . '
287 }
288
289 if(top.refreshMenu) {
290 top.refreshMenu();
291 } else {
292 top.TYPO3ModuleMenu.refreshMenu();
293 }
294 ');
295
296 // Traverse items for the wizard.
297 // An item is either a header or an item rendered with a radio button and title/description and icon:
298 $cc = $key = 0;
299 $menuItems = array();
300 foreach ($wizardItems as $k => $wInfo) {
301 if ($wInfo['header']) {
302 $menuItems[] = array(
303 'label' => htmlspecialchars($wInfo['header']),
304 'content' => $this->elementWrapper['section'][0]
305 );
306 $key = count($menuItems) - 1;
307 } else {
308 $content = '';
309 // Radio button:
310 $oC = "document.editForm.defValues.value=unescape('".rawurlencode($wInfo['params'])."');goToalt_doc();".(!$this->onClickEvent?"window.location.hash='#sel2';":'');
311 $content .= $this->elementWrapper['wizardPart'][0] .
312 '<input type="radio" name="tempB" value="' . htmlspecialchars($k) . '" onclick="' . htmlspecialchars($this->doc->thisBlur().$oC) . '" />' .
313 $this->elementWrapper['wizardPart'][1];
314
315 // Onclick action for icon/title:
316 $aOnClick = 'document.getElementsByName(\'tempB\')['.$cc.'].checked=1;'.$this->doc->thisBlur().$oC.'return false;';
317
318 // Icon:
319 $iInfo = @getimagesize($wInfo['icon']);
320 $content .= $this->elementWrapper['wizardPart'][0] .
321 '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
322 <img' . t3lib_iconWorks::skinImg($this->doc->backPath, $wInfo['icon'], '') . ' alt="" /></a>' .
323 $this->elementWrapper['wizardPart'][1];
324
325 // Title + description:
326 $content .= $this->elementWrapper['wizardPart'][0] .
327 '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"><strong>' . htmlspecialchars($wInfo['title']) . '</strong><br />' .
328 nl2br(htmlspecialchars(trim($wInfo['description']))) . '</a>' .
329 $this->elementWrapper['wizardPart'][1];
330
331 // Finally, put it together in a container:
332 $menuItems[$key]['content'] .= $this->elementWrapper['wizard'][0] . $content . $this->elementWrapper['wizard'][1];
333 $cc++;
334 }
335 }
336 // add closing section-tag
337 foreach ($menuItems as $key => $val) {
338 $menuItems[$key]['content'] .= $this->elementWrapper['section'][1];
339 }
340
341
342
343 // Add the wizard table to the content, wrapped in tabs:
344 if ($this->config['renderMode'] == 'tabs') {
345 $this->doc->inDocStylesArray[] = '
346 .typo3-dyntabmenu-divs { background-color: #fafafa; border: 1px solid #adadad; width: 680px; }
347 .typo3-dyntabmenu-divs table { margin: 15px; }
348 .typo3-dyntabmenu-divs table td { padding: 3px; }
349 ';
350 $code = $LANG->getLL('sel1',1) . '<br /><br />' . $this->doc->getDynTabMenu($menuItems, 'new-content-element-wizard', false, false, 100);
351 } else {
352 $code = $LANG->getLL('sel1',1) . '<br /><br />';
353 foreach ($menuItems as $section) {
354 $code .= $this->elementWrapper['sectionHeader'][0] . $section['label'] . $this->elementWrapper['sectionHeader'][1] . $section['content'];
355 }
356 }
357
358 $this->content.= $this->doc->section(!$this->onClickEvent ? $LANG->getLL('1_selectType') : '', $code, 0, 1);
359
360
361
362 // If the user must also select a column:
363 if (!$this->onClickEvent) {
364
365 // Add anchor "sel2"
366 $this->content.= $this->doc->section('','<a name="sel2"></a>');
367 $this->content.= $this->doc->spacer(20);
368
369 // Select position
370 $code = $LANG->getLL('sel2',1).'<br /><br />';
371
372 // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
373 $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->id,'mod.SHARED');
374 $colPosList = strcmp(trim($modTSconfig_SHARED['properties']['colPos_list']),'') ? trim($modTSconfig_SHARED['properties']['colPos_list']) : '1,0,2,3';
375 $colPosList = implode(',',array_unique(t3lib_div::intExplode(',',$colPosList))); // Removing duplicates, if any
376
377 // Finally, add the content of the column selector to the content:
378 $code.= $posMap->printContentElementColumns($this->id,0,$colPosList,1,$this->R_URI);
379 $this->content.= $this->doc->section($LANG->getLL('2_selectPosition'),$code,0,1);
380 }
381 } else { // In case of no access:
382 $this->content = '';
383 $this->content.= $this->doc->header($LANG->getLL('newContentElement'));
384 $this->content.= $this->doc->spacer(5);
385 }
386
387 // Setting up the buttons and markers for docheader
388 $docHeaderButtons = $this->getButtons();
389 $markers['CSH'] = $docHeaderButtons['csh'];
390 $markers['CONTENT'] = $this->content;
391
392 // Build the <body> for the module
393 $this->content = $this->doc->startPage($LANG->getLL('newContentElement'));
394 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
395 $this->content .= $this->doc->sectionEnd();
396 $this->content.= $this->doc->endPage();
397 $this->content = $this->doc->insertStylesAndJS($this->content);
398 }
399
400 /**
401 * Print out the accumulated content:
402 *
403 * @return void
404 */
405 function printContent() {
406 echo $this->content;
407 }
408
409 /**
410 * Create the panel of buttons for submitting the form or otherwise perform operations.
411 *
412 * @return array all available buttons as an assoc. array
413 */
414 protected function getButtons() {
415 global $LANG, $BACK_PATH;
416
417 $buttons = array(
418 'csh' => '',
419 'back' => ''
420 );
421
422
423 if ($this->id && $this->access) {
424 // CSH
425 $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'new_ce', $GLOBALS['BACK_PATH'], '', TRUE);
426
427 // Back
428 if ($this->R_URI) {
429 $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $LANG->getLL('goBack', TRUE) . '">' .
430 t3lib_iconWorks::getSpriteIcon('actions-view-go-back') .
431 '</a>';
432 }
433 }
434
435
436 return $buttons;
437 }
438
439
440
441
442
443
444
445
446
447 /***************************
448 *
449 * OTHER FUNCTIONS:
450 *
451 ***************************/
452
453
454 /**
455 * Returns the content of wizardArray() function...
456 *
457 * @return array Returns the content of wizardArray() function...
458 */
459 function getWizardItems() {
460 return $this->wizardArray();
461 }
462
463 /**
464 * Returns the array of elements in the wizard display.
465 * For the plugin section there is support for adding elements there from a global variable.
466 *
467 * @return array
468 */
469 function wizardArray() {
470
471 if (is_array($this->config)) {
472 $wizards = $this->config['wizardItems.'];
473 }
474 $appendWizards = $this->wizard_appendWizards($wizards['elements.']);
475
476 $wizardItems = array();
477
478 if (is_array($wizards)) {
479 foreach ($wizards as $groupKey => $wizardGroup) {
480 $groupKey = preg_replace('/\.$/', '', $groupKey);
481 $showItems = t3lib_div::trimExplode(',', $wizardGroup['show'], true);
482 $showAll = (strcmp($wizardGroup['show'], '*') ? false : true);
483 $groupItems = array();
484
485 if (is_array($appendWizards[$groupKey . '.']['elements.'])) {
486 $wizardElements = array_merge((array) $wizardGroup['elements.'], $appendWizards[$groupKey . '.']['elements.']);
487 } else {
488 $wizardElements = $wizardGroup['elements.'];
489 }
490
491 if (is_array($wizardElements)) {
492 foreach ($wizardElements as $itemKey => $itemConf) {
493 $itemKey = preg_replace('/\.$/', '', $itemKey);
494 if ($showAll || in_array($itemKey, $showItems)) {
495 $tmpItem = $this->wizard_getItem($groupKey, $itemKey, $itemConf);
496 if ($tmpItem) {
497 $groupItems[$groupKey . '_' . $itemKey] = $tmpItem;
498 }
499 }
500 }
501 }
502 if (count($groupItems)) {
503 $wizardItems[$groupKey] = $this->wizard_getGroupHeader($groupKey, $wizardGroup);
504 $wizardItems = array_merge($wizardItems, $groupItems);
505 }
506 }
507 }
508
509 // Remove elements where preset values are not allowed:
510 $this->removeInvalidElements($wizardItems);
511
512 return $wizardItems;
513 }
514
515 function wizard_appendWizards($wizardElements) {
516 if (!is_array($wizardElements)) {
517 $wizardElements = array();
518 }
519 if (is_array($GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'])) {
520 foreach ($GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'] as $class => $path) {
521 require_once($path);
522 $modObj = t3lib_div::makeInstance($class);
523 $wizardElements = $modObj->proc($wizardElements);
524 }
525 }
526 $returnElements = array();
527 foreach ($wizardElements as $key => $wizardItem) {
528 preg_match('/^[a-zA-Z0-9]+_/', $key, $group);
529 $wizardGroup = $group[0] ? substr($group[0], 0, -1) . '.' : $key;
530 $returnElements[$wizardGroup]['elements.'][substr($key, strlen($wizardGroup)) . '.'] = $wizardItem;
531 }
532 return $returnElements;
533 }
534
535
536 function wizard_getItem($groupKey, $itemKey, $itemConf) {
537 $itemConf['title'] = $GLOBALS['LANG']->sL($itemConf['title']);
538 $itemConf['description'] = $GLOBALS['LANG']->sL($itemConf['description']);
539 $itemConf['tt_content_defValues'] = $itemConf['tt_content_defValues.'];
540 unset($itemConf['tt_content_defValues.']);
541 return $itemConf;
542 }
543
544 function wizard_getGroupHeader($groupKey, $wizardGroup) {
545 return array(
546 'header' => $GLOBALS['LANG']->sL($wizardGroup['header'])
547 );
548 }
549
550
551 /**
552 * Checks the array for elements which might contain unallowed default values and will unset them!
553 * Looks for the "tt_content_defValues" key in each element and if found it will traverse that array as fieldname / value pairs and check. The values will be added to the "params" key of the array (which should probably be unset or empty by default).
554 *
555 * @param array Wizard items, passed by reference
556 * @return void
557 */
558 function removeInvalidElements(&$wizardItems) {
559 global $TCA;
560
561 // Load full table definition:
562 t3lib_div::loadTCA('tt_content');
563
564 // Get TCEFORM from TSconfig of current page
565 $row = array('pid' => $this->id);
566 $TCEFORM_TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig('tt_content', $row);
567 $removeItems = t3lib_div::trimExplode(',', $TCEFORM_TSconfig['CType']['removeItems'], 1);
568 $keepItems = t3lib_div::trimExplode(',', $TCEFORM_TSconfig['CType']['keepItems'], 1);
569
570 $headersUsed = Array();
571 // Traverse wizard items:
572 foreach($wizardItems as $key => $cfg) {
573
574 // Exploding parameter string, if any (old style)
575 if ($wizardItems[$key]['params']) {
576 // Explode GET vars recursively
577 $tempGetVars = t3lib_div::explodeUrl2Array($wizardItems[$key]['params'],TRUE);
578 // If tt_content values are set, merge them into the tt_content_defValues array, unset them from $tempGetVars and re-implode $tempGetVars into the param string (in case remaining parameters are around).
579 if (is_array($tempGetVars['defVals']['tt_content'])) {
580 $wizardItems[$key]['tt_content_defValues'] = array_merge(is_array($wizardItems[$key]['tt_content_defValues']) ? $wizardItems[$key]['tt_content_defValues'] : array(), $tempGetVars['defVals']['tt_content']);
581 unset($tempGetVars['defVals']['tt_content']);
582 $wizardItems[$key]['params'] = t3lib_div::implodeArrayForUrl('',$tempGetVars);
583 }
584 }
585
586 // If tt_content_defValues are defined...:
587 if (is_array($wizardItems[$key]['tt_content_defValues'])) {
588
589 // Traverse field values:
590 foreach($wizardItems[$key]['tt_content_defValues'] as $fN => $fV) {
591 if (is_array($TCA['tt_content']['columns'][$fN])) {
592 // Get information about if the field value is OK:
593 $config = &$TCA['tt_content']['columns'][$fN]['config'];
594 $authModeDeny = ($config['type']=='select' && $config['authMode'] && !$GLOBALS['BE_USER']->checkAuthMode('tt_content', $fN, $fV, $config['authMode']));
595 $isNotInKeepItems = (count($keepItems) && !in_array($fV, $keepItems));
596
597 if ($authModeDeny || ($fN=='CType' && in_array($fV,$removeItems)) || $isNotInKeepItems) {
598 // Remove element all together:
599 unset($wizardItems[$key]);
600 break;
601 } else {
602 // Add the parameter:
603 $wizardItems[$key]['params'].= '&defVals[tt_content]['.$fN.']='.rawurlencode($fV);
604 $tmp = explode('_', $key);
605 $headersUsed[$tmp[0]] = $tmp[0];
606 }
607 }
608 }
609 }
610 }
611 // remove headers without elements
612 foreach ($wizardItems as $key => $cfg) {
613 $tmp = explode('_',$key);
614 if ($tmp[0] && !$tmp[1] && !in_array($tmp[0], $headersUsed)) {
615 unset($wizardItems[$key]);
616 }
617 }
618 }
619 }
620
621
622 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/cms/layout/db_new_content_el.php']) {
623 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/cms/layout/db_new_content_el.php']);
624 }
625
626
627
628 // Make instance:
629 $SOBE = t3lib_div::makeInstance('SC_db_new_content_el');
630 $SOBE->init();
631
632 // Include files?
633 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
634
635 $SOBE->main();
636 $SOBE->printContent();
637
638 ?>