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