Fixed bug #16574: PHP notices from XCLASS inclusions
[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 Skårhøj (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 Skårhøj
33 * XHTML compatible.
34 *
35 * @author Kasper Skårhøj <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 Skårhøj <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 Skårhøj <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::sanitizeLocalUrl(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->form='<form action="" name="editForm"><input type="hidden" name="defValues" value="" />';
204
205 // Setting up the context sensitive menu:
206 $this->doc->getContextMenuCode();
207
208 // Getting the current page and receiving access information (used in main())
209 $perms_clause = $BE_USER->getPagePermsClause(1);
210 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$perms_clause);
211 $this->access = is_array($this->pageinfo) ? 1 : 0;
212 }
213
214 /**
215 * Creating the module output.
216 *
217 * @return void
218 */
219 function main() {
220 global $LANG,$BACK_PATH;
221
222
223 if ($this->id && $this->access) {
224
225 // Init position map object:
226 $posMap = t3lib_div::makeInstance('ext_posMap');
227 $posMap->cur_sys_language = $this->sys_language;
228 $posMap->backPath = $BACK_PATH;
229
230 if ((string)$this->colPos!='') { // If a column is pre-set:
231 if ($this->uid_pid<0) {
232 $row=array();
233 $row['uid']=abs($this->uid_pid);
234 } else {
235 $row='';
236 }
237 $this->onClickEvent = $posMap->onClickInsertRecord($row, $this->colPos, '', $this->uid_pid, $this->sys_language);
238 } else {
239 $this->onClickEvent = '';
240 }
241
242
243 // ***************************
244 // Creating content
245 // ***************************
246 // use a wrapper div
247 $this->content .= '<div id="user-setup-wrapper">';
248 $this->content.=$this->doc->header($LANG->getLL('newContentElement'));
249 $this->content.=$this->doc->spacer(5);
250
251 // Wizard
252 $code='';
253 $wizardItems = $this->getWizardItems();
254
255 // Wrapper for wizards
256 $this->elementWrapper['sectionHeader'] = array('<h3 class="divider">', '</h3>');
257 $this->elementWrapper['section'] = array('<table border="0" cellpadding="1" cellspacing="2">', '</table>');
258 $this->elementWrapper['wizard'] = array('<tr>', '</tr>');
259 $this->elementWrapper['wizardPart'] = array('<td>', '</td>');
260 // copy wrapper for tabs
261 $this->elementWrapperForTabs = $this->elementWrapper;
262
263
264 // Hook for manipulating wizardItems, wrapper, onClickEvent etc.
265 if(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'])) {
266 foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'] as $classData) {
267 $hookObject = t3lib_div::getUserObj($classData);
268
269 if(!($hookObject instanceof cms_newContentElementWizardsHook)) {
270 throw new UnexpectedValueException('$hookObject must implement interface cms_newContentElementWizardItemsHook', 1227834741);
271 }
272
273 $hookObject->manipulateWizardItems($wizardItems, $this);
274 }
275 }
276
277 if ($this->config['renderMode'] == 'tabs' && $this->elementWrapperForTabs != $this->elementWrapper) {
278 // restore wrapper for tabs if they are overwritten in hook
279 $this->elementWrapper = $this->elementWrapperForTabs;
280 }
281
282 // add document inline javascript
283 $this->doc->JScode = $this->doc->wrapScriptTags('
284 function goToalt_doc() { //
285 ' . $this->onClickEvent . '
286 }
287
288 if(top.refreshMenu) {
289 top.refreshMenu();
290 } else {
291 top.TYPO3ModuleMenu.refreshMenu();
292 }
293 ');
294
295 // Traverse items for the wizard.
296 // An item is either a header or an item rendered with a radio button and title/description and icon:
297 $cc = $key = 0;
298 $menuItems = array();
299 foreach ($wizardItems as $k => $wInfo) {
300 if ($wInfo['header']) {
301 $menuItems[] = array(
302 'label' => htmlspecialchars($wInfo['header']),
303 'content' => $this->elementWrapper['section'][0]
304 );
305 $key = count($menuItems) - 1;
306 } else {
307 $content = '';
308 // Radio button:
309 $oC = "document.editForm.defValues.value=unescape('".rawurlencode($wInfo['params'])."');goToalt_doc();".(!$this->onClickEvent?"window.location.hash='#sel2';":'');
310 $content .= $this->elementWrapper['wizardPart'][0] .
311 '<input type="radio" name="tempB" value="' . htmlspecialchars($k) . '" onclick="' . htmlspecialchars($oC) . '" />' .
312 $this->elementWrapper['wizardPart'][1];
313
314 // Onclick action for icon/title:
315 $aOnClick = 'document.getElementsByName(\'tempB\')['.$cc.'].checked=1;'.$oC.'return false;';
316
317 // Icon:
318 $iInfo = @getimagesize($wInfo['icon']);
319 $content .= $this->elementWrapper['wizardPart'][0] .
320 '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
321 <img' . t3lib_iconWorks::skinImg($this->doc->backPath, $wInfo['icon'], '') . ' alt="" /></a>' .
322 $this->elementWrapper['wizardPart'][1];
323
324 // Title + description:
325 $content .= $this->elementWrapper['wizardPart'][0] .
326 '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"><strong>' . htmlspecialchars($wInfo['title']) . '</strong><br />' .
327 nl2br(htmlspecialchars(trim($wInfo['description']))) . '</a>' .
328 $this->elementWrapper['wizardPart'][1];
329
330 // Finally, put it together in a container:
331 $menuItems[$key]['content'] .= $this->elementWrapper['wizard'][0] . $content . $this->elementWrapper['wizard'][1];
332 $cc++;
333 }
334 }
335 // add closing section-tag
336 foreach ($menuItems as $key => $val) {
337 $menuItems[$key]['content'] .= $this->elementWrapper['section'][1];
338 }
339
340
341
342 // Add the wizard table to the content, wrapped in tabs:
343 if ($this->config['renderMode'] == 'tabs') {
344 $this->doc->inDocStylesArray[] = '
345 .typo3-dyntabmenu-divs { background-color: #fafafa; border: 1px solid #adadad; width: 680px; }
346 .typo3-dyntabmenu-divs table { margin: 15px; }
347 .typo3-dyntabmenu-divs table td { padding: 3px; }
348 ';
349 $code = $LANG->getLL('sel1', 1) . '<br /><br />' . $this->doc->getDynTabMenu($menuItems, 'new-content-element-wizard', FALSE, FALSE);
350 } else {
351 $code = $LANG->getLL('sel1',1) . '<br /><br />';
352 foreach ($menuItems as $section) {
353 $code .= $this->elementWrapper['sectionHeader'][0] . $section['label'] . $this->elementWrapper['sectionHeader'][1] . $section['content'];
354 }
355 }
356
357 $this->content.= $this->doc->section(!$this->onClickEvent ? $LANG->getLL('1_selectType') : '', $code, 0, 1);
358
359
360
361 // If the user must also select a column:
362 if (!$this->onClickEvent) {
363
364 // Add anchor "sel2"
365 $this->content.= $this->doc->section('','<a name="sel2"></a>');
366 $this->content.= $this->doc->spacer(20);
367
368 // Select position
369 $code = $LANG->getLL('sel2',1).'<br /><br />';
370
371 // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
372 $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->id,'mod.SHARED');
373 $colPosList = strcmp(trim($modTSconfig_SHARED['properties']['colPos_list']),'') ? trim($modTSconfig_SHARED['properties']['colPos_list']) : '1,0,2,3';
374 $colPosList = implode(',',array_unique(t3lib_div::intExplode(',',$colPosList))); // Removing duplicates, if any
375
376 // Finally, add the content of the column selector to the content:
377 $code.= $posMap->printContentElementColumns($this->id,0,$colPosList,1,$this->R_URI);
378 $this->content.= $this->doc->section($LANG->getLL('2_selectPosition'),$code,0,1);
379 }
380
381 // Close wrapper div
382 $this->content .= '</div>';
383 } else { // In case of no access:
384 $this->content = '';
385 $this->content.= $this->doc->header($LANG->getLL('newContentElement'));
386 $this->content.= $this->doc->spacer(5);
387 }
388
389 // Setting up the buttons and markers for docheader
390 $docHeaderButtons = $this->getButtons();
391 $markers['CSH'] = $docHeaderButtons['csh'];
392 $markers['CONTENT'] = $this->content;
393
394 // Build the <body> for the module
395 $this->content = $this->doc->startPage($LANG->getLL('newContentElement'));
396 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
397 $this->content .= $this->doc->sectionEnd();
398 $this->content.= $this->doc->endPage();
399 $this->content = $this->doc->insertStylesAndJS($this->content);
400 }
401
402 /**
403 * Print out the accumulated content:
404 *
405 * @return void
406 */
407 function printContent() {
408 echo $this->content;
409 }
410
411 /**
412 * Create the panel of buttons for submitting the form or otherwise perform operations.
413 *
414 * @return array all available buttons as an assoc. array
415 */
416 protected function getButtons() {
417 global $LANG, $BACK_PATH;
418
419 $buttons = array(
420 'csh' => '',
421 'back' => ''
422 );
423
424
425 if ($this->id && $this->access) {
426 // CSH
427 $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'new_ce', $GLOBALS['BACK_PATH'], '', TRUE);
428
429 // Back
430 if ($this->R_URI) {
431 $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $LANG->getLL('goBack', TRUE) . '">' .
432 t3lib_iconWorks::getSpriteIcon('actions-view-go-back') .
433 '</a>';
434 }
435 }
436
437
438 return $buttons;
439 }
440
441
442
443
444
445
446
447
448
449 /***************************
450 *
451 * OTHER FUNCTIONS:
452 *
453 ***************************/
454
455
456 /**
457 * Returns the content of wizardArray() function...
458 *
459 * @return array Returns the content of wizardArray() function...
460 */
461 function getWizardItems() {
462 return $this->wizardArray();
463 }
464
465 /**
466 * Returns the array of elements in the wizard display.
467 * For the plugin section there is support for adding elements there from a global variable.
468 *
469 * @return array
470 */
471 function wizardArray() {
472
473 if (is_array($this->config)) {
474 $wizards = $this->config['wizardItems.'];
475 }
476 $appendWizards = $this->wizard_appendWizards($wizards['elements.']);
477
478 $wizardItems = array();
479
480 if (is_array($wizards)) {
481 foreach ($wizards as $groupKey => $wizardGroup) {
482 $groupKey = preg_replace('/\.$/', '', $groupKey);
483 $showItems = t3lib_div::trimExplode(',', $wizardGroup['show'], true);
484 $showAll = (strcmp($wizardGroup['show'], '*') ? false : true);
485 $groupItems = array();
486
487 if (is_array($appendWizards[$groupKey . '.']['elements.'])) {
488 $wizardElements = array_merge((array) $wizardGroup['elements.'], $appendWizards[$groupKey . '.']['elements.']);
489 } else {
490 $wizardElements = $wizardGroup['elements.'];
491 }
492
493 if (is_array($wizardElements)) {
494 foreach ($wizardElements as $itemKey => $itemConf) {
495 $itemKey = preg_replace('/\.$/', '', $itemKey);
496 if ($showAll || in_array($itemKey, $showItems)) {
497 $tmpItem = $this->wizard_getItem($groupKey, $itemKey, $itemConf);
498 if ($tmpItem) {
499 $groupItems[$groupKey . '_' . $itemKey] = $tmpItem;
500 }
501 }
502 }
503 }
504 if (count($groupItems)) {
505 $wizardItems[$groupKey] = $this->wizard_getGroupHeader($groupKey, $wizardGroup);
506 $wizardItems = array_merge($wizardItems, $groupItems);
507 }
508 }
509 }
510
511 // Remove elements where preset values are not allowed:
512 $this->removeInvalidElements($wizardItems);
513
514 return $wizardItems;
515 }
516
517 function wizard_appendWizards($wizardElements) {
518 if (!is_array($wizardElements)) {
519 $wizardElements = array();
520 }
521 if (is_array($GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'])) {
522 foreach ($GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'] as $class => $path) {
523 require_once($path);
524 $modObj = t3lib_div::makeInstance($class);
525 $wizardElements = $modObj->proc($wizardElements);
526 }
527 }
528 $returnElements = array();
529 foreach ($wizardElements as $key => $wizardItem) {
530 preg_match('/^[a-zA-Z0-9]+_/', $key, $group);
531 $wizardGroup = $group[0] ? substr($group[0], 0, -1) . '.' : $key;
532 $returnElements[$wizardGroup]['elements.'][substr($key, strlen($wizardGroup)) . '.'] = $wizardItem;
533 }
534 return $returnElements;
535 }
536
537
538 function wizard_getItem($groupKey, $itemKey, $itemConf) {
539 $itemConf['title'] = $GLOBALS['LANG']->sL($itemConf['title']);
540 $itemConf['description'] = $GLOBALS['LANG']->sL($itemConf['description']);
541 $itemConf['tt_content_defValues'] = $itemConf['tt_content_defValues.'];
542 unset($itemConf['tt_content_defValues.']);
543 return $itemConf;
544 }
545
546 function wizard_getGroupHeader($groupKey, $wizardGroup) {
547 return array(
548 'header' => $GLOBALS['LANG']->sL($wizardGroup['header'])
549 );
550 }
551
552
553 /**
554 * Checks the array for elements which might contain unallowed default values and will unset them!
555 * 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).
556 *
557 * @param array Wizard items, passed by reference
558 * @return void
559 */
560 function removeInvalidElements(&$wizardItems) {
561 global $TCA;
562
563 // Load full table definition:
564 t3lib_div::loadTCA('tt_content');
565
566 // Get TCEFORM from TSconfig of current page
567 $row = array('pid' => $this->id);
568 $TCEFORM_TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig('tt_content', $row);
569 $removeItems = t3lib_div::trimExplode(',', $TCEFORM_TSconfig['CType']['removeItems'], 1);
570 $keepItems = t3lib_div::trimExplode(',', $TCEFORM_TSconfig['CType']['keepItems'], 1);
571
572 $headersUsed = Array();
573 // Traverse wizard items:
574 foreach($wizardItems as $key => $cfg) {
575
576 // Exploding parameter string, if any (old style)
577 if ($wizardItems[$key]['params']) {
578 // Explode GET vars recursively
579 $tempGetVars = t3lib_div::explodeUrl2Array($wizardItems[$key]['params'],TRUE);
580 // 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).
581 if (is_array($tempGetVars['defVals']['tt_content'])) {
582 $wizardItems[$key]['tt_content_defValues'] = array_merge(is_array($wizardItems[$key]['tt_content_defValues']) ? $wizardItems[$key]['tt_content_defValues'] : array(), $tempGetVars['defVals']['tt_content']);
583 unset($tempGetVars['defVals']['tt_content']);
584 $wizardItems[$key]['params'] = t3lib_div::implodeArrayForUrl('',$tempGetVars);
585 }
586 }
587
588 // If tt_content_defValues are defined...:
589 if (is_array($wizardItems[$key]['tt_content_defValues'])) {
590
591 // Traverse field values:
592 foreach($wizardItems[$key]['tt_content_defValues'] as $fN => $fV) {
593 if (is_array($TCA['tt_content']['columns'][$fN])) {
594 // Get information about if the field value is OK:
595 $config = &$TCA['tt_content']['columns'][$fN]['config'];
596 $authModeDeny = ($config['type']=='select' && $config['authMode'] && !$GLOBALS['BE_USER']->checkAuthMode('tt_content', $fN, $fV, $config['authMode']));
597 $isNotInKeepItems = (count($keepItems) && !in_array($fV, $keepItems));
598
599 if ($authModeDeny || ($fN=='CType' && in_array($fV,$removeItems)) || $isNotInKeepItems) {
600 // Remove element all together:
601 unset($wizardItems[$key]);
602 break;
603 } else {
604 // Add the parameter:
605 $wizardItems[$key]['params'].= '&defVals[tt_content]['.$fN.']='.rawurlencode($fV);
606 $tmp = explode('_', $key);
607 $headersUsed[$tmp[0]] = $tmp[0];
608 }
609 }
610 }
611 }
612 }
613 // remove headers without elements
614 foreach ($wizardItems as $key => $cfg) {
615 $tmp = explode('_',$key);
616 if ($tmp[0] && !$tmp[1] && !in_array($tmp[0], $headersUsed)) {
617 unset($wizardItems[$key]);
618 }
619 }
620 }
621 }
622
623
624 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/cms/layout/db_new_content_el.php'])) {
625 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/cms/layout/db_new_content_el.php']);
626 }
627
628
629
630 // Make instance:
631 $SOBE = t3lib_div::makeInstance('SC_db_new_content_el');
632 $SOBE->init();
633
634 // Include files?
635 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
636
637 $SOBE->main();
638 $SOBE->printContent();
639
640 ?>